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,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,yKCtPAr5C,MAAA,sFAKEA,MAHA,QAAAA,MAAA,IAAAO,EAAA+4C,WAGAt5C,CAH2B,YAAAA,MAAA,IAAAO,EAAAg5C,YAG3Bv5C,CAFgC,YAAAO,EAAAi5C,SAEhCx5C,CADsB,gBAAAO,EAAAk5C,yCAUtBz5C,MANF,wBAMEA,CADD,UACOA,MAAA,8BAAyCA,QAC/CA,MAAA,UAAMA,MAAA,8BACRA,gCAJEA,MADA,QAAAO,EAAAquC,kBAAAC,QACA7uC,CADmC,SAAAO,EAAAm5C,mBAAAC,OAG7B35C,MAAA,GAAAA,MAAA,GAAAA,MAAA,2BACAA,MAAA,GAAAA,YAAA,uEAGRA,MAAA,sFAKEA,MAHA,QAAAA,MAAA,IAAAO,EAAAq5C,UAGA55C,CAH0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AOgjN,GAAMhjN,IACrB,OAAO,EAKX,UAAWuN,MAAOw1M,GAChB,IAAKnvL,EAAaivL,GAAiBt1M,IAAOu1M,GAAiBv1M,KACzD,OAAO,EAIX,OAAO,CACT,CASM,SAAU21M,EAAS5pJ,GAAU,GAAIj6B,GAAoB8jL,GAAW,KACpE,IAAIC,GAAoB,GACxB,OAAKpsK,EAAQsiB,MAET8pJ,IAD2B,IAAzB9pJ,GAAQt2B,QAAQ,KACE,IAEAmgL,IAItB7pJ,GACA8pJ,GACAlgN,OAAOC,KAAKk8B,IACT7kC,IAAK+S,IAAQ,GAAGA,MAAO+5E,OAAOjoD,GAAW9xB,QACzCjL,KAAK6gN,GAEZ,CAQO,MAAME,GAAYA,CAOvBnpM,GACAopM,KAECpgN,OAAOC,KAAK+W,IAAWgC,OAAY,CAACC,GAAUyd,MAC7Czd,GAAIyd,IAAO0pL,GAAOppM,GAAE0f,IAAWA,IACxBzd,IACN,IAOQonM,EAAUA,CAAIC,GAAiC,KAC1DtB,EAASsB,IAAStnM,OAAO,CAACunM,GAAcjrI,KAAiB,IAAIirI,MAAYjrI,IAAU,IAExEkrI,GAA4B,CACvC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA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IG,SAAWK,GAAwBqzB,GAAqB,EAC9D,UCSgB40B,GAAmBC,EAAoBC,EAAiB78c,GACtE,MAAMsia,EAAeJ,KAAmB06C,EAClCp9C,EAAQ0B,KACd,OAAO1B,EAAM8C,KAAkBoiB,GAC3B4d,GAAc9iC,EAAO8C,EAActia,EAAU68c,EAAO58c,KAAKD,GAAW68c,KACpEta,GAAW/iC,EAAO8C,EACxB,CAcM,SAAUw6C,GACdF,EACAC,EACAE,EACA/8c,GAEA,OAAOg9c,GAAsB97C,KAAYgB,KAAkB06C,EAAYC,EAAQE,EAAK/8c,EACtF,CAeM,SAAUi9c,GACdL,EACAC,EACAna,EACAC,EACA3ic,GAEA,OAAOk9c,GACLh8C,KACAgB,KACA06C,EACAC,EACAna,EACAC,EACA3ic,EAEJ,CAgBgB,SAAAm9c,GACdP,EACAC,EACAna,EACAC,EACAG,EACA9ic,GAEA,OAAOo9c,GACLl8C,KACAgB,KACA06C,EACAC,EACAna,EACAC,EACAG,EACA9ic,EAEJ,CAiBgB,SAAAq9c,GACdT,EACAC,EACAna,EACAC,EACAG,EACAE,EACAhjc,GAEA,gBA0Ucs9c,GACd99C,EACA+9C,EACAX,EACAC,EACAna,EACAC,EACAG,EACAE,GACAhjc,IAEA,MAAMsia,GAAei7C,EAAcX,EACnC,OAAO7Z,GAAgBvjC,EAAO8C,GAAcogC,EAAMC,EAAMG,EAAME,IAC1DV,GACE9iC,EACA8C,GAAe,EACftia,GAAU68c,EAAO58c,KAAKD,GAAS0ic,EAAMC,EAAMG,EAAME,IAAQ6Z,EAAOna,EAAMC,EAAMG,EAAME,KAEpFwa,GAA2Bh+C,EAAO8C,GAAe,EACvD,CA7VSg7C,CACLp8C,KACAgB,KACA06C,EACAC,EACAna,EACAC,EACAG,EACAE,EACAhjc,EAEJ,UAkBgBy9c,GACdb,EACAC,EACAna,EACAC,EACAG,EACAE,EACA0a,EACA19c,IAEA,MAAMsia,GAAeJ,KAAmB06C,EAClCp9C,GAAQ0B,KACR0hC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,MAG5BI,GAAOC,QAAU0vsB,GAAiBhwsB,EAAKQ,KAAKL,EAAO2nT,kCCPnD,IAAImoZ,SAAoB5nZ,OAAW,KAAeA,OAC9C6nZ,EAAgBjwsB,EAAQ,OAG5BI,GAAOC,QAAU,WAIhB,MAH0B,mBAAf2vsB,GACW,mBAAX5nZ,QACsB,iBAAtB4nZ,EAAW,QACO,iBAAlB5nZ,OAAO,QAEX6nZ,GACR,2HCZE/ltB,MAAA,KACEA,MAAA,uEADYA,MAAA,gBAAAwsB,EAAAyzF,aAEVjgH,QAGAA,MAHA,aAAAwsB,EAAAwzF,WAAA99G,IAAAsqB,EAAAyzF,aAGAjgH,CAH0C,gBAAAwsB,EAAAw5rB,aAAA32W,GAAAlzV,GAG1Cnc,CAFoC,oBAAAwsB,EAAAw5rB,aAAA32W,GAAA3vS,MAEpC1/D,CAD2C,cAAAqvW,EAAA,KCI1C,IAAM42W,EAA8B,MAArC,MAAOA,EAUX,aAAIj2W,GACF,OAAO91W,KAAK8lH,WAAW99G,IAAIhI,KAAK+lH,YAClC,CAAChmH,SAAAC,KAAA,mBAAA6F,iBAZUkmtB,EAA8B,EAAAhstB,SAAAC,KAAA,UAAA6K,EAAAhC,IAAA,MAA9BkjtB,EAA8BjjtB,UAAA,mCAAAC,OAAA,CAAA+8G,WAAA,aAAAC,YAAA,cAAA+lmB,aAAA,gBAAA9itB,MAAA,EAAAC,KAAA,EAAAC,OAAA,gKAAAV,SAAA,SAAAW,EAAAC,GAAA,EAAAD,IDT3CrD,MAAA,WACEA,MAAA,EAAAkmtB,EAAA,sBAQFlmtB,eATKA,MAAA,YAAAsD,EAAA08G,YACmEhgH,cAAA,UAAAsD,EAAA0sW,UAAA5mR,4ECQ3D68nB,CAA8B","names":["getNativeElement","target","HTMLElement","nativeElement","defaultScrollOptions","duration","edgeX","edgeY","offsetX","offsetY","ScrollService","static","this","INVALID_INPUT_SELECTOR","constructor","document","windowRef","scrollToImmediate","offset","includeHeaderHeight","smoothScroll","minusOffset","scrollContainer","resolveScrollContainer","scrollTop","resolveScrollPositions","setScroll","dispatchScrollEvent","scrollOptions","useScrollOptions","container","containerToUse","scrollLeft","smoothAnimate","Date","now","listen","element","shouldFindScrollContainer","findScrollContainer","documentElement","fromEvent","findEventContainer","pipe","map","isHtmlEvent","getBoundingClientRect","trimOffsets","rect","parentRect","top","bottom","scrollToFirstInvalidInput","firstInvalidElement","querySelector","console","log","nativeWindow","scrollTo","startTime","startX","startY","xToScroll","yToScroll","time","currentEase","t","ease","Math","min","currentX","currentY","requestAnimationFrame","viewportHeight","getViewPortHeight","targetRect","containerRect","containerOffsetTop","containerScrollLeft","containerScrollTop","getScrollPosition","resolveX","resolveY","elementLeft","left","containerEdge","targetEdge","resolveEdgeX","width","viewPortHeight","resolveEdgeY","height","currentScrollTop","parentNode","Document","body","newScrollTopValue","newScrollLeftValue","defaultView","evt","createEvent","initEvent","dispatchEvent","visualViewport","innerHeight","__ngFactoryType__","i0","DOCUMENT","i1","_angular_core__WEBPACK_IMPORTED_MODULE_4__","jDH","factory","ɵfac","ctx_r0","content$","CmsContentSwitcherDropdownComponent_section_0_h3_2_Template","contentForm$","contentOptions$","selectedContent$","CmsContentSwitcherDropdownComponent","fb","ngOnInit","c","items","ct","name","teaserTitle","value","initialValue$","filter","length","safeMap","i","content","group","finShare","withLatestFrom","switchMap","contentForm","startValue","get","valueChanges","startWith","selectedContent","contentData","find","item","Boolean","template","header","main","footer","_angular_core__WEBPACK_IMPORTED_MODULE_2__","VBU","selectors","inputs","decls","vars","consts","rf","ctx","CmsContentSwitcherDropdownComponent_section_0_Template","FormGroupComponent_legend_1_span_2_Template","inline","legend","required","_c1","translationPrefix","name_r2","firstErrorKey","join","FormGroupComponent_div_3_span_1_Template","showOnlyGroupLevelErrors","tmp_2_0","invalid","touched","_c2","groupTranslationPrefix","FormGroupComponent","undefined","errors","isPresent","Object","keys","k","_angular_core__WEBPACK_IMPORTED_MODULE_1__","names","ngContentSelectors","_c0","FormGroupComponent_legend_1_Template","FormGroupComponent_div_3_Template","FormGroupComponent_div_4_Template","CmsIconWithTextComponent","title$","isNotBlank","icons$","localSettings","iconName","icon","Array","isArray","icons","x","_angular_core__WEBPACK_IMPORTED_MODULE_3__","observeOn","scheduler","delay","operate","source","subscriber","subscribe","createOperatorSubscriber","executeSchedule","next","complete","err","error","ScrollHandleContainerComponent","scrollService","SvgLibraryIcon","disableKeyboardNavigation","scrollElements","EventEmitter","subscription","Subscription","ngAfterViewInit","updateScrollHandles","scrollListener$","add","debounceTime","ngOnDestroy","unsubscribe","scrollToElement","showLeftScrollButton","showRightScrollButton","getScrollHandlesVisibility","scrollHandleLeft","hidden","scrollHandleRight","scrollRight","emit","Direction","RIGHT","scrollToElementByIndex","getVisibleElementIndex","LEFT","scrollPosition","offsetWidth","scrollWidth","containerCenter","sorted","elements","toArray","cardElement","index","cardRect","distanceToCenter","abs","sort","a","b","targetElement","_angular_core__WEBPACK_IMPORTED_MODULE_5__","viewQuery","ElementRef","_r1","CHEVRON_LEFT","CHEVRON_RIGHT","initialState","seal","language","locations","search","input","locationsReducer","state","action","type","LanguageActions","setIn","LocationActions","location","locationCode","deleteIn","searchData","DataUtils","wrap","getLocationData","COOKIE_KEY","FinLanguageService","LanguageService","store$","cookieService","localizationProvider","configService","sentryLogger","platform","super","translateOptionsDefaults","logErrors","subscriptions","verifyLangAllowed","lang","throwExpection","isLangSupported","allowableLangs","includes","isDdsLang","ddsLangToNewLang","path","Error","cfg","allowedLocales","lang$","languageFromStore","localizations$","currentLocalization","locale$","localeFromStore","updateLocaleBasedOnLanguage","setInitialLanguageFromCookieOrPath","setLang","languageValue","dispatch","locale","expires","setTime","getTime","TTL","setItem","countryCode","l","split","cookieValue","getItem","FALLBACK_LANGUAGE","langKey","val","slice","localeValue","snapshot","langValue","langKeyValue","ddsLocaleValue","ddsLanguage","localizations","translate","key","args","options","keyAsArray","rootKey","i18nKeyToDataMap","taxCodes","lazyLoadingPrefix","triggerLazyLocalizations","I18nKey","TAX_CODES","countryRegions","COUNTRY_REGIONS","serviceForms","SERVICE_FORMS","corporate","CORPORATE","travelReady","TRAVEL_READY","skipWhile","values","I18nLazyLoadingPrefix","loaded","localeString","str","getIn","shouldISendCmsKeyMissingError","catchError","message","JSON","stringify","of","replaceMsgFormat","translateMultiple","translations","zip","isPlatformBrowser","getInitialLanguageValue","currentLang","languageValue$","combineLatest","getLocalizations","asapScheduler","schedule","localization","i2","i3","i4","i5","i6","PLATFORM_ID","core","mergeInternals","project","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","active","isComplete","checkComplete","outerNext","doInnerSub","push","innerComplete","innerFrom","innerValue","bufferedValue","shift","LoaderModule","$C","G2t","CommonModule","UiTranslateModule","LoaderComponent","FormErrorFocusDirective","el","onFormSubmit","event","formGroup","status","preventDefault","invalidElements","querySelectorAll","focus","_angular_core__WEBPACK_IMPORTED_MODULE_0__","FsC","hostBindings","$event","ShowForProfileTiersDirective","templateRef","viewContainer","hasView","finShowForProfileTiers","tiers","profile","memberProfile","tier","createEmbeddedView","clear","ModalButtons","DONE","OK","CONTINUE_CANCEL","CLOSE","CUSTOM","bind","require","$TypeError","$call","$actualApply","module","exports","thisArg","call","BehaviorSubject","Subject","_value","getValue","_subscribe","closed","hasError","thrownError","_throwIfClosed","defaultQueryParams","cta","info","title","subtitle","ctaAction","defaultQueryParamsInMmb","showButton","noGrid","navigateToError","router","queryParams","inMmb","isInMmb","url","navigate","RootPaths","MANAGE_BOOKING_ROOT","BOOKING_ROOT","skipLocationChange","readableStreamLikeToAsyncGenerator","readableStream","reader","getReader","done","__await","read","releaseLock","isReadableStreamLike","obj","isFunction","setSelectedBoundId","createAction","props","all","union","latinizeRegexLight","latinizeMapLight","ä","ö","ü","á","é","Ä","Ö","Ü","Á","É","DestinationSearchService","createStateKey","makeStateKey","http","languageService","stateTransferService","latinizeRegex","latinizeMap","latinize","re","translateRegex","translateObj","s","replace","match","destinationSearchResult$","fetchDestinationSearch","destinationSearch","restriction","restrictedDestinationSearchItems","destinations","recursiveSort","destinationSearchItems","getRestrictedDestinationsTree","searchResult","wrapToStateCache","destinationSearchQuery","result","mapResponseItemsToItems","o","picture","responsiveImageData","countryMaster","country","continentMaster","continent","id","titleMaster","toLowerCase","tags","Set","normalizedTitle","normalizedTitleMaster","directFlight","apiUrl","destinationsSearchUrl","httpOptions","headers","HttpHeaders","destinationsSearchApiKey","data","response","warn","throwError","allDestinations","restrictions","restrictIDs","findDestinationsForQueryParams","restrictedDestinationsTree","reduceRestrictedDestinations","isNotEmpty","reduce","acc","newItem","isMatch","sortByAlphabetical","d","DestinationSearchItemType","DESTINATION","navigatorState","state$","navigator","serverTime","timeData","timeOffset","serverMillisFromEpoch","distinctUntilChanged","t1","t2","browserGeolocation","isBrowserGeolocationLoading","browserGeolocationLoading","akamaiGeolocation","pseudoLocal","FIRST_OF_JUNE","TierBenefitService","config","benefitKeys","BenefitItemKeyEnum","CarryonBagTier","ExtraBags","SportEquipment","AdvanceSeatReservation","Wifi","Lounge","ContactInfo","FastTrack","SnackDrink","GiveAwayCard","MemberOffers","EasyBookings","TierAward","SpecialBags","getBenefitJson","tierLevels","tierBenefitUrl","withCredentials","enableCorsCredentials","retryWithBackoff","EMPTY","filterBenefits","tierBenefits","currentDate","TzDate","benefit","benefitItemKey","isBefore","effectiveTo","effectiveFrom","_angular_core__WEBPACK_IMPORTED_MODULE_7__","interval","period","asyncScheduler","timer","CmsFooterComponent","LinkModule","DirectiveModule","IconsModule","distinctUntilKeyChanged","compare","y","content_r2","teaserText","ctx_r2","RadioLevels","SUB_LEVEL","radioSubItem_r4","RadioListComponent_ng_container_0_fin_form_input_radio_8_div_3_fin_form_input_radio_1_Template","radioItem_r5","RadioListComponent_ng_container_0_fin_form_input_radio_8_div_3_Template","TOP_LEVEL","contentType","topLevel","RadioListComponent_ng_container_0_div_4_Template","navigateBasedOnTheChoice","RadioListComponent_ng_container_0_fin_form_input_radio_8_Template","form","ButtonMode","FILL","ButtonType","SUBMIT","valid","LANDER_FORM","RadioListComponent","loginService","LoginStatus","ButtonTheme","UntypedFormGroup","topLevelChanged","reset","isLoggedIn","loginStatus","LOGGED_IN","finalChoice","landerForm","CmsContentType","CMCollection","subLevel","finalUrl","formType","requireCAS","navigateByUrl","redirectToSimplifiedLogin","formTestId$","formId","toKebabCase","loginStatus$","oldGroup","validators","mismatch","setControl","redirectUrl","redirectPath","_angular_core__WEBPACK_IMPORTED_MODULE_8__","RadioListComponent_ng_container_0_Template","hasUnitPrices","prices","isRefund","hasUnitPricesFlightsAndServices","hasUnitPricesServices","flight","priceTotalPresent","total","services","calculateLowesPrice","price1","price2","destination","onNext","onComplete","onError","onFinalize","OperatorSubscriber","Subscriber","shouldUnsubscribe","_next","_error","_complete","_a","identity","negate","risingEdge","previousValue","newValue","TARGET_HEIGHT_ELEMENT","PARENT","CHILDREN","ExpandContentComponent","ANIMATION_DURATION","HIDING_CLASS","TRANSITION_CLASS","renderer","window","ngZone","initialValue","targetHeightElement","removeHidingClass","removeClass","addHidingClass","addClass","setContainerCalculatedHeight","setStyle","children","offsetHeight","setContainerZeroHeight","setContainerAutoHeight","opening$","open$","scan","closing$","isPlatformServer","w","clearTimeout","timeoutReference","runOutsideAngular","frameReference","setTimeout","cancelAnimationFrame","expandContainerClass","expandContentClass","_r2","expandSearch","inputExpanded","context","SEARCH","IconPosition","DARK_TERTIARY_GHOST","_r4","_c3","_c4","IconButtonSize","SMALL","IconButtonTheme","LIGHT_TERTIARY_GHOST","SiteSearchHeaderWidgetStarterComponent","formBuilder","ButtonSize","expandable","enableNewLanguageSelector","searchButtonIconOnly","searchGtmEvent","query","siteSearchPath","SITE_SEARCH_ROOT","searchForm","searchKey","headerQueryField","collapseSearch","onSubmit","q","triggerSearch","onBlur","SiteSearchHeaderWidgetStarterComponent_fcom_button_1_Template","SiteSearchHeaderWidgetStarterComponent_fcom_button_6_Template","SiteSearchHeaderWidgetStarterComponent_fcom_icon_button_7_Template","VOLUNTARY_CHANGE_FEATURE_KEY","ORDER_ID_QUERY_PARAM","HASH_QUERY_PARAM","CountryNamePipe","transform","countries","toUpperCase","EJ8","pure","ɵ$index_9_r4","_r3","$index","ctx_r1","selectMonth","visibleMonthIndex","dataModel","displayMonths","TagTheme","ACTIVE","DEFAULT","tagItem_r5","CalendarComponent_Conditional_0_Conditional_2_For_2_Template","monthTags","onNavigateEvent","CalendarNavigationEvent","PREV","CalendarComponent_Conditional_0_Conditional_2_Template","NEXT","showTags","prevDisabled","ARROW_LEFT","LIGHT_PRIMARY_NORDIC_BLUE","MEDIUM","uiLabels","showPreviousMonth","nextDisabled","ARROW_RIGHT","showNextMonth","month_r6","monthArrayIndex","isDateRange","showEmptyWeeks","dateTemplate_r7","dayTemplate","_c5","day_r9","showEnhancedCalendar","CalendarComponent_ng_template_6_Conditional_0_Conditional_2_div_0_Template","_r8","day","hoveredDate","date","selectDay","CalendarComponent_ng_template_6_Conditional_0_Conditional_1_Template","CalendarComponent_ng_template_6_Conditional_0_Conditional_2_Template","disabled","isInside","isHovered","selected","selectedDates","startDate","equals","endDate","gt","CalendarComponent_ng_template_6_Conditional_0_Template","CalendarComponent_ng_template_6_Conditional_1_Template","CALENDAR_HEADER_HEIGHT","CalendarComponent","calendarService","mediaQueryService","cd","CalendarNavigationType","navigationType","MIXED","scrollOnInit","scrollToMonthIndex$","monthChange","datesSelected","breakpoints","mobileVisibleIndex","dataModel$","model","newVisibleMonthIndex","months","month","toMonthId","isVerticalScroll","focusDate","firstDate","shouldUpdateMonth","shouldUpdateDatesSelected","areSelectedDatesChanged","shouldScrollVerticalMonth","lastDate","gte","detectChanges","updateSelectedMonth","adjustFocus","isBreakpoint$","isMobile","changeCalendarView","minDate","plusMonths","firstDayOfMonth","scrollToIndex","ngOnChanges","changes","set","getUpdatedCalendarData","calendarMonths","innerWidth","parseInt","laptop","containerHeight","clientHeight","scrollHeight","determineVisibleMonthWhenScroll","pairwise","first","second","throttleTime","handleVerticalScrollMonths","eventType","currentTarget","navigateToMonth","minusMonths","monthIndex","selectDate","isRange","lt","closestIndex","closestDistance","Number","MAX_VALUE","monthTop","offsetTop","monthBottom","distanceToViewport","monthToChange","amount","maxDate","maxMonths","quantityOfMonths","loadAmount","loadMonths","shouldScroll","shouldTriggerEmission","monthWillChange","scrollToMonth","scrollToMonthChip","scrollIntoView","behavior","block","option","isDeepEqual","currentValue","selectedLabel","enableMonthScrollingAfterSelection","_angular_core__WEBPACK_IMPORTED_MODULE_11__","CalendarService","CalendarComponent_Conditional_0_Template","CalendarComponent_For_5_Template","_forTrack0","CalendarComponent_ng_template_6_Template","ARROWS","Reflect","apply","dim","flightOrBound","FlightCardComponent","IconLibrary","hideModify","hideViewDetails","roundedBottom","modifyClicked","viewDetails","passengers","paxIcon","getPaxNumberIcon","expanderOpen","cardExpanderOpen","toggleOpenCard","isOpen","SINGLE_PAX","some","passengerTypeCode","FinnairPassengerCode","INF","ADULT_INFANT","MULTI_PAX","outputs","features","FlightCardComponent_ng_template_11_Template","SVG_LIBRARY","AIRCRAFT_HORIZONTAL_BLOCK","descriptionContent_r3","departure","dateTime","TemporaryDurationPipe","assign","hours","minutes","delayWhen","delayDurationSelector","subscriptionDelay","concat","take","ignoreElements","mergeMap","mapTo","due","floor","buttonTexts","Category","CABIN_BAGGAGE","BAGGAGE","SEAT","LOUNGE","MEAL","WIFI","COVER","SPORT","PET","serviceSelectionToUpdateRequest","selections","request","travelerId","service","includedInTicketType","includedInTierBenefit","forEach","category","variant","quantity","isFlightOrBoundHavingServices","cartData","availability","boundOrFlight","controlData","sellAncillariesPerFlight","flightNumber","isTruthy","getGA4ProductsDiff","before","after","purchaseFlow","orderAfterUpdate","fragmentId","unique","mapGA4Products","cur","changedServices","orderBeforeUpdate","servicesBefore","getAllSellableServices","servicesAfter","addedServices","updatedServicesList","removedServices","addedProducts","removedProducts","cartOrOrder","beforeServices","afterServices","bounds","getBoundsPerFragment","uniqueBy","passengerId","flightIds","beforeService","afterServiceFiltered","filterSameVariantTravelerBoundServices","beforeServiceFiltered","itemsToTrack","getGA4Product","newServices","afterService","compareToService","currentCartData","mapSeats","seatNumber","getGtmServiceProductForSeat","removedOrAddedSeats","mapRegularServices","getGtmServiceProduct","servicesForCategory","unpaid","included","reduceServices","allServices","bound","segments","servicesForSegments","segment","cabins","flatMap","itinerary","isFlight","cabinClass","servicesForPassengers","passenger","subCategory","SubCategory","CHECKED_BAGGAGE","totalPrice","getPriceForSubCategory","combineInnerServices","previousServices","currentService","previousService","SAF","CustomServiceType","JOURNEY","serviceItemForCategory","services$","serviceItems","getPriceForCategoryStream","fallbackCurrencyCode$","fallbackCurrencyCode","currencyCode","TAGS","campaign","localizationKey","DISCOUNT","theme","POPULAR","tierBenefit","FINNAIR_PLUS","cheaperOnline","STAR","getTag","tag","CHEAPER_ONLINE_CATEGORIES","getProductTag","campaignsCategories","currentServices","showCheaperOnlineTag","enableTierBenefitTag","passengerServiceItem","parameters","isCorporate","isCorporateSeatBenefit","servicesContainTierBenefits","getCountForCategoryStream","getCategoryCount","travellerId","boundId","segmentId","currentBound","isBoundBasedCategory","countTotal","getCategoryCountForBound","count","currentSegment","getCategoryCountForSegment","countPerBound","currentPassenger","countPerSegment","getCategoryCountForPassenger","isNotIncludedService","countPassengers","getMaxNumberItemsForCategory","categories","booking","numberOfPassengersWithOwnSeat","numberOfFlights","maxNumberItemsForCategory","flat","operatingAirline","code","Airline","FINNAIR","marketingAirline","serviceCatalogCategory","servicesPerTraveler","serviceCatalogServices","maxNumberItems","numberOfItemsForCategoryX","numberOfItemsForCategoryY","categoryHasQuotaLeft","quotas","currentCategory","isService","quota","max","getMaxedOutProductsPerFragment","numberOfPassengers","flights","serviceCategory","totalMaxNumberOfItems","maxNumberAcc","numberOfItemsForCategory","Dt","numberOfPaidServicesForBound","numberOfPaidServicesForSegment","isFalsy","supportedCategoriesForProductCards","filterCategories","indexOf","getMaxedOutSeatsPerFlight","seatsMaxedOutForFragments","segmentsMaxed","unModifiableServices","categoryService","modifiable","ticketed","supportedMaxedOutSubCategories","HEAVY_OR_LARGE","HOT_PRE_ORDER_MEAL","FRESH_MEAL","PET_IN_CABIN","BIKE","SKIS","GOLF","calculateServices","parseFloat","categoryHasMaxPurchasesDoneForFragments","allFragmentsForService","serviceBound","isAllowedToSell","orderOrCart","supportedEligibilityCategories","eligibilities","serviceCatalog","categoryEligibility","e","reason","eligibility","originalEligibility","isAllowedToUse","categoryHasNothingToSell","availability$","order","boundsOrFlights","getBoundsOrFlights","isJourneyBasedCategory","every","servicesForFlightAndTravelerId","flightId","isAllowedToChangeSeat","combineIncludedAndUnpaidSeats","includedSeats","unpaidSeats","combinedArray","deepCopy","includedItem","unpaidItem","_index","unpaidBound","serviceItem","unpaidSegment","serviceItemBounds","findServiceItemsForPassengerForFragment","cloneDeep","totalTravelerServices","travelerService","existingService","calculatePaxCountFromServiceCatalog","servFragmentEntry","paxIdOrGroup","GROUP","size","removeServicesWithMaxedOutQuotas","catalog","paxCount","quotaAllowedCategories","filteredCategories","newCategoryServices","getCleanedCategoryServices","entries","categoryServices","fragmentKey","servicesForFragment","newServicesByFragments","serviceFragment","travelerKey","servicesForTraveler","travelerServicesNotSoldOut","isSpecialMeal","PETC_CONFIRM_MODAL_TRANSLATION_KEYS","firstContentParagraph","secondContentParagraph","closeButton","continueButton","getBoundsAndTravelersWhichHavePetcIncompatibleSeats","serviceType","seatServiceBound","serviceWithPassengerId","incompatibleServiceVariants","isSeatPurchaseClosedAfterCheckIn","seatEligibilityCatalog","paxEligibility","FinnairServiceCatalogEligibilityReason","PURCHASE_SEAT_NOT_ELIGIBLE_AFTER_CHECK_IN_IS_CLOSED","isSeatPurchaseClosedAfterCheckInForFlight","isPetcNotEligibleWithIncompatibleSeat","petEligibilitiesPerPassenger","eligibilityItem","PURCHASE_PETC_NOT_ELIGIBLE_WITH_CONFIRMED_INCOMPATIBLE_SEAT","getFilteredTravelers$","travelers","passengerItems","infants","traveler","infant","accompanyingTravelerId","withInfant","withInfantFullName","firstName","lastName","getQuantitiesForFragmentsAndPassenger","selectedServices","includedServices","fragmentIds","f","passengerIds","p","servicesForFragments","servicesForPassenger","ancillarySaleBlockingSupportedReasonKeys","PURCHASE_PET_IN_CABIN_NOT_AVAILABLE_IN_BUSINESS_CLASS","resolveNotAvailableKey","isBus","nonAyOperatingAirline","capitalCategory","capitalizeWord","resolveCategory","saveTimeReasons","PURCHASE_PREORDER_HOT_MEAL_ELIGIBLE_PRIOR_TO_36_HOURS_EX_EXCEPT_HELSINKI","PURCHASE_PREORDER_HOT_MEAL_ELIGIBLE_PRIOR_TO_16_HOURS_EX_HELSINKI","PURCHASE_FRESH_MEAL_ELIGIBLE_PRIOR_TO_24_HOURS_EX_EXCEPT_HELSINKI","PURCHASE_FRESH_MEAL_ELIGIBLE_PRIOR_TO_7_HOURS_EX_HELSINKI","PURCHASE_SPECIAL_DIET_ELIGIBLE_PRIOR_TO_24_HOURS","getWarningReason","PURCHASE_FRESH_MEAL_NOT_ELIGIBLE_EX_EXCEPT_HEL_WITHIN_24_HOURS","PURCHASE_FRESH_MEAL_NOT_ELIGIBLE_EX_HEL_WITHIN_7_HOURS","PURCHASE_PRE_ORDER_HOT_MEAL_NOT_ELIGIBLE_EX_HEL_WITHIN_16_HOURS","PURCHASE_PRE_ORDER_HOT_MEAL_NOT_ELIGIBLE_EX_EXCEPT_HEL_36_HOURS","PURCHASE_SPECIAL_MEAL_NOT_ELIGIBLE","PURCHASE_NOT_ELIGIBLE_WHEN_ALREADY_FLOWN","PURCHASE_MEAL_NOT_ELIGIBLE_WHEN_ALREADY_FLOWN","PURCHASE_WIFI_NOT_ELIGIBLE_WHEN_ALREADY_FLOWN","PURCHASE_BAGGAGE_NOT_ELIGIBLE_WHEN_ALREADY_FLOWN","PURCHASE_SEAT_NOT_ELIGIBLE_WHEN_ALREADY_FLOWN","PURCHASE_LOUNGE_ACCESS_NOT_ELIGIBLE_WHEN_ALREADY_FLOWN","NOT_ELIGIBLE","PURCHASE_NOT_ELIGIBLE_FOR_OTHER_AIRLINE","isByBusOnly","getReason","becauseAirlines","isBound","isFinnairNorraOrWetLease","becauseAirlineReason","airline","airlines","getServicesNotifications","useFallback","eligibilityNotifications","getNotification","INFO","NotificationTheme","WARNING","blockSelection","SAVE_TIME","TRANSPARENT","PURCHASE_SEAT_SELECTION_NOT_ELIGIBLE_WHEN_DISCOUNTS_EXIST_FOR_CORPORATE","B2B_BLOCK","n","getInitials","charAt","getLowestPriceForCategory","lowestPriceForCategory","lowestPrice","fragment","isEmptyObject","getLowestPrice","money","fallbackGetLowestPriceForCategory","serviceMapping","CARRY_ON_BAG","bookingSummaryKey","CHECKED_IN_BAGGAGE","FOOD","SEAT_OR_ECONOMY","INSURANCE","keyLength","hasOwnProperty","o1","o2","looseIdentical","isNaN","arraysEqual","objectsEqual","NEVER","Observable","noop","never","punycode","Url","protocol","slashes","auth","host","port","hostname","hash","pathname","href","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","hostlessProtocol","slashedProtocol","https","ftp","gopher","file","querystring","urlParse","parseQueryString","slashesDenoteHost","u","parse","prototype","TypeError","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","substr","proto","lowerProto","hostEnd","hec","atSign","lastIndexOf","decodeURIComponent","parseHost","ipv6Hostname","hostparts","part","newpart","j","charCodeAt","validParts","notHost","bit","unshift","toASCII","ae","esc","encodeURIComponent","escape","qm","format","arrayFormat","addQueryPrefix","resolve","relative","resolveObject","rel","tkeys","tk","tkey","rkeys","rk","rkey","v","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","authInHost","last","hasTrailingSlash","up","splice","isAbsolute","CheapestPricePipe","cheapestPriceForAllDestinationsService","destinationCode","originCode","destination$","origin$","economyReturn$","getCheapestForLocation$","economyOneway$","economyReturn","economyOneway","TripType","ONEWAY","RETURN","isOneWay","origin","offerForSingleTrip","offer","travelClass","GlobalBookingTravelClass","ECONOMY","price","fesm2022_core","DecodeURIPipe","clearSpecial","isBlank","LoyaltyRoutesPath","PLUS","PROFILE","BALANCE_AND_TRANSACTIONS","MY_TRIPS","TIER_PROGRESS_AND_BENEFITS","BUY_POINTS","UPGRADE_AVAILABILITY","CAMPAIGN_ENROLL","ERROR","SIEBEL_SUPPORTED_COUNTRY_CODES","outbound$","locations$","OUTBOUND","isBookingFlow","NotificationLayout","BLOCK","inbound$","INBOUND","ItineraryComponent","AppConstants","BoundType","outbound","inbound","SelectionPhase","hasAirportChangeBetweenBounds$","arrival","selectionPhase$","ItineraryComponent_fin_itinerary_timeline_1_Template","ItineraryComponent_fcom_notification_3_Template","ItineraryComponent_fin_itinerary_timeline_5_Template","ExpandModule","animations","ANIMATION_MODULE_TYPE","INITIAL","PENDING","NOT_LOGGED_IN","ProfileType","FPLUS","FINNAIR_ACCOUNT","LoginStep","CREDENTIALS","CORPORATE_CREDENTIALS","CORPORATE_CREDENTIALS_DIRECT","TWO_FACTOR_CODE","TWO_FACTOR_PHONE","TWO_FACTOR_EMAIL","TWO_FACTOR_SMS","LOCKED","FORGOT_PASSWORD","POST_LOST_PASSWORD_SENT","LoginPhaseError","LOGIN_FAILED","RESEND_2FA_EMAIL","POST_LOST_PASSWORD","CorporateUserRole","ADMIN","TRAVELLER","TRAVEL_BOOKER","LoginMemberStatus","TEST_MEMBER","INACTIVE","DORMANT","DELETED","DECEASED","UNKNOWN","LoginAddressType","HOME","JOB","NONE","PostLostPasswordBy","EMAIL","SMS","ProfileRequestType","BASIC","FULL","ProfileRequestCache","USE","REFRESH","SiebelBoolean","TRUE","FALSE","ProfileTier","ACCOUNT","JUNIOR","SILVER","GOLD","PLATINUM","LUMO","LoginGender","MALE","FEMALE","PersonalizationParameterProfileFlagName","AKTIA_CREDIT_CARD","AKTIA_LIGHT_CREDIT_CARD","CasCustomerType","FPLUS_MEMBER","CORPORATE_USER","ApisStatusEnum","COMPLETE","AGENT_REVAL_REQUIRED","NOT_REQUIRED","NOT_PERFORMED","NOT_COMPLETE","Cabin","ECOPREMIUM","BUSINESS","FIRST","CallerType","FINNAIRCOM","MOBILEAPP","FINNAIR_HOLIDAY","UNDEFINED","CheckInBoardingPassByEmailResponseStatus","SUCCESS","FAILURE","FareRuleCategory","MINIMUM_STAY","MAXIMUM_STAY","CHANGE","REFUND","SALES_RESTRICTIONS","FLIGHT_APPLICATION","CHILD_DISCOUNTS","TOUR_CONDUCTOR","AGENTS_DISCOUNTS","OTHER_DISCOUNTS","STOPOVERS","TRANSFERS","ENDORSEMENT","COMBINABILITY","HIGHER_INTERMEDIATE_POINTS","MISCELLANEOUS","SEASONALITY","BLACKOUTS","DAY_TIME","TRAVEL_RESTRICTIONS","PENALTIES","SURCHARGES","ELIGIBILITY","VOLUNTARY_REFUNDS","RESERVATIONS_AND_TICKETING","ACCOMPANIED_TRAVEL","GROUPS","TOURS","FARE_BY_RULE","VISIT_ANOTHER_COUNTRY","NEGOTIATED_FARES","RULE_APPLICATION","FinnairAcknowledgeIneligibilityReason","AMADEUS_REASON","FinnairAlternativeOfferConfirmationStatusEnum","STARTED","REBOOKED","DOCUMENTS_ISSUED","CHECKED_IN","COMPLETED","FinnairApisRequirementKeyEnum","COUNTRY_OF_RESIDENCE","CITY_OF_RESIDENCE","PURPOSE_OF_VISIT","PASSPORT","VISA","PERMANENT_RESIDENT_CARD","DESTINATION_ADDRESS","HOME_ADDRESS","EMERGENCY_CONTACT","FinnairBoardingPassDocumentType","PDF","APPLE_WALLET","RAW_DATA","FinnairBoundNote","HAS_NEXT_DAY_TRANSFER","REQUIRES_AIRPORT_CHANGE","DISRUPTION_CHANGE","DISRUPTION_TIME_CHANGE","FinnairCabinClass","FinnairCancelFlowType","RULE_24_HOUR","MANUAL_REFUNDABLE","AUTOMATIC_INVOLUNTARY","MANUAL_INVOLUNTARY","AUTOMATIC_RULE_24_HOUR","MANUAL_RULE_24_HOUR","RULE_CACR","AUTOMATIC_RULE_TICKET_FLEX","AUTOMATIC_RULE_TICKET_SLIGHTCLASSIC","AUTOMATIC_RULE_TICKET_OTHER","MANUAL_RULE_TICKET_FLEX","MANUAL_RULE_TICKET_SLIGHTCLASSIC","MANUAL_RULE_TICKET_AWARD","MANUAL_RULE_TICKET_OTHER","FinnairCancelIneligibilityReason","NOT_ELIGIBLE_EMAIL_MISSING","TRAVEL_AGENT_TICKETS","ALL_FLIGHTS_ALREADY_FLOWN","ID_TICKET","NOT_TICKETED","CHECKED_IN_AND_BOARDED_OR_BAGGAGE_DROPPED","HAS_DISRUPTION","HAS_SHORT_DISRUPTION","FinnairChangeIneligibilityReason","AMADEUS_GROUPS_NOT_SUPPORTED","AMADEUS_TICKET_PROBLEM","AMADEUS_UNISSUED_SERVICE_PRESENT","AMADEUS_COMPLEX_ITINERARY_NOT_ALLOWED","AMADEUS_FLIGHT_GENERAL_STATUS","AMADEUS_DISCREPANCY_IN_ORDER","AMADEUS_OFFER_CONDITION_RULE","AMADEUS_FLIGHT_DISRUPTED","FLIGHT_DISRUPTED_BY_TIME_CHANGE","FLIGHT_DISRUPTED_BY_CANCEL","TOUROPERATOR_TICKETS","AWARD_BOOKING","BOUND_ALREADY_CHECKED_IN","BOUND_ALREADY_FLOWN_OR_USED","ID_TICKETS","NO_AY_FLIGHTS","NOT_ELIGIBLE_SSR","PETC_FROM_TO_AGP","INDIAN_BOOKING","FinnairCheckInEligibilityReason","NOT_ELIGIBLE_TICKET_RECONCILIATION_NEEDED","NOT_ELIGIBLE_DISRUPTED_MANAGEABLE_ONLINE","NOT_ELIGIBLE_DISRUPTED_NOT_MANAGEABLE_ONLINE","NOT_ELIGIBLE_FIRST_FLIGHT_ON_OTHER_DEPARTURE_CONTROL_SYSTEM","NOT_ELIGIBLE_HIGH_PRIORITY_COMMENT","NOT_ELIGIBLE_ARRIVAL_AIRPORT_INHIBITED","NOT_ELIGIBLE_DEPARTURE_AIRPORT_INHIBITED","NOT_ELIGIBLE_CHILD_AGE_TO_BE_CHECKED","NOT_ELIGIBLE_INFANT_AGE_TO_BE_CHECKED","NOT_ELIGIBLE_CUSTOMER_ELIGIBILITY_RULE","NOT_ELIGIBLE_FIRST_FLIGHT_IS_INHIBITED","NOT_ELIGIBLE_FIRST_FLIGHT_OTHER_AIRLINE","NOT_ELIGIBLE_FLIGHT_ELIGIBILITY_DEFAULT_RULE","NOT_ELIGIBLE_FLIGHT_ELIGIBILITY_RULE","NOT_ELIGIBLE_ITINERARY_SEQUENCE_CHECK","NOT_ELIGIBLE_PASSIVE_SEGMENT","NOT_ELIGIBLE_TICKET_PROBLEM","NOT_ELIGIBLE_CHECK_IN_NOT_OPEN","FinnairCheckInVersion","LEGACY","NEXTGEN","FinnairCompletionStatus","INCOMPLETE","FinnairConfirmationStatus","PROCESSING","FinnairDisruptionRebookingIneligibilityReason","AURINKOMATKAT_TICKETS","COMMERCIAL_COOPERATION_TICKETS","LEISURE_AND_STAFF","MORE_THAN_TWO_BOUNDS","FinnairDocumentType","ETICKET","SERVICES","FinnairGender","UNSPECIFIED","FinnairItineraryItemFlightStatus","CONFIRMED","WAITLISTED","CANCELED","FLOWN","FinnairItineraryItemType","FLIGHT","LAYOVER","FinnairItineraryNote","HAS_LONG_TRANSFER","FinnairLocationType","AIRPORT","CITY","COUNTRY","ADT","YTH","YCD","C_15","CHD","FinnairPhoneType","MOBILE","LANDLINE","EMERGENCY","NOT_ELIGIBLE_CARRY_ON_INCLUDED","PURCHASE_NOT_ELIGIBLE_WHEN_FLIGHT_NOT_CONFIRMED","CANCELLATION_COVER_NOT_ELIGIBLE","PURCHASE_SEAT_NOT_ELIGIBLE_WHEN_PNR_HAS_PETC","NOT_ELIGIBLE_PRIORITY_SERVICES_ORIGIN","NOT_ELIGIBLE_PRIORITY_SERVICES_CONNECTING_FLIGHT","FinnairTravelDocumentType","PASSPORTCARD","IDENTITYCARD","CREWMEMBERCERTIFICATE","BORDERCROSSINGCARD","MILITARYIDENTITYCARD","REENTRYPERMIT","NATURALISATIONCARDUS","APPROVEDIDENTITYDOCUMENT","RESIDENTALIENCARD","PERMANENTRESIDENTCARD","REDRESSNUMBER","KNOWNTRAVELLERNUMBER","NEXUSCARD","MessageType","PurposeOfVisitEnum","IMMIGRATION","STUDIES","TOURIST","WORK","RequestInitiator","MMB","CHECK_IN","DEEPLINK_MMB","DEEPLINK_CHECK_IN","ServiceFlow","CHANGE_FLOW","REVIEW_AND_PAY","MMB_ANCILLARY","BOOKING","AWARD","CANCEL_FLOW","StatusCode","NO_FLIGHTS_FOUND","INVALID_INPUT","OTHER_ERROR","NO_FLIGHTS_LEFT_FOR_TODAY","ENDPOINT_NOT_SUPPORTED","CART_FALLBACK_ERROR","OFFICE_ID_NOT_ALLOWED","MISSING_SERVICE_CATALOG","TourOperatorCode","KU","ST","AL","TM","MI","OrderApiModule","parentModule","_angular_core__WEBPACK_IMPORTED_MODULE_6__","SelfReaccService","CheckinService","OrderService","OrderChangeService","AdvancePassengerInformationService","EmergencyContactService","formatTime","pad","localHours","localMinutes","TimeFormatPipe","popScheduler","from","DESTINATION_SEARCH_FILTER_STATE_FEATURE_NAME","ctx_r4","aspectRatio$","offer_r2","imageData","MaxImageWidth","fetchImagePriority","badgeIcon","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_div_4_div_6_Template","enableBlackTeaser","badgeLabel_r6","_r7","priceContext_r3","ngIf","tripType_r4","emitClick","link","price_r8","_r9","emitCalendarClick","LIGHT_SECONDARY_OUTLINE","LARGE","_r10","openAmContinueModalClick","amDestination","bookUrl","stopPropagation","innerLinkHover","CmsTripTypeMap","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_ng_template_10_ng_container_0_Conditional_2_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_ng_template_10_ng_container_0_Conditional_4_Template","showRoundTripPrice$","isHighlightPrice$","price_r11","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_ng_template_10_ng_container_0_Template","noPrice_r12","navigateToUrl","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_section_2_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_div_4_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_a_7_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_div_8_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_ng_container_9_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_ng_template_10_Template","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_ng_template_12_Template","badgeLabel$","showPriceCalendarButton","flightHotelEnabled","BlockOfferTileComponent_ng_container_0_ng_container_1_section_1_Template","blockOffer$","BlockOfferTileComponent_ng_container_0_ng_container_1_Template","priceContext$","BlockOfferTileComponent","linkClicked","amContinueModalClick","tripType","calendarClicked","tripType$","iif","showRoundTripPrice","blockOffer","isShortHaul","badgeLabel","CampaignTagToLabelKey","fcomCampaignSpecial","fcomCampaignFlash","showRoundTripPrices","getPriceContext","updateAspectRatio","onResize","amLink","returnPrice","onewayPrice","getCurrentBreakPoint","Breakpoint","_angular_core__WEBPACK_IMPORTED_MODULE_10__","BlockOfferTileComponent_ng_container_0_Template","surveyName","classByPageType","qualtricsUrl$","QualtricsEmbeddedPageFeedbackComponent","activatedRoute","consentService","PageViewType","survey","QualtricsSurveys","PAGE_FEEDBACK","pageType","computed","BLUEWINGS_LANDING_PAGE","EDITORIAL_LANDING_PAGE","EDITORIAL_CATEGORY_PAGE","PREMIUM_ECONOMY_LANDING_PAGE_2021","SECTION_PAGE_WITH_TITLE","showFeedback","survey$","getQualtricsUrl","strippedPath","countrySite","consentGiven$","getCookieConsentStatusById","ConsentTextId","COOKIE_ANALYTICS","checkVisibility","splitPath","pathUrl","hideFeedback","alternateUrlHref","getAttribute","page","QualtricsEmbeddedPageFeedbackComponent_Conditional_0_Template","PricePipe","ref","currencyService","async","AsyncPipe","settings","valueChanged","updatePrice","cached$","cachedAmount","cachedCurrencyCode","formatPrice","$isNaN","number","fns","pipeFromArray","prev","fn","paragraph","LoaderComponent_ng_template_0_h2_1_Template","LoaderComponent_ng_template_0_div_4_Template","color","LoaderComponent_div_3_ng_container_2_Template","loaderContent_r2","LoaderComponent_div_4_ng_container_1_Template","LoaderTheme","loaderType","EMBEDDED","LoaderColor","BLUE","LoaderComponent_ng_template_0_Template","LoaderComponent_div_3_Template","LoaderComponent_div_4_Template","LoaderComponent_div_5_Template","LoaderComponent_div_6_Template","LoaderComponent_div_7_Template","FULL_SCREEN","INLINE","INLINE_TEXT","BUTTON","AmDestinationService","amDestinationList","buildEnv","fetchAmDestinationList","amFlightHotelDestinationUrl","CmsUnstyledFragmentComponent","cmsDataService","showIcon","showTitle","cmsContent$","contentUrl$","getFragmentJson","BookingCartService","NUMBER_OF_RETRIES","cartService","commonBookingAncillaryService","fareRulesSubscription","updateSubscriber","includeServiceCatalog","CartActions","setServiceCatalog","DapiErrorCode","UNABLE_TO_RETRIEVE_OFFER","uxErrorType","triggerCreateCart","selectedOfferId","offersHash","cancelStream$","urlParams","HttpParams","createCart","airOfferId","triggerCreateCartByBounds","selectedAirBoundIds","boundsHash","airBoundIds","triggerTicketRules","cartId","ruleCategory","params","getFareRulesByCart$Response","cartUrlWithoutAPI","timeout","res","createRulesFromResponse","mapErrorForSentry","rules","triggerUpdateServices","requests","cartUrl","baseUrl","splitUrlAndParamsAddLocaleIfNotPresent","ancillarySubscription","stream$","createCancelableUpdateStream","triggerTravelersAndCorporateCodeUpdate","passengersState","usePutMethod","paxSubscription","mapTravelersAndCorporateCode","triggerResetSeatSelections","delete","mapError","loadCart","doOnCartUpdateError","takeUntil","share","triggerLoadCart","cartSubscription","createCancelableLoadCartStream","postData","pax","globalBookingPaxAmount","passengerTypeCodes","paxTypeCodes","startAction","putToUrlAndReloadCart","postToUrlAndReloadCart","request$","post","observe","responseType","doRequestAndReloadCart","put","tap","cartLocation","fromString","ptcMap","adults","c15s","temp","fill","fareRules","ticketRules","rule","Y","i7","i8","_angular_core__WEBPACK_IMPORTED_MODULE_25__","hiddenLabel","tooltipHeading","tooltipContent","FloatingInputComponent_ng_template_7_ng_template_1_Template","emitClickedIcon","tooltipOptions","contentTooltip_r3","instruction","printError","FloatingInputComponent_div_11_span_1_Template","FloatingInputComponent","AbstractInputComponent","doesLabelFloat","floatLabel","shouldLabelFloat","focused","empty","placeholder","hostTabIndex","inputType","inputPattern","cdRef","markForCheck","injector","tabIndex","label","simple","hideError","sensitive","validationMessages","iconClicked","firstError","ngControl","hostVars","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","FloatingInputComponent_span_2_Template","FloatingInputComponent_span_4_Template","blurEvent","focusEvent","FloatingInputComponent_ng_template_7_Template","FloatingInputComponent_span_10_Template","FloatingInputComponent_div_11_Template","cid","readonly","errorState","setViewedNotification","clearViewedNotification","clearAllViewedNotification","updateSelection","setTripType","setTravelClass","setOrigin","setRouteType","increasePaxAmountField","decreasePaxAmountField","setDiscountCode","setAvailableClasses","setSelection","setPaxAmount","paymentVerified","resetSelection","setFlights","updateFlight","addFlight","removeFlight","setFlightDate","notificationReducer","createReducer","viewedNotifications","on","NotificationActions","idInStore","travelClasses","routeType","paxAmount","departureDate","globalBooking","GlobalBookingActions","dates","returnDate","field","increment","updatePaxAmountField","old","decrement","discountCode","selection","updateFlights","_f","availableClasses","mutator","newState","disallowMoreInfantsThanAdults","updateIn","newLeadPaxAmount","MAX_PAX_AMOUNT","MIN_LEAD_PAX_AMOUNT","numAdults","updatedFlightData","indexFlightNeedUpdate","MULTICITY","reducers","notifications","reducer","globalBookingReducer","selectCommonState","createFeatureSelector","COMMON_FEATURE_KEY","selectNotificationState","createSelector","getViewedNotifications","CommonStoreModule","StoreModule","forFeature","shortHaulCountries","isShortHaulCountry","isShortHaulFlight","departureLocation","arrivalLocation","createRoute","step","componentType","onUnload","canActivateGuard","resolveGuard","component","server","ClientOnlyComponent","canActivate","canDeactivate","mapToAmDestinationOffer","dest","toString","getOfferWithAmDestination","amDestinationList$","locationRouteCffService","forkJoin","addAmDestination","getLocaleCityName","localeCityName","destName_fi","isBookingCalendarList","calendarList","finnairSearchParameters","isChangeItinerary","ThirdPartyAncillariesProvider","CAR_TRAWLER_RENTAL","CAR_TRAWLER_TRANSFER","CAR_TRAWLER_SMARTBLOCK","REMOVE_TIMEZONE","carRentalTransferLangMap","carRentalSmartBlockLangMap","carTrawlerCountryLangMap","carTrawlerSupportedCurrencies","getCarTrawlerLang","provider","finnairLocale","supportedCarTrawlerCurrencies","finnairCurrency","getCarTrawlerDateTime","addHours","toISOString","reportUnhandledError","timeoutProvider","onUnhandledError","BUS_AIRCRAFT_CODE","TRAIN_AIRCRAFT_CODE","TransportType","Flight","Bus","Train","Unknown","GENDER_OPTIONS","Title","MS","MRS","MR","FrequentFlyerTierLevel","BookingWidgetCalendarService","commonStore$","offersService","priceCalendarService","getAirCalendar","airCalendarRequest","createOffersRequest","isAward","setNotificationWarning","NotificationWarning","GENERAL","airCalendars","messages","findAirCalendar","offersUrl","airCalendarList","BookingWidgetActions","getPricesForFollowingMonth","NO_FLIGHTS","NO_AWARD_FLIGHTS","checkFlightAvailabilityAndContinue","checkOffersAvailability","checkAirboundsAvailability","notificationWarnings","storeNotificationMap","isActive","hasAvailability","offersRequest","findOfferList","airBoundsRequest","createAirboundsRequest","findAirBounds","createOffersItinerary","departureLocationCode","destinationLocationCode","cabin","getBookingWidgetCabinClass","enableCorporateTravelClassLimit","promoCode","itineraries","directFlights","isRequestedBound","_angular_core__WEBPACK_IMPORTED_MODULE_20__","throwIfEmpty","errorFactory","defaultErrorFactory","hasValue","EmptyError","ImagesModule","LazyLoadImageModule","StripHtmlPipe","replaceWith","jsConfig","overrides","environment","isServer","quota_r2","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_ng_container_1_span_1_Template","ctx_r3","SEATS_LEFT_LIMIT","selectedFareFamilyPerCabin$","cabin_r3","isShowTotalPrice","prices_r5","originalTotalPrice","originalPrice","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_ng_template_10_ng_container_0_span_4_Template","discountReasonCode","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_ng_template_10_ng_container_0_Template","minPricePerCabin$","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_ng_container_1_Template","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_span_4_Template","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_ng_template_10_Template","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_ng_container_12_Template","cabinIsExpanded$","minPricePerCabin_r6","FlightSelectionFareFamilyListComponent_ng_template_0_ng_container_0_Template","FlightSelectionFareFamilyListComponent_ng_template_2_ng_container_5_fcom_icon_1_Template","cabinPrice_r9","isSpecialOffer","cabin_r10","FlightSelectionFareFamilyListComponent_ng_template_2_ng_container_5_Template","FlightSelectionFareFamilyListComponent_ng_template_2_ng_container_8_Template","selectedFareFamily_r11","benefits","brandName","CHECKMARK_BLOCK","selectedFareFamily_r14","cabin_r13","cabinName_r15","_c6","fareFamily_r18","_r17","$implicit","selectFareFamily","fareFamily","checked","last_r19","_c8","index_r20","count_r21","upsellFareFamily_r23","_r22","openCabinAndSelect","openCabinClassModal","isShortHaul$","isLongHaulLegAndAy$","_r16","afterCarouselViewInit","FlightSelectionFareFamilyListComponent_li_7_Conditional_39_fin_fare_family_list_option_7_Template","FlightSelectionFareFamilyListComponent_li_7_Conditional_39_fin_upsell_option_10_Template","isTicketTypeModalOpen","_c7","last_r25","preSelectedFareFamilyId","fareFamiliesByCabin$","trackByFn","upsellCardFareFamily$","NotificationButtonStyle","LINK","_r12","toggleCabin","FlightSelectionFareFamilyListComponent_li_7_ng_container_28_Template","FlightSelectionFareFamilyListComponent_li_7_ng_container_29_Template","cabinExpanded","FlightSelectionFareFamilyListComponent_li_7_Conditional_39_Template","tmp_9_0","brandColor","first_r27","roundedTop","tmp_10_0","uuid","priceWithOriginal_r28","index_r26","CHEVRON_DOWN","FlightSelectionFareFamilyListComponent","showUpsellCard","showKoreaNotification","allowAutoExpand","enableFareFamilyAutoScroll$","cabinIsExpanded","fareFamilyAutoScrolled","cabinUpsellMap","defaultCabinOrder","carouselReady$","cabinExpandedAnimationEnded$","findNextAvailableCabin","currentCabin","fareFamiliesByCabin","nextCabin","fareFamilies$","fareFamilies","effectiveCabinClass","cabins$","cabinList","currentLowestPrice","ticketTypeInfo$","expandedCabin","extendedFareFamilies","nextCabinClass","nextCabinFareFamily","preSelectFareFamily","isFareFamilyAutoScrollEnabled","isReady","isEnded","isCabinExpanded","getElementById","nextValue","_i","fareFamilyCode","FlightSelectionFareFamilyListComponent_ng_template_0_Template","FlightSelectionFareFamilyListComponent_ng_template_2_Template","FlightSelectionFareFamilyListComponent_ng_template_4_Template","FlightSelectionFareFamilyListComponent_li_7_Template","LoginTokenInterceptor","LOGIN_TOKEN_HEADER","LOGIN_TOKEN_PREFIX","nativeBridgeService","intercept","req","containsUrl","urlsToCheck","sendLoginTokenForUrls","urlToCheck","hasCorrectStatus","loginToken","_status","token","clone","btoa","handle","notLoggedInsideApp","isInsideNativeWebView","statusNotInitialOrPending","hasCorrectReqUrl","loyaltyServices","legacy","apiProfileUrl","providedIn","FlightNumbersPipe","onLinkClick","flightHotelClicked","blockOffer_r3","BlockOfferComponent","gtmService","destinationClicked","countryName","marketingOffer","setUpPrices","flag","offerFor","priceOffer","prefillBookingWidget","offerDestination","trackElement","GaContext","BLOCK_OFFER","ElementTypes","BANNER","ElementActions","CLICK","_angular_core__WEBPACK_IMPORTED_MODULE_9__","BlockOfferComponent_fin_block_offer_tile_0_Template","createErrorClass","createImpl","ctorFunc","instance","stack","create","trackingContext","icon$","isMobile$","showName","profileName$","SHOW_BUTTON_STATES","LoginButtonComponent","nameStyle","casProfileName","casProfileOrNot","casProfile","customerType","B2B","showButton$","LoginButtonComponent_fcom_button_0_Template","takeUntilDestroyed","destroyRef","assertInInjectionContext","inject","DestroyRef","destroyed$","observer","onDestroy","toSignal","requiresCleanup","manualCleanup","cleanupRef","equal","makeToSignalEqual","userEquality","is","kind","signal","requireSync","sub","rejectErrors","ɵRuntimeError","ngDevMode","current","isArrayLike","CartService","DapiBaseService","CreateCartPath","createCart$Response","rootUrl","rb","DapiRequestBuilder","build","accept","r","HttpResponse","catchErrorAsJson","GetCartPath","getCart$Response","getCart","UpdatePassengerDetailsInCartPath","updatePassengerDetailsInCart$Response","updatePassengerDetailsInCart","AddPassengerDetailsToCartPath","addPassengerDetailsToCart$Response","addPassengerDetailsToCart","GetFareRulesByCartPath","getFareRulesByCart","DeleteAllSeatsPath","deleteAllSeats$Response","deleteAllSeats","SetServicesPath","setServices$Response","setServices","UtilsService","LocalDate","getDate","pattern","DateFormat","Pattern","getPattern","getLocation","orderData","city","getCityName","airportCode","airport","getDisabledDateRange","selectedBoundsForChange","selectedBound","selectedBoundDeparture","toLocalDate","otherBound","otherBoundDeparture","lte","plusDays","PaymentService","ROOT_PATHS","PaymentFlow","MANAGE_BOOKING","VOLUNTARY_CHANGE","VOLUNTARY_CHANGE_ROOT","CHECK_IN_FUNNEL","orderService","queueService","fromOrderCart","orderIdAndHash$","orderFetchInformation","cartInfo$","cartIdAndHash","idAndHash","queuePaymentInit","serviceName","paymentFlow","cancelServiceAvailability$","toCancelEvent","cancelPayment","sendToQueue","triggerPaymentInit","orderChangeId","cartOrOrderId","cartOrOrderIdParam","paymentInitData$","initializeCheckoutV2$Response","orderUrl","device","mapDeviceForPayment","screen","getUrls","errorResponse","PaymentActions","PaymentStatus","TECHNICAL_ERROR","PENDING_VERIFICATION","urlPrefix","flowRootPath","successUrl","failureUrl","loginSelector","loginStatusSelector","profileTypeSelector","profileSelector","casProfileSelector","tokenSelector","loginPhaseSelector","loginPhase","loginPhaseProfileSelector","phase","loginPhaseErrorSelector","loginState","safeSelect","profileType","select","loginPhaseProfile","loginPhaseError","profileOrNot","profileOrUndefinedIfNotLoggedIn","casProfileOrUndefinedIfNotLoggedIn","profileName","profileData","firstname","lastname","loginIsOpen","selectCorporateUser","corporateUserCleared","showLoader$","corporateUsers$","passengerFormGroup","FIELDS","gender","groupIndex","RadioButtonTheme","BOX","hideDisabledFields","tmp_4_0","inputName_r3","copyFromPassengerGroup","copyFromPassengers","email","otherPhone_r4","phonePrefix","phoneNumber","phonePrefixes$","PaxDetailsFormGroupComponent_ng_template_9_fin_form_array_2_ng_template_1_Template","hideGroups","phoneNumbersGroupConfig","phoneGroupOptions","tmp_15_0","phones","_r6","removeLeadingZero","PaxDetailsFormGroupComponent_ng_template_9_fin_form_group_3_cms_unstyled_fragment_5_Template","phone","isMainPassenger","copyDetailsClicked","PaxDetailsFormGroupComponent_ng_template_9_div_0_Template","PaxDetailsFormGroupComponent_ng_template_9_fcom_text_input_1_Template","PaxDetailsFormGroupComponent_ng_template_9_fin_form_array_2_Template","PaxDetailsFormGroupComponent_ng_template_9_fin_form_group_3_Template","PaxDetailsFormGroupComponent_ng_template_9_div_4_Template","showCopyDetailsButton","tmp_3_0","birthDate","dateOfBirth","monthOfBirth","yearOfBirth","dayOptions$","monthOptions","yearOptions","showContactDetailsFields","PaxDetailsFormGroupComponent_ng_container_12_fcom_button_1_Template","showContactDetails","PaxDetailsFormGroupComponent_ng_container_13_ng_container_1_Template","emailAndPhoneNumber_r9","companyCode","frequentFlyerCard","frequentFlyerAirlines$","cardNumber","INPUT","toggleFrequentFlyerSection","PaxDetailsFormGroupComponent_ng_container_14_ng_container_1_fin_form_group_4_span_7_Template","PaxDetailsFormGroupComponent_ng_container_14_ng_container_1_fin_form_group_4_div_9_Template","CheckBoxTheme","ROUNDED","tmp_14_0","frequentFlyerIsOpen$","_r11","toggleJoinFinnairPlus","joinFinnairPlus","C","CHECKBOX","PaxDetailsFormGroupComponent_ng_container_14_ng_container_1_fin_form_group_4_Template","PaxDetailsFormGroupComponent_ng_container_14_ng_container_1_ng_container_5_Template","shouldShowFFCardSection","profileType$","shouldShowJoinFinnairPlusSection","PaxDetailsFormGroupComponent_ng_container_14_ng_container_1_Template","otherCard_r12","frequentFlyerCardOptions$","index_r13","PaxDetailsFormGroupComponent_ng_template_18_ng_template_7_Template","frequentFlyerCards","frequentFlyerGroupConfig","frequentFlyerGroupOptions","PaxFormFields","SEPARATOR","countryCodeToOption","cc","validateFrequentFlyer","existingCards","isFrequentFlyerNumber","setErrors","custom","card","Validators","validatePhoneNumber","phoneNumberRegex","phonePrefixValidation","compose","PHONE_PREFIX_PATTERN","phoneNumberValidation","PHONE_PATTERN","PaxDetailsFormGroupComponent","elementRef","changeDetectorRef","defaultClass","REQUIRED","allowMultipleFFCards","profile$","copyFromPassengersList","corporateUserSelected","allFrequentFlyerCards","frequentFlyerToggle$","initializeCopyFrom","isFFCardInputDisabled","isJoinFinnairPlusDisabled","hasFFCardValue","hasJoinFinnairPlusValue","availableDates","days$","days","String","years","year","phonePrefixSelected","controls","phoneNumberFilled","setupPhonePrefixes","setupJoinFinnairPlus","addValidators","currentSelection","frequentFlyerAirlines","isEmpty","selectedCodes","ffHasData","toggle","isCorporateAdminOrTravelBooker$","isCorporateAdminOrTravelBooker","setLoaderContainerSize","getCopyFromList","copyFrom","setValue","createPhone","countryPrefix","array","phoneNumbers","markAsDirty","parentTop","loaderTop","loaderContainer","countryCodes","originCountryCode","destinationCountryCode","baseOptions","sortBy","optionsBasedOnLocations","matchingCountryCode","inputField","frequentFlyer","isFrequentFlyerFieldFilled","user","PaxDetailsFormGroupComponent_fin_corporate_passenger_search_0_Template","PaxDetailsFormGroupComponent_div_2_Template","PaxDetailsFormGroupComponent_Conditional_6_Template","PaxDetailsFormGroupComponent_fcom_text_input_8_Template","PaxDetailsFormGroupComponent_ng_template_9_Template","PaxDetailsFormGroupComponent_fin_form_group_11_Template","PaxDetailsFormGroupComponent_ng_container_12_Template","PaxDetailsFormGroupComponent_ng_container_13_Template","PaxDetailsFormGroupComponent_ng_container_14_Template","PaxDetailsFormGroupComponent_ng_template_18_Template","contains","multipleCards_r14","FILL_MOBILE","LIGHT_PRIMARY_CTA_HEATHER","DARK_PRIMARY_NORDIC_BLUE","DARK_PRIMARY_CTA_HEATHER","DARK_SECONDARY_OUTLINE","MENU","RESET","ATTACHMENT_BLOCK","attachment_r1","deleteAttachment","TRASH","AttachmentListComponent_ng_container_0_ng_container_2_fcom_notification_2_Template","AttachmentListComponent_ng_container_0_ng_container_2_fcom_notification_3_Template","AttachmentStatus","UPLOADING","AttachmentListComponent_ng_container_0_ng_container_2_Template","attachments","AttachmentListComponent","fileDeleted","attachment","ctrlField","AttachmentListComponent_ng_container_0_Template","FcomFormsModule","FormsModule","ReactiveFormsModule","withConfig","callSetDisabledState","ButtonModule","PipesModule","PopoverModule","NotificationsModule","FileUploaderComponent","i9","BlockSelectionGroupComponent","RadioItemComponent","RadioItemGroupComponent","TextInputComponent","i10","SelectInputComponent","ComboBoxComponent","HOUR_IN_MILLIS","fromMillis","millis","tzOffsetMillis","dateStringWithoutTimezone","timeZoneHours","timeZoneMinutes","dateStringInCorrectTimezone","dateString","utcMidnight","fullYear","monthOneBased","ds","_millis","_localDate","_localTime","_tzString","_weekday","weekday","localDay","localMonth","localYear","localDateString","timeAndTzString","tzOffsetInMilliseconds","direction","substring","other","toTzString","toJSON","toDate","isAfter","hoursTo","daysTo","removeHours","DateField","DAY","MONTH","EXPECTED_LENGTH","forDate","forDateObj","fromTzDate","tzDate","isLocalDate","toDDSDate","getAmountOfDaysInMonth","minusDays","ls","plusYears","withYear","minusYears","plus","dateField","minus","yearsToMove","monthsToMove","tmpTargetMonth","targetMonth","targetYear","daysInTargetMonth","newUtcMillis","lastDayOfMonth","isBetween","start","end","getUTCDay","toTzDate","toDottedUIString","toDottedString","newYear","dateStringWithoutYears","newDateString","getCMSTier","BookingWidgetFlightService","bookingWidgetGtmService","recommendationService","storageService","suggestedLocationsMap$","trendingDestinationsMap$","defaultLocations$","_selectedPreviousSearches$","setPreviousSearchToLocalStorage","flightSearchParams","previousSearches","previousSearchesStorage","LOCAL","PREVIOUS_SEARCHES_KEY","updatedPreviousSearches","createPreviousSearches","bookingLocations$","globalBookingLocations","flights$","globalBookingFlights","suggestedLocations$","suggestedLocationsMap","trendingDestinations$","trendingDestinationsMap","selectedPreviousSearches$","asObservable","getSuggestedLocationBasedOnCountryCode","getTrendingDestinationsBasedOnOrigin","initDefaultLocations","setLocations","trackElementEvent","setDefaultLocations","defaultLocations","getSuggestedLocations","suggestedLocationByCountryCode","R","suggestedLocations","getTrendingDestinations","trendingDestinations","isEmptyObjectOrHasEmptyValues","locationsToBeSet","locationFromStore","bestGuessFor","fetchUserLocationAndSetDefaultOrigin","_","__","geoLocation","geolocMatchFor","lat","lng","cffLocation","setPreviousFlightSelection","previousSearch","isGlobalBookingWidget","resetSelectedPreviousSearch","_angular_core__WEBPACK_IMPORTED_MODULE_23__","FinLowerCasePipe","splitted","openLanguageSelector","countries$","currentLanguage$","LANGUAGE","EXTERNAL_TAB","closeMenu","NavigationComponent_li_22_ul_1_a_3_span_4_Template","NavigationComponent_li_22_ul_1_a_3_fcom_icon_5_Template","item_r4","external","LOCK_OPEN","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_ng_container_26_li_1_span_4_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_ng_container_26_li_1_fcom_icon_5_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_ng_container_26_li_1_fcom_icon_6_Template","subchild_r8","loginRequired","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_ng_container_26_li_1_Template","hideInMenu","_r5","child_r6","setCategoryAsExpanded","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_fcom_icon_7_Template","closeNaviMenu","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_span_22_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_fcom_icon_23_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_fcom_icon_24_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_ng_container_26_Template","expandedNaviCat$","trackItems","NavigationComponent_li_22_ul_1_ng_container_5_li_1_a_4_span_4_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_a_4_fcom_icon_5_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_div_3_Template","NavigationComponent_li_22_ul_1_ng_container_5_li_1_a_4_Template","hasVisibleChildren","NavigationComponent_li_22_ul_1_ng_container_5_li_1_Template","NavigationComponent_li_22_ul_1_a_3_Template","NavigationComponent_li_22_ul_1_span_4_Template","NavigationComponent_li_22_ul_1_ng_container_5_Template","NavigationComponent_li_22_ul_1_Template","item_r10","selectLanguageAndRedirect","closeLanguageSelector","languageSelectorOpen","NavigationComponent","TRANSITION_DURATION_MS","START_MENU_ITEM_APPEAR_AFTER_MS","navigationMenuService","pageMetaService","CustomIcon","appearAfter","_selectLanguageRoot","isMenuOpen$","isNavigationMenuOpen$","menuItems$","homeLink$","initListOfCountries","expandedNaviCategory","menuInDom$","keepState","bindEventListeners","cleanUpEventHandlers","enableNewLanguageSelector$","events","isNavigationEvent","isRootPath","TOP_NAVIGATION","OPEN","languageCode","links","getLocalizedLinkForLangCode","allowedConfs","languages","self","listener","run","onNaviFocus","addEventListener","removeFocusListener","removeEventListener","focusableElements","isVisible","rootPath","NavigationComponent_div_19_Template","NavigationComponent_li_22_Template","NavigationComponent_div_28_Template","NavigationComponent_ng_container_43_Template","FINNAIR_EMBLEM","tmp_12_0","enterprise","InfoBoxTheme","ALERT","text","InfoBoxSize","InfoBoxComponent","isAlert","InfoBoxComponent_fcom_icon_1_Template","InfoBoxComponent_ng_container_3_Template","InfoBoxComponent_ng_template_4_Template","InfoBoxComponent_ng_template_6_Template","textFromInput_r2","ngContent_r3","isFlagEnabled","goLiveDate","goOfflineDate","goLive","goOffline","apiBaseUrl","apiFullBaseUrl","loyaltyApiBaseUrl","hmr","production","en","uxAuthBasePath","casAllowHttp","casClientId","casClientIdDds","casHost","casEnv","upgradeAvailabilityUrl","checkoutUrl","cmsUrl","cmsEnv","isCmsPreview","translationsApiUrl","ddsServerUrl","configUrl","instantSearchUrl","giftCardApiKey","giftCardConversionUrl","giftCardVerificationUrl","googleMapsApiKey","sentryDsnServer","sentryDsn","sentryEnv","sentryPrefix","versionInfo","releaseGitCommitHash","releaseGitTag","locationRouteCffUrl","timeGeoUrl","oneUpgradeRootUrl","upgradeApiGwKey","showMarketingOffers","pnrSummaryInMMBWidget","servicesUrl","checkInPostUrl","cookieSnippetUrl","consentApiUrl","forceWithCredentials","serviceForm","customerCare","keyId","customerCareAttachment","customerFeedback","lastNameQueryParam","attachmentPath","linkAttachmentPath","customerRefunds","eTicketReceipt","loggedInMissingPoints","portalServices","siteSearch","siteSearchRequest","carRental","clientId","ondMarketingOffersUrl","chat","chatServiceQueueConfig","RTGS_FINNISH","buttonId","eswLiveAgentDevName","RGTS_SWEDISH","RTGS_ENGLISH","SGS_CHINESE","Chatbot_EN","Chatbot_EN_SGS","SGS_FRENCH","SGS_GERMAN","SGS_ITALIAN","SGS_JAPANESE","SGS_KOREAN","SGS_RUSSIAN","SGS_SPANISH","SGS_CHINESE_HK","Chatbot_FTH","chatInitParamsConfig","baseCoreURL","communityEndpointURL","gslbBaseURL","orgId","baseLiveAgentContentURL","deploymentId","baseLiveAgentURL","chatDefaultLanguage","chatScriptSrcURL","enableSplitChat","oneClickPaymentUrl","oneClickPaymentApiKey","membershipCardApiUrl","memberService","gauthUrl","gauthApiKey","apiProfileApiKey","loyaltyMemberUrl","loyaltyMemberResendUrl","loyaltyMemberVerifyUrl","loyaltyMemberVerifyApiKey","loyaltyMemberApiKey","loyaltyAviosLinkingUrl","britishAirwaysExchangeUrl","bookingServiceUrl","bookingServiceApiKey","amApiUrl","amDeeplinkUrl","buyPointsIframeUrl","recommendationApiUrl","reaccommodationTimeout","corporateApiUrl","corporateApiKey","customerCommunicationsApiUrl","storageRoot","appName","appIdIos","manifestPathAndroid","enableAwsXRay","enableExtraAuth","enableMockDapi","enableWelcomeBackMessage","enableGlobalBanner","enableReaccommodationMockData","enableUpgradeTravelClass","enableBuyPoints","enableDapiBackendSwitch","enableDevTools","enableDevToolPath","choooseUrl","enableTicketTypeUpselling","enableQualtricsPageFeedback","enableNewsletterSignUpForm","enableUpgradeAvailabilityInBooking","enableUpgradeAvailabilityPremiumEconomyInBooking","enableClaimMissingPointsLoggedIn","enableCookiePolicy","enableLoginDialog","enableJoinDialog","enableSelfReaccFlow","finnairShopDonateUrl","enableUpgradeBenefitInUpgrade","finnairShopUrl","benefitApi","enableCountrySelector","enableAviosOverhaul","isAviosCuttoffDateEffective","enableAdditionalEmailInBookingFlow","enableRefetchOrder","enableMultiCity","disableTermsAndConditionCheckbox","enableNewClaimMissingPointFlow","enableTicketTypeCardChanges","gatewayBaseUrl","gatewayClientId","gatewayClientSecret","assetBaseUrl","gtmContainerSrc","gtmContainerId","enableMMBThirdPartyAncillaries","enableShowingSAF","enableBwThirdPartyAncillaries","enableSalesforceDataCloud","salesforceDataCloudScriptSrcURL","corporatePredict","enableSynchronousTicketingOnConfirmationPage","enableCorporateData","enableSafContributionCard","enableVisaLightCreditCardBanner","enableEditPaxDetailsOnReviewPage","enableGermanRailway","enableShowFlightNumbers","enableShowCheaperOnlineTag","enableAccountCreationVerification","enableEuropeUnder100","enableCorporateSaf","corporateChoooseUrl","enableNewDownloadAttachmentFlow","enableCorporateSeatBenefit","enableSpecialUpsellCategory","enableNewUploadAttachmentFlow","enableTravelExtrasTierBenefitTag","enableBookingFlowSeatMapPreFetch","enableNewStepper","enableBookingFlowAncillaryBundles","bookingWidgetFeatureState","appState","LoginModule","_angular_core__WEBPACK_IMPORTED_MODULE_27__","ComponentsModule","GtmModule","NavigationTriggerModule","FinFormsModule","UiComponentsModule","ProfileQuickViewComponent","LoginWidgetComponent","LoginFormContainerComponent","i11","i12","LoginCardComponent","LoginFormComponent","i13","i14","i15","i16","i17","JoinFormComponent","i18","i19","i20","i21","i22","i23","i24","LoginDialogComponent","FlightTimeOption","MORNING","AFTERNOON","EVENING","defaultFilterValues","defaultStopsOption","defaultRefundabilityOption","defaultTravelClass","defaultTimeOptions","FAKE_LOAD_TIME","flattenDestinations","flattened","flattenedChildren","destWithoutChildren","preSelectedDestinations","textMatch","countryCodeOrName","CONTINENT","continentName","isInteropObservable","fromInteropObservable","obs","Symbol_observable","fromArrayLike","isPromise","fromPromise","promise","then","isAsyncIterable","fromAsyncIterable","isIterable","fromIterable","iterable","fromReadableStreamLike","createInvalidObservableTypeError","asyncIterable","process","asyncIterable_1","__asyncValues","asyncIterable_1_1","catch","LocationNamePipe","locationsService","cachedInputs","location$","retrieveLocation","locationName$","cityName","triggerLocationFetch","mutationObserverInitConfig","default","attributes","childList","characterData","subtree","travelRestrictions","MutationObserverDirective","mutationObserverInitConfigKey","finMutationObserver","finObserverRemoved","detectMutationSupport","observeMutations","MutationObserver","mutations","mutation","disconnect","cabinClassPriorityOrder","fareInformation","cabinClasses","reverse","getHighestCabinClassIndex","fareInfo","getHighestCabinClass","filterAndSortFareFamilyByCabinClass","sortValue","Infinity","getBoundFareFamilies","offers","cheapestOffer","outboundFareFamily","outboundId","inboundFareFamily","inboundId","totalPointsPrice","outboundPrice","inboundPrice","points","outboundPointsPrice","inboundPointsPrice","totalPoints","outboundFareInformation","inboundFareInformation","isDepartureTimeInGivenOptions","departureTimes","departureTime","shouldTimeBeKept","isArrivalTimeInGivenOptions","arrivalTimes","arrivalTime","matchesBoundStopCount","stopsCount","stops","containsOnlyOneCabin","details","cClass","fi","getPreselectedFareFamily","codeStart","getCabinClassShortCode","regexPrefix","campaignCode","RegExp","campaignFare","ff","test","fareFamiliesWithoutCampaignFiltering","classicFareFamily","content_r1","subjectTaxonomyTags","item_r2","dataUrl","viewType","CmsViewType","POPUP","imageData_r4","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_ng_container_2_div_1_Template","link_r5","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_ng_container_4_div_1_Template","related","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_fin_video_1_Template","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_ng_container_2_Template","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_cms_rich_text_3_Template","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_ng_container_4_Template","sectionClass","CMVideo","CMPicture","CMArticle","CmsArticleCollectionComponent_ng_container_0_div_1_h2_4_Template","CmsArticleCollectionComponent_ng_container_0_div_1_div_6_Template","useGrid","sectionWrapperClass","disableTeaserTitle","CmsArticleCollectionComponent_ng_container_0_div_1_Template","CmsArticleCollectionComponent","CmsArticleCollectionComponent_ng_container_0_Template","LocationsPipeModule","LocationsModule","FlightSummaryComponent_span_17_ng_container_2_Template","uniqueAirlineName_r1","last_r2","tmp_1_0","FlightSummaryComponent","update","returnIsDifferentDay","isDifferentDay","uniqueAirlineNames","COMMON_BOOKING_TRAVEL_CLASSES","translationKey","getIcon","isBusOrTrain","isTrainOrBus","MINUS","AIRCRAFT_HORIZONTAL","FlightSummaryComponent_span_13_Template","FlightSummaryComponent_span_17_Template","FlightSummaryComponent_ng_container_25_Template","FlightSummaryComponent_ng_container_26_Template","FlightSummaryComponent_ng_container_27_Template","FlightSummaryComponent_span_28_Template","OrderPreviewsService","getUpcomingTrips","fetchOrderPreviews","orderPreviews","getSortedOrderPreviewsByDepartureDate","previousOrder","nextOrder","compareOrderPreviewDates","previousDate","nextDate","OrderModule","imports","inspect","listGetNode","list","isDelete","curr","$o","channel","assert","has","root","deletedNode","objects","listDelete","node","listGet","listHas","listSet","onClick","blurBtn","ButtonComponent_button_0_ng_container_2_Template","mode","loading","textTemplate_r3","ButtonComponent_a_1_ng_container_1_Template","externalLink","openInNewTab","ButtonComponent_ng_template_2_ng_container_1_Template","ButtonComponent_ng_template_2_fcom_loader_5_Template","ButtonComponent_ng_template_2_ng_container_6_Template","iconTemplate_r8","position","loading_r5","size_r6","text_r7","icon_r10","size_r12","loading_r11","ButtonComponent_ng_template_4_fcom_icon_0_Template","ButtonComponent","logger","fillMode","fillModeMobile","aria","removeFromNavigation","focus$","clickBtn","isDevMode","loadingLabel","ariaLabel","buttonElement","ariaRole","role","ButtonComponent_button_0_Template","ButtonComponent_a_1_Template","ButtonComponent_ng_template_2_Template","ButtonComponent_ng_template_4_Template","storeLocationData","removeLocationData","cleanLocationSearch","updateLocationSearch","updateLocationSearchInput","setLanguage","language_actions","LOYALTY_FEATURE_KEY","pathIsAnyHardcodedPath","pathArr","pathIsWithinHardcodedPath","testHardcodedPath","matchesLastPathSegment","testPath","sanitizePath","urlWithoutQueryString","urlQueryString","pathSegmentsToPathString","activeRoute","urlArray","filteredUtmParamsQueryString","allowedUtmParamsQueryString","param","UTM_PARAMS","QualtricsComponent","open","openModal","hotjarService","multivariateTestService","openChange","previousEvent","modalOpen","segmentsFeed$","getUserId","embeddedData","watchPostMessages","getResizeEvent$","adjustIframeHeight","firstChange","removeGlobalListener","stripParams","QUALTRICS","SURVEY","onClose","surveyLoaded","parentHeight","iframe","parentElement","style","minHeight","processMessage","QUALTRICS_DOMAIN","currentMessage","messageHasRealValue","messageAllowedForSurvey","QualtricsMessageTypes","OPTIN_RESPONSE","optInResponse","NPS_RATING_RESPONSE","npsRatingResponse","SURVEY_DONE","surveyDone","CONFSURVEY_DONE","confSurveyDone","messageValue","isValidDate","homeGtmEvent","HeaderBoxesComponent","cdr","showLink","HeaderBoxesComponent_a_4_Template","HeaderBoxesComponent_ng_template_8_Template","noLinkEmblem_r3","TailNamesPipe","airlineCodes","resolveTailName","AsyncScheduler","AsyncAction","PaxValidationService","validatePaxAge","paxType","minBirthDateInclusive","maxBirthDateInclusive","validateAge","minBirthDateInclusiveErrorKey","maxBirthDateInclusiveErrorKey","LocalizationPipe","isUndefined","isNull","cachedKey","cachedParams","cachedOptions","RadioItemGroupComponent_div_1_span_4_Template","control","isRequired","first_r3","last_r4","isHorizontal","ROUND","parentForm","controlName","option_r2","labelText","descriptionText","isSensitive","RadioItemGroupComponent_div_4_span_1_Template","helperText","titleText","errorText","RadioItemGroupComponent_div_1_Template","RadioItemGroupComponent_ng_container_3_Template","RadioItemGroupComponent_div_4_Template","RadioItemGroupComponent_div_5_Template","PaxTripService","orderPreviewsService","accessToken$","getTrips","mapFetchOrderPreviewsResponse","addTrip","bookingReference","oauth_token","frequentFlyerNumber","memberNumber","verifyAddedTrip","trips","TripsActions","FetchTripsStatus","trip","recLoc","orderPreview","journeys","mapBoundPreviewsToJourneys","boundPreview","passengerAmount","numberOfTravelers","airportName","municipality","scheduledDateTime","_angular_core__WEBPACK_IMPORTED_MODULE_15__","SidebarNavigationItemComponent","TRACKING_CONTEXT","SECTION_NAVIGATION","styleClasses","clickEvent","attrs","SidebarNavigationItemComponent_span_2_Template","SidebarNavigationItemComponent_fcom_icon_3_Template","SidebarNavigationItemComponent_fcom_icon_4_Template","resultSelector","ii","normalizeDate","getFullYear","getMonth","ISO_8601_DATE_TIME_REGEX","ISO_8601_DATE_REGEX","TimeUnit","millisecond","minute","hour","MILLIS_IN_HOUR","startOf","unit","copy","setMilliseconds","setSeconds","setMinutes","setHours","setDate","setMonth","diff","date1","date2","func","fdate1","fdate2","divider","callback","getMilliseconds","getSeconds","getMinutes","getHours","setFullYear","subtract","WeekdayMap","NAMES","sun","mon","tue","wed","thu","fri","sat","weekStartsOn","toISO8601","toISO8601UTC","convertStringDatesToDateObjects","convertData","isISODateTimeString","isISODateString","QualtricsModule","CmsModule","ModalModule","__WEBPACK_AMD_DEFINE_RESULT__","global","maxInt","base","tMax","skew","damp","regexPunycode","regexNonASCII","regexSeparators","overflow","baseMinusTMin","stringFromCharCode","fromCharCode","RangeError","mapDomain","string","parts","ucs2decode","extra","output","counter","ucs2encode","basicToDigit","codePoint","digitToBasic","digit","adapt","delta","numPoints","firstTime","decode","out","basic","oldi","baseMinusT","inputLength","bias","encode","handledCPCount","basicLength","m","handledCPCountPlusOne","qMinusT","version","ucs2","toUnicode","define","__webpack_require__","CarouselTheme","HAS_BACKGROUND","RUNNING_TESTS","MultivariateTestId","FRONT_PAGE_PERSONALISATION","requiresInjectScript","TestVariant","A","B","enabledInAllEnvs","ENHANCED_CALENDAR_STYLING","NEW_FLIGHT_SELECTION_STYLE","NEW_PRODUCT_CARDS","FLIGHT_SELECTION_FILTERS","REGRESSION_TEST_WORKAROUND","RESTRICTED_BUILD_ENVS","generateSegmentResolver","testId","runningTests","includeCountries","NOT_IN_TEST","entrySet","entry","testEntries","MultivariateTestService","multivariateTestCookies","ReplaySubject","reportedTestIds","getSegmentFromCookies","VariantSource","RANDOMIZED","injectAkamaiSegmentToBodyIfRequired","reportTest","pushEventToDataLayer","GtmEvent","MULTIVARIATE_TEST","getTestVariant","autoReportTest","skipCountryCheck","variant$","userVariantSegment","init","getCookieValue","manualSegment","MANUAL_AB_SEGMENT_COOKIE","MANUAL","akamaiSegmentToNumericMap","AKAMAI_AB_SEGMENT_COOKIE","AKAMAI","variantSegment","script","createElement","innerHTML","appendChild","MULTIVARIATE_TEST_COOKIES","mobileOrTablet","popoverService","toggleLogin","loginEvent","close","currentBreakpoint","TABLET","loggedIn","loginWidget","LoginActions","redirectToLogin","loginOpen$","LoginDialogComponent_div_0_Template","_selectCommonBookingState","COMMON_BOOKING_FEATURE_KEY","_orderState","_orderStatus","_os","orderStatus","_orderResponseErrorStatus","orderResponseErrorStatus","_orderData","_hasOrderData","_orderDataPrimaryPassenger","_od","primaryTravelerId","_getOrderPassengers","_getCheckInEligibilities","checkIn","_orderFetchInformation","_PNR","PNR","_currentServices","mapServicesToBookingSummary","_includedServicesMap","_combinedServices","combineServices","_combinedServicesMap","_services","_acceptTerms","acceptTerms","_changeEligibilities","change","_changeableBoundIds","_ce","orderState","emitUndefined","hasOrderData","orderDataPrimaryPassenger","getOrderPassengers","getCheckInEligibilities","categoryPartStatus","isUpdating","OrderPartStatus","_categoryPartStatus","updatingOrderPart","_updatingOrderPart","_includedServices","includedServicesMap","combinedServicesMap","getChangeableBoundIds","includedVariantsQuantity","variants","allCategoriesQuantity","passengerService","fragmentQuantity","_includedVariantsQuantity","getUnpaidSeatsBySegmentId","_getUnpaidSeatsBySegmentId","PromotionBannersComponent","orderData$","cabinClassMap","loggedIn$","chooseUrl$","itemParam","PromotionBannersComponent_fin_promotion_banner_3_Template","PromotionBannersComponent_fin_promotion_banner_5_Template","LightSectionNaviComponent_div_0_ng_container_11_li_1_span_3_Template","LightSectionNaviComponent_div_0_ng_container_11_li_1_fcom_icon_4_Template","LightSectionNaviComponent_div_0_ng_container_11_li_1_fcom_icon_5_Template","item_r3","LightSectionNaviComponent_div_0_ng_container_11_li_1_Template","hideInSectionNavi","item_r7","sectionNavi_r5","toggleDetails","LightSectionNaviComponent_div_0_ng_container_31_li_1_span_3_Template","LightSectionNaviComponent_div_0_ng_container_31_li_1_fcom_icon_4_Template","LightSectionNaviComponent_div_0_ng_container_31_li_1_fcom_icon_5_Template","section_r4","LightSectionNaviComponent_div_0_ng_container_31_li_1_Template","LightSectionNaviComponent_div_0_span_8_Template","LightSectionNaviComponent_div_0_fcom_icon_9_Template","LightSectionNaviComponent_div_0_fcom_icon_10_Template","LightSectionNaviComponent_div_0_ng_container_11_Template","LightSectionNaviComponent_div_0_span_28_Template","LightSectionNaviComponent_div_0_fcom_icon_29_Template","LightSectionNaviComponent_div_0_fcom_icon_30_Template","LightSectionNaviComponent_div_0_ng_container_31_Template","linkText","activeNaviItem$","isOpen$","LightSectionNaviComponent","activeNaviSection$","activeNaviSection","activeNaviItem","expandComponent","LightSectionNaviComponent_div_0_Template","sectionNavi_r2","SectionNaviComponent_div_0_ul_6_ng_container_2_li_1_Template","SectionNaviComponent_div_0_ul_6_ng_container_2_Template","section_r5","trackByIndex","SectionNaviComponent_div_0_ng_container_20_li_1_Template","SectionNaviComponent_div_0_div_2_Template","SectionNaviComponent_div_0_ul_6_Template","SectionNaviComponent_div_0_ng_container_20_Template","showTitle$","SectionNaviComponent_div_2_div_1_Template","SectionNaviComponent","SectionNaviComponent_div_0_Template","SectionNaviComponent_div_2_Template","CmsCtaBigLinkComponent","cmsTarget$","toLinkData","layout","tt_r1","CtaBigLinkComponent_a_0_span_7_Template","ctaButton$","teaserTitle$","CtaBigLinkComponent","target$","teaserText$","CtaBigLinkComponent_a_0_Template","contentId","index_r3","headerLevel","ctx_r5","DEFAULT_HEADER_LEVEL","expand_r5","CmsConditionalAccordionComponent_div_0_h2_1_Template","CmsConditionalAccordionComponent_div_0_fin_expand_2_Template","content_r7","tmp_6_0","item_r8","CmsConditionalAccordionComponent_div_2_h2_1_Template","CmsConditionalAccordionComponent_div_2_div_2_Template","CmsConditionalAccordionComponent","CmsConditionalAccordionComponent_div_0_Template","CmsConditionalAccordionComponent_div_2_Template","CmsCtaLinkComponent","CmsBackLinkComponent","shared$","CmsBackLinkComponent_div_0_Template","campaign_r1","priceTypeName","CmsCampaignComponent_div_0_div_8_Template","CmsCampaignComponent_div_0_a_9_Template","introductionTitle","CmsCampaignComponent","campaign$","CmsCampaignComponent_div_0_Template","item_r1","CmsDescriptiveLinkListComponent_div_0_div_5_div_4_Template","CmsDescriptiveLinkListComponent_div_0_div_5_Template","items_r3","CmsDescriptiveLinkListComponent","items$","CmsDescriptiveLinkListComponent_div_0_Template","TAXONOMY","NO_PADDING","CENTERED","title_r1","media","related_r5","CmsDiscoverNowComponent_ng_container_0_div_1_div_4_fin_content_image_1_Template","CmsDiscoverNowComponent_ng_container_0_div_1_div_4_a_6_Template","CmsDiscoverNowComponent_ng_container_0_div_1_h2_1_Template","CmsDiscoverNowComponent_ng_container_0_div_1_div_2_Template","CmsDiscoverNowComponent_ng_container_0_div_1_div_4_Template","NO_SECTION_MARKER","items_r6","CmsDiscoverNowComponent_ng_container_0_div_1_Template","itemsObs$","CmsDiscoverNowComponent","CmsTaxonomyGeneral","CmsDiscoverNowComponent_ng_container_0_Template","CmsExternalLinkComponent","link$","isLast_r2","CmsImportantLinksComponent_div_0_a_5_Template","items_r4","CmsImportantLinksComponent","CmsImportantLinksComponent_div_0_Template","CmsUniqueSellingPointComponent_div_0_div_3_Template","items_r2","CmsUniqueSellingPointComponent","CmsUniqueSellingPointComponent_div_0_Template","CmsLinkListWithIconsComponent_div_0_li_5_a_1_Template","CmsLinkListWithIconsComponent_div_0_li_5_Template","mapUrlToTarget","formattedItems","formattedItem","CmsLinkListWithIconsComponent","CmsLinkListWithIconsComponent_div_0_Template","CmsListWithIconsComponent_div_0_li_5_fcom_icon_2_Template","CmsListWithIconsComponent_div_0_li_5_Template","CmsListWithIconsComponent","useTeaserTitle","CmsListWithIconsComponent_div_0_Template","CmsOndMarketingOffersComponent","ondMarketingOffersService","destinationLocationCode$","getDestinationLocationCode","CmsOndMarketingOffersListComponent","CmsOndMarketingCrossLinkingComponent","route","ondPageType","OndPageType","LANDING","links$","fetchLocationPairs","originCountry","getCurrentCountry","image$","CmsTextWithSideImageComponent_div_0_cms_link_block_5_Template","CmsTextWithSideImageComponent_div_0_fin_content_image_9_Template","isBlackFriday$","showSectionMarker$","textContent$","tmp_5_0","disableCropping","CmsTextWithSideImageComponent","cmsTags$","BLACK_FRIDAY","CmsTextWithSideImageComponent_div_0_Template","CtaWithImageAndTextComponent_a_8_img_7_Template","iconUrl$","CtaWithImageAndTextComponent","CtaWithImageAndTextComponent_h2_1_Template","CtaWithImageAndTextComponent_a_8_Template","DestinationCategoryHeroComponent_ng_container_0_div_9_Template","detailText","DestinationCategoryHeroComponent","DestinationCategoryHeroComponent_ng_container_0_Template","CmsEditorialCategoryPageComponent","DOCTYPE","VIEWTYPE","FORMTYPE","CmsFormType","PAGETYPE","alteredTemplate$","template$","viewTypeName","alteredTemplate","contentItem","CMTeaser","BACK_LINK","MAIN_ARTICLE","tmp_0_0","EditorialPageHeadComponent","titleAsHeading","EditorialPageHeadComponent_h1_3_Template","EditorialPageHeadComponent_span_4_Template","q_r1","EditorialCategoryComponent_div_3_div_1_Template","EditorialCategoryComponent_div_3_div_2_Template","isShowAllLink","EditorialCategoryComponent","editorialCategory","article","ARROW_LINK","EditorialCategoryComponent_div_3_Template","LoaderType","CmsEditorialMainPageComponent","hasContent","CmsEditorialMainPageComponent_fin_cms_json_content_6_Template","CmsEditorialMainPageComponent_ng_template_7_Template","spinner_r2","trigger","opacity","transition","animate","CmsBluewingsClusterPageComponent","CmsBluewingsMainPageComponent","CmsBluewingsMainPageComponent_fin_cms_json_content_6_Template","CmsBluewingsMainPageComponent_ng_template_7_Template","CmsChildPageComponent","CmsChildPageComponent_h1_5_Template","CmsExternalPageRendererComponent","externalTemplateService","scriptToBeLoaded$","allowScriptLoad$","externalHtml","loadExternalHtml","htmlAsText","elementForParsing","getElementsByTagName","src","scripts","removeChild","scriptToLoad","loadScripts","useRouterForLinkClicks","broadcastEvent","scriptWrapper","contentWrapper","tagName","urlToPathname","CmsDestinationComponent_section_6_ng_container_1_Template","content_r4","remainingContent$","Placement","HERO","MAIN","MAIN_RIGHT","HIDDEN","setCustomPlacement","TemplateName","CMS_DESTINATION_HERO","CMS_TRAVEL_GUIDE","CMS_ITEMS","LINK_LIST_WITH_ICONS","isTeaserWithItems","filterNonCustomPlacement","hasCustomPlacement","addCustomPlacement","customPlacement","filterRegularContent","filterMainLeftContent","filterMainRightContent","accumulatedChildItems","childItems","filterHeroContent","CmsDestinationComponent","hero$","mainLeft$","mainRight$","pageViewType$","CmsDestinationComponent_ng_container_0_Template","CmsDestinationComponent_ng_container_4_Template","CmsDestinationComponent_section_6_Template","CmsDestinationComponent_ng_container_8_Template","RenderLazyComponent","RETRIEVE_PAGE_CONTENT","loadRetrievePage","loadForm","DESTINATIONS_SEARCH","DESTINATION_SEARCH_HERO","loadDestinationSearch","_this","_asyncToGenerator","DestinationSearchLazyModule","DestinationSearchPageComponent","DestinationSearchHeroComponent","destinationSearchTypeToComponentMap","moduleRef","createNgModuleRef","lazyLoadComponent","createComponent","ngModuleRef","_this2","BaggageTracingFormComponent","CancellationCoverClaimFormComponent","CaseAttachmentsFormComponent","CertificatesForInsuranceCompanyFormComponent","ClaimMissingPartnerPointsFormComponent","ClaimMissingPointsFormComponent","CorporateContactFormComponent","ETicketReceiptFormComponent","GiftCardInformationFormComponent","JoinCorporateFormComponent","RefundFormComponent","RefundStatusCheckerFormComponent","SafDownloadFormComponent","ServiceFormsLazyModule","SpecialAssistanceFormComponent","SpecialAssistanceWizardComponent","VatReceiptFormComponent","Promise","formTypeToComponentMap","BAGGAGE_TRACING_FORM","CANCELLATION_COVER_CLAIM_FORM","CASE_ATTACHMENT_FORM","CERTIFICATES_FOR_INSURANCE_COMPANY_FORM","CLAIM_MISSING_PARTNER_POINTS_FORM","CLAIM_MISSING_POINTS_FORM","CORPORATE_CONTACT_FORM","E_TICKET_RECEIPT_FORM","GIFT_CARD_INFORMATION_FORM","JOIN_CORPORATE_FORM","REFUND_FORM","REFUND_STATUS_CHECKER_FORM","SAF_DOWNLOADABLE_FORM","SPECIAL_ASSISTANCE_FORM","SPECIAL_ASSISTANCE_WIZARD","VAT_RECEIPT_FORM","_this3","RetrieveModule","RetrievePageContentComponent","ViewContainerRef","ExternalLinkComponent","TextOnImageComponent_ng_container_1_span_3_Template","target_r1","imageData$","imageAspectRatio$","TextOnImageComponent","TextOnImageComponent_ng_container_1_Template","TextOnImageComponent_ng_template_3_Template","imageContainer_r3","tt_r2","TextOnImageNoLinkComponent","TextOnImageNoLinkComponent_div_2_Template","TextOnImageNoLinkComponent_div_4_Template","phraseGroup","phrase_r2","site","local","TravelGuidePhrasesComponent","TravelGuidePhrasesComponent_h4_1_Template","TravelGuidePhrasesComponent_div_3_Template","phrases","teaser_r1","CmsDisclaimerComponent","CmsDisclaimerComponent_ng_container_0_Template","c_r1","CmsBadgeComponent_ng_container_0_div_1_span_2_Template","i_r3","CmsBadgeComponent_ng_container_0_div_1_Template","CmsBadgeComponent","CmsBadgeComponent_ng_container_0_Template","link_r1","colorClass","TextLinkComponent","TextLinkComponent_a_0_Template","CmsTextLinkComponent","TEXT_LINK_LEFT_LIST","tmp_7_0","headerFontLevel","gridClass","teaserItem_r3","TeaserListComponent_Conditional_0_Conditional_1_Conditional_1_For_1_Template","teaserItem_r5","TeaserListComponent_Conditional_0_Conditional_1_Conditional_2_For_2_Template","teaserItem_r6","TeaserListComponent_Conditional_0_Conditional_1_Conditional_3_For_1_Template","ɵ$index_31_r8","ɵ$count_31_r9","teaserItem_r7","EMERGENCY_IN_OPERATIONS_COMPANY","TeaserListComponent_Conditional_0_Conditional_1_Conditional_4_For_2_Template","teaserItem_r10","TeaserListComponent_Conditional_0_Conditional_1_Conditional_5_For_1_Template","TeaserListComponent_Conditional_0_Conditional_1_cms_heading_tag_0_Template","TeaserListComponent_Conditional_0_Conditional_1_Conditional_1_Template","TeaserListComponent_Conditional_0_Conditional_1_Conditional_2_Template","TeaserListComponent_Conditional_0_Conditional_1_Conditional_3_Template","TeaserListComponent_Conditional_0_Conditional_1_Conditional_4_Template","TeaserListComponent_Conditional_0_Conditional_1_Conditional_5_Template","renderHeading","QUERY_LIST_TEASER_STYLE","QUERY_TEASER_LIST_THIRD","QUERY_LIST_NEWS_COLLECTION","loadNextItems","nextPageLink$","TeaserListComponent_Conditional_0_Conditional_1_Template","TeaserListComponent_Conditional_0_div_3_Template","TeaserListComponent_Conditional_0_Conditional_5_Template","showLoadMore$","TeaserListComponent","getHeaderLevel","getFontLevel","cmsTemplateService","currentPage$","sanitizeWhiteListedPath","parsedPageNum","parseUrl","pageNum","numberOfPages$","numberOfPages","currentPage","urlWithoutPageNum","delimiter","nextPage","templatePath","load","currentItems","firstNewItemIndex","newItems","TEASER_LIST","setFocus","trackByUrl","listItems","TeaserListComponent_Conditional_0_Template","externallyDisplayedDate","TeaserComponent","TeaserComponent_fin_date_3_Template","TeaserComponent_a_6_Template","aspectRatio","teaserImage_r1","TeaserCardComponent","getPics","TeaserCardComponent_fin_block_image_3_Template","TeaserCardComponent_h3_5_Template","AuthorComponent","author","TimestampPipe","timestamp","formatDate","DateComponent","DateComponent_ng_container_1_Template","media_r1","DetailTextComponent_figure_0_div_1_Template","DetailTextComponent_figure_0_ng_template_2_Template","DetailTextComponent_figure_0_figcaption_4_Template","elseBlock_r2","markup","DetailTextComponent","mediaObject","DetailTextComponent_figure_0_Template","DetailTextComponent_div_1_Template","article_r3","RelatedTeaserComponent","relatedTeaser","RelatedTeaserComponent_hr_0_Template","RelatedTeaserComponent_div_2_Template","TagComponent","tagTitle","tagUrl","EncodePipe","inputString","encodeURI","SocialComponent","colour","FACEBOOK","X","contentImage_r2","ArticleBluewingsComponent_figure_3_figcaption_3_Template","htmlTitle","firstPublished","creationDate","ArticleBluewingsComponent_ng_template_8_fin_date_0_Template","detailTextItem_r4","ArticleBluewingsComponent","schemaService","addArticleSchema","headline","description","dateModified","datePublished","image","ArticleBluewingsComponent_h1_0_Template","ArticleBluewingsComponent_figure_3_Template","ArticleBluewingsComponent_fin_author_6_Template","ArticleBluewingsComponent_ng_container_7_Template","ArticleBluewingsComponent_ng_template_8_Template","ArticleBluewingsComponent_fin_detail_text_14_Template","authors","TRAVEL_UPDATE_UPDATED","defaultDateRender_r5","detailTextItems","ArticleChildComponent_figure_3_figcaption_3_Template","detailTextItem_r3","ArticleChildComponent","ArticleChildComponent_h1_0_Template","ArticleChildComponent_figure_3_Template","ArticleChildComponent_fin_detail_text_6_Template","CmsBookNowComponent","price$","informationalTeaser","InformationalTeaserComponent_div_3_fin_content_image_1_Template","extraText","InformationalTeaserComponent","InformationalTeaserComponent_div_1_Template","InformationalTeaserComponent_div_2_Template","InformationalTeaserComponent_div_3_Template","InformationalTeaserComponent_div_4_Template","CmsListWithHeadingComponent_section_0_h2_1_Template","CmsListWithHeadingComponent_section_0_fin_cms_json_content_2_Template","CmsListWithHeadingComponent","CmsListWithHeadingComponent_section_0_Template","flightsPageUrl_r2","SMARTVEL_WIDGET_DESTINATION_FIELD","SMARTVEL_WIDGET_ORIGIN_FIELD","TravelRestrictionsComponent","smartvelSource","smartvelApiKey","destinationLocationCodeSubject","originLocationCodeSubject","parseLocationParamFromRoute","oneway$","queryParamMap","flightsPageRedirectionUrl$","originLocationCode","createRedirectionUrl","loadScript","onWidgetChange","record","attributeName","parseLocCodeFromSmartvelWidget","iataCode","OND_MARKETING_LANDING_ROOT","OndMarketingRoutesPath","CITY_TO_CITY","selector","smartvelWidget","matchAll","TravelRestrictionsComponent_div_1_Template","TravelRestrictionsModule","HorizontalTitleComponent_div_0_a_6_Template","HorizontalTitleComponent","HorizontalTitleComponent_div_0_Template","CmsHeadingTagComponent_h1_3_ng_container_1_Template","extraClasses","CmsHeadingTagComponent_h2_4_ng_container_1_Template","CmsHeadingTagComponent_h4_5_ng_container_1_Template","CmsHeadingTagComponent_h5_6_ng_container_1_Template","CmsHeadingTagComponent_h6_7_ng_container_1_Template","CmsHeadingTagComponent_h3_8_ng_container_1_Template","CmsHeadingTagComponent","level","CmsHeadingTagComponent_ng_template_0_Template","CmsHeadingTagComponent_h1_3_Template","CmsHeadingTagComponent_h2_4_Template","CmsHeadingTagComponent_h4_5_Template","CmsHeadingTagComponent_h5_6_Template","CmsHeadingTagComponent_h6_7_Template","CmsHeadingTagComponent_h3_8_Template","destinationClick","scrollEvents$","openAmContinueModal","originLocationCode_r3","offers$","TrendingDestinationsComponent","amDestinationService","destinationSearchService","calendarOpen$","isAmContinueModalOpen","scrollDebounceTime","popularTrendLimit","maxNumberOfOffers","minNumberOfOffers","originLocationCode$","defaultOriginLocationCode$","getTripType","bothWayOffers","getEuropeUnder100","filteredDestinationList","trendingToOffer","getBadgeLabelAndIcon","flightPriceFilter","loc","fromEntries","Map","getAmountOfOffers","toPromoBlock","offs","debounceScroll$","toPromotionItem","internalPromotion","PromotionType","VIEW","destinationItem","CONTENT","LIST_ITEM","flightHotelUrl","closeAmContinueModal","selectedOriginLocationCode","openPriceCalendar","priceCalendarCTAClicked","closePriceCalendar","getPriceOffer","amountOfOfferWithPrice","isIncludedInCampaign","trend","TRENDING_ARROW_UP","callToAction","destinationUrl","locationCityCode","product","getTrendingDestinationsByContinent","destinationSearchResult","finlandDestinations","locationsUnder100","_location","triggerLocationFetchAll","locationsMap","TrendingDestinationsComponent_fin_offer_grid_0_Template","RenderLazyWizardComponent","loadWizard","MultiStepConditionalFormModule","MultiStepConditionalFormComponent","CHECKMARK_OUTLINE","reactiveForm","formStatus","FormStatus","INITIALIZING_ERROR","countryChanged","NewsletterSignupFormComponent_ng_container_0_ng_container_4_form_9_fin_select_input_7_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_form_9_div_8_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_form_9_div_21_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_form_9_fcom_notification_25_Template","error_r3","NewsletterSignupFormComponent_ng_container_0_ng_container_4_ng_container_11_div_1_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_div_8_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_form_9_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_div_10_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_ng_container_11_Template","LOADING","errorArticle$","NewsletterSignupFormComponent_ng_container_0_ng_template_2_Template","NewsletterSignupFormComponent_ng_container_0_ng_container_4_Template","success_r4","NewsletterSignupFormComponent","newsletterService","fragmentService","createForm","LATIN_ALPHA_PATTERN","maxLength","EMAIL_PATTERN","marketingNewsletter","advertising","atLeastOneRequired","isLoggedInUser$","enable","disable","createSelectOption","object","countryLanguageList","shownConfs","conf","getFragment","scrollToInvalidField","singleLanguage","languageName","payload","pageUrl","NewsLetterSource","NEWSLETTER_FORM","postSubscribeRequest","NEWSLETTER_FORM_SUBMITTED","selected_country","selected_language","clearValidators","setValidators","updateValueAndValidity","markAllAsTouched","NewsletterSignupFormComponent_ng_container_0_Template","link_r3","CmsArticlesWithIconsComponent_div_0_div_6_div_3_Template","column$_r4","CmsArticlesWithIconsComponent_div_0_cms_heading_tag_4_Template","CmsArticlesWithIconsComponent_div_0_div_6_Template","CmsArticlesWithIconsComponent_div_0_div_8_Template","hasGridClass$","articles$","CmsArticlesWithIconsComponent","collection","CmsArticlesWithIconsComponent_div_0_Template","TextLinkLeftComponent_Conditional_0_Conditional_4_Template","underline","useIcon","TextLinkLeftComponent","finLocalization","newTabText","TextLinkLeftComponent_Conditional_0_Template","CmsCmrelatedComponent_Conditional_0_Conditional_1_Template","CmsCmrelatedComponent_Conditional_0_For_3_Template","CmsCmrelatedComponent_Conditional_0_Conditional_4_Template","CmsCmrelatedComponent","CmsCmrelatedComponent_Conditional_0_Template","CMExternalLink","CmsArrowLinkListComponent_Conditional_0_Conditional_1_Template","CmsArrowLinkListComponent_Conditional_0_For_3_Template","CmsArrowLinkListComponent","arrows","CmsArrowLinkListComponent_Conditional_0_Template","NewsFeedItemComponent","companyNews","targetBlank","CmsQuickLinksComponent","clickLink","CmsEmergencyInOperationsComponent","LANGUAGE_SELECTOR_CONTEXT","LanguageSelectorContext","TOP_NAVI","oneworldLink$","FINNAIR_LOGO","ONEWORLD_LOGO","updatedText","modificationDate","PHONE_BLOCK","EmergencyInOperationsArticleComponent_Conditional_0_For_23_Conditional_0_Template","EMERGENCY_IN_OPERATIONS","emergencyInOperationsTexts","chatAfterText","initChat","EmergencyInOperationsArticleComponent_Conditional_0_Conditional_25_Conditional_3_Template","CHAT_BLOCK","genContactTitle","chatLinkText","item_r5","EmergencyInOperationsArticleComponent_Conditional_0_For_27_Conditional_0_Template","EmergencyInOperationsArticleComponent_Conditional_0_Conditional_15_Template","EmergencyInOperationsArticleComponent_Conditional_0_For_23_Template","EmergencyInOperationsArticleComponent_Conditional_0_ForEmpty_24_Template","EmergencyInOperationsArticleComponent_Conditional_0_Conditional_25_Template","EmergencyInOperationsArticleComponent_Conditional_0_For_27_Template","EmergencyInOperationsArticleComponent_Conditional_0_ForEmpty_28_Template","homepageLinkText","publishedText","EMERGENCY_IN_OPERATIONS_UPDATED","furtherInfo","hideChatInfo","EmergencyInOperationsArticleComponent","chatService","openChat$","EmergencyInOperationsArticleComponent_Conditional_0_Template","CmsMarketingActivityBlocksComponent_ng_container_0_div_1_fcom_promo_card_4_Template","CmsMarketingActivityBlocksComponent_ng_container_0_div_1_Template","CmsMarketingActivityBlocksComponent","mappedContent$","CmsMarketingActivityBlocksComponent_ng_container_0_Template","image_r2","HeroBluewingsClusterComponent_Conditional_3_For_1_Template","HeroBluewingsClusterComponent_Conditional_3_ForEmpty_2_Template","HeroBluewingsClusterComponent","HeroBluewingsClusterComponent_Conditional_1_Template","HeroBluewingsClusterComponent_Conditional_2_Template","HeroBluewingsClusterComponent_Conditional_3_Template","HeroBluewingsClusterComponent_For_5_Template","HeroBluewingsClusterComponent_ForEmpty_6_Template","option_r1","SimpleSelectFieldComponent_div_0_ng_container_9_option_1_Template","SimpleSelectFieldComponent_div_0_ng_container_9_Template","formGroup_r2","label$","name$","modelName$","options$","SimpleSelectFieldComponent","group$","SimpleSelectFieldComponent_div_0_Template","forRoot","ngModule","providers","BookingService","CmsDataService","CmsTemplateService","OndMarketingOffersService","OndMarketingDataService","ExternalTemplateService","MediaQueryService","RecommendationService","Cms3DSeatMapService","NewsletterSignupService","HeadersModule","OndMarketingLandingCoreModule","ServiceFormsModule","ContentComponentsModule","ContentServicesModule","DestinationSearchModule","BookingWidgetModule","QuickLinksModule","CarouselModule","PromoCardModule","CmsAccordionComponent","CmsJsonContentComponent","CmsCategoryComponent","CmsDestinationHeroComponent","DestinationHeroComponent","CmsFullWidthBookingWidgetComponent","CmsOffersGridComponent","CmsRichTextComponent","CmsShowMoreComponent","CmsTeaserComponent","CmsTravelGuideComponent","CmsTextOnImageComponent","CmsDisruptionsComponent","CmsCtaWithImageAndTextComponent","CmsLinkBlockComponent","CmsContentSwitcherTabsComponent","VideoComponent","OfferGridComponent","RichTextComponent","TravelGuideComponent","i25","DynamicRouteComponent","CmsPageComponent","i26","i27","LinkBlockComponent","i28","i29","i30","i31","FooterOfferComponent","i32","i33","OfferDetailsComponent","i34","ContinueReadingComponent","i35","i36","i37","i38","i39","IconWithTextComponent","BookingEntryComponent","i40","i41","i42","i43","i44","i45","CmsGlobalDisruptionBannerComponent","i46","NativeBridgeService","TravelGuideComponent_h2_0_span_1_Template","showLabel","outputContent$","videoUrl$","TravelGuideComponent_ng_container_5_fin_travel_guide_phrases_1_Template","pg_r3","text$","extractMedia","video","mapTravelGuide","removeEmptyCmsText","mediaType$","isVideo","phraseGroups$","tg","commonPhrases","showHeading","TravelGuideComponent_h2_0_Template","TravelGuideComponent_fin_video_1_Template","TravelGuideComponent_div_3_Template","TravelGuideComponent_ng_container_5_Template","TravelGuideComponent_ng_template_7_Template","normalText_r4","COMPLETE_NOTIFICATION","createNotification","isStopped","isSubscription","EMPTY_OBSERVER","SafeSubscriber","handleStoppedNotification","nextNotification","errorNotification","_bind","Function","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","useDeprecatedNextContext","useDeprecatedSynchronousErrorHandling","captureError","notification","onStoppedNotification","defaultErrorHandler","disclaimer","iconUrl","svgIcon","DisclaimerComponent_ng_container_0_img_3_Template","DisclaimerComponent_ng_container_0_fcom_icon_4_Template","DisclaimerComponent_ng_container_0_ng_container_5_Template","DisclaimerComponent_ng_container_0_ng_template_6_Template","backgroundColor","contentBlock_r2","DisclaimerComponent","DisclaimerComponent_ng_container_0_Template","FocusOutDirectiveModule","TrapFocusModule","PopoverComponent","notifier","PhoneNumberMaskDirective","addKeyPressEvent","addPasteEvent","isKeyboardEvent","KeyCodes","SPACE","clipboardData","getData","InitializeCheckoutV2Path","orderId","initializeCheckoutV2","FetchOrderPreviewsPath","fetchOrderPreviews$Response","FetchOrderByEmailSenderOrderRequest1Path","fetchOrderByEmailSenderOrderRequest1$Response","fetchOrderByEmailSenderOrderRequest1","GetOrderByPnrAndLastNamePath","getOrderByPnrAndLastName$Response","getOrderByPnrAndLastName","GetOrderByTourOperatorAndLastNamePath","getOrderByTourOperatorAndLastName$Response","getOrderByTourOperatorAndLastName","FetchOrderPath","fetchOrder$Response","includedBoardingPassTypes","requestInitiator","includePredictions","fetchOrder","UpdatePassengerDetailsPath","updatePassengerDetails$Response","updatePassengerDetails","ConfirmCancelAndRefundPath","confirmCancelAndRefund$Response","confirmCancelAndRefund","FetchOrderCancelRefundPath","fetchOrderCancelRefund$Response","fetchOrderCancelRefund","jsConfigOverride","env","ENV","indexHtml","getRunTimeConfigOverrides","previewUrl","getPreviewCmsUrl","DEFAULT_LANG","mapToDdsLanguage","ddsLanguages","BookingWidgetGtmService","dataCloudService","context$","searchType$","activeTab","widgetActiveTab","WidgetTab","AM","SearchType","BOOKING_FLOW","BOOKING_WIDGET","pageViewEvent","pageView","preFlightSearch","preFlightSearchParams","getSideChannel","utils","formats","arrayPrefixGenerators","brackets","prefix","comma","indices","repeat","pushToArray","arr","valueOrArray","toISO","defaultFormat","defaults","allowDots","allowEmptyArrays","charset","charsetSentinel","commaRoundTrip","encodeDotInKeys","encoder","encodeValuesOnly","formatter","formatters","serializeDate","skipNulls","strictNullHandling","sentinel","generateArrayPrefix","sideChannel","tmpSc","findFlag","pos","maybeMap","isNonNullishPrimitive","isBuffer","objKeys","encodedPrefix","adjustedPrefix","encodedKey","keyPrefix","valueSideChannel","opts","normalizeStringifyOptions","joined","InstantsearchService","PingPath","ping$Response","ping","GetPricesForFlightsPath","getPricesForFlights$Response","departureLocationCodes","explode","destinationLocationCodes","numberOfDays","lengthOfStay","oneway","tripTypes","getPricesForFlights","PostPricesForFlightsPath","postPricesForFlights$Response","postPricesForFlights","GetPricesForOffersPath","getPricesForOffers$Response","getPricesForOffers","GetPricesForPeriodPath","getPricesForPeriod$Response","tripFlexibility","debug","searchSource","getPricesForPeriod","GetPricesForPeriodWithFixedDepartureDatePath","getPricesForPeriodWithFixedDepartureDate$Response","groupBy","getPricesForPeriodWithFixedDepartureDate","confirmation","setPaymentIdPaid","paymentNotPaid","setTrips","fetchTrips","setDismissed","IconComponent","informative","errorThrown","dataTestIdValue","dataTestId","iconRef","svgPath","throwSingleError","attrDataTestId","IconComponent_span_1_Template","iconCategory","TagButtonComponent_span_2_fcom_icon_3_Template","TagButtonComponent","tagClicked","blur","TagButtonComponent_ng_content_1_Template","TagButtonComponent_span_2_Template","jsonStringifyErrorReplacer","_key","cache","getOwnPropertyNames","propertyKey","HttpErrorResponse","getAll","json","errorCode","errorMessage","jsonOrString","PostMessenger","TARGET_ORIGIN","iFrameSrcs$","iFrameGetter","stringifiedInteraction","srcs","msg","iFrame","contentWindow","postMessage","isPrimitive","isDate","isEmptyString","isObject","mergeArray","mergeDeep","overWriteWithEmpty","mergeObject","mergeDeepMany","parseData","jsonString","storageSync","stateToUpdate","UPDATE","INIT","rehydrate","stateFromStorage","storageData","storage","getStateFromStorage","nextState","syncStateToStorage","partOfState","newPartOfState","pickKeys","storageKeyName","pathToArray","getInArray","paths","retValue","createObject","clearValueFirst","toAssign","setInArray","pathsInArray","pathsToParent","keyToDelete","parent","parentArray","mergeIn","mergeInArray","tzDateExtractor","TzDateExtractor","weekdayMap","userDateExtractor","UserDateExtractor","getDay","MATCHER","safe","REPLACEMENTS","yy","extractor","yyyy","M","MM","MMM","monthNamesShort","MMMM","monthNames","dd","E","weekdaysShort","EE","weekdays","hh","mm","localized","FULL_NO_YEAR","DATE","DATE_WITH_TIME","DATE_SHORT","MONTH_SHORT","WEEKDAY","WEEKDAY_SHORT","VOICE_OVER_DATE","SHORT_MONTH_AND_YEAR","LONG_MONTH_AND_YEAR","useUserDate","inputObj","strPattern","PreciseNumber","ZERO","decimals","numDecimals","withPrecision","precision","newN","pow","round","divide","multiply","sign","numberStr","urlString","preserveQueryParams","parsed","AwsApiGwInterceptor","headerName","sendApiGwKeyForUrls","URL_MATCHER","WithCredentialsInterceptor","isApiCall","ModalService","hideCloseButtonSubject$","hideCloseButton$","setHideCloseButton","ServicesStatus","campaignsShown","loadSelectionsFromCartOrOrder","cartOrOrderData","currentState","loadServiceSelectionsForCategoryFromCartOrOrderData","unpaidServices","getOnlyIncludedCheckedAndMealsIfModifiable","SPECIAL_DIET","unpaidAndIncludedServices","servicesState","boundServiceState","newServiceCatalogServices","flightServices","passengerServices","sellableServices","asTravelerService","boundBasedPassengerServices","loadBoundSelection","getFragmentId","getInitialValue","servicesReducer","updateStoreAction","cart","commonBooking","ServicesActions","LOAD_ERROR","ser","journeyId","covers","cover","updateSelectionPricesFromServiceCatalog","serviceAvailability","upsell","routerNavigatedAction","routerState","OrderActions","BookingActions","GlobalActions","leaveError","OffersActions","OrderStatus","ORDER_STATUS","ORDER_RESPONSE_ERROR_STATUS","ORDER_DATA","ORDER_FETCH_INFORMATION","IS_UPDATING","setOrderPartUpdateStatus","newStatus","partIds","updatingState","ACCEPT_TERMS","loadSeatSelections","seatSelections","setPaidStatus","clearedSelectionsAndLoadingStatus","currentFlightId","SeatMapStatus","s2","newSelections","toFlightSeatSelections","seatSelectionsInCart","seatService","seatType","characteristics","paid","includedSeat","compareAsJson","pricePerItem","unitPrice","isCart","seatMapReducer","getServices","keepSeatsData","SeatMapActions","seatServices","includedSeatServices","OK_NO_AVAILABILITY","seat","innerTravelerId","_acc","conflictingId","travelerIds","seatMapForFlight","seatMap","paymentStatus","redirectionUrl","paymentIds","PAYMENT_STATUS","PAYMENT_REDIRECTIONURL","paymentReducer","se","Nt","VERIFIED","paymentId","pnr","RedirectActions","setPNR","clearPNR","orderReducer","orderInformation","UPDATING","orderPartIds","ROUTER_NAVIGATED","isTravelReady","isMmbStep","MANAGE_BOOKING_STEPS","CONFIRMATION","CHECKOUT","isChangeFlowStep","VOLUNTARY_CHANGE_STEPS","PURCHASE_REVIEW","isInBookingPurchase","isInCorporatePortal","payment","disruption","disruptionReducer","DisruptionActions","selectedBoundId","upgradeOffer","upgradeOfferReducer","UpgradeOfferActions","redirect","redirectReducer","CommonBookingStoreModule","FormInputSelectComponent_div_13_span_1_Template","FormInputSelectComponent","selectLabelTranslationKey","displayMargin","fieldRequired","hasValidator","idOrControlName","statusChanges","selectElement","FormInputSelectComponent_span_5_Template","FormInputSelectComponent_option_11_Template","FormInputSelectComponent_div_13_Template","useClass","MockLanguageService","HasLocalizationKeyPipe","PluralLocalizationPipe","DrawerDirection","FROM_RIGHT","FROM_LEFT","FROM_BOTTOM","isChildOfPicture","nodeName","isImageElement","setImage","imagePath","useSrcset","srcset","backgroundImage","setSources","attrName","sources","attrValue","setSourcesToDefault","setSourcesToLazy","setSourcesToError","setImageAndSources","setSourcesFn","setImageAndSourcesToDefault","setImageAndSourcesToLazy","setImageAndSourcesToError","Hooks","getNavigator","setPlatformId","platformId","onAttributeChange","newAttributes","removeCssClassName","cssClassName","className","addCssClassName","SharedHooks","setup","defaultImagePath","hasCssClassName","finally","loadImage","skipLazyLoading","img","cloneNode","Image","referrerPolicy","sizes","reject","onload","onerror","setErrorImage","errorImagePath","setLoadedImage","isDisabled","isBot","userAgent","IntersectionObserverHooks","observers","WeakMap","intersectionSubject","uniqKey","getObservable","isIntersecting","customObservable","scrollContainerKey","rootMargin","IntersectionObserver","entrys","loadingCallback","unobserve","LAZYLOAD_IMAGE_HOOKS","InjectionToken","LazyLoadImageDirective","hooks","onStateChange","propertyChanges$","uid","random","debugSubscription","lazyImage","defaultImage","errorImage","scrollTarget","ngAfterContentInit","loadSubscription","lazyLoadImage","evntObservable","rXU","OA$","Rect","right","fromElement","fromWindow","_window","inflate","inflateBy","intersectsWith","getIntersectionWith","de_AT","en_AT","en_AU","en_BE","fr_CA","en_CA","de_CH","en_CH","fr_CH","en_CN","zh_CN","zh_HK","en_CZ","de_DE","en_DE","da_DK","en_DK","en_EE","et_EE","en_ES","es_ES","en_FI","fi_FI","sv_FI","en_FR","fr_FR","en_GB","en_HK","en_HU","en_IE","en_IS","en_IL","en_IN","en_IT","it_IT","en_JP","ja_JP","en_KR","ko_KR","en_LT","en_LV","en_NL","en_NO","no_NO","en_PL","pl_PL","en_RU","ru_RU","en_SE","sv_SE","en_SG","en_TH","en_US","ddsLocalesToNewLocales","concatMap","initStoreAction","State","contentTooltip_r2","HELP_BLOCK","SelectInputComponent_label_2_span_4_Template","SelectInputComponent_label_2_ng_template_5_Template","SelectInputComponent_label_2_button_7_Template","showAsterix","option_r3","SelectInputComponent_div_8_span_1_Template","disableLabel","disableSelectOption","patchValue","SelectInputComponent_label_2_Template","SelectInputComponent_option_5_Template","SelectInputComponent_option_6_Template","SelectInputComponent_div_8_Template","CorporateTripType","DataFilterDateRange","LAST_YEAR","YEAR_TO_DATE","LAST_SIX_MONTHS","FilterTimeUnit","WEEK","AirOffersStatus","AirOffersStatusToText","toAmount","BOOKING_STEPS","PURCHASE_SUCCESS","isBoundFlown","allFlightsHaveStatuses","isBoundOrFlightConfirmedOrCheckedIn","confirmedOrCheckedIn","statuses","toBeDetermined","asTimeAndWeekDay","legEndpointToUfoAirport","legEndpoint","isAwardBooking","totalPrices","numberOfDaysInMonth","rangeFrom","getAircraftTailForFlight","isTrain","aircraft","getTails","tail","checkBoundsOrSegmentsAllFlightsMatchesWithFn","isByTrainOnly","isUsingSAF","itineraryItem","isSegmentUsingSAF","opAirline","priorityServicesAvailable","legs","airLine","getDapiErrorKey","errorType","loginGenderToGenderOption","loginGender","corporateSalutationToGenderOption","finnairGenderToGenderOption","finnairGender","titleToLoginGender","titleToGender","getBrandNameShortCode","adjustFareFamilyOptionHeight","fareHeaderSelectors","property","fareHeaders","itemHeights","maxHeight","getTripTypeFromBookingLocationCodes","getTripTypeFromGlobalBookingFlights","getTripTypeFromBounds","isCancelledFlightWithNoAlternative","disruptedBound","bookingHasDisruption","acknowledge","eligility","bookingHasCoverService","includedService","getAllFlightsFromCartOrOrder","hasBusSegment","isBoundAirDiscount","originalCheapestPrice","shouldWeSellForCategory","servicesToSell","isCatalogHavingService","servicesForPax","paxId","paxServices","isBoundHavingEligibilityForPax","eligibilityForPax","passengersMissingCategoryService","useEvery","eligibilitiesToUse","predicateFunc","paxEligibilityForFlight","eligiblePaxIds","noServiceForAllPassengerOnAnySegment","servicePresentedInServices","whereToSearchArray","additionalEmailValidator","additionalEmails$","checkIfAdditionalEmailExists","emails","duplicate","splitPhoneNumber","phoneNumberWithCountryCode","onlyNumbers","found","len","predicate","getServiceStatus","isCarrierConnect","includeAssignAtAirportStatus","isAssignAtAirportSeat","ServiceStatus","ASSIGN_AT_AIRPORT","PENDING_PAYMENT","getIconForService","sortIds","confirmed","pendingPayment","availableForSell","getGroupedServices","tierLevel","variantsWeCanSell","availableServices","filteredAvailableServices","servicesByKey","innerServices","accumulateServicePrices","consolidateServiceAccumulateQuantities","showActionsButtons","AVAILABLE_FOR_SELL","serviceA","serviceB","consolidatedServices","consolidatedService","isSameServiceItem","servItem1","servItem2","baggageWeight","consolidatedPriceServices","consolidatedServiceWithPrice","getServicePrice","toFixed","mapPassenger","bookingPassenger","fulfillServicesBoundWithPassenger","bookingBound","bookingPassengers","existedServiceBound","foundItem","cheapest","lowestPricesForPaxes","fragmentLowestPrice","innerCheapest","currentPrice","getExpandUpsellService","catalogForCategory","seatMissing","cabinBagMissing","bagMissing","isBoundFlownWithTimeDifference","diffInHours","shouldWeUpsell","upsellForCategory","categoriesWithUpsell","defaultServicesOrder","PRIORITY","OTHER","SPECIAL","SPECIAL_NEED","TRAVEL_COMFORT","FIREARM","MEDIC","CHILD","findSegmentById","findPassengerById","createEmptySeatServices","servicesToShow","requiredPassengerIds","seatsTitle","allSegmentIds","seats","seatServicesBound","fakeEmptySeatService","getIconForServiceCategory","servicesOrder","missingSegmentIds","missingPassengers","segmentToPaxIdsMap","segmentMissingPaxIds","paxIdsMissingSeatServices","filledInSeatServices","getServicesForBoundWithUpsell","showUpsell","products$","shouldWeUpsellForThisCategory","createEmptyServiceFromCatalog","shouldNotShowAddMoreBtn","getUpsell","hasServicesForCategory","isShowMoreBtn","updatingService$","products","status$","ButtonState","hasPlusTierBenefit","getPassengerTierLevel","articleKey","enabled","isBoundAPISRequired","isApisRequired","isOrder","isFlexFareFamilyBound","locationPairIncludesTrainDestination","RAIL_AND_FLY_LOCATION_CODES","hasPartiallyUNBoundInBooking","isPartiallyUNBound","disruptedItinerary","flightCount","cancelledFlights","successNotification$","successNotification_r5","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_1_div_1_Template","login","forgotPassword","openCorporateLoginForm","accountVerification_r7","AccountVerification","fullScreen","loading$","TRANSFER_LOADER","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_2_ng_container_1_Template","corporateLoginForm_r8","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_3_ng_container_1_Template","postLostPassword","forgotPasswordForm","resetLogin","step_r3","finLet","login2fa","resendEmail","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_div_6_fcom_notification_14_Template","verificationForm","InputType","TEXT","resendEmailCount","requestSMS","_r13","_r14","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_1_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_2_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_3_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_4_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_5_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_div_6_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_7_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_8_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_ng_container_9_Template","closeDialog","onAlertNotificationLinkClicked","LoginFormComponent_ng_container_0_fin_login_form_container_1_fcom_notification_10_Template","LoginFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_Template","titleLabel$","NORMAL_LOGIN","loginTranslations","tmp_8_0","loginPhaseProfile$","error$","accountVerificationTemplate_r15","LoginFormComponent_ng_container_0_ng_template_3_div_0_Template","LoginFormComponent_ng_container_0_ng_template_3_fcom_notification_1_Template","LoginFormComponent_ng_container_0_ng_template_3_fcom_notification_2_Template","EXPIRED","corporateLogin","trackAndCloseDialog","corporateCredentialsForm","LinkSize","corporateChangePasswordUrl","LoginFormComponent_ng_container_0_fin_login_form_container_1_Template","LoginFormComponent_ng_container_0_ng_template_3_Template","LoginFormComponent_ng_container_0_ng_template_5_Template","step$","onKeydownHandler","_event","joinService","trackElementNamePrefix","mfaMsg","resendSuccess","resendError","accountVerificationToken$","verificationFinished","createForms","loginPhaseStep","track2faViews","trackButtonClickEvent","loginError","FINNAIR_EMBLEM_BLOCK","accountVerification$","verifyAccountToken","accountVerification","MODAL","postLostPasswordBy","member","getRawValue","severity","pwd","keep","username","password","startCapture","HotjarCaptureEvent","CORPORATE_LOGIN","redirectToCorporatePortal","track2faSubmitButtonElementName","get2faViewTrackElementNames","submitButton","validateVerificationFormCode","NOTIFICATION","resend2faEmail","loginTrigger$","usernameValidator","nonNullable","corporateUsernameValidator","minLength","validationErrors","minlength","maxlength","elementName","loginStep","track2faViewElementName","view","_angular_core__WEBPACK_IMPORTED_MODULE_16__","LoginFormComponent_ng_container_0_Template","showWarning","CONTEXT_TO_GA_CONTEXT","DESKTOP_MAIN_NAVIGATION","LanguageSelectorComponent","skipRedirect","applySelection","styles","getComputedStyle","popoverOptions","popoverWidth","showArrowCaret","showLeftBorder","roundedCorners","hasPadding","fullWidthContent","showFullscreenOnBreakpoint","popoverPosition","PopoverPosition","BOTTOM","useFixedPosition","zIndex","getPropertyValue","prevPageUrl$","prevPageUrl","getPreviousUrl","currentUrl","LanguageSelectorComponent_ng_template_12_Template","contentPopover_r4","QuickLinksComponent","PersonalizationModule","forClient","PersonalizationTrackingService","forServer","NoopPersonalizationTrackingService","BookingHeaderComponent","closePopover","clearFilter","sendAnalytics","selectedStopsOption","resultsAmount","filtersForm","selectedTravelClass","shouldNotClearTravelClass","travelClassFilters","selectedRefundabilityOption","departureTime_r7","onSelectDepartureTime","selectedDepartureTimes","getTimeRange","arrivalTime_r9","onSelectArrivalTime","selectedArrivalTimes","clearAllFilters","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_fcom_filters_4_Template","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_fcom_filters_6_Template","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_fcom_filters_7_Template","activeTab$","setActiveTimesTab","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_ng_container_24_Template","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_ng_container_34_Template","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_fcom_button_36_Template","ARROW_LEFT_OUTLINE","ARROW_RIGHT_OUTLINE","resizedWatcher$","showStopsFilter$","showRefundability","TabTheme","departureCityName","keepOrder","arrivalCityName","showClearAllBtn","amountOfDirectFlights$","onToggleDirectFlights","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_checkbox_8_span_7_Template","boundsHasDirectFlights$","allBoundsAreDirect$","_c10","isFlightSelectionFiltersTestVariant$","isMobile_r14","travelClass_r15","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Conditional_29_ng_container_3_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Conditional_29_ng_container_5_Template","departureTime_r16","arrivalTime_r17","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Conditional_31_ng_container_1_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Conditional_31_ng_container_3_Template","departureTime_r19","_r18","isFlightSelectionFiltersTestVariant_r20","selectedNextDepartureTimes","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_template_34_ng_container_10_Template","arrivalTime_r22","_r21","selectedNextArrivalTimes","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_template_36_ng_container_10_Template","updateNextFiltersToStore","showModal","closeModal","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_template_25_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_container_27_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Conditional_29_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Conditional_31_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_container_32_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_template_34_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_ng_template_36_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_div_38_Template","isModalOpen","selectedFiltersLength$","_c11","_c12","_c14","_c13","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_button_5_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_checkbox_8_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_fcom_filters_10_Template","_c9","isMobile_r23","travelClasses$","FlightSelectionFiltersComponent_ng_container_0_fcom_carousel_3_Template","FlightSelectionFiltersComponent_ng_container_0_ng_container_6_Template","FlightSelectionFiltersComponent","bookingAirBoundsService","layoverAmounts","cabinLastRequestParam$","isTravelClassDisabled","setFilter","resetFilter","resetAllFilters","showSpinner","selectedMaxStopsOption","TicketSelectionPhase","popoverID","openByDefault","closeOnScroll","updateFilters$","isLongHaul","selectionPhase","defaultInboundTravelClass","cabinArray","filters$","handleFilterChange","shouldShowStopsFilter","updateLocations","isTravelClassChoicesDisabled","refundable","filters","isFlightSelectionFiltersTestVariant","allBoundsAreDirect","onUpdateFilters","isTestVariant","updateNextFiltersFromFormChanges","updateStoreFromFormChanges","stopsCountOrMaxStops","maxStops","navigationExtras","queryParamsHandling","refetchBounds","updateSelectedFiltersLength","updateClearAllButton","updateCarouselWidth","sendFiltersGaEvent","nextFilters","setAllNextFilters","RADIO","selectedFilters","getLastRequestParams","triggerFetchBounds","flightFilter","contextForAnalytics","defaultCabin","resetAllNextFilters","setNextDepartureTime","newDepartureTime","setNextArrivalTime","newArrivalTime","hasDirectFlights","hasMultipleStops","_b","_angular_core__WEBPACK_IMPORTED_MODULE_13__","showFlightSelectionFilters","FlightSelectionFiltersComponent_ng_container_0_Template","GtmService","onAnimationStart","ariaId","ExpandComponent","expanded","ariaLabelledBy","animationTimeOut","classList","remove","ExpandComponent_div_1_Template","changeDetection","getMonthByDate","targetDate","weeks","week","selectLocationsState","fromLocations","getLocations","NORDIC_EXACT_PRICE_FORMAT","DEFAULT_ABBR_SETTINGS","ABBR_SETTINGS","ABBR_KO_JA_SETTINGS","DEFAULT_SETTINGS","roundPrice","useSymbol","absoluteValue","abbreviate","stripZeroCents","roundDigits","useCustomFormat","ROUNDER","currencySettings","EUR","symbol","CNY","KRW","customAbbrSettings","JPY","GBP","RUB","DKK","NOK","SEK","CurrencyService","mergedSettings","plusSign","priceNumber","ceil","i18n","customSymbol","currencyFormat","abbreviated","abbreviateAmount","thousandAbbreviation","millionAbbreviation","outputAmount","decimalSeparator","thousandSeparator","formatPoints","currency","thousandAbbr","millionAbbr","basicAbbr","MAX_ABBR_DIGITS","log10","abbreviation","FormPostService","method","submit","LocationMatchOnline","ALL","RouteCffFields","ORIGIN","IS_AWARD","LOCALE","IS_CORPORATE","SuggestedLocationsFields","COUNTRY_CODE","LocationRouteCffService","routeCFFUrl","locationMatchUrl","geolocationMatchUrl","singleLocationUrl","suggestedLocationsUrl","locationCache","locationMatchesFor","online","bail","continentCode","getLocationMatchesFor","getLocationWithIataCode","latitude","longitude","getGeolocMatchFor","endpointUrl","locationMatchData","checkForGermanRailway","transportTypes","BUS_CONNECTION_LOCATION_CODES","transportType","ok","routeCffsFor","destinationLocation","getRouteCffsFor","departures","suggestedLocationResponse","targetLocale","exactLocationData","AJBPartner","ajbPartner","SJBPartner","sjbPartner","airAlliance","airAward","airPartner","GeolocationService","INITIAL_LOCATION_TIMEOUT","NAVIGATOR_GEOLOCATION_TIMEOUT_MS","GEOLOCATION_MAX_AGE_MS","givenLocation$","clearWatchId","watchId","geolocation","clearWatch","getNearestAirportForLocation","combineTemplate","userLocation","locationData","isFromUserLocation","akamaiGeolocation$","browserGeolocation$","userLocation$","merge","nearestAirport$","paramsLocation","nearestAirport","getGeolocationFromNavigator","cancelGeolocationFetch$","NavigatorActions","watchPosition","latLng","coords","enableHighAccuracy","maximumAge","MaintenanceConfigService","getMaintenanceConfig","getStatusForFeature","SESSION_STORAGE_VERSION","LOCAL_STORAGE_VERSION","StorageService","STORAGE_VERSION_KEY","sessionStorageVersion","localStorageVersion","SESSION","store","storageAvailable","removeItem","storageName","storageVersion","convertDates","NATIVE_KEY","sendFn","ClientNativeBridgeService","meta","_appHideStatus$","backButtonPressed$","showHeaderHamburgerMenu$","webkitRef","webkit","isIOSEmulation","sendMessage","messageHandlers","isNativeFinnairIosApp","addBooking","bookingFlowInitialized","openMenu","onCheckInLoaded","onAcceptCheckIn","getEmulatedIosRef","androidRef","Android","isANDROIDEmulation","showMenu","checkInStatusStr","checkInResultStr","getEmulatedAndroidRef","nativeiOSApp","nativeAndroidApp","nativeBridge","makeUiTakeFullAreaInIosWebView","setAppHideStatus","appHideStatus","isNativeOverride","isNativeEmulation","isInsideNativeiOSWebView","isInsideNativeAndroidWebView","isLocalView","backButtonPressed","isHamburgerMenuVisible","urlForAddAJourneyInApp","recloc","openNativeMenu","iOSCallIfAccessible","isAndroidCallAccessible","clientReady","onBackPressed","onShowHamburgerMenu","fnName","updateTag","TimeService","listOfTimeout","listOfInterval","serverTimeObs$","timer$","tickAndReplayFullMinuteTimestamp","currentTime$","calcTime","currentMinuteTimestamp","currentLocalDate","currentTime","clearTimers","clearInterval","getMsToFullMinute","serverMillis","timerOutsideAngular","startAfterMs","intervalMs","setInterval","verifiedTimeOnStartup$","TimeAndGeoipProvider","triggerTimeAndGeoipFetch","each","with","msepoch","browserOffset","long","AppPreloadingStrategyService","preloadRequests","preload","loadModuleFn","triggerPreload","routePath","RefundDetailNotificationType","REVIEW","BookingQueueService","ancillaryService","cancelCartCreate$","cancelCartUpdate$","cancelPaxUpdate$","cancelSeatMapSubjects","fromCartState","cartState","fromCartUrl","fromCartIdAndHash","queueCartCreate","queueId","startQueue","queueCartCreateByBounds","queuePassengersAndCorporateCodeUpdate","passengersAndCorporateCode","persistedCartUpdateExist","queueTriggerFetchSeatMap","seatMapForFlightStatus","triggerFetchSeatMap","queueServicesUpdate","allRequests","updatePartialCart","getUpdateId","queueSeatSelectionReset","cartFlights","actionName","cartPartIds","_angular_core__WEBPACK_IMPORTED_MODULE_18__","AmDestinationContinueModalComponent","navigateToAmBooking","fullUrl","clickOutboundEvent","link_url","link_classes","GtmClickOutboundLinkClass","DESTINATION_LISTING_CARD","AM_LOGO","toGtmString","getGtmFlightNumber","getGtmAircraft","airCraft","getGtmTravelClass","fareInformationString","bookingClass","getGtmRoute","getAllFlights","getGtmRouteFromFlightIds","locs","getGtmPaxAmount","totalAmount","getGtmFlightSelectionDataForFareFamily","boundType","fareFamilyName","NOT_SET","getGtmMulticityOffertSelectionData","boundNumber","boundInfo","GtmPurchaseFlow","stage","resolveGtmServiceId","brand","resolveGtmCategory","GtmCustomDimensions","FLOW_TYPE","getCabinFromSeatType","getNameFromSeatType","getGtmProductSeatId","cabinAndName","isExit","SEAT_TYPE_EXIT","SeatTypeCabinClass","UNSET","getAircraftFromSeatType","allFlights","flightNumbers","getGtmFlightNumbersFromFlightIds","getGtmCategoryName","getGA4Category","item_id","item_name","affiliation","getAffiliation","item_category","GA4Category","ANCILLARIES","item_category2","item_category3","item_variant","item_haul_type","containsLongHaulFlight","serviceFragmentId","mapServicesToGA4ProductList","mapServicesToGtmProductList","isPerBound","getGtmFlightProductFromOrder","balance","getProductTripTypeFromBounds","paxAmountFromPrices","totalPerPax","originLocation","getGtmFlightProductName","getGtmFareTypes","FLOW_JOURNEY_LENGTH","getGtmStayDuration","FLOW_DEPARTURE_COUNTRY","FLOW_ARRIVAL_COUNTRY","GtmCustomMetrics","POINTS_SPENT","GA4Affiliation","getGA4FlightProductFromOrder","FLIGHT_CHANGE","FLIGHTS","getProductTripTypeFromBoundsForGA4","getHaulTypeFromBounds","HaulType","SHORT","LONG","haulType","arrivalDate","getGtmStayDurationCategory","locationCodes","GtmTripTypeLegacy","mapToGtmFareFamilyProduct","fareFamilyBenefitsMap","balancePrice","getGtmFareFamilyProductId","penaltyPrice","getGtmActionFieldId","endTime","otherInformation","isGroupBooking","GtmTripType","OPENJAW","getTripTypeForFlightSearchParams","combineFlightDates","getFlightInformationData","combineOriginDestination","flightInformation","departureDateTime","GA4TripType","getGtmTotalPaxAmountFromOrder","getGtmPaxAmountFromOrder","isAdult","mapToGtmOrderData","paymentMethods","locationOrigin","locationDestination","locationOriginCountry","locationDestinationCountry","longOrShortHaul","GtmHaulType","LONG_HAUL","SHORT_HAUL","PNRrecordLocator","fareTypes","totalPaxAmount","totalPriceAmount","totalPointsAmount","paymentType","mopType","paymentSubType","mopSubType","stayDurationCategory","actionField","revenue","shipping","totalFees","tax","totalTax","getGA4Items","isBeforePayment","getLastPaidServices","resolvePurchaseFlow","getGA4ProductsFromSmpProducts","affiliationMap","notAvailable","notAvailable$","list_id","item_list_id","item_list_name","mapToGA4FareFamilyProduct","finalPrice","activateSelectionPhase","boundSummary_r5","showTicketSummaryModal","returnToFlightSelection","first_r6","i_r7","departureCity","arrivalCity","details_r8","PaxFlightReviewSummaryComponent_ng_container_0_fin_language_selector_6_Template","PaxFlightReviewSummaryComponent_ng_container_0_fin_flight_card_7_Template","closeModals","boundSummary$","ticketSummaryModal","TabLayoutType","IN_MODAL","PaxFlightReviewSummaryComponent","bookingService","currentOffer$","getBoundTypeFromBound","boundSummary","PAX_DETAILS_FLIGHT_REVIEW","setStep","FLIGHT_SELECTION","setGlobalBookingWidgetExpanderStatus","ExpanderStatus","PaxFlightReviewSummaryComponent_ng_container_0_Template","AcceptCheckInPath","acceptCheckIn$Response","acceptCheckIn","CancelCheckInPath","cancelCheckIn$Response","cancelCheckIn","InitializeCheckInPath","initializeCheckIn$Response","initializeCheckIn","ReassignExitSeatsPath","reassignExitSeats$Response","reassignExitSeats","SendBoardingPassPath","sendBoardingPass$Response","sendBoardingPass","GetBoardingPassLinkPath","getBoardingPassLink$Response","getBoardingPassLink","FeedbackService","feedbackWidgetVisibility$","isCorporateUser$","visibility$","visible","isCorporateUser","feedbackSurvey$","CORPORATE_FEEDBACK","setFeedbackWidgetVisibility","visibility","setSurvey","MatOption_Conditional_0_Template","XpG","MatOption_Conditional_5_Template","MatOption_Conditional_6_Template","MATERIAL_SANITY_CHECKS","MATERIAL_SANITY_CHECKS_FACTORY","MatCommonModule","highContrastModeDetector","_sanityChecks","_document","_hasDoneGlobalChecks","_applyBodyHighContrastModeCssClasses","_checkIsEnabled","_isTestEnvironment","KVO","BidiModule","MAT_DATE_LOCALE","MAT_DATE_LOCALE_FACTORY","LOCALE_ID","DateAdapter","_localeChanges","localeChanges","getValidDateOrNull","isDateInstance","isValid","deserialize","setLocale","compareDate","getYear","sameDate","firstValid","secondValid","clampDate","MAT_DATE_FORMATS","ISO_8601_REGEX","range","valueFunction","valuesArray","NativeDateAdapter","matDateLocale","useUtcForDisplay","_matDateLocale","optional","getDayOfWeek","getMonthNames","dtf","Intl","DateTimeFormat","timeZone","_format","getDateNames","getDayOfWeekNames","getYearName","getFirstDayOfWeek","getNumDaysInMonth","_createDateWithOverflow","createDate","today","parseFormat","displayFormat","addCalendarYears","addCalendarMonths","newDate","addCalendarDays","toIso8601","getUTCFullYear","_2digit","getUTCMonth","getUTCDate","NaN","setUTCFullYear","setUTCHours","MAT_NATIVE_DATE_FORMATS","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","MatNativeDateModule","ɵinj","provideNativeDateAdapter","useValue","RippleState","FADING_IN","VISIBLE","FADING_OUT","RippleRef","_renderer","_animationForciblyDisabledThroughCss","fadeOut","fadeOutRipple","passiveCapturingEventOptions$1","normalizePassiveListenerOptions","passive","capture","RippleEventManager","_events","_delegateEventHandler","_getEventTarget","handlers","handler","handleEvent","addHandler","handlersForEvent","handlersForElement","removeHandler","defaultRippleAnimationConfig","enterDuration","exitDuration","passiveCapturingEventOptions","pointerDownEvents","pointerUpEvents","RippleRenderer","_eventManager","_target","_ngZone","elementOrElementRef","_platform","_isPointerDown","_activeRipples","_pointerUpEventsRegistered","isBrowser","_containerElement","coerceElement","fadeInRipple","_containerRect","animationConfig","animation","centered","radius","distanceToFurthestCorner","distX","distY","sqrt","ripple","transitionDuration","computedStyles","userTransitionDuration","animationForciblyDisabledThroughCss","transitionProperty","rippleRef","persistent","_mostRecentTransientRipple","eventListeners","onTransitionEnd","_finishRippleTransition","onTransitionCancel","_destroyRipple","rippleEl","fadeOutAll","_getActiveRipples","fadeOutAllNonPersistent","setupTriggerEvents","_triggerElement","_removeTriggerEvents","_onMousedown","_onTouchStart","_onPointerUp","_startFadeOutTransition","isMostRecentTransientRipple","isFakeMousedown","isFakeMousedownFromScreenReader","isSyntheticEvent","_lastTouchStartEvent","rippleDisabled","clientX","clientY","rippleConfig","isFakeTouchstartFromScreenReader","touches","changedTouches","terminateOnPointerUp","MAT_RIPPLE_GLOBAL_OPTIONS","MatRipple","_disabled","_setupTriggerEventsIfEnabled","_trigger","_elementRef","globalOptions","_animationMode","_isInitialized","_globalOptions","_rippleRenderer","launch","configOrX","i1$1","hostAttrs","unbounded","exportAs","standalone","MatRippleModule","ɵmod","MatPseudoCheckbox","appearance","ɵcmp","aNF","MatPseudoCheckboxModule","MAT_OPTION_PARENT_COMPONENT","MAT_OPTGROUP","_uniqueIdCounter","MatOptionSelectionChange","isUserInput","MatOption","multiple","_parent","_selected","disableRipple","hideSingleSelectionIndicator","_element","_changeDetectorRef","_active","_mostRecentViewValue","onSelectionChange","_stateChanges","viewValue","_text","textContent","emitEvent","_emitSelectionChangeEvent","deselect","_origin","_getHostElement","setActiveStyles","setInactiveStyles","getLabel","_handleKeydown","keyCode","ENTER","hasModifierKey","_selectViaInteraction","_getTabIndex","ngAfterViewChecked","booleanAttribute","GFd","dependencies","encapsulation","_countGroupLabelsBeforeOption","optionIndex","optionGroups","optionsArray","groups","groupCounter","_getOptionScrollPosition","optionOffset","optionHeight","currentScrollPosition","panelHeight","MatOptionModule","eventListenerOptions","rippleInteractionEvents","matRippleUninitialized","matRippleClassName","matRippleCentered","matRippleDisabled","MatRippleLoader","_globalRippleOptions","Platform","NgZone","_hosts","_onInteraction","closest","_createRipple","hosts","destroyRipple","configureRipple","setAttribute","hasAttribute","getRipple","setDisabled","removeAttribute","existingRipple","append","attachRipple","ɵprov","hasV8BreakIterator","v8BreakIterator","supportsPassiveEvents","scrollBehaviorSupported","shadowDomIsSupported","_platformId","EDGE","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","supportsPassiveEventListeners","defineProperty","supportsScrollBehavior","Element","scrollToFunction","_getShadowRoot","_supportsShadowDom","head","createShadowRoot","attachShadow","rootNode","getRootNode","ShadowRoot","_getFocusedElementPierceShadowDom","activeElement","shadowRoot","newActiveElement","composedPath","__karma__","jasmine","jest","Mocha","FeedbackWidgetModule","FeedbackWidgetComponent","scanInternals","accumulator","seed","hasSeed","emitOnNext","emitBeforeComplete","hasState","config_r1","enableAward","enableAurinkomatkat","enablePromoCode","isInCampaign","campaignLabel","campaignEndText","campaignBlackTeaser","heroConfig$","getOngoingCampaigns","destinationPromotion","defaultLocation","campaigns","locationInCampaign","getDestinationInCampaign","getConfigProperty","ContentType","SINGLE_DESTINATION","destinationsByOrigin","amList","defaultVal","CmsDestinationHeroComponent_ng_container_0_Template","oldBound_r1","tails","selectBound","isSelected","CHECKMARK","BoundSelectionItemComponent","utilsService","boundSelected","leg","isDeparture","BoundSelectionItemComponent_div_3_Template","BoundSelectionItemComponent_fcom_tag_12_Template","BoundSelectionItemComponent_div_22_Template","BoundSelectionItemComponent_fcom_notification_23_Template","dueTime","intervalOrScheduler","intervalDuration","isScheduler","isString","toBoolean","emptyValues","valuesOf","objectValues","toSortKey","aVal","bVal","aKeys","bKeys","accessor","mapped","enumValues","isIn","obj1","obj2","keys1","keys2","localeCompare","buildUrl","joinChar","urlParamSeparator","mapValues","mapper","combine","tsArray","reduced","AVAILABLE_TAILS","ALL_AIRLINES","isFFMember","isPartner","PARTNER_AIRLINES","EXTENDED_PARTNER_AIRLINES","FREQUENT_FLIER_AIRLINES","getAirlineNameByCode","operatingAirlineCode","getPartnerAirlines","EMAIL_REGEX","NAME_PATTERN","APIS_NAME_PATTERN","APIS_PASSPORT_NUMBER_PATTERN","APIS_ENTRY_DOCUMENT_NUMBER_PATTERN","LATIN_ADDRESS_PATTERN","WORLDTRACER_PATTERN","PNR_PATTERN","PNR_PATTERN_WITH_TRAILING_WHITESPACE","ETICKET_PATTERN","ADDRESS_PATTERN","ZIP_CODE_PATTERN","CITY_PATTERN","STATE_PATTERN","DISCOUNT_CODE_PATTERN","GIFT_CARD_PATTERN","GIFT_CARD_ID_PATTERN","GIFT_CARD_PIN_PATTERN","PASSWORD_PATTERN","CORPORATE_USERNAME_PATTERN","_v","idx","rangeBetween","startInclusive","endInclusive","mapperFns","YOUTUBE_ID_PATTERN","YOUTUBE_URL_PATTERN","youtubeIdFromUrl","matches","txt","capitalize","FINNAIR_CARD_FORMAT","luhnTimesTable","isFinnairPlusCardNumber","trimmedCardNumber","even","sum","formatFinnairPlusCardNumber","isNonFinnairPlusCardNumber","operatingAirlineName","toLocaleLowerCase","isAmadeusPNRCode","regExp","getClassesFor","classNames","containsClass","getClientRects","hyphenate","camelCaseString","stringHashCode","attr","isValidIBAN","reordered","alphabet","replaced","char","pieceWiseModulo","num","currentElement","serializeParams","getKey","previous","currentItem","toLookup","lookup","passengersNotCheckedInExist","flightTravelerEligibility","isAllowedToUseCheckIn","isCheckedIn","LinkDirective","nofollow","afterNavigation","beforeNavigation","setLinkValue","toActualLink","linkVal","clicks","ev","handleClick","finLink","subscribeToLink","legacySiteLinkLocale","symbolToLangPath","ctrlKey","metaKey","defaultPrevented","getFrequentFlyerLabelForNonAyCard","companyBaseLabel","getTierName","ONEWORLD_TIERS","EMER","SAPP","RUBY","getOneWorldTierName","allianceTierLevel","article_r1","ctaData$","PromoTheme","WHITE","FULL_BG","PromoCardComponent_section_3_fcom_icon_3_Template","PromoCardComponent_section_3_div_7_Template","isTextOnTop","imageData_r3","alt","PromoCardComponent_ng_container_5_fcom_image_2_Template","PromoCardComponent","data$","specialGridSizeForLaptop","fullWidth","isDouble","isFullWidth","ctaTrigger$","PromoCardComponent_section_3_Template","PromoCardComponent_ng_container_5_Template","BLACK","child_r1","LINK_NOFOLLOW","FooterComponent_div_0_nav_5_ul_3_li_1_a_1_Template","FooterComponent_div_0_nav_5_ul_3_li_1_Template","FooterComponent_div_0_nav_5_ul_3_Template","i_r4","copyrightBanner$","FooterComponent_div_0_nav_5_Template","FooterComponent_div_0_span_13_Template","showDisclaimer$","LEGAL_DISCLAIMER_EXCLUDE_COUNTRIES","FooterComponent","isVisible$","isFooterVisible$","FooterComponent_div_0_Template","hasLift","lift","liftedSource","percentTwenties","RFC1738","RFC3986","BreadcrumbService","breadcrumbItemsNormal$","breadcrumbItemsOverride$","constructBreadcrumbItemsNormal$","constructBreadcrumbItemsOverride$","constructBreadcrumbItems$","setBreadcrumbNormal","breadcrumbItems","setBreadcrumb","breadcrumb$","selectCabinClass","activeCabinClass_r4","FareFamilyDetailsV2Component_ng_container_3_ul_1_ng_container_1_Template","availableClasses$","FareFamilyDetailsV2Component_ng_container_3_ul_1_Template","FareFamilyDetailsV2Component_ng_template_5_div_1_Template","isMarked","enableBenefitChanges","isPositive","FareFamilyDetailsV2Component_ng_template_7_ng_container_5_Template","DimensionsValues","CheckedBaggage","WEIGHT_PLURAL","WEIGHT_SINGULAR","WITH_WEIGHT","FareFamilyDetailsV2Component","splitByClasses","activeCabinClass$","extendedFareFamilies$","dimensionsAndDetails$","hasBusLeg$","filterByCabinClass","getBenefitsTableData","rowData","headersList","tableComponentElementRef","tableHeaders","class","getSortedTranslatedBenefits","benefitIndex","isLastRow","translatedBenefitRows","classOption","fareFamilyBenefit","dimensionValuesMap","smallBag","cabinBagWithAmount","child","startsWith","getFullListOfBenefits","orderedBenefits","getOrderForBenefits","fareFamilyKeys","highlightedBenefitKeys","rowCount","activeCabinClass","TemplateRef","FareFamilyDetailsV2Component_ng_container_3_Template","FareFamilyDetailsV2Component_ng_template_5_Template","FareFamilyDetailsV2Component_ng_template_7_Template","FareFamilyDetailsV2Component_fcom_notification_17_Template","itemTemplate_r9","headerTemplate_r8","ACCORDION","expand_r10","notifications_r2","imageRatio$","TripCardComponent_ng_template_10_span_2_span_6_Template","pair_r3","journeyIcon","TripCardComponent_ng_template_10_span_2_Template","destinationPairs","bookingRef","journeyType","TripCardComponent_div_15_fcom_tag_1_Template","TripCardComponent_div_15_fcom_tag_2_Template","operatingAirlineId_r5","airlineName","flightTotalPriceAmount","TripCardComponent_div_17_div_1_span_1_Template","TripCardComponent_div_17_div_1_span_2_Template","clickCta","ARROW_BACK","TripCardComponent_div_17_div_1_Template","TripCardComponent_div_17_fcom_button_2_Template","showStartOverButton","toggleExpand","expandButtonId","expandContainerId","TripCardComponent","JourneyType","showExpandButton","operatingAirlineIds","ctaClick","expandedChange","ngDestroyed$","inferAdditionalBookingInfo","clientWidth","pairs","pair","COMPLEX","getDestinationPairIcon","RETURN_TRIP","TripCardComponent_fcom_image_3_Template","TripCardComponent_span_9_Template","TripCardComponent_ng_template_10_Template","TripCardComponent_div_14_Template","TripCardComponent_div_15_Template","TripCardComponent_span_16_Template","TripCardComponent_div_17_Template","TripCardComponent_div_18_Template","TripCardComponent_div_19_Template","destinationList_r8","CONTEXT","FINNAIR_COMPANY","FINNAIR_URL","FINNAIR_MEDIA_LINKS","SchemaTypes","ARTICLE","ORGANIZATION","WEBPAGE","AIRLINE","WEBSITE","LinkTypes","IMAGE_OBJECT","CONTACT_POINT","SEARCH_ACTION","POST_ADDRESS","schemaDefaultParams","publisher","logo","SchemaService","schemasBehaviorSubject$","schemas$","allSchemas","schemaSource","mainEntityOfPage","updateSchema","schemaType","addAirlineSchema","alternateName","sameAs","memberOf","foundingDate","address","streetAddress","addressLocality","postalCode","addressCountry","addWebSiteSchema","about","potentialAction","addFlightSchema","departureAirportName","departureAirportIataCode","arrivalAirportName","arrivalAirportIataCode","boardingPolicy","seller","departureAirport","arrivalAirport","clearSchemas","newSchema","TotalExpandComponent_div_6_fcom_icon_9_Template","totalTranslationKey$","total$","TotalExpandComponent","initiallyOpen","expandId","titleTranslationKey","expandButtonAriaLabelKey","TotalExpandComponent_div_6_Template","step_r1","StepProgressState","TOTAL_CIRCLE_STROKE_LENGTH","StepProgressCircleComponent","steps","segmentStrokeLength","trunc","segmentStrokeDasharray","totalStrokeLength","gapLength","initialOffset","strokeDashOffset","StepProgressCircleComponent__svg_circle_5_Template","TimelineComponent_div_5_ng_container_1_Template","airportText_r2","TimelineComponent_div_9_ng_container_1_Template","labelKey_r4","airport_r3","TimelineComponent","departureIcon","BUS","arrivalIcon","TRAIN","DEPARTURE","ARRIVAL","TimelineComponent_div_5_Template","TimelineComponent_div_9_Template","TimelineComponent_ng_template_10_Template","onGoToClaimForm","RefundDetailComponent_ng_container_6_fcom_button_6_Template","mainNotificationContent$","displayGoToClaimFormButton$","prices_r4","openSummaryModal","RefundDetailComponent_fin_section_review_8_div_6_div_2_Template","cancelRefund$","INFO_BLOCK","flightTicketNotificationKey$","refundNotificationWithLink_r5","travelExtrasNotificationKey$","RefundDetailComponent_fin_section_review_8_div_6_Template","RefundDetailComponent_fin_section_review_8_div_8_Template","RefundDetailComponent_fin_section_review_8_ng_container_10_Template","RefundDetailComponent_fin_section_review_8_ng_container_12_Template","displayFlightTicketNotification$","displayRefundNotificationWithLink$","showTravelExtrasBlock$","passenger_r7","asPaxTypeKey","tax_r8","priceLine_r10","fee_r9","RefundDetailComponent_fcom_modal_18_ng_container_2_div_4_li_35_Template","RefundDetailComponent_fcom_modal_18_ng_container_2_div_4_ng_container_36_Template","pax_r11","originalBaseFare","baseFare","tmp_13_0","breakdown_r13","expand_r12","taxes","fees","RefundDetailComponent_fcom_modal_18_ng_container_2_div_2_Template","RefundDetailComponent_fcom_modal_18_ng_container_2_div_4_Template","summaryModalOpen","closeSummaryModal","RefundDetailComponent_fcom_modal_18_ng_container_2_Template","breakdowns$","label_r14","originalValue_r15","RefundDetailComponent_ng_template_20_ng_container_2_Template","RefundDetailComponent_ng_template_20_span_4_Template","bold_r17","value_r16","FLOW_TYPE_NOTIFICATION_KEYS","DEPRECATED_AND_INVOLUNTARY_RULES","RefundDetailComponent","goToClaimForm","summaryModalData","isDeprecatedOrInvoluntaryRule$","cancelAndRefund","flowType","cancelRefund","hasPassengers","refundAmount","getPassengerServices","totalPerCategory","notificationType","getMainNotificationKey","isDeprecatedOrInvoluntary","displayNotification","getFlightTicketNotificationKey","displayFlightNotification","getTravelExtrasNotificationKey","displayMainNotification$","displayEligibleForRefundMessage$","displayEligibleForRefundMessage","displayRefundAmountBlock$","flow","is24HourKoreaRule","is24hRuleFlow","RefundDetailComponent_span_4_Template","RefundDetailComponent_ng_container_6_Template","RefundDetailComponent_fin_section_review_8_Template","RefundDetailComponent_fcom_modal_18_Template","RefundDetailComponent_ng_template_20_Template","RefundDetailComponent_ng_template_22_Template","TERMS_AND_CONDITIONS_PREFIX","CorporateService","sendContactCaseToSalesForce","userProfile","getExtraHeaders","extraHeaders","getCorporateApiHeaders","postContactRequest","postFile","fileToBase64","base64File","fileName","fileData","enrollNewCorporate","getCompanyDetails","hasActivatedSAF","updateCompanyDetails","patch","getUsers","getUser","addUser","newUser","updateUser","deactivateUser","userDetails","oauthToken","getSpend","spendRequest","getVatReceipt","getVatSearchParams","getReceiptUrl","contactDetails","receiptId","ticketNumber","URLSearchParams","getReturnLink","getCorporateUserForm","personalDetails","salutation","birthdate","workTitle","jobTitle","fPlusNumber","finnairPlus","finnairPlusNumberValidator","passportDetails","passportNumber","issueDate","issued","expirationDate","nationality","getCountryInputOptions","locationA","locationB","getCountryListForTerms","AT","BE","CN","CZ","DK","FI","FR","DE","HK","HU","IN","IE","IT","KR","LV","LT","NL","NO","PL","SG","ES","SE","CH","TH","GB","US","_angular_core__WEBPACK_IMPORTED_MODULE_17__","coerceBooleanProperty","coerceArray","coerceCssPixelValue","elementOrRef","coerceStringArray","separator","sourceValues","sourceValue","trimmedString","MAT_FORM_FIELD","TIMETABLE_FEATURE_KEY","finalize","ALLOWED_LOCALES","SHOW_IN_LANGUAGE_SELECTION","languageConfs","translation","filterLanguageConfs","lconfs","filterFunc","_lang","_args","_options","seen","Aircraft","ATR","E90","A319","A320","A321","A32B","A330","A350","AIRCRAFT_TRANSLATION_MAP","PREMIUMECO","priceCalendarBaseParamsAreValid","priceCalendarPriceParamsAreValid","travelClassIsValid","totalPax","paxTypeAmount","paxAmountIsValid","isPriceCalendarWithPricesParams","getStartingFromPrice","calendar","createHistogramData","priceResponse","dateTranslations","histogramBarData","lowestPriceForMonth","currentIndex","noFlight","spacer","mapInstantSearchPricesToCalendarPrices","lowestYearlyPrice","allPrices","isLowestPrice","corporateTravelClassLimitEnabled","isMulticity","calendarDatesToGlobalBookingTripDates","calendarDates","nextDep","nextRet","shouldUpdateCalendarDates","_airBoundsState","bookingFeatureState","_bfs","_boundStatus","_abs","_boundRefundale","_boundDepartureTime","_boundArrivalTime","_boundStopsCount","_boundMaxStops","_boundCabin","_boundRefundableNext","_boundDepartureTimeNext","_boundArrivalTimeNext","_boundStopsCountNext","_boundCabinNext","_boundMaxStopsNext","outboundsSelector","airBoundsState","outbounds","inboundsSelector","inbounds","_boundsHash","_boundsCurrency","_request","_inboundsFareFamiliesSorting","sorting","_outboundsFareFamiliesSorting","_outboundsSelectedCheapestOffer","isSelectedCheapestOffer","_oneWayBoundsSelector","_r","_lastRequestParams","lastRequestParams","_serializedLastRequestParams","_departureDate","_returnDate","_outboundsBoundGroupsSelector","_obs","boundGroups","_inboundsBoundGroupsSelector","selectedOutboundAirBoundIdSelector","selectedOutboundAirBoundId","selectedInboundAirBoundIdSelector","selectedInboundAirBoundId","_selectedAirBoundIdsSelector","outboundAirBoundId","inboundAirBoundId","_selectedOutboundBoundsSelector","_outboundBoundGroups","selectedOutBoundFareFamilyId","_selectedInboundBoundsSelector","inboundBoundGroups","selectedInBoundFareFamilyId","_selectedOutBoundAirBoundSelector","_ffId","_selectedInBoundAirBoundSelector","_selectedOutboundFareFamilyCodeBoundsSelector","_ff","_selectedInboundFareFamilyCodeBoundsSelector","selectedOutboundIdBoundsSelector","sortingId","selectedInboundIdBoundsSelector","_outboundFareFamilies","_inboundFareFamilies","_selectedOutBoundFareFamilyBenefitsSelector","_ffMap","_ffCode","_selectedInBoundFareFamilyBenefitsSelector","mapItinerary","_selectedOutBoundItinerarySelector","_selectedInBoundItinerarySelector","_fareFamilies","outboundFFs","inboundFFs","_selectedAirBoundsSortBySelector","_boundSelectionGtmDataSelectorGenerator","boundSelector","fareFamilySelector","_hasZeroBaggageOnEitherBound","outboundFareFamilyCode","inboundFareFamilyCode","outboundBaggage","checkedBaggage","_getSelectedFareFamiliesBrands","_boundsTotalPrice","totalSum","_filteredOutbounds","filterBounds","_filteredInbounds","_nextFilteredOutbounds","_nextFilteredInbounds","inboundsFareFamiliesSortingSelector","outboundsFareFamiliesSortingSelector","boundsStatus","filteredOutbounds","filteredInbounds","nextFilteredOutbounds","nextFilteredInbounds","boundsCurrency","fareFamiliesBounds","isOneWayBounds","serializedLastRequestParams","airBoundsLastRequestDepartureDate","airBoundsLastRequestReturnDate","selectedOutboundBound","selectedInboundBound","selectedOutboundAirBound","selectedInboundAirBound","selectedOutboundFareFamilyBenefits","selectedInboundFareFamilyBenefits","selectedOutboundItinerary","selectedInboundItinerary","selectedAirBoundsTicketSortBy","hasZeroBaggageOnEitherBound","boundsTotalPrice","outboundSelectionGtmData","inboundSelectionGtmData","flightSelectionGtmDataForAirBound","_flightSelectionGtmDataForAirBound","selectedCheapestOffer","selectFareFamiliesBrands","stopCount","filteredItems","boundGroup","_filters","outboundCache","_outboundCache","resultInCache","createdAt","FLIGHT_SELECTION_CACHE_EXPIRY","results","CmsJsonContentComponent_ng_template_0_ng_container_0_ng_container_1_Template","cmsTemplate_r3","childContent_r1","template_r2","CmsJsonContentComponent_ng_template_0_ng_container_0_Template","contentObservable_r5","initialTripType","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_ng_container_11_ng_container_1_Template","cmsItemLoop_r9","template_r8","ctx_r9","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_text_on_image_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_cta_with_image_and_text_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_cta_big_link_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_cta_link_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_link_block_5_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_text_link_6_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_destination_hero_7_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_full_width_booking_widget_8_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_horizontal_title_9_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_disclaimer_10_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_ng_container_11_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_teaser_12_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_teaser_13_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_back_link_14_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_fin_render_lazy_component_15_Template","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_cms_teaser_16_Template","TEXT_ON_IMAGE","CTA_WITH_IMAGE_AND_TEXT","CTA_BIG_LINK","CTA_LINK","LINK_BLOCK","TEXT_LINK","FULL_WIDTH_BOOKING_WIDGET","HORIZONTAL_TITLE","DISCLAIMER","ITEMS","DECORATED_HEADING","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_ng_container_1_Template","showForProfileTiers","CmsJsonContentComponent_ng_template_2_ng_container_1_ng_container_2_Template","showForLoginStatus","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_2_ng_container_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_2_ng_container_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_5_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_5_ng_container_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_11_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_11_ng_container_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_cms_travel_guide_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_cms_icon_with_text_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_cms_text_with_side_image_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_5_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_fin_hero_bluewings_cluster_6_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_fin_article_bluewings_7_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_fin_article_child_8_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_fin_render_lazy_component_9_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_fin_emergency_in_operations_article_10_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_ng_container_11_Template","TRAVEL_GUIDE","COLLAPSE_RELATED_CONTENT","ICON_WITH_TEXT","TEXT_WITH_SIDE_IMAGE","BLUEWINGS_CLUSTER_HERO","BLUEWINGS_ARTICLE","CHILD_ARTICLE","EMERGENCY_IN_OPERATIONS_ARTICLE","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_4_ng_container_2_cms_category_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_4_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_5_cms_external_link_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_div_5_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_show_more_7_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_30_div_2_ng_container_1_Template","cmCollectionCmsItemLoop_r12","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_30_ng_template_3_ng_container_0_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_30_h2_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_30_div_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_30_ng_template_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_article_collection_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_offers_grid_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_div_5_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_fin_trending_destinations_grid_6_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_show_more_7_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_badge_8_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_accordion_9_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_accordion_10_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_conditional_accordion_11_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_content_switcher_dropdown_12_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_content_switcher_tabs_13_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_unique_selling_point_14_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_15_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_16_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_important_links_17_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_discover_now_18_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_link_list_with_icons_19_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_articles_with_icons_20_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_descriptive_link_list_21_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_list_with_icons_22_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_list_with_icons_23_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_list_with_heading_24_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_fin_editorial_category_25_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_cms_arrow_link_list_26_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_fin_teaser_list_27_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_fin_informational_teaser_28_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_fin_radio_list_29_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_ng_container_30_Template","QUICK_LINKS","MARKETING_ACTIVITY_BLOCKS","ARTICLE_COLLECTION","OFFERS_GRID","COLLECTION_CONTENT_IN_GRID_LAYOUT","TRENDING_DESTINATIONS","SHOW_MORE","BADGE","ACCORDION_WITH_PICTURES","CONDITIONAL_ACCORDION","CONTENT_DROPDOWN","CONTENT_TABS","UNIQUE_SELLING_POINT","FRONT_PAGE_DISRUPTIONS","DISRUPTIONS","FRONT_PAGE_LINKS","FRONT_PAGE_ARTICLES","ARTICLES_WITH_ICONS","DESCRIPTIVE_LINK_LIST","LIST_WITH_ICONS","LIST_WITH_ICONS_TEASERTEXT","LIST_WITH_HEADING","HIGHLIGHT_LIST","COLLECTION_ARROW_LINKS","INFORMATIONAL_TEASER","RADIO_COLLECTION","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_7_ng_container_3_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_7_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_7_ng_container_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_8_fin_teaser_list_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_8_fin_editorial_category_3_Template","tag_r13","CmsJsonContentComponent_ng_template_2_ng_container_9_ng_container_2_fin_tag_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_9_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_9_fin_related_teaser_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_9_cms_cmrelated_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_9_fin_editorial_category_5_Template","TAG_LIST","RELATED_LIST","CmsJsonContentComponent_ng_template_2_ng_container_10_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_10_cms_teaser_3_Template","FRONT_PAGE_OFFER","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_hr_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_cms_ond_marketing_offers_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_cms_ond_marketing_offers_list_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_cms_ond_marketing_cross_linking_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_fin_render_lazy_component_5_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_fin_travel_restrictions_6_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_fin_newsletter_signup_form_7_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_fin_render_lazy_component_8_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_fin_render_lazy_component_9_Template","HORIZONTAL_RULER","OND_OFFERS","OND_OFFERS_LIST","OND_CROSSLINKING","NEWSLETTER_SIGNUP_FORM","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_cms_book_now_3_Template","LOCATION_BANNER","CmsJsonContentComponent_ng_template_2_ng_container_1_Template","CmsJsonContentComponent_ng_template_2_ng_container_2_Template","CmsJsonContentComponent_ng_template_2_ng_container_3_Template","CmsJsonContentComponent_ng_template_2_ng_container_4_Template","CmsJsonContentComponent_ng_template_2_ng_container_5_Template","CmsJsonContentComponent_ng_template_2_ng_container_6_Template","CmsJsonContentComponent_ng_template_2_ng_container_7_Template","CmsJsonContentComponent_ng_template_2_ng_container_8_Template","CmsJsonContentComponent_ng_template_2_ng_container_9_Template","CmsJsonContentComponent_ng_template_2_ng_container_10_Template","CmsJsonContentComponent_ng_template_2_ng_container_11_Template","CmsJsonContentComponent_ng_template_2_ng_container_12_Template","FIMenuFoodItem","FICategory","CMPersonalized","CMQueryList","CMRelated","FIOffer","CMPlaceholder","disruptions$","CmsJsonContentComponent_ng_container_6_ng_container_9_ng_container_1_Template","content_r14","CmsJsonContentComponent_ng_container_6_div_1_Template","CmsJsonContentComponent_ng_container_6_cms_disruptions_7_Template","CmsJsonContentComponent_ng_container_6_ng_container_9_Template","showSideTitle$","CmsJsonContentComponent_ng_container_7_ng_container_3_ng_container_1_Template","content_r15","CmsJsonContentComponent_ng_container_7_cms_disruptions_1_Template","CmsJsonContentComponent_ng_container_7_ng_container_3_Template","findByType","pluck","checkSegmentValidity","isInteger","CmsJsonContentComponent_ng_template_0_Template","CmsJsonContentComponent_ng_template_2_Template","CmsJsonContentComponent_ng_container_6_Template","CmsJsonContentComponent_ng_container_7_Template","SDK_VERSION","GLOBAL_OBJ","globalThis","getGlobalSingleton","creator","gbl","__SENTRY__","versionedCarrier","getMainCarrier","getSentryCarrier","carrier","objectToString","isError","wat","isInstanceOf","isBuiltin","isErrorEvent","isDOMError","isParameterizedString","isPlainObject","isEvent","Event","isThenable","isVueViewModel","__isVue","_isVue","WINDOW","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","dataset","sentryComponent","sentryElement","keyAttrPairs","keyAttr","keyAttrPair","classes","allowedAttrs","DEBUG_BUILD","__SENTRY_DEBUG__","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","worldwide_GLOBAL_OBJ","wrappedFuncs","wrappedLevels","originalConsoleMethod","makeLogger","isEnabled","truncate","safeJoin","stringMatchesSomePattern","testString","patterns","requireExactStringMatch","isMatchingPattern","isRegExp","replacementFactory","original","wrapped","markFunctionWrapped","addNonEnumerableProperty","writable","configurable","getOriginalFunction","__sentry_original__","convertToPlainObject","getOwnProperties","newObj","serializeEventTarget","CustomEvent","detail","isElement","extractedProps","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","getPrototypeOf","memoVal","returnValue","ONE_SECOND_IN_MS","dateTimestampInSeconds","timestampInSeconds","createUnixTimestampInSecondsFunc","performance","approxStartingTimeOrigin","timeOrigin","_browserPerformanceTimeOriginMode","uuid4","crypto","msCrypto","getRandomByte","randomUUID","getRandomValues","typedArray","Uint8Array","getFirstException","exception","getEventDescription","event_id","eventId","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","currentMechanism","mechanism","handled","mergedData","checkOrSetAlreadyCaught","isAlreadyCaptured","__sentry_captured__","updateSession","session","ipAddress","ip_address","did","abnormal_mechanism","ignoreDuration","sid","started","release","generateTraceId","generateSpanId","initialObj","mergeObj","levels","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","timing","navigationStartDelta","SCOPE_SPAN_FIELD","_setSpanForScope","scope","span","_getSpanForScope","ScopeClass","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_attachments","_user","_tags","_extra","_contexts","_sdkProcessingMetadata","_propagationContext","traceId","spanId","newScope","flags","_level","_session","_transactionName","_fingerprint","_requestSession","_client","_lastEventId","setClient","client","setLastEventId","lastEventId","getClient","addScopeListener","addEventProcessor","setUser","_notifyScopeListeners","getRequestSession","setRequestSession","requestSession","setTags","setTag","O","setExtras","extras","setExtra","setFingerprint","fingerprint","setLevel","setTransactionName","setContext","setSession","getSession","captureContext","scopeToMerge","scopeInstance","Scope","getScopeData","contexts","propagationContext","setPropagationContext","addBreadcrumb","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","recordDroppedEvent","getLastBreadcrumb","clearBreadcrumbs","addAttachment","clearAttachments","breadcrumbs","eventProcessors","sdkProcessingMetadata","transactionName","setSDKProcessingMetadata","newData","getPropagationContext","captureException","hint","syntheticException","originalException","captureMessage","captureEvent","AsyncContextStack","isolationScope","assignedScope","assignedIsolationScope","_stack","_isolationScope","withScope","_pushScope","maybePromiseResult","_popScope","getStackTop","getScope","getIsolationScope","getAsyncContextStack","sentry","getDefaultCurrentScope","getDefaultIsolationScope","withSetScope","withIsolationScope","getAsyncContextStrategy","acs","getStackAsyncContextStrategy","stackStrategy_withIsolationScope","withSetIsolationScope","getCurrentScope","getTraceContextFromScope","parentSpanId","trace_id","span_id","parent_span_id","DEFAULT_ENVIRONMENT","States","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","RESOLVED","REJECTED","executor","__init","__init2","__init3","__init4","_state","_handlers","_resolve","_reject","onfulfilled","onrejected","_executeHandlers","onfinally","isRejected","_setResult","cachedHandlers","notifyEventProcessors","processors","processor","final","parsedStackResults","lastKeysCount","cachedFilenameDebugIds","STACKTRACE_FRAME_LIMIT","UNKNOWN_FUNCTION","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","skipFirstLines","framesToPop","frames","lines","line","cleanedLine","parser","frame","stripSentryFramesAndReverse","localStack","getLastStackFrame","function","filename","stackParserFromStackParserOptions","stackParser","defaultFunctionName","getFunctionName","getFramesFromEvent","stacktrace","normalize","depth","maxProperties","visit","normalizeToSize","maxSize","normalized","jsonSize","utf8Length","memo","memoBuilder","hasWeakSet","WeakSet","inner","memoize","unmemoize","isFinite","stringified","stringifyValue","objName","getConstructorName","__sentry_skip_normalization__","remainingDepth","__sentry_override_normalization_depth__","valueWithToJSON","numAdded","visitable","visitKey","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","baggageHeaderToObject","baggageHeader","baggageEntry","keyOrValue","METRICS_SPAN_FIELD","getMetricSummaryJsonForSpan","exportKey","summary","SPAN_STATUS_UNSET","SPAN_STATUS_OK","TRACE_FLAG_SAMPLED","hasShownSpanDropWarning","spanToTraceContext","isRemote","spanContext","spanToJSON","spanTimeInputToSeconds","ensureTimestampInSeconds","spanIsSentrySpan","getSpanJSON","spanIsOpenTelemetrySdkTraceBaseSpan","start_timestamp","getStatusMessage","op","_metrics_summary","ROOT_SPAN_FIELD","getRootSpan","FROZEN_DSC_FIELD","getDynamicSamplingContextFromClient","getOptions","publicKey","public_key","getDsn","dsc","getDynamicSamplingContextFromSpan","rootSpan","frozenDsc","traceState","traceStateDsc","dscOnTraceState","baggageHeaderToDynamicSamplingContext","baggageObject","parseBaggageHeader","currBaggageObject","dynamicSamplingContext","jsonSpan","maybeSampleRate","sample_rate","transaction","hasTracingEnabled","maybeOptions","__SENTRY_TRACING__","enableTracing","sampled","spanIsSampled","traceFlags","mergeScopeData","mergeData","mergeAndOverwriteScopeData","prop","mergeVal","prepareEvent","normalizeDepth","normalizeMaxBreadth","prepared","integrations","applyClientOptions","dist","maxValueLength","applyIntegrationsMetadata","integrationNames","sdk","applyDebugIds","filenameDebugIdMap","getFilenameToDebugIdMap","debugIdMap","_sentryDebugIds","debugIdKeys","stackKey","parsedStack","stackFrame","debugId","debug_id","finalScope","getFinalScope","clientEventProcessors","getEventProcessors","getGlobalScope","applyScopeDataToEvent","applyDataToEvent","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","applySpanToEvent","trace","applyFingerprintToEvent","applyBreadcrumbsToEvent","mergedBreadcrumbs","applySdkMetadataToEvent","applyDebugMeta","abs_path","debug_meta","images","code_file","normalizeEvent","maxBreadth","spans","captureContextKeys","parseEventHintOrCaptureContext","hintIsScopeOrFunction","hintIsScopeContext","startSession","currentScope","makeSession","startingTime","sessionToJSON","user_agent","currentSession","endSession","closeSession","_sendSessionUpdate","captureSession","installedIntegrations","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integration","isDefaultInstance","resolvedUserIntegrations","finalIntegrations","filterDuplicates","integrationsByName","currentInstance","existingInstance","debugIndex","findIndex","debugInstance","afterSetupIntegrations","afterAllSetup","setupIntegration","integrationIndex","setupOnce","preprocessEvent","processEvent","DEFAULT_IGNORE_ERRORS","inboundFiltersIntegration","_inboundFiltersIntegration","_hint","clientOptions","mergedOptions","_mergeOptions","internalOptions","allowUrls","denyUrls","ignoreErrors","disableErrorDefaults","ignoreTransactions","ignoreInternal","_shouldDropEvent","_isSentryError","_isIgnoredError","_getPossibleEventMessages","possibleMessages","lastException","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","_getLastValidUrl","originalFunctionToString","SETUP_CLIENTS","functionToStringIntegration","_functionToStringIntegration","originalFunction","dedupeIntegration","_dedupeIntegration","currentEvent","_isSameMessageEvent","previousMessage","_isSameFingerprint","_isSameStacktrace","_isSameExceptionEvent","previousException","_getExceptionFromEvent","currentException","currentFrames","previousFrames","frameA","frameB","lineno","colno","currentFingerprint","previousFingerprint","supportsFetch","Headers","Request","Response","isNativeFunction","DSN_REGEX","dsnToString","dsn","withPassword","pass","projectId","dsnFromComponents","components","createEnvelope","addItemToEnvelope","envelope","forEachEnvelopeItem","envelopeItems","envelopeItem","encodeUTF8","encodePolyfill","TextEncoder","serializeEnvelope","envHeaders","itemHeaders","stringifiedPayload","concatBuffers","buffers","totalLength","buf","merged","createAttachmentEnvelopeItem","content_type","attachment_type","attachmentType","ITEM_TYPE_TO_DATA_CATEGORY_MAP","sessions","client_report","user_report","profile_chunk","replay_event","replay_recording","check_in","feedback","statsd","raw_security","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","SentryError","logLevel","ALREADY_SEEN_ERROR","BaseClient","_integrations","_numProcessing","_outcomes","_hooks","_dsn","makeDsn","dsnFromString","lastPath","projectMatch","validateDsn","isValidProtocol","getEnvelopeEndpointWithUrlEncodedAuth","tunnel","sdkInfo","_getIngestEndpoint","getBaseApiEndpoint","_encodedAuth","sentry_version","sentry_key","sentry_client","_metadata","_transport","transport","transportOptions","undefinedOption","hintWithEventId","_process","eventFromException","_captureEvent","eventMessage","promisedEvent","eventFromMessage","capturedSpanScope","sendSession","getSdkMetadata","getTransport","flush","_isClientDoneProcessing","clientFinished","transportFlushed","eventProcessor","_isEnabled","_setupIntegrations","getIntegrationByName","integrationName","addIntegration","isAlreadyInstalled","sendEvent","createEventEnvelope","metadata","enhanceEventWithSdkInfo","packages","envelopeHeaders","createEventEnvelopeHeaders","sent_at","sendEnvelope","sendResponse","createSessionEnvelope","eventOrCount","sendClientReports","hook","cbIndex","callbacks","send","setupIntegrations","_updateSessionFromEvent","crashed","errored","exceptions","ex","sessionNonTerminal","ticked","_prepareEvent","getDynamicSamplingContextFromScope","_processEvent","finalEvent","sampleRate","isTransaction","isTransactionEvent","beforeSendLabel","parsedSampleRate","parseSampleRate","rate","dataCategory","capturedSpanIsolationScope","__sentry__","processBeforeSend","beforeSend","beforeSendTransaction","beforeSendSpan","processedSpans","processedSpan","spanCountBeforeProcessing","_validateBeforeSendResult","beforeSendResult","invalidValueError","processedEvent","droppedSpanCount","transactionInfo","transaction_info","_clearOutcomes","outcomes","_flushOutcomes","createClientReportEnvelope","discarded_events","exceptionFromError","parseStackFrames","extractType","extractMessage","eventFromError","skipLines","getSkipFirstStackStringLines","reactMinifiedRegexp","getPopFirstTopFrames","isWebAssemblyException","WebAssembly","Exception","eventFromUnknownInput","attachStacktrace","isUnhandledRejection","isDOMException","domException","eventFromString","eventFromPlainObject","errorFromProp","getErrorPropertyFromObject","__serialized__","getNonErrorObjectExceptionValue","synthetic","__sentry_template_string__","__sentry_template_values__","logentry","extractExceptionKeysForMessage","firstKey","includedKeys","serialized","captureType","getObjectClassName","ignoreOnError","shouldIgnoreOnError","wrapper","__sentry_wrapped__","sentryWrapped","wrappedArguments","arg","ignoreNextOnError","arguments","getOwnPropertyDescriptor","BrowserClient","parentSpanIsAlwaysRootSpan","applySdkMetadata","SENTRY_SDK_SOURCE","visibilityState","captureUserFeedback","createUserFeedbackEnvelope","createUserFeedbackEnvelopeItem","instrumented","maybeInstrument","instrumentFn","triggerHandlers","typeHandlers","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","targetObj","originalAddEventListener","__sentry_instrumentation_handlers__","handlerForType","refCount","originalRemoveEventListener","globalListener","_sentryCaptured","getEventTarget","shouldSkipDOMEvent","isContentEditable","_sentryId","isSimilarToLastCapturedEvent","SENTRY_XHR_DATA_KEY","instrumentXHR","XMLHttpRequest","xhrproto","Proxy","originalOpen","xhrOpenThisArg","xhrOpenArgArray","virtualError","startTimestamp","request_headers","__sentry_own_request__","onreadystatechangeHandler","xhrInfo","readyState","status_code","endTimestamp","xhr","onreadystatechange","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","setRequestHeader","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","lastHref","addHistoryInstrumentationHandler","instrumentHistory","supportsHistory","chromeVar","app","runtime","history","pushState","replaceState","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","to","instrumentConsole","hasProp","getUrlFromResource","resource","DEFAULT_BREADCRUMBS","beforeBreadcrumb","finalBreadcrumb","severityLevelFromString","getBreadcrumbLogLevelFromHttpStatusCode","statusCode","breadcrumbsIntegration","_breadcrumbsIntegration","dom","fetch","addConsoleInstrumentationHandler","_getConsoleBreadcrumbHandler","handlerData","addClickKeypressInstrumentationHandler","_getDomBreadcrumbHandler","componentName","serializeAttribute","_isEvent","getComponentName","addXhrInstrumentationHandler","_getXhrBreadcrumbHandler","addFetchInstrumentationHandler","skipNativeFetchCheck","instrumentFetch","onFetchResolved","supportsNativeFetch","EdgeRuntime","doc","sandbox","originalFetch","parseFetchArgs","fetchArgs","fetchData","_ref","_x","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","parsedLoc","parsedFrom","parsedTo","_getSentryBreadcrumbHandler","DEFAULT_EVENT_TARGET","browserApiErrorsIntegration","_browserApiErrorsIntegration","eventTarget","_wrapTimeFunction","_wrapRAF","helpers_WINDOW","_wrapXHR","eventTargetOption","_wrapEventTarget","xmlHttpRequestProps","wrapOptions","eventName","isEventListenerObject","originalEventHandler","browserSessionIntegration","_oldOnErrorHandler","instrumentError","column","__SENTRY_INSTRUMENTED__","_oldOnUnhandledRejectionHandler","instrumentUnhandledRejection","onunhandledrejection","globalHandlersIntegration","_globalHandlersIntegration","stackTraceLimit","_installGlobalOnErrorHandler","addGlobalErrorInstrumentationHandler","_enhanceEventWithInitialFrame","ev0","ev0s","ev0sf","getLocationHref","in_app","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","httpContextIntegration","referrer","Referer","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","limit","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","is_exception_group","exception_id","parentId","parent_id","linkedErrorsIntegration","_linkedErrorsIntegration","createFrame","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","geckoREgex","geckoEvalRegex","defaultStackParser","noFnParts","col","subMatch","extractSafariExtensionDetails","isSafariExtension","isSafariWebExtension","cachedImplementations","clearCachedImplementation","DEFAULT_RETRY_AFTER","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","makeRequest","makePromiseBuffer","task","$","taskProducer","drain","capturedSetTimeout","bufferSize","rateLimits","filteredEnvelopeItems","isRateLimited","limits","disabledUntil","getEventForEnvelopeItem","filteredEnvelope","recordEnvelopeLoss","requestTask","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","namespaces","headerDelay","parseRetryAfterHeader","headerDate","makeFetchTransport","nativeFetch","getNativeImplementation","cached","impl","pendingBodySize","pendingCount","requestSize","requestOptions","keepalive","fetchOptions","getDefaultIntegrations","autoSessionTracking","browserOptions","applyDefaultOptions","optionsArg","defaultOptions","__SENTRY_RELEASE__","SENTRY_RELEASE","skipBrowserExtensionCheck","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionObject","runtimeId","isDedicatedExtensionPage","nw","initAndBind","clientClass","initialScope","setCurrentClient","CustomError","SENTRY_ENABLED","CHUNKLOADERROR","CHUNKLOADERROR_NAME","DEFAULT_ERROR_FIELDS","normalizeError","hasCurrentlyForceReloaded","setReloadTimestamp","reload","Sentry","HTTP_RESPONSE_SPLIT_REGEX","sanitizeData","sanitizeObject","sanitizeKeys","sessionStorage","getReloadTimestamp","nowMinusHour","initSentry","loggingIsAllowedForEvent","shouldIncludeUserAgent","isOldIe","isOldAndroid","isSentryAllowedForDomain","fixedRequest","additional","baseMsg","queryString","splitMessageForHttpFailures","SentryErrorHandler","handleError","originalError","SentryModule","CAPTURE_MESSAGE","SentryLogger","SpinnerType","RadioItemComponent_ng_container_0_ng_container_1_Template","RadioItemComponent_ng_container_0_ng_container_2_Template","radioItemBoxTemplate_r2","radioItemRoundTemplate_r1","RADIOBUTTON_SELECTED","RADIOBUTTON_UNSELECTED","RadioItemComponent_ng_template_1_label_0_fcom_icon_4_Template","RadioItemComponent_ng_template_1_label_0_fcom_icon_5_Template","RadioItemComponent_ng_template_1_label_0_div_10_Template","RadioItemComponent_ng_template_1_label_0_Template","RadioItemComponent_ng_template_3_label_0_span_2_Template","RadioItemComponent_ng_template_3_label_0_Template","descriptionTitle","radioKey","RadioItemComponent_label_5_fcom_icon_4_Template","RadioItemComponent_label_5_fcom_icon_5_Template","RadioItemComponent_label_5_div_7_Template","RadioItemComponent_label_5_span_8_Template","displayContainerStyles","renewedComponent","RadioItemComponent_ng_container_0_Template","RadioItemComponent_ng_template_1_Template","RadioItemComponent_ng_template_3_Template","RadioItemComponent_label_5_Template","OrderSummaryStatus","AlternativeOffersStateStatus","NO_FLIGHT_FOUND","ALTERNATIVE_OFFERS_STATE_FEATURE_NAME","BoundReaccommodationStatus","NEW","CANCELLED","BoundReaccommodationType","FormInputRadioComponent","FormInputRadioComponent_fcom_icon_4_Template","FormInputRadioComponent_fcom_icon_5_Template","FormInputRadioComponent_span_6_Template","FormInputRadioComponent_div_7_Template","_DOM","getDOM","setRootDomAdapter","adapter","DomAdapter","PlatformLocation","historyGo","relativePosition","BrowserPlatformLocation","LOCATION_INITIALIZED","_doc","_history","getBaseHrefFromDOM","getBaseHref","onPopState","getGlobalEventTarget","onHashChange","newPath","forward","back","go","getState","joinWithSlash","endsWith","stripTrailingSlash","pathEndIdx","normalizeQueryParams","LocationStrategy","PathLocationStrategy","APP_BASE_HREF","_platformLocation","_removeListenerFns","_baseHref","prepareExternalUrl","internal","includeHash","externalUrl","HashLocationStrategy","Location","locationStrategy","_subject","_urlChangeListeners","_urlChangeSubscription","_locationStrategy","baseHref","_basePath","_stripOrigin","_stripIndexHtml","isCurrentPathEqualTo","_stripBasePath","basePath","strippedUrl","_notifyUrlChangeListeners","onUrlChange","fnIndex","onThrow","onReturn","createLocation","ɵɵinject","NumberFormatStyle","Decimal","Percent","Currency","Scientific","FormStyle","Format","Standalone","TranslationWidth","Narrow","Abbreviated","Wide","Short","FormatWidth","Medium","Long","Full","NumberSymbol","Group","List","PercentSign","PlusSign","MinusSign","Exponential","SuperscriptingExponent","PerMille","TimeSeparator","CurrencyDecimal","CurrencyGroup","getLocaleDateFormat","getLastDefinedValue","ɵfindLocaleData","ɵLocaleDataIndex","getLocaleTimeFormat","TimeFormat","getLocaleDateTimeFormat","dateTimeFormatData","getLocaleNumberSymbol","NumberSymbols","getLocaleNumberFormat","NumberFormats","checkFullData","ExtraData","LocaleId","extractTime","h","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","ZoneWidth","ShortGMT","Extended","DateType","FullYear","Month","Hours","Minutes","Seconds","FractionalSeconds","Day","TranslationType","DayPeriods","Days","Months","Eras","timezone","parsedNb","isoStringToDate","tzHour","tzMin","dateSetter","timeSetter","ms","getNamedFormat","dateTimezoneOffset","getTimezoneOffset","timezoneToOffset","convertTimezoneToLocal","reverseValue","addDateMinutes","dateFormatter","getDateFormatter","DATE_FORMATS","dateStrGetter","dateGetter","weekNumberingYearGetter","weekGetter","timeZoneGetter","localeId","getLocaleId","formatValue","shortTime","shortDate","formatDateTime","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","opt_values","padNumber","digits","minusSign","negWrap","neg","strNum","getDatePart","formatFractionalSeconds","milliseconds","localeMinus","extended","getDateTranslation","getLocaleMonthNames","formStyle","MonthsFormat","MonthsStandalone","getLocaleDayNames","DaysFormat","DaysStandalone","currentHours","currentMinutes","getLocaleExtraDayPeriodRules","dayPeriods","getLocaleExtraDayPeriods","afterFrom","beforeTo","getLocaleDayPeriods","amPm","DayPeriodsFormat","DayPeriodsStandalone","getLocaleEraNames","erasData","zone","JANUARY","THURSDAY","getThursdayThisIsoWeek","datetime","currentDay","deltaToThursday","monthBased","nbDaysBefore1stDayOfMonth","thisThurs","firstThurs","getFirstThursdayOfYear","firstDayOfYear","fallback","requestedTimezoneOffset","valueOf","NUMBER_FORMAT_REGEXP","formatNumberToLocaleString","groupSymbol","decimalSymbol","digitsInfo","isPercent","formattedText","isZero","parsedNumber","parseNumber","integerLen","zeros","numStr","exponent","MAX_DIGITS","toPercent","fractionLen","minInt","minFraction","minFrac","maxFraction","maxFrac","minIntPart","minFractionPart","maxFractionPart","parseIntAutoRadix","roundNumber","fractionSize","roundAt","dropTrailingZeros","minLen","carry","reduceRight","lgSize","gSize","negPre","negSuf","posPre","posSuf","parseNumberFormat","patternParts","positive","negative","positiveParts","integer","fraction","ch","trunkLen","parseCookieValue","cookieStr","cookie","eqIndex","cookieName","WS_REGEXP","EMPTY_ARRAY","NgClass","_ngEl","initialClasses","stateMap","klass","ngClass","rawClass","ngDoCheck","_updateState","_applyStateDiff","nextEnabled","changed","stateEntry","_toggleClass","NgForOfContext","ngForOf","odd","NgForOf","_ngForOf","_ngForOfDirty","ngForTrackBy","_trackByFn","_viewContainer","_template","_differs","_differ","ngForTemplate","_applyChanges","forEachOperation","adjustedPreviousIndex","previousIndex","move","applyViewChange","ilen","forEachIdentityChange","ngTemplateContextGuard","dir","NgIf","_context","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","condition","_updateView","ngIfThen","assertTemplate","ngIfElse","ɵstringify","SwitchView","_viewContainerRef","_templateRef","_created","destroy","enforceState","created","NgSwitch","_defaultViews","_defaultUsed","_caseCount","_lastCaseCheckIndex","_lastCasesMatched","ngSwitch","_ngSwitch","_updateDefaultCases","_addCase","_addDefault","_matchCase","matched","useDefault","NgSwitchCase","_view","ngSwitchCase","NgSwitchDefault","NgStyle","_ngStyle","ngStyle","_setStyle","nameAndUnit","RendererStyleFlags2","DashCase","removeStyle","forEachRemovedItem","forEachAddedItem","forEachChangedItem","NgTemplateOutlet","_viewRef","ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector","_shouldRecreateView","viewContainerRef","viewContext","_createContextForwardProxy","receiver","invalidPipeArgumentError","SubscribableStrategy","createSubscription","updateLatestValue","untracked","dispose","PromiseStrategy","_promiseStrategy","_subscribableStrategy","_latestValue","markForCheckOnValueUpdate","_subscription","_obj","_strategy","_dispose","_selectStrategy","_updateLatestValue","ɵisPromise","ɵisSubscribable","LowerCasePipe","unicodeWordMatch","TitleCasePipe","UpperCasePipe","KeyValuePipe","differs","keyValues","compareFn","defaultComparator","differ","differChanges","compareFnChanged","forEachItem","makeKeyValuePair","keyValueA","keyValueB","aString","bString","DecimalPipe","_locale","isValue","formatNumber","strToNumber","PercentPipe","formatPercent","SlicePipe","supports","PLATFORM_BROWSER_ID","PLATFORM_SERVER_ID","ViewportScroller","ɵɵdefineInjectable","BrowserViewportScroller","NullViewportScroller","setOffset","scrollX","scrollY","scrollToPosition","scrollToAnchor","elSelected","findAnchorFromDocument","documentResult","getElementsByName","createTreeWalker","treeWalker","NodeFilter","SHOW_ELEMENT","currentNode","nextNode","setHistoryScrollRestoration","scrollRestoration","pageXOffset","pageYOffset","anchor","XhrFactory","AnimationMetadataType","Transition","Sequence","Animate","Keyframes","Style","Trigger","Reference","AnimateChild","AnimateRef","Query","Stagger","AUTO_STYLE","definitions","timings","sequence","tokens","keyframes","stateChangeExpr","expr","NoopAnimationPlayer","_onDoneFns","_onStartFns","_onDestroyFns","_originalOnDoneFns","_originalOnStartFns","_started","_destroyed","_finished","_position","parentPlayer","totalTime","_onFinish","onStart","onDone","hasStarted","play","_onStart","triggerMicrotask","queueMicrotask","pause","restart","finish","setPosition","getPosition","triggerCallback","phaseName","methods","AnimationGroupPlayer","_players","players","doneCount","destroyCount","startCount","player","_onDestroy","timeAtPosition","longestPlayer","longestSoFar","beforeDestroy","ɵPRE_STYLE","isServiceCatalogService","displayName","mapPassengersToAncillaries","bookingSummaryAncillaryKey","associatedInfant","associatedInfantName","mapping","asCartId","isGroupService","mapSelectionStatusToServices","userSelection","mapSelectionStatusToService","isNoVariant","NO_VARIANTS","selectedQuantity","mapServicePriceToSelection","matchingService","selectionsForCategory","categoryName","selectionsForFragment","selectionsForTraveler","BlockSelectionComponent","AbstractCheckboxComponent","checkedState","focusedState","disabledState","hostTabindex","interactionEvent","BlockSelectionComponent_fcom_icon_5_Template","BookingPlainHeaderAreaComponent","headingClass","enableBottomPadding","enableTopPadding","BookingPlainHeaderAreaComponent_p_3_Template","BookingPlainHeaderAreaComponent_p_4_Template","GenericIconComponent","_iconRef","iconService","addIcon","argsOrArgArray","payments","adyenpaymentcard","aktia","alandsbanken","alipay","amex","applepay","arbejdernes","barclays","citadele","cooppank","danskebank","dinersclub","dnb","giropay","handelsbanken","hsbcuk","ideal","indianetbanking","indiawallet","jcb","jyskebank","klarna","lansforsakringar","lhvpank","lloydsbank","luminor","lunarbank","mastercard","mobilepay","natwest","nordea","nykreditbank","omasp","paypal","poppankki","revolut","rupay","saastopankki","santanderuk","sbanken","seb","sofort","spankki","sparebank1no","sparebank1sm","sparebankost","swedbank","swish","trustly","uatp","unionpay","upi","vipps","visa","wechatpay","alert","b2b","backpack","beer","bike","blog","breakfast","brightness","bus","camera","car","cargo","checklist","checkmark","clock","co2","coffee","corrosives","couple","discount","dog","donation","download","edit","eight","explosives","facebook","facemask","family","finland","five","food","four","games","golf","headphones","help","home","hotel","instagram","insurance","keyboard","lavatory","legislation","lighters","linkedin","locker","logout","lounge","magazines","meal","milestone","minimise","more","movies","multistop","music","night","nine","one","parking","person","pet","poison","power","qrcode","radioactive","reservation","saf","scooter","seafood","security","seven","shower","six","skis","smoking","snacks","star","stopover","subtitles","surfboard","sustainability","tablet","taxi","tazer","tea","three","tiktok","timetable","train","trash","treats","twitter","two","upgrade","upload","volume","voucher","water","wechat","weibo","wellbeing","whatsapp","wifi","wine","youku","youtube","zero","tail_3k","tail_6i","tail_9w","tail_a3","tail_aa","tail_ab","tail_af","tail_ai","tail_as","tail_at","tail_ay","tail_az","tail_b6","tail_ba","tail_br","tail_bt","tail_bus","tail_ca","tail_ci","tail_cx","tail_cz","tail_dx","tail_ei","tail_ek","tail_et","tail_fi","tail_fj","tail_ga","tail_gl","tail_ho","tail_hu","tail_ib","tail_ig","tail_jl","tail_jp","tail_jq","tail_ju","tail_ka","tail_ke","tail_kl","tail_km","tail_la","tail_lg","tail_lh","tail_lm","tail_lo","tail_lx","tail_mh","tail_mi","tail_mu","tail_nt","tail_nz","tail_ok","tail_oo","tail_os","tail_ou","tail_oz","tail_pg","tail_pr","tail_ps","tail_qf","tail_qr","tail_rj","tail_s7","tail_sb","tail_sk","tail_sn","tail_sq","tail_su","tail_sv","tail_tf","tail_tg","tail_tk","tail_tn","tail_tp","tail_trn","tail_uk","tail_ul","tail_vn","tail_wf","tail_wy","mobile","desktop","errorContext","cb","isRoot","mapFn","redirectToJoin","LoginWidgetComponent_div_3_fin_profile_quick_view_7_Template","LoginWidgetComponent_div_3_div_9_Template","darkBg$","CLOSE_DELETE","LoginWidgetContext","PORTAL","darkBackgroundTiers","widgetInDom$","popoverOpen$","onOpenGtmEvent","joinDialogOpen$","clickout","LoginWidgetComponent_div_3_Template","exhaustMap","innerSub","outerValue","headerClass","title_r3","SustainabilityReviewCardComponent_ng_container_1_h2_1_Template","SustainabilityReviewCardComponent_ng_container_1_h2_4_Template","SustainabilityReviewCardComponent_ng_container_1_p_5_Template","trackReadAboutSustainability","SustainabilityReviewCardComponent_ng_container_1_ng_template_26_Template","showHeader","isLinkExternal","contentTooltip_r5","SustainabilityReviewCardComponent","towardsSustainabilityMessage$","SustainabilityReviewCardComponent_ng_container_1_Template","defer","observableFactory","ElementTrackerDirective","eventSubject","eventObservable","finElemType","finElemTracker","finElemContext","NO_CONTEXT","finElemState","TextInputType","TEXTAREA","PASSWORD","NUMBER","SQUARE","CursorType","POINTER","IconsConfig","OffersChangesService","FindAirBoundsChangePath","findAirBoundsChange$Response","findAirBoundsChange","FindAirCalendarChangePath","findAirCalendarChange$Response","findAirCalendarChange","OffersMultiService","FindMoreFlightsPath","findMoreFlights$Response","findMoreFlights","FindMultiOfferListPath","findMultiOfferList$Response","findMultiOfferList","OffersSelfReaccService","DisruptionAlternativeOffersPath","disruptionAlternativeOffers$Response","boundSearchDate","secondBoundSearchDate","disruptionAlternativeOffers","OffersService","FindAirBoundsPath","findAirBounds$Response","FindAirCalendarPath","findAirCalendar$Response","FindOfferListPath","findOfferList$Response","REGISTERED_ACTION_TYPES","defineType","_as","_p","creators","createActionGroup","actionGroup","toActionName","toActionType","emptyProps","word","uncapitalize","ActionsSubject","ACTIONS_SUBJECT_PROVIDERS","_ROOT_STORE_GUARD","_INITIAL_STATE","INITIAL_STATE","REDUCER_FACTORY","_REDUCER_FACTORY","INITIAL_REDUCERS","_INITIAL_REDUCERS","STORE_FEATURES","_STORE_REDUCERS","_FEATURE_REDUCERS","_FEATURE_CONFIGS","_STORE_FEATURES","_FEATURE_REDUCERS_TOKEN","FEATURE_REDUCERS","USER_PROVIDED_META_REDUCERS","META_REDUCERS","_RESOLVED_META_REDUCERS","USER_RUNTIME_CHECKS","_USER_RUNTIME_CHECKS","ACTIVE_RUNTIME_CHECKS","_ACTION_TYPE_UNIQUENESS_CHECK","combineReducers","reducerKeys","finalReducers","finalReducerKeys","hasChanged","previousStateForKey","nextStateForKey","functions","composed","createReducerFactory","reducerFactory","metaReducers","ReducerObservable","ReducerManagerDispatcher","ReducerManager","currentReducers","dispatcher","addFeature","feature","addFeatures","reducerDict","createFeatureReducerFactory","addReducers","removeFeature","removeFeatures","removeReducers","addReducer","an","updateReducers","removeReducer","featureKey","featureKeys","omit","keyToRemove","ln","REDUCER_MANAGER_PROVIDERS","ScannedActionsSubject","SCANNED_ACTIONS_SUBJECT_PROVIDERS","StateObservable","actions$","reducer$","scannedActions","stateAndAction$","queueScheduler","reduceState","stateSubscription","stateActionPair","STATE_PROVIDERS","Store","actionsObserver","reducerManager","pathOrMapFn","selectSignal","operator","STORE_PROVIDERS","propsOrPath","source$","mapped$","pathSlices","RUNTIME_CHECK_URL","isObjectLike","_ngrxMockEnvironment","isNgrxMockEnvironment","isEqualCheck","defaultMemoize","projectionFn","isArgumentsEqual","isResultEqual","overrideResult","lastArguments","lastResult","memoized","isArgumentsChanged","comparator","newResult","setResult","clearResult","createSelectorFactory","stateFn","defaultStateFn","isSelectorsDictionary","extractArgsFromSelectorsDictionary","selectorsDictionary","resultKeys","projector","selectorResults","memoizedSelectors","memoizedProjector","memoizedState","featureName","featureState","_createStoreReducers","_createFeatureStore","configs","featureStores","feat","_createFeatureReducers","reducerCollection","_initialStateFactory","_concatMetaReducers","userProvidedMetaReducers","_provideForRootGuard","skipSelf","freeze","targetIsFunction","propertyName","propValue","isFrozen","getUnserializable","isComponent","isNumber","isBoolean","targetPrototype","throwIfUnserializable","unserializable","unserializablePath","createActiveRuntimeChecks","runtimeChecks","strictStateSerializability","strictActionSerializability","strictStateImmutability","strictActionImmutability","strictActionWithinNgZone","strictActionTypeUniqueness","createSerializationCheckMetaReducer","serializationCheckMetaReducer","checks","ignoreNgrxAction","createImmutabilityCheckMetaReducer","immutabilityCheckMetaReducer","act","createInNgZoneCheckMetaReducer","inNgZoneAssertMetaReducer","isInAngularZone","provideRuntimeChecks","useFactory","_runtimeChecksFactory","deps","checkForActionTypeUniqueness","_actionTypeUniquenessCheck","duplicates","registrations","_provideStore","Inject","_provideState","featureNameOrSlice","StoreRootModule","scannedActions$","guard","actionCheck","StoreFeatureModule","featureReducers","feats","types","ons","existingReducer","newReducer","AbstractNgModelComponent","pDisabled","dis","pValue","notifyValueChange","onChange","writeValue","registerOnChange","registerOnTouched","onTouched","setDisabledState","pReadOnly","pRequired","pType","NgControl","valueAccessor","offerData$","ClickOutsideDirective","clickOutsideException","fcomClickOutside","click$","focusState$","isFocused","exceptionInPath","pathElem","localName","videoTitle$","iframeVisible$","iframe_r4","videoFinalUrl$","VideoComponent_ng_template_10_iframe_0_Template","sanitizer","showPopup","noMargin","previewVisible$","videoId$","videoId","bypassSecurityTrustResourceUrl","youtubePreviewPicture$","thumbnailSrc","fullSizeUrl","playVideo","VideoComponent_span_8_Template","VideoComponent_fcom_modal_9_Template","VideoComponent_ng_template_10_Template","YOUTUBE","FormErrorComponent","PROTOCOL_AND_HOST_REGEX","ISO_639_1_LANG_REGEX","getLangCode","PageMetaService","titleService","metaService","linksReplaySubject$","linksForUrlReplaySubject$","pageTitle$","pageDescription$","pageDefaultOriginLocationCode$","allowableLocales","setTitle","setDescription","setHref","hreflang","cmspage","removeExistingMetaTags","removeTag","setDefaultOriginLocationCode","defaultOriginLocationCode","setMetaTags","removePreviousCmsPageTagsFromHeader","replaceHostnameAndProtocol","linksForUrl","moveMetaAndLinksToHead","elems","removeNotAllowedHreflangs","getLinksFromMetadata","movePreloadImageLinksToHead","removePreloadImageLinksFromHead","setDocumentLanguage","getDocumentElement","setProperty","getNamedItem","allowedLanguage","verifyHreflang","langFromHrefLang","returnString","NotificationComponent_div_1_ng_container_2_Template","wrappedContentTpl_r1","compact","displayedIcon","secondaryLinkClick","secondaryLinkUrl","secondaryLinkOpenInNewWindow","secondaryLinkText","linkClick","NotificationComponent_ng_template_2_ng_container_6_div_1_fcom_link_3_Template","linkUrl","linkOpenInNewWindow","NotificationComponent_ng_template_2_ng_container_6_div_2_ng_container_1_Template","buttonStyle","linkButtons_r6","ctaButtons_r5","NotificationComponent_ng_template_2_ng_container_6_div_1_Template","NotificationComponent_ng_template_2_ng_container_6_div_2_Template","closeClick","closeIcon","closeAriaLabel","CAMPAIGN","NotificationComponent_ng_template_2_fcom_icon_1_Template","NotificationComponent_ng_template_2_span_4_Template","NotificationComponent_ng_template_2_ng_container_6_Template","NotificationComponent_ng_template_2_fcom_loader_7_Template","NotificationComponent_ng_template_2_div_8_Template","removePadding","horizontal","isLoading","isClosable","NotificationComponent_ng_template_4_fcom_button_0_Template","NotificationComponent_ng_template_6_fcom_link_0_Template","SUSTAINABILITY","EDGE_TO_EDGE","OVERLAY","NotificationComponent","hostClass","excludeColumns","getDefaultIconForTheme","notificationStyle","shadow","ALERT_TRIANGLE","NotificationComponent_div_1_Template","NotificationComponent_ng_template_2_Template","NotificationComponent_ng_template_4_Template","NotificationComponent_ng_template_6_Template","EMPTY_MENU","LoyaltyNavigationService","currentRoute$","routerEvent","NavigationEnd","getMenuItemsForProfileType","fetchMenu","getActiveMenuItemTitle","fragmentUrl","menuJson","currentRoute","_bookingWidgetState","_bs","bookingWidget","_instantSearchMonitoringSelector","_bw","instantSearchMonitoring","_airCalendarPrices","_fullYearPrices","bw","_followingMonthPrices","followingMonth","_histogramPrices","histogram","airCalendar","_warningSelector","warnings","_activeTabSelector","airCalendarPrices","ClientOnlyDirective","finClientOnly","clientOnly","updateView","DurationPipe","dur","linkTranslationKeys","i_r2","OndMarketingRibbonComponent","OndMarketingRibbonComponent_li_2_Template","LinkTheme","LIGHT","DARK","purchasedTSMS","checkouts","filterServices","pending","getLastPaidPrices","lastCheckoutId","checkout","pricesForCategory","sortOrder","originalTotalAmount","originalTotal","getCategoryServices","ancillaryCategory","showTravelExtrasTitle","hasSaf","hasOtherAncillaries","passengerHasSaf","passengerHasOtherServices","trackFormState","formName","FORM","disableConditionalFields","fieldSet","enableConditionalFields","isPnrCode","createQueryString","AUTOCOMPLETE_DEBOUNCE_TIME","getCountryOptions","defaultOption","heading$","defaultSort","sortOffers","OndMarketingOffersListComponent_div_0_div_3_option_2_Template","options_r4","i_r6","offerAmount","moreOffersAmount","dynamicAnimationDisabled","ondOffer_r5","originCityName","destinationCityName","OndMarketingOffersListComponent_div_0_h2_1_Template","OndMarketingOffersListComponent_div_0_div_3_Template","OndMarketingOffersListComponent_div_0_div_6_Template","sortOptions$","ondOffers$","loadMoreOffers","OfferListSortBy","PRICE_ASC","PRICE_DESC","OndMarketingOffersListComponent","sortBy$","notSortedOffer$","getOffersOrFlightData","getHeading","getSortOptions","sortByValues","translationKeys","labels","OndMarketingOffersListComponent_div_0_Template","OndMarketingOffersListComponent_div_2_Template","GetIntrinsic","callBound","getSideChannelMap","$WeakMap","$weakMapGet","$weakMapSet","$weakMapHas","$weakMapDelete","$wm","$m","promote_r3","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_6_div_1_Template","openLogin","moveToStep","JoinFlowStep","CONTACT_DETAILS","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_9_span_15_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_9_button_19_Template","basicInfoForm","basicInfoFormBirthDate","availableDays$","availableMonths$","availableYears$","isJunior_r6","continueBtn_r7","termsAndPolicy_r9","contactDetailsForm","GUARDIAN_DETAILS","MARKETING_CONSENT","email$","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_10_ng_container_19_Template","contactDetailsFormPhone","countryOptions","contactDetailsFormPassword","EMAIL_VEFIFICATION","guardianInfoForm","guardianInfoFormPhone","consent_r12","consentTextId","marketingConsentForm","first_r13","last_r14","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_form_4_fcom_checkbox_4_Template","consentGroup_r15","introductionText","consentTexts","afterwordText","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_fcom_notification_2_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_form_4_Template","apiStatus$","ApiStatus","JOIN_ERROR","consentTextsGroup$","closeError","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_13_fcom_notification_2_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_13_fcom_notification_4_Template","resend","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_13_fcom_notification_17_Template","RESEND_SUCCESS","RESEND_ERROR","verificationEmailSentText$","resendLimitReached$","readMore","_c16","_c15","openStep","goBack","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_6_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_p_7_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_9_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_10_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_11_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_12_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_13_Template","JoinFormComponent_ng_container_0_fin_login_form_container_1_ng_container_14_Template","currentStep_r19","JOIN_COMPLETE","stepperSteps$","stepperIndex$","currentStep$","stepTranslations$","BASIC_INFO","JoinFormComponent_ng_container_0_fin_login_form_container_1_Template","login_r21","_r20","_c17","label_r23","disabled_r22","loading_r25","icon_r24","control_r28","contentUrl_r26","stepToPreviousStep","JOIN_SUCCESS","toasterService","resend$","getDays","yearControl","monthControl","passwordMatchValidator","pristine","phoneValidator","ageValidator","tooYoung","countryCodes$","confirmPwd","guardianName","guardianEmail","guardianPhoneNumber","guardianMemberNumber","consent","getMarketingConsentTexts","createMarketingConsentForm","dateOfBirth$","isJunior$","junior","currentStep","NavigationStart","unsanitizedEmail","sanitize","SecurityContext","HTML","resendStatus$","resendAccountVerificationEmail","skip","maxResendCount","trackEvent","isJunior","signUpData","responseData","trackDataCloud","showErrorAndClose","stepperStep","previousStep","consents","consentFields","fields","enrollmentChannel","agreements","marketingPermissions","addMessageToQueue","contentKey","elementType","signupPaxDetails","emailAddress","memberProgram","JoinFormComponent_ng_container_0_Template","JoinFormComponent_ng_template_2_Template","JoinFormComponent_ng_template_4_Template","scaleImage","mappedImage$","icon_r2","RichTextComponent_ng_container_6_div_1_fcom_icon_1_Template","icons_r3","t_r4","headerStyles","RichTextComponent_ng_container_6_div_1_Template","RichTextComponent_ng_container_6_ng_template_3_Template","plainTextTitle_r5","ddsLocale","contentHtml","parsedContent","media$","mappedSegment","RichTextComponent_div_4_Template","RichTextComponent_ng_container_6_Template","styleClasses$","$Object","$Error","$EvalError","$RangeError","$ReferenceError","$SyntaxError","$URIError","$Function","getEvalledConstructor","expressionSyntax","$gOPD","$defineProperty","throwTypeError","ThrowTypeError","hasSymbols","getProto","$ObjectGPO","$ReflectGPO","$apply","needsEval","TypedArray","INTRINSICS","__proto__","AggregateError","ArrayBuffer","Symbol","iterator","Atomics","BigInt","BigInt64Array","BigUint64Array","DataView","decodeURI","eval","Float16Array","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","WeakRef","errorProto","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","$strSlice","$exec","rePropName","reEscapeChar","getBaseIntrinsic","allowMissing","alias","intrinsicName","quote","subString","stringToPath","intrinsicBaseName","intrinsic","intrinsicRealName","skipFurtherCaching","isOwn","desc","enableBenefitChanges$","benefitWithIcon","childBenefit_r2","BenefitComponent_div_14_ng_container_1_div_1_Template","BenefitComponent_div_14_ng_container_1_Template","BenefitComponent","isKoreanColor","hasChildren","extendWithIcon","koreanColoredBenefits","BENEFITS_ICON_MAP","BenefitComponent_div_13_Template","BenefitComponent_div_14_Template","SchemaComponent","htmls$","schemas","schema","getSafeHTML","html","bypassSecurityTrustHtml","SchemaComponent_div_0_Template","DatePickerLocalizationService","MatDatepickerIntl","attachTranslations","calendarLabel","openCalendarLabel","prevMonthLabel","nextMonthLabel","prevYearLabel","nextYearLabel","prevMultiYearLabel","nextMultiYearLabel","switchToMonthViewLabel","switchToMultiYearViewLabel","dayMonthYearFormat","DEFAULT_MONTH_NAMES","short","narrow","DEFAULT_DAY_OF_WEEK_NAMES","SUPPORTS_INTL_API","CustomDateAdapter","splitDateRegex","stripDirectionalityCharacters","intFormat","DatepickerComponent_div_18_span_1_Template","DatepickerComponent_div_18_span_2_Template","DatepickerComponent_div_18_span_3_Template","DatepickerComponent_div_18_span_4_Template","matDatepickerMax","matDatepickerMin","selectedDay","selectedMonth","selectedYear","DatepickerTheme","WEB_2","DatepickerComponent","placeHolder","BOOK_FLIGHT","signalSelection","eventValue","DatepickerComponent_span_7_Template","DatepickerComponent_span_11_Template","dp_r2","DatepickerComponent_div_18_Template","DatepickerComponent_span_20_Template","LISTING","FROM","FROM_COUNTRY","COUNTRY_TO_COUNTRY","closingNotifier","currentBuffer","ATTACHMENT_ALLOWED_FILE_EXTENSIONS","ATTACHMENT_MAX_SIZE_IN_BYTES","MAX_ATTACHMENTS_5","MAX_ATTACHMENTS_10","TEXTAREA_LIMIT_100","TEXTAREA_LIMIT_1000","TEXTAREA_LIMIT_3000","observable","isSubscriber","isObserver","_trySubscribe","sink","promiseCtor","getPromiseCtor","operations","toPromise","disruptedLabel","fareBrand","showDivider","FlightCardComponent_span_5_Template","FlightCardComponent_span_6_Template","FlightCardComponent_fcom_tag_7_Template","FlightCardComponent_div_9_Template","classnames_r3","DynamicRouteComponent_ng_template_4_fin_cms_json_content_0_Template","hasContent$","spinner_r4","DynamicRouteComponent_ng_container_9_cms_destination_1_Template","DynamicRouteComponent_ng_container_10_cms_editorial_main_page_1_Template","DynamicRouteComponent_ng_container_11_cms_editorial_category_page_1_Template","DynamicRouteComponent_ng_container_12_fin_render_lazy_wizard_1_Template","DynamicRouteComponent_ng_container_13_cms_emergency_in_operations_1_Template","noGridLayout_r5","page$","DynamicRouteComponent_ng_container_17_cms_child_page_1_Template","DynamicRouteComponent_ng_container_18_cms_child_page_1_Template","DynamicRouteComponent_ng_container_21_fin_cms_json_content_1_Template","DynamicRouteComponent_ng_container_22_fin_qualtrics_embedded_page_feedback_1_Template","breadcrumbService","path$","linkListener","linkHandler","getUrlWithoutQueryParams","translation$","cmsPage","navigationPathList","oneworld","setOneworldLink","isHeaderVisible","setHeaderVisibility","isFooterVisible","setFooterVisibility","masterContentId","renderSwitch$","SECTION_PAGE_EXTERNAL_TEMPLATE","navigationContentType","FIDestination","DESTINATION_PAGE","mapToRenderSwitch","enablePageFeedback","trackTargetBlank","DynamicRouteComponent_ng_template_0_Template","DynamicRouteComponent_cms_page_2_Template","DynamicRouteComponent_ng_template_4_Template","DynamicRouteComponent_ng_container_8_Template","DynamicRouteComponent_ng_container_9_Template","DynamicRouteComponent_ng_container_10_Template","DynamicRouteComponent_ng_container_11_Template","DynamicRouteComponent_ng_container_12_Template","DynamicRouteComponent_ng_container_13_Template","DynamicRouteComponent_ng_container_14_Template","DynamicRouteComponent_ng_container_15_Template","DynamicRouteComponent_ng_container_16_Template","DynamicRouteComponent_ng_container_17_Template","DynamicRouteComponent_ng_container_18_Template","DynamicRouteComponent_ng_container_19_Template","DynamicRouteComponent_ng_container_20_Template","DynamicRouteComponent_ng_container_21_Template","DynamicRouteComponent_ng_container_22_Template","DynamicRouteComponent_span_24_Template","FORM_WIZARD_PAGE","BLUEWINGS_CLUSTER_LP","CHILD_PAGE","CHILD_PAGE_NO_HEADING","NO_GRID_FULL_WIDTH_PAGE","NO_GRID_FULL_WIDTH_PAGE_WITH_TITLE","fillParent","imageData_r1","scale","maxImageWidth","fetchPriority","isLazyLoad","ContentImageComponent_ng_container_0_fcom_image_1_Template","ContentImageComponent","IMAGE_WIDTHS","ContentImageComponent_ng_container_0_Template","_createBookingSummaryBound","boundFareInformation","it","_selectedOfferSummaryProjector","flightOffers","currentOffer","selectedFareFamilyCode","journeyDirection","boundWithFareFamilyDetails","_selectedOfferOutboundSummary","currentOffersSelector","currentOfferSelector","selectedOutboundIdSelector","fareFamiliesSelector","selectedOutboundFareFamilyCodeSelector","_selectedOfferInboundSummary","selectedInboundIdSelector","selectedInboundFareFamilyCodeSelector","_selectedAirBoundSummaryProjector","fareFamilyId","boundFareFamily","enrichedBound","_selectedAirBoundOutboundSummary","_selectedAirBoundInboundSummary","_cartOfferSummaries","cartDataSelector","cartBoundToBookingSummaryBound","_airBoundSummaries","_offerSummaries","_currentOfferSelection","cartOfferSummaries","airBoundSummaries","offerSummaries","bookingSummaryBounds","_currentPassengers","paxDetailTravelerSelector","paxDetail","paxDetailFormToBookingSummaryTraveler","allPassengers","travelling","formatDateOfBirth","currentOfferSelection","currentPassengers","combinedCartServicesMap","LocationsService","locationAlreadyInStore","saveLocation","retrieveAllLocations","oldDestination","hexTable","arrayToObject","plainObjects","queue","refs","compactQueue","compacted","defaultDecoder","strWithoutPlus","unescape","defaultEncoder","$0","allowPrototypes","mergeTarget","targetItem","UPGRADE_FEATURE_KEY","BREADCRUMBS","Stage","PASSENGERS","WAITLIST_CUTOFF","FINNAIR_LIKE_AIRLINECODES","OFFERS_V2_TIMEOUT","MANAGE_BOOKING_FEATURE_KEY","OPEN_TRAVEL_PREPARATIONS_NOTIFICATION","CANCEL_APIS_UPDATE","FULL_APIS_UPDATE","PARTIAL_APIS_UPDATE","ERROR_APIS_UPDATE","USER_OTHER_ADDRESS_APIS","mapToGaString","carTrawlerSmartBlockConfig","partnerName","CTProduct","CarTrawlerClientID","MMB_TRIP_DETAILS_FIRST_24H","MMB_CAR_RENTAL_AIRPORT_TRANSFERS","MMB_ANCILLARY_CONFIRMATION_PAGE","MMB_CHECK_IN_CONFORMATION","pnrFormatValidator","TICKET_PATTERN","softTicketNumberValidator","strippedValue","frequentFlyerValidator","dateValidator","locationFormatValidator","forbiddenFormat","ibanValidator","bicValidator","Portal","attach","_attachedHost","detach","isAttached","setAttachedHost","ComponentPortal","componentFactoryResolver","projectableNodes","TemplatePortal","DomPortal","BasePortalOutlet","_isDisposed","attachDomPortal","hasAttached","_attachedPortal","portal","attachComponentPortal","attachTemplatePortal","_invokeDisposeFn","setDisposeFn","_disposeFn","DomPortalOutlet","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","anchorNode","createComment","insertBefore","replaceChild","componentFactory","resolveComponentFactory","componentRef","Injector","NULL","attachView","hostView","viewCount","detachView","_getComponentRootNode","viewRef","rootNodes","CdkPortalOutlet","attached","_getRootNode","attachedRef","_attachedRef","nodeType","ELEMENT_NODE","Vt3","PortalModule","FrontPageComponent","feedbackService","FEEDBACK","imageUrl$","DESCRIPTION","META_TAGS","SelectLanguageComponent","TITLE","getCountryStates","mapCountryLanguageLinks","langCode","localizedCmsPageUrl","parseLocalizedPathFromUrl","everythingBeforeLangCode","teaser","responsiveImageLinksData","portrait_ratio1x1","LANDING_PAGE","subj$","SelectLanguageComponent_div_9_Template","FilterAction","ADD","REMOVE","REMOVE_ALL","DestinationSearchViewStyle","TILES","DESTINATIONSBYORIGIN","DestinationSearchQueryParams","maxPrice","roundTripPrices","PriceLoadingState","LOADED","selectedCabinClassId","CabinClassModalComponent_div_0_ng_container_11_ng_container_5_Template","availableCabinClasses$","CabinClassModalComponent_div_0_ng_container_7_Template","CabinClassModalComponent_div_0_ng_container_11_Template","cabinClassModalOpen","CabinClassModalComponent","templateService","cabinClasses$","cmsMap","getCollectionUrl","CabinClassModalComponent_div_0_Template","FRONT_PAGE","GtmEcommerceMeasurement","IMPRESSIONS","DETAIL","GtmEcommerceList","BOOKING_SMP","MMB_VIEW_PNR","VOLUNTARY_CHANGE_FLIGHT_SELECTION","Ga4AncillaryType","UPGRADE","Ga4UpgradeWaitlist","NOT_WAITLISTED","MOBILE_MAIN_NAVIGATION","CANCEL_BOOKING","CHANGE_FLOW_FLIGHT_SELECTION","CHATTER_MESSAGE_FORM","DESTINATION_MAIN_PAGE","DISRUPTION","CORPORATE_PORTAL","REACCOMMODATION","REFUNDS","RETRIEVE_CASE_FORM","SEAT_MAP","THIRD_PARTY_ANCILLARY","UPGRADE_AVAILABILITY_SEARCH","WIZARD_CASE_FORM","CHAT","UpgradePaymentType","ECOPREMIUM_CASH","BUSINESS_CASH","ECOPREMIUM_SHORT_HAUL_VOUCHER","BUSINESS_SHORT_HAUL_VOUCHER","ECOPREMIUM_LONG_HAUL_VOUCHER","BUSINESS_LONG_HAUL_VOUCHER","ECOPREMIUM_POINTS","BUSINESS_POINTS","ECOPREMIUM_COMPLIMENTARY","BUSINESS_COMPLIMENTARY","UpgradePaymentShortType","CASH","VOUCHER","POINTS","COMPLIMENTARY","VISIBILITY_CHANGE","PAGE_VIEW","ORIGINAL_LOCATION","PRE_FLIGHT_SEARCH","FLIGHT_SEARCH","FLIGHT_SELECTION_VIEW","FLIGHT_SELECTION_CLICK","FLIGHT_CART_CHECKOUT","MULTICITY_TICKET_TYPE_OPTIONS","ADD_SERVICES","REMOVE_SERVICES","PRODUCT_IMPRESSIONS","PRODUCT_CLICK","PRODUCT_DETAIL","ORDER","TRANSACTION","TRANSACTION_MANAGE_BOOKING","UI_EVENT","FLOW_DATA","TIMING","DESTINATION_PROMOTION","NATIVEAPP_SESSION","CONSENTS","LOGIN","UPGRADE_PURCHASE","INTERNAL_PROMOTION_VIEW","INTERNAL_PROMOTION_CLICK","SITE_SEARCH","SITE_SEARCH_CLICKED","PURCHASE","ADD_TO_CART","REMOVE_FROM_CART","VIEW_CART","BEGIN_CHECKOUT","VIEW_ITEM_LIST","SELECT_ITEM","THIRD_PARTY_CLICK","CLEAR_ECOM","CLICK_OUTBOUND","NEWSLETTER_SUBSCRIPTION_COMPLETED","MobileOsType","TAB","SELECT_BOX","SCROLL","SiteSearchEvents","SUGGEST","RESULT_CLICK","SUGGESTION_CLICK","LocationRouteType","AJB","SJB","accountVerificationFinished","loginStatus_r4","handleLoginButtonClick","HeaderComponent_header_0_ng_container_21_fin_login_form_2_Template","loginDialogOpen$","mobileOrTablet$","openLoginWidget","amountOfUpcomingTrips$","scrollToTop","HeaderComponent_header_0_div_55_Conditional_2_Template","HeaderComponent_header_0_div_55_Conditional_4_Template","HeaderComponent_header_0_div_55_span_5_Template","trackingId","item_r13","HeaderComponent_header_0_ng_container_64_button_1_span_3_Template","expandedOrActiveNaviCategory$","activeNaviCategory$","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_ng_container_7_dd_1_span_3_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_ng_container_7_dd_1_fcom_icon_4_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_ng_container_7_dd_1_fcom_icon_5_Template","child_r18","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_ng_container_7_dd_1_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_span_4_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_fcom_icon_5_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_fcom_icon_6_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_ng_container_7_Template","section_r19","HeaderComponent_header_0_ng_container_64_ng_container_7_dl_1_Template","HeaderComponent_header_0_ng_container_64_button_1_Template","HeaderComponent_header_0_ng_container_64_ng_container_7_Template","expandedCategory$","headerGtmClickEvent","HeaderComponent_header_0_ng_container_21_Template","HeaderComponent_header_0_fcom_button_23_Template","HeaderComponent_header_0_div_25_Template","HeaderComponent_header_0_fin_welcome_back_message_28_Template","HeaderComponent_header_0_fin_login_form_30_Template","HeaderComponent_header_0_fin_join_form_33_Template","HeaderComponent_header_0_ng_container_42_Template","clickOutside","toggleNavigation","HeaderComponent_header_0_div_55_Template","HeaderComponent_header_0_ng_container_64_Template","welcomeBackMessageOpen$","MENU_LIST","topMenuItems$","tmp_28_0","UPCOMING_TRIPS_STORAGE_KEY","HeaderComponent","pageService","showBreadcrumbs","isStickyNavTest$","isHeaderVisible$","matchUrlLocalRegex","menuItems","menuItem","activeNaviCategory","pagePath$","navigation","pageHasDisruptions$","getPageDataIfExists","contents","disruptions","cookiePolicy$","cookieConsents$","cg","consentStatus","ConsentStatus","WITHDRAWN","isLandingPage$","routeValue","loginDialogOpen","joinDialogOpen","pageHasDisruptions","cookiePolicy","isLandingPage","openLoginDialog","setExpandedCategory","gtmId","gtmContext","closeLoginDialog","HeaderComponent_header_0_Template","HeaderComponent_fin_breadcrumb_2_Template","BlockScrollStrategy","_viewportRuler","_previousHTMLStyles","_canBeEnabled","_previousScrollPosition","getViewportScrollPosition","htmlStyle","bodyStyle","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","scroll","viewport","getViewportSize","CloseScrollStrategy","_scrollDispatcher","_config","_scrollSubscription","_detach","_overlayRef","overlayRef","stream","scrolled","scrollable","overlayElement","getElementRef","_initialScrollPosition","updatePosition","NoopScrollStrategy","isElementScrolledOutsideView","scrollContainers","containerBounds","isElementClippedByScrolling","scrollContainerRect","RepositionScrollStrategy","scrollThrottle","autoClose","overlayRect","ScrollStrategyOptions","reposition","OverlayConfig","scrollStrategy","panelClass","hasBackdrop","backdropClass","disposeOnNavigation","configKeys","ConnectedOverlayPositionChange","connectionPair","scrollableViewProperties","BaseOverlayDispatcher","_attachedOverlays","OverlayKeyboardDispatcher","_keydownListener","overlays","_keydownEvents","keydownEvents","_isAttached","OverlayOutsideClickDispatcher","_cursorStyleIsSet","_pointerDownListener","_pointerDownEventTarget","_clickListener","_outsidePointerEvents","outsidePointerEvents","_addEventListeners","_cursorOriginalValue","cursor","OverlayContainer","getContainerElement","_createContainer","containerClass","oppositePlatformContainers","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_outsideClickDispatcher","_animationsDisabled","_backdropElement","_backdropClick","_detachments","_locationChanges","_backdropClickHandler","_backdropTransitionendHandler","_disposeBackdrop","_scrollStrategy","_positionStrategy","positionStrategy","backdropElement","hostElement","_previousHostParent","attachResult","_updateStackingOrder","_updateElementSize","_updateElementDirection","onStable","_togglePointerEvents","_attachBackdrop","_toggleClasses","detachBackdrop","detachmentResult","_detachContentWhenStable","_disposeScrollStrategy","backdropClick","detachments","getConfig","updatePositionStrategy","strategy","updateSize","sizeConfig","setDirection","addPanelClass","removePanelClass","getDirection","updateScrollStrategy","minWidth","maxWidth","enablePointer","pointerEvents","showingClass","nextSibling","backdropToDetach","_backdropTimeout","cssClasses","isAdd","backdrop","boundingBoxClass","cssUnitPattern","FlexibleConnectedPositionStrategy","positions","_preferredPositions","connectedTo","_overlayContainer","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_viewportMargin","_scrollables","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_appliedPanelClasses","positionChanges","_validatePositions","_boundingBox","_isInitialRender","_lastPosition","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_viewportRect","_getNarrowedViewportRect","_originRect","_getOriginRect","_overlayRect","originRect","viewportRect","flexibleFits","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","_previousPushAmount","extendStyles","alignItems","justifyContent","lastPosition","withScrollableContainers","scrollables","withPositions","withViewportMargin","margin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","withDefaultOffsetX","withDefaultOffsetY","withTransformOriginOn","_transformOriginSelector","originX","_isRtl","endX","originY","overlayStartX","overlayStartY","overlayX","overlayY","point","rawOverlayRect","overlay","getRoundedBoundingClientRect","_getOffset","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getPixelValue","_pushOverlayOnScreen","overflowRight","overflowBottom","overflowTop","overflowLeft","pushX","pushY","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","scrollVisibility","_getScrollVisibility","_lastScrollVisibility","compareScrollVisibility","isOriginClipped","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","changeEvent","xOrigin","yOrigin","transformOrigin","isRtl","smallestDistanceToViewportEdge","previousHeight","previousWidth","_hasExactPosition","hasExactPosition","hasFlexibleDimensions","_getExactOverlayY","_getExactOverlayX","transformString","horizontalStyleProperty","originBounds","overlayBounds","scrollContainerBounds","overflows","currentOverflow","axis","cssClass","units","clientRect","wrapperClass","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_alignItems","_xPosition","_xOffset","_width","_height","centerHorizontally","centerVertically","parentStyles","shouldBeFlushHorizontally","shouldBeFlushVertically","xPosition","xOffset","marginLeft","marginRight","marginTop","marginBottom","OverlayPositionBuilder","flexibleConnectedTo","nextUniqueId","Overlay","scrollStrategies","_positionBuilder","_injector","_directionality","_animationsModuleType","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","ApplicationRef","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY","OverlayModule","ScrollingModule","ShowForLoginStatusDirective","finShowForLoginStatus","userStatus","$hasOwn","taking","InputFieldComponent","modelName","inputElement","onChangeEvent","InputFieldComponent_span_4_Template","InputFieldComponent_span_8_Template","InputFieldComponent_div_9_Template","handleButtonClick","ErrorComponent","errorParams","getAction","ErrorComponent_button_12_Template","headingInfoClick","headingInfo","BlockSelectionGroupComponent_div_1_div_4_Template","heading","hiddenText","BlockSelectionGroupComponent_div_1_Template","BlockSelectionGroupComponent_span_2_Template","_angular_core__WEBPACK_IMPORTED_MODULE_12__","AUTOMATIC","TOP","componentReference","isPrimaryPax","PrefillSource","CART","setValueIfEmpty","overwrite","markAsTouched","setGroupValueIfEmpty","PassengerFormService","paxValidationService","phonePrefixService","cartData$","selectCartData","sessionData$","selectPaxDetails","createPassengerFormGroup","disabledFields","getLocalPaxIdAndIndex","firstNameInputDisabled","nameRegex","lastNameInputDisabled","birthdayRequired","addControl","createBirthdayGroup","emailValidators","emailRegex","getPassengerYearLimits","typeLocalizationKey","getAvailableDays","prefillData","corporateUser","prefillMap","getPrefillFromOrder","getPrefillFromCart","getPrefillFromProfile","getPrefillFromSession","getPrefillFromCorporate","prefillFromSource","getPrefill","_id","cartOrOrder$","sessionData","matchedPassenger","cartPrefill","formatToDateOfBirth","_paxId","paxDetails","matchedPax","getCountryCodeFromPhonePrefix","parsedMobilePhone","mobilePhone","safeMobilePhone","nationalNumber","regionCode","regionCodes","getFrequentFlyerDetailsFromProfile","safePhonePrefix","workPhone","validator","ageValidation","minBirthDateInclusiveStr","maxBirthDateInclusiveStr","indexInType","indexInTotal","_angular_core__WEBPACK_IMPORTED_MODULE_24__","reflectGetProto","originalGetProto","getDunderProto","wrapAt","endpoint","EndpointTimeComponent","EndpointTimeComponent_div_0_Template","DataCloudService","InputCheckboxComponent","PlusMinusSelectorComponent","onCloseClick","WelcomeBackMessageComponent_div_1_ng_container_2_Template","content_r3","onJoinButtonClick","onLoginButtonClick","WelcomeBackMessageComponent_ng_template_5_ng_container_2_Template","WelcomeBackMessageComponent_ng_template_5_ng_container_3_Template","messageType$","ANONYMOUS","WelcomeBackMessageComponent","personalizationTrackingService","welcomeBackMessageService","showCloseButton","WELCOME_BACK_MESSAGE_CLOSED_KEY","trackGtm","isNotLoggedInFPlusMember","WelcomeBackMessageComponent_div_1_Template","WelcomeBackMessageComponent_ng_template_3_Template","WelcomeBackMessageComponent_ng_template_5_Template","index_r4","bound_r3","clickedBound","FlightSelectionFlightSummaryComponent_button_2_span_6_Template","FlightSelectionFlightSummaryComponent_button_2_span_7_Template","last_r7","listStyle","FlightSelectionFlightSummaryComponent","FlightSelectionFlightSummaryComponent_button_2_Template","LoginIframeComponent","renderIframe$","iframeSrc$","supportedEventTypes","messenger","listenToLoginPostMessages","renderIframeOnLoginTrigger","initSsoLoginSession","handleLoginEvent","nonce","iframeSrc","LoginIframeComponent_iframe_0_Template","consent_r3","marketingPreferencesForm","sendConsents","MarketingPreferencesComponent_fcom_modal_0_ng_container_4_form_2_fcom_checkbox_12_Template","consentGroup_r5","fplusMember","MarketingPreferencesComponent_fcom_modal_0_ng_container_4_fcom_loader_1_Template","MarketingPreferencesComponent_fcom_modal_0_ng_container_4_form_2_Template","MarketingPreferencesComponent_fcom_modal_0_ng_container_4_p_3_Template","MarketingPreferencesComponent_fcom_modal_0_ng_container_4_p_4_Template","consentApiStatus_r6","ConsentApiStatus","NOT_LOADED","SAVED","successButtonUrl_r9","MarketingPreferencesComponent_fcom_modal_0_ng_container_9_fcom_button_1_Template","successButtonUrl$","errorButtonUrl_r11","MarketingPreferencesComponent_fcom_modal_0_ng_container_10_fcom_button_1_Template","errorButtonUrl$","MarketingPreferencesComponent_fcom_modal_0_ng_container_4_Template","MarketingPreferencesComponent_fcom_modal_0_ng_container_8_Template","MarketingPreferencesComponent_fcom_modal_0_ng_container_9_Template","MarketingPreferencesComponent_fcom_modal_0_ng_container_10_Template","consentGroup$","consentPreferencesToken","MarketingPreferencesComponent","consentApiStatus$","accountType$","tokenFromUrl","token$","ConsentTokenType","CAT","authHeaderValue","getMarketingConsents","currentProfile","memberStatus","checkReconsent","reConsentRequired","formData","consentGroup","ACCEPTED","DECLINED","relativeTo","Et","MarketingPreferencesComponent_fcom_modal_0_Template","ProfileQuickViewComponent_div_0_ng_container_2_ng_container_1_Template","fPlusHeader_r3","profile_r2","ProfileQuickViewComponent_div_0_ng_container_3_ng_container_1_Template","corporateHeader_r4","ProfileQuickViewComponent_div_0_ng_container_2_Template","ProfileQuickViewComponent_div_0_ng_container_3_Template","tierDataMap","profile_r6","juniorName","ProfileQuickViewComponent_ng_template_2_ng_container_1_Template","ProfileQuickViewComponent_ng_template_2_ng_container_2_Template","isJuniorMember","awardPoints","profile_r7","userRole","logoutIcon","LOGOUT","popOverClosed","LOGOUT_ID","getLinks","logoutText","withDivider","itemId","originalEvent","inFinnairPlus","PLUS_ROOT","inCorporate","clickOut","ProfileQuickViewComponent_div_0_Template","ProfileQuickViewComponent_ng_template_2_Template","ProfileQuickViewComponent_ng_template_4_Template","LoginFormContainerComponent_ng_template_0_fcom_icon_0_Template","returnBtn_r3","LoginFormContainerComponent_ng_template_2_fcom_icon_0_Template","returnClicked","stepperClicked","steps_r7","StepperTheme","stepperActiveStep$","closeClicked","invertHeaderColors","LoginFormContainerComponent_div_10_button_1_Template","LoginFormContainerComponent_div_10_fcom_stepper_2_Template","LoginFormContainerComponent_div_10_button_3_Template","showLeftIcon","emptyIcon_r10","showIcon_r9","closable","alertNotificationLinkClicked","errorLinkText","bottomMargin","dialogTitle","containerYPos","loginContainer","LoginFormContainerComponent_ng_template_0_Template","LoginFormContainerComponent_ng_template_2_Template","LoginFormContainerComponent_ng_template_4_Template","LoginFormContainerComponent_div_10_Template","LoginFormContainerComponent_fcom_notification_17_Template","loginContainer_r12","connector","resetOnError","resetOnComplete","resetOnRefCountZero","wrapperSource","connection","resetConnection","subject","hasCompleted","hasErrored","cancelReset","resetAndUnsubscribe","conn","handleReset","onSubscriber","MultiCityStatus","PENDING_MORE_FLIGHTS","READY","NO_OFFERS","AmHolidayType","DP","CommonServiceFormsModule","MatAutocompleteModule","MatDatepickerModule","FormArrayComponent","FormInputCheckboxComponent","FormInputTextComponent","LocationsAutocompleteComponent","$Map","$mapGet","$mapSet","$mapHas","$mapDelete","$mapSize","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","mapOneOrManyArgs","isEventTarget","methodName","isNodeStyleEventEmitter","addListener","removeListener","toCommonHandlerRegistry","isJQueryStyleEventEmitter","off","subTarget","label_r2","originalValue_r3","PriceBreakdownComponent_ng_template_0_ng_container_2_Template","PriceBreakdownComponent_ng_template_0_span_4_Template","bold_r6","labelContent_r5","value_r4","ctx_r8","expand_r8","priceLine_r11","pax_r10","showPoints","openTaxModal","PriceBreakdownComponent_fin_expand_2_div_6_ng_template_7_button_0_Template","showTotalTax","labelContent_r13","fee_r14","service_r15","PriceBreakdownComponent_fin_expand_2_div_6_ng_container_11_ng_container_1_Template","PriceBreakdownComponent_fin_expand_2_div_6_ng_container_6_Template","PriceBreakdownComponent_fin_expand_2_div_6_ng_template_7_Template","PriceBreakdownComponent_fin_expand_2_div_6_ng_container_9_Template","PriceBreakdownComponent_fin_expand_2_div_6_ng_container_10_Template","PriceBreakdownComponent_fin_expand_2_div_6_ng_container_11_Template","PriceBreakdownComponent_fin_expand_2_div_6_ng_container_13_Template","showBaseFare","showSubTotals$","PriceBreakdownComponent_fin_expand_2_div_4_Template","PriceBreakdownComponent_fin_expand_2_div_6_Template","last_r17","breakdown_r16","expandOpen","tax_r18","PriceBreakdownComponent_table_9_tr_10_Template","taxModalData","ptc","PriceBreakdownComponent","taxModalOpen","passengers$","prices$","totalPrice$","safeMapObs","closeTaxModal","PriceBreakdownComponent_ng_template_0_Template","PriceBreakdownComponent_fin_expand_2_Template","PriceBreakdownComponent_cms_unstyled_fragment_7_Template","PriceBreakdownComponent_table_9_Template","clearSelectionOnDestroy","useCustomTrigger","PseudoLocalActions","openState$","ExpandComponent_button_0_Template","o$","getSideChannelList","makeChannel","$channelData","FlightsModule","TagModule","UnifiedFlightObjectComponent","text_r3","forceRemainOpen","modalButton_r4","modalButtonContinueCancel_r5","ModalComponent_ng_template_2_ng_container_1_Template","ModalComponent_ng_template_2_ng_container_2_Template","ModalComponent_ng_template_2_ng_container_3_Template","ModalComponent_ng_template_2_ng_container_4_Template","ModalComponent_ng_template_2_ng_container_5_Template","buttons","onConfirm","confirmTranslationKey","confirmEnabled","ModalComponent_ng_template_6_footer_12_ng_container_2_Template","buttonTmpl_r9","overlayClickable","overlayClick","ModalComponent_ng_template_6_h2_5_Template","ModalComponent_ng_template_6_button_6_Template","ModalComponent_ng_template_6_footer_12_Template","fullHeightMobile","fitToContent","fullHeight","extraWide","modalService","roundedContent","onCloseEvent","ModalComponent_div_8_ng_container_1_Template","modalContent_r11","ModalComponent","_open","_forceRemainOpen","_lastAttemptedState","_openState","modalOverlay","modalId","closeOnContinue","confirm","focusTarget","modalHeading","elRef","ModalComponent_ng_template_0_Template","ModalComponent_ng_template_2_Template","ModalComponent_ng_template_4_Template","ModalComponent_ng_template_6_Template","ModalComponent_div_8_Template","elementIsVisible","includeVisuallyHidden","findFirstFocusableElement","isNestedArray","i_r1","removeFormGroup","compressedList","displayLabels","FormArrayComponent_ng_container_2_div_1_div_1_Template","FormArrayComponent_ng_container_2_div_1_ng_container_2_Template","FormArrayComponent_ng_container_2_div_1_fcom_button_3_Template","group_r5","minGroups","FormArrayComponent_ng_container_2_div_1_Template","addFormGroup","formArray","maxGroups","focusToButton$","formGroupOptions","formGroupConfig","removeAt","contentQueries","dirIndex","FormArrayComponent_ng_container_2_Template","FormArrayComponent_div_3_Template","invalidEmail","invalidMemberNumber","invalidUserName","CmsUnstyledTeaserComponent","CmsUnstyledTeaserComponent_h3_1_Template","CmsUnstyledTeaserComponent_div_3_Template","isLaptopUp","isSpecialUpsellProduct","ProductCardComponent_Conditional_1_Conditional_9_Conditional_0_Conditional_4_Template","productTagTheme","productTagIcon","productTagText","ProductCardComponent_Conditional_1_Conditional_9_Conditional_0_Template","ProductCardComponent_Conditional_1_Conditional_9_Conditional_1_Template","countText","notificationTheme","notificationTitle","notificationIcon","notificationText","ProductCardComponent_Conditional_1_fcom_image_3_Template","ProductCardComponent_Conditional_1_Conditional_9_Template","emitProductCategory","ProductCardComponent_Conditional_1_Conditional_12_Template","ProductCardComponent_Conditional_1_fcom_notification_13_Template","buttonTheme","buttonText","buttonIcon","buttonAriaText","focusOnBtn$","ProductCardComponent_Conditional_2_Conditional_4_Conditional_6_Template","purchasedText","ProductCardComponent_Conditional_2_ng_container_7_div_3_Template","ProductCardComponent_Conditional_2_ng_container_7_div_6_Template","hasAddedItems","statusText","hideViewButton","emitViewDetails","viewSummaryText","ProductCardComponent_Conditional_2_fcom_image_0_Template","ProductCardComponent_Conditional_2_Conditional_4_Template","ProductCardComponent_Conditional_2_Conditional_5_Template","ProductCardComponent_Conditional_2_p_6_Template","ProductCardComponent_Conditional_2_ng_container_7_Template","ProductCardComponent_Conditional_2_fcom_button_9_Template","ProductCardComponent_Conditional_2_fcom_notification_10_Template","ProductCardComponent_Conditional_2_button_11_Template","hideButton","ProductCardComponent","useNewProductCardLayout","selectProduct","focusOnViewSummary$","viewSummaryBtn","ProductCardComponent_Conditional_1_Template","ProductCardComponent_Conditional_2_Template","ESC","DOWN","UP","PAGE_UP","PAGE_DOWN","END","KEYCODES_ARRAY","getKeyCodeFromEvent","zipWithLastValue","triggerWhenPreviousCompletes","indexReady$","durationMs","DEFAULT_RETRY_BACKOFF_TIME","STATUS_CODES_FOR_RETRY","maxCount","backoffMs","retryCodes","retryWhen","attempts$","errorWhenMaxCountExceeded","TimeoutError","combineTemplateStatic","observableKeys","observables","resultObject","DapiHttpErrorResponse","PostOrderChangesPath","postOrderChanges$Response","postOrderChanges","GetOrderChangesPath","getOrderChanges$Response","getOrderChanges","getSymbolIterator","ToggleSwitchModule","menuClick","onBackClick","showBack","phasesAria","pastStep","futureStep","BookingHeaderComponent_ul_16_li_1_span_5_span_1_Template","BookingHeaderComponent_ul_16_li_1_span_5_span_2_Template","BookingHeaderComponent_ul_16_li_1_span_5_span_3_Template","activeIndex","breadcrumb_r6","onBreadcrumbClick","BookingHeaderComponent_ul_16_li_1_span_5_Template","BookingHeaderComponent_ul_16_li_1_Template","i_r10","breadcrumb_r9","BookingHeaderComponent_ul_23_li_1_Template","showLogin","propagateBackClick","loginClick","breadcrumbClick","homeClick","backClick","findActiveIndex","showHamburgerMenu$","setProfileIcon","onHomeClick","homeUrl","profileIcon","languageSelector","userName","loginText","BookingHeaderComponent_fcom_icon_button_5_Template","BookingHeaderComponent_Conditional_7_Template","BookingHeaderComponent_fcom_icon_button_8_Template","BookingHeaderComponent_ul_16_Template","BookingHeaderComponent_Conditional_18_Template","BookingHeaderComponent_ul_23_Template","_seatMapState","_seatMapStateForFlight","sm","seatMapWithStatus","seatSelectionsForFlight","_seatSelectionsForFlight","ss","seatPrice","getSeatPrice","originalPricePerItem","_paymentState","_paymentStatus","_ps","_paymentIds","_paymentRedirectionUrl","paymentIdsPaid","paymentRedirectionUrl","_selectedBoundIdState","selectCommonBookingState","getRedirectPnrOrUndefined","createDeeplinkPathFromFlightSearchParams","mapFlightsToParams","isMultiCity","seasonalNotificationHandler","availabilityEntry","postFix","sameYear","startFormat","ps","discountCodeValidator","hasCorrectAmountOfFlights","BaseControlValueAccessor","BuiltInControlValueAccessor","CHECKBOX_VALUE_ACCESSOR","CheckboxControlValueAccessor","Jv_","DEFAULT_VALUE_ACCESSOR","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","_isAndroid","ɵgetDOM","getUserAgent","_handleInput","_compositionStart","_compositionEnd","isEmptyInputValue","hasValidLength","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","minValidator","actual","maxValidator","requiredValidator","requiredTrue","requiredTrueValidator","emailValidator","minLengthValidator","requiredLength","actualLength","maxLengthValidator","patternValidator","nullValidator","regex","regexStr","requiredPattern","actualValue","composeAsync","toObservable","mergeErrors","arrayOfErrors","executeValidators","normalizeValidators","isValidatorFn","validate","presentValidators","composeValidators","composeAsyncValidators","mergeValidators","controlValidators","dirValidator","getControlValidators","_rawValidators","getControlAsyncValidators","_rawAsyncValidators","makeValidatorsArray","currentValidators","validatorsToAdd","removeValidators","AbstractControlDirective","_onDestroyCallbacks","dirty","untouched","_setValidators","_composedValidatorFn","_setAsyncValidators","_composedAsyncValidatorFn","asyncValidator","_registerOnDestroy","_invokeOnDestroyCallbacks","getError","ControlContainer","formDirective","AbstractControlStatus","_cd","isTouched","_touched","isUntouched","isPristine","_pristine","isDirty","isInvalid","isPending","isSubmitted","_submitted","submitted","NgControlStatus","NgControlStatusGroup","VALID","INVALID","DISABLED","ControlEvent","ValueChangeEvent","PristineChangeEvent","TouchedChangeEvent","StatusChangeEvent","FormSubmittedEvent","FormResetEvent","pickValidators","validatorOrOpts","isOptionsObj","pickAsyncValidators","asyncValidators","assertControlPresent","isGroup","assertAllValuesPresent","_forEachChild","AbstractControl","_pendingDirty","_hasOwnPendingAsyncValidator","_pendingTouched","_onCollectionChange","statusReactive","pristineReactive","touchedReactive","_onDisabledChange","_assignValidators","_assignAsyncValidators","validatorFn","asyncValidatorFn","updateOn","_updateOn","setAsyncValidators","addAsyncValidators","removeAsyncValidators","hasAsyncValidator","clearAsyncValidators","sourceControl","onlySelf","markAsUntouched","_updateTouched","markAsPristine","_updatePristine","markAsPending","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","setParent","_setInitialStatus","shouldHaveEmitted","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","_updateControlsErrors","currPath","_find","changedControl","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","newPristine","_registerOnCollectionChange","_setUpdateStrategy","coerceToValidator","coerceToAsyncValidator","FormGroup","_setUpControls","registerControl","removeControl","_reduceChildren","_syncPendingControls","subtreeUpdated","updated","_reduceValue","initValue","FormRecord","CALL_SET_DISABLED_STATE","setDisabledStateDefault","controlPath","setUpControl","setUpValidators","setUpViewChangePipeline","_pendingValue","_pendingChange","updateControl","setUpModelChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpBlurPipeline","setUpDisabledChangeHandler","onDisabledChange","registerOnDisabledChange","_unregisterOnDisabledChange","cleanUpControl","validateControlPresenceOnChange","cleanUpValidators","registerOnValidatorChange","onValidatorChange","isControlUpdated","updatedValidators","updatedAsyncValidators","emitModelToViewChange","setUpFormContainer","isPropertyUpdated","viewModel","isFirstChange","syncPendingControls","directives","selectValueAccessor","valueAccessors","defaultAccessor","builtinAccessor","customAccessor","isBuiltInAccessor","formDirectiveProvider$1","NgForm","resolvedPromise$1","submittedReactive","_directives","ngSubmit","_findContainer","getControl","getFormGroup","updateModel","onReset","resetForm","removeListItem","isFormControlState","formState","FormControl","defaultValue","_onChange","_applyFormState","initialValueIsDefault","emitViewToModelChange","UntypedFormControl","AbstractFormGroupDirective","_checkParentType","formControlBinding$1","NgModel","resolvedPromise","_registered","_checkForErrors","_checkName","oldName","_getPath","_setUpControl","_updateDisabled","_isStandalone","_setUpStandalone","disabledValue","ChangeDetectorRef","ɵNgNoValidate","RADIO_VALUE_ACCESSOR","RadioControlValueAccessor","RadioControlRegistry","_accessors","_isSameGroup","fireUncheck","controlPair","_control","_registry","setDisabledStateFired","_fn","formControlName","NG_MODEL_WITH_FORM_CONTROL_WARNING","formControlBinding","FormControlDirective","_ngModelWarningSentOnce","_ngModelWarningConfig","_ngModelWarningSent","_isControlChanged","previousForm","formDirectiveProvider","FormGroupDirective","_submittedReactive","_updateDomValue","_checkFormPresent","_updateValidators","_updateRegistrations","_oldForm","removeListItem$1","_setUpFormContainer","_cleanUpFormContainer","addFormArray","removeFormArray","getFormArray","oldCtrl","newCtrl","isFormControl","cleanUpFormContainer","formGroupNameProvider","FormGroupName","_hasInvalidParent","formArrayNameProvider","FormArrayName","controlNameBinding","FormControlName","_added","SELECT_VALUE_ACCESSOR","SelectControlValueAccessor","_buildValueString$1","_optionMap","_idCounter","_compareWith","compareWith","valueString","_getOptionId","_getOptionValue","_registerOption","_extractId$1","NgSelectOption","_select","ngValue","_setElementValue","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","_buildValueString","optionSelectedStateSetter","ids","opt","_setSelected","selectedOptions","_extractId","ɵNgSelectMultipleOption","AbstractValidatorDirective","_validator","inputName","normalizeInput","_enabled","createValidator","REQUIRED_VALIDATOR","RequiredValidator","MAX_LENGTH_VALIDATOR","MaxLengthValidator","toInteger","ɵInternalFormsSharedModule","FormArray","at","_adjustIndex","_registerControl","insert","adjustedIndex","UntypedFormArray","isAbstractControlOptions","FormBuilder","useNonNullable","nnfb","reducedControls","_reduceControls","newOptions","createdControls","_createControl","UntypedFormBuilder","controlsConfig","warnOnNgModelWithFormControl","Symbol_iterator","LoginService","JoinService","joinData","TaggableComponent","castTagRoundingStyle","roundingStyle","TagRoundingStyle","castIconName","castIconCategory","PointsPipe","updatePoints","numberAmount","NO_TITLE","nameArr","categoryArr","CASE_NUMBER_PATTERN","PRICE_PATTERN","PHONE_NUMBER_PATTERN","PHONE_NUMBER_NO_SPACES_PATTERN","FLIGHT_NUMBER_PATTERN","FLIGHT_NUMBER_PATTERN_WITHOUT_AIRLINE_CODE","PAYMENT_IFSC_BIK_PATTERN","PAYMENT_KPP_PATTERN","PAYMENT_INN_PATTERN","inputId","CHEVRON_UP","ROUND_ARROW","SortBy","DURATION","PRICE","BEST","FareFamilyBadgeType","CMS","ChangesNotification","LAYOVER_SHORTER","LAYOVER_LONGER","BOUND_EARLIER","BOUND_LATER","ProductsModule","startLoadingOutbounds","startLoadingInbounds","success","invalidInput","noFlightsFound","setOutbounds","setInbounds","setLastRequestParams","setOutboundId","setOutboundFareFamily","setOutboundAirBoundId","setInboundId","setInboundFareFamily","setInboundAirBoundId","setSortBy","setDepartureTime","resetDepartureTime","setArrivalTime","resetArrivalTime","setRefundable","resetRefundable","setStopsCount","resetStopsCount","setMaxStops","resetMaxStops","setCabin","resetCabin","setAllFilters","resetNextDepartureTime","resetNextArrivalTime","setOutboundCache","resetOutboundCache","_airOffersState","_offerStatus","_aos","currentOffers","_offersHash","_o","_offersCurrency","_searchParameters","_offers","offerFilters","_filterOffersInbounds","filterFareFamilies","_filterOffersOutbounds","oneWaySelector","outboundsOfferSelector","inboundsOfferSelector","selectedOutboundId","selectedInboundId","selectedOutboundFareFamilyCode","selectedInboundFareFamilyCode","selectedSortBySelector","_boundSelectionsDone","_offersFilteredByBoundIds","filteredByOutbound","_currentOffer","isOneway","outboundMatch","inboundMatch","_quotasForBounds","_fareFamilyPreselection","resolvePreselection","firstOffer","offerList","filteredBoundObject","isCabinIncludedInBoundOffer","St","fareFamilyIdKey","fareFamilyInfoKey","fareFamilyCabinClasses","offersStatus","filteredCurrentOffersOutbound","filteredCurrentOffersInbound","offersCurrency","isOneWayOffers","offersDepartureDate","offersReturnDate","offerLastRequestParams","offerSerializedLastRequestParams","currentFareFamilies","boundSelectionsDone","quotasForBounds","hasZeroBaggageOnEitherFlight","_hasZeroBaggageOnEitherFlight","selectedTicketSortBy","outboundOffersSelectionGtmData","_outboundSelectionGTMData","inboundOffersSelectionGtmData","_inboundSelectionGTMData","flightSelectionGtmDataForOffers","_flightSelectionGTMDataForOffers","callOrApply","OVERSIZED_BAGGAGE","CHECKED_BAGGAGE_NON_AY","CABIN_BAGGAGE_NON_AY","CABIN_ITEM","CABIN_INFANT","CABIN_WEIGHT","MEDICAL","ASSISTANCE","PETS","PET_IN_HOLD","WINDSURFING","SKI_JUMPING","SPORTS_MEDIUM","SPORTS_LARGE","HOCKEY","SURF","TIER_BENEFIT_SPORT_EQUIPMENT","TANDEM_BIKE","VAULTING_POLE","SPECIAL_EQUIPMENT","MUSICAL_MEDIUM","MUSICAL_LARGE","MEDIA","OXYGEN","APNEA_DEVICE","WHEELCHAIR_DRY_CELL","WHEELCHAIR_WET_CELL","WHEELCHAIR_ASSISTANCE_SEAT","WHEELCHAIR_ASSISTANCE_RAMP","WHEELCHAIR_ASSISTANCE_STEPS","WHEELCHAIR_MANUAL_POWER","WHEELCHAIR_ON_BOARD","WHEELCHAIR_LITHIUM_ION","MOBILITY_AID","CHILD_ASSISTANCE","SERVICE_ANIMAL","EMOTIONAL_SUPPORT_ANIMAL","FAST_TRACK","PRIORITY_SERVICES","SAF_LOW","SAF_MID","SAF_HIGH","setAccessToken","clearAccessToken","setProfile","setCasProfile","setLoginError","setNotLoggedIn","setLoginPhaseExecutionToken","setLoginPhaseStep","setLoginPhaseProfile","setLoginPhaseError","clearLoginPhase","setAkamaiGeolocation","setBrowserGeolocation","setBrowserGeolocationLoading","removeBrowserGeolocationLoading","setServerTime","destroyValue","first_r2","last_r3","fareFamily_r1","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_div_7_fcom_icon_1_Template","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_div_7_fcom_icon_2_Template","fareFamily_r5","benefitKey_r6","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_ng_container_8_div_1_div_6_fcom_icon_1_Template","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_ng_container_8_div_1_div_6_fcom_icon_2_Template","childBenefit_r7","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_ng_container_8_div_1_div_6_Template","showIcons","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_ng_container_8_div_1_Template","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_div_7_Template","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_ng_container_8_Template","isOdd_r13","lastRow_r12","lastCell_r10","firstCell_r9","FareFamilyTableComponent_div_0_tr_9_ng_container_1_td_1_Template","FareFamilyTableComponent_div_0_tr_9_ng_container_1_Template","fareFamiliesWithMappedBenefits","FareFamilyTableComponent_div_0_th_8_Template","FareFamilyTableComponent_div_0_tr_9_Template","FareFamilyTableComponent","benefitRow","allBenefitKeys","FareFamilyTableComponent_div_0_Template","ObservableToArrayPipe","input$","cachedInput","shouldThrow","obs$","WindowRef","BrowserWindowRef","WINDOW_PROVIDERS","fetchLocations","OFFERS_CACHE_TIME_IN_MILLIS","ondMarketingDataService","instantsearchService","flightsDataCache$","offersDataCache$","locationsDataCache$","flightPriceMapper","priceData","pricesForEconomy","travelClassPrices","fromDate","getBookingStepLink","ENTRY","offersPriceMapper","requestBody","translationsToFetch","originCountryName","destinationCountryName","headingType","isCountryCode","constructOndHeadingPath","destinationLocationCodes$","getOfferData","getFlightsData","cacheKey","enhanceOffersWithTranslations","getAirportName","destinationCodeArray","scrollPrev","hasGreyBackground","whiteIcon","leftIcon","scrollNext","rightIcon","CarouselComponent","align","navigateFullWidth","contentChanged$","prevButtonVisible","nextButtonVisible","scrollRatio","updateButtonVisibility","onScroll","contentWrap","initialElementToFocus","containerWidth","newOffset","contentWidth","elementId","elementToScroll","newScrollLeft","offsetLeft","CarouselComponent_div_1_Template","CarouselComponent_div_2_Template","LinkComponent_a_0_ng_container_1_Template","linkText_r3","LinkComponent_button_1_ng_container_1_Template","LinkComponent_ng_template_2_ng_container_0_ng_container_1_Template","iconContainer_r5","LinkComponent_ng_template_2_ng_container_2_ng_container_1_Template","LinkComponent_ng_template_2_ng_container_0_Template","LinkComponent_ng_template_2_ng_container_2_Template","LinkComponent","_icon","linkStr","linkResult","LinkComponent_a_0_Template","LinkComponent_button_1_Template","LinkComponent_ng_template_2_Template","LinkComponent_ng_template_4_Template","_bufferSize","_windowTime","_timestampProvider","dateTimestampProvider","_buffer","_infiniteTimeWindow","_trimBuffer","_innerSubscribe","_checkFinalizedStatuses","adjustedBufferSize","URIError","TimetableService","GetTimetableForRoutePath","getTimetableForRoute$Response","getTimetableForRoute","REFUND_CASE_NOT_SUPPORTED","INITIALIZING","PRECONDITION_REQUIRED","AnalyticsFormStatus","SEND_ATTEMPT","START","ReactiveFormStatus","FormInputType","SELECT","PrefillProfileData","FIRST_NAME","LAST_NAME","FIRST_LAST_NAME","MEMBER_NUMBER","PARSED_MOBILE_PHONE","STREET_ADDRESS","POSTAL_CODE","STATE_OR_PROVINCE","delegate","SeatmapService","GetSeatmapFromCartPath","getSeatmapFromCart$Response","Caller","getSeatmapFromCart","GetStandaloneSeatmapPath","getStandaloneSeatmap$Response","getStandaloneSeatmap","GetSeatmapFromOrderPath","getSeatmapFromOrder$Response","getSeatmapFromOrder","GetSeatmapJsonPath","getSeatmapJson$Response","getSeatmapJson","GetSeatmapSvgPath","getSeatmapSvg$Response","getSeatmapSvg","hasMap","mapSizeDescriptor","mapSize","mapForEach","hasSet","setSizeDescriptor","setSize","setForEach","weakMapHas","weakSetHas","weakRefDeref","deref","booleanValueOf","functionToString","$match","$slice","$toUpperCase","$toLowerCase","$test","$join","$arrSlice","$floor","bigIntValueOf","gOPS","getOwnPropertySymbols","symToString","hasShammedSymbols","toStringTag","isEnumerable","propertyIsEnumerable","gPO","addNumericSeparator","sepRegex","int","intStr","dec","utilInspect","inspectCustom","inspectSymbol","isSymbol","quotes","double","single","quoteREs","wrapQuotes","defaultStyle","quoteChar","quoteStyle","canTrustToString","toStr","inspect_","customInspect","indent","numericSeparator","inspectString","bigIntStr","maxDepth","getIndent","baseIndent","noIndent","newOpts","nameOf","arrObjKeys","symString","markBoxed","childNodes","xs","singleLineValues","indentedJoin","cause","isMap","mapParts","collectionOf","isSet","setParts","isWeakMap","weakCollectionOf","isWeakSet","isWeakRef","isBigInt","ys","protoTag","stringTag","remaining","trailer","quoteRE","lastIndex","lowbyte","lineJoiner","isArr","symMap","syms","ToggleSwitchStatus","UNCHECKED","CHECKED","emptyScheduled","setPaxDetails","setSinglePaxDetails","setCorporateCode","setAdditionalEmails","hasDefaultValue","defaultIfEmpty","ChatStatus","HelpButtonStatus","CLICKED","USER_FORM","handleLogin","startChat","openUserForm","item_r6","PreChatComponent_div_19_fin_expand_11_div_8_Template","chatExpandKey","index_r7","PreChatComponent_div_19_a_7_Template","PreChatComponent_div_19_fcom_button_9_Template","PreChatComponent_div_19_fcom_button_10_Template","PreChatComponent_div_19_fin_expand_11_Template","usePreChatForm","availableAccordions$","PreChatComponent","chatToggle","loginDialogIsEnabled","startUserForm","minimizeButton","checkIfLoginDialogDisabled","replaceAll","PreChatComponent_div_19_Template","PreChatComponent_fin_chat_user_form_20_Template","MINIMISE_CHAT","SalesforceChatService","promises","resolveLoaded","srcUrl","LOCALE_TO_SERVICE_QUEUE_ID","_DEFAULT","_DEFAULT_PREPROD","_DARKSITE","SalesforceChatConfig","csc","isDarkSite","displayHelpButton","storageDomain","enabledFeatures","entryFeature","loadingText","devMode","extraPrechatInfo","entityFieldMaps","doCreate","doFind","fieldName","isExactMatch","entityName","saveToTranscript","showOnCreate","prepopulatedPrechatFields","extraPrechatFormDetails","transcriptFields","initParams","isOfflineSupportEnabled","defaultChatLanguage","setServiceQueueId","serviceQueueId","enableChatBot","disableChatBot","setTargetElement","externalScripts","externalStyles","SalesforceChatConfigService","scriptSrcURL","chatServiceConfig","isDarkSiteChecker","AGENTFORCE_EXTRAPRECHATINFO","ALLOWED_SERVICE_QUEUE_AGENTFORCE","AgentforceChatService","sfChatService","sfChatConfigService","chatButtonState$","liveAgentChatTriggered$","messagingForWebTriggered$","openLegacyChat$","openWebMessagingChat$","agentforceConfig","agentforceChat","checkAllowedLocales","liveAgentChat","embeddedSvc","embedded_svc","FirstName","LastName","Email","Booking_Reference__c","Finnair_Plus_Number__c","Case_Member_Tier__c","defaultMinimizedText","disabledMinimizedText","offlineSupportMinimizedText","addEventHandler","bootstrapEmbeddedService","webMessagingChat","embeddedSvcBootstrap","embeddedservice_bootstrap","messageReady$","prechatAPI","setHiddenPrechatFields","userVerificationAPI","clearSession","utilAPI","launchChat","shouldShowParticipantChgEvntInConvHist","chatButtonPosition","hideChatButtonOnLoad","queueConfigs","agentUrl","scrt2URL","startWebMessagingChat","chatTrigger","agentforceLocaleAllowed","dirty$","ChatComponent_ng_container_2_fin_pre_chat_1_Template","ChatComponent_ng_container_2_button_2_Template","ChatComponent_ng_container_2_div_3_Template","helpButtonStatus_r5","MODAL_OPEN_CLASS_NAME","ChatComponent","salesforceChatConfigService","salesforceChatService","afChatService","allAgentsAreBusyOrOfflineSubscription","chatStatus","openChatTrigger$","maskHotJar","hasBeenTriggered","helpButtonStatus","openChatTrigger","shouldSetModalOpen","openChat","onDomChange","addedNodes","detailTextHtml","shouldOpen","ChatComponent_ng_container_2_Template","SalesforceChatFormControl","BOOKING_REFERENCE","HAS_BOOKING_REFERENCE_Q","SalesforceChatFormHasBookingRefQ","YES","ChatUserFormComponent","textareaLimit50","liveAgentChatEnabled","liveAgentChatData","webMessagingChatData","FirstName_c","LastName_c","Email_c","hiddenFields","WebSite_Country","WebSite_Language","addFormWatcher","setHiddenFields","selectedBookingRef","enableBookingReference","disableBookingReference","Finnair_Plus_Number_c","Case_Member_Tier_c","AuthenticatedUser","ChatUserFormComponent_Conditional_12_Template","ChatModule","FragmentService","ChatGlobalVisibilityComponent","_cartState","_cartUrl","_cs","cartStatusSelector","cartStatus","_cartIdAndHash","urlPath","queryPart","cartUrlToIdAndHash","_cartFlights","_cartFirstFlightDepartureDate","_cartLastFlightArrivalDate","mapFlightsFromCartData","_cartDirty","_cartBoundsTitle","cartFlight","_flights","cartPartStatusForCategory","updating","currentCartId","updates","CartPartStatus","_cartPartStatusForCategory","isCartDirty","_fareRules","QueueService","currentQueue$","currentCancelPayment$","canceledBeforeTrigger","task$","cancelOngoingPayment","AfterViewInitDirective","finAfterViewInit","previousStep$","shortHaulFlightWeights","longHaulFlightWeights","superLightFareFamiliesDictionary","brandNames","bookingStep","paxAmount$","globalBookingTripType","globalBookingTravelClasses","globalBookingFlights$","routeType$","globalBookingRouteType","fetchLocationInformationBasedOnSelections","globalBookingSelections","offerListParams","setFlightsFromLocationsCodes","flightSearch","getLocationsFromFlights","uniqueListOfLocations","onSuccessPost","skipRouteChange","goToStep","prevStep","nextStep","currentStepIndex","getStepIndex","BOOKING_STEPS_ARRAY","isFirstStep","setActiveTab","tab","selectTravelClass","updateTripTypeBasedOnQueryParams","BookingQueryParams","AVAILABLE_TRIP_TYPES","getContentUrlTranslationKeySuperLightModalWindow","selectedFareFamiliesBrands","dictionary","weights","expandStatus","GLOBAL_BOOKING_WIDGET_EXPANDER_KEY","isClearCart","createParamsForStep","flightSelectionParams","globalBookingFlight","NO_FLIGHTS_STATUSES","DENIED_BY_AKAMAI","BookingAirBoundsService","bookingWidgetStore$","NUMBER_OF_ONE_WAY_FLIGHT","_preselectedBoundId$","preselectedBoundId$","setPreselectedBoundId","resetPreselectedBoundId","isRefecth","boundStatus","instantSearchMonitoringData","currentParamsSerialized","outboundCacheHash","BoundsActions","bodyParams","createRequest","getBounds","handleBoundResponse","getReturnBounds","originalRequest","handleFlightPreSelection","requestParams","isValidParams","validateFlightPreSelectionParams","isTwoWay","departureFlightNumbers","returnFlightNumbers","preSelectOutboundIfFound","preSelectInboundIfFound","buildItineraries","mapCityNameAndAirportToBounds","isValidFlightNumberFormat","departureFareFamily","airBoundId","mapAirBoundIdToBound","returnFareFamily","BookingOfferListService","triggerFetchOffers","offerStatus","getOffersForLocation","BookingMultiCityService","ITINERARY_SEGMENT_ID_REGEX","offersMultiService","bookingQueueService","selectMultiCity","selectedItinerary$","selectMultiCitySelectedItinerary","selectedFareFamily$","selectMultiCitySelectedFareFamily","fetchMultiCityOffers","MultiCityActions","convertOfferListFetchParamsToFinnairSearchParameters","getUniqueHashIdentifier","fullId","offerIdPrefix","offerId","itineraryId","getUniqueBoundId","mergeDuplicatedBounds","hashMap","fetchMultiCityMoreFlights","selectMultiCityRequestedMoreFlightOfferIds","boundIndex","offerData","selectedOffer","getOffersPerBounds","selectMultiCityAvailableFareFamilies","selectMultiCityFareFamiliesPerCabin","selectedItinerary","selectedFareFamily","availableFareFamilies","ffCabin","_flight","uniqueFlights","uniqueFlight","matchingOffers","listOffer","offerItems","fareFamilyCodePerBound","cheapestMatchingOffer","findCheapestOffer","filteredFareFamily","getUFOInfo","sortByPriceAndDeparture","getCabinForFareFamily","getCurrency","newBounds","ffCode","matchingBound","getFareInformation","operatingAirlineCodes","aircraftCode","itineraryWithDifferentCabinClass","fareInformationPerBound","fareInfos","inTranslation","globalLocalizationEn","bookingLocalizationEn","mmbLocalizationEn","reaccommodationLocalizationEn","loyaltyLocalizationEn","serviceformsLocalizationEn","refundsLocalizationEn","corporateLocalizationEn","travelReadyLocalizationEn","globalLocalizationFiFi","bookingLocalizationFiFi","mmbLocalizationFiFi","reaccommodationLocalizationFiFi","loyaltyLocalizationFiFi","serviceformsLocalizationFiFi","refundsLocalizationFiFi","corporateLocalizationFiFi","travelReadyLocalizationFiFi","workInProgress","globalLocalizationEnNext","globalLocalizationFiFiNext","bookingLocalization","bookingLocalizationEnNext","bookingLocalizationFiFiNext","featureLocalizations","mmbLocalizationEnNext","reaccommodationLocalizationEnNext","LOYALTY","loyaltyLocalizationEnNext","serviceformsLocalizationEnNext","refundsLocalizationEnNext","corporateLocalizationEnNext","travelReadyLocalizationEnNext","mmbLocalizationFiFiNext","reaccommodationLocalizationFiFiNext","loyaltyLocalizationFiFiNext","serviceformsLocalizationFiFiNext","refundsLocalizationFiFiNext","corporateLocalizationFiFiNext","travelReadyLocalizationFiFiNext","LocalizationProvider","CHIP","BOUND_BASED_CATEGORIES","DrawerModule","ClickOutsideDirectiveModule","DrawerComponent","REFUNDS_FEATURE_KEY","textBeforePages","PaginationComponent","itemsPerPage","_itemsPerPage","itemsPerPageChange","itemsPerPageOptions","indexesChange","FIRST_PAGE","totalPages","totalItems","setIndexes","changePage","paginationCount","prevPagination","nextPagination","newPageNumber","initial","startIndex","endIndex","PaginationComponent_div_1_Template","asyncIterator","isGlobalBanner","showGlobalBannerClose","CmsDisruptionsComponent_ng_container_0_ng_container_1_fcom_notification_1_Template","CmsDisruptionsComponent_ng_container_0_ng_container_1_Template","getMappedDisruptions","disruptionItemId","disruptionLevelMap","DISRUPTION_LEVEL_1","DISRUPTION_LEVEL_2","DISRUPTION_LEVEL_3","DISRUPTION_LEVEL_4","showLevelOne","testVariant","linkInNewTab","notificationIds","CmsDisruptionsComponent_ng_container_0_Template","handleSave","backToPaxDetails","passengerFormGroup_r5","extendedPassengers_r3","availableDays","allFrequentFlyerCards$","selectableLeadPassengers$","showEdit","controlData$","isSaving$","travelerIdBeingModified$","first_r7","last_r8","PassengerInfoListComponent_ng_container_0_fin_passenger_info_renewed_1_Template","extendedPassengers$","PassengerInfoListComponent","passengerFormService","paxTypeKey","cards","passengerFormGroups","setupTravellingWithSelectOptions","CartStatus","selectableLeadPassengers","createPassengerOption","ad","getTranslatedName","paxData","passengerFormDetails","PAXDETAILS","PassengerInfoListComponent_ng_container_0_Template","BoundContainerComponent","BoundContainerComponent_ng_container_5_Template","BoundContainerComponent_div_6_Template","FINNAIR_COOKIE_SNIPPET","Bearer","ConsentService","cookieConsentsSavedToStorage$","cookieSnippetLoaded$","getCookieConsents","getAuthHeaderValue","consentGroups","consentTextsGroups","handlePostError","setCookieConsents","consentData","setConsents","consentId","getCookieIdFromSnippet","getOrGenerateFinnairCookieId","injectCookieSnippet","cookieSnippetScript","replaceURIFormat","getConsents","_angular_core__WEBPACK_IMPORTED_MODULE_19__","cabinBaggage","seatSelection","rebook","MMB_TICKET_CHANGES","cancel","TICKET_REFUND","nameChange","plusPoints","loungeAccess","prioritySecurity","PRIORITY_SECURITY","priorityCheckIn","wifiAccess","cabinBaggageWithWeight","CARRY_ON_BAGGAGE","CARRY_ON_BAG_TROLLEY","BACKPACK","carryOnBag","checkedBaggageWithAmountAndWeightSingular","checkedBaggageWithAmountAndWeightPlural","checkedBaggageWithWeight","BENEFITS","shouldDisplayBenefit","Action","work","intervalProvider","recycleAsyncId","requestAsyncId","_scheduler","execute","_execute","_delay","errorValue","actions","arrRemove","FlightFiltersEmptyStateComponent","FLIGHTS_UNAVAILABLE","selectedDate_r3","selectedDate_r4","selectedDate_r5","TravelDatesSelectorComponent_ng_container_2_span_12_Template","TravelDatesSelectorComponent_ng_container_2_span_15_Template","TravelDatesSelectorComponent_ng_container_2_div_17_Template","TravelDatesSelectorComponent_ng_container_2_span_19_Template","isOneway$","travelDates$","showSeparator","selectedDate_r7","TravelDatesSelectorComponent_fin_booking_widget_selector_3_span_4_Template","departureOrReturn_r8","addReturnClicked","travelDatesChanged","cancelSelection","startSearch","priceCalendarParams$","showAddReturn","showSubtitle","disabledDateRanges$","showFlexibleDatesSelection","showTripPriceFrom","enableNewSearchAutomatically","isSearchEnabled","priceCalendarType","PriceCalendarType","PRICES","showEnhancedCalendar$","TravelDatesSelectorComponent","travelClass$","previousFlightDepartureDate$","flexibleDates","showPerAdultPrice","setTravelDates","setFlexibleDates","addReturn","modalOpen$","travelDates","initialTravelDates","priceCalendar","startSearchWithSelectedDates","PriceCalendarComponent","TravelDatesSelectorComponent_ng_container_2_Template","TravelDatesSelectorComponent_fin_booking_widget_selector_3_Template","TravelDatesSelectorComponent_fin_price_calendar_6_Template","showSingular","DdsPageType","responsiveDeepLink","finnairLoyaltyProfile","updateFinnairLoyaltyProfile","MaintenanceConfigFeature","ONE_UPGRADE","BUSINESS_CLASS","openBookingWidget","isClickable","bookingSummary","BookingHeaderSummaryComponent","modifySearch","BookingHeaderSummaryComponent_fin_booking_header_summary_item_3_Template","maxAttachments","maxFileSize","maxSizeMb","megaBytes","filesSupported","fileErrors","attachmentError_r3","fileErrorLabels","unknown","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Case_2_Template","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Case_3_Template","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Case_4_Template","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Case_5_Template","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Case_6_Template","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Case_7_Template","AttachmentError","DUPLICATE","EXTENSION","MALWARE","MAX_ATTACHMENTS","MAX_SIZE","labelRequired","FileUploaderComponent_fieldset_0_ng_container_20_For_3_Template","FileUploaderComponent_fieldset_0_ng_container_20_ForEmpty_4_Template","attachmentErrorKeys","FileUploaderComponent_fieldset_0_span_3_Template","FileUploaderComponent_fieldset_0_dl_4_Template","FileUploaderComponent_fieldset_0_dl_5_Template","FileUploaderComponent_fieldset_0_dl_6_Template","onDrop","onDragOver","onDragEnter","onCancel","openFileSelector","FileUploaderComponent_fieldset_0_ng_container_20_Template","fieldDisabled","labelAttach","maxSizeInBytes","containsErrors","isUploading","dragInProgress$","dragAndDrop","or","browseFiles","UPLOAD","tmp_25_0","attachmentsWithErrors","intlJoin","allowedFileTypes","customAttachLabel","customRequiredLabel","filesUpdated","lastEventTimeStamp","acceptValues","attachFiles","attachFile","requiredMultiple","initValidators","updatedAttachments","uploadService","uploadAttachments","timeStamp","removeErrors","validateFiles","files","fileInput","click","dataTransfer","dropEffect","effectAllowed","errorCallback","updateAttachmentDetails","fileEquals","lastModified","attachmentsStillUploading","removeDuplicates","setAttachments","newAttachments","newAttachmentsWithErrors","existingAttachmentsWithErrors","newAttachmentsWithoutErrors","uploadAttachment","uploadCallback","attachmentsToUpload","fileId","attachmentId","validateFile","fileExtension","IntlJoinPipe","FileUploaderComponent_fieldset_0_Template","asyncGeneratorStep","_throw","AdditionalCategories","TICKETS","TIER","categoryIcons","EXTRA_CHECK_IN_BAGGAGE","FIRE_ARMS","MEDICAL_ASSISTANCE","PERSON_SPECIAL_ASSIST","FLIGHT_STATUS","countryCodeParameter","areaCodeParameter","safeCountryCode","safeAreaCode","safeNumberString","parseGeolocationFromUrlHash","keyVal","valuesArr","ToggleSwitchComponent","statusChange","handleStatusChange","labelledBy","AspectRatios","ORIGINAL","CLASSIC","CHIPS","STRETCH","TabIconPosition","isStaticPicture","isCmsImageData","toCmsAspectRatio","ASPECT_RATIO_PROPERTY_MAP","mapToResponsiveImage","pic","aspect","fallbackSrc","srcSet","widestWidth","getWidestImageWidth","imageWidthMap","widest","imwidth","FALLBACK_WIDTH","THUMBNAIL_WIDTH","toSrcSetString","getSrc","currentSrc","LazyLoadImageHooks","recurseLangParam","isComponentRenderedByRouter","comp","firstChild","travelClassToCffMap","getBookingDestinationSummary","disruptedFlights","cityCode","sortByPrice","numericPrice","mapCffsToTravelClasses","routeCffData","travelClassAvailableForRoute","cffkey","mapLocationRouteCffDataToCabin","categoryToCabin","PREMIUMECONOMY","getFareFamiliesLowestPriceOrPoints","findCheapestMultiCityOffer","popNumber","mergeAll","esm_browser_native","rnds8","byteToHex","esm_browser_v4","v4","native","rnds","rng","unsafeStringify","defaultEquals","activeConsumer","inNotificationPhase","epoch","SIGNAL","setActiveConsumer","consumer","getActiveConsumer","REACTIVE_NODE","lastCleanEpoch","producerNode","producerLastReadVersion","producerIndexOfThis","nextProducerIndex","liveConsumerNode","liveConsumerIndexOfThis","consumerAllowSignalWrites","consumerIsAlwaysLive","producerMustRecompute","producerRecomputeValue","consumerMarkedDirty","consumerOnSignalRead","producerAccessed","assertConsumerNode","consumerIsLive","producerRemoveLiveConsumerAtIndex","producerAddLiveConsumer","producerUpdateValueVersion","consumerPollProducersForChange","producerNotifyConsumers","consumerMarkDirty","producerUpdatesAllowed","consumerBeforeComputation","consumerAfterComputation","prevConsumer","producer","seenVersion","consumerDestroy","indexOfThis","assertProducerNode","isConsumerNode","lastIdx","idxProducer","COMPUTING","ERRORED","COMPUTED_NODE","oldValue","computation","throwInvalidWriteToSignalErrorFn","defaultThrowError","throwInvalidWriteToSignalError","postSignalSetFn","signalSetFn","signalValueChanged","producerIncrementEpoch","SIGNAL_NODE","NOOP_CLEANUP_FN","WATCH_NODE","hasRun","cleanupFn","XSS_SECURITY_URL","RuntimeError","formatRuntimeError","REQUIRED_UNSET_VALUE","INPUT_SIGNAL_NODE","SIGNAL_NODE$1","transformFn","applyValueToInputSignal","signalSetFn$1","createInputSignal","inputValueFn","producerAccessed$1","SIGNAL$1","noSideEffects","PARAMETERS","makeParamDecorator","parentClass","metaCtor","makeMetadataCtor","propName","ParamDecoratorFactory","annotationInstance","ParamDecorator","annotation","cls","unusedKey","ngMetadataName","annotationCls","_global","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","overriddenName","newLineIndex","concatStringsWithSpace","truncateMiddle","halfLimit","__forward_ref__","forwardRefFn","resolveForwardRef","isForwardRef","ɵɵdefineInjector","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","isInjectable","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ngInjectableDef","ngInjectorDef","_desc","__NG_ELEMENT_ID__","isEnvironmentProviders","ɵproviders","NG_COMP_DEF","NG_DIR_DEF","ɵdir","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","NG_FACTORY_DEF","NG_ELEMENT_ID","NG_ENV_ID","__NG_ENV_ID__","renderStringify","throwProviderNotFoundError","injectorName","InjectFlags","Default","Host","Self","SkipSelf","Optional","_injectImplementation","getInjectImplementation","setInjectImplementation","injectRootLimpMode","notFoundValue","injectableDef","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NEW_LINE","SOURCE","_currentInjector","setCurrentInjector","former","injectInjectorOnly","convertToBitFlags","injectArgs","getInjectFlag","attachInjectFlag","decorator","getFactoryDef","throwNotFound","deepForEach","addToArray","removeFromArray","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","value1","value2","keyValueArrayGet","_arrayIndexOfSorted","middle","EMPTY_OBJ","ENVIRONMENT_INITIALIZER","INJECTOR$1","INJECTOR_DEF_TYPES","NullInjector","ChangeDetectionStrategy","OnPush","ViewEncapsulation$1","ViewEncapsulation","Emulated","None","ShadowDom","InputFlags","SignalBased","HasDecoratorInputTransform","classIndexOf","classToSearch","startingIndex","foundIndex","setUpAttributes","namespaceURI","attrVal","isAnimationProp","isNameOnlyAttributeMarker","marker","mergeHostAttrs","dst","srcMarker","mergeHostAttribute","key1","key2","markerInsertPosition","dstValue","NG_TEMPLATE_SELECTOR","isCssClassMatching","tNode","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","chunk","stringifyCSSSelector","currentChunk","valueOrMarker","ɵɵdefineComponent","componentDefinition","baseDef","getNgDirectiveDef","def","onPush","directiveDefs","pipeDefs","getStandaloneInjector","signals","tView","initFeatures","extractDefListOrFactory","getComponentId","componentDef","hashSelectors","imul","extractDirectiveDef","getComponentDef","getDirectiveDef","nonNull","ɵɵdefineNgModule","bootstrap","declarations","transitiveCompileScopes","parseAndConvertBindingsForDefinition","declaredInputs","newLookup","minifiedKey","publicName","declaredName","inputFlags","ɵɵdefineDirective","directiveDefinition","ɵɵdefinePipe","pipeDef","getPipeDef$1","isStandalone","getNgModuleDef","ngModuleDef","providersResolver","inputTransforms","inputConfig","setInput","findHostDirectiveDefs","hostDirectives","debugInfo","definition","defExtractor","dep","makeEnvironmentProviders","importProvidersFrom","internalImportProvidersFrom","ɵfromNgModule","checkForStandaloneCmp","providersOut","dedup","injectorTypesWithProviders","collectProviders","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","visitor","deepForEachProvider","parents","defType","injDef","cmpDef","isDuplicate","importTypesWithProviders","imported","defProviders","injectorType","USE_VALUE$1","isValueProvider","isTypeProvider","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR","getNullInjector","EnvironmentInjector","R3Injector","destroyed","scopes","records","_ngOnDestroyHooks","_onDestroyHooks","forEachSingleProvider","processProvider","makeRecord","injectorDefTypes","assertNotDestroyed","setActiveConsumer$1","onDestroyHooks","removeOnDestroy","runInContext","previousInjector","previousInjectImplementation","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","injectorErrorName","tokenPath","formatError","resolveInjectorInitializers","initializers","initializer","providerToRecord","providerToFactory","multiRecord","hasOnDestroy","destroyCBIdx","getUndecoratedInjectableFactory","inheritedInjectableDef","getInheritedInjectableDef","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","runInInjectionContext","prevInjector","isInInjectionContext","getCurrentInjector","debugFn","HOST","TVIEW","FLAGS","T_HOST","HYDRATION","CLEANUP","INJECTOR","ENVIRONMENT","RENDERER","CHILD_HEAD","CHILD_TAIL","DECLARATION_VIEW","DECLARATION_COMPONENT_VIEW","DECLARATION_LCONTAINER","PREORDER_HOOK_FLAGS","QUERIES","ID","EMBEDDED_VIEW_INJECTOR","ON_DESTROY_HOOKS","EFFECTS_TO_SCHEDULE","REACTIVE_TEMPLATE_CONSUMER","HEADER_OFFSET","TYPE","DEHYDRATED_VIEWS","NATIVE","MOVED_VIEWS","CONTAINER_HEADER_OFFSET","LContainerFlags","HasTransplantedViews","isLView","isLContainer","isContentQueryHost","isComponentHost","componentOffset","isDirectiveHost","isComponentDef","isRootView","SimpleChange","applyValueToInputField","inputSignalNode","privateName","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","setSimpleChangesStore","SIMPLE_CHANGES_STORE","previousChange","ngInherit","profiler","hookOrListener","SVG_NAMESPACE","unwrapRNode","getNativeByIndex","lView","getNativeByTNode","getTNode","getComponentLViewByIndex","nodeIndex","slotValue","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","markViewForRefresh","markAncestorsForTraversal","requiresRefreshOrTraversal","updateAncestorTraversalFlagsOnAttach","changeDetectionScheduler","notify","getLViewParent","storeLViewOnDestroy","onDestroyCallback","instructionState","lFrame","createLFrame","bindingsEnabled","skipHydrationRootTNode","_isRefreshingViews","getBindingsEnabled","isInSkipHydrationBlock$1","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","ɵɵresetView","getCurrentTNode","currentTNode","getCurrentTNodePlaceholderOk","setCurrentTNode","isParent","isCurrentTNodeParent","setCurrentTNodeAsNotParent","getContextLView","isRefreshingViews","setIsRefreshingViews","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","nextBindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentDirectiveDef","tData","getCurrentQueryIndex","currentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","parentTNode","parentLView","allocLFrame","enterView","newView","newLFrame","inI18n","currentLFrame","childLFrame","selectedIndex","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","ɵɵnamespaceSVG","ɵɵnamespaceHTML","namespaceHTMLInternal","getNamespace$1","_wasLastNodeCreated","wasLastNodeCreated","lastNodeWasCreated","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","ngAfterContentChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentView","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","callHookInternal","directive","isInitHook","NO_PARENT_INJECTOR","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ChainedInjector","parentInjector","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorView","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","setIncludeViewProviders","BLOOM_MASK","BLOOM_BUCKET_BITS","nextNgElementId","NOT_FOUND","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","declarationViewOffset","lViewCursor","getTNodeFromLView","diPublicInInjector","bloomAdd","bloomHash","notFoundValueOrThrow","lookupTokenUsingModuleInjector","moduleInjector","getOrCreateInjectable","embeddedInjectorValue","lookupTokenUsingEmbeddedInjector","currentLView","nodeInjectorValue","lookupTokenUsingNodeInjector","embeddedViewInjector","embeddedViewInjectorValue","bloomHashBitOrFactory","tokenId","createNodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","providerTokenOrDef","dirDef","isFactory","throwCyclicDependencyError","stringifyForError","previousIncludeViewProviders","registerPreOrderHooks","directiveIndex","directiveDef","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","injectorView","isFirstHostTNode","NodeInjector","_tNode","_lView","ɵɵgetInheritedFactory","ownConstructor","ownFactory","getFactoryOf","objectPrototype","tViewType","ɵɵinjectAttribute","attrNameToInject","injectAttributeImpl","attrsLength","createInjector","additionalProviders","createInjectorWithoutInjectorInstances","getOriginalError","SCHEDULE_IN_ROOT_ZONE_DEFAULT","injectDestroyRef","NodeInjectorDestroyRef","removeLViewOnDestroy","PendingTasks","taskId","pendingTasks","hasPendingTasks","_hasPendingTasks","EventEmitter_","isAsync","__isAsync","nextFn","errorFn","completeFn","wrapInTimeout","scheduleCallbackWithRafRace","timeoutId","animationFrameId","cleanup","scheduleCallbackWithMicrotask","isAngularZoneProperty","angularZoneInstanceIdProperty","ngZoneInstanceId","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","scheduleInRootZone","Zone","assertZonePatched","_nesting","_outer","_inner","TaskTrackingZoneSpec","fork","longStackTraceZoneSpec","callbackScheduled","forkInnerZoneWithAngularBehavior","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","scheduleCheckStable","updateMicroTaskStatus","isCheckStableRunning","checkStable","instanceId","properties","_n","In","onInvokeTask","applyThis","applyArgs","shouldBeIgnoredByZone","hasApplyArgsData","invokeTask","onEnter","onLeave","onInvoke","invoke","isSchedulerTick","onHasTask","hasTaskState","hasTask","_hasPendingMicrotasks","microTask","macroTask","onHandleError","assertInAngularZone","assertNotInAngularZone","runTask","scheduleEventTask","EMPTY_PAYLOAD","cancelTask","runGuarded","NoopNgZone","ErrorHandler","_console","_findOriginalError","INTERNAL_APPLICATION_ERROR_HANDLER","userErrorHandler","inputFunction","inputRequiredFunction","injectElementRef","createElementRef","unwrapElementRef","symbolIterator","_results","QueryList","_changes","_emitDistinctChangesOnly","_onDirty","_changesDetected","resultsTree","identityAccessor","newResultFlat","flatten","POSITIVE_INFINITY","arrayEquals","valueA","valueB","notifyOnChanges","onDirty","setDirty","SKIP_HYDRATION_ATTR_NAME","SKIP_HYDRATION_ATTR_NAME_LOWER_CASE","hasSkipHydrationAttrOnTNode","mergedAttrs","hasSkipHydrationAttrOnRElement","rNode","hasInSkipHydrationBlockFlag","TRACKED_LVIEWS","uniqueIdCounter","unregisterLView","MONKEY_PATCH_KEY_NAME","attachPatchData","registerLView","getFirstLContainer","getNearestLContainer","getNextLContainer","viewOrContainer","setDocument","getDocument","APP_ID","DEFAULT_APP_ID","PLATFORM_INITIALIZER","CSP_NONCE","initTransferState","transferState","TransferState","retrieveTransferredState","appId","onSerializeCallbacks","hasKey","onSerialize","toJson","REFERENCE_NODE_HOST","REFERENCE_NODE_BODY","NodeNavigationStep","FirstChild","NextSibling","ELEMENT_CONTAINERS","TEMPLATES","CONTAINERS","MULTIPLIER","NUM_ROOT_NODES","TEMPLATE_ID","NODES","DISCONNECTED_NODES","NGH_DATA_KEY","NGH_ATTR_NAME","SSR_CONTENT_INTEGRITY_MARKER","_retrieveHydrationInfoImpl","retrieveHydrationInfoImpl","nghAttrValue","componentViewNgh","rootViewNgh","remainingNgh","dehydratedView","setSegmentHead","retrieveHydrationInfo","getLNodeForHydration","hydrationInfo","segmentHeads","getSegmentHead","getSerializedContainerViews","calcSerializedContainerSize","views","numNodes","isDisconnectedNode$1","disconnectedNodes","nodeIds","initDisconnectedNodes","IS_HYDRATION_DOM_REUSE_ENABLED","PRESERVE_HOST_CONTENT","policy$1","policy","trustedHTMLFromString","getPolicy$1","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","getPolicy","trustedHTMLFromStringBypass","trustedScriptURLFromStringBypass","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","DOMParserHelper","inertDocumentHelper","getInertBodyElement","DOMParser","parseFromString","InertDocumentHelper","defaultDoc","inertDocument","implementation","createHTMLDocument","templateEl","SAFE_URL_PATTERN","_sanitizeUrl","tagSet","sets","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","sanitizeChildren","traverseContent","parentNodes","Node","startElement","TEXT_NODE","chars","nodeValue","getFirstChild","endElement","getNextSibling","getNodeName","elAttrs","elAttr","lower","encodeEntities","previousSibling","clobberedElementError","isClobberedElement","childNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","inertBodyElement","getInertBodyHelper","isDOMParserAvailable","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","STYLE","SCRIPT","URL","RESOURCE_URL","ɵɵsanitizeHtml","getSanitizer","ɵɵsanitizeStyle","unsafeStyle","ɵɵsanitizeUrl","unsafeUrl","ɵɵsanitizeResourceUrl","unsafeResourceUrl","ɵɵsanitizeUrlOrResourceUrl","getUrlSanitizer","COMMENT_DISALLOWED","COMMENT_DELIMITER","COMMENT_DELIMITER_ESCAPED","ɵɵresolveWindow","ownerDocument","ɵɵresolveDocument","maybeUnwrapFn","Important","_icuContainerIterate","icuContainerIterate","tIcuContainerNode","applyToElementOrContainer","lNodeToHandle","beforeNode","lContainer","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","destroyNode","applyContainer","parentRElement","applyView","createTextNode","createText","createCommentNode","escapeCommentText","createElementNode","namespace","detachViewFromDOM","trackMovedView","declarationContainer","movedViews","detachMovedView","declarationViewIndex","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","removeViewFromDOM","lQueries","destroyLView","destroyViewTree","rootView","lViewOrLContainer","cleanUpView","firstView","consumerDestroy$1","executeOnDestroys","toCall","callContext","processCleanups","tCleanup","lCleanup","targetIdx","destroyHooksFn","getParentRElement","getClosestRElement","isMove","nativeAppendOrInsertBefore","nativeParentNode","getInsertInFrontOfRNode","_getInsertInFrontOfRNodeWithI18n","_processI18nInsertBefore","getInsertInFrontOfRNodeWithNoI18n","childRNode","childTNode","parentRNode","getFirstNativeNode","tNodeType","getBeforeNodeForView","elIcuContainerChild","rNodeOrLContainer","projectionNodes","getProjectionNodes","projection","viewIndexInContainer","nextViewIndex","firstTNodeOfView","isHostElement","clearElementContents","rElement","applyNodes","isProjection","rawSlotValue","nextRNode","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","nodeToProject","projectedComponentLView","writeDirectClass","setupStaticAttributes","writeDirectStyle","NO_CHANGE","ɵɵadvance","selectIndexInternal","checkNoChangesMode","ɵɵdirectiveInject","ɵɵinvalidFactory","writeToDirectiveInput","createLView","tHostNode","getUniqueLViewId","getOrCreateTNode","createTNodeAtIndex","createTNode","tParent","insertBeforeIndex","directiveStylingLast","propertyBindings","localNames","initialInputs","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","isInI18nBlock","getCurrentParentTNode","allocExpando","numSlotsToAlloc","allocIdx","executeTemplate","templateFn","prevSelectedIndex","isUpdatePhase","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","addComponentLogic","hostTNode","getOrCreateComponentTView","lViewFlags","componentView","addToViewTree","rendererFactory","createRenderer","setInputsFromAttrs","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","localIndex","incompleteFirstPass","createTView","pipes","constsOrFactory","ssrId","initialViewLength","createViewBlueprint","queries","expandoStartIndex","hostBindingOpCodes","firstUpdatePass","staticViewQueries","staticContentQueries","directiveRegistry","pipeRegistry","_applyRootElementTransformImpl","applyRootElementTransformImpl","rootElement","processTextNodeMarkersBeforeHydration","commentNodesIterator","createNodeIterator","SHOW_COMMENT","acceptNode","getTextNodeContent","FILTER_ACCEPT","FILTER_REJECT","nodes","captureNodeBindings","aliasMap","bindingsResult","hostDirectiveAliasMap","internalName","finalPublicName","addPropertyBinding","bindings","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","viewIndex","childComponentLView","mapPropName","resolveDirectives","localRefs","exportsMap","matchResult","findDirectiveDefMatches","registry","hostDirectiveDefs","hostDirectiveMatches","markAsComponentHost","initializeDirectives","cacheMatchingLocalNames","initTNodeFlags","numberOfDirectives","preOrderHooksFound","preOrderCheckHooksFound","directiveIdx","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","initializeInputAndOutputAliases","hostDirectiveDefinitionMap","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","aliasData","aliasedOutputs","generateInitialInputs","elementIndex","getCurrentDirectiveIndex","invokeHostBindingsInCreationMode","directiveFactory","nodeInjectorFactory","registerHostBindingOpCodes","directiveVarsIdx","elementIndx","lastSelectedElementIdx","elementAttributeInternal","setElementAttribute","strValue","initialInputData","inputsToStore","createLContainer","hostNative","refreshContentQueries","directiveDefIdx","executeViewQueryFn","viewQueryFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","loadComponentRenderer","currentDef","unwrapLView","errorHandler","textBindingInternal","updateTextNode","renderComponent","hostLView","componentHostIdx","componentTView","syncViewWithBlueprint","hostRNode","renderView","finishViewCreation","renderChildComponents","createAndRenderEmbeddedLView","declarationLView","templateTNode","embeddedTView","embeddedLView","declarationViewLQueries","getLViewFromLContainer","shouldAddViewToDom","addLViewToLContainer","addToDOM","insertView","containerLength","addViewToDOM","parentNativeNode","removeLViewFromLContainer","collectNativeNodes","lNode","collectNativeNodesInLContainer","nodesInSlot","lViewInAContainer","lViewFirstChildTNode","freeConsumers","REACTIVE_LVIEW_CONSUMER_NODE","REACTIVE_NODE$1","TEMPORARY_CONSUMER_NODE","viewShouldHaveReactiveConsumer","MAXIMUM_REFRESH_RERUNS$1","detectChangesInternal","notifyErrorHandler","begin","detectChangesInViewWhileDirty","lastIsRefreshingViewsValue","detectChangesInView","retries","inlineEffectRunner","refreshView","returnConsumerToPool","currentConsumer","getOrBorrowReactiveLViewConsumer","borrowReactiveLViewConsumer","consumerBeforeComputation$1","getActiveConsumer$1","getOrCreateTemporaryConsumer","setBindingIndex","hooksInitPhaseCompleted","markTransplantedViewsForRefresh","detectChangesInEmbeddedViews","processHostBindingOpCodes","opCode","bindingRootIndx","hostBindingFn","detectChangesInChildComponents","notifyEffect","consumerAfterComputation$1","maybeReturnReactiveLViewConsumer","detectChangesInViewIfAttached","detectChangesInComponent","shouldRefreshView","consumerPollProducersForChange$1","markViewDirty","dirtyBitsToUse","ViewRef$1","_cdRefInjectingView","_attachedToViewContainer","viewRefs","reattach","checkNoChanges","attachToViewContainerRef","detachFromAppRef","attachToAppRef","appRef","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","createEmbeddedViewImpl","createTemplateRef","REF_EXTRACTOR_REGEXP","getNoOffsetIndex","locateNextRNode","noOffsetIndex","locateI18nRNodeByIndex","i18nNodes","locateRNodeByPath","referenceNode","navigationInstructions","decompressNodeLocation","refNodeId","refNodeName","ɵɵresolveBody","navigateToNode","instructions","previousTNodeParent","previousTNode","isFirstElementInNgContainer","previousRElement","noOffsetPrevSiblingIndex","segmentHead","siblingAfter","_isI18nHydrationSupportEnabled","cleanupDehydratedIcuData","dehydratedIcuData","cases","case","removeDehydratedViews","removeDehydratedView","nodesRemoved","currentRNode","cleanupLContainer","cleanupLView","cleanupI18nHydrationData","dehydratedIcuDataMap","_findMatchingDehydratedViewImpl","findMatchingDehydratedViewImpl","findMatchingDehydratedView","ChangeDetectionScheduler","ZONELESS_ENABLED","ZONELESS_SCHEDULER_DISABLED","SCHEDULE_IN_ROOT_ZONE","ComponentRef$1","ComponentFactory$1","_NullComponentFactoryResolver","noComponentFactoryError","ComponentFactoryResolver$1","RendererFactory2","Renderer2","injectRenderer2","nodeAtIndex","Sanitizer","isNgModule","computeStaticStyling","writeToHost","ComponentFactoryResolver","ComponentFactory","toRefArray","isInputMap","templateName","isSignal","refArray","stringifyCSSSelectorList","selectorList","isBoundToModule","rootSelectorOrNode","environmentInjector","realEnvironmentInjector","rootViewInjector","hostRenderer","locateHostElement","elementOrSelector","preserveContent","selectRootElement","applyRootElementTransform","getNamespace","rootFlags","rootTView","rootLView","tElementNode","rootComponentDef","rootDirectives","createRootComponentTNode","createRootComponentView","applyRootComponentStyling","viewRenderer","setRootNodeAttributes","extractAttrsAndClassesFromSelector","projectNodes","nodesforSlot","createRootComponent","hostFeatures","rootTNode","LifecycleHooksFeature","ComponentRef","_rootLView","previousInputValues","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","indexOrOptions","insertImpl","componentFactoryOrType","isComponentFactory","isType","contextInjector","viewAttachedToContainer","prevIdx","prevLContainer","prevVCRef","adjustedIdx","getOrCreateViewRefs","newIndex","viewRefsArr","detachedView","_locateOrCreateAnchorNode","createAnchorNode","_populateDehydratedViewsInLContainer","commentNode","insertAnchorNode","nativeNextSibling","populateDehydratedViewsInLContainerImpl","isInSkipHydrationBlock","serializedViews","dehydratedViews","locateDehydratedViewsInContainer","serializedView","locateOrCreateAnchorNode","LQuery_","queryList","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","splitQueryMultiSelectors","locator","TQueries_","elementStart","elementEnd","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","tNodeIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","lQuery","tQueryMatches","matchedNodeIdx","collectQueryResults","lViewResults","embeddedLViews","createLQuery","storeCleanupWithContext","createTQuery","getQueryResults","markedFeatures","performanceMarkFeature","mark","signalFn","createSignal","getter","createSignal$1","updateFn","signalUpdateFn","updater","signalUpdateFn$1","asReadonly","signalAsReadonlyFn","readonlyFn","isWritableSignal","ɵɵInheritDefinitionFeature","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","mergeInputsWithTransforms","defData","mergeHostAttrsAcrossInheritance","minifiedName","prevViewQuery","prevContentQueries","prevHostBindings","ɵɵInputTransformsFeature","NgModuleRef$1","NgModuleFactory$1","createNgModule","NgModuleRef","runInjectorInitializers","_bootstrapComponents","destroyCbs","_r3Injector","NgModuleFactory","moduleType","EnvironmentNgModuleRefAdapter","debugName","runEnvironmentInitializers","createEnvironmentInjector","isListLikeIterable","isJsObject","updateBinding","getBinding","bindingUpdated","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","bindingUpdated4","exp4","isDetachedByI18n","declareTemplate","declarationTView","localRefsIndex","templateFirstCreatePass","tViewConsts","comment","_locateOrCreateContainerAnchor","populateDehydratedViewsInLContainer","ɵɵtemplate","attrsIndex","createContainerAnchorImpl","locateOrCreateContainerAnchorImpl","isNodeCreationMode","assertNotInReactiveContext","extraContext","AfterRenderPhase","EarlyRead","Write","MixedReadWrite","Read","AfterRenderManager","AfterRenderImpl","sequences","deferredRegistrations","executing","PHASES","erroredOrDestroyed","pipelinedValue","afterRun","once","register","unregister","AfterRenderSequence","unregisterOnDestroy","afterNextRender","callbackOrSpec","afterRenderImpl","manager","getHooks","earlyRead","write","mixedReadWrite","NOOP_AFTER_RENDER_REF","ɵɵattribute","interpolation1","v0","suffix","toTStylingRange","getTStylingRangePrev","tStylingRange","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","setTStylingRangeNextDuplicate","markDuplicates","tStylingKey","isPrevDir","tStylingAtIndex","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","getLastParsedValue","parseClassNameNext","consumeClassToken","consumeWhitespace","parseStyleNext","consumeStyleKey","consumeSeparator","consumeStyleValue","ch1","ch2","ch3","lastChIndex","consumeQuotedText","resetParserState","quoteCharCode","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","ɵɵstyleMap","checkStylingMap","styleKeyValueArraySet","styleStringParser","parseStyle","ɵɵclassMap","classKeyValueArraySet","classStringParser","parseClassName","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","oldIndex","oldKey","newKey","setKey","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","isHostBindings","wrapInStaticStylingKey","stylingKey","hostDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","isClassBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","previousNode","setTStylingRangePrev","markDuplicateOfResidualStyling","currentDirective","desiredMarker","currentMarker","stringKey","tRange","higherPriorityValue","getTStylingRangeNextDuplicate","findStylingValue","isStylingValuePresent","getTStylingRangePrevDuplicate","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵclassMapInterpolate1","LiveCollection","updateValue","swap","index1","index2","startIdx","endIdx","endItem","startItem","prevIndex","newIdx","valuesMatching","liveIdx","liveValue","trackBy","attachPreviouslyDetached","prevCollection","detachedItems","createOrAttach","liveCollection","initLiveItemsInTheFuture","UniqueValueMultiKeyMap","kvMap","_vMap","prevValue","vMap","ɵɵconditional","matchingTemplateIndex","contextValue","prevMatchingTemplateIndex","prevContainer","getLContainer","nextLContainerIndex","nextContainer","getExistingTNode","RepeaterContext","$count","ɵɵrepeaterTrackByIndex","ɵɵrepeaterTrackByIdentity","RepeaterMetadata","hasEmptyBlock","ɵɵrepeaterCreate","trackByUsesComponentInstance","emptyTemplateFn","emptyDecls","emptyVars","emptyTagName","emptyAttrsIndex","boundTrackBy","LiveCollectionLContainerImpl","operationsCounter","needsIndexUpdate","detachExistingView","recordCreate","recordDestroy","updateIndexes","getExistingLViewFromLContainer","ɵɵrepeater","metadataSlotIdx","hostTView","containerIndex","itemTemplateTNode","reconcile","newCollection","liveKeysInTheFuture","liveStartIdx","liveEndIdx","newEndIdx","liveStartValue","newStartValue","isStartMatching","liveEndValue","newEndValue","isEndMatching","liveStartKey","liveEndKey","newStartKey","newEndKey","newCollectionIterator","newIterationResult","liveKey","isCollectionEmpty","emptyTemplateIndex","lContainerForEmpty","emptyTemplateTNode","ɵɵelementStart","elementStartFirstCreatePass","_locateOrCreateElementNode","hasDirectives","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","isSkipHydrationRootTNode","leaveSkipHydrationBlock","decreaseElementDepthCount","hasClassInput","hasStyleInput","ɵɵelement","locateOrCreateElementNodeImpl","enterSkipHydrationBlock","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","_locateOrCreateElementContainerNode","ɵɵelementContainerEnd","ɵɵelementContainer","locateOrCreateElementContainerNode","ngContainerSize","getNgContainerSize","ɵɵgetCurrentView","ɵɵhostProperty","ɵɵsyntheticHostProperty","localeEn","plural","LOCALE_DATA","findLocaleData","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocalePluralCase","LocaleDataIndex","PluralCase","ng","common","locales","FirstDayOfWeek","WeekendRange","CurrencyCode","CurrencySymbol","CurrencyName","Currencies","Directionality","DEFAULT_LOCALE_ID","LOCALE_ID$1","stashEventListener","listenerFn","ɵɵlistener","useCapture","eventTargetResolver","listenerInternal","ɵɵsyntheticHostListener","isTNodeDirectiveHost","processOutputs","lCleanupIndex","idxOrTargetGetter","existingListener","findExistingListener","cleanupEventName","listenerIdxInLCleanup","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","propsLength","executeListenerWithErrorHandling","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","ɵɵnextContext","nextContextImpl","walkUpViews","nestingLevel","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","ɵɵprojectionDef","componentNode","projectionHeads","newArray","componentChild","slotIndex","ɵɵprojection","selectorIndex","fallbackTemplateFn","fallbackDecls","fallbackVars","fallbackIndex","insertFallbackContent","fallbackTNode","fallbackLContainer","applyProjection","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","interpolatedValue","ɵɵcontentQuery","createContentQuery","saveContentQueryAndDirectiveIndex","tViewContentQueries","ɵɵviewQuery","createViewQuery","ɵɵqueryRefresh","isCreationMode","ɵɵloadQuery","loadQueryInternal","ɵɵreference","ɵɵtext","textNative","_locateOrCreateTextNode","locateOrCreateTextNodeImpl","ɵɵtextInterpolate","ɵɵtextInterpolate1","interpolated","ɵɵtextInterpolate2","v1","interpolation2","ɵɵtextInterpolate3","v2","interpolation3","ɵɵtextInterpolate4","v3","interpolation4","ɵɵtwoWayProperty","ɵɵtwoWayBindingSet","canWrite","ɵɵtwoWayListener","UNINITIALIZED_LET","ɵɵdeclareLet","ɵɵstoreLet","ɵɵreadContextLet","resolveProvider","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","multiFactory","factoryFn","componentProviders","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","providerIsClassProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","StandaloneService","cachedInjectors","getOrCreateStandaloneInjector","standaloneInjector","ɵɵStandaloneFeature","ɵɵsetComponentScope","ɵɵpureFunction0","slotOffset","pureFn","ɵɵpureFunction1","exp","pureFunction1Internal","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","pureFunction3Internal","ɵɵpureFunction4","pureFunction4Internal","bindingRoot","getPureFunctionReturnValue","ɵɵpureFunction5","exp5","ɵɵpureFunction6","exp6","ɵɵpureFunction7","exp7","ɵɵpureFunctionV","exps","pureFunctionVInternal","returnValueIndex","lastReturnValue","ɵɵpipe","pipeName","getPipeDef","pipeFactory","pipeInstance","ɵɵpipeBind1","isPure","ɵɵpipeBind2","ɵɵpipeBind3","ɵɵtemplateRefExtractor","Version","full","major","minor","Console","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","Testability","testabilityGetter","_isZoneStable","_callbacks","taskTrackingZone","setTestabilityGetter","addToWindow","_watchAngularEvents","_runCallbacksIfReady","doneCb","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","whenStable","registerApplication","unregisterApplication","findProviders","using","exactMatch","TestabilityRegistry","_applications","testability","unregisterAllApplications","getTestability","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","isSubscribable","APP_INITIALIZER","ApplicationInitStatus","initialized","donePromise","rej","appInits","runInitializers","asyncInitPromises","initResult","observableAsPromise","APP_BOOTSTRAP_LISTENER","optionsReducer","objs","whenStableStore","_bootstrapListeners","_runningTick","_destroyListeners","_views","internalErrorHandler","afterRenderManager","zonelessEnabled","dirtyFlags","deferredDirtyFlags","externalTestViews","beforeRender","afterTick","componentTypes","allViews","stable","componentOrFactory","cf","compRef","_loadComponent","tick","_tick","synchronize","runs","synchronizeOnce","useGlobalCheck","detectChangesInViewIfRequired","syncDirtyFlagsWithViews","listeners","warnIfDestroyed","applicationRef","cachedWhenStable","whenStablePromise","isFirstPass","ModuleWithComponentFactories","ngModuleFactory","componentFactories","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","NgZoneChangeDetectionScheduler","initialize","_onMicrotaskEmptySubscription","runningTick","internalProvideZoneChangeDetection","ngZoneFactory","ignoreChangesOutsideZone","getNgZoneOptions","ngZoneChangeDetectionScheduler","ZoneStablePendingTask","eventCoalescing","runCoalescing","ChangeDetectionSchedulerImpl","taskService","disableScheduling","zoneIsDefined","schedulerTickApplyArgs","__scheduler_tick__","angularZoneId","cancelScheduledCallback","useMicrotaskScheduler","pendingRenderTaskId","shouldScheduleTick","scheduleCallback","getGlobalLocale","$localize","DEFAULT_CURRENCY_CODE","PLATFORM_DESTROY_LISTENERS","isApplicationBootstrapConfig","PlatformRef","_modules","bootstrapModuleFactory","moduleFactory","allAppProviders","getNgZone","ngZoneToUse","ngZoneEventCoalescing","ngZoneRunCoalescing","createNgModuleRefWithProviders","envInjector","r3Injector","exceptionHandler","onErrorSubscription","destroyListener","onPlatformDestroyListeners","platformInjector","allPlatformModules","_callAndReportToErrorHandler","initStatus","setLocaleId","rootComponent","moduleDoBootstrap","ngDoBootstrap","bootstrapModule","compilerOptions","compileNgModuleFactory","destroyListeners","_platformInjector","ALLOW_MULTIPLE_PLATFORMS","createPlatformFactory","parentPlatformFactory","extraProviders","getPlatform","platformProviders","createPlatform","publishSignalConfiguration","setThrowInvalidWriteToSignalError","setThrowInvalidWriteToSignalError$1","runPlatformInitializers","createPlatformInjector","assertPlatform","enableProdMode","injectChangeDetectorRef","createViewRef","isPipe","DefaultIterableDifferFactory","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","_nextRemoved","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","_nextAdded","forEachMovedItem","_nextMoved","_nextIdentityChange","check","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","previousRecord","_prev","_remove","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","extend","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","platformCore","ApplicationModule","isHydrationSupportEnabled","withDomHydration","setIsI18nHydrationSupportEnabled","verifySsrContentsIntegrity","hydrationMarker","COMMENT_NODE","enableHydrationRuntimeSupport","enableRetrieveHydrationInfoImpl","enableLocateOrCreateElementNodeImpl","enableLocateOrCreateTextNodeImpl","enableLocateOrCreateElementContainerNodeImpl","enableLocateOrCreateContainerAnchorImpl","enableLocateOrCreateContainerRefImpl","enableFindMatchingDehydratedViewImpl","enableApplyRootElementTransformImpl","whenStableWithTimeout","cleanupDehydratedViews","createComputed","createComputed$1","nonReactiveReadsFn","APP_EFFECT_SCHEDULER","EffectScheduler","ZoneAwareEffectScheduler","queuedEffectCount","queues","scheduleEffect","enqueue","creationZone","flushQueue","EffectHandle","effectFn","allowSignalWrites","watcher","createWatch","registerOnCleanup","isInNotificationPhase","destroyWatchNode","isWatchNodeDestroyed","createWatch$1","onCleanup","runEffect","effect","reflectComponentType","StepperMode","HORIZONTAL","RADIAL","allowSparse","arrayLimit","decodeDotInKeys","decoder","ignoreQueryPrefix","interpretNumericEntities","parameterLimit","parseArrays","strictDepth","throwOnLimitExceeded","parseArrayValue","currentArrayLength","parseKeys","givenKey","valuesParsed","chain","parentKey","leaf","cleanRoot","decodedRoot","parseObject","normalizeParseOptions","tempObj","cleanStr","skipIndex","bracketEqualsPos","encodedVal","existing","parseValues","itemContent_r4","MenuListComponent_For_2_li_0_Template","MenuListComponent_For_2_a_2_Template","MenuListComponent_For_2_button_3_Template","MenuListComponent_ng_template_3_fcom_icon_0_Template","MenuListComponent_ng_template_3_fcom_icon_2_Template","MenuListComponent_ng_template_3_fcom_icon_3_Template","MenuListComponent","itemClicked","MenuListComponent_For_2_Template","MenuListComponent_ng_template_3_Template","getGridClass","SECTION","headerLevelTags","HEADER_LEVEL","headerFontLevelTags","getViewType","getBackgroundImageForCmsTemplate","getShowForLoginStatus","hasLoggedIn","SHOW_FOR_LOGGED_IN","hasNotLoggedIn","SHOW_FOR_NOT_LOGGED_IN","getShowForProfileTiers","tierTagMap","SHOW_FOR_BASIC_TIER","SHOW_FOR_SILVER_TIER","SHOW_FOR_GOLD_TIER","SHOW_FOR_PLATINUM_TIER","SHOW_FOR_PLATINUM_LUMO_TIER","SHOW_FOR_JUNIOR_TIER","resolveOldWwwLinks","recursiveParse","recursiveParseMapper","hasPersonalizedContent","personalizationParameters","parseCmsTemplate","finUniversalResponseStatus","serverResponseCodeHandler","setterRef","contentUrl","response$","cacheControl","edgeCacheTag","setUniversalResponseStatus","Expires","LetDirective","benefitText","footnoteText","benefitMode","showForgotPassword","scrollOnCta","onJoinClick","onLoginClick","onForgotPasswordClick","redirectToForgotPassword","LoginCardComponent_fcom_icon_5_Template","LoginCardComponent_ul_7_Template","LoginCardComponent_p_8_Template","LoginCardComponent_span_14_Template","updateCalendarDates","setHistogramMonth","uiLabels_r3","datePickerTitleLabel$","calendarRange","dayTemplate_r6","isLoading$","tmp_16_0","calendarPrices$","calendarHeader_r5","scrollToHistogramMonth$","subTitle$","subTitleTemplate_r4","PriceCalendarComponent_ng_container_0_ng_container_2_fcom_datepicker_1_Template","renderDatepicker$","CMS_STYLE_OVERRIDE","subTitle_r7","PriceCalendarComponent_ng_container_0_ng_template_4_ng_container_0_Template","pricePerAdult$","flexibleDates$","startNewSearch","emitCTAClicked","ctaLabel","ctaDisabled$","PriceCalendarComponent_ng_container_0_ng_container_2_Template","PriceCalendarComponent_ng_container_0_ng_template_4_Template","PriceCalendarComponent_ng_container_0_Conditional_11_Template","PriceCalendarComponent_ng_container_0_Conditional_12_Template","PriceCalendarComponent_ng_container_0_Conditional_15_Template","PriceCalendarComponent_ng_container_0_Conditional_16_Template","datesSelected$","handleHistogramClick","handleBarsScrolled","selectedHistogramMonth$","openWithParams$","PriceCalendarComponent_ng_template_4_div_0_Conditional_6_ng_container_1_Template","price_r12","priceTemplate_r13","dayValue_r14","PriceCalendarComponent_ng_template_4_div_0_Conditional_7_ng_container_1_Template","amount_r15","PriceCalendarComponent_ng_template_4_div_0_ng_template_8_ng_container_0_Template","PriceCalendarComponent_ng_template_4_div_0_Conditional_10_Conditional_1_Template","showEnhancedCalendar_r18","PriceCalendarComponent_ng_template_4_div_0_Conditional_3_Template","PriceCalendarComponent_ng_template_4_div_0_Conditional_6_Template","PriceCalendarComponent_ng_template_4_div_0_Conditional_7_Template","PriceCalendarComponent_ng_template_4_div_0_ng_template_8_Template","PriceCalendarComponent_ng_template_4_div_0_Conditional_10_Template","dayString_r19","PriceCalendarComponent_ng_template_4_div_0_Template","ONLY_DATES","enablePreFlightSearchTracking","modalClose","ctaClicked","startingFromPrice$","params$","getPriceCalendarCTAParams","ctaParams","departureFlight","convertToReturnTrip","newDates","travelDatesValues","selectedMonthIndex","selectedBar","isCheapest","_direction","isChecked","onCancelSelection","onlyOnce","pre","updateParams","identifier","PriceCalendarComponent_ng_container_0_Template","PriceCalendarComponent_ng_template_2_Template","PriceCalendarComponent_ng_template_4_Template","PriceBreakdownRenewedComponent_ng_template_0_ng_container_2_Template","PriceBreakdownRenewedComponent_ng_template_0_span_4_Template","label_r9","PriceBreakdownRenewedComponent_ng_template_2_ng_container_2_Template","bold_r11","labelContent_r10","prices_r15","ctx_r15","titleLine_r17","priceLine_r19","sum_r18","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_38_ng_container_1_ng_container_1_Template","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_38_ng_container_1_Template","summary_r20","sum_r21","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_42_ng_container_1_ng_container_1_Template","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_42_ng_container_1_Template","summary_r22","PriceBreakdownRenewedComponent_fin_expand_6_ng_template_31_Template","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_36_Template","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_38_Template","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_40_Template","PriceBreakdownRenewedComponent_fin_expand_6_ng_container_42_Template","expand_r23","CREDIT_OR_DEBIT_CARD_BLOCK","labelContent_r24","showTravelExtrasTitle$","summary$","showSafTitle$","tax_r25","ENVIRONMENTAL_SURCHARGE","PriceBreakdownRenewedComponent_table_13_tr_10_ng_container_2_Template","PriceBreakdownRenewedComponent_table_13_tr_10_ng_template_3_Template","environmentalSurcharge_r26","PriceBreakdownRenewedComponent_table_13_tr_10_Template","totalTaxes_r27","totalTaxes","passenger_r28","tax_r29","pax_r30","environmentalSurcharge","fee_r31","_c18","service_r32","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_43_ng_container_1_Template","service_r33","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_45_ng_container_1_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_li_39_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_li_40_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_41_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_42_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_43_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_44_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_ng_container_45_Template","expandedLine_r36","breakdown_r35","expand_r34","hasOtherServices","PriceBreakdownRenewedComponent_ng_container_17_div_2_Template","PriceBreakdownRenewedComponent_ng_container_17_div_4_Template","PriceBreakdownRenewedComponent","serviceCategoryHasDiscountedServices","categoryPriceItem","pricePerPassenger","summaryAcc","categoryHasDiscountedServices","summaryOriginalTotal","totalTaxes$","taxAcc","passengerEnvironmentalSurcharge","surchargeAmount","PriceBreakdownRenewedComponent_ng_template_0_Template","PriceBreakdownRenewedComponent_ng_template_2_Template","PriceBreakdownRenewedComponent_ng_template_4_Template","PriceBreakdownRenewedComponent_fin_expand_6_Template","PriceBreakdownRenewedComponent_cms_unstyled_fragment_11_Template","PriceBreakdownRenewedComponent_table_13_Template","PriceBreakdownRenewedComponent_ng_container_17_Template","AMERICAN_AIRLINES","BRAATHENS_REGIONAL_AIRLINES","BRITHIS_AIRWAYS","CATHAY_PACIFIC","DRAGONAIR","IBERIA","JAPAN_AIRLINES","JUNEYAO_AIRLINES","LAN_AIRLINES","MALAYSIAN","QANTAS","QATAR_AIRWAYS","ROYAL_JORDANIAN","S7_AIRLINES","SRI_LANKAN","TAM_AIRLINES","US_AIRWAYS","CHECKBOX_SELECTED","CHECKBOX_UNSELECTED","FormInputCheckboxComponent_span_8_span_3_Template","labelClass","FormInputCheckboxComponent_span_9_span_4_Template","FormInputCheckboxComponent_div_10_span_1_Template","checkboxValue","FormInputCheckboxComponent_fcom_icon_6_Template","FormInputCheckboxComponent_fcom_icon_7_Template","FormInputCheckboxComponent_span_8_Template","FormInputCheckboxComponent_span_9_Template","FormInputCheckboxComponent_div_10_Template","currentWidth","DESKTOP","LAPTOP","breakpointName","index_r2","bound_r4","locationTitle","itineraryModal","ItineraryDetailComponent","slideIndexSubject$","bounds$","slideIndex","ItineraryDetailComponent_div_0_Template","ItineraryDetailComponent_fin_itinerary_4_Template","hideTitle","waitingFor","MutationObserverFactory","ObserversModule","mediaQueriesForWebkitCompatibility","mediaQueryStyleNode","MediaMatcher","_nonce","_matchMedia","matchMedia","noopMatchMedia","createEmptyStyleRule","sheet","insertRule","BreakpointObserver","_mediaMatcher","_zone","_queries","_destroySubject","isMatched","splitQueries","mediaQuery","_registerQuery","mql","stateObservable","breakpointStates","a1","a2","ID_DELIMITER","addAriaReferencedId","getAriaReferenceIds","existingId","removeAriaReferencedId","filteredIds","ListKeyManager","_items","_activeItemIndex","_activeItem","_wrap","_letterKeyStream","_typeaheadSubscription","_vertical","_allowedModifierKeys","_homeAndEnd","_pageUpAndDown","_skipPredicateFn","_pressedLetters","tabOut","_itemChangesSubscription","_itemsChanged","_effectRef","skipPredicate","withWrap","shouldWrap","withVerticalOrientation","withHorizontalOrientation","_horizontal","withAllowedModifierKeys","withTypeAhead","debounceInterval","letter","_getItemsArray","setActiveItem","cancelTypeahead","withHomeAndEnd","withPageUpDown","previousActiveItem","updateActiveItem","onKeydown","isModifierAllowed","modifier","DOWN_ARROW","setNextItemActive","UP_ARROW","setPreviousItemActive","RIGHT_ARROW","LEFT_ARROW","setFirstItemActive","setLastItemActive","targetIndex","_setActiveItemByIndex","itemsLength","toLocaleUpperCase","Z","NINE","activeItemIndex","activeItem","isTyping","_setActiveItemByDelta","itemArray","_setActiveInWrapMode","_setActiveInDefaultMode","fallbackDelta","ActiveDescendantKeyManager","InteractivityChecker","hasGeometry","isTabbable","frameElement","getFrameElement","getWindow","getTabIndexValue","tabIndexValue","isPotentiallyTabbableIOS","isFocusable","isPotentiallyFocusable","isHiddenInput","isInputElement","isNativeFormElement","isAnchorWithHref","isAnchorElement","hasValidTabIndex","ignoreVisibility","FocusTrap","_startAnchor","_endAnchor","_toggleAnchorTabIndex","_checker","deferAnchors","_hasAttached","startAnchorListener","focusLastTabbableElement","endAnchorListener","focusFirstTabbableElement","attachAnchors","startAnchor","endAnchor","_createAnchor","focusInitialElementWhenReady","_executeOnStable","focusInitialElement","focusFirstTabbableElementWhenReady","focusLastTabbableElementWhenReady","_getRegionBoundary","markers","_getFirstTabbableElement","_getLastTabbableElement","redirectToElement","focusableChild","tabbableChild","toggleAnchors","FocusTrapFactory","deferCaptureElements","CdkTrapFocus","focusTrap","_focusTrapFactory","_previouslyFocusedElement","autoCapture","_captureFocus","autoCaptureChange","touch","radiusX","radiusY","INPUT_MODALITY_DETECTOR_OPTIONS","INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS","ignoreKeys","ALT","CONTROL","MAC_META","META","SHIFT","modalityEventListenerOptions","InputModalityDetector","mostRecentModality","_modality","_mostRecentTarget","_lastTouchMs","_onKeydown","_onTouchstart","modalityDetected","modalityChanged","FocusMonitorDetectionMode","IMMEDIATE","EVENTUAL","FOCUS_MONITOR_DEFAULT_OPTIONS","captureEventListenerOptions","FocusMonitor","_inputModalityDetector","_windowFocused","_originFromTouchInteraction","_elementInfo","_monitoredElementCount","_rootNodeFocusListenerCount","_windowFocusListener","_windowFocusTimeoutId","_stopInputModalityDetector","_rootNodeFocusAndBlurListener","_onFocus","_onBlur","_detectionMode","detectionMode","monitor","checkChildren","_getDocument","cachedInfo","_registerGlobalListeners","stopMonitoring","elementInfo","_setClasses","_removeGlobalListeners","focusVia","_getClosestElementsInfo","_originChanged","_setOrigin","_info","_getWindow","_getFocusOrigin","focusEventTarget","_shouldBeAttributedToTouch","_lastFocusOrigin","_isLastInteractionFromInputLabel","isFromInteraction","_originTimeoutId","relatedTarget","_emitOrigin","rootNodeFocusListeners","modality","mostRecentTarget","CdkMonitorFocus","_focusMonitor","_focusOrigin","cdkFocusChange","focusOrigin","_monitorSubscription","HighContrastMode","BLACK_ON_WHITE","WHITE_ON_BLACK","BLACK_ON_WHITE_CSS_CLASS","WHITE_ON_BLACK_CSS_CLASS","HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS","HighContrastModeDetector","_breakpointSubscription","_hasCheckedHighContrastMode","getHighContrastMode","testElement","documentWindow","computedStyle","computedColor","bodyClasses","A11yModule","BookingGuard","initialRoute","_route","currentCartStatus","cUrl","ReferenceError","ComboBoxComponent_label_2_span_4_Template","ComboBoxComponent_label_2_ng_template_5_Template","ComboBoxComponent_label_2_button_7_Template","selectedOption","selectLabel","ComboBoxComponent_button_7_ng_container_7_span_1_Template","ComboBoxComponent_button_7_ng_container_7_span_2_Template","dropDownOpen$","onInputEnter","handleKeyDown","ComboBoxComponent_button_7_fcom_icon_5_Template","ComboBoxComponent_button_7_span_6_Template","ComboBoxComponent_button_7_ng_container_7_Template","ComboBoxComponent_button_7_fcom_icon_8_Template","openDropDown","clearSearch","CLOSE_DELETE_BLOCK","clearSearchLabel","handleSearch","ComboBoxComponent_div_8_fcom_icon_5_Template","ComboBoxComponent_div_8_fcom_icon_button_7_Template","searchLabel","activeIndex$","option_r10","selectOption","optionTemplate","ComboBoxComponent_li_12_span_4_Template","ComboBoxComponent_li_12_span_5_Template","i_r12","infoText","ComboBoxComponent_div_15_span_1_Template","dropDown","buttonContainer","closeDropDown","searchable","noMaxHeight","searchEnabled$","bottomPosition$","dropDownOpen","searchInput","selectOptionByValue","optionsList","behaviour","bottomPosition","optionMultiplier","heightBasedOnMinNumOfOptions","heightBasedOnBottomPosition","dropDownStyle","selectCurrentActiveOption","_activeIndex","filteredOptions","closeDropDownOnFocusout","currentActiveIndex","maxIndex","ComboBoxComponent_label_2_Template","ComboBoxComponent_button_7_Template","ComboBoxComponent_div_8_Template","ComboBoxComponent_li_12_Template","ComboBoxComponent_div_14_Template","ComboBoxComponent_div_15_Template","startLoading","setSelectionsForFragment","setSelectionForFragmentForTraveler","setCoverForId","setServiceAvailability","setCampaignShown","setUpsell","clearUpsell","resetCategory","OffersPricePipe","offerPrice$","offerCurrencyCode$","doPriceRounding","SyntaxError","dayName_r1","weekDays","$index_r2","day_r4","MonthComponent_For_10_For_2_Conditional_0_Template","shouldShowEmptyWeeks","MonthComponent_For_10_For_2_Template","week_r5","MonthComponent","monthId","onKeyDown","processKey","MonthComponent_For_7_Template","MonthComponent_For_10_Template","_paxDetailsPassengers","bfs","_additionalEmails","pxd","additionalEmails","filteredPaxDetails","_filteredPaxDetailsPassengers","ParseUserInput","getISOString","dateArray","formatArray","dateObj","subTitle","titleAreaConfig","titleStyle","dateSelectedLabel","DatepickerComponent_Conditional_4_ng_container_0_Template","endDateError","headerTemplate","topNotification","closeDatepicker","DEFAULT_TITLE_AREA_CONFIGURATION","titleAreaStyle","titleAreaConfiguration","configuration","doneBtnHidden","focusHeaderOnInit","selectedDatesChange","startDateError","clearDates$","selectableDatesRange","selectedDateSelection","dateArrayToDateSelection","titleElement","onDatesSelected","dateLabels","selectedDate","clearErrors","isEndDate","userInputISOString","dateFormatUserInput","invalidDate","disabledDateRanges","outOfRange","verifyDateSelection","startAfterEnd","endBeforeStart","clearDates","currentCorrespondingDateSelection","isAlreadySelected","isEndBeforeStart","isOutOfRange","dateSelection","isWithinSelectableRange","DatepickerComponent_h2_3_Template","DatepickerComponent_Conditional_4_Template","DatepickerComponent_div_13_Template","DatepickerComponent_span_16_Template","DatepickerComponent_fcom_button_17_Template","DatepickerComponent_ng_container_21_Template","DatepickerComponent_fcom_notification_22_Template","DatepickerComponent_div_24_Template","DatepickerComponent_section_25_Template","setLocalizations","SELECT_BOUNDS","SELECT_DATES","SELECT_MATRIX","VOLUNTARY_CHANGE_ERROR_STEPS","PAYMENT_ERROR","ERROR_ROUTE","VOLUNTARY_CHANGE_STEPS_ARRAY","isResizeable","rows","FormInputTextComponent_div_9_span_1_Template","FormInputTextComponent_div_9_span_2_Template","FormInputTextComponent_div_9_span_3_Template","FormInputTextComponent_div_9_span_4_Template","FormInputTextComponent_div_9_span_5_Template","characterCount","characterLimit","visualDisable","textareaElement","FormInputTextComponent_span_5_Template","FormInputTextComponent_input_6_Template","FormInputTextComponent_span_7_Template","FormInputTextComponent_textarea_8_Template","FormInputTextComponent_div_9_Template","FormInputTextComponent_div_10_Template","labelPrefix","labelSuffix","date_r1","selectedDeparture$","selectedReturn$","PriceMatrixComponent_tr_10_th_1_Template","showReturn","showDeparture","isBookingCalendar","PriceMatrixComponent_th_13_div_2_fcom_icon_5_Template","PriceMatrixComponent_th_13_div_2_fcom_icon_6_Template","PriceMatrixComponent_th_13_div_1_Template","PriceMatrixComponent_th_13_div_2_Template","departureDate_r3","dateBlock_r4","returnDate_r5","departureDate_r7","cheapestPrice","pricesForDates","PriceMatrixComponent_tr_15_th_1_Template","PriceMatrixComponent_tr_15_th_2_Template","PriceMatrixComponent_tr_15_td_3_Template","first_r8","departureDates","GtmDateAvailability","AVAILABLE","UNAVAILABLE","PriceMatrixComponent","announceDates$","searchParameters","isChangeCalendar","toChange","weekFromDate","returnDates","getMatrixPrices","initialDeparture","initialReturn","initialPrice","trackDateAvailability","hasPricesForDates","baseDate","departurePrices","useBalancePrice","Q","analyticsToken","PriceMatrixComponent_ng_template_0_Template","PriceMatrixComponent_span_3_Template","PriceMatrixComponent_col_9_Template","PriceMatrixComponent_tr_10_Template","PriceMatrixComponent_th_12_Template","PriceMatrixComponent_th_13_Template","PriceMatrixComponent_th_14_Template","PriceMatrixComponent_tr_15_Template","setNoAvailability","clearSelections","resetSeatSelections","setSeatForFlight","setSeatMap","loadSeatSelectionsFromCart","objectProto","getKeys","argsArgArrayOrObject","isPOJO","ondOffer_r3","OndMarketingOffersComponent_div_0_div_4_button_17_Template","OndMarketingOffersComponent_div_0_h2_1_Template","OndMarketingOffersComponent_div_0_div_4_Template","OndMarketingOffersComponent","OndMarketingOffersComponent_div_0_Template","OndMarketingOffersComponent_div_2_Template","setTravelType","creationStart","booking_actions_reset","creationSuccess","creationError","loadStart","loadError","updateStart","updateError","updateNotCompleted","setCartData","isUpdatingPartialCart","errorUpdatingPartialCart","clearUpdatingPartialCart","fareRulesLoadStart","fareRulesLoadEnd","fareRulesError","fareRulesCreateCategories","fareRulesClear","cart_actions_reset","setOffers","offerSetLastRequestParams","offers_actions_reset","LocationsAutocompleteComponent_div_13_span_1_Template","LocationsAutocompleteComponent_div_13_span_2_Template","forbiddenLocation","results_r3","LocationsAutocompleteComponent_div_25_span_1_Template","LocationsAutocompleteComponent_div_25_span_2_Template","AutocompleteTheme","panelClosingActions","closePanel","displayLocation","optionsAmount$","MatAutocompleteTrigger","LocationsAutocompleteComponent_span_7_Template","LocationsAutocompleteComponent_div_8_Template","LocationsAutocompleteComponent_span_12_Template","LocationsAutocompleteComponent_div_13_Template","LocationsAutocompleteComponent_mat_option_16_Template","LocationsAutocompleteComponent_span_19_Template","LocationsAutocompleteComponent_span_22_Template","LocationsAutocompleteComponent_div_25_Template","auto_r5","origin_r4","ffCard_r1","tierLevelName","oneWorldTierName","PassengerFfCardsComponent_div_0_div_1_div_2_Template","PassengerFfCardsComponent_div_0_div_1_span_3_Template","PassengerFfCardsComponent_div_0_div_1_fcom_tag_4_Template","PassengerFfCardsComponent_div_0_div_1_div_5_Template","PassengerFfCardsComponent_div_0_div_1_Template","PassengerFfCardsComponent","PassengerFfCardsComponent_div_0_Template","bookingWidgetReducer","stateReducer","updatedWarnings","SEASONAL_ROUTE","___","NO_FLIGHTS_FOR_ROUTE","____","NO_AWARD_FLIGHTS_FOR_ROUTE","_____","secondaryButtonClicked","secondaryButtonDisabled","secondaryButtonTitle","CtaButtonComponent","ButtonPosition","ButtonLayout","showSecondaryButton","isTabletUp","GRID","ROW","buttonClicked","CtaButtonComponent_fcom_button_11_Template","GRID_FULL","GRID_TWO_THIRDS_RIGHT","COLUMN","openSurveyTrigger$","survey_r4","FeedbackWidgetComponent_ng_container_0_fin_qualtrics_4_Template","navigationEvent$","canShowInViewport$","canShowFeedbackButton$","CHECK_IN_ROOT","serviceVisibility$","canShow","FeedbackWidgetComponent_ng_container_0_Template","animationFrameProvider","AnimationFrameScheduler","flushId","_scheduled","AnimationFrameAction","auditTime","audit","durationSelector","lastValue","durationSubscriber","endDuration","cleanupDuration","ScrollDispatcher","_scrolled","_globalSubscription","_scrolledCount","elementScrolled","deregister","scrollableReference","auditTimeInMs","_addGlobalListener","_removeGlobalListener","ancestorScrolled","ancestors","getAncestorScrollContainers","scrollingContainers","_scrollableContainsElement","scrollableElement","ViewportRuler","_change","_changeListener","_viewportSize","_updateViewportSize","getViewportRect","documentRect","CdkScrollableModule","popResultSelector","getMarketingOfferPrice","mapToMarketingOffers","lowestPriceForFlights","destinationAndPrices","lowestPriceForEconomy","lowestPriceForPremiumEconomy","lowestPriceForBusiness","filterWithoutType","g","filterWithoutContentType","transformListContent","iconNameToUse","cmsPersonalizationParameterValues","toParams","pathToTemplateUrl","whiteListedParams","getWhitelistedCmsParamsMapped","getWhitelistedCmsParams","getCmsPagingParam","linkString","ddsLanguageType","whiteListedQueryParams","pagingParams","pathWithParams","STEPS","BookingSummaryComponent_div_11_fin_booking_summary_flight_5_Template","flowContext","tmp_11_0","BookingSummaryComponent_div_12_fin_booking_summary_traveler_3_Template","travelers$","service$_r9","isLast_r10","hideChangeButton","onlyShowAncillaries","BookingSummaryComponent_div_15_ng_container_2_Template","FLIGHT_OFFER","unpaidServices$","BookingSummaryComponent","tripDetails$","ctaOpenDelayPassed$","isOneWay$","hasUnpaidServices$","BookingSummaryComponent_span_5_Template","BookingSummaryComponent_span_6_Template","BookingSummaryComponent_div_11_Template","BookingSummaryComponent_div_12_Template","BookingSummaryComponent_div_15_Template","SHOPPING_CART","INFO_OUTLINE","StateTransferService","requested","stateKey","ret$","setOrderData","setOrderFetchInformation","setCategoryUpdating","clearCategoryUpdating","resetCategoriesUpdating","order_actions_reset","setPaymentStatus","setPaymentRedirectionUrl","setUpgradeOffer","clearUpgradeOffer","OND_LINK_LIST_SLICE_SIZE","isDestinationCode","transformLocationCode","getFlightType","flightPair","complex","getLocationName","encodeIgnoredSEOTitle","encodeBraces","replaceSpaces","FormFieldsComponent","PENDING_CREATION","CREATION_SUCCESS","CREATION_ERROR","SeatCharacteristics","EXIT","SEAT_AND_MEAL","BASSINET","EXTRA_LEG_SPACE","FRONT_ROW","ECO_COMFORT","PREFERRED","FRONT_OF_CABIN","AISLE","CENTER","PREMIUM","OFFER_NOT_FOUND","UNEXPECTED_ERROR","AMADEUS_MESSAGE","INVALID_HMAC","ORDER_NOT_FOUND","ORDER_GROUP_ERROR","ORDER_CANCELLED","ORDER_GROUP_FETCH_WITH_INFANT","GROUP_ORDER_NOT_TICKETED","ALTERNATIVE_OFFERS_NOT_FOUND","UNABLE_TO_DISPLAY_ORDER","SEVERAL_RECORDS_FOR_TRAVEL_DOCUMENT","ORDER_UNEXPECTED_ERROR","ORDER_TIMEOUT_ERROR","CHECK_IN_ACCEPT_UNRECOVERABLE_FAILURE","CHECK_IN_ACCEPT_FAILED","UXDapiError","GENERIC_HTTP_ERROR","DapiErrorStatus","CARTRAWLER","AmountUpdateType","INCREMENT","DECREMENT","REGULATORY","NotificationSpecific","DESTINATION_SPECIFIC","BUS_CONNECTION","TRAIN_CONNECTION","AM_EARN_POINTS","MULTICITY_NOT_CONSECUTIVE","MULTICITY_MAX_NUMBER_OF_FLIGHTS","GtmLocationEventType","SELECTION","imagePosition","PromotionBannerComponent","httpClient","loadImageFromFragment","jsonUrl","imageFromFragment","trackPromoBanner","banner","isExternalLink","PromotionBannerComponent_div_0_Template","MapPipe","inp","StepperModule","StepperComponent","CampaignBannerService","campaignBannerVisibility$","setCampaignBannerVisibility","messageType","messageMap","MMB_FEEDBACK","PURCHASE_FEEDBACK","CONFIRMATION_MULTI_CITY","AWARD_FEEDBACK","UPGRADE_FEEDBACK","MULTI_CITY","fallbackLanguage","languageSite","hotjarUserId","urlWithParams","getQualtricsLanguage","tab_r3","selectTab","currentTab$","tab_r4","CmsContentSwitcherTabsComponent_section_0_h3_1_Template","CmsContentSwitcherTabsComponent_section_0_div_4_Template","CmsContentSwitcherTabsComponent_section_0_div_8_Template","CmsContentSwitcherTabsComponent_section_0_div_9_Template","tabs_r5","currentTabSub$","tabs","handleKeyPress","getElement","lastChild","nextElementSibling","previousElementSibling","CmsContentSwitcherTabsComponent_section_0_Template","sortingForm","sortingSelectOptions$","shouldShowTabSubtitle","bestFlightPrice","contentPopover_r3","selectedSortBy$","fastestFlightPrice","onSortChangeFromTabs","FlightSelectionSortByComponent_Conditional_3_ng_container_0_fcom_tab_6_Template","FlightSelectionSortByComponent_Conditional_3_ng_container_0_fcom_tab_7_Template","FlightSelectionSortByComponent_Conditional_3_ng_container_0_fcom_tab_8_Template","FlightSelectionSortByComponent_Conditional_3_ng_container_0_ng_template_9_Template","showBestFlightsTab","isFlightSelectionFiltersTestVariant_r5","FlightSelectionSortByComponent_Conditional_3_ng_template_2_span_8_span_1_Template","openSortingModal","FlightSelectionSortByComponent_Conditional_3_ng_template_2_span_8_Template","FlightSelectionSortByComponent_Conditional_3_ng_template_2_span_9_Template","FlightSelectionSortByComponent_Conditional_3_ng_template_2_span_10_Template","FlightSelectionSortByComponent_Conditional_3_ng_template_2_span_11_Template","closeSortingModal","SORT","SORT_DESCENDING","allSortingOptionsMobileB","sortingOptions","FlightSelectionSortByComponent_Conditional_3_ng_container_0_Template","FlightSelectionSortByComponent_Conditional_3_ng_template_2_Template","mobileSort_r6","FlightSelectionSortByComponent","sortByChange","allSortingOptions","allSortingOptionsDesktopB","flightSorting","translated","selectedSortBy","onSortChangeFromModal","FlightSelectionSortByComponent_Conditional_0_Template","FlightSelectionSortByComponent_Conditional_3_Template","APPLE_WALLET_EN","APPLE_WALLET_FI","AVIOS_KEYLINE_NAVY","AVIOS_KEYLINE_WHITE","AVIOS_SMALL_USE_NAVY","AVIOS_SMALL_USE_WHITE","BAEC_EMBLEM","BAEC_LOGO","BUSINESS_BASSINET_SEAT","CARTRAWLER_LOGO","COMFORT_SEAT","ECONOMY_BASSINET_SEAT","EXIT_ROW_SEAT","EXTRA_LEGROOM_SEAT","FINNAIR_LOGO_100","FINNAIR_LOGO_PLUS","FRONT_ROW_SEAT","PLUS_CARD_BASIC_BG","PLUS_CARD_BASIC","PLUS_CARD_GOLD_BG","PLUS_CARD_GOLD","PLUS_CARD_JUNIOR_BG","PLUS_CARD_JUNIOR","PLUS_CARD_LUMO_BG","PLUS_CARD_LUMO","PLUS_CARD_PLATINUM_BG","PLUS_CARD_PLATINUM","PLUS_CARD_SILVER_BG","PLUS_CARD_SILVER","PLUS_ICON_BASIC","PLUS_ICON_GOLD","PLUS_ICON_LUMO","PLUS_ICON_PLATINUM","PLUS_ICON_SILVER","PREFERRED_SEAT","PREMIUM_BASSINET_SEAT","PREMIUM_SEAT","REGULAR_SEAT","SELECTED_SEAT","UNAVAILABLE_SEAT","ADULT_INFANT_BLOCK","ADULT_INFANT_OUTLINE","AIRCRAFT_HORIZONTAL_OUTLINE","AIRCRAFT_TILTED_BLOCK","AIRCRAFT_TILTED_OUTLINE","AIRCRAFT_TILTED","AIRCRAFT_VERTICAL_BLOCK","AIRCRAFT_VERTICAL_OUTLINE","AIRCRAFT_VERTICAL","AIRPORT_BLOCK","AIRPORT_OUTLINE","ALERT_BLOCK","ALERT_OUTLINE","AREA_MAP_BLOCK","AREA_MAP_OUTLINE","AREA_MAP","ARRIVAL_BLOCK","ARRIVAL_OUTLINE","ARROW_BACK_BLOCK","ARROW_BACK_OUTLINE","ARROW_DOWN_BLOCK","ARROW_DOWN_OUTLINE","ARROW_DOWN","ARROW_LEFT_BLOCK","ARROW_RIGHT_BLOCK","ARROW_UP_BLOCK","ARROW_UP_OUTLINE","ARROW_UP","ATTACHMENT_OUTLINE","ATTACHMENT","AVIOS_CURRENCY","AVIOS_GIFT_CARD_BLOCK","AVIOS_GIFT_CARD_OUTLINE","AVIOS_GIFT_CARD","AVIOS_MONO","AVIOS_PLECTRUM","B2B_OUTLINE","BABY_BASSINET_BLOCK","BABY_BASSINET_OUTLINE","BABY_BASSINET","BACKPACK_BLOCK","BACKPACK_OUTLINE","BAGGAGE_CHECKED_IN_BLOCK","BAGGAGE_CHECKED_IN_OUTLINE","BAGGAGE_CHECKED_IN","BAGGAGE_CLAIM_BLOCK","BAGGAGE_CLAIM_OUTLINE","BAGGAGE_CLAIM","BAGGAGE_WEIGHT_BLOCK","BAGGAGE_WEIGHT_OUTLINE","BAGGAGE_WEIGHT","BAGGAGE_WITH_TAG_BLOCK","BAGGAGE_WITH_TAG_OUTLINE","BAGGAGE_WITH_TAG","BEER_BLOCK","BEER_OUTLINE","BEER","BIKE_BLOCK","BIKE_OUTLINE","BLOG_BLOCK","BLOG_OUTLINE","BLOG","BLUEBERRY_JUICE_BLOCK","BLUEBERRY_JUICE_OUTLINE","BLUEBERRY_JUICE","BOOK_FLIGHT_BLOCK","BOOK_FLIGHT_OUTLINE","BREAKFAST_BLOCK","BREAKFAST_OUTLINE","BREAKFAST","BRIGHTNESS_BLOCK","BRIGHTNESS_LOW_BLOCK","BRIGHTNESS_LOW_OUTLINE","BRIGHTNESS_LOW","BRIGHTNESS_MEDIUM_BLOCK","BRIGHTNESS_MEDIUM_OUTLINE","BRIGHTNESS_MEDIUM","BRIGHTNESS_OUTLINE","BRIGHTNESS","BUS_BLOCK","BUS_OUTLINE","BUSINESS_CLASS_BLOCK","BUSINESS_CLASS_OUTLINE","CALENDAR_BLOCK","CALENDAR_OUTLINE","CALENDAR","CAMERA_BLOCK","CAMERA_OUTLINE","CAMERA","CAR_BLOCK","CAR_OUTLINE","CAR","CARGO","CARRY_ON_BAG_BLOCK","CARRY_ON_BAG_OUTLINE","CARRY_ON_BAG_TROLLEY_BLOCK","CARRY_ON_BAG_TROLLEY_OUTLINE","CARRY_ON_BAGGAGE_BLOCK","CARRY_ON_BAGGAGE_OUTLINE","CARRY_ON_PROHIBITED","CHAT_OUTLINE","CHECK_IN_BLOCK","CHECK_IN_OUTLINE","CHECKBOX_SELECTED_INVERTED","CHECKBOX_UNSELECTED_INVERTED","CHECKED_BAG_PROHIBITED","CHECKED_BAGGAGE_BLOCK","CHECKED_BAGGAGE_OUTLINE","CHECKED_IN_BAGGAGE_BLOCK","CHECKED_IN_BAGGAGE_NONE_BLOCK","CHECKED_IN_BAGGAGE_NONE_OUTLINE","CHECKED_IN_BAGGAGE_NONE","CHECKED_IN_BAGGAGE_OUTLINE","CHECKLIST_BLOCK","CHECKLIST_OUTLINE","CHECKLIST","CHECKMARK_BUTTON_SELECTED","CHECKMARK_BUTTON_UNSELECTED","CHEVRON_DOWN_BLOCK","CHEVRON_DOWN_OUTLINE","CHEVRON_LEFT_BLOCK","CHEVRON_LEFT_OUTLINE","CHEVRON_RIGHT_BLOCK","CHEVRON_RIGHT_OUTLINE","CHEVRON_UP_BLOCK","CHEVRON_UP_OUTLINE","CHILD_BLOCK","CHILD_OUTLINE","CLOCK","CLOSE_DELETE_OUTLINE","CO2_BLOCK","CO2_OUTLINE","CO2","COFFEE_BLOCK","COFFEE_OUTLINE","COFFEE","CONNECTING_FLIGHT_BLOCK","CONNECTING_FLIGHT_OUTLINE","CONNECTING_FLIGHT","COPY_BLOCK","COPY_OUTLINE","COPY","CORPORATE_BOOKING_BLOCK","CORPORATE_BOOKING_OUTLINE","CORPORATE_BOOKING","CORROSIVES_PROHIBITED","CORROSIVES","COUPLE_BLOCK","COUPLE_OUTLINE","COUPLE","CREDIT_OR_DEBIT_CARD_OUTLINE","CREDIT_OR_DEBIT_CARD","CREW_CALLED_BLOCK","CREW_CALLED_OUTLINE","CREW_CALLED","CURRENCY_BLOCK","CURRENCY_OUTLINE","CURRENCY","CUSTOMER_SERVICE_BLOCK","CUSTOMER_SERVICE_OUTLINE","CUSTOMER_SERVICE","DAY_BLOCK","DAY_OUTLINE","DEPARTURE_BLOCK","DEPARTURE_GATE_BLOCK","DEPARTURE_GATE_OUTLINE","DEPARTURE_GATE","DEPARTURE_OUTLINE","DESTINATION_BLOCK","DESTINATION_OUTLINE","DISCOUNTED_PRICE_BLOCK","DISCOUNTED_PRICE_OUTLINE","DISCOUNTED_PRICE","DOG_BLOCK","DOG_OUTLINE","DOG","DONATION_BLOCK","DONATION_OUTLINE","DONATION","DOWNLOAD_BLOCK","DOWNLOAD_OUTLINE","DOWNLOAD","DRINK_SODA_BLOCK","DRINK_SODA_OUTLINE","DRINK_SODA","E_CIGARETTE_PROHIBITED","E_CIGARETTE","EDIT_BLOCK","EDIT_OUTLINE","EDIT","EIGHT_BLOCK","EIGHT_OUTLINE","EIGHT","ELECTRIC_SOCKET_BLOCK","ELECTRIC_SOCKET_OUTLINE","ELECTRIC_SOCKET","EMAIL_BLOCK","EMAIL_OUTLINE","EXPAND_BLOCK","EXPAND_OUTLINE","EXPAND","EXPLOSIVES_PROHIBITED","EXPLOSIVES","EXTERNAL_TAB_BLOCK","EXTERNAL_TAB_OUTLINE","EXTRA_CARRY_ON_BAG_BLOCK","EXTRA_CARRY_ON_BAG_OUTLINE","EXTRA_CARRY_ON_BAG","EXTRA_CHECK_IN_BAGGAGE_BLOCK","EXTRA_CHECK_IN_BAGGAGE_OUTLINE","EXTRA_LEG_ROOM_BLOCK","EXTRA_LEG_ROOM_OUTLINE","EXTRA_LEG_ROOM","FACEBOOK_BLOCK","FACEBOOK_OUTLINE","FACEMASK_BLOCK","FACEMASK_OUTLINE","FACEMASK","FAMILY_BLOCK","FAMILY_OUTLINE","FAMILY","FAVOURITE_ENTERTAINMENT_BLOCK","FAVOURITE_ENTERTAINMENT_OUTLINE","FAVOURITE_ENTERTAINMENT","FILTER_OPTIONS_BLOCK","FILTER_OPTIONS_OUTLINE","FILTER_OPTIONS","FINLAND_BLOCK","FINLAND_OUTLINE","FINLAND","FINNAIR_EMBLEM_OUTLINE","FINNAIR_PLUS_BLOCK","FINNAIR_PLUS_CARD_BLOCK","FINNAIR_PLUS_CARD_OUTLINE","FINNAIR_PLUS_CARD","FINNAIR_PLUS_OUTLINE","FIRE_ARMS_PROHIBITED","FIVE_BLOCK","FIVE_OUTLINE","FIVE","FLAMMABLE_GASES_PROHIBITED","FLAMMABLE_GASES","FLAMMABLE_LIQUIDS_PROHIBITED","FLAMMABLE_LIQUIDS","FLAMMABLE_SOLIDS_PROHIBITED","FLAMMABLE_SOLIDS","FLIGHT_CAMERA_BLOCK","FLIGHT_CAMERA_OUTLINE","FLIGHT_CAMERA","FLIGHT_HOTEL","FLIGHT_MAP_BLOCK","FLIGHT_MAP_OUTLINE","FLIGHT_MAP","FLIGHT_OFFER_BLOCK","FLIGHT_OFFER_OUTLINE","FLIGHTS_UNAVAILABLE_BLOCK","FLIGHTS_UNAVAILABLE_OUTLINE","FOOD_BLOCK","FOOD_OUTLINE","FOUR_BLOCK","FOUR_OUTLINE","FOUR","GAMES_BLOCK","GAMES_OUTLINE","GAMES","GIFT_CARD_BLOCK","GIFT_CARD_OUTLINE","GIFT_CARD","GOLF_BLOCK","GOLF_OUTLINE","GOLF_SKIS_BLOCK","GOLF_SKIS_OUTLINE","GOLF_SKIS","GPS_LOCATION_BLOCK","GPS_LOCATION_OUTLINE","GPS_LOCATION","GROUP_BLOCK","GROUP_OUTLINE","HEADPHONES_BLOCK","HEADPHONES_OUTLINE","HEADPHONES","HELP_OUTLINE","HELP","HOLD_MY_BOOKING_BLOCK","HOLD_MY_BOOKING_OUTLINE","HOLD_MY_BOOKING","HOME_BLOCK","HOME_OUTLINE","HOTEL_BLOCK","HOTEL_OUTLINE","HOTEL","IN_COMING_CALL_BLOCK","IN_COMING_CALL_OUTLINE","IN_COMING_CALL","INFANT_BLOCK","INFANT_OUTLINE","INFANT","INSTAGRAM","INSURANCE_BLOCK","INSURANCE_OUTLINE","INTERNET_DISRUPTION","KEYBOARD_BLOCK","KEYBOARD_OUTLINE","KEYBOARD","LANGUAGE_BLOCK","LANGUAGE_OUTLINE","LAPTOP_BLOCK","LAPTOP_OUTLINE","LAVATORY_BLOCK","LAVATORY_MEN_BLOCK","LAVATORY_MEN_OUTLINE","LAVATORY_MEN","LAVATORY_OUTLINE","LAVATORY_WOMEN_BLOCK","LAVATORY_WOMEN_OUTLINE","LAVATORY_WOMEN","LAVATORY","LEGISLATION_BLOCK","LEGISLATION_OUTLINE","LEGISLATION","LIGHTERS_MATCHES_PROHIBITED","LIGHTERS_MATCHES","LIGHTERS_PROHIBITED","LIGHTERS","LIGHTS_OFF_BLOCK","LIGHTS_OFF_OUTLINE","LIGHTS_OFF","LIGHTS_ON_BLOCK","LIGHTS_ON_OUTLINE","LIGHTS_ON","LINK_OUTLINE","LINKEDIN_BLOCK","LINKEDIN_OUTLINE","LINKEDIN","LIQUID_CONTAINER","LOCK_ACTIVE_BLOCK","LOCK_ACTIVE_OUTLINE","LOCK_ACTIVE","LOCK_CLOSED_BLOCK","LOCK_CLOSED_OUTLINE","LOCK_CLOSED","LOCK_OPEN_BLOCK","LOCK_OPEN_OUTLINE","LOCKER_BLOCK","LOCKER_OUTLINE","LOCKER","LOGGED_IN_BLOCK","LOGGED_IN_OUTLINE","LOGOUT_BLOCK","LOGOUT_OUTLINE","LOST_BAGGAGE","LOST_CARD","LOUNGE_BLOCK","LOUNGE_OUTLINE","MAGAZINES_BLOCK","MAGAZINES_OUTLINE","MAGAZINES","MAP_LAYERS_BLOCK","MAP_LAYERS_OUTLINE","MAP_LAYERS","MEAL_BLOCK","MEAL_OUTLINE","MEDICAL_ASSISTANCE_BLOCK","MEDICAL_ASSISTANCE_OUTLINE","MENU_GRID_BLOCK","MENU_GRID_OUTLINE","MENU_GRID","MENU_LIST_BLOCK","MENU_LIST_OUTLINE","MENU_LIST_VIEW_BLOCK","MENU_LIST_VIEW_OUTLINE","MENU_LIST_VIEW","MILESTONE_BLOCK","MILESTONE_OUTLINE","MILESTONE","MINIMISE_BLOCK","MINIMISE_OUTLINE","MINIMISE","MINUS_BLOCK","MINUS_OUTLINE","MMB_TICKET_CHANGES_BLOCK","MMB_TICKET_CHANGES_OUTLINE","MOBILE_PHONE_BLOCK","MOBILE_PHONE_OUTLINE","MOBILE_PHONE","MORE_BLOCK","MORE_OUTLINE","MORE","MOVIES_BLOCK","MOVIES_OUTLINE","MOVIES","MULTI_PAX_BLOCK","MULTI_PAX_OUTLINE","MULTISTOP_BLOCK","MULTISTOP_OUTLINE","MULTISTOP","MUSIC_BLOCK","MUSIC_OUTLINE","MUSIC","NIGHT_BLOCK","NIGHT_OUTLINE","NIGHT","NINE_BLOCK","NINE_OUTLINE","NORDIC_PRODUCT_BLOCK","NORDIC_PRODUCT_OUTLINE","NORDIC_PRODUCT","NOT_VISIBLE_BLOCK","NOT_VISIBLE_OUTLINE","NOT_VISIBLE","ONBOARD_SAFETY_BLOCK","ONBOARD_SAFETY_OUTLINE","ONBOARD_SAFETY","ONBOARD_SERVICE_BLOCK","ONBOARD_SERVICE_OUTLINE","ONBOARD_SERVICE","ONE_BLOCK","ONE_OUTLINE","ONE","ONLINE_CHECKED_BLOCK","ONLINE_CHECKED_OUTLINE","ONLINE_CHECKED","PARKING","PAUSE_BLOCK","PAUSE_OUTLINE","PAUSE","PAYMENT_METHODS_BLOCK","PAYMENT_METHODS_OUTLINE","PAYMENT_METHODS","PERSON_BLOCK","PERSON_OUTLINE","PERSON_SPECIAL_ASSIST_BLOCK","PERSON_SPECIAL_ASSIST_OUTLINE","PERSON_WALKING_BLOCK","PERSON_WALKING_OUTLINE","PERSON_WALKING","PERSON_WHEELCHAIR_BLOCK","PERSON_WHEELCHAIR_OUTLINE","PERSON_WHEELCHAIR","PERSON","PET_IN_BAG_BLOCK","PET_IN_BAG_OUTLINE","PET_IN_BAG","PHONE_OUTLINE","PHONE","PICTURE_BLOCK","PICTURE_OUTLINE","PICTURE","PLAY_BLOCK","PLAY_NEXT_BLOCK","PLAY_NEXT_OUTLINE","PLAY_NEXT","PLAY_OUTLINE","PLAY_PREVIOUS_BLOCK","PLAY_PREVIOUS_OUTLINE","PLAY_PREVIOUS","PLAY","PLUS_BLOCK","PLUS_OUTLINE","POINTS_OF_INTEREST_BLOCK","POINTS_OF_INTEREST_OUTLINE","POINTS_OF_INTEREST","POISON_PROHIBITED","POISON","POWER_BANK_BLOCK","POWER_BANK_OUTLINE","POWER_BANK_PROHIBITED","POWER_BANK","POWER_BLOCK","POWER_OUTLINE","POWER","PRE_ORDER_BLOCK","PRE_ORDER_OUTLINE","PRE_ORDER","PREMIUM_ECONOMY_BLOCK","PREMIUM_ECONOMY_OUTLINE","PREMIUM_ECONOMY","PRICE_BLOCK","PRICE_OUTLINE","PRINT_BAG_TAG_BLOCK","PRINT_BAG_TAG_OUTLINE","PRINT_BAG_TAG","PRIORITY_CHECK_IN_BLOCK","PRIORITY_CHECK_IN_OUTLINE","PRIORITY_CHECK_IN","PRIORITY_SECURITY_BLOCK","PRIORITY_SECURITY_OUTLINE","QRCODE_BLOCK","QRCODE_OUTLINE","QRCODE","RADIOACTIVE_PROHIBITED","RADIOACTIVE","RADIOBUTTON_INVERTED_FILLED","RE_FOCUS_BLOCK","RE_FOCUS_OUTLINE","RE_FOCUS","RENTAL_CAR_BLOCK","RENTAL_CAR_OUTLINE","RENTAL_CAR","RESERVATION_BLOCK","RESERVATION_OUTLINE","RESERVATION","REST_BLOCK","REST_OUTLINE","REST","RETURN_TRIP_BLOCK","RETURN_TRIP_OUTLINE","RIDE_SHARE_BLOCK","RIDE_SHARE_OUTLINE","RIDE_SHARE","SAF_BLOCK","SAF_OUTLINE","SCOOTER_PROHIBITED","SCOOTER","SEAFOOD_BLOCK","SEAFOOD_OUTLINE","SEAFOOD","SEARCH_BLOCK","SEARCH_OUTLINE","SEAT_OR_ECONOMY_BLOCK","SEAT_OR_ECONOMY_OUTLINE","SEATBELTS_OFF_BLOCK","SEATBELTS_OFF_OUTLINE","SEATBELTS_OFF","SEATBELTS_ON_BLOCK","SEATBELTS_ON_OUTLINE","SEATBELTS_ON","SECURE_PAYMENT_BLOCK","SECURE_PAYMENT_OUTLINE","SECURE_PAYMENT","SECURITY_BLOCK","SECURITY_OUTLINE","SECURITY","SERVICE_DESK_BLOCK","SERVICE_DESK_OUTLINE","SERVICE_DESK","SETTINGS_BLOCK","SETTINGS_OUTLINE","SETTINGS","SEVEN_BLOCK","SEVEN_OUTLINE","SEVEN","SHARE_ANDROID_BLOCK","SHARE_ANDROID_OUTLINE","SHARE_ANDROID","SHARP_OBJECTS_PROHIBITED","SHARP_OBJECTS","SHOPPING_CART_ACTIVE","SHOPPING_CART_BLOCK","SHOPPING_CART_OUTLINE","SHOWER_BLOCK","SHOWER_OUTLINE","SHOWER","SINGLE_PAX_BLOCK","SINGLE_PAX_OUTLINE","SIX_BLOCK","SIX_OUTLINE","SIX","SKIP_15S_BACK_BLOCK","SKIP_15S_BACK_OUTLINE","SKIP_15S_BACK","SKIP_15S_FORWARD_BLOCK","SKIP_15S_FORWARD_OUTLINE","SKIP_15S_FORWARD","SKIS_BLOCK","SKIS_OUTLINE","SMOKING_BLOCK","SMOKING_OUTLINE","SMOKING_PROHIBITED","SMOKING","SNACKS_BLOCK","SNACKS_OUTLINE","SNACKS","SORT_ASCENDING_BLOCK","SORT_ASCENDING_OUTLINE","SORT_ASCENDING","SORT_BLOCK","SORT_DESCENDING_BLOCK","SORT_DESCENDING_OUTLINE","SORT_OUTLINE","SPARE_LITHIUM_BATTERIES","SPARKLING_WINE_BLOCK","SPARKLING_WINE_GLASS_BLOCK","SPARKLING_WINE_GLASS_OUTLINE","SPARKLING_WINE_GLASS","SPARKLING_WINE_OUTLINE","SPARKLING_WINE","SPORTS_EQUIPMENT_BLOCK","SPORTS_EQUIPMENT_OUTLINE","SPORTS_EQUIPMENT","STAR_BLOCK","STAR_OUTLINE","STOPOVER_BLOCK","STOPOVER_OUTLINE","STOPOVER","SUBTITLES_BLOCK","SUBTITLES_OUTLINE","SUBTITLES","SURFBOARD_BLOCK","SURFBOARD_OUTLINE","SURFBOARD","SUSTAINABILITY_BLOCK","SUSTAINABILITY_OUTLINE","SWITCH_FLIGHTS_BLOCK","SWITCH_FLIGHTS_OUTLINE","SWITCH_FLIGHTS","TABLET_BLOCK","TABLET_OUTLINE","TAIL_BLOCK","TAIL_OUTLINE","TAIL","TAXI_BLOCK","TAXI_OUTLINE","TAXI","TAZER_PROHIBITED","TAZER","TEA_BLOCK","TEA_OUTLINE","TEA","THREE_BLOCK","THREE_OUTLINE","THREE","TICKET_REFUND_BLOCK","TICKET_REFUND_OUTLINE","TIER_POINTS_BLOCK","TIER_POINTS_OUTLINE","TIER_POINTS","TIER_PROGRESS_BLOCK","TIER_PROGRESS_OUTLINE","TIER_PROGRESS","TIKTOK_BLOCK","TIKTOK_OUTLINE","TIKTOK","TIME_ZONE_BLOCK","TIME_ZONE_OUTLINE","TIME_ZONE","TIMETABLE","TOOLS_AND_BLUNT_INSTRUMENTS_PROHIBITED","TOOLS_AND_BLUNT_INSTRUMENTS","TRACK_PLAYING_BLOCK","TRACK_PLAYING_OUTLINE","TRACK_PLAYING","TRAIN_BLOCK","TRAIN_OUTLINE","TRANSFER_LOADER_BLOCK","TRANSFER_LOADER_OUTLINE","TRASH_BLOCK","TRASH_OUTLINE","TRAVEL_DOCUMENTS_BLOCK","TRAVEL_DOCUMENTS_OUTLINE","TRAVEL_DOCUMENTS","TRAVEL_INSURANCE_BLOCK","TRAVEL_INSURANCE_OUTLINE","TRAVEL_INSURANCE","TREATS_BLOCK","TREATS_OUTLINE","TREATS","TWITTER","TWO_BLOCK","TWO_OUTLINE","TWO","UPDATE_BLOCK","UPDATE_CART_BLOCK","UPDATE_CART_OUTLINE","UPDATE_CART","UPDATE_OUTLINE","UPGRADE_BLOCK","UPGRADE_OUTLINE","UPLOAD_BLOCK","UPLOAD_OUTLINE","VAT_RECEIPT_DOWNLOAD_BLOCK","VAT_RECEIPT_DOWNLOAD_OUTLINE","VAT_RECEIPT_DOWNLOAD","VIDEO_SERIES_BLOCK","VIDEO_SERIES_OUTLINE","VIDEO_SERIES","VISIBLE_BLOCK","VISIBLE_OUTLINE","VOLUME_BLOCK","VOLUME_LOW_BLOCK","VOLUME_LOW_OUTLINE","VOLUME_LOW","VOLUME_MEDIUM_BLOCK","VOLUME_MEDIUM_OUTLINE","VOLUME_MEDIUM","VOLUME_MUTE_BLOCK","VOLUME_MUTE_OUTLINE","VOLUME_MUTE","VOLUME_OUTLINE","VOLUME","VOUCHER_BLOCK","VOUCHER_OUTLINE","WALLET_CLOSED_BLOCK","WALLET_CLOSED_OUTLINE","WALLET_CLOSED","WALLET_OPEN_BLOCK","WALLET_OPEN_OUTLINE","WALLET_OPEN","WATER_BLOCK","WATER_OUTLINE","WATER","WECHAT","WEIBO","WELLBEING_BLOCK","WELLBEING_OUTLINE","WELLBEING","WHATSAPP_BLOCK","WHATSAPP_OUTLINE","WHATSAPP","WIFI_AIRCRAFT","WIFI_BLOCK","WIFI_LOW_BLOCK","WIFI_LOW_OUTLINE","WIFI_LOW","WIFI_MEDIUM_BLOCK","WIFI_MEDIUM_OUTLINE","WIFI_MEDIUM","WIFI_OFFLINE_BLOCK","WIFI_OFFLINE_OUTLINE","WIFI_OFFLINE","WIFI_OUTLINE","WINE_BLOCK","WINE_GLASS_BLOCK","WINE_GLASS_OUTLINE","WINE_GLASS","WINE_OUTLINE","WINE","WORLD_MAP_BLOCK","WORLD_MAP_OUTLINE","WORLD_MAP","X_BLOCK","X_OUTLINE","YOUKU","ZERO_BLOCK","ZERO_OUTLINE","PAYMENTS","TAILS","NavigationTriggerComponent","toggleMenuGtmEvent","toggleMenu","toggleMenuOpen","AddFrequentFlyerError","PASSENGER_NOT_FOUND","BOOKING_NOT_FOUND","ALREADY_EXISTS","GROUP_BOOKING","otherValues","ready","isInCampaign_r3","type_r2","price_r4","DestinationHeroComponent_ng_template_0_div_0_Template","DestinationHeroComponent_ng_template_0_div_1_Template","DestinationHeroComponent_div_11_ng_container_1_ng_container_6_ng_container_1_Template","pricePromo_r7","prices_r6","DestinationHeroComponent_div_11_ng_container_1_div_3_Template","DestinationHeroComponent_div_11_ng_container_1_div_4_Template","DestinationHeroComponent_div_11_ng_container_1_ng_container_6_Template","DestinationHeroComponent_div_11_ng_container_1_ng_container_8_Template","showOneWayPrice$","selectedOriginLocationName_r8","DestinationHeroComponent_div_11_ng_container_1_Template","selectedOriginLocationName$","originLocationCodeFromStore$","globalBookingOrigin","selectedOrigin","defaultOrigin","defaultLocationCode","DestinationHeroComponent_ng_template_0_Template","DestinationHeroComponent_div_11_Template","activeStep","step_r5","selectStep","StepperComponent_div_0_div_1_span_3_Template","last_r6","showLabels","StepperComponent_div_0_div_1_Template","StepperComponent_div_1_div_1_Template","clicked","StepperComponent_div_0_Template","StepperComponent_div_1_Template","iconSize","textSize","buttonPadding","increase","decrease","decreaseLabel","increaseLabel","PlusMinusSelectorComponent_span_7_Template","FormatCardNumberPipe","formatCardNumber","CARD_NUMBER_LENGTH","stripSpaces","isStaticImage","gcd","divisor","source_r1","ImageComponent_ng_container_0_picture_1_source_1_Template","hasAspectRatio","ratio","customAspectRatio","ImageComponent_ng_container_0_picture_1_Template","isPreload_r3","onImageLoaded","isDefaultImageLoaded$","ImageComponent","maxWidthImage","preloadImages","preloadImagesWidth","invalidResponsiveImageRatio","impolicy","ImageComponent_ng_container_0_Template","ImageComponent_ng_template_1_Template","Scheduler","schedulerActionCtor","SchedulerAction","BOOKING_WIDGET_CONTEXT","defaultWidgetPopoverOptions","warningNotificationPriorityOrder","clearState","setInstantSearchMonitoring","resetPrices","setFullYearPrices","setFollowingMonthPrices","setHistogramPrices","setAirCalendarPrices","clearNotificationWarning","clearServiceNotificationWarnings","clearNoFlightsNotificationWarnings","showCompact","link_r2","QuickLinksComponent_div_0_a_1_fcom_icon_1_Template","QuickLinksComponent_div_0_a_1_Template","showBorder","links_r4","QuickLinksComponent_div_0_Template","getSeatInfoForTracking","seatElement","activePax","seatNo","seatInfo","getSeatType","getSeatMapFlightInfoFromCart","acType","flightNo","ticketType","getSeatMapFlight","seatTypeInfo","regular","orderedCharacteristics","aIndex","seatCharacteristicsOrder","bIndex","bValue","sumOfPricesForTravelersServiceSelection","calculateSubTotalPrice","subtotalPriceSub$","categorySubject$","categoryPrices$","oldFragment","categoryPrices","priceAndFragment","calculateTotalPrice","finnairServiceItems","filterFunction","filterServicesByFunction","allItems","isNotIncludedOrZeroPriced","getServicesToShow","keyToShow","removeIncludedInTicketTypeAndTierBenefitAndZeroPricedServices","showFallback","listOfServices","combinedServices","allBounds","allSegments","_emitChangeEvent","SkipLinkComponent","skipToMainContent","showNotification","NewsletterNotificationComponent","replaceUrl","skipFilterSet","NewsletterNotificationComponent_fcom_notification_0_Template","FcomImagesModule","DRAWER_ANIMATION_DELAY","DrawerComponent_dialog_4_ng_container_8_ng_container_1_Template","buttonTmpl_r3","DrawerComponent_dialog_4_ng_container_8_Template","drawerTitleId","ariaClose","showButtons","onOpen","drawerId","drawerDescriptionId","hostClasses","showDrawer$","drawerHeading","DrawerComponent_ng_template_0_Template","DrawerComponent_div_2_Template","DrawerComponent_dialog_4_Template","concatAll","CheapestPriceForAllDestinationsService","instantSearchService","marketingOffersByOriginOneWay","marketingOffersByOriginBothWay","marketingOffers$","marketingOffersOneWay$","marketingOffersBothWay$","getMarketingOffers","oneWay","getOffers","marketingOffers","targetPrice","oneWayOffers","destinationItems","setMultiCityOffers","addMultiCityOffers","setMultiCitySelectedFareFamily","addMultiCitySelectedItinerary","setMultiCitySelectedItinerary","resetSelections","setStatus","addRequestedMoreFlightOfferIds","__awaiter","_arguments","P","generator","fulfilled","rejected","throw","adopt","__asyncGenerator","AsyncIterator","verb","awaitReturn","resume","fulfill","settle","__values","SuppressedError","ROUTER_REQUEST","ROUTER_NAVIGATION","routerRequestAction","ROUTER_CANCEL","routerNavigationAction","ROUTER_ERROR","routerCancelAction","routerErrorAction","routerReducer","routerAction","navigationId","MinimalRouterStateSerializer","serialize","serializeRoute","outlet","routeConfig","pathMatch","redirectTo","NavigationActionTiming","PreActivation","PostActivation","DEFAULT_ROUTER_FEATURENAME","_ROUTER_CONFIG","ROUTER_CONFIG","_createRouterConfig","serializer","navigationActionTiming","FullRouterStateSerializer","paramMap","pathFromRoot","RouterStateSerializer","RouterTrigger","ROUTER","STORE","StoreRouterConnectingService","activeRuntimeChecks","lastEvent","setUpStoreStateListener","setUpRouterEventsListener","routerStoreState","storeState","navigateIfNeeded","isSameUrl","dispatchNavLate","routesRecognized","dispatchRouterRequest","RoutesRecognized","dispatchRouterNavigation","NavigationCancel","dispatchRouterCancel","NavigationError","dispatchRouterError","dispatchRouterNavigated","dispatchRouterAction","lastRoutesRecognized","nextRouterState","urlAfterRedirects","provideRouterStore","StoreRouterConnectingModule","ServiceType","INCLUDED","NON_INCLUDED","PAID","getSeatsByFlight","isInfant","serviceSegment","servicePax","servicePaxService","EXCLUDE_FROM_SUMMARY_VARIANTS","getSummary","anyIncluded","totalQuantity","calculateIsIncludedAndQuantity","getMealSummary","getViewServiceSummary","isServicePending","paxService","allSelectedItems","getSummaryForCategory","getCabinBaggageSummary","getCheckedBaggageSummary","EXCLUDE_FROM_SUMMARY_CABIN_BAGGAGE_VARIANTS","oldService","getPaxServiceDisplayName","normalizeDisplayNames","trimmedDisplayName","MAT_BUTTON_CONFIG","HOST_SELECTOR_MDC_CLASS_PAIR","attribute","mdcClasses","MatButtonBase","_rippleLoader","_disableRipple","_updateRippleDisabled","_isFab","disabledInteractive","_getAriaDisabled","ariaDisabled","_getDisabledAttribute","MatButton","animationMode","MatIconButton","MatButtonModule","MAT_INPUT_VALUE_ACCESSOR","MatCalendarBody_Conditional_0_Template","_cellPadding","MatCalendarBody_For_2_Conditional_1_Template","MatCalendarBody_For_2_For_3_Template","RV6","_cellClicked","eBV","_emitActiveDateChange","ɵ$index_14_r4","ɵ$index_7_r5","_isActiveCell","_isRangeStart","compareValue","_isRangeEnd","_isInRange","_isComparisonBridgeStart","_isComparisonBridgeEnd","_isComparisonStart","_isComparisonEnd","_isInComparisonRange","_isPreviewStart","_isPreviewEnd","_isInPreview","_isComparisonIdentical","todayValue","MatCalendarBody_For_2_Template","row_r6","MatMonthView_For_4_Template","day_r1","MatCalendar_ng_template_0_Template","MatCalendar_Case_2_Template","_dateSelected","_dragStarted","_dragEnded","dateFilter","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","_activeDrag","MatCalendar_Case_3_Template","_monthSelectedInYearView","_goToDateInView","MatCalendar_Case_4_Template","_yearSelectedInMultiYearView","MatDatepickerContent_ng_template_2_Template","MatDatepickerToggle_Conditional_2_Template","closeCalendarLabel","startDateLabel","endDateLabel","formatYearRange","formatYearRangeLabel","MatCalendarCell","displayValue","rawValue","calendarBodyId","activeCapturingEventOptions","passiveEventOptions","MatCalendarBody","_focusActiveCellAfterViewChecked","_focusActiveCell","numCols","activeCell","cellAspectRatio","previewStart","previewEnd","selectedValueChange","previewChange","activeDateChange","dragStarted","dragEnded","_didDragSinceMouseDown","_enterHandler","_skipNextFocus","cell","_getCellFromElement","_touchmoveHandler","getActualTouchTarget","getCellElement","_leaveHandler","_mousedownHandler","_mouseupHandler","cellElement","_touchendHandler","_startDateLabelId","_endDateLabelId","_isSelected","endValue","columnChanges","_firstRowOffset","_cellWidth","rowIndex","colIndex","cellNumber","movePreview","_scheduleFocusActiveCellAfterViewChecked","isStart","isEnd","isInRange","previousCell","previousRow","nextCell","nextRow","_getDescribedby","row","labelMinRequiredCells","isTableCell","rangeEnabled","touchLocation","elementFromPoint","DateRange","MatDateSelectionModel","_adapter","_selectionChanged","selectionChanged","_isValidDateInstance","MatSingleDateSelectionModel","MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER","MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY","MAT_DATE_RANGE_SELECTION_STRATEGY","MatMonthView","activeDate","_activeDate","oldActiveDate","validDate","_dateAdapter","_hasSameMonthAndYear","_init","_setRanges","_minDate","_maxDate","_dateFormats","_dir","_rangeStrategy","_rerenderSubscription","activeDrag","selectedChange","_userSelection","comparisonChange","_clearPreview","_getDateFromDayOfMonth","rangeStartDate","rangeEndDate","_getDateInCurrentMonth","_updateActiveDate","_handleCalendarBodyKeydown","altKey","_selectionKeyPressed","_canSelect","ESCAPE","_previewEnd","_handleCalendarBodyKeyup","_todayDate","_getCellCompareValue","_monthLabel","monthLabel","firstOfMonth","_firstWeekOffset","_initWeekdays","_createWeekCells","_matCalendarBody","_previewChanged","previewRange","createPreview","_previewStart","dragRange","createDrag","dragDropResult","dayOfMonth","firstDayOfWeek","narrowWeekdays","_weekdays","daysInMonth","dateNames","_weeks","_shouldEnableDate","cellClasses","d1","d2","selectedValue","_rangeStart","_rangeEnd","_isRange","_comparisonRangeStart","_comparisonRangeEnd","_t","yearsPerPage","MatMultiYearView","isSameMultiYearView","_setSelectedYear","yearSelected","_todayYear","minYearOfPage","getActiveOffset","_years","_createCellForYear","_yearSelected","_getDateFromYear","_getActiveCell","activeMonth","yearName","_shouldEnableYear","_selectedYear","dateAdapter","year1","year2","startingYear","getStartingYear","euclideanModulo","MatYearView","_setSelectedMonth","monthSelected","_monthSelected","_getDateFromMonth","_todayMonth","_getMonthInCurrentYear","_yearLabel","_months","_createCellForMonth","normalizedDate","monthName","_shouldEnableMonth","activeYear","_isYearAndMonthAfterMaxDate","_isYearAndMonthBeforeMinDate","maxYear","maxMonth","minYear","minMonth","_selectedMonth","calendarHeaderId","MatCalendarHeader","_intl","_periodButtonLabelId","stateChanges","periodButtonText","_formatMinAndMaxYearLabels","periodButtonDescription","periodButtonLabel","prevButtonLabel","nextButtonLabel","currentPeriodClicked","previousClicked","nextClicked","previousEnabled","_isSameView","maxYearOfPage","MatCalendar","startAt","_startAt","_clampedActiveDate","_currentView","viewChangedResult","_moveFocusOnNextTick","viewChanged","_userDragDrop","_intlChanges","_calendarHeaderPortal","headerComponent","focusActiveCell","minDateChange","maxDateChange","_getCurrentViewComponent","updateTodaysDate","normalizedYear","normalizedMonth","monthView","yearView","multiYearView","matDatepickerAnimations","transformPanel","fadeInCalendar","datepickerUid","MAT_DATEPICKER_SCROLL_STRATEGY","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY","MatDatepickerContent","_globalModel","_rangeSelectionStrategy","intl","_subscriptions","_animationDone","_isAnimating","_actionsPortal","_closeButtonText","_animationState","datepicker","touchUi","_calendar","_handleUserSelection","_model","newSelection","selectionFinished","_handleUserDragDrop","_startExitAnimation","_handleAnimationEvent","_getSelected","_applyPendingSelection","_assignActions","forceRerender","_selectYear","_selectMonth","_viewChanged","_closeButtonFocused","_getMinDate","_getMaxDate","_getDateFilter","calendarHeaderComponent","MatDatepickerBase","datepickerInput","getStartValue","_color","getThemePalette","_panelClass","opened","_opened","_overlay","_inputStateChanges","yPosition","restoreFocus","openedStream","closedStream","_focusedElementBeforeOpen","_backdropHarnessClass","positionChange","_setConnectedPositions","_destroyOverlay","registerInput","registerActions","_componentRef","removeActions","_openOverlay","canRestoreFocus","completeClose","_forwardContentValues","_dialogLabelId","getOverlayLabelId","isDialog","_getDialogStrategy","_getDropdownStrategy","_getCloseStream","getConnectedOverlayOrigin","primaryX","secondaryX","primaryY","secondaryY","ctrlShiftMetaModifiers","MatDatepicker","MatDatepickerInputEvent","MatDatepickerInputBase","_getValueFromModel","_assignValueProgrammatically","_parentDisabled","_getValidators","_parseValidator","_minValidator","_maxValidator","_filterValidator","_registerModel","_valueChangesSubscription","_assignValue","_shouldHandleChangeEvent","_lastValueValid","_isValidValue","_cvaOnChange","_onTouched","_formatValue","dateChange","_validatorOnChange","_localeSubscription","matDatepickerParse","controlValue","_matchesFilter","matDatepickerFilter","dateInputsHaveChanged","readOnly","_openPopup","_onInput","lastValueWasValid","_assignValueToModel","MAT_DATEPICKER_VALUE_ACCESSOR","MatDatepickerInput","MAT_DATEPICKER_VALIDATORS","matDatepicker","_datepicker","_closedSubscription","_min","validValue","_max","_dateFilter","wasMatchingValue","dateFormats","_formField","getLabelId","modelValue","MatDatepickerToggleIcon","MatDatepickerToggle","defaultTabIndex","parsedTabIndex","_watchStateChanges","datepickerStateChanged","inputStateChanged","datepickerToggled","kS0","UnifiedFlightObjectComponent_div_4_div_1_Template","UnifiedFlightObjectComponent_div_8_span_1_Template","UnifiedFlightObjectComponent_div_8_span_2_Template","viewDetailsBtnKey","showViewDetails","focusOnViewDetails$","showFlightNumber","viewDetailsBtn","UnifiedFlightObjectComponent_fcom_timeline_2_Template","UnifiedFlightObjectComponent_div_4_Template","UnifiedFlightObjectComponent_div_6_Template","UnifiedFlightObjectComponent_div_7_Template","UnifiedFlightObjectComponent_div_8_Template","UnifiedFlightObjectComponent_div_9_Template","DisruptionConfirmAcknowledgePath","disruptionConfirmAcknowledge$Response","disruptionConfirmAcknowledge","DisruptionConfirmAlternativePath","disruptionConfirmAlternative$Response","disruptionConfirmAlternative","DisruptionConfirmStatusPath","disruptionConfirmStatus$Response","jobId","disruptionConfirmStatus","numberToShowWhenFiltered","notificationContent","FiltersComponent_Conditional_0_span_8_Template","FiltersComponent_Conditional_0_fcom_notification_13_Template","primaryFooterButtonClick","secondaryFooterButtonClick","hasFiltering","modalTitle","primaryFooterButtonTitle","secondaryFooterButtonTitle","headerText","popoverOpeningClick","popoverClosed","FiltersComponent_Conditional_3_fcom_icon_7_Template","FiltersComponent_Conditional_3_ng_template_8_Template","popoverOptions$","contentPopover_r5","buttonTextWhenFiltered","FiltersComponent","popoverOptionsOverride$","override","enableOnClick","FiltersComponent_Conditional_0_Template","FiltersComponent_Conditional_3_Template","isCentered$","linkType$","CmsLinkBlockComponent_fin_cta_big_link_2_Template","CmsLinkBlockComponent_fin_link_block_3_Template","_bookingState","_bookingStep","multiCity","selectMultiCityOffers","selectMultiCityAmountOfBounds","selectMultiCitySelectedBounds","selectMultiCitySelectedItineraryDetails","offersForFareFamily","fareA","fareB","selectMultiCityStatus","requestedMoreFlightOfferIds","fareFamiliesPerCabin","selectMultiCityCurrency","PopoverDirective","enableStopPropagation","togglePopover","onMouseEnter","enableOnHover","isPopoverDestroyed","createPopover","onMouseLeave","onContent","destroyPopover","tryDestroyPopover","focusReady","onKeyup","focusReady$","triggerRef","updatePopoverData","popoverData","closeText","ariaCloseText","appendComponentToElement","mouseOnContent","domElem","addScrollListener","shouldFocusOnHost","createFromCityLink","linkTranslations","ondPair","createFromCountryLink","createCityToCityLink","fromTo","createCountryToCountryLink","fromLink_r1","locationName","OndMarketingCrossLinkingComponent_div_0_div_1_a_6_Template","fromLink$","OndMarketingCrossLinkingComponent_div_0_div_2_div_5_Template","ondLinks$","linkListSliceSize","link_r4","OndMarketingCrossLinkingComponent_div_0_div_3_div_5_Template","fromCountry_r5","OndMarketingCrossLinkingComponent_div_0_div_4_a_6_Template","fromCountry$","link_r6","OndMarketingCrossLinkingComponent_div_0_div_5_ng_container_1_div_5_Template","OndMarketingCrossLinkingComponent_div_0_div_5_ng_container_1_Template","OndMarketingCrossLinkingComponent_div_0_div_1_Template","OndMarketingCrossLinkingComponent_div_0_div_2_Template","OndMarketingCrossLinkingComponent_div_0_div_3_Template","OndMarketingCrossLinkingComponent_div_0_div_4_Template","OndMarketingCrossLinkingComponent_div_0_div_5_Template","ondMarketingRoutesPath","link_r7","OndMarketingCrossLinkingComponent_div_1_div_1_div_2_Template","fromCountry_r8","OndMarketingCrossLinkingComponent_div_1_div_2_div_2_a_1_Template","OndMarketingCrossLinkingComponent_div_1_div_2_div_2_Template","link_r9","OndMarketingCrossLinkingComponent_div_1_div_3_div_2_Template","link_r10","OndMarketingCrossLinkingComponent_div_1_div_4_div_2_Template","OndMarketingCrossLinkingComponent_div_1_div_1_Template","OndMarketingCrossLinkingComponent_div_1_div_2_Template","OndMarketingCrossLinkingComponent_div_1_div_3_Template","OndMarketingCrossLinkingComponent_div_1_div_4_Template","byCityName","byCountryName","OndMarketingCrossLinkingComponent","ondPageTypes","linkTranslations$","linksAndTranslations$","ondPairs","handleLinkTranslations","ondFromLocationCode","shouldCreateCountryToCountryLinks","createCountryToCountryLinks","createFromCityLinks","createCityToCityLinks","destinationCountry","OndMarketingCrossLinkingComponent_div_0_Template","OndMarketingCrossLinkingComponent_div_1_Template","currencyCode$","linkUrl$","language$","iata","GenericBrowserDomAdapter","ɵDomAdapter","supportsDOMEvents","BrowserDomAdapter","makeCurrent","ɵsetRootDomAdapter","onAndCancel","getDefaultDocument","createHtmlDocument","isElementNode","isShadowRoot","DocumentFragment","getBaseElementHref","baseElement","relativePath","baseURI","resetBaseElement","getCookie","ɵparseCookieValue","BrowserXhr","EVENT_MANAGER_PLUGINS","EventManager","plugins","_eventNameToPlugin","plugin","_plugins","_findPluginFor","getZone","EventManagerPlugin","APP_ID_ATTRIBUTE_NAME","SharedStylesHost","styleRef","hostNodes","styleNodesInDOM","collectServerRenderedStyles","platformIsServer","resetHostNodes","addStyles","changeUsageCount","onStyleAdded","removeStyles","onStyleRemoved","getAllStyles","addHost","hostNode","addStyleToHost","removeHost","styleMap","styleRefValue","usage","getStyleElement","styleEl","styleElRef","NAMESPACE_URIS","svg","xhtml","xlink","xml","xmlns","math","COMPONENT_REGEX","COMPONENT_VARIABLE","HOST_ATTR","CONTENT_ATTR","REMOVE_STYLES_ON_COMPONENT_DESTROY","shimStylesContent","compId","DomRendererFactory2","eventManager","sharedStylesHost","removeStylesOnCompDestroy","rendererByCompId","defaultRenderer","DefaultDomRenderer2","getOrCreateRenderer","EmulatedEncapsulationDomRenderer2","applyToHost","NoneEncapsulationDomRenderer","applyStyles","ShadowDomRenderer","throwOnSyntheticProps","createElementNS","newChild","isTemplateNode","refChild","oldChild","selectorOrNode","namespaceUri","setAttributeNS","removeAttributeNS","removeProperty","decoratePreventDefault","eventHandler","hostEl","nodeOrShadowRoot","contentAttr","shimContentAttribute","componentShortId","hostAttr","shimHostAttribute","DomEventsPlugin","MODIFIER_KEYS","_keyMap","Del","Esc","Left","Right","Up","Down","Menu","Scroll","Win","MODIFIER_KEY_GETTERS","shiftKey","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","domEventName","_normalizeKey","codeIX","modifierName","matchEventFullKeyCode","fullKeyCode","keycode","modifierGetter","keyName","platformBrowser","ɵPLATFORM_BROWSER_ID","initDomAdapter","ɵsetDocument","BROWSER_MODULE_PROVIDERS_MARKER","TESTABILITY_PROVIDERS","ɵTESTABILITY_GETTER","BrowserGetTestability","ɵglobal","getAngularTestability","getAllAngularTestabilities","getAllAngularRootElements","frameworkStabilizers","testabilities","ɵTESTABILITY","BROWSER_MODULE_PROVIDERS","ɵINJECTOR_SCOPE","BrowserModule","providersAlreadyPresent","withServerTransition","Meta","_dom","addTag","forceCreation","_getOrCreateElement","addTags","attrSelector","getTags","_parseSelector","_setMetaElementAttributes","removeTagElement","_containsAttributes","_getMetaKeyMap","META_KEYS_MAP","httpEquiv","getTitle","newTitle","DomSanitizer","__ngConditionalFactory__","DomSanitizerImpl","ɵallowSanitizationBypassAndThrow","ɵunwrapSafeValue","ɵ_sanitizeHtml","ɵ_sanitizeUrl","ɵbypassSanitizationTrustHtml","bypassSecurityTrustStyle","ɵbypassSanitizationTrustStyle","bypassSecurityTrustScript","ɵbypassSanitizationTrustScript","bypassSecurityTrustUrl","ɵbypassSanitizationTrustUrl","ɵbypassSanitizationTrustResourceUrl","HydrationFeatureKind","NoHttpTransferCache","HttpTransferCacheOptions","I18nSupport","EventReplay","provideClientHydration","featuresKind","hasHttpTransferCacheOptions","ɵkind","ɵwithDomHydration","ɵwithHttpTransferCache","BreadcrumbComponent_ng_container_0_nav_1_ng_container_8_li_1_a_4_Template","BreadcrumbComponent_ng_container_0_nav_1_ng_container_8_li_1_span_6_Template","currentPath$","BreadcrumbComponent_ng_container_0_nav_1_ng_container_8_li_1_Template","BreadcrumbComponent_ng_container_0_nav_1_ng_container_8_Template","BreadcrumbComponent_ng_container_0_nav_1_Template","BreadcrumbComponent","serviceBreadcrumb$","breadcrumbItems$","serviceBreadcrumb","BreadcrumbComponent_ng_container_0_Template","NavigationModule","MultivariateTestModule","CampaignBannerComponent","subTitleIcon","iconClasses","ExpanderCardComponent_div_9_fcom_icon_1_Template","ExpanderCardComponent_div_9_div_2_Template","showSubTitleOnMobile","ExpanderCardComponent_div_10_ng_container_1_Template","descriptionClasses","descriptionContent","ExpanderCardComponent","capitalizeTitle","hideIconInMobile","showDescriptionAlways","expandChange","toggleOpen","ExpanderCardComponent_div_9_Template","ExpanderCardComponent_div_10_Template","IconWithTextComponent_fcom_icon_3_Template","_refCount","refCounter","sharedConnection","_connection","connect","ConnectableObservable","subjectFactory","getSubject","_teardown","higherOrderRefCount","takeLast","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","convertToParamMap","defaultUrlMatcher","segmentGroup","posParams","consumed","shallowEqual","k1","getDataKeys","k2","equalArraysOrString","aSorted","bSorted","wrapIntoObservable","isObservable","pathCompareMap","exact","equalSegmentGroups","containee","matrixParams","equalPath","matrixParamsMatch","numberOfChildren","subset","containsSegmentGroup","paramCompareMap","equalParams","containsParams","ignored","containsTree","containsSegmentGroupHelper","containeePaths","containerPaths","containeeSegment","UrlTree","UrlSegmentGroup","_queryParamMap","DEFAULT_SERIALIZER","serializePaths","UrlSegment","parameterMap","_parameterMap","serializePath","as","bs","UrlSerializer","DefaultUrlSerializer","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","serializeQueryParams","strParams","encodeUriQuery","encodeUriFragment","primary","mapChildrenIntoArray","childOutlet","encodeUriString","encodeUriSegment","decodeQuery","serializeMatrixParams","SEGMENT_RE","matchSegments","MATRIX_PARAM_SEGMENT_RE","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","parseParens","parseMatrixParams","parseParam","matchMatrixKeySegments","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","createRoot","rootCandidate","pt","squashSegmentGroup","newChildren","childCandidate","grandChildOutlet","grandChild","mergeTrivialChildren","isUrlTree","createSegmentGroupFromRoute","targetGroup","rootSegmentGroup","createSegmentGroupFromRouteRecursive","childOutlets","childSnapshot","createUrlTreeFromSegmentGroup","commands","nav","computeNavigation","Navigation","numberOfDoubleDots","cmd","cmdIdx","outlets","segmentPath","urlPart","partIndex","toRoot","findStartingPositionForTargetGroup","Position","isMatrixParams","createPositionApplyingDoubleDots","ci","newSegmentGroup","processChildren","updateSegmentGroupChildren","updateSegmentGroup","command","isCommandWithOutlets","oldRoot","oldSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","cmdWithOutlet","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","slicedCommands","createNewSegmentGroup","getOutlets","childrenOfEmptyChild","createNewSegmentChildren","IMPERATIVE_NAVIGATION","EventType","ResolveStart","ResolveEnd","GuardsCheckStart","GuardsCheckEnd","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","ChildActivationEnd","ActivationStart","ActivationEnd","NavigationSkipped","RouterEvent","navigationTrigger","restoredState","NavigationCancellationCode","Redirect","SupersededByNewNavigation","NoDataFromResolver","GuardRejected","NavigationSkippedCode","IgnoredSameUrlNavigation","IgnoredByUrlHandlingStrategy","shouldActivate","BeforeActivateRoutes","RedirectRequest","navigationBehaviorOptions","getOutlet","getClosestRouteInjector","_loadedInjector","OutletContext","rootInjector","ChildrenOutletContexts","attachRef","onChildOutletCreated","childName","getOrCreateContext","onChildOutletDestroyed","getContext","onOutletDeactivated","onOutletReAttached","Tree","_root","findNode","siblings","findPath","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","createEmptyStateSnapshot","activated","ActivatedRouteSnapshot","RouterStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","urlSubject","paramsSubject","queryParamsSubject","fragmentSubject","dataSubject","futureSnapshot","_futureSnapshot","_routerState","_paramMap","getInherited","paramsInheritanceStrategy","inherited","loadComponent","_resolvedData","hasStaticTitle","serializeNode","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalUrlParams","equalSegments","RouterOutlet","_activatedRoute","activateEvents","deactivateEvents","attachEvents","detachEvents","parentContexts","changeDetector","inputBinder","INPUT_BINDER","supportsBindingToComponentInputs","activatedComponentRef","isTrackedInParentContexts","deactivate","initializeOutletWithName","unsubscribeFromRouteData","activateWith","isActivated","activatedRouteData","cmp","bindActivatedRouteToOutletComponent","childContexts","OutletInjector","__ngOutletInjector","RoutedComponentInputBinder","outletDataSubscriptions","subscribeToRouteData","dataSubscription","mirror","createNode","routeReuseStrategy","prevState","shouldReuseRoute","createOrReuseChildren","shouldAttach","detachedRouteHandle","retrieve","createActivatedRoute","RedirectCommand","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","navigationCancelingError","cancellationCode","isNavigationCancelingError","ActivateRoutes","futureState","currState","forwardEvent","inputBindingEnabled","activate","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","futureChild","childOutletName","deactivateRoutes","deactivateRouteAndItsChildren","parentContext","future","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","treeNode","activateRoutes","stored","CanActivate","CanDeactivate","getAllRouteGuards","getChildRouteGuards","getTokenOrFunctionIdentity","tokenOrFunction","ɵisInjectable","futurePath","canDeactivateChecks","canActivateChecks","prevChildren","getRouteGuards","shouldRun","shouldRunGuardsAndResolvers","runGuardsAndResolvers","isEmptyError","INITIAL_VALUE","prioritizedGuardValue","isRedirect","redirectIfUrlTree","NoMatch","AbsoluteRedirect","urlTree","noMatch$1","ApplyRedirects","lineralizeSegments","applyRedirectCommands","redirectToFn","newRedirect","newTree","applyRedirectCreateUrlTree","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","consumedSegments","remainingSegments","positionalParamSegments","matchWithChecks","getOrCreateRouteInjectorIfNeeded","currentInjector","runCanMatchGuards","canMatch","canMatchObservables","injectionToken","isCanMatch","createWildcardMatchResult","matcher","slicedSegments","containsEmptyPathMatchesWithNamedOutlets","routes","emptyPathMatch","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","primarySegment","NoLeftoversInUrl","Recognizer","configLoader","rootComponentType","applyRedirects","absoluteRedirectCount","allowRedirects","noMatchError","recognize","rootSnapshot","routeState","createUrlTreeFromSnapshot","processSegmentGroup","parentRoute","processSegment","sortedConfig","sortByMatchingOutlets","outletChildren","last$1","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","processSegmentAgainstRoute","noLeftoversInUrl","rawSegment","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","_loadedComponent","getResolve","newSegments","getChildConfig","childConfig","childInjector","matchedOnOutlet","loadChildren","_loadedRoutes","runCanLoadGuards","canLoad","canLoadObservables","isCanLoad","shouldLoadResult","canLoadFails","hasEmptyPathConfig","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","flattenRouteTree","descendants","switchTap","nextResult","TitleStrategy","buildTitle","pageTitle","getResolvedTitleForRoute","DefaultTitleStrategy","updateTitle","ROUTER_CONFIGURATION","ɵEmptyOutletComponent","standardizeConfig","ROUTES","RouterConfigLoader","componentLoaders","childrenLoaders","compiler","onLoadStartListener","loadRunner","maybeUnwrapDefaultExport","onLoadEndListener","loader","factoryOrRoutes","rawRoutes","requireStandaloneComponents","isWrappedDefaultExport","UrlHandlingStrategy","DefaultUrlHandlingStrategy","shouldProcessUrl","extract","newUrlPart","wholeUrl","CREATE_VIEW_TRANSITION","VIEW_TRANSITION_OPTIONS","createViewTransition","transitionOptions","startViewTransition","skipNextTransition","resolveViewTransitionStarted","viewTransitionStarted","createRenderPromise","onViewTransitionCreated","NAVIGATION_ERROR_HANDLER","NavigationTransitions","hasRequestedNavigation","currentNavigation","currentTransition","lastSuccessfulNavigation","transitionAbortSubject","rootContexts","titleStrategy","urlHandlingStrategy","navigationErrorHandler","afterPreactivation","transitions","handleNavigationRequest","setupNavigations","initialUrlTree","initialRouterState","currentUrlTree","currentRawUrl","extractedUrl","rawUrl","targetSnapshot","currentRouterState","targetRouterState","guards","guardsResult","overallTransitionState","completed","cancelNavigationTransition","initialUrl","targetBrowserUrl","browserUrl","previousNavigation","urlTransition","navigated","isUpdatingInternalState","isUpdatedBrowserUrl","onSameUrlNavigation","recognize$1","navStart","guardsStart","checkGuards","runCanDeactivateChecks","futureRSS","currRSS","runCanDeactivate","currARS","canDeactivateObservables","closestInjector","isCanDeactivate","runCanActivateChecks","fireChildActivationStart","fireActivationStart","runCanActivateChild","futureARS","canActivateChildGuardsMapped","getCanActivateChild","canActivateChild","guardsMapped","isCanActivateChild","runCanActivate","canActivateObservables","isCanActivate","guardsEnd","resolveStart","dataResolved","resolveData","routesWithResolversToRun","routesNeedingDataUpdates","newRoute","routesProcessed","runResolve","resolveNode","getResolver","resolver","resolvedData","resolveEnd","loadComponents","loaders","loadedComponent","createRouterState","isRedirectingNavigationCancelingError","navigationError","navigationErrorHandlerResult","errorHandlerResult","ee","resolveNavigationPromiseOnError","navCancel","currentBrowserUrl","isBrowserTriggeredNavigation","RouteReuseStrategy","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","StateManager","HistoryStateManager","canceledNavigationResolution","urlUpdateStrategy","rawUrlTree","currentPageId","lastSuccessfulId","stateMemento","createStateMemento","getCurrentUrlTree","getRawUrlTree","browserPageId","ɵrouterPageId","getRouterState","registerNonRouterCurrentEntryChangeListener","handleRouterEvent","setBrowserUrl","restoreHistory","generateNgRouterState","restoringFromCaughtError","targetPagePosition","resetState","resetUrlToCurrentUrlTree","routerPageId","NavigationResult","FAILED","REDIRECTING","afterNextNavigation","exactMatchOptions","subsetMatchOptions","Router","stateManager","disposed","ɵConsole","ɵPendingTasks","navigationTransitions","componentInputBindingEnabled","eventsSubscription","resetConfig","subscribeToNavigationEvents","mergedTree","scheduleNavigation","isPublicRouterEvent","resetRootComponentType","initialNavigation","setUpLocationChangeListener","navigateToSyncWithBrowser","nonRouterCurrentEntryChangeSubscription","stateCopy","serializeUrl","getCurrentNavigation","createUrlTree","preserveFragment","relativeToUrlSegmentGroup","defaultQueryParamsHandling","removeEmptyProps","validateCommands","matchOptions","priorPromise","RouterLink","tabIndexAttribute","onChanges","routerLinkInput","updateHref","setTabIndexIfNotOnNativeEl","newTabIndex","applyAttributeValue","routerLink","commandsOrUrlTree","button","sanitizedValue","RouterLinkActive","_isActive","routerLinkActiveOptions","isActiveChange","routerEventsSubscription","subscribeToEachLinkOnChanges","linkInputChangesSubscription","allLinkChanges","isLinkActive","routerLinkActive","hasActiveLinks","ariaCurrentWhenActive","isActiveMatchOptions","isActiveCheckFn","PreloadingStrategy","RouterPreloader","preloadingStrategy","setUpPreloading","processRoutes","injectorForCurrentRoute","injectorForChildren","preloadConfig","loadedChildren$","recursiveLoadChildren$","loadComponent$","ROUTER_SCROLLER","RouterScroller","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","scheduleScrollEvent","routerFeature","getBootstrapListener","bootstrappedComponentRef","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","withPreloading","withViewTransitions","skipInitialTransition","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","rootRoute","RouterModule","provideForRootGuard","useHash","scrollOffset","provideInitialNavigation","bindToComponentInputs","enableViewTransitions","ROUTER_INITIALIZER","forChild","locationInitialized","CookieService","cookieKey","domain","isSecure","expiresValue","toUTCString","domainStr","pathStr","secureStr","hasItem","listOptions","cachedLocale","listFormat","ListFormat","updateCache","cachedTranslation","cachedValue","FileReader","readAsDataURL","WidgetLayout","WidgetTheme","LocationType","SelectionType","TRIP_TYPE","TRAVEL_DATES","PAX","DISCOUNT_CODE","SELECT_LANGUAGE_ROOT","FINNAIR_HOLIDAYS","DISRUPTION_ROOT","CANCEL_ROOT","INVOLUNTARY_CANCEL_ROOT","REACCOMMODATION_ROOT","ONE_UPGRADE_ROOT","TIMETABLE_ROOT","ROUTER_LANG_PARAM","fcomCampaignBlackFriday","fcomCampaignFinnairPlus","FINNISH_SITES","NON_EUROPE_SITES","expandButtonHiddenText","FlightReviewCardComponent_div_0_button_8_span_2_Template","notificationTranslationKey","FlightReviewCardComponent_div_0_button_8_Template","FlightReviewCardComponent_div_0_fcom_notification_10_Template","FlightReviewCardComponent_div_0_div_13_Template","expandMode","fareFamilyLabel","viewDetailsClosed$","FlightReviewCardComponent","FlightReviewCardComponent_div_0_Template","resolved","nextHandle","activeHandles","findAndClearHandle","Immediate","setImmediate","clearImmediate","immediateProvider","AsapScheduler","AsapAction","Notification","observeNotification","do","nextHandler","completeHandler","nextOrObserver","createNext","createError","createComplete","completeNotification","_c","keySelector","elementOrOptions","activeGroups","teardownAttempted","groupBySourceSubscriber","grouped","createGroupedObservable","groupSubject","groupSubscriber","DEFAULT_EFFECT_CONFIG","functional","useEffectsErrorHandler","CREATE_EFFECT_METADATA_KEY","createEffect","getSourceForInstance","isClass","classOrRecord","getClasses","classesAndRecords","mergeEffects","sourceInstance","globalErrorHandler","effectsErrorHandler","observables$","getSourceMetadata","getCreateEffectMetadata","observable$","effectAction$","materialize","defaultEffectsErrorHandler","retryAttemptLeft","Actions","ofType","allowedTypes","typeOrActionCreator","_ROOT_EFFECTS_GUARD","USER_PROVIDED_EFFECTS","_ROOT_EFFECTS","_ROOT_EFFECTS_INSTANCES","_FEATURE_EFFECTS","_FEATURE_EFFECTS_INSTANCE_GROUPS","EFFECTS_ERROR_HANDLER","ROOT_EFFECTS_INIT","rootEffectsInit","isOnInitEffects","functionName","EffectSources","addEffects","effectSourceInstance","toActions","effectsInstance","isClassInstance","effect$","resolveEffectSource","mergedEffects$","isOnRunEffects","ngrxOnRunEffects","reportInvalidActions","reporter","isAction","getEffectName","isMethod","dematerialize","init$","ngrxOnInitEffects","isOnIdentifyEffects","ngrxOnIdentifyEffects","EffectsRunner","isStarted","effectsSubscription","effectSources","EffectsRootModule","runner","rootEffectsInstances","storeRootModule","storeFeatureModule","EffectsFeatureModule","effectsRootModule","effectsInstanceGroups","effectsInstances","EffectsModule","featureEffects","effects","effectsClasses","createEffectsInstances","rootEffects","effectsGroups","userProvidedEffectsGroups","effectsGroup","userProvidedEffectsGroup","effectsTokenOrRecord","isToken","tokenOrRecord","IconsService","globalSVG","globalDefs","rendered","createGlobalSVG","alreadyRendered","addToGlobal","appendSymbol","appendDefs","_svgSymbolElementFromString","symbolDiv","defsDiv","defs","passportExpiryValidator","selectAll","tomorrow","formatToDateOfDateString","inputDate","isBetweenHours","startHour","endHour","dateHour","timeOptions","toISOStringPreserveTimeZone","BookingWidgetService","notificationWarning$","_notificationWarning$","_profile$","_loginStatus$","_travelDates$","discountCode$","_discountCode$","_flexibleDates$","continueEnabled$","_continueEnabled$","startingPrice$","_startingPrice$","airCalendarPrices$","_airCalendarPrices$","_prices$","showCompact$","_showCompact$","isMultiCity$","_isMultiCity$","originalBookingSelection$","_originalBookingSelection$","globalBookingWidgetSelectionChanges$","_globalBookingWidgetSelectionChanges$","flightSearchParams$","_flightSearchParams$","currentSearch$","_currentSearch$","bookingWidgetCalendarService","bookingWidgetFlightService","bookingWidgetTripService","usePopoverSelectorsSignal","usePopoverSelectors","bookingSelections$","globalBookingTravelDates","globalBookingDiscountCode","selectedTripType$","selectedTravelClass$","setCurrentSearchToCurrentParams","_priceRequestBaseParams$","priceParamsAreValid","mapToPriceRequestBaseParams","priceBaseParamsChanged","routeCffReady$","routeCffReady","validateFlightSearchParams","updatePriceAndCompactStatus","setPreviousSearchChange","preSearch","preOriginal","nextSearch","nextOrignal","originalSelection","originalBookingSelection","previousSearchChanged","changedType","setSelectionChangeType","isAirCalendar","isFlexibleDates","isAMTabEnabled","enableAM","flightsAreValid","previousFlight","hasConsecutiveDates","expandCompactWidget","setCompactWidget","showCompactWigetStatus","resetLocalOriginalBookingSelection","resetSearchSelection","navigateToBookingFlow","fromMatrix","airCalendarPrice","startingPrice","sendRecommendationsFlightSearchEvent","continueToBooking","deeplink","instantSearchPrice","navigateToMultiCityBookingFlow","setUsePopoverSelectors","setLocalOriginalBookingSelection","preChange","nextChange","flightSelection","setGlobalBookingSelectionToOriginal","currentChange","nt","selectionChangeType","hasBothLocations","sendFlightSearchEvent","PhonePrefixService","showDefault","activeCountry","so","SectionReviewItemComponent","SectionReviewItemComponent_fcom_icon_2_Template","UpdateEmergencyContactDetailsPath","updateEmergencyContactDetails$Response","updateEmergencyContactDetails","formatAmPaxGroup","rooms","formatted","room","numberOfAdults","childrenAges","BookingWidgetAmService","getOrigins","amApiQuery","mapAmOriginToLocation","getDestinations","mapAmDestinationToAmLocation","holidayTypes","getAvailability","amOrigin","holidayType","holidayTypeItem","mapPaxAmountToPaxBreakdown","date_r4","selectedDate_r6","AirCalendarComponent","selectDates","continue","continueDisabled$","airCalendarOpen","paxAmountBreakdown$","passengerTranslations","selectCalendarDates","closeAirCalendar","AirCalendarComponent_ng_template_0_Template","AirCalendarComponent_div_4_Template","AirCalendarComponent_span_13_Template","AirCalendarComponent_span_14_Template","AirCalendarComponent_ng_container_21_Template","amOrigins$","destinations$","continueModalOpen","continueToAm","destination_r5","updateRooms","setDuration","openContinueModal","AmBookingWidgetComponent_ng_container_6_ng_container_14_Template","selectedAmDestination$","selectionIsValid$","AmBookingWidgetComponent","amService","destinationCache","selectedRooms$","amDestinations$","duration$","amDestinations","HEL","origins","locationPair","selectedRooms","continueParams$","selectedDestination","durationCode","flexible","validateSelection","filteredLocations","filterInvalidDestination","continueParams","deepLink","amDeepLink","availableDestinations","amLocation","AmBookingWidgetComponent_div_4_Template","AmBookingWidgetComponent_ng_container_6_Template","DEFAULT_CARTRAWLER_NOTIFICATION","CarTrawlerBookingWidgetComponent","carTrawlerLocale","translatedContentUrl$","getTranslatedUrl","fragmentUrlKey","carTrawlerUrlRedirect","trackClick","selectedDuration","duration_r3","onDurationSelect","AmDurationSelectorComponent_li_8_span_4_Template","AmDurationSelectorComponent","durationOptions","AmDurationSelectorComponent_span_3_Template","AmDurationSelectorComponent_span_4_Template","AmDurationSelectorComponent_li_8_Template","paxAmountTotals","updatePaxAmountTotals","control_r5","selectedRoom_r7","childrenForm","childAgeOptionsWithoutInfants$","childAgeOptions$","removeRoom","onPaxDetailsUpdate","AmRoomSelectorComponent_li_11_li_25_Template","AmRoomSelectorComponent_li_11_div_27_Template","PAX_AMOUNT_CONFIG","minPerRoom","maxPerRoom","addRoom","maxTotal","maxTotalPax","maxTotalRooms","AmRoomSelectorComponent","setRooms","calculateTotalAndRemainingAmPaxAmount","remainingTotal","remainingAdults","remainingChildren","emitSelectedRooms","roomIndex","updateType","AmRoomSelectorComponent_span_7_Template","AmRoomSelectorComponent_li_11_Template","AmRoomSelectorComponent_div_12_Template","handlePopoverClose","BookingWidgetSelectorComponent_Conditional_0_ng_container_1_Template","filled","popoverContent","BookingWidgetSelectorComponent_Conditional_1_ng_container_1_Template","BookingWidgetSelectorComponent_ng_template_2_ng_container_0_ng_container_2_Template","selectorTemplate_r4","BookingWidgetSelectorComponent_ng_template_2_ng_container_1_ng_container_3_Template","BookingWidgetSelectorComponent_ng_template_2_ng_container_1_ng_container_8_Template","BookingWidgetSelectorComponent_ng_template_2_ng_container_0_Template","BookingWidgetSelectorComponent_ng_template_2_ng_container_1_Template","placeholder_r5","BookingWidgetSelectorComponent_ng_template_4_span_2_Template","label_r6","filled_r7","BookingWidgetSelectorComponent","bookingWidgetService","usePopover","BookingWidgetSelectorComponent_Conditional_0_Template","BookingWidgetSelectorComponent_Conditional_1_Template","BookingWidgetSelectorComponent_ng_template_2_Template","BookingWidgetSelectorComponent_ng_template_4_Template","totalPax$","PaxAmountSelectorComponent_ng_template_8_ng_container_10_Template","PaxAmountSelectorComponent_ng_template_8_Conditional_12_Template","PaxAmountSelectorComponent_ng_template_8_Conditional_13_Template","paxAmount_r6","PaxAmountSelectorComponent_fcom_modal_10_ng_container_2_Template","paxItem_r9","paxAmountConfig_r10","PaxAmountSelectorComponent_ng_template_11_li_2_fin_plus_minus_selector_9_Template","paxAmountConfig$","tClass_r12","onTravelClassSelect","PaxAmountSelectorComponent_ng_template_11_ul_9_li_1_fcom_icon_8_Template","PaxAmountSelectorComponent_ng_template_11_ul_9_li_1_Template","availableTravelClasses$","PaxAmountSelectorComponent_ng_template_11_li_2_Template","PaxAmountSelectorComponent_ng_template_11_ul_9_Template","popover_r16","displayTravelClass_r15","PaxAmountSelectorComponent","disableAutoFocus","PaxAmountSelectorComponent_Conditional_6_Template","PaxAmountSelectorComponent_Conditional_7_Template","PaxAmountSelectorComponent_ng_template_8_Template","PaxAmountSelectorComponent_fcom_modal_10_Template","PaxAmountSelectorComponent_ng_template_11_Template","popoverContent_r17","multicityHelpContent_r3","onAddReturnDate","TripTypeSelectorComponent_ng_template_11_Conditional_14_Conditional_3_Template","TripTypeSelectorComponent_ng_template_11_Conditional_14_Conditional_5_Template","returnDateMissing","currentTripType$","TripTypeSelectorComponent_ng_template_11_Conditional_14_Template","TripTypeSelectorComponent_ng_template_11_Conditional_15_Template","tripTypeOptions$","popOverFormGroup","FORM_CONTROL_NAME","tripType_r10","selectTripType","TripTypeSelectorComponent_li_17_Conditional_9_Template","TripTypeSelectorComponent_li_17_fcom_icon_10_Template","last_r11","showNewMultiCityTag","TripTypeSelectorComponent","addingReturnDate","openCalendar","alignToLeft","selectedElement","selectedTripTypeIndex$","availableTripTypes$","availableTripTypes","tripTypeRadioBtn","selectedTripType","confirmOnClose","TripTypeSelectorComponent_button_7_Template","TripTypeSelectorComponent_ng_template_9_Template","TripTypeSelectorComponent_ng_template_11_Template","TripTypeSelectorComponent_li_17_Template","popoverContent_r12","locationsSwitched","LocationSelectorComponent_ng_template_14_div_0_ng_container_10_Template","locationType_r5","locations_r6","LocationSelectorComponent_ng_template_14_div_0_Template","locationType$","handleClose","LocationSelectorComponent_fcom_modal_16_ng_container_3_Template","getUserLocation","isGeoLocating$","LocationSelectorComponent_ng_template_17_div_4_fcom_button_1_Template","locationType_r10","moveFocusToSearchInput","locationResults$","LocationSelectorComponent_ng_template_17_div_11_span_8_Template","popover_r13","queryString$","isAm","LocationSelectorComponent_ng_template_17_ng_container_13_li_3_div_14_fcom_icon_1_Template","LocationSelectorComponent_ng_template_17_ng_container_13_li_3_div_14_fcom_icon_2_Template","location_r15","locationType","setLocationOrStartNewSearch","locations_r16","i_r17","handleInitialLocationItemFocus","LocationSelectorComponent_ng_template_17_ng_container_13_li_3_ng_container_10_Template","LocationSelectorComponent_ng_template_17_ng_container_13_li_3_div_14_Template","first_r18","locationInfo_r20","LocationSelectorComponent_ng_template_17_ng_container_13_li_3_Template","moveFocusToResults","LocationSelectorComponent_ng_template_17_div_4_Template","LocationSelectorComponent_ng_template_17_fin_previous_searches_8_Template","LocationSelectorComponent_ng_template_17_div_11_Template","LocationSelectorComponent_ng_template_17_ng_container_13_Template","LocationSelectorComponent_ng_template_17_p_16_Template","LocationSelectorComponent_ng_template_17_fcom_loader_20_Template","locationSearchForm","showLocateMe","showPreviousSearches","enablePersonalization$","tmp_20_0","hasLocations$","tmp_24_0","location_r21","LocationSelectorComponent_ng_template_19_div_0_span_3_Template","LocationSelectorComponent_ng_template_19_div_0_Template","LocationSelectorComponent","geoLocationService","originPopoverOptions","destinationPopoverOptions","showSuggestedDestinations","GtmLocationEventType$","locationSelected","defaultOrigin$","locationSearch","amOrigins","trendingLocations","COOKIE_PERSONALIZATION","sendGtmEvent","searchAmHolidays","searchFlights","allowedOriginContinent","allowedDestinationContinent","locationPair$","oppositeLocationType","newLocations","Zt","locationItems","handleOpen","logEvent","closeByContext","resetSearch","locationListHeading","amLocations","searchAmLocations","lcQuery","lcA","lcB","locationLevenshteinPartialMatchSort","LocationSelectorComponent_ng_container_5_Template","LocationSelectorComponent_ng_container_7_Template","LocationSelectorComponent_ng_container_12_Template","LocationSelectorComponent_ng_template_14_Template","LocationSelectorComponent_fcom_modal_16_Template","LocationSelectorComponent_ng_template_17_Template","LocationSelectorComponent_ng_template_19_Template","originDisabled","popoverContent_r22","destinationDisabled","tmp_17_0","tmp_23_0","levenshteinDistance","partialMatch","distanceMatrix","DiscountCodeComponent_Conditional_0_ng_container_1_Template","popoverContent_r3","buttonContent_r2","openModal$","DiscountCodeComponent_Conditional_1_ng_container_1_Template","DiscountCodeComponent_ng_template_4_ng_container_10_Template","DiscountCodeComponent_ng_template_4_ng_container_11_Template","discountCode_r6","buttons_r7","DiscountCodeComponent_fcom_modal_6_ng_container_2_Template","DiscountCodeComponent_fcom_modal_6_ng_container_3_Template","discountCodeRules$","terms","checkDiscountCode","DiscountCodeComponent_ng_template_7_p_3_Template","DiscountCodeComponent_ng_template_7_p_5_Template","DiscountCodeComponent_ng_template_7_Conditional_6_Template","DiscountCodeComponent_ng_template_7_Conditional_8_Template","popover_r10","discountCodeForm","removeCode","DiscountCodeComponent_ng_template_9_Conditional_1_Conditional_4_Template","DiscountCodeComponent_ng_template_9_Conditional_1_Conditional_5_Template","popover_r15","DiscountCodeComponent_ng_template_9_Conditional_1_Template","DiscountCodeComponent_ng_template_9_Conditional_3_Template","DiscountCodeComponent","MarketingPrefixDiscountCode","_openModal","discountCodeValue","getPromoCodeTerms","DiscountCodeComponent_Conditional_0_Template","DiscountCodeComponent_Conditional_1_Template","DiscountCodeComponent_ng_template_2_Template","DiscountCodeComponent_ng_template_4_Template","DiscountCodeComponent_fcom_modal_6_Template","DiscountCodeComponent_ng_template_7_Template","DiscountCodeComponent_ng_template_9_Template","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_ng_container_1_a_6_fcom_icon_7_Template","notification_r3","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_ng_container_1_p_4_Template","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_ng_container_1_a_6_Template","notificationText_r4","text1","notificationSecondaryText_r5","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_fin_expand_2_div_9_div_1_Template","expand_r6","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_fin_expand_2_div_9_Template","i_r8","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_ng_container_1_Template","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_fin_expand_2_Template","first_r9","last_r10","BookingWidgetNotificationComponent_ng_container_0_fcom_notification_1_Template","BookingWidgetNotificationComponent","profileNotifications$","mapProfileNotifications","warnings$","mapWarningToNotification","otherNotifications$","destinationNotification$","mapDestinationNotification","busConnectionNotification","mapBusConnectionNotification","trainConnectionNotification","mapTrainConnectionNotification","amEarnPointsNotification","mapAmEarnPointsNotification","showMaxNumberOfFlightsNotification","showNotConsecutiveNotification","destinationNotification","notifications$","profileNotifications","otherNotifications","warningData","mapSeasonalNotification","mapNoFlightNotification","mapNoAwardFlightForRouteNotification","mapFlightGeneralNotification","seasonalDataNotification","nextFlight","BookingWidgetNotificationComponent_ng_container_0_Template","search_r2","setSearch","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_ng_container_1_div_7_Template","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_ng_container_1_span_11_Template","removePreviousSearchByCreationDate$","tmp_19_0","index_r5","flight_r8","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_ng_template_2_ng_container_6_div_7_Template","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_ng_template_2_ng_container_6_Template","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_ng_container_1_Template","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_ng_template_2_Template","multicityPreviousSearches_r9","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_li_1_Template","PreviousSearchesComponent_ng_container_0_div_1_ng_container_5_Template","previousSearches_r11","PreviousSearchesComponent_ng_container_0_div_1_Template","isMulticityListOnly$","PreviousSearchesComponent","closeLocationModal","focusOnSearchInput","getPreviousSearches","parsePreviousSearches","persistPreviousSearches","isPreviousSearchValid","departureIsNotInPast","creationIsBetween14Days","getLang","getPreviousSearchContext","movePreviousSearchFocus","previousSearchItems","loadedSearches","loadedPreviousSearches$","travelType","previousSearches$","creationDateToBeRemoved","searches","PreviousSearchesComponent_ng_container_0_Template","onAddReturnClick","cancelTravelDatesSelection","shouldSearchBeEnabled$","bookingFlowType$","showFlexibleDatesSelection$","showTripPriceFrom$","BookingWidgetCommonComponent_div_0_Conditional_5_Template","hideNewMultiCityNotification","BookingWidgetCommonComponent_ng_container_2_Conditional_1_Template","isNewMultiCityNotificationVisible$","BookingWidgetCommonComponent_div_4_div_7_ng_container_1_Template","isNewSearchEnabled$","BookingWidgetCommonComponent_div_4_div_4_Template","BookingWidgetCommonComponent_div_4_div_7_Template","BookingWidgetCommonComponent_div_4_Conditional_9_Template","showDiscountCode$","showFooterPrice$","BookingWidgetCommonComponent","preloadStrategyService","NEW_MULTI_CITY_NOTIFICATION_ID","compactMode","isFrontPage","changeGlobalBookingWidgetExpanderStatus","shouldFocusWidgetContent$","newSearch$","currentParams","lastSearch","bookingFlowType","filteredNotification","seasonalNotificationData","footerIsNotInView","MULTI_CITY_SOFT_LAUNCH","travelDatesSelector","setReturnTripType","footerRect","BookingWidgetCommonComponent_div_0_Template","BookingWidgetCommonComponent_ng_container_2_Template","BookingWidgetCommonComponent_div_4_Template","BookingWidgetCommonComponent_fin_air_calendar_8_Template","MulticitySelectorComponent_ng_container_0_ng_container_1_fcom_icon_button_5_Template","flight_r5","flights_r8","flights_r10","MulticitySelectorComponent_ng_container_0_ng_container_1_Template","MulticitySelectorComponent_ng_container_0_fcom_button_2_Template","locationsHaveChanged","first_r14","last_r15","flight_r13","flights_r16","MulticitySelectorComponent_ng_container_2_ng_container_1_Template","MulticitySelectorComponent","MulticitySelectorComponent_ng_container_0_Template","MulticitySelectorComponent_ng_container_2_Template","AmDatesSelectorComponent_Conditional_0_span_12_Template","AmDatesSelectorComponent_Conditional_0_span_16_Template","selectDuration","AmDatesSelectorComponent_Conditional_3_span_8_Template","selectedDuration$","amDestination$","suggestedAmTravelDays$","dayValue_r8","dayString_r9","AmDatesSelectorComponent","amAvailability$","calculateDisabledDatesBasedOnSearchables","amAvailability","getDisabledDatesForDpHolidayType","dayEntry","searchables","allSearchables","calculateDisabledDaysBasedOnDepartureAndAvailableDurations","calculateDisabledDaysBasedOnAvailableDays","availableDay","AmDatesSelectorComponent_Conditional_0_Template","AmDatesSelectorComponent_Conditional_3_Template","AmDatesSelectorComponent_Conditional_18_Template","AmDatesSelectorComponent_ng_template_24_Template","dayTemplate_r10","BookingWidgetComponent","GlobalBookingWidgetSummaryHeaderComponent","sourceIndex","emitClose","value_r5","name_r4","CountryAndLanguageSelectorComponent","useH1","prefill","showFlag","showCountryShopWarning$","languageOptions$","COUNTRY_SHOP_COUNTRIES","countryLanguage","matchingValue","updateShowFlag","CountryAndLanguageSelectorComponent_h1_3_Template","CountryAndLanguageSelectorComponent_h4_4_Template","CountryAndLanguageSelectorComponent_fcom_icon_6_Template","CountryAndLanguageSelectorComponent_fcom_icon_button_7_Template","CountryAndLanguageSelectorComponent_span_9_Template","CountryAndLanguageSelectorComponent_fcom_notification_16_Template","CountryAndLanguageSelectorComponent_ng_template_19_Template","countryOptionTemplate_r6","loggedInProfile_r1","LoginPromotionComponent_ng_container_0_fin_greeting_card_1_Template","showGreeting","LoginPromotionComponent_ng_template_2_fin_login_card_0_Template","LoginPromotionComponent","loggedInProfile$","LoginPromotionComponent_ng_container_0_Template","LoginPromotionComponent_ng_template_2_Template","loginCard_r3","UpdateAdvancePassengerInformationPath","updateAdvancePassengerInformation$Response","updateAdvancePassengerInformation","UpdateApisPath","updateApis$Response","updateApis","MsgFormatPipe","InformBlockComponent","InformBlockComponent_div_1_Template","tablet_down","laptop_up","small_desktop","large_desktop","resizeEvent$","breakpoint","matchesMedia","sanitizedPath$","fragments","updateDataFromQueryParams","contents$","campaignImg$","initialDestinationImg$","destinationChanges$","destinationImg$","backgroundImg$","campaignImg","destinationImg","remainingCompletions","remainingEmissions","showHighlightedContent","noContent","endTitleClasses","endTitle","SectionReviewComponent","alignParent","hasBorder","noButton","SectionReviewComponent_h2_1_Template","SectionReviewComponent_div_2_Template","SectionReviewComponent_div_3_Template","currentProp","sym","symObj","descriptor","enumerable","errors$","syncResub","subscribeForRetryWhen","QuotaType","FREE","TOPPED","SELECTED","cmsKey","formFieldId_r3","_classList","showPanel","_getPanelAriaLabelledby","panelAnimation","_uniqueAutocompleteIdCounter","MatAutocompleteSelectedEvent","MAT_AUTOCOMPLETE_DEFAULT_OPTIONS","MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY","autoActiveFirstOption","autoSelectActiveOption","requireSelection","MatAutocomplete","_isOpen","_setColor","_hideSingleSelectionIndicator","_syncParentProperties","_defaults","_activeOptionChanges","displayWith","optionSelected","optionActivated","inertGroups","_keyManager","_skipPredicate","_setVisibility","_setScrollTop","panel","_getScrollTop","_emitSelectEvent","labelId","ariaLabelledby","panelWidth","MatAutocomplete_ng_template_0_Template","MatAutocompleteOrigin","MAT_AUTOCOMPLETE_VALUE_ACCESSOR","MAT_AUTOCOMPLETE_SCROLL_STRATEGY","MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY","_componentDestroyed","_manuallyFloatingLabel","_viewportSubscription","_canOpenOnNextFocus","_closeKeyEventStream","_windowBlurHandler","panelOpen","autocompleteAttribute","_aboveClass","_overlayAttached","optionSelections","autocomplete","_handlePanelKeydown","_pendingAutoselectedOption","_updateNativeInputValue","_valueBeforeAutoSelection","_resetActiveItem","_trackedModal","_setStrategyPositions","_destroyPanel","_clearFromModal","openPanel","_openPanelInternal","_resetLabel","_latestOpeningTrigger","_closingActionsSubscription","_updatePanelState","_getOutsideClickStream","activeOption","clickTarget","formField","customOrigin","_assignOptionValue","hasModifier","_valueOnLastKeydown","prevActiveItem","isArrowKey","_canOpen","_scrollToOption","_previousValue","_getDisplayValue","_clearPreviousSelectedOption","valueOnAttach","_handleFocus","_attachOverlay","_floatLabel","_handleClick","shouldAnimate","_animateAndLockLabel","_subscribeToClosingActions","firstStable","optionChanges","wasOpen","_emitOpened","_setValueAndClose","toDisplay","toSelect","_valueOnAttach","_getConnectedElement","_getPanelWidth","_portal","_getOverlayConfig","_applyModalPanelOwnership","_keydownSubscription","_outsideClickSubscription","_getOverlayPosition","overlayPanelClass","belowPositions","abovePositions","_getHostWidth","firstEnabledOptionIndex","autocompleteDisabled","labelCount","newScrollPosition","modal","panelId","PopoverService","openPopover","_popoverOpen$","popover","SubmitService","PrefillService","user_r2","selectUser","CorporatePassengerSearchComponent_div_3_li_3_Template","CorporatePassengerSearchComponent_div_3_li_4_Template","users_r5","CorporatePassengerSearchComponent","userSelected","userCleared","toggleLoader","selectedUser$","prefillDone","filteredUsers$","users","selectedUser","startTimer","clearSelectedUser","clearInput","race","raceInit","CorporatePassengerSearchComponent_div_3_Template","departureChanges","locationCity","arrivalChanges","boundChangeDuration","ItineraryTimelineBoundHeaderComponent_header_0_ng_container_2_Template","ItineraryTimelineBoundHeaderComponent_header_0_ng_container_3_Template","ItineraryTimelineBoundHeaderComponent_header_0_ng_container_4_Template","ItineraryTimelineBoundHeaderComponent_header_0_span_5_Template","ItineraryTimelineBoundHeaderComponent_header_0_span_11_Template","ItineraryTimelineBoundHeaderComponent_header_0_span_14_Template","ItineraryTimelineBoundHeaderComponent_header_0_span_20_Template","bound$","departureCity$","arrivalCity$","ItineraryTimelineBoundHeaderComponent_div_1_fcom_notification_1_Template","ItineraryTimelineBoundHeaderComponent","latestBoundAndLocations$","showNoChangesNotification","ItineraryTimelineBoundHeaderComponent_header_0_Template","ItineraryTimelineBoundHeaderComponent_div_1_Template","ItineraryTimelineBoundHeaderComponent_div_2_Template","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_ng_container_0_ng_container_1_span_1_Template","previous_r1","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_ng_container_0_ng_container_2_span_1_Template","next_r3","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_ng_container_0_ng_container_1_Template","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_ng_container_0_ng_container_2_Template","toType","previousLeg","nextLeg","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_ng_container_0_Template","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_ng_template_1_Template","layover","requiresTransportationMethodChange","regularTransfer_r4","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_p_0_Template","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_ng_template_1_Template","requiresTerminalChange","transportationChange_r5","oldDuration","note","ItineraryTimelineLayoverComponent_ng_template_4_p_0_Template","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_1_Template","ItineraryTimelineLayoverComponent_ng_template_4_p_3_Template","ItineraryTimelineLayoverComponent_ng_template_4_ng_template_4_Template","ItineraryTimelineLayoverComponent_ng_template_4_span_9_Template","ItineraryTimelineLayoverComponent_ng_template_4_p_13_Template","ItineraryTimelineLayoverComponent_ng_template_4_div_14_Template","normalTranfer_r6","requiresAirportChange","potentialTerminalChange_r7","ItineraryTimelineLayoverComponent_ng_container_6_ng_container_1_Template","layoverContent_r8","ItineraryTimelineLayoverComponent_ng_template_7_ng_container_3_Template","ItineraryTimelineLayoverComponent","ItineraryTimelineLayoverComponent_ng_template_4_Template","ItineraryTimelineLayoverComponent_ng_container_6_Template","ItineraryTimelineLayoverComponent_ng_template_7_Template","importantNote_r9","oldEndpointDateTime","oldEndpointLocationCode","ItineraryTimelineLegEndpointComponent","ItineraryTimelineLegEndpointComponent_span_0_Template","ItineraryTimelineLegEndpointComponent_span_5_Template","ItineraryTimelineLegEndpointComponent_span_6_Template","stop_r2","terminal","ItineraryTimelineLegTechnicalStopsComponent_div_0_ng_container_11_p_6_Template","lastLeg","oldArrivalDateTime","oldArrivalLocationCode","ItineraryTimelineLegTechnicalStopsComponent_div_0_div_2_Template","ItineraryTimelineLegTechnicalStopsComponent_div_0_div_3_Template","ItineraryTimelineLegTechnicalStopsComponent_div_0_div_5_Template","ItineraryTimelineLegTechnicalStopsComponent_div_0_p_9_Template","ItineraryTimelineLegTechnicalStopsComponent_div_0_ng_container_10_Template","ItineraryTimelineLegTechnicalStopsComponent_div_0_ng_container_11_Template","lastStop_r3","ItineraryTimelineLegTechnicalStopsComponent","firstLeg","ItineraryTimelineLegTechnicalStopsComponent_div_0_Template","technicalStops","busOrTrainIconMap","flightChanges","departureTerminal","ItineraryTimelineFlightComponent_Conditional_13_Conditional_0_Conditional_4_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_0_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_2_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_8_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_9_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_12_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_17_Template","ItineraryTimelineFlightComponent_Conditional_13_Conditional_18_Template","isFlightUsingSAF","arrivalTerminal","ItineraryTimelineFlightComponent_Conditional_14_Conditional_5_Conditional_3_Template","ItineraryTimelineFlightComponent_Conditional_14_Conditional_5_Template","arrivalDateTime","arrivalLocationCode","ItineraryTimelineFlightComponent","ItineraryTimelineFlightComponent_Conditional_5_Template","ItineraryTimelineFlightComponent_Conditional_11_Template","ItineraryTimelineFlightComponent_Conditional_13_Template","ItineraryTimelineFlightComponent_Conditional_14_Template","GreetingCardComponent","extendedPassenger","PassengerInfoRenewedComponent_span_18_ng_container_1_span_1_Template","phone_r2","PassengerInfoRenewedComponent_span_18_ng_container_1_Template","PassengerInfoRenewedComponent_span_19_ng_container_1_span_1_Template","first_r5","card_r4","PassengerInfoRenewedComponent_span_19_ng_container_1_Template","onOpenEditModal","isEditButtonDisabled$","isEditButtonLoading$","onCloseEditModal","onConfirmEditModal","PassengerInfoRenewedComponent_ng_container_21_div_19_Template","isEditingPassenger$","paxIndex","isMainPax","airlineToOption","PassengerInfoRenewedComponent","initialFormData","isFormSaved","setupAirlinePrefixes","passengerIndex","PassengerInfoRenewedComponent_span_15_Template","PassengerInfoRenewedComponent_span_16_Template","PassengerInfoRenewedComponent_span_17_Template","PassengerInfoRenewedComponent_span_18_Template","PassengerInfoRenewedComponent_span_19_Template","PassengerInfoRenewedComponent_div_20_Template","PassengerInfoRenewedComponent_ng_container_21_Template","RefundPriceBreakdownComponent_ng_template_0_ng_container_2_Template","RefundPriceBreakdownComponent_ng_template_0_span_4_Template","priceLine_r8","ctx_r6","multipleBreakdown_r10","fee_r11","RefundPriceBreakdownComponent_fin_expand_2_ng_container_8_Template","RefundPriceBreakdownComponent_fin_expand_2_ng_template_14_Template","RefundPriceBreakdownComponent_fin_expand_2_ng_container_19_Template","labelContent_r12","pax_r14","fee_r15","service_r16","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_div_4_ng_container_17_ng_container_1_Template","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_div_4_ng_template_11_Template","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_div_4_ng_container_16_Template","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_div_4_ng_container_17_Template","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_div_4_ng_container_19_Template","labelContent_r17","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_div_4_Template","breakdown_r18","RefundPriceBreakdownComponent_ng_template_4_fin_expand_0_Template","tax_r20","RefundPriceBreakdownComponent_table_9_tr_10_Template","RefundPriceBreakdownComponent","multiplePassengerRefundBreakdown$","RefundPriceBreakdownComponent_ng_template_0_Template","RefundPriceBreakdownComponent_fin_expand_2_Template","RefundPriceBreakdownComponent_ng_template_4_Template","RefundPriceBreakdownComponent_table_9_Template","singlePassengerRefundPriceBreakdown_r21","UFOWithModifyButtonComponent_div_9_fcom_tag_2_Template","UFOWithModifyButtonComponent_div_9_fcom_tag_3_Template","paxReviewCard","UFOWithModifyButtonComponent","flightOrBound$","ufoAirports$","updateFlightOrBound","viewDetailsClosed","UFOWithModifyButtonComponent_div_9_Template","UFOWithModifyButtonComponent_fcom_button_11_Template","tag_r2","FlightSelectionFareFamilyListOptionComponent_div_0_For_2_Conditional_3_Template","FlightSelectionFareFamilyListOptionComponent_div_0_For_2_Conditional_6_Template","tagTheme$","iconPosition","fareFamily_r4","totalAviosAccrual","toLocaleString","FlightSelectionFareFamilyListOptionComponent_div_0_ng_container_19_span_3_Template","FlightSelectionFareFamilyListOptionComponent_div_0_ng_container_19_span_4_Template","FlightSelectionFareFamilyListOptionComponent_div_0_For_2_Template","checkboxChange","FlightSelectionFareFamilyListOptionComponent_div_0_fcom_tag_8_Template","FlightSelectionFareFamilyListOptionComponent_div_0_span_16_Template","FlightSelectionFareFamilyListOptionComponent_div_0_ng_container_19_Template","FlightSelectionFareFamilyListOptionComponent_div_0_fin_benefit_22_Template","badgeType","isNotAward$","fareFamilyBenefit$","FlightSelectionFareFamilyListOptionComponent","selected$","isHover$","fareFamily$","isHover","isTabletDown","FlightSelectionFareFamilyListOptionComponent_div_0_Template","CommonBookingComponentsModule","PassengerInfoComponent","ItineraryTimelineComponent","PurchaseCheckoutComponent","SubHeaderComponent","AirBoundsFareFamilyOptionComponent","FareFamilyDetailsComponent","UpsellOptionComponent","CountrySelectionComponent","i47","i48","i49","i50","AdditionalEmailComponent","i51","i52","i53","i54","GLOBAL","getUrl","mmb","reaccommodation","loyalty","refunds","templateUrl","extraParams","fragmentJsonUrl","getJson","getLocalization","i18nData","pluckProperty","getPage","getPicturesByTaxonomyTags","taxonomyTags","prepareResult","hits","documentType","propertySet","subjectTaxonomyExtRef","getBookingPicture","numHits","hit","restrictToDestinations","campaignTravelClass","getPageJson","openBasket","showInfoIcon","isBasketDisabled","hasActiveBasketState","hasBasketActionInMobileOnly","changeStep","SubHeaderComponent_aside_4_fcom_icon_button_2_Template","SubHeaderComponent_aside_4_fcom_button_4_Template","SubHeaderComponent_aside_4_button_6_Template","showModifyButton$","backgroundColorClass","staticHeight","noHeader","hasBasket","SubHeaderComponent_aside_4_Template","subscribeOn","scheduleAsyncIterable","scheduled","scheduleObservable","scheduleArray","schedulePromise","scheduleIterable","return","scheduleReadableStreamLike","CSS_CLASS_PREFIX","NavigatedPathToContentWrapperService","_contentWrapperNavigatedClass$","contentWrapperNavigatedClass$","setRouter","subscribeToRouter","setClass","routerEventPath","navigatedMainArea","NavigationMenuService","modalOpenSubject$","isMenuOpenSubject$","isFooterOpenSubject$","oneworldLinkSubject$","routerEvents$","isFooterOpen$","locationCodes$","constructMenuItemsObservable","constructIsLandingPageObservable","constructCurrentPathObservable","constructDestinationsMenuItem$","constructExpandedOrActiveNaviCategory$","setFooterOpen","setFooterClosed","menu","catMenu","catSection","stopImmediatePropagation","navigation$","memberProfileType","markMenuItemAsHiddenInNavigation","filterMenuItemsByPath","prefillTimetableLink","initMenu","menuData","initMenuItems","onCurrentPath","fixedUrl","isBaseUrl","splitPathFromUrl","deprecatedDestinationsBreadcrumbItem$","loggedProfileType","checkItemsVisibility","breadcrumbApplicationOverride","BREADCRUMB_APPLICATION_OVERRIDE","HIDE_FROM_MAIN_MENU","HIDE_FROM_SECTION_NAVI","SHOW_FOR_LOGGED_IN_PLUS","setHasVisibleChildren","checkItemVisibility","ToasterService","queue$","removalQueue$","toasterMessage$","messageToRemove$","removeMessage","CmsPageService","getPageData","customRegexp","getCurrentUrl","getTemplateForPathIfExists","getPageDataAndSetMeta","setMeta","contentContentType","CMChannel","seoTitle","metaData","sanitizedUrl","urlRegex","EventLabel","SEARCH_CONNECTIONS","paxAdults","paxChildren","analyticsConsent","finnairCookieId","requestId","getLocationCodeForType","sessionId","pageNumber","trendingDestinationLimit","_getTrendingDestinations","departureFrom","trendingResponse","mapToCampaignLocation","WelcomeBackMessageService","CORPORATE_ENROLLMENT","HotjarAction","EVENT","IDENTIFY","HotjarService","captureStarted","hasIdentified","userId","executeAction","hotjar","hj","LoyaltyTierService","getMemberTierDetails","getTierLimitsData","tierLimits","lifetimeTierLimits","cardTier","nextTier","currentPeriod","lifetimeTier","lifetimeTierFlag","lifetimeTierPoints","cardExpirationDate","tierState","getTierState","isStartingTier","isGainingMaintainingOrHighestLumo","TierState","GAIN","MAINTAIN","HIGHEST","targetTier","cardLifetimeTierFlag","cardTierName","TIER_DATA_MAP","tierName","cardTierFullName","getCardTierFullName","lifetimeTargetTier","targetTierLimit","tierPointsCollected","aySecretTierPointsRequired","aySecretTierPoints","qualifyingAYSecretTierPoints","partnerTierPointsCollected","qualifyingPartnerTierPointsLimit","qualifyingPartnerTierPoints","qualifyingTierPoints","targetTierFlightLimit","TIER_FLIGHT_LIMITS","qualifyingFlightsFlown","aySecretNumQFlightRequired","aySecretNumQFlightCalc","partnerFlightsFlown","qualifyingPartnerFlightsLimit","qualifyingPartnerFlights","qualifyingFlights","tierProgress","lifetimeTargetTierLimit","qualifyingLifetimeTierPoints","lifetimeProgress","targetTierName","trackingPeriodStart","trackingPeriodEnd","AVIOS_TIER_LIMITS","AVIOS_LIFETIME_TIER_LIMITS","profileTier","fullName","LIFETIME_TIER_TEXT","TierName","UserAgentService","isMobileDevice","isTabletDevice","isDesktopDevice","isAndroid","isIos","MSStream","PriceCalendarService","appStore$","_startingFromPrice$","_fullYearPrices$","_calendarPrices$","_followingMonthPrices$","_params$","_availability$","getPricesForFullYearRequestsCache$","fullYearPrices","getPricesForFullYear","prevParams","prevTravelDates","nextParams","nextTravelDates","_isLoading$","fullYearPrices$","fullYearParams","convertToFullYearParams","serializedParams","requestCacheMap","newMap","followingMonthParams","convertToFollowingMonthParams","destinationTitle","getCommonParams","CONVERT_NEW_LINES_KEY","formValues","submitQuery","reservationNumber","buildHeaders","delivered","Accept","prefillFromProfile","formFields","setValues","prefilled","getFieldFromPrimaryAddress","primaryAddress","addresses","setPageMetadata","metaDescription","SortBehavior","ALPHABETICAL","campaignLink_r1","CampaignBannerComponent_ng_container_0_div_1_Template","campaignBannerService","campaignLink$","utm_campaign","utm_source","CampaignBannerComponent_ng_container_0_Template","finClickOutside","globalClicks$","QueueScheduler","QueueAction","arrowPosition$","arrowPositionClass","updatePosition$","resize$","scroll$","arrowWidth","tearDown$","onmouseenter","onmouseleave","validInputs","triggerRect$","getTriggerPosition","isFixedPosition","aRect","aHeight","bRect","bHeight","popoverPositionProperties$","isFullscreen$","triggerRect","isFullscreen","computeArrowPosition","computeOffsetLeft","computeOffsetTop","popoverShouldBeOnTop","popoverHeight","clientTop","clientLeft","DOMRect","minOffsetLeft","triggerCenter","windowWidth","ABSOLUTE_X_PADDING","PopoverComponent_div_6_Template","PopoverComponent_ng_container_12_Template","PopoverComponent_button_13_Template","PopoverComponent_button_14_Template","TabComponent","activeValue","addTab","removeTab","contentPopover","tabTitleDataTestId","LIGHT_TERTIARY_FORM","DARK_TERTIARY_FORM","tooltipClicked","contentTooltip_r4","TextInputComponent_label_2_ng_template_8_fcom_icon_button_0_Template","TextInputComponent_label_2_Conditional_2_Template","TextInputComponent_label_2_Conditional_3_Template","TextInputComponent_label_2_span_4_Template","TextInputComponent_label_2_ng_template_5_Template","TextInputComponent_label_2_fcom_icon_button_7_Template","TextInputComponent_label_2_ng_template_8_Template","useCustomTooltipAction","tooltipIcon_r5","inputEvent","placeHolderText","isPassword","isPasswordVisible","cursorType","handleIconClick","TextInputComponent_Conditional_5_fcom_icon_button_0_Template","translationErrorPrefix","TextInputComponent_div_8_span_1_Template","TextInputComponent_div_8_span_2_Template","TextInputComponent_div_8_span_3_Template","TextInputComponent_div_8_span_4_Template","TextInputComponent_div_8_span_5_Template","TextInputComponent_div_8_span_6_Template","ariaOptions","showClearIcon","hasRequiredValidator","toggleIcon","togglePasswordVisibility","clearInputField","TextInputComponent_label_2_Template","TextInputComponent_input_3_Template","TextInputComponent_Conditional_4_Template","TextInputComponent_Conditional_5_Template","TextInputComponent_span_6_Template","TextInputComponent_textarea_7_Template","TextInputComponent_div_8_Template","TextInputComponent_div_9_Template","hideLabel","getEligibleBoundIndexAndStartDate","disruptionRebooking","eligibleBoundIndex","originalLocalDate","eligibleDateRanges","fromDateTime","toDateTime","RE_FETCH_TIERS","hasRefetchTierLevels","isPassengerFFTierChanged","passengerToValidate","oldTiers","newTiers","isComplexBooking","isBlob","Blob","ParameterCodecInstance","ParameterCodec","encodeKey","encodeValue","decodeKey","decodeValue","Parameter","defaultExplode","serializeValue","propVal","PathParameter","QueryParameter","HeaderParameter","operationPath","_path","_query","_header","_bodyContentType","formValue","formDataValue","_bodyContent","FormData","toAppend","pathParam","httpParams","queryParam","httpHeaders","headerParam","HttpRequest","reportProgress","BookingOrderService","fromOrderFetchInformation","triggerLoadOrder","information","loadOrder","queueOrderLoad","triggerFetchServiceCatalog","triggerFetchPredictions","onCloseIndiaNotification","INDIA_REDIRECT_COOKIE","INDIA_REDIRECT_CLOSED_COOKIE","BaseLayoutComponent","showIndiaRedirectNotification","BaseLayoutComponent_fcom_notification_5_Template","main_r3","BaseLayoutModule","TrapFocusDirective","keyDownListener","BRAND_LANDING_PAGE_FOOTER","BRAND_LANDING_PAGE_HERO","CAROUSEL","IMAGE_BANNER","IMAGE_RIGHT_BANNER","IMAGE_GRID_BANNER","INTRODUCTION_BANNER","TEXT_ON_VIDEO","SECTION_NAVI","TEASER_CAROUSEL","TEASER_LIST_HIGHLIGHT","DESTINATION_TITLE","COLLECTION_NEWS_FEED","BANNER_LARGE_SLOGAN","BLUEWINGS_CHIPS","BUTTON_LINK","CHECKED_LIST","ROUNDED_TABLE","ICE_10_BG","SECTION_ONE_THIRD_LEFT","SECTION_ONE_THIRD_RIGHT","SECTION_TWO_THIRDS_RIGHT","SECTION_ONE_FOURTH_LEFT","SECTION_ONE_FOURTH_RIGHT","SECTION_THREE_FOURTHS_RIGHT","NORDIC_BLUE_50_BG","NORDIC_BLUE_100_BG","NORDIC_BLUE_900_BG","HEATHER_BG","HEADER_LEVEL_1","HEADER_LEVEL_2","HEADER_LEVEL_3","HEADER_LEVEL_4","HEADER_LEVEL_5","HEADER_LEVEL_6","ASPECT_RATIO_1X1","ASPECT_RATIO_3X4","ASPECT_RATIO_4X3","ASPECT_RATIO_16X9","ASPECT_RATIO_21X9","FONT_HEADING_1","FONT_HEADING_2","FONT_HEADING_3","FONT_HEADING_4","FONT_HEADING_5","CmsTaxonomyPicture","FINNAIR_AVIOS_LOGO","FINNAIR_AVIOS_KEYLINE_WHITE","FINNAIR_AVIOS_KEYLINE_NAVY","FINNAIR_ONEWORLD_LOGO","FINNAIR_ONEWORLD_GEM_EMERALD_LOGO","FINNAIR_ONEWORLD_GEM_RUBY_LOGO","FINNAIR_ONEWORLD_GEM_SAPPHIRE_LOGO","PersonalizationParameter","CreditCardPersonalizationParameter","CmsPreviewPersonalizationParameter","P13N_TEST","P13N_TEST_CONTEXT","PREVIEW_DATE","CmsPersonalizationParameter","callBindBasic","$indexOf","switchMapTo","innerObservable","tapObserver","isUnsub","toOfferLink","resolveLocationCode","cmsOffer","findAspectRatio","LayoutVariant","SceneVariant","economy","ecopremium","business","galley","toaster","containerId","integrity","fleet","open3dSeatMap","setup3dSeatMap","displayToasterError","SeatMapVr","selectScene","scene","isInitialized","injectFiles","addContainer","initConfig","getGtmAnalyticFunction","analyticName","gtmAnalytic","resource_cdn","ambientSound","destinationSelector","onUserChangeScene","onUserCloseViewer","onUserMove360","onUserOpenInfo","injectScript","injectStyleSheet","crossOrigin","RESPONSE_CODE_HANDLER","isCmsArticle","throttle","leading","trailing","sendValue","throttled","endThrottling","cleanupThrottling","startThrottle","last_r5","expand_r1","CmsTravelGuideComponent_ng_container_1_ng_container_1_fin_expand_1_Template","CmsTravelGuideComponent_ng_container_1_ng_container_1_Template","travelGuide$","related$","CmsTravelGuideComponent_ng_container_1_Template","IconButtonComponent","trueResult","falseResult","hasBusLeg","FareFamilyDetailsComponent_fcom_notification_6_Template","_servicesState","_serviceCatalog","_serviceAvailability","_serviceCatalogCampaigns","_campaignsShown","_serviceSelections","_servicesStatus","_servicesForCategory","sc","_serviceCategories","_serviceCategoriesMap","_servicesReady","servicesStatus","_serviceSelectionsForCategory","_upsell","_selectionsForCategories","allCategories","_serviceMapForCategories","categoriesMap","serviceCategories","categoryMap","isBoundBased","serviceCategoriesMap","serviceCatalogCampaigns","serviceCatalogCampaignIdsForFragment","campaignsAndCategories","campaignCategory","serviceSelectionsForFragment","_serviceSelectionsForFragmentAndCategory","variantsQuantity","quantitiesForFragment","innerQuantitiesForFragment","newQuantity","_variantsQuantity","servicesReady","servicesForFragmentAndCategory","_servicesForFragmentAndCategory","serviceMapForCategories","serviceSelectionsForCategoryAllTravelers","_allSelectionsForCategory","translatedServices","addTranslationsToService","serviceForTraveler","maxBaggageWeight","serviceMapForCategoriesForTravelers","serviceMapForTravelers","oe","travelerOrGroup","selectionMapForCategoriesForTravelers","selectionsForTravelers","totalPriceForSelectionsForCategories","travelerSelection","selectionPrice","selectionSubTotal","handledResult","syncUnsub","ProgressIndicatorModule","PaginationModule","TableModule","TableComponent","FiltersModule","TitledCardModule","uiModules","TabsModule","DatepickerModule","tripsReducer","dismissedWithPoints","milestonesReducer","MilestonesActions","milestones","TripsEffects","paxTripService","fetchTrips$","LoyaltyCoreModule","loyaltyReducers","FocusDirective","autofocus","trimAndReplaceWhitespace","removeWhitespaces","p_r3","toggleVisible","navigateTo","FooterOfferComponent_div_0_div_13_Template","navMenuService","FooterOfferComponent_div_0_Template","DIR_DOCUMENT","DIR_DOCUMENT_FACTORY","RTL_LOCALE_PATTERN","_resolveDirectionality","removeEmail","email_r4","emailsArray","addEmail","disabledPlaceholder","AdditionalEmailComponent_fcom_tag_button_8_Template","CHECK_IN_BOARDING_PASS","CHECK_IN_STEPS","VIEW_PASSENGERS","TRAVEL_PREPARATION","CAR_RENTAL","ERROR_STEPS","phaseGenerator","idGenerator","ABCLASIC04","ABCLASIC01","AECLASIC01","APECLASI01","GlobalBookingWidgetSummaryHeaderComponent_ng_template_1_ng_container_5_ng_container_1_Template","modifySearchButton_r3","modifySearchDetails","GlobalBookingWidgetSummaryHeaderComponent_ng_template_1_ng_container_5_Template","enableModifySearch$","GlobalBookingWidgetSummaryHeaderComponent_ng_template_3_Conditional_0_Template","GlobalBookingWidgetSummaryHeaderComponent_ng_template_3_Conditional_2_Template","dispatchExpanderStatus","bookingHeaderSummary_r9","isExpanderOpen$","EXPANDER_KEY","SCROLL_INITIAL_DELAY_TIME","SCROLL_CLOSE_WIDGET_DELAY_TIME","lastScrollTop","initTime","hasChanges","isWidgetOpen","handleScroll","scrollingElement","GlobalBookingWidgetSummaryHeaderComponent_ng_template_1_Template","GlobalBookingWidgetSummaryHeaderComponent_ng_template_3_Template","GlobalBookingWidgetSummaryHeaderComponent_div_7_Template","GlobalBookingWidgetSummaryHeaderComponent_fcom_modal_9_Template","GlobalBookingWidgetSummaryHeaderComponent_ng_template_12_Template","modifiers","error404template","createStateCacheKey","createP13CacheKey","currentCmsPageTemplate$","segment$","defaultTemplate$","loadOnce","personalisedTemplate$","getP13NTemplate","currentPageTemplate","getTemplate","errorTemplateFromError","fetchCustomizedContent","originalContent","profileValue","getPersonalizedContentItem","children$","personalizationSearchParams","profileTierParam","segmentGroupParam","creditCardParamKey","creditCardPersonalizationParameterFlagName","creditCardParam","allPersonalizationParams","pathWithoutParams","EvalError","ToObservablePipe","sub$","combineLatestInit","valueTransform","maybeSchedule","remainingFirstValues","hasFirstValue","BookingWidgetTripService","_routeCffReady$","setPaxDetailsGtm$","globalBookingAvailableTravelClasses","globalBookingTravelClass","setTripTypeBasedOnTab","getAvailableTravelClasses","setPaxDetailsGtm","validLocations","routeCffDataForFlights","cffData","mapCffsToAvailableTravelClasses","availableTravelClass","locationRouteCffData","cffsForFlight","uniqueClasses","getGtmPassengers","AncillaryService","commonAncillaryService","seatMapSubscription","cartHash","getCartSeatMapForFlight","mapToCachedLocations","convertToLocalDateIfNeeded","_cachedLocationsMap","locationsState","_selectCommonState","_selectGlobalBookingState","cachedLocations","_getGlobalBookingTripType","globalBookingState","_getGlobalBookingFlights","_globalBookingTravelClassState","_getGlobalBookingTravelDates","_globalBookingAvailableTravelClasses","_getGlobalBookingTravelClass","_globalBookingTravelClasses","tcs","available","_getGlobalBookingOrigin","_getGlobalBookingRouteType","_getGlobalBookingDiscountCode","_globalBookingLocations","_globalBookingPaxAmount","IconsPreloadService","iconsService","preloadIcons","iconsData","iconData","UnsubscriptionError","_super","initialTeardown","_parentage","_finalizers","initialFinalizer","finalizer","execFinalizer","teardown","_hasParent","_addParent","_removeParent","EMPTY_SUBSCRIPTION","accompanyingInfant","accompanyingAdult","PassengerInfoComponent_div_18_ng_container_1_span_1_Template","PassengerInfoComponent_div_18_ng_container_1_Template","updatePassenger","PassengerInfoComponent_span_13_Template","PassengerInfoComponent_span_14_Template","PassengerInfoComponent_div_16_Template","PassengerInfoComponent_div_17_Template","PassengerInfoComponent_div_18_Template","PassengerInfoComponent_div_21_Template","ScrolledPastService","intersectionSubject$","listenToElement","POLL_INTERVAL","ScrolledPastDirective","scrolledPastService","finScrolledPast","listenToIntersectionEvents","events$","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_1_Conditional_2_Template","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_1_Conditional_3_Template","extendedFareFamily","tag_r3","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_2_For_1_Conditional_2_Template","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_2_For_1_Conditional_5_Template","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_2_For_1_Template","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_1_Template","AirBoundsFareFamilyOptionComponent_Conditional_1_Conditional_2_Template","brandNameDescription","AirBoundsFareFamilyOptionComponent_ng_container_19_span_3_Template","AirBoundsFareFamilyOptionComponent_ng_container_19_span_4_Template","AirBoundsFareFamilyOptionComponent_fin_expand_20_ng_container_4_Template","AirBoundsFareFamilyOptionComponent_fin_expand_20_ng_container_5_Template","isNotAward","accordionId","benefits_r5","highlightedBenefits","benefit_r6","AirBoundsFareFamilyOptionComponent_ng_template_24_fin_benefit_1_Template","highlightedBenefits_r8","hasSpecialOffer","showDimensionsAndDetails","handleSelectFareFamilyClick","baseBoundFareFamily","handleShowDetails","AirBoundsFareFamilyOptionComponent_Conditional_1_Template","AirBoundsFareFamilyOptionComponent_span_10_Template","AirBoundsFareFamilyOptionComponent_span_15_Template","AirBoundsFareFamilyOptionComponent_div_18_Template","AirBoundsFareFamilyOptionComponent_ng_container_19_Template","AirBoundsFareFamilyOptionComponent_fin_expand_20_Template","AirBoundsFareFamilyOptionComponent_ng_container_22_Template","AirBoundsFareFamilyOptionComponent_ng_template_24_Template","redirectUnion","getNotificationMessageForNewFlight","cancelled","differentAirport","differentAirportSelected","differentDate","differentDateSelected","boundHasOvernightLayover","getBoundType","getFareFamilyLabel","BlockImageComponent","overlayBlur","fixed","mapImageToResponsiveImageData","cmsAspectRatio","ContentWithModalComponent","openModalIfLink","ContentWithModalComponent_cms_unstyled_fragment_3_Template","UpsellOptionComponent_div_0_div_8_fcom_tag_3_span_2_Template","UpsellOptionComponent_div_0_div_8_fcom_tag_3_span_3_Template","UpsellOptionComponent_div_0_div_8_fcom_tag_3_Template","emitOpenCabinClassModal","UpsellOptionComponent_div_0_div_8_Template","UpsellOptionComponent_div_0_span_22_Template","selectNextCabinClass","UpsellOptionComponent_div_0_div_33_Template","descriptionKey$","hideCabinClassModalLink$","imageData_r6","UpsellOptionComponent_div_1_div_1_Template","showCompareBlock$","isLongHaulLegAndAy","imageKey$","haul","imageKey","UpsellOptionComponent_div_0_Template","UpsellOptionComponent_div_1_Template","enableAutoFocus","enableOpenJaw","isTablet","defaultLocationPairs","ond","LinkBlockComponent_a_0_span_5_Template","LinkBlockComponent_a_0_Template","schedulerArg","_with","timeoutErrorFactory","originalSourceSubscription","timerSubscription","activeTask","lastTime","emitWhenIdle","targetTime","noText","CmsTextOnImageComponent_fin_text_on_image_1_Template","CmsTextOnImageComponent_fin_text_on_image_2_Template","PATTERN","hasProtoAccessor","callBind","gOPD","$getPrototypeOf","paymentService","isEnableFeedbackMMB","paymentStatus$","cart$","getPurchaseFlow","ecommerceEventGA4","receivedUrl","leg_r1","legChanges","ItineraryTimelineComponent_section_0_ng_container_6_ng_container_1_ng_container_1_Template","ItineraryTimelineComponent_section_0_ng_container_6_ng_container_1_ng_container_2_Template","ItineraryTimelineComponent_section_0_ng_container_6_ng_container_1_Template","ItineraryTimelineComponent_section_0_div_7_fcom_notification_1_Template","ItineraryTimelineComponent_section_0_ng_container_6_Template","ItineraryTimelineComponent_section_0_div_7_Template","nonCommonTranslationPrefix","ItineraryTimelineComponent_section_0_Template","btnText","btnIcon","TableComponent_thead_5_th_2_ng_container_2_Template","header_r4","TableComponent_thead_5_th_2_Template","mobileTemplate","mobileHeader","TableComponent_thead_6_ng_container_3_Template","TableComponent_tr_8_td_1_ng_container_1_ng_container_1_Template","cellTemplate","row_r7","header_r8","TableComponent_tr_8_td_1_ng_container_2_ng_container_1_Template","btnTemplate_r9","TableComponent_tr_8_td_1_ng_container_1_Template","TableComponent_tr_8_td_1_ng_container_2_Template","columnIndex_r10","rowIndex_r12","tableData","usePagination","useBtn","rowAction","TableComponent_tr_8_td_1_Template","row_r14","TableComponent_tbody_9_tr_1_ng_container_2_Template","rowIndex_r15","TableComponent_tbody_9_tr_1_Template","noResultsMsg","changeIndexes","totalPaginationItems","TableComponent_ng_template_0_Template","TableComponent_thead_5_Template","TableComponent_thead_6_Template","TableComponent_tr_8_Template","TableComponent_tbody_9_Template","TableComponent_tbody_10_Template","TableComponent_tbody_11_Template","TableComponent_fcom_pagination_12_Template","caption","DateFormatPipe","cachedPattern","cachedUseUserDate","DeviceForPayment","devices","_type","currentType","mapPaymentMethods","associatedIds","hasPrev","CheckboxComponent","contentFullWidth","showUnselectedIcon","CheckboxComponent_fcom_icon_4_Template","CheckboxComponent_fcom_icon_5_Template","location_r1","TripLocationInfoComponent_ng_container_0_div_1_Template","TripLocationInfoComponent","TripLocationInfoComponent_ng_container_0_Template","SELECT_DEPARTURE","SELECT_RETURN","errorOrErrorFactory","tab_r2","popover_r4","TabsComponent_li_7_span_3_ng_container_2_Template","TabsComponent_li_7_fcom_icon_2_Template","TabsComponent_li_7_span_3_Template","TabsComponent_li_7_span_4_Template","layoutType","tabStyleOverrideClasses","whiteSpaceNowrap","TabsComponent","bottomBorder","clickedTab","_defaultActivationUsed","scrollToSelectedTab","enableDefaultActivation","tabsNavi","tabsContainer","carousel","TabsComponent_li_7_Template","TabsComponent_ng_template_8_Template","nextButtonAriaLabel","prevButtonAriaLabel","h1Style$","titleText$","BookingWidgetComponent_Conditional_4_h1_0_Template","headingLevel","BookingWidgetComponent_Conditional_6_h1_0_Template","calendarIdentifier","isFrontPage$","BookingWidgetComponent_ng_container_8_fcom_tab_7_ng_container_2_fin_login_card_3_Template","BookingWidgetComponent_ng_container_8_fcom_tab_7_ng_container_2_fcom_loader_4_Template","BookingWidgetComponent_ng_container_8_fcom_tab_7_ng_container_2_ng_container_5_Template","BookingWidgetComponent_ng_container_8_fcom_tab_7_ng_container_2_Template","activeTab_r4","onAmLocationChanged","BookingWidgetComponent_ng_container_8_fcom_tab_8_ng_container_2_Template","BookingWidgetComponent_ng_container_8_fcom_tab_10_fin_cartrawler_booking_widget_2_Template","BookingWidgetComponent_ng_container_8_fin_booking_widget_common_6_Template","BookingWidgetComponent_ng_container_8_fcom_tab_7_Template","BookingWidgetComponent_ng_container_8_fcom_tab_8_Template","BookingWidgetComponent_ng_container_8_fcom_tab_10_Template","amTabEnabled$","carTrawlerTabEnabled","rootContainerStartHeight$","activeTabFromRouteParams","casProfile$","isFrontPagePersonalisationTestVariant$","personalisedLabelKey","previousLoginDate","isVariantB","widgetRoot","isWidgetTab","startHotjarCapture","BookingWidgetComponent_Conditional_4_Template","BookingWidgetComponent_Conditional_6_Template","BookingWidgetComponent_h2_7_Template","BookingWidgetComponent_ng_container_8_Template","replaceExtraSpaces","replaceNonBreakingSpaces","toCamelCase","trimContent","HttpHandler","HttpBackend","normalizedNames","lazyUpdate","lazyInit","maybeSetNormalizedName","setHeaderEntries","lcName","applyUpdate","toDelete","headerValues","HttpUrlEncodingCodec","standardEncoding","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","valueToString","cloneFrom","fromObject","paramParser","rawParams","codec","eqIdx","appendAll","eKey","HttpContext","isArrayBuffer","isFormData","third","fourth","mightHaveBody","transferCache","qIdx","serializeBody","isUrlSearchParams","detectContentTypeHeader","setHeaders","setParams","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","User","HttpResponseBase","defaultStatus","defaultStatusText","HttpHeaderResponse","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","addBody","HttpClient","res$","jsonp","callbackParam","XSSI_PREFIX$1","getResponseUrl$1","xRequestUrl","FetchBackend","fetchImpl","FetchFactory","aborter","AbortController","doRequest","abort","createRequestInit","fetchPromise","silenceSuperfluousUnhandledPromiseRejection","contentLength","chunks","partialText","receivedLength","reqZone","TextDecoder","chunksAll","concatChunks","parseBody","binContent","credentials","detectedType","interceptorChainEndFn","finalHandlerFn","adaptLegacyInterceptorToChain","chainTailFn","interceptor","initialRequest","downstreamRequest","HTTP_INTERCEPTORS","HTTP_INTERCEPTOR_FNS","HTTP_ROOT_INTERCEPTOR_FNS","REQUESTS_CONTRIBUTE_TO_STABILITY","legacyInterceptorFnFactory","HttpInterceptorHandler","backend","contributeToStability","dedupedInterceptorFns","nextSequencedFn","interceptorFn","chainedInterceptorFn","XSSI_PREFIX","HttpXhrBackend","xhrFactory","ɵloadImpl","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","getResponseUrl","responseURL","getResponseHeader","onLoad","responseText","originalBody","sentHeaders","onDownProgress","progressEvent","lengthComputable","onUpProgress","progress","XSRF_ENABLED","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","lastCookieString","lastToken","parseCount","getToken","cookieString","xsrfInterceptorFn","lcUrl","HttpFeatureKind","Interceptors","LegacyInterceptors","CustomXsrfConfiguration","NoXsrfProtection","JsonpSupport","RequestsMadeViaParent","Fetch","provideHttpClient","LEGACY_INTERCEPTOR_FN","withInterceptorsFromDi","makeHttpFeature","HTTP_TRANSFER_CACHE_ORIGIN_MAP","BODY","HEADERS","STATUS","STATUS_TEXT","REQ_URL","RESPONSE_TYPE","CACHE_OPTIONS","ALLOWED_METHODS","transferCacheInterceptorFn","isCacheActive","requestMethod","includePostRequests","includeRequestsWithAuthHeaders","hasAuthHeaders","originMap","requestUrl","mapRequestOriginUrl","mappedOrigin","storeKey","makeCacheKey","mappedRequestUrl","encodedParams","sortAndConcatParams","serializedBody","generateHash","headersToInclude","includeHeaders","Ee","undecodedBody","An","ke","gn","Nn","getFilteredHeaders","headersMap","withHttpTransferCache","cacheOptions","ɵperformanceMarkFeature","cacheState","ɵwhenStable","toQueryParamString","getBookingStepFromUrl","matchedStep","SESSION_KEY","storeSession","storedSession","getStoredSession","clearTracking","EmptyPipe","ConfigService","useDapiUATForUrls","IconButtonComponent_button_0_ng_container_1_Template","iconTemplate_r3","IconButtonComponent_a_1_ng_container_1_Template","icon_r5","IconButtonComponent_button_0_Template","IconButtonComponent_a_1_Template","IconButtonComponent_ng_template_2_Template","layoutVariant$","subjectTaxonomyTags$","t_r2","CmsTeaserComponent_ng_container_8_h1_2_Template","CmsTeaserComponent_ng_container_8_h3_3_Template","CmsTeaserComponent_ng_container_8_h4_4_Template","CmsTeaserComponent_ng_container_8_h2_5_Template","ingredients$","sectionTestId$","sectionId","ingredients","CmsTeaserComponent_div_6_Template","CmsTeaserComponent_ng_container_8_Template","CmsTeaserComponent_div_10_Template","CmsTeaserComponent_div_17_Template","ObjectUnsubscribedError","currentObservers","AnonymousSubject","observed","InputCheckboxComponent_ng_template_0_span_2_Template","innerHtml","InputCheckboxComponent_span_12_div_1_Template","contentWithLink_r5","errorClasses","errorKey","useLabelContent","InputCheckboxComponent_ng_template_0_Template","InputCheckboxComponent_ng_template_2_Template","inputElement_r3","InputCheckboxComponent_fcom_icon_8_Template","InputCheckboxComponent_fcom_icon_9_Template","InputCheckboxComponent_ng_content_11_Template","InputCheckboxComponent_span_12_Template","InputCheckboxComponent_div_13_Template","formatRoute","formatUserInput","parsePhoneNumber","parseCountryCode","buildAddress","CUSTOMER_SUPPORT_LANGUAGES","bookingClassSelectOptions","mapProfileTier","asTypedFormGroup","SMS_MESSAGING","THIRD_PARTY_OFFERS","MEMBER_OFFERS","FLIGHT_OFFERS","COOKIE_ADVERTISING","NOT_REAL_CONSENT_VALUE","DataCloudFlightSelection","AIRCRAFT","BOUND_TYPE","CURRENCY_CODE","FARE_FAMILY_NAME","FLIGHT_NUMBER","PAX_AMOUNT","PURCHASE_FLOW","ROUTE","TRAVEL_CLASS","DeepLinkSource","OLD_COM","FCOM","D","F","G","H","I","J","bd453ce7a096d47e","d5bc0a75792578c4","MEMBER","membership","cardIcon","oneworldLogo","tierKey","promotionItems","CmsOffersGridComponent_fin_offer_grid_0_Template","cachedFieldName","cachedCount","parseProfile","rawProfile","mapCorporateToStandardProfile","parsedProfile","corporateUserProfile","partStatus","passport","passportCountry","passportExpirationDate","passportIssueDate","dec2hex","secureRandomString","cr","createRedirectUrl","uxAuthUrl","isCorporateAdmin","countryCode_r1","countryCode$","CountrySelectionComponent_div_0_Template","defaultCompare","previousKey","currentKey","parentSubscription","scheduleSubscription","asServiceAvailability","asAvailability","asServiceCatalogTranslations","asCmsImageData","medium","landscape_ratio16x9","landscape_ratio4x3","landscape_ratio21x9","CommonBookingAncillaryService","seatmapService","amadeusResponse","messageTitle","messageCode","asErrorMessage","paxLevelQuota","servicePerTraveler","asServiceCatalog","combinedQuota","getOrderSeatMapForFlight","orderHash","ConditionalConfirmedSeat","Drink","Newspaper","OneWorldBenefits","PointsAndOffers","PrioritySecurity","Snack","OneWorldBags","TaxFreeShoppingOutsideEU","TierStatusHold","MilestoneReward","ResolveLinksPipe","review","processing","SafePipe","innerSubscriber","innerIndex","outerIndex","SpacerType","_VALIDATORS","sortedDateRanges","disabledDateRange","start1","start2","_disabledDateRanges","_dateLabels","_selectedLabel","_dataModel$","_isMobile","currentMonthId","toValidDate","createMonthTags","createMonths","firstAvailableDate","lastAvailableDate","monthsAmount","monthsToReuse","firstDates","firstMonthDate","reusedIndex","createMonth","monthBase","lastOfMonth","totalWeeks","currentWeek","daysPerWeek","spacerType","isDateDisabled","tabindex","updateState","updateMonthsState","firstSelectableDay","getDateInRange","validateSelectedDates","isFirstMonth","firstValidVisibleDate","lastValidVisibleDate","isLastMonth","collection$","notificationNumbers$","viewedNotificationsIds","CmsGlobalDisruptionBannerComponent_cms_disruptions_0_Template","CART_ERROR_STATES","isCartInErrorStateOrDoWeHaveTravelers","isAncillariesSkipped","sellAncillariesOutbound","sellAncillariesInbound","CountryCode","KOREA","CHINA","paxDetailsState","getAccompanyingTravelerId","tid","corporateCode","corporateUserInformation","asLegEndpointWithCityNameAndAirport","asBoundInfoWithCityNameAndAirport","enhancedBoundGroups","getBoundGroupFromBoundsByFlightNumber","flightNumberQueryParam","foundFlightNumbers","getFareFamilyFromBoundGroup","NON_SCHENGEN_LOUNGES","priceComparison","onlyChangedValues","previousSelections","indexesOfWantedValue","indexToIgnore","PERFORM_ACTION","ROLLBACK","TOGGLE_ACTION","JUMP_TO_STATE","JUMP_TO_ACTION","IMPORT_STATE","LOCK_CHANGES","PAUSE_RECORDING","PerformAction","Refresh","Reset","Rollback","Commit","Sweep","ToggleAction","JumpToState","JumpToAction","actionId","ImportState","nextLiftedState","LockChanges","PauseRecording","STORE_DEVTOOLS_CONFIG","INITIAL_OPTIONS","noMonitor","DEFAULT_NAME","createConfig","optionsInput","DEFAULT_OPTIONS","maxAge","actionSanitizer","stateSanitizer","logOnly","autoPause","traceLimit","lock","persist","export","import","jump","reorder","connectInZone","difference","unliftState","liftedState","computedStates","currentStateIndex","liftAction","sanitizeActions","sanitizedActions","actionIdx","sanitizeAction","sanitizeStates","states","computedState","sanitizeState","stateIdx","shouldFilterActions","actionsSafelist","actionsBlocklist","isActionFiltered","safelist","blockedlist","predicateMatch","safelistMatch","escapeRegExp","blocklistMatch","injectZoneConfig","DevtoolsDispatcher","REDUX_DEVTOOLS_EXTENSION","DevtoolsExtension","devtoolsExtension","zoneConfig","createActionStreams","isPaused","sanitizedState","sanitizedAction","nextActionId","sendToReduxDevtools","extensionConnection","sanitizedLiftedState","stagedActionIds","actionsById","getExtensionConfig","createChangesObservable","changes$","start$","stop$","liftedActions$","unwrapAction","actionsUntilStop$","liftedUntilStop$","extensionOptions","INIT_ACTION","RECOMPUTE_ACTION","computeNextEntry","nextError","recomputeStates","minInvalidatedStateIndex","committedState","skippedActionIds","nextComputedStates","lastIncludedActionId","previousEntry","previousState","previousError","StoreDevtools","reducers$","extension","liftedInitialState","liftInitialState","initialCommittedState","monitorReducer","monitorState","liftReducer","liftReducerWith","initialLiftedState","liftedAction","commitExcessActions","excess","idsToDelete","commitChanges","actionIds","lastState","liftedAction$","liftedReducer$","liftedStateSubject","liftedStateSubscription","emitInZone","reducedLiftedState","filterLiftedState","blocklist","filteredStagedActionIds","filteredActionsById","filteredComputedStates","extensionStartSubscription","refresh","liftedState$","performAction","rollback","commit","sweep","toggleAction","jumpToAction","jumpToState","importState","lockChanges","pauseRecording","IS_EXTENSION_OR_MONITOR_PRESENT","createIsExtensionOrMonitorPresent","createReduxDevtoolsExtension","extensionKey","provideStoreDevtools","createStateObservable","devtools","StoreDevtoolsModule","instrument","MarketingPreferencesModule","ToasterModule","IN_PROGRESS","ClientIconsService","_appBase","_http","_cache","_inProgressReqs","_baseUrl","setBaseUrl","getAbsoluteUrl","_getSymbol","_symbol","_def","onLine","absUrl","req$","svgText","symbolAndDefs","AppComponent","timeAndGeoipProvider","dataLayerService","multiVariateTestService","cms3DSeatMapService","navigatedPathToContentWrapperService","LOGIN_IFRAME_COMPONENT_TYPE","pushNavigationEventsToDataLayer","globalClicksHandler","originalPageView","subscriberId","seatMapLinkListener","AppComponent_span_0_Template","invalidTimingValue","optimizeGroupPlayer","ɵAnimationGroupPlayer","normalizeKeyframes$1","normalizer","preStyles","postStyles","normalizedKeyframes","previousOffset","previousKeyframe","kf","isSameOffset","normalizedKeyframe","normalizedProp","normalizedValue","normalizePropertyName","normalizeStyleValue","animationFailed","listenOnPlayer","copyAnimationEvent","makeAnimationEvent","triggerName","fromState","toState","_data","getOrSetDefaultValue","parseTimelineCommand","separatorPos","getParentElement","_CACHED_BODY","_IS_WEBKIT","containsElement","elm1","elm2","invokeQuery","NoopAnimationDriver","validateStyleProperty","getBodyNode","containsVendorPrefix","computeStyle","easing","previousPlayers","scrubberAccessRequested","AnimationDriver","NOOP","AnimationStyleNormalizer","ONE_SECOND","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","_convertTimeValueToMS","resolveTiming","allowNegativeValues","parseTimeExpression","delayMatch","easingVal","negativeStepValue","negativeDelayValue","setStyles","formerStyles","camelProp","dashCaseToCamelCase","eraseStyles","normalizeAnimationEntry","PARAM_REGEX","extractStyleParams","interpolateParams","varName","localVal","invalidParamValue","DASH_CASE_REGEXP","visitDslNode","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitReference","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","invalidNodeType","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","userProvidedProperty","normalizedProperty","strVal","valAndSuffixMatch","invalidCssUnitValue","ANY_STATE","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","makeLambdaFromStates","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","buildAnimationAst","driver","AnimationAstBuilderVisitor","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","currentQuerySelector","collectedStyles","queryCount","depCount","invalidTrigger","stateDef","invalidDefinition","styleAst","astParams","containsDynamicStyles","missingSubs","invalidState","matchers","parseTransitionExpr","transitionValue","expressions","parseInnerTransitionStr","eventStr","parseAnimationAlias","invalidTransitionAlias","invalidExpression","normalizeAnimationOptions","furthestTime","innerAst","timingAst","constructTimingAst","makeTimingAst","ast","dynamic","currentAnimateTimings","styleMetadata","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","metadataStyles","styleTuple","collectedEasing","styleData","tuple","collectedEntry","updateCollectedStyle","invalidParallelAnimation","validateStyleParams","invalidStyleParams","invalidKeyframes","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","invalidOffset","keyframeOffsetsOutOfOrder","generatedOffset","keyframesMissingOffsets","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","includeSelf","normalizeSelector","hasAmpersand","originalSelector","invalidStagger","unsupportedCSSPropertiesFound","normalizeParams","createTimelineInstruction","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","_map","existingInstructions","ENTER_TOKEN_REGEX","LEAVE_TOKEN_REGEX","buildAnimationTimelines","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","buildKeyframes","AnimationTimelineContext","currentTimeline","delayNextStep","timelines","timeline","containsAnimation","lastRootTimeline","allowOnlyTimelineStyles","elementInstructions","innerContext","createSubContext","_visitSubInstructions","transformIntoNewTimeline","_applyAnimationRefDelays","animationsRefsOptions","animationRefOptions","animationDelay","animationDelayValue","instructionTimings","appendInstructionToTimeline","updateOptions","subContextCount","snapshotCurrentStyles","DEFAULT_NOOP_PREVIOUS_NODE","applyStylesToKeyframe","innerTimelines","mergeTimelineCollectedStyles","_visitTiming","incrementTime","hasCurrentStyleProperties","forwardFrame","applyEmptyStep","innerTimeline","forwardTime","elms","currentQueryTotal","sameElementTimeline","tl","maxTime","currentStaggerTime","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","optionsToUpdate","newParams","paramsToUpdate","_copyOptions","oldParams","newTime","updatedTimings","builder","SubTimelineBuilder","stretchStartingKeyframe","invalidQuery","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_localTimelineStyles","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","_updateStyle","flattenStyles","allStyles","allProperties","getFinalKeyframe","details1","details0","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","decimalPoints","mult","createTransitionInstruction","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","oneOrMoreTransitionsMatch","matchFns","buildStyles","stateName","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","applyParamDefaults","elm","userParams","AnimationStateStyles","defaultParams","combinedParams","AnimationTrigger","_normalizer","transitionFactories","balanceProperties","fallbackTransition","createFallbackTransition","containsQueries","matchTransition","matchStyles","EMPTY_INSTRUCTION_MAP","TimelineAnimationEngine","bodyNode","_animations","_playersById","registerFailed","_buildPlayer","autoStylesMap","inst","missingOrDestroyedAnimation","createAnimationFailed","_getPlayer","missingPlayer","baseEvent","QUEUED_CLASSNAME","DISABLED_CLASSNAME","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","namespaceId","setForRemoval","setForMove","hasAnimation","removedBeforeQueried","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","isObj","normalizeTriggerValue","absorbOptions","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","_engine","_triggers","_queue","_elementListeners","_hostClassName","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","triggersWithStates","statesByElement","afterFlush","_getTrigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","reportError","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","fetchNamespacesByElement","ns","triggerLeaveAnimation","afterFlushAnimationsDone","destroyAfterComplete","triggerStates","previousTriggersValues","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","elementStates","visitedTriggers","removeNode","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","removalFlag","destroyInnerAnimations","_onRemovalComplete","insertNode","drainQueuedTransitions","microtaskId","markedForDestroy","d0","TransitionAnimationEngine","onRemovalComplete","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","queuedPlayers","createNamespace","_balanceNamespaceList","collectEnterElement","namespaceList","ancestor","ancestorNs","registerTrigger","_fetchNamespace","stateValue","markElementAsDisabled","hostNS","_buildInstruction","subTimelines","skipBuildAst","containerElement","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","whenRenderingDone","cleanupFns","_flushAnimations","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","nodeIsOrphaned","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","playersForElement","syncPlayerEvents","queriedPlayerResults","queriedInnerElements","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","getRealPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","flattenGroupPlayers","finalPlayers","_flattenGroupPlayersRecur","wrappedPlayer","deleteOrUnsetInMap","currentValues","_player","_containsRealPlayer","_queuedCallbacks","_queueEvent","cloakElement","valuesMap","elementPropsMap","cloakVals","failedElements","roots","rootMap","nodeSet","localRootMap","getRoot","postEntry","preEntry","AnimationEngine","_triggerCache","_transitionEngine","_timelineEngine","componentId","triggerBuildFailed","buildTrigger","onInsert","onRemove","disableAnimations","eventPhase","SpecialCasedStyles","initialStylesByElement","_startStyles","_endStyles","initialStyles","_initialStyles","filterNonAnimatableStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","_initialized","_duration","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","onFinish","_resetDomPlayerState","_convertKeyframesToObject","kfs","WebAnimationsDriver","validateAnimatableStyleProperty","playerOptions","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","normalizeKeyframes","balancePreviousStylesIntoKeyframes","startingKeyframe","missingStyleProps","specialStyles","packageNonAnimatableStyles","startStyles","endStyles","DISABLE_ANIMATIONS_FLAG","BaseAnimationRenderer","ɵtype","AnimationRenderer","resolveElementFromTarget","parseTriggerCallbackName","dotIndex","scheduleListenerCallback","AnimationRendererFactory","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","onRendererDestroy","animationTriggers","_scheduleCountTask","animationCallbacksBuffer","SHARED_ANIMATION_PROVIDERS","ɵAnimationStyleNormalizer","instantiateDefaultStyleNormalizer","ɵWebAnimationsStyleNormalizer","ɵAnimationEngine","InjectableAnimationEngine","instantiateRendererFactory","ɵAnimationRendererFactory","ɵDomRendererFactory2","BROWSER_ANIMATIONS_PROVIDERS","ɵWebAnimationsDriver","BROWSER_NOOP_ANIMATIONS_PROVIDERS","BrowserAnimationsModule","CookiePolicyModule","sessionStorageVersionFactory","storedData","KEYS_TO_LOCAL_STORAGE","generateLocalStorageHash","LOGIN_STATUS","LOGIN_PHASE","navigatorReducer","pseudoLocalReducer","et","_deleted","languageReducer","loginReducer","accessToken","executionToken","storageSyncInBrowser","allowStorageRehydration","platformID","dispatchInitialStateReducer","localStorageSyncMetaReducer","sessionStorageSyncMetaReducer","ALLOW_REHYDRATION","StateTreeModule","InstantsearchApiModule","LanguageSettingLayoutComponent","main_r1","LanguageGuard","redirectToRootIfLanguageNotApplicable","childRoute","langFromParam","langFromDds","DEFAULT_CONFIG","resetOnDisconnect","consent2_r4","CookieSettingsComponent_ng_container_4_ng_container_7_span_1_Template","k_r5","consent_r2","handleIsCheckChange","CookieSettingsComponent_ng_container_4_ng_container_7_Template","consents$","getStatus","cookieConsentsValues","CookieSettingsComponent","consentDataSelection","cookieSettingsUrl$","consentValue","allowAllCookies","currentId","CookieSettingsComponent_ng_container_4_Template","quickSetCookieClicked$","showCookieSettings","confirmAndClose","CookiePolicyComponent","isShowCookieSettings","hasCookieConsentSubmitted$","continueShows$","textHash","allConsentsAreSet","hasSubmitted","createConsentData","CookiePolicyComponent_ng_container_3_Template","CookiePolicyComponent_fin_cookie_settings_4_Template","message_r2","contentHTML","callbackClicked","ToasterComponent_ng_container_2_div_2_Template","ToasterComponent_ng_container_2_ng_container_3_Template","isCloseClicked","isDisplayed","ToasterComponent","beneathModal","timeoutHandle","setSlidingEffectOnMessages","messageKey","getIconName","message$","oldMessage","insertNewMessage","getToastTrackKey","keepMessageAfterNavigation","ToasterComponent_ng_container_2_Template","LanguageSettingRootComponent","cookiePolicyType","toasterComponentType","chatComponentType","chatGlobalVisibilityComponentType","feedbackWidgetComponentType","updatePrevPageUrl","rootRoutes","getRouteFromUrl","everythingUntilAndIncludingLangCode","matchesRootRoute","rr","c$","connectable","insideBooking$","isInsideBooking","LanguageSettingLayoutModule","DevtoolModule","BookingModule","ManageBookingModule","DisruptionModule","fullPath","CancelModule","SiteSearchModule","OneUpgradeModule","ReaccommodationModule","OndMarketingLandingModule","PlusModule","VoluntaryChangeModule","TimetableModule","RefundsModule","CorporateModule","TravelReadyModule","RouteModule","CmsLocalizationProvider","lazyLocalizationsObj","lazyLocalizationsSubject","lazyLocalizations$","cms","immediateLocalizations","lazyLoadLocalizations","combo","throwCatchError","errorMsg","canHandleError","FlowType","DatadogHeadersInterceptor","bookingStore$","getFlowType","widgetTab","USE_DAPI_BACKEND_KEY","DapiUatInterceptor","dapiBackendToUse","ErrorInterceptor","retry","SESSION_ID_KEY","DapiHeadersInterceptor","getClientId","URLState","CURRENT","PREVIOUS","getGtmLangAndPointOfSale","pointOfSale","getGtmUrlWithoutLocale","langObj","convertGtmUrl","mapCabinToTravelClass","mapToOldGtmOffer","fareFamilyBrandName","fee","unitPrices","mapUnitPrices","paxPrices","surcharges","totalPerPTC","loadGtmServicesFromOrder","getGtmFlightServices","toService","s1","serviceId","displayPrice","mapToOldGtmServices","baggage","meals","travelComforts","sport","mapToOldGtmPrices","getGtmBasePrices","numberOfItems","toGtmFlightServicePrices","totalPerFlight","all2","toGtmBoundServicePrices","totalPerBound","totalPerPtc","ClientGtmService","getGtmPath","noParamsPath","filteredQueryString","normalizedPath","addUrlContextToLayerEvent","urlState","urlContext","dataLayer","nativeAppSessionEvent","appHidden","gtmPath","eventData","isLogged","corporateProfile","promotionItemArray","promotion","creative","ecommerce","promoView","promotions","promoClick","searchType","pagePath","triggerElement","multicityFareFamilySelection","multicityOfferSelection","paxDetailsFlightReview","flowData","officeId","market","sellBags","sellBagsOutbound","sellBagsInbound","destCity","destCountry","seatMapEvent","seatMapData","uiEvent","completePurchase","storeLocations","pricesTotal","purchaseTransactionForGA4","completeManageBookingPurchase","ecommerceEvent","impressions","enhancedEcommerceProductClickOrDetailView","checkoutFlights","clickUrl","all_locations","amountOfBounds","flightSearchEvent","getHaulType","multicityTicketTypeOptions","ticketTypeOptions","errorEvent","system","isInsideNativeApp","resetEcommerceGA4","ecomNew","transaction_id","coupon","allLocations","purchaseEvent","points_used","ecommercePurchaseEventGa4","SalesforceEventName","FLIGHT_SELECTION_SELECT_OUTBOUND","FLIGHT_SELECTION_SELECT_INBOUND","IDENTITY","PASSENGER_IDENTITY","MMB_IDENTITY","SIGNUP_IDENTITY","SUBSCRIBER_ID_IDENTITY","INTERCEPTOR_PROVIDERS","WEB_SERVICE_PROVIDERS","ClientDataCloudService","scriptReady$","salesforceInteractions","SalesforceInteractions","queueEventToDataCloud","sendEventToDataCloud","preFlightSearchorigin","preFlightSearchdestination","preFlightSearchstart","preFlightSearchend","preFlightSearchtripType","preFlightSearchtravelClass","preFlightSearchadults","preFlightSearchchildren","preFlightSearchinfants","preFlightSearchpassengers","preFlightSearchalllocations","alllocations","flightSelectionSelect","additionalData","passengerfirstName","passengerlastName","passengeremailAddress","passengercountryCode","passengerphoneNumber","passengermemberProgram","passengermemberNumber","mmbPaxDetails","mmbfirstName","mmblastName","mmbemailAddress","mmbcountryCode","mmbphoneNumber","mmbmemberProgram","mmbmemberNumber","signupfirstName","signuplastName","signupemailAddress","signupcountryCode","signupphoneNumber","signupmemberProgram","signupmemberNumber","purchaseDone","sendIdentityEvent","sendPassengerIdentityEvent","sendMmbIdentityEvent","sendSignupIdentityEvent","sendSubscriberIdIdentityEvent","sendCustomEvent","COMMON_SERVICE_PROVIDERS","languageServiceFactory","AppModule","CAS_ROUTES","ClientLoginService","initLoginTrigger$","loginCount","dispatchSetToken","expiresAt","isLoggedInSsoSession","loginMessage","isIframeMessage","handleIframeMessage","isWebViewMessage","handleWebViewMessage","storedNonce","redirectToUrl","redirectToCorporateLogin","createChangePasswordUrl","returnUrl","redirectToPathWithParams","getRedirectUrlToMmbWithCasLoginFederation","additionalParams","betaLocale","ddsLang","ddsParams","PAGE","COUNTRY_SITE","rememberMe","getExecutionToken","executeLoginCasFlowAction","getRedirectUrlParams","shouldLogoutFirst","submitPin","initExecutionToken","getLostPasswordStateBody","postLostPasswordHelper","lostPasswordStateExecutionToken","postLostPasswordBody","execution","receivedNonce","expiresInMs","expires_in","access_token","triggerTokenRevalidation60SecondsBeforeExpiration","fetchProfile","fetchCasProfile","profileRequest","isSuccessResponse","actionFailureError","processCasFlowResponseForCustomData","customDataString","customData","ClientModule","initCb","__NgCli_bootstrap_1","preserveWhitespaces","geoIpProvider","geolocationService","preInit","configOrCount","resetOnSuccess","soFar","subscribeForRetry","resub","notifierSubscriber","previewPicture","CmsAccordionComponent_div_0_fin_expand_2_div_4_Template","CmsAccordionComponent_div_0_fin_expand_2_h2_6_Template","CmsAccordionComponent_div_0_fin_expand_2_h3_7_Template","routeFragment","withPictures","CmsAccordionComponent_div_0_h2_1_Template","CmsAccordionComponent_div_0_fin_expand_2_Template","CmsAccordionComponent_div_0_Template","ISOCode","countryList","noHeaderPadding","OfferGridComponent_ng_container_1_h1_2_Template","OfferGridComponent_ng_container_1_h2_3_Template","OfferGridComponent_ng_container_1_h3_4_Template","OfferGridComponent_ng_container_1_h4_5_Template","OfferGridComponent_ng_container_1_h3_6_Template","cmsStylesOverride","selectedOriginLocationName_r2","OfferGridComponent_ng_container_2_p_1_Template","offersTemplate_r4","offers_r3","OfferGridComponent_ng_container_4_Conditional_1_Template","OfferGridComponent_ng_container_4_Conditional_3_Template","mobileCarousel","offer_r7","scrolledPastDestination","OfferGridComponent_ng_template_6_fin_block_offer_0_Template","cmsTags","_travelClass","OfferGridComponent_ng_container_1_Template","OfferGridComponent_ng_container_2_Template","OfferGridComponent_ng_container_4_Template","OfferGridComponent_ng_template_6_Template","concatty","that","arrLike","slicy","boundLength","boundArgs","joiny","Empty","HistogramComponent_ng_container_5_ng_container_1_ng_container_1_Template","verticalSeparator_r4","bar_r3","HistogramComponent_ng_container_5_ng_container_1_Template","scrollToBarByIndex","HistogramComponent_ng_container_5_Conditional_10_Template","HistogramComponent_ng_container_5_p_12_Template","HistogramComponent_ng_container_5_fcom_icon_13_Template","label_r7","HistogramComponent","barData$","isActive$","barSelected","barsScrolled","adjustHistogramBarHeight$","MIN_COLUMN_HEIGHT","HISTOGRAM_TOP_SPACING","minAmount$","barData","bar","maxAmount$","loadingBars$","generateBarsForYear","range$","minAmount","maxAmount","calculateHeightBar","bars","max_column_height","histogramContainer","HistogramComponent_ng_container_5_Template","HistogramComponent_ng_template_7_Template","clickAction","customClasses","BookingHeaderSummaryItemComponent","BookingHeaderSummaryItemComponent_ng_container_0_Template","BookingHeaderSummaryItemComponent_ng_template_1_Template","BookingHeaderSummaryItemComponent_ng_template_3_Template","nonClickableItem_r4","$reflectApply","origSymbol","hasSymbolSham","checkboxList","FormInputCheckboxListComponent","FormInputCheckboxListComponent_ng_container_1_Template"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./src/modules/common/services/scroll/scroll.service.ts","./src/modules/cms/components/content-switcher-dropdown/cms-content-switcher-dropdown.component.html","./src/modules/cms/components/content-switcher-dropdown/cms-content-switcher-dropdown.component.ts","./src/modules/common/forms/form-group.component.html","./src/modules/common/forms/form-group.component.ts","./src/modules/cms/components/components/cms-icon-with-text.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/observeOn.ts","./src/modules/common/components/scroll-handle-container/scroll-handle-container.component.ts","./src/modules/common/components/scroll-handle-container/scroll-handle-container.component.html","./src/modules/locations/store/reducers/locations.reducer.ts","./src/modules/core/services/language/language.service.ts","./src/modules/core/utils/cms-utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/mergeInternals.ts","./src/modules/ui-components/components/loader/loader.module.ts","./src/modules/common/directives/form-error-focus.directive.ts","./src/modules/common/directives/show-for-profile-tiers.directive.ts","./src/modules/ui-components/components/modal/interfaces.ts","./node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/map.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/BehaviorSubject.ts","./src/modules/booking/utils/route-utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts","./src/modules/common-booking/store/actions/disruption.actions.ts","./src/modules/destination-search/utils/latinize.ts","./src/modules/destination-search/services/destination-search.service.ts","./src/modules/core/selectors/navigator.selector.ts","./src/modules/core/selectors/pseudo-local.selector.ts","./src/modules/core/services/tier-benefit/tier-benefit.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/interval.ts","./src/modules/cms/components/components/cms-footer.component.ts","./src/modules/ui-components/components/link/link.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts","./src/modules/service-forms/components/radio-list/radio-list.component.html","./src/modules/service-forms/components/radio-list/radio-list.component.ts","./src/modules/common/utils/price-utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts","./src/modules/common/components/expand/expand-content.component.ts","./src/modules/common/components/expand/expand-content.component.html","./src/modules/site-search-header-widget-starter/components/site-search-header-widget-starter/site-search-header-widget-starter.component.html","./src/modules/site-search-header-widget-starter/components/site-search-header-widget-starter/site-search-header-widget-starter.component.ts","./src/modules/voluntary-change/constants.ts","./src/modules/common/pipes/country-name.pipe.ts","./src/modules/ui-components/components/datepicker/calendar/calendar.component.html","./src/modules/ui-components/components/datepicker/calendar/calendar.component.ts","./node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/identity.ts","./src/modules/common-booking/components/flight-card/flight-card.component.html","./src/modules/common-booking/components/flight-card/flight-card.component.ts","./src/modules/common/pipes/duration.temp.pipe.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/delayWhen.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/delay.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js","./src/modules/common-booking/modules/ancillaries/utils/ancillaries.utils.ts","./src/modules/common-booking/modules/ancillaries/utils/service-mapping.utils.ts","./src/modules/core/utils/equals.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/never.ts","./node_modules/.pnpm/url@0.11.4/node_modules/url/url.js","./src/modules/cms/pipes/cheapest-price.pipe.ts","./src/modules/cms/pipes/offset-to-local-time.pipe.ts","./src/modules/cms/pipes/decode-url.pipe.ts","./src/modules/loyalty-core/interfaces/loyalty.interface.ts","./src/modules/common-booking/components/itinerary/itinerary.component.html","./src/modules/common-booking/components/itinerary/itinerary.component.ts","./src/modules/ui-components/components/expand/expand.module.ts","./src/modules/core-api/login/interfaces/login.interface.ts","./src/modules/dapi/api/models/apis-status-enum.ts","./src/modules/dapi/api/models/cabin.ts","./src/modules/dapi/api/models/caller-type.ts","./src/modules/dapi/api/models/check-in-boarding-pass-by-email-response-status.ts","./src/modules/dapi/api/models/fare-rule-category.ts","./src/modules/dapi/api/models/finnair-acknowledge-ineligibility-reason.ts","./src/modules/dapi/api/models/finnair-alternative-offer-confirmation-status-enum.ts","./src/modules/dapi/api/models/finnair-apis-requirement-key-enum.ts","./src/modules/dapi/api/models/finnair-boarding-pass-document-type.ts","./src/modules/dapi/api/models/finnair-bound-note.ts","./src/modules/dapi/api/models/finnair-cabin-class.ts","./src/modules/dapi/api/models/finnair-cancel-flow-type.ts","./src/modules/dapi/api/models/finnair-cancel-ineligibility-reason.ts","./src/modules/dapi/api/models/finnair-change-ineligibility-reason.ts","./src/modules/dapi/api/models/finnair-check-in-eligibility-reason.ts","./src/modules/dapi/api/models/finnair-check-in-version.ts","./src/modules/dapi/api/models/finnair-completion-status.ts","./src/modules/dapi/api/models/finnair-confirmation-status.ts","./src/modules/dapi/api/models/finnair-disruption-rebooking-ineligibility-reason.ts","./src/modules/dapi/api/models/finnair-document-type.ts","./src/modules/dapi/api/models/finnair-gender.ts","./src/modules/dapi/api/models/finnair-itinerary-item-flight-status.ts","./src/modules/dapi/api/models/finnair-itinerary-item-type.ts","./src/modules/dapi/api/models/finnair-itinerary-note.ts","./src/modules/dapi/api/models/finnair-location-type.ts","./src/modules/dapi/api/models/finnair-passenger-code.ts","./src/modules/dapi/api/models/finnair-phone-type.ts","./src/modules/dapi/api/models/finnair-service-catalog-eligibility-reason.ts","./src/modules/dapi/api/models/finnair-travel-document-type.ts","./src/modules/dapi/api/models/message-type.ts","./src/modules/dapi/api/models/purpose-of-visit-enum.ts","./src/modules/dapi/api/models/request-initiator.ts","./src/modules/dapi/api/models/service-flow.ts","./src/modules/dapi/api/models/status-code.ts","./src/modules/dapi/api/models/tour-operator-code.ts","./src/modules/dapi/api/order-api.module.ts","./src/modules/common/pipes/time.pipe.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/of.ts","./src/modules/destination-search/interfaces/destination-search-feature-state.interface.ts","./src/modules/cms/components/block-offer/block-offer-tile.component.html","./src/modules/cms/components/block-offer/block-offer-tile.component.ts","./src/modules/cms/components/qualtrics-embedded-page-feedback/qualtrics-embedded-page-feedback.component.html","./src/modules/cms/components/qualtrics-embedded-page-feedback/qualtrics-embedded-page-feedback.component.ts","./src/modules/common/pipes/price.pipe.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/pipe.ts","./src/modules/ui-components/components/loader/loader.component.html","./src/modules/ui-components/components/loader/loader.component.ts","./src/modules/destination-search/services/am-destination.service.ts","./src/modules/common/components/cms/cms-unstyled-fragment/cms-unstyled-fragment.component.ts","./src/modules/common/components/cms/cms-unstyled-fragment/cms-unstyled-fragment.component.html","./src/modules/booking/services/booking-cart.service.ts","./src/modules/ui-components/components/forms/floating-input/floating-input.component.html","./src/modules/ui-components/components/forms/floating-input/floating-input.component.ts","./src/modules/common/store/actions/notification.actions.ts","./src/modules/common/store/actions/global-booking.actions.ts","./src/modules/common/store/reducers/notification.reducer.ts","./src/modules/common/store/reducers/global-booking.reducer.ts","./src/modules/common/store/reducers/index.ts","./src/modules/common/store/selectors/notification.selectors.ts","./src/modules/common/store/store.module.ts","./src/modules/common/utils/flight.utils.ts","./src/modules/common/utils/routing.utils.ts","./src/modules/common/utils/am-offer.utils.ts","./src/modules/common/utils/price-matrix.utils.ts","./src/modules/common/utils/cartrawler.utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/reportUnhandledError.ts","./src/modules/common-booking/interfaces/utils.interface.ts","./src/modules/booking-widget/services/booking-widget-calendar.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts","./src/modules/ui-components/components/images/images.module.ts","./src/modules/common/pipes/strip-html.pipe.ts","./src/modules/core/services/config/jsConfig.ts","./src/modules/common-booking/components/flight-selection/fare-family-list/fare-family-list.component.html","./src/modules/common-booking/components/flight-selection/fare-family-list/fare-family-list.component.ts","./src/modules/common/login/interceptors/login-token.interceptor.ts","./src/modules/common/pipes/flight-number.pipe.ts","./src/modules/cms/components/block-offer/block-offer.component.html","./src/modules/cms/components/block-offer/block-offer.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/createErrorClass.ts","./src/modules/common/login/components/login-button.component.html","./src/modules/common/login/components/login-button.component.ts","./node_modules/packages/core/rxjs-interop/src/take_until_destroyed.ts","./node_modules/packages/core/rxjs-interop/src/to_signal.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isArrayLike.ts","./src/modules/dapi/api/services/cart.service.ts","./src/modules/common-booking/services/utils.service.ts","./src/modules/common-booking/services/payment.service.ts","./src/modules/core/selectors/login.selector.ts","./src/modules/common-booking/components/pax-details/pax-details-form-group.component.html","./src/modules/common-booking/components/pax-details/pax-details-form-group.component.ts","./src/modules/booking/utils/passenger-utils.ts","./src/modules/ui-components/components/buttons/button/enums.ts","./src/modules/ui-components/components/forms/file-uploader/attachment-list.component.html","./src/modules/ui-components/components/forms/file-uploader/attachment-list.component.ts","./src/modules/ui-components/components/forms/fcom-forms.module.ts","./src/modules/ui-components/components/datepicker/interfaces.ts","./src/modules/core/utils/tz-date.ts","./src/modules/common-booking/utils/service.utils.ts","./src/modules/booking-widget/services/booking-widget-flight.service.ts","./src/modules/common/pipes/fin-lower-case.pipe.ts","./src/modules/common/components/header/navigation/navigation.component.html","./src/modules/common/components/header/navigation/navigation.component.ts","./src/modules/ui-components/components/notifications/info-box/info-box.component.html","./src/modules/ui-components/components/notifications/info-box/info-box.component.ts","./src/modules/core/utils/env.utils.ts","./src/environments/environment.prod-lambda.ts","./src/modules/booking-widget/store/selectors/booking-widget-feature-state.selector.ts","./src/modules/common/login/login.module.ts","./src/modules/common-booking/interfaces/flight-filters.interface.ts","./src/modules/destination-search/utils/flatten.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/innerFrom.ts","./src/modules/locations/pipes/location-name.pipe.ts","./src/modules/common/directives/mutation-observer.directive.ts","./src/modules/booking/modules/ticket-selection/utils/offer.utils.ts","./src/modules/cms/components/article-collection/cms-article-collection.component.html","./src/modules/cms/components/article-collection/cms-article-collection.component.ts","./src/modules/locations/pipes/locations-pipe.module.ts","./src/modules/locations/locations.module.ts","./src/modules/locations/constants.ts","./src/modules/common-booking/components/flight-card/flight-summary/flight-summary.component.html","./src/modules/common-booking/components/flight-card/flight-summary/flight-summary.component.ts","./src/modules/order/services/order-previews.service.ts","./src/modules/order/order.module.ts","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js","./node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.js","./src/modules/ui-components/components/buttons/button/button.component.html","./src/modules/ui-components/components/buttons/button/button.component.ts","./src/modules/locations/store/actions/locations.actions.ts","./src/modules/loyalty-core/constants.ts","./src/modules/core/utils/app-url-utils.ts","./src/modules/common/qualtrics/components/qualtrics.component.ts","./src/modules/common/qualtrics/components/qualtrics.component.html","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isDate.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isFunction.ts","./src/modules/common/components/header/header-boxes.component.html","./src/modules/common/components/header/header-boxes.component.ts","./src/modules/common/pipes/tail-names.pipe.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/async.ts","./src/modules/common-booking/services/pax-validation.service.ts","./src/modules/ui-translate/pipes/localization.pipe.ts","./src/modules/ui-components/components/forms/radio-item-group/radio-item-group.component.html","./src/modules/ui-components/components/forms/radio-item-group/radio-item-group.component.ts","./src/modules/loyalty-core/services/pax-trip.service.ts","./src/modules/common/components/sidebar-navigation-item/sidebar-navigation-item.component.html","./src/modules/common/components/sidebar-navigation-item/sidebar-navigation-item.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/mergeMap.ts","./src/modules/core/utils/date.ts","./src/modules/common/qualtrics/qualtrics.module.ts","./node_modules/.pnpm/punycode@1.4.1/node_modules/punycode/punycode.js","./src/modules/ui-components/components/carousel/enums.ts","./src/modules/common/multivariate-test/services/multivariate-test.service.ts","./src/modules/common/login/components/login-dialog/login-dialog.component.html","./src/modules/common/login/components/login-dialog/login-dialog.component.ts","./src/modules/common-booking/store/selectors/order.selector.ts","./src/modules/common/components/promotion-banners/promotion-banners.component.html","./src/modules/common/components/promotion-banners/promotion-banners.component.ts","./src/modules/common/components/header/light-section-navi/light-section-navi.component.html","./src/modules/common/components/header/light-section-navi/light-section-navi.component.ts","./src/modules/common/components/header/section-navi/section-navi.component.html","./src/modules/common/components/header/section-navi/section-navi.component.ts","./src/modules/cms/components/components/cms-cta-big-link.component.ts","./src/modules/cms/components/cta-big-link/cta-big-link.component.html","./src/modules/cms/components/cta-big-link/cta-big-link.component.ts","./src/modules/cms/components/conditional-accordion/cms-conditional-accordion.component.html","./src/modules/cms/components/conditional-accordion/cms-conditional-accordion.component.ts","./src/modules/cms/components/components/cms-cta-link.component.ts","./src/modules/cms/components/components/cms-back-link.component.html","./src/modules/cms/components/components/cms-back-link.component.ts","./src/modules/cms/components/components/cms-campaign.component.html","./src/modules/cms/components/components/cms-campaign.component.ts","./src/modules/cms/components/components/cms-descriptive-link-list.component.html","./src/modules/cms/components/components/cms-descriptive-link-list.component.ts","./src/modules/cms/components/components/cms-discover-now.component.html","./src/modules/cms/components/components/cms-discover-now.component.ts","./src/modules/cms/components/components/cms-external-link.component.ts","./src/modules/cms/components/components/cms-important-links.component.html","./src/modules/cms/components/components/cms-important-links.component.ts","./src/modules/cms/components/components/cms-unique-selling-point.component.html","./src/modules/cms/components/components/cms-unique-selling-point.component.ts","./src/modules/cms/components/components/cms-link-list-with-icons.component.html","./src/modules/cms/components/components/cms-link-list-with-icons.component.ts","./src/modules/cms/components/components/cms-list-with-icons.component.html","./src/modules/cms/components/components/cms-list-with-icons.component.ts","./src/modules/cms/components/components/cms-ond-marketing-offers.component.ts","./src/modules/cms/components/components/cms-ond-marketing-offers-list.component.ts","./src/modules/cms/components/components/cms-ond-marketing-cross-linking.component.ts","./src/modules/cms/components/components/cms-text-with-side-image.component.html","./src/modules/cms/components/components/cms-text-with-side-image.component.ts","./src/modules/cms/components/cta-with-image-and-text/cta-with-image-and-text.component.html","./src/modules/cms/components/cta-with-image-and-text/cta-with-image-and-text.component.ts","./src/modules/cms/components/destination/destination-category-hero/destination-category-hero.component.html","./src/modules/cms/components/destination/destination-category-hero/destination-category-hero.component.ts","./src/modules/cms/components/dynamic/cms-editorial-category-page.component.ts","./src/modules/cms/components/dynamic/cms-editorial-category-page.component.html","./src/modules/cms/components/editorial/editorial-page-head/editorial-page-head.component.html","./src/modules/cms/components/editorial/editorial-page-head/editorial-page-head.component.ts","./src/modules/cms/components/editorial/editorial-category/editorial-category.component.html","./src/modules/cms/components/editorial/editorial-category/editorial-category.component.ts","./src/modules/cms/components/dynamic/cms-editorial-main-page.component.html","./src/modules/cms/components/dynamic/cms-editorial-main-page.component.ts","./src/modules/cms/components/dynamic/cms-bluewings-cluster-page.component.ts","./src/modules/cms/components/dynamic/cms-bluewings-cluster-page.component.html","./src/modules/cms/components/dynamic/cms-bluewings-main-page.component.html","./src/modules/cms/components/dynamic/cms-bluewings-main-page.component.ts","./src/modules/cms/components/dynamic/cms-child-page.component.html","./src/modules/cms/components/dynamic/cms-child-page.component.ts","./src/modules/cms/components/dynamic/external-page-renderer.ts","./src/modules/cms/components/dynamic/external-page-renderer.html","./src/modules/cms/components/dynamic/cms-destination.component.html","./src/modules/cms/components/dynamic/cms-destination.component.ts","./src/modules/cms/components/dynamic/cms-json-content/render-lazy-component.component.ts","./src/modules/cms/components/dynamic/cms-json-content/render-lazy-component.component.html","./src/modules/cms/components/external-link/external-link.component.ts","./src/modules/cms/components/external-link/external-link.component.html","./src/modules/cms/components/text-on-image/text-on-image.component.html","./src/modules/cms/components/text-on-image/text-on-image.component.ts","./src/modules/cms/components/text-on-image-no-link/text-on-image-no-link.component.html","./src/modules/cms/components/text-on-image-no-link/text-on-image-no-link.component.ts","./src/modules/cms/components/travel-guides/travel-guide-phrases.component.html","./src/modules/cms/components/travel-guides/travel-guide-phrases.component.ts","./src/modules/cms/components/components/cms-disclaimer.component.html","./src/modules/cms/components/components/cms-disclaimer.component.ts","./src/modules/cms/components/components/cms-badge/cms-badge.component.html","./src/modules/cms/components/components/cms-badge/cms-badge.component.ts","./src/modules/cms/components/text-link/text-link.component.html","./src/modules/cms/components/text-link/text-link.component.ts","./src/modules/cms/components/components/cms-text-link.component.ts","./src/modules/cms/components/teaser/teaser-list/teaser-list.component.html","./src/modules/cms/components/teaser/teaser-list/teaser-list.component.ts","./src/modules/cms/components/teaser/teaser/teaser.component.html","./src/modules/cms/components/teaser/teaser/teaser.component.ts","./src/modules/cms/components/teaser/teaser-card/teaser-card.component.html","./src/modules/cms/components/teaser/teaser-card/teaser-card.component.ts","./src/modules/cms/components/article/author/author.component.ts","./src/modules/cms/components/article/author/author.component.html","./src/modules/common/pipes/timestamp.pipe.ts","./src/modules/cms/components/article/date/date.component.html","./src/modules/cms/components/article/date/date.component.ts","./src/modules/cms/components/article/detail-text/detail-text.component.html","./src/modules/cms/components/article/detail-text/detail-text.component.ts","./src/modules/cms/components/article/related-teaser/related-teaser.component.html","./src/modules/cms/components/article/related-teaser/related-teaser.component.ts","./src/modules/cms/components/article/tags/tags.component.ts","./src/modules/cms/components/article/tags/tags.component.html","./src/modules/common/pipes/encode-string.pipe.ts","./src/modules/cms/components/article/social/social.component.ts","./src/modules/cms/components/article/social/social.component.html","./src/modules/cms/components/dynamic/article-bluewings.component.html","./src/modules/cms/components/dynamic/article-bluewings.component.ts","./src/modules/cms/components/dynamic/article-child.component.html","./src/modules/cms/components/dynamic/article-child.component.ts","./src/modules/cms/components/components/cms-book-now.component.ts","./src/modules/cms/components/teaser/informational-teaser/informational-teaser.component.html","./src/modules/cms/components/teaser/informational-teaser/informational-teaser.component.ts","./src/modules/cms/components/components/cms-list-with-heading.component.html","./src/modules/cms/components/components/cms-list-with-heading.component.ts","./src/modules/cms/components/placeholders/travel-restrictions/travel-restrictions.component.html","./src/modules/cms/components/placeholders/travel-restrictions/travel-restrictions.component.ts","./src/modules/cms/components/placeholders/travel-restrictions/travel-restrictions.module.ts","./src/modules/cms/components/horizontal-title/horizontal-title.component.html","./src/modules/cms/components/horizontal-title/horizontal-title.component.ts","./src/modules/cms/components/cms-heading-tag/cms-heading-tag.component.html","./src/modules/cms/components/cms-heading-tag/cms-heading-tag.component.ts","./src/modules/cms/components/trending-destinations-grid/trending-destinations-grid.component.ts","./src/modules/cms/components/dynamic/render-lazy-wizard.component.ts","./src/modules/cms/components/dynamic/render-lazy-wizard.component.html","./src/modules/cms/components/placeholders/newsletter-signup-form/newsletter-signup-form.component.html","./src/modules/cms/components/placeholders/newsletter-signup-form/newsletter-signup-form.component.ts","./src/modules/cms/components/components/cms-articles-with-icons.component.html","./src/modules/cms/components/components/cms-articles-with-icons.component.ts","./src/modules/cms/components/teaser/text-link-left/text-link-left.component.html","./src/modules/cms/components/teaser/text-link-left/text-link-left.component.ts","./src/modules/cms/components/components/cms-cmrelated.component.html","./src/modules/cms/components/components/cms-cmrelated.component.ts","./src/modules/cms/components/components/cms-arrow-link-list.component.html","./src/modules/cms/components/components/cms-arrow-link-list.component.ts","./src/modules/cms/components/news-feed-item/news-feed-item.component.ts","./src/modules/cms/components/news-feed-item/news-feed-item.component.html","./src/modules/cms/components/components/cms-quick-links.component.ts","./src/modules/cms/components/components/cms-quick-links.component.html","./src/modules/cms/components/dynamic/cms-emergency-in-operations.component.ts","./src/modules/cms/components/dynamic/cms-emergency-in-operations.component.html","./src/modules/cms/components/components/emergency-in-operations-article/emergency-in-operations-article.component.html","./src/modules/cms/components/components/emergency-in-operations-article/emergency-in-operations-article.component.ts","./src/modules/cms/components/components/cms-marketing-activity-blocks.component.html","./src/modules/cms/components/components/cms-marketing-activity-blocks.component.ts","./src/modules/cms/components/dynamic/hero-bluewings-cluster.component.html","./src/modules/cms/components/dynamic/hero-bluewings-cluster.component.ts","./src/modules/common/forms/simple-select-field.component.html","./src/modules/common/forms/simple-select-field.component.ts","./src/modules/cms/components/cms.module.ts","./src/modules/core/services/native-bridge/native-bridge.service.ts","./src/modules/cms/components/travel-guides/travel-guide.component.html","./src/modules/cms/components/travel-guides/travel-guide.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/NotificationFactories.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/Subscriber.ts","./src/modules/common/components/disclaimer/disclaimer.component.html","./src/modules/common/components/disclaimer/disclaimer.component.ts","./src/modules/ui-components/components/popover/popover.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/takeUntil.ts","./src/modules/common/directives/phone-number-mask.directive.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/noop.ts","./src/modules/dapi/api/services/order.service.ts","./src/modules/server/server/jsConfigOverride.ts","./src/modules/server/server/runtimeConfig.ts","./src/modules/server/server/cmsPreviewUrls.ts","./src/modules/core/selectors/language.selector.ts","./src/modules/booking-widget/services/booking-widget-gtm.service.ts","./node_modules/.pnpm/qs@6.14.0/node_modules/qs/lib/stringify.js","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js","./src/modules/dapi/api/services/instantsearch.service.ts","./src/modules/core/actions/global.actions.ts","./src/modules/loyalty-core/store/actions/trips.actions.ts","./src/modules/loyalty-core/store/actions/milestones.actions.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/ignoreElements.ts","./src/modules/ui-components/components/icons/icon/icon.component.html","./src/modules/ui-components/components/icons/icon/icon.component.ts","./src/modules/ui-components/components/tag/tag-button.component.html","./src/modules/ui-components/components/tag/tag-button.component.ts","./src/modules/core/utils/error-utils.ts","./src/modules/core/utils/post-messenger.ts","./src/modules/core/utils/merge.ts","./src/modules/core/utils/storage-sync.ts","./src/modules/core/utils/data-utils.ts","./src/modules/core/utils/date.format.ts","./src/modules/core/utils/event.ts","./src/modules/core/utils/precise-number.ts","./src/modules/core/utils/node-utils.ts","./src/modules/core/interceptors/aws-api-gw.interceptor.ts","./src/modules/core/interceptors/with-credentials.interceptor.ts","./src/modules/ui-components/components/modal/service/modal.service.ts","./src/modules/common-booking/store/reducers/services.reducer.ts","./src/modules/common-booking/store/reducers/order.reducer.ts","./src/modules/common-booking/store/reducers/seat-map.reducer.ts","./src/modules/common-booking/store/reducers/payment.reducer.ts","./src/modules/common-booking/store/reducers/disruption.reducer.ts","./src/modules/common-booking/store/reducers/upgrade-offer.reducer.ts","./src/modules/common-booking/store/reducers/redirect.reducer.ts","./src/modules/common-booking/store/reducers/index.ts","./src/modules/common-booking/store/store.module.ts","./src/modules/service-forms/components/common/form-input-select.component.html","./src/modules/service-forms/components/common/form-input-select.component.ts","./src/modules/ui-translate/ui-translate.module.ts","./src/modules/ui-components/components/drawer/enums.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/util/util.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/types.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/util/css.util.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/shared-hooks/hooks.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/intersection-observer-hooks/hooks.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/token.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/lazyload-image.directive.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/lazyload-image.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/lazyload-image.module.ts","./node_modules/.pnpm/ng-lazyload-image@9.1.3_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15_67vbvsdudbteiggdz6tn3emfcy/node_modules/src/scroll-hooks/rect.ts","./src/modules/core/selectors/dds-languages.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/concatMap.ts","./src/modules/core/store/init-store.action.ts","./src/modules/ui-components/components/forms/select-input/select-input.component.html","./src/modules/ui-components/components/forms/select-input/select-input.component.ts","./src/modules/common/interfaces/corporate/corporate.interface.ts","./src/modules/common/interfaces/booking/air-offers-state.interface.ts","./src/modules/common-booking/utils/common-booking.utils.ts","./src/modules/dapi/api/dapi-base-service.ts","./src/modules/common/login/components/login-form/login-form.component.html","./src/modules/common/login/components/login-form/login-form.component.ts","./src/modules/common/components/language-selector/language-selector.component.html","./src/modules/common/components/language-selector/language-selector.component.ts","./src/modules/ui-components/components/quick-links/quick-links.module.ts","./src/modules/loyalty-personalization/personalization.module.ts","./src/modules/ui-components/components/headers/headers.module.ts","./src/modules/common-booking/components/flight-selection-filters/flight-selection-filters.component.html","./src/modules/common-booking/components/flight-selection-filters/flight-selection-filters.component.ts","./src/modules/common/gtm/services/gtm.service.ts","./src/modules/ui-components/components/expand/expand.component.html","./src/modules/ui-components/components/expand/expand.component.ts","./src/modules/ui-components/utils/date.utils.ts","./src/modules/locations/store/selectors/index.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js","./src/modules/core/utils/tripType.utils.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js","./src/modules/core/services/currency/currency-settings.ts","./src/modules/core/services/currency/currency.service.ts","./src/modules/core/services/form-post/form-post.service.ts","./src/modules/core/services/location-routecff/location-routecff.service.ts","./src/modules/core/services/geolocation/geolocation.service.ts","./src/modules/core/services/maintenance-config/maintenance-config.service.ts","./src/modules/core/services/storage/storage.service.ts","./src/modules/core/services/storage/constants.ts","./src/modules/core/services/native-bridge/client-native-bridge.service.ts","./src/modules/core/services/time/time.service.ts","./src/modules/core/services/time/time-geoip.provider.ts","./src/modules/core/services/preloading-module/appPreloadingStrategy.service.ts","./src/modules/common-booking/interfaces/refund.interface.ts","./src/modules/booking/services/booking-queue.service.ts","./src/modules/destination-search/am-destination-continue-modal/am-destination-continue-modal.component.ts","./src/modules/destination-search/am-destination-continue-modal/am-destination-continue-modal.component.html","./src/modules/common/utils/gtm.utils.ts","./src/modules/common-booking/components/pax-details/pax-flight-review-summary/pax-flight-review-summary.component.html","./src/modules/common-booking/components/pax-details/pax-flight-review-summary/pax-flight-review-summary.component.ts","./src/modules/dapi/api/services/checkin.service.ts","./src/modules/common/services/feedback/feedback.service.ts","./node_modules/src/material/core/version.ts","./node_modules/src/material/core/option/option.html","./node_modules/src/material/core/common-behaviors/common-module.ts","./node_modules/src/material/core/datetime/date-adapter.ts","./node_modules/src/material/core/datetime/date-formats.ts","./node_modules/src/material/core/datetime/native-date-adapter.ts","./node_modules/src/material/core/datetime/native-date-formats.ts","./node_modules/src/material/core/datetime/index.ts","./node_modules/src/material/core/ripple/ripple-ref.ts","./node_modules/src/material/core/ripple/ripple-event-manager.ts","./node_modules/src/material/core/ripple/ripple-renderer.ts","./node_modules/src/material/core/ripple/ripple.ts","./node_modules/src/material/core/ripple/index.ts","./node_modules/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts","./node_modules/src/material/core/selection/pseudo-checkbox/pseudo-checkbox-module.ts","./node_modules/src/material/core/option/option-parent.ts","./node_modules/src/material/core/option/optgroup.ts","./node_modules/src/material/core/option/option.ts","./node_modules/src/material/core/option/index.ts","./node_modules/src/material/core/private/ripple-loader.ts","./node_modules/src/cdk/platform/platform.ts","./node_modules/src/cdk/platform/features/passive-listeners.ts","./node_modules/src/cdk/platform/features/scrolling.ts","./node_modules/src/cdk/platform/features/shadow-dom.ts","./node_modules/src/cdk/platform/features/test-environment.ts","./src/modules/common/components/feedback-widget/feedback-widget.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/scanInternals.ts","./src/modules/cms/components/components/cms-destination-hero.component.html","./src/modules/cms/components/components/cms-destination-hero.component.ts","./src/modules/common-booking/components/bound-selection-item/bound-selection-item.component.html","./src/modules/common-booking/components/bound-selection-item/bound-selection-item.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/timer.ts","./src/modules/core/utils/utils.ts","./src/modules/common/directives/link.directive.ts","./src/modules/common-booking/utils/passenger.utils.ts","./src/modules/ui-components/components/promo-card/promo-card.component.html","./src/modules/ui-components/components/promo-card/promo-card.component.ts","./src/modules/common/components/footer/footer.component.html","./src/modules/common/components/footer/footer.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/lift.ts","./node_modules/.pnpm/qs@6.14.0/node_modules/qs/lib/formats.js","./src/modules/common/services/breadcrumb/breadcrumb.service.ts","./src/modules/common-booking/components/flight-selection/fare-family-details-v2/fare-family-details-v2.component.html","./src/modules/common-booking/components/flight-selection/fare-family-details-v2/fare-family-details-v2.component.ts","./src/modules/ui-components/components/flights/trip-card/trip-card.component.html","./src/modules/ui-components/components/flights/trip-card/trip-card.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/createObject.ts","./src/modules/common/services/schema/schema.service.ts","./src/modules/common/components/total-expand/total-expand.component.html","./src/modules/common/components/total-expand/total-expand.component.ts","./src/modules/common/components/step-progress-circle/step-progress-circle.component.html","./src/modules/common/components/step-progress-circle/step-progress-circle.component.ts","./src/modules/ui-components/components/flights/timeline/timeline.component.html","./src/modules/ui-components/components/flights/timeline/timeline.component.ts","./src/modules/common-booking/components/refund-detail/refund-detail.component.html","./src/modules/common-booking/components/refund-detail/refund-detail.component.ts","./src/modules/common/services/corporate/corporate.service.ts","./node_modules/src/cdk/coercion/boolean-property.ts","./node_modules/src/cdk/coercion/array.ts","./node_modules/src/cdk/coercion/css-pixel-value.ts","./node_modules/src/cdk/coercion/element.ts","./node_modules/src/cdk/coercion/string-array.ts","./node_modules/src/material/form-field/form-field.ts","./src/modules/timetable/constants.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/finalize.ts","./src/modules/core/reducers/langs.ts","./src/modules/ui-translate/services/language.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/take.ts","./src/modules/common/interfaces/aircrafts.ts","./src/modules/common/interfaces/seat-map.interface.ts","./src/modules/common/utils/price-calendar.utils.ts","./src/modules/booking/store/selectors/bounds.selector.ts","./src/modules/cms/components/dynamic/cms-json-content/cms-json-content.component.html","./src/modules/cms/components/dynamic/cms-json-content/cms-json-content.component.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/version.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/worldwide.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/carrier.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/is.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/browser.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/debug-build.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/logger.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/string.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/object.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/time.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/misc.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/session.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/propagationContext.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/merge.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/spanOnScope.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/scope.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/asyncContext/stackStrategy.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/defaultScopes.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/asyncContext/index.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/currentScopes.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/constants.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/debug-build.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/syncpromise.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/eventProcessors.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/debug-ids.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/stacktrace.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/normalize.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/memo.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/semanticAttributes.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/baggage.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/metrics/metric-summary.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/tracing/spanstatus.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/spanUtils.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/tracing/dynamicSamplingContext.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/hasTracingEnabled.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/applyScopeDataToEvent.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/prepareEvent.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/exports.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/integration.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/integrations/inboundfilters.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/integrations/functiontostring.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/integrations/dedupe.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/supports.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/dsn.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/envelope.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/error.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/baseclient.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/api.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/envelope.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/parseSampleRate.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/clientreport.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/debug-build.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/eventbuilder.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/helpers.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/client.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils/sdkMetadata.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/env.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/userfeedback.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/instrument/handlers.ts","./node_modules/.pnpm/@sentry-internal+browser-utils@8.55.0/node_modules/@sentry-internal/browser-utils/src/types.ts","./node_modules/.pnpm/@sentry-internal+browser-utils@8.55.0/node_modules/@sentry-internal/browser-utils/src/instrument/dom.ts","./node_modules/.pnpm/@sentry-internal+browser-utils@8.55.0/node_modules/@sentry-internal/browser-utils/src/instrument/xhr.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/vendor/supportsHistory.ts","./node_modules/.pnpm/@sentry-internal+browser-utils@8.55.0/node_modules/@sentry-internal/browser-utils/src/instrument/history.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/instrument/console.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/instrument/fetch.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/breadcrumbs.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/severity.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/breadcrumb-log-level.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/url.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/integrations/breadcrumbs.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/integrations/browserapierrors.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/integrations/browsersession.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/instrument/globalError.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/instrument/globalUnhandledRejection.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/integrations/globalhandlers.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/integrations/httpcontext.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/aggregate-errors.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/integrations/linkederrors.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/stack-parsers.ts","./node_modules/.pnpm/@sentry-internal+browser-utils@8.55.0/node_modules/@sentry-internal/browser-utils/src/debug-build.ts","./node_modules/.pnpm/@sentry-internal+browser-utils@8.55.0/node_modules/@sentry-internal/browser-utils/src/getNativeImplementation.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/ratelimit.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/transports/base.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/utils-hoist/promisebuffer.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/transports/fetch.ts","./node_modules/.pnpm/@sentry+browser@8.55.0/node_modules/@sentry/browser/src/sdk.ts","./node_modules/.pnpm/@sentry+core@8.55.0/node_modules/@sentry/core/src/sdk.ts","./src/modules/core/utils/custom-error.ts","./src/modules/core/services/sentry/sentry.module.ts","./src/modules/booking/app-constants.ts","./src/modules/ui-components/components/forms/radio-item/radio-item.component.html","./src/modules/ui-components/components/forms/radio-item/radio-item.component.ts","./src/modules/reaccommodation/interfaces/alternative-offers-state.interface.ts","./src/modules/reaccommodation/interfaces/reaccommodation-feature-state.interface.ts","./src/modules/reaccommodation/interfaces/bound-status.interface.ts","./src/modules/service-forms/components/common/form-input-radio.component.html","./src/modules/service-forms/components/common/form-input-radio.component.ts","./node_modules/packages/common/src/dom_adapter.ts","./node_modules/packages/common/src/dom_tokens.ts","./node_modules/packages/common/src/location/platform_location.ts","./node_modules/packages/common/src/location/util.ts","./node_modules/packages/common/src/location/location_strategy.ts","./node_modules/packages/common/src/location/hash_location_strategy.ts","./node_modules/packages/common/src/location/location.ts","./node_modules/packages/common/src/i18n/locale_data_api.ts","./node_modules/packages/common/src/i18n/format_date.ts","./node_modules/packages/common/src/i18n/format_number.ts","./node_modules/packages/common/src/cookie.ts","./node_modules/packages/common/src/directives/ng_class.ts","./node_modules/packages/common/src/directives/ng_for_of.ts","./node_modules/packages/common/src/directives/ng_if.ts","./node_modules/packages/common/src/directives/ng_switch.ts","./node_modules/packages/common/src/directives/ng_style.ts","./node_modules/packages/common/src/directives/ng_template_outlet.ts","./node_modules/packages/common/src/pipes/invalid_pipe_argument_error.ts","./node_modules/packages/common/src/pipes/async_pipe.ts","./node_modules/packages/common/src/pipes/case_conversion_pipes.ts","./node_modules/packages/common/src/pipes/keyvalue_pipe.ts","./node_modules/packages/common/src/pipes/number_pipe.ts","./node_modules/packages/common/src/pipes/slice_pipe.ts","./node_modules/packages/common/src/common_module.ts","./node_modules/packages/common/src/platform_id.ts","./node_modules/packages/common/src/viewport_scroller.ts","./node_modules/packages/common/src/xhr.ts","./node_modules/packages/animations/src/animation_metadata.ts","./node_modules/packages/animations/src/players/animation_player.ts","./node_modules/packages/animations/src/players/animation_group_player.ts","./node_modules/packages/animations/src/private_export.ts","./src/modules/common-booking/store/utils/services.utils.ts","./src/modules/ui-components/components/forms/block-selection/block-selection.component.html","./src/modules/ui-components/components/forms/block-selection/block-selection.component.ts","./src/modules/common-booking/components/booking-plain-header-area/booking-plain-header-area.component.html","./src/modules/common-booking/components/booking-plain-header-area/booking-plain-header-area.component.ts","./src/modules/ui-components/components/icons/generic-icon/generic-icon.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/argsOrArgArray.ts","./node_modules/.pnpm/@finnairoyj+fcom-ui-styles@25.4.1/node_modules/@finnairoyj/fcom-ui-styles/index.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/errorContext.ts","./src/modules/core/selectors/selector-utils.ts","./src/modules/common/login/components/login-widget/login-widget.component.html","./src/modules/common/login/components/login-widget/login-widget.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/exhaustMap.ts","./src/modules/common/components/sustainability-review-card/sustainability-review-card.component.html","./src/modules/common/components/sustainability-review-card/sustainability-review-card.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/defer.ts","./src/modules/common/gtm/directives/element-tracker.directive.ts","./src/modules/ui-components/components/forms/enums.ts","./src/modules/ui-components/components/icons/icons.module.ts","./src/modules/dapi/api/services/offers-changes.service.ts","./src/modules/dapi/api/services/offers-multi.service.ts","./src/modules/dapi/api/services/offers-self-reacc.service.ts","./src/modules/dapi/api/services/offers.service.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/globals.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/action_creator.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/action_group_creator.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/helpers.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/actions_subject.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/tokens.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/utils.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/reducer_manager.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/scanned_actions_subject.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/state.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/store.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/meta-reducers/utils.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/flags.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/selector.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/store_config.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/meta-reducers/immutability_reducer.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/meta-reducers/serialization_reducer.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/runtime_checks.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/meta-reducers/inNgZoneAssert_reducer.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/provide_store.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/store_module.ts","./node_modules/.pnpm/@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2/modules/store/src/reducer_creator.ts","./src/modules/ui-components/components/forms/abstracts/abstract-ng-model.component.ts","./src/modules/ui-components/components/forms/abstracts/abstract-input.component.ts","./src/modules/cms/components/components/cms-category.component.ts","./src/modules/cms/components/components/cms-category.component.html","./src/modules/ui-components/directives/click-outside/click-outside.directive.ts","./src/modules/ui-components/components/flights/interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/scan.ts","./src/modules/cms/components/video/video.component.html","./src/modules/cms/components/video/video.component.ts","./src/modules/service-forms/components/common/form-error.component.ts","./src/modules/service-forms/components/common/form-error.component.html","./src/modules/common/services/page-meta/page-meta.service.ts","./src/modules/ui-components/components/notifications/notification/notification.component.html","./src/modules/ui-components/components/notifications/notification/notification.component.ts","./src/modules/loyalty-core/services/loyalty-navigation.service.ts","./src/modules/booking-widget/store/selectors/booking-widget.selector.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/throwUnobservableError.ts","./src/modules/common/directives/client-only.directive.ts","./src/modules/common/pipes/duration.pipe.ts","./src/modules/ond-marketing-landing-core/components/ond-marketing-ribbon.component.html","./src/modules/ond-marketing-landing-core/components/ond-marketing-ribbon.component.ts","./src/modules/ui-components/components/link/enums.ts","./src/modules/common-booking/utils/order.utils.ts","./src/modules/service-forms/services/utils.ts","./src/modules/ond-marketing-landing-core/components/ond-marketing-offers-list.component.html","./src/modules/ond-marketing-landing-core/components/ond-marketing-offers-list.component.ts","./node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.js","./src/modules/common/login/components/join-form/join-form.component.html","./src/modules/common/login/components/join-form/join-form.component.ts","./src/modules/cms/components/rich-text/rich-text.component.html","./src/modules/cms/components/rich-text/rich-text.component.ts","./node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js","./src/modules/common-booking/components/flight-selection/benefit/benefit.component.html","./src/modules/common-booking/components/flight-selection/benefit/benefit.component.ts","./src/modules/common/components/schema/schema.component.html","./src/modules/common/components/schema/schema.component.ts","./src/modules/service-forms/services/datepicker-localization.service.ts","./src/modules/service-forms/services/datepicker-adapter.ts","./src/modules/service-forms/components/common/datepicker.component.html","./src/modules/service-forms/components/common/datepicker.component.ts","./src/modules/ond-marketing-landing-core/interfaces/ond-marketing-offers.interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/buffer.ts","./src/modules/ui-components/components/forms/constants.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/Observable.ts","./src/modules/ui-components/components/flights/flight-card/flight-card.component.html","./src/modules/ui-components/components/flights/flight-card/flight-card.component.ts","./src/modules/cms/components/dynamic/dynamic-route.component.html","./src/modules/cms/components/dynamic/dynamic-route.component.ts","./src/modules/common/components/images/content-image.component.html","./src/modules/common/components/images/content-image.component.ts","./src/modules/booking/store/selectors/booking-cart-state.selector.ts","./src/modules/locations/services/locations.service.ts","./node_modules/.pnpm/qs@6.14.0/node_modules/qs/lib/utils.js","./src/modules/one-upgrade/constants.ts","./src/modules/manage-booking/constants.ts","./src/modules/service-forms/services/form-validators.ts","./node_modules/src/cdk/portal/portal.ts","./node_modules/src/cdk/portal/dom-portal-outlet.ts","./node_modules/src/cdk/portal/portal-directives.ts","./src/modules/common/components/front-page/front-page.component.ts","./src/modules/common/components/front-page/front-page.component.html","./src/modules/common/components/front-page/select-language.component.html","./src/modules/common/components/front-page/select-language.component.ts","./src/modules/destination-search/interfaces/destination-search.interface.ts","./src/modules/common-booking/components/flight-selection/cabin-class-modal/cabin-class-modal.component.html","./src/modules/common-booking/components/flight-selection/cabin-class-modal/cabin-class-modal.component.ts","./src/modules/common/interfaces/gtm.interface.ts","./src/modules/core-api/interfaces/location-routecff.interface.ts","./src/modules/common/components/header/header.component.html","./src/modules/common/components/header/header.component.ts","./node_modules/src/cdk/overlay/scroll/block-scroll-strategy.ts","./node_modules/src/cdk/overlay/scroll/close-scroll-strategy.ts","./node_modules/src/cdk/overlay/scroll/noop-scroll-strategy.ts","./node_modules/src/cdk/overlay/position/scroll-clip.ts","./node_modules/src/cdk/overlay/scroll/reposition-scroll-strategy.ts","./node_modules/src/cdk/overlay/scroll/scroll-strategy-options.ts","./node_modules/src/cdk/overlay/overlay-config.ts","./node_modules/src/cdk/overlay/position/connected-position.ts","./node_modules/src/cdk/overlay/dispatchers/base-overlay-dispatcher.ts","./node_modules/src/cdk/overlay/dispatchers/overlay-keyboard-dispatcher.ts","./node_modules/src/cdk/overlay/dispatchers/overlay-outside-click-dispatcher.ts","./node_modules/src/cdk/overlay/overlay-container.ts","./node_modules/src/cdk/overlay/overlay-ref.ts","./node_modules/src/cdk/overlay/position/flexible-connected-position-strategy.ts","./node_modules/src/cdk/overlay/position/global-position-strategy.ts","./node_modules/src/cdk/overlay/position/overlay-position-builder.ts","./node_modules/src/cdk/overlay/overlay.ts","./node_modules/src/cdk/overlay/overlay-directives.ts","./node_modules/src/cdk/overlay/overlay-module.ts","./node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js","./src/modules/common/directives/show-for-login-status.directive.ts","./node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js","./src/modules/dapi/interfaces/services.interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/skipWhile.ts","./src/modules/common/forms/input-field.component.html","./src/modules/common/forms/input-field.component.ts","./src/modules/ui-components/components/promo-card/enum.ts","./src/modules/common/components/error/error.component.html","./src/modules/common/components/error/error.component.ts","./src/modules/ui-components/components/forms/block-selection-group/block-selection-group.component.html","./src/modules/ui-components/components/forms/block-selection-group/block-selection-group.component.ts","./src/modules/ui-translate/utils/equals.ts","./src/modules/common/directives/directive.module.ts","./src/modules/ui-components/components/popover/popover.enum.ts","./src/modules/common/components/helpers/client-only.component.ts","./src/modules/common-booking/services/passenger-form.service.ts","./node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js","./src/modules/common-booking/components/endpoint-time/endpoint-time.component.html","./src/modules/common-booking/components/endpoint-time/endpoint-time.component.ts","./node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js","./src/modules/common/datacloud/services/datacloud.service.ts","./src/modules/common/forms/forms.module.ts","./src/modules/common/components/welcome-back-message/welcome-back-message.component.html","./src/modules/common/components/welcome-back-message/welcome-back-message.component.ts","./src/modules/common-booking/components/flight-selection/flight-summary/flight-summary.component.html","./src/modules/common-booking/components/flight-selection/flight-summary/flight-summary.component.ts","./src/modules/common/login/components/login-iframe.component.html","./src/modules/common/login/components/login-iframe.component.ts","./src/modules/common/login/components/marketing-preferences.component.html","./src/modules/common/login/components/marketing-preferences.component.ts","./src/modules/common/login/components/profile-quick-view/profile-quick-view.component.html","./src/modules/common/login/components/profile-quick-view/profile-quick-view.component.ts","./src/modules/common/login/components/login-form-container/login-form-container.component.html","./src/modules/common/login/components/login-form-container/login-form-container.compontent.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/share.ts","./src/modules/core/utils/unsubscribe.ts","./src/modules/common/interfaces/booking/offers.interface.ts","./src/modules/common/interfaces/booking/multi-city-state.interface.ts","./src/modules/booking-widget/interfaces/am-api.interface.ts","./src/modules/service-forms/components/common/common-service-forms.module.ts","./node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/fromEvent.ts","./src/modules/common-booking/components/price-breakdown/price-breakdown.component.html","./src/modules/common-booking/components/price-breakdown/price-breakdown.component.ts","./src/modules/common/components/expand/expand.component.html","./src/modules/common/components/expand/expand.component.ts","./src/modules/rx/utils/snapshot.ts","./node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.js","./src/modules/ui-components/components/flights/flights.module.ts","./src/modules/ui-components/components/modal/modal.component.html","./src/modules/ui-components/components/modal/modal.component.ts","./src/modules/ui-components/utils/dom.utils.ts","./src/modules/service-forms/components/common/form-array.component.html","./src/modules/service-forms/components/common/form-array.component.ts","./src/modules/common/utils/form-validators.ts","./src/modules/common/components/cms/cms-unstyled-teaser/cms-unstyled-teaser.component.html","./src/modules/common/components/cms/cms-unstyled-teaser/cms-unstyled-teaser.component.ts","./src/modules/ui-components/components/products/product-card/product-card.component.html","./src/modules/ui-components/components/products/product-card/product-card.component.ts","./src/modules/core/utils/keycodes.ts","./node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js","./src/modules/rx/operators/operators.ts","./src/modules/rx/operators/safeMap.ts","./src/modules/rx/operators/retryWithBackoff.ts","./src/modules/rx/operators/combineTemplate.ts","./src/modules/rx/operators/catchErrorAsJson.ts","./src/modules/dapi/api/services/order-change.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/symbol/iterator.ts","./src/modules/ui-components/components/loader/enums.ts","./src/modules/cms/components/content-components.module.ts","./src/modules/ui-components/components/toggle-switch/toggle-switch.module.ts","./src/modules/ui-components/components/headers/booking-header/booking-header.component.html","./src/modules/ui-components/components/headers/booking-header/booking-header.component.ts","./src/modules/common-booking/store/selectors/seat-map.selector.ts","./src/modules/common-booking/store/selectors/payment.selector.ts","./src/modules/common-booking/store/selectors/disruption.selector.ts","./src/modules/common-booking/store/selectors/feature.selector.ts","./src/modules/common-booking/store/selectors/redirect.selector.ts","./src/modules/booking-widget/utils/utils.ts","./node_modules/packages/forms/src/directives/control_value_accessor.ts","./node_modules/packages/forms/src/directives/checkbox_value_accessor.ts","./node_modules/packages/forms/src/directives/default_value_accessor.ts","./node_modules/packages/forms/src/validators.ts","./node_modules/packages/forms/src/directives/abstract_control_directive.ts","./node_modules/packages/forms/src/directives/control_container.ts","./node_modules/packages/forms/src/directives/ng_control.ts","./node_modules/packages/forms/src/directives/ng_control_status.ts","./node_modules/packages/forms/src/model/abstract_model.ts","./node_modules/packages/forms/src/model/form_group.ts","./node_modules/packages/forms/src/directives/shared.ts","./node_modules/packages/forms/src/directives/ng_form.ts","./node_modules/packages/forms/src/util.ts","./node_modules/packages/forms/src/model/form_control.ts","./node_modules/packages/forms/src/directives/abstract_form_group_directive.ts","./node_modules/packages/forms/src/directives/ng_model.ts","./node_modules/packages/forms/src/directives/ng_no_validate_directive.ts","./node_modules/packages/forms/src/directives/radio_control_value_accessor.ts","./node_modules/packages/forms/src/directives/reactive_directives/form_control_directive.ts","./node_modules/packages/forms/src/directives/reactive_directives/form_group_directive.ts","./node_modules/packages/forms/src/directives/reactive_directives/form_group_name.ts","./node_modules/packages/forms/src/directives/reactive_directives/form_control_name.ts","./node_modules/packages/forms/src/directives/select_control_value_accessor.ts","./node_modules/packages/forms/src/directives/select_multiple_control_value_accessor.ts","./node_modules/packages/forms/src/directives/validators.ts","./node_modules/packages/forms/src/directives.ts","./node_modules/packages/forms/src/model/form_array.ts","./node_modules/packages/forms/src/form_builder.ts","./node_modules/packages/forms/src/form_providers.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isIterable.ts","./node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js","./src/modules/common/login/services/login.service.ts","./src/modules/common/login/services/join.service.ts","./src/modules/ui-components/components/tag/taggable.component.ts","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js","./src/modules/common/pipes/points.pipe.ts","./src/modules/cms/components/components/cms-rich-text.component.ts","./src/modules/service-forms-lazy/utils/validation.utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/symbol/observable.ts","./src/modules/ui-components/directives/focus-out/focus-out.directive.module.ts","./src/modules/cms/components/continue-reading/continue-reading.component.ts","./src/modules/cms/components/continue-reading/continue-reading.component.html","./src/modules/common-booking/interfaces/component-types.interface.ts","./src/modules/common-booking/interfaces/payment.interface.ts","./src/modules/common-booking/interfaces/flight-selection.interface.ts","./src/modules/common-booking/interfaces/changes-notification.enum.ts","./src/modules/ui-components/components/products/products.module.ts","./src/modules/common-booking/store/store.interface.ts","./src/modules/booking/store/actions/bounds.actions.ts","./node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js","./src/modules/booking/store/selectors/offer-selector.utils.ts","./src/modules/booking/store/selectors/offers.selector.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts","./src/modules/dapi/api/models/sub-category.ts","./src/modules/core/actions/login.actions.ts","./src/modules/core/actions/navigator.actions.ts","./src/modules/core/actions/pseudo-local.actions.ts","./src/modules/common-booking/components/flight-selection/fare-family-table/fare-family-table.component.html","./src/modules/common-booking/components/flight-selection/fare-family-table/fare-family-table.component.ts","./src/modules/common/pipes/observe.pipe.ts","./src/modules/core/providers/window.ts","./src/modules/ui-components/utils/utils.ts","./src/modules/ond-marketing-landing-core/services/ond-marketing-data.service.ts","./src/modules/ond-marketing-landing-core/services/ond-marketing-offers.service.ts","./src/modules/ui-components/components/carousel/carousel.component.html","./src/modules/ui-components/components/carousel/carousel.component.ts","./src/modules/ui-components/components/link/link.component.html","./src/modules/ui-components/components/link/link.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/ReplaySubject.ts","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js","./node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js","./src/modules/dapi/api/services/timetable.service.ts","./src/modules/service-forms/interfaces/form-types.interface.ts","./src/modules/service-forms/interfaces/prefill-profile-data.interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js","./src/modules/dapi/api/services/seatmap.service.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js","./node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/index.js","./src/modules/ui-components/components/toggle-switch/interfaces.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/empty.ts","./src/modules/booking/store/actions/pax-details.actions.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/first.ts","./src/modules/chat/interfaces/index.ts","./src/modules/chat/components/pre-chat/pre-chat.component.html","./src/modules/chat/components/pre-chat/pre-chat.component.ts","./src/modules/chat/services/salesforce-chat.service.ts","./src/modules/chat/services/salesforce-chat-config.service.ts","./src/modules/chat/services/agentforce-chat.service.ts","./src/modules/chat/components/chat/chat.component.html","./src/modules/chat/components/chat/chat.component.ts","./src/modules/chat/components/chat-user-form/chat-user-form.component.html","./src/modules/chat/components/chat-user-form/chat-user-form.component.ts","./src/modules/chat/chat.module.ts","./src/modules/chat/components/chat-global-visibility/chat-global-visibility.component.ts","./src/modules/booking/store/selectors/cart.selector.ts","./src/modules/common/utils/map-flights-from-cart-data.ts","./src/modules/common-booking/services/queue.service.ts","./src/modules/common/directives/after-view-init.directive.ts","./src/modules/booking/services/booking.service.ts","./src/modules/common/utils/create-params-for-step.ts","./src/modules/booking/modules/ticket-selection/services/booking-air-bounds.service.ts","./src/modules/booking/modules/ticket-selection/services/booking-offer-list.service.ts","./src/modules/booking/modules/ticket-selection/services/booking-multi-city.service.ts","./src/modules/core/services/language/localization-step2-in-translation.ts","./src/modules/core/services/language/localization-wip.ts","./src/modules/core/services/language/localization.ts","./src/modules/core/services/language/localization.provider.ts","./src/modules/ui-components/components/tag/interfaces.ts","./src/modules/common-booking/modules/ancillaries/utils/category.utils.ts","./src/modules/ui-components/components/drawer/drawer.module.ts","./src/modules/refunds-common/constants.ts","./src/modules/ui-components/components/pagination/pagination.component.html","./src/modules/ui-components/components/pagination/pagination.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isAsyncIterable.ts","./src/modules/cms/components/components/cms-disruptions.component.html","./src/modules/cms/components/components/cms-disruptions.component.ts","./src/modules/common-booking/components/passenger-info-list/passenger-info-list.component.html","./src/modules/common-booking/components/passenger-info-list/passenger-info-list.component.ts","./src/modules/common-booking/components/flight-selection/bound-container/bound-container.component.html","./src/modules/common-booking/components/flight-selection/bound-container/bound-container.component.ts","./src/modules/common/login/services/consent.service.ts","./src/modules/common-booking/utils/benefit.utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/Action.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts","./src/modules/common-booking/components/flight-filters-empty-state/flight-filters-empty-state.component.ts","./src/modules/common-booking/components/flight-filters-empty-state/flight-filters-empty-state.component.html","./src/modules/booking-widget/components/travel-dates-selector/travel-dates-selector.component.html","./src/modules/booking-widget/components/travel-dates-selector/travel-dates-selector.component.ts","./src/modules/core/interfaces/dds.interface.ts","./src/modules/core/interfaces/maintenance-config.interface.ts","./src/modules/core/interfaces/global-booking-travel-class.interface.ts","./src/modules/common/components/booking-header-summary/booking-header-summary.component.html","./src/modules/common/components/booking-header-summary/booking-header-summary.component.ts","./src/modules/ui-components/components/forms/file-uploader/file-uploader.component.html","./src/modules/ui-components/components/forms/file-uploader/file-uploader.component.ts","./src/modules/ui-components/components/forms/file-uploader/file-uploader-validators.ts","./node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","./src/modules/dapi/utils/service-category-utils.ts","./src/modules/dapi/utils/pax-details-utils.ts","./src/modules/dapi/utils/url-param.utils.ts","./src/modules/ui-components/components/toggle-switch/toggle-switch.component.ts","./src/modules/ui-components/components/toggle-switch/toggle-switch.component.html","./src/modules/ui-components/components/images/enums.ts","./src/modules/ui-components/components/tabs/tabs/enums.ts","./src/modules/common/components/images/images.utils.ts","./src/modules/common/utils/route-utils.ts","./src/modules/common/utils/booking.utils.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/merge.ts","./node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm-browser/native.js","./node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm-browser/rng.js","./node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm-browser/stringify.js","./node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm-browser/v4.js","./node_modules/packages/core/primitives/signals/src/equality.ts","./node_modules/packages/core/primitives/signals/src/graph.ts","./node_modules/packages/core/primitives/signals/src/computed.ts","./node_modules/packages/core/primitives/signals/src/errors.ts","./node_modules/packages/core/primitives/signals/src/signal.ts","./node_modules/packages/core/primitives/signals/src/watch.ts","./node_modules/packages/core/src/error_details_base_url.ts","./node_modules/packages/core/src/errors.ts","./node_modules/packages/core/src/authoring/input/input_signal_node.ts","./node_modules/packages/core/src/authoring/input/input_signal.ts","./node_modules/packages/core/src/util/closure.ts","./node_modules/packages/core/src/util/decorators.ts","./node_modules/packages/core/src/util/global.ts","./node_modules/packages/core/src/util/property.ts","./node_modules/packages/core/src/util/stringify.ts","./node_modules/packages/core/src/di/forward_ref.ts","./node_modules/packages/core/src/di/interface/defs.ts","./node_modules/packages/core/src/di/injection_token.ts","./node_modules/packages/core/src/di/interface/provider.ts","./node_modules/packages/core/src/render3/fields.ts","./node_modules/packages/core/src/render3/util/stringify_utils.ts","./node_modules/packages/core/src/render3/errors_di.ts","./node_modules/packages/core/src/di/interface/injector.ts","./node_modules/packages/core/src/di/inject_switch.ts","./node_modules/packages/core/src/di/injector_compatibility.ts","./node_modules/packages/core/src/di/metadata.ts","./node_modules/packages/core/src/render3/definition_factory.ts","./node_modules/packages/core/src/util/array_utils.ts","./node_modules/packages/core/src/util/empty.ts","./node_modules/packages/core/src/di/initializer_token.ts","./node_modules/packages/core/src/di/injector_token.ts","./node_modules/packages/core/src/di/internal_tokens.ts","./node_modules/packages/core/src/di/null_injector.ts","./node_modules/packages/core/src/change_detection/constants.ts","./node_modules/packages/core/src/metadata/view.ts","./node_modules/packages/core/src/render3/interfaces/input_flags.ts","./node_modules/packages/core/src/render3/styling/class_differ.ts","./node_modules/packages/core/src/render3/util/attrs_utils.ts","./node_modules/packages/core/src/render3/node_selector_matcher.ts","./node_modules/packages/core/src/render3/definition.ts","./node_modules/packages/core/src/di/provider_collection.ts","./node_modules/packages/core/src/di/scope.ts","./node_modules/packages/core/src/di/r3_injector.ts","./node_modules/packages/core/src/di/contextual.ts","./node_modules/packages/core/src/render3/interfaces/view.ts","./node_modules/packages/core/src/render3/interfaces/container.ts","./node_modules/packages/core/src/render3/interfaces/type_checks.ts","./node_modules/packages/core/src/interface/simple_change.ts","./node_modules/packages/core/src/render3/apply_value_input_field.ts","./node_modules/packages/core/src/render3/features/ng_onchanges_feature.ts","./node_modules/packages/core/src/render3/profiler.ts","./node_modules/packages/core/src/render3/namespaces.ts","./node_modules/packages/core/src/render3/util/view_utils.ts","./node_modules/packages/core/src/render3/state.ts","./node_modules/packages/core/src/render3/hooks.ts","./node_modules/packages/core/src/render3/interfaces/injector.ts","./node_modules/packages/core/src/view/provider_flags.ts","./node_modules/packages/core/src/render3/chained_injector.ts","./node_modules/packages/core/src/render3/util/injector_utils.ts","./node_modules/packages/core/src/render3/di.ts","./node_modules/packages/core/src/render3/instructions/di_attr.ts","./node_modules/packages/core/src/di/create_injector.ts","./node_modules/packages/core/src/di/injector.ts","./node_modules/packages/core/src/di/host_tag_name_token.ts","./node_modules/packages/core/src/util/errors.ts","./node_modules/packages/core/src/change_detection/scheduling/flags.ts","./node_modules/packages/core/src/linker/destroy_ref.ts","./node_modules/packages/core/src/pending_tasks.ts","./node_modules/packages/core/src/event_emitter.ts","./node_modules/packages/core/src/util/noop.ts","./node_modules/packages/core/src/util/callback_scheduler.ts","./node_modules/packages/core/src/zone/ng_zone.ts","./node_modules/packages/core/src/error_handler.ts","./node_modules/packages/core/src/authoring/input/input.ts","./node_modules/packages/core/src/linker/element_ref.ts","./node_modules/packages/core/src/linker/query_list.ts","./node_modules/packages/core/src/hydration/skip_hydration.ts","./node_modules/packages/core/src/render3/interfaces/lview_tracking.ts","./node_modules/packages/core/src/render3/context_discovery.ts","./node_modules/packages/core/src/render3/util/view_traversal_utils.ts","./node_modules/packages/core/src/render3/interfaces/document.ts","./node_modules/packages/core/src/application/application_tokens.ts","./node_modules/packages/core/src/transfer_state.ts","./node_modules/packages/core/src/hydration/interfaces.ts","./node_modules/packages/core/src/hydration/utils.ts","./node_modules/packages/core/src/hydration/tokens.ts","./node_modules/packages/core/src/util/security/trusted_types.ts","./node_modules/packages/core/src/util/security/trusted_types_bypass.ts","./node_modules/packages/core/src/sanitization/bypass.ts","./node_modules/packages/core/src/sanitization/inert_body.ts","./node_modules/packages/core/src/sanitization/url_sanitizer.ts","./node_modules/packages/core/src/sanitization/html_sanitizer.ts","./node_modules/packages/core/src/sanitization/security.ts","./node_modules/packages/core/src/sanitization/sanitization.ts","./node_modules/packages/core/src/util/dom.ts","./node_modules/packages/core/src/render3/util/misc_utils.ts","./node_modules/packages/core/src/render/api_flags.ts","./node_modules/packages/core/src/render3/i18n/i18n_tree_shaking.ts","./node_modules/packages/core/src/render3/node_manipulation.ts","./node_modules/packages/core/src/render3/tokens.ts","./node_modules/packages/core/src/render3/instructions/advance.ts","./node_modules/packages/core/src/render3/instructions/di.ts","./node_modules/packages/core/src/render3/instructions/write_to_directive_input.ts","./node_modules/packages/core/src/render3/instructions/shared.ts","./node_modules/packages/core/src/render3/instructions/render.ts","./node_modules/packages/core/src/render3/view_manipulation.ts","./node_modules/packages/core/src/render3/collect_native_nodes.ts","./node_modules/packages/core/src/render3/reactive_lview_consumer.ts","./node_modules/packages/core/src/render3/instructions/change_detection.ts","./node_modules/packages/core/src/render3/instructions/mark_view_dirty.ts","./node_modules/packages/core/src/render3/view_ref.ts","./node_modules/packages/core/src/linker/template_ref.ts","./node_modules/packages/core/src/hydration/compression.ts","./node_modules/packages/core/src/hydration/node_lookup_utils.ts","./node_modules/packages/core/src/hydration/i18n.ts","./node_modules/packages/core/src/hydration/cleanup.ts","./node_modules/packages/core/src/hydration/views.ts","./node_modules/packages/core/src/change_detection/scheduling/zoneless_scheduling.ts","./node_modules/packages/core/src/linker/component_factory.ts","./node_modules/packages/core/src/linker/component_factory_resolver.ts","./node_modules/packages/core/src/render/api.ts","./node_modules/packages/core/src/sanitization/sanitizer.ts","./node_modules/packages/core/src/render3/jit/util.ts","./node_modules/packages/core/src/render3/styling/static_styling.ts","./node_modules/packages/core/src/render3/component_ref.ts","./node_modules/packages/core/src/linker/view_container_ref.ts","./node_modules/packages/core/src/interface/type.ts","./node_modules/packages/core/src/render3/query.ts","./node_modules/packages/core/src/util/performance.ts","./node_modules/packages/core/src/render3/reactivity/api.ts","./node_modules/packages/core/src/render3/reactivity/signal.ts","./node_modules/packages/core/src/render3/features/inherit_definition_feature.ts","./node_modules/packages/core/src/render3/features/input_transforms_feature.ts","./node_modules/packages/core/src/linker/ng_module_factory.ts","./node_modules/packages/core/src/render3/ng_module_ref.ts","./node_modules/packages/core/src/util/iterable.ts","./node_modules/packages/core/src/render3/bindings.ts","./node_modules/packages/core/src/i18n/utils.ts","./node_modules/packages/core/src/render3/instructions/template.ts","./node_modules/packages/core/src/render3/reactivity/asserts.ts","./node_modules/packages/core/src/render3/after_render/api.ts","./node_modules/packages/core/src/render3/after_render/manager.ts","./node_modules/packages/core/src/render3/after_render/hooks.ts","./node_modules/packages/core/src/render3/instructions/attribute.ts","./node_modules/packages/core/src/render3/instructions/interpolation.ts","./node_modules/packages/core/src/render3/interfaces/styling.ts","./node_modules/packages/core/src/render3/styling/style_binding_list.ts","./node_modules/packages/core/src/render3/styling/styling_parser.ts","./node_modules/packages/core/src/render3/instructions/property.ts","./node_modules/packages/core/src/render3/instructions/styling.ts","./node_modules/packages/core/src/render3/instructions/class_map_interpolation.ts","./node_modules/packages/core/src/render3/list_reconciliation.ts","./node_modules/packages/core/src/render3/instructions/control_flow.ts","./node_modules/packages/core/src/render3/instructions/element.ts","./node_modules/packages/core/src/render3/interfaces/node.ts","./node_modules/packages/core/src/render3/instructions/element_container.ts","./node_modules/packages/core/src/render3/instructions/get_current_view.ts","./node_modules/packages/core/src/render3/instructions/host_property.ts","./node_modules/packages/core/src/i18n/locale_en.ts","./node_modules/packages/core/src/i18n/locale_data_api.ts","./node_modules/packages/core/src/i18n/localization.ts","./node_modules/packages/core/src/render3/i18n/i18n_locale_id.ts","./node_modules/packages/core/src/render3/instructions/listener.ts","./node_modules/packages/core/src/render3/instructions/next_context.ts","./node_modules/packages/core/src/render3/instructions/projection.ts","./node_modules/packages/core/src/render3/instructions/property_interpolation.ts","./node_modules/packages/core/src/render3/instructions/queries.ts","./node_modules/packages/core/src/render3/instructions/storage.ts","./node_modules/packages/core/src/render3/instructions/text.ts","./node_modules/packages/core/src/render3/instructions/text_interpolation.ts","./node_modules/packages/core/src/render3/instructions/two_way.ts","./node_modules/packages/core/src/render3/instructions/let_declaration.ts","./node_modules/packages/core/src/render3/di_setup.ts","./node_modules/packages/core/src/render3/features/providers_feature.ts","./node_modules/packages/core/src/render3/features/standalone_feature.ts","./node_modules/packages/core/src/render3/scope.ts","./node_modules/packages/core/src/render3/pure_function.ts","./node_modules/packages/core/src/render3/pipe.ts","./node_modules/packages/core/src/render3/view_engine_compatibility_prebound.ts","./node_modules/packages/core/src/version.ts","./node_modules/packages/core/src/r3_symbols.ts","./node_modules/packages/core/src/console.ts","./node_modules/packages/core/src/testability/testability.ts","./node_modules/packages/core/src/util/lang.ts","./node_modules/packages/core/src/application/application_init.ts","./node_modules/packages/core/src/application/application_ref.ts","./node_modules/packages/core/src/linker/compiler.ts","./node_modules/packages/core/src/change_detection/scheduling/ng_zone_scheduling.ts","./node_modules/packages/core/src/change_detection/scheduling/zoneless_scheduling_impl.ts","./node_modules/packages/core/src/i18n/tokens.ts","./node_modules/packages/core/src/platform/platform_destroy_listeners.ts","./node_modules/packages/core/src/platform/bootstrap.ts","./node_modules/packages/core/src/platform/platform_ref.ts","./node_modules/packages/core/src/application/application_ngmodule_factory_compiler.ts","./node_modules/packages/core/src/platform/platform.ts","./node_modules/packages/core/src/util/is_dev_mode.ts","./node_modules/packages/core/src/change_detection/change_detector_ref.ts","./node_modules/packages/core/src/change_detection/differs/default_iterable_differ.ts","./node_modules/packages/core/src/change_detection/differs/default_keyvalue_differ.ts","./node_modules/packages/core/src/change_detection/differs/iterable_differs.ts","./node_modules/packages/core/src/change_detection/differs/keyvalue_differs.ts","./node_modules/packages/core/src/change_detection/change_detection.ts","./node_modules/packages/core/src/platform/platform_core_providers.ts","./node_modules/packages/core/src/application/application_module.ts","./node_modules/packages/core/src/hydration/api.ts","./node_modules/packages/core/src/util/coercion.ts","./node_modules/packages/core/src/render3/reactivity/computed.ts","./node_modules/packages/core/src/render3/reactivity/untracked.ts","./node_modules/packages/core/src/render3/reactivity/effect.ts","./node_modules/packages/core/src/render3/component.ts","./src/modules/ui-components/components/stepper/enums.ts","./node_modules/.pnpm/qs@6.14.0/node_modules/qs/lib/parse.js","./src/modules/ui-components/components/notifications/menu-list/menu-list.component.html","./src/modules/ui-components/components/notifications/menu-list/menu-list.component.ts","./src/modules/cms/services/cms-utils/cms-utils.ts","./src/modules/common/directives/let-directive.ts","./src/modules/common/login/components/login-card/login-card.component.html","./src/modules/common/login/components/login-card/login-card.component.ts","./src/modules/cms/components/components/cms-cta-with-image-and-text.component.ts","external var \"jsConfigOverride\"","./src/modules/common/components/price-calendar/price-calendar.component.html","./src/modules/common/components/price-calendar/price-calendar.component.ts","./src/modules/common-booking/components/price-breakdown-renewed/price-breakdown-renewed.component.html","./src/modules/common-booking/components/price-breakdown-renewed/price-breakdown-renewed.component.ts","./src/modules/common/interfaces/airlines.ts","./src/modules/service-forms/components/common/form-input-checkbox.component.html","./src/modules/service-forms/components/common/form-input-checkbox.component.ts","./src/modules/core/services/sentry/sentry.logger.ts","./src/modules/common/utils/layout.utils.ts","./src/modules/common-booking/components/itinerary-detail/itinerary-detail.component.html","./src/modules/common-booking/components/itinerary-detail/itinerary-detail.component.ts","./src/modules/common/components/loader/loader.component.html","./src/modules/common/components/loader/loader.component.ts","./node_modules/src/cdk/observers/observe-content.ts","./node_modules/src/cdk/layout/media-matcher.ts","./node_modules/src/cdk/layout/breakpoints-observer.ts","./node_modules/src/cdk/layout/breakpoints.ts","./node_modules/src/cdk/a11y/aria-describer/aria-reference.ts","./node_modules/src/cdk/a11y/key-manager/list-key-manager.ts","./node_modules/src/cdk/a11y/key-manager/activedescendant-key-manager.ts","./node_modules/src/cdk/a11y/interactivity-checker/interactivity-checker.ts","./node_modules/src/cdk/a11y/aria-describer/aria-describer.ts","./node_modules/src/cdk/a11y/focus-trap/focus-trap.ts","./node_modules/src/cdk/a11y/fake-event-detection.ts","./node_modules/src/cdk/a11y/input-modality/input-modality-detector.ts","./node_modules/src/cdk/a11y/focus-monitor/focus-monitor.ts","./node_modules/src/cdk/a11y/high-contrast-mode/high-contrast-mode-detector.ts","./node_modules/src/cdk/a11y/a11y-module.ts","./src/modules/booking/services/booking.guard.ts","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js","./src/modules/ui-components/components/forms/combo-box/combo-box.component.html","./src/modules/ui-components/components/forms/combo-box/combo-box.component.ts","./src/modules/common-booking/store/actions/services.actions.ts","./src/modules/common/pipes/offers-price.pipe.ts","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js","./src/modules/ui-components/components/datepicker/month/month.component.html","./src/modules/ui-components/components/datepicker/month/month.component.ts","./src/modules/booking/store/selectors/pax-details.selector.ts","./src/modules/ui-components/utils/date.format.utils.ts","./src/modules/ui-components/components/datepicker/datepicker/datepicker.component.html","./src/modules/ui-components/components/datepicker/datepicker/datepicker.component.ts","./src/modules/core/actions/language.actions.ts","./src/modules/voluntary-change/voluntary-change-config.ts","./src/modules/service-forms/components/common/form-input-text.component.html","./src/modules/service-forms/components/common/form-input-text.component.ts","./src/modules/common/components/price-matrix/price-matrix.component.html","./src/modules/common/components/price-matrix/price-matrix.component.ts","./src/modules/common-booking/store/actions/seat-map.actions.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts","./src/modules/ond-marketing-landing-core/components/ond-marketing-offers.component.html","./src/modules/ond-marketing-landing-core/components/ond-marketing-offers.component.ts","./src/modules/booking/store/actions/booking.actions.ts","./src/modules/booking/store/actions/cart.actions.ts","./src/modules/booking/store/actions/offers.actions.ts","./src/modules/service-forms/components/common/locations-autocomplete.component.html","./src/modules/service-forms/components/common/locations-autocomplete.component.ts","./src/modules/common-booking/components/passenger-ff-cards/passenger-ff-cards.component.html","./src/modules/common-booking/components/passenger-ff-cards/passenger-ff-cards.component.ts","./src/modules/booking-widget/store/reducers/booking-widget.reducer.ts","./src/modules/cms/interfaces/newsletter-signup.interface.ts","./src/modules/ui-components/components/buttons/cta-button/cta-button.component.html","./src/modules/ui-components/components/buttons/cta-button/cta-button.component.ts","./src/modules/one-upgrade/interfaces/stage.interface.ts","./src/modules/common/components/feedback-widget/feedback-widget.component.html","./src/modules/common/components/feedback-widget/feedback-widget.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/animationFrame.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/auditTime.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/audit.ts","./node_modules/src/cdk/scrolling/scroll-dispatcher.ts","./node_modules/src/cdk/scrolling/viewport-ruler.ts","./node_modules/src/cdk/scrolling/scrolling-module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/args.ts","./src/modules/ui-components/components/promo-card/promo-card.module.ts","./src/modules/cms/utils/marketing-offer.utils.ts","./src/modules/cms/utils/utils.ts","./src/modules/core/utils/cms-path-helpers.ts","./src/modules/common-booking/components/booking-summary/booking-summary.component.html","./src/modules/common-booking/components/booking-summary/booking-summary.component.ts","./src/modules/core/services/state-transfer/state-transfer.service.ts","./src/modules/common-booking/store/actions/order.actions.ts","./src/modules/common-booking/store/actions/payment.actions.ts","./src/modules/common-booking/store/actions/upgrade-offer.actions.ts","./src/modules/ond-marketing-landing-core/services/utils.ts","./src/modules/common/forms/form-fields.component.ts","./src/modules/common/forms/form-fields.component.html","./src/modules/dapi/interfaces/cart.interface.ts","./src/modules/dapi/interfaces/itinerary.interface.ts","./src/modules/dapi/interfaces/http.interface.ts","./src/modules/booking-widget/interfaces/flight-search.interface.ts","./src/modules/booking-widget/interfaces/paxAmount.interface.ts","./src/modules/booking-widget/interfaces/notification-data.interface.ts","./src/modules/booking-widget/interfaces/gtm.interface.ts","./src/modules/common/components/promotion-banner/promotion-banner.component.html","./src/modules/common/components/promotion-banner/promotion-banner.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/mergeAll.ts","./src/modules/common/pipes/map.pipe.ts","./src/modules/ui-components/components/stepper/stepper.module.ts","./src/modules/common/services/campaign-banner/campaign-banner.service.ts","./src/modules/common/qualtrics/qualtrics.utils.ts","./src/modules/cms/components/components/content-switcher-tabs/cms-content-switcher-tabs.component.html","./src/modules/cms/components/components/content-switcher-tabs/cms-content-switcher-tabs.component.ts","./src/modules/common-booking/components/flight-selection-sort-by/flight-selection-sort-by.component.html","./src/modules/common-booking/components/flight-selection-sort-by/flight-selection-sort-by.component.ts","./node_modules/.pnpm/@finnairoyj+fcom-ui-styles@25.4.1/node_modules/@finnairoyj/fcom-ui-styles/enums.js","./src/modules/common/components/header/navigation/navigation-trigger/navigation-trigger.component.ts","./src/modules/common/components/header/navigation/navigation-trigger/navigation-trigger.component.html","./src/modules/loyalty-core/interfaces/pax-trip.interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/withLatestFrom.ts","./src/modules/ui-components/components/images/constants.ts","./src/modules/cms/components/destination/destination-hero/destination-hero.component.html","./src/modules/cms/components/destination/destination-hero/destination-hero.component.ts","./src/modules/ui-components/components/stepper/stepper.component.html","./src/modules/ui-components/components/stepper/stepper.component.ts","./src/modules/common/forms/plus-minus-selector/plus-minus-selector.component.html","./src/modules/common/forms/plus-minus-selector/plus-minus-selector.component.ts","./src/modules/common/pipes/format-card-number.pipe.ts","./src/modules/destination-search/destination-search.module.ts","./src/modules/ui-components/components/images/utils.ts","./src/modules/ui-components/components/images/image/image.component.html","./src/modules/ui-components/components/images/image/image.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/Scheduler.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts","./src/modules/booking-widget/constants.ts","./src/modules/booking-widget/store/actions/booking-widget.actions.ts","./src/modules/ui-components/components/quick-links/quick-links.component.html","./src/modules/ui-components/components/quick-links/quick-links.component.ts","./src/modules/common-booking/modules/ancillaries/utils/ancillary.utils.ts","./src/modules/ui-components/components/forms/abstracts/abstract-checkbox.component.ts","./src/modules/common/store/actions/error.actions.ts","./src/modules/common/components/link/link.component.ts","./src/modules/common/components/link/link.component.html","./src/modules/common/components/skip-link/skip-link.component.ts","./src/modules/common/components/skip-link/skip-link.component.html","./src/modules/common/components/newsletter-notification/newsletter-notification.component.html","./src/modules/common/components/newsletter-notification/newsletter-notification.component.ts","./src/modules/common/components/images/images.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isScheduler.ts","./src/modules/ui-components/components/drawer/constants.ts","./src/modules/ui-components/components/drawer/drawer.component.html","./src/modules/ui-components/components/drawer/drawer.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/concat.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/concatAll.ts","./src/modules/cms/services/cheapest-price/cheapest-price-for-all-destinations.service.ts","./src/modules/booking/store/actions/multi-city.actions.ts","./node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/actions.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/reducer.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/serializers/minimal_serializer.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/router_store_config.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/serializers/full_serializer.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/serializers/base.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/store_router_connecting.service.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/provide_router_store.ts","./node_modules/.pnpm/@ngrx+router-store@17.2.0_@angular+common@18.2.13_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0._j2yv3djast74vsjf3nggouj2fy/modules/router-store/src/router_store_module.ts","./src/modules/common-booking/utils/services-summary.utils.ts","./node_modules/src/material/button/button-base.ts","./node_modules/src/material/button/button.ts","./node_modules/src/material/button/button.html","./node_modules/src/material/button/icon-button.ts","./node_modules/src/material/button/icon-button.html","./node_modules/src/material/button/module.ts","./node_modules/src/material/input/input-value-accessor.ts","./node_modules/src/material/datepicker/datepicker-errors.ts","./node_modules/src/material/datepicker/calendar-body.html","./node_modules/src/material/datepicker/month-view.html","./node_modules/src/material/datepicker/calendar.html","./node_modules/src/material/datepicker/datepicker-toggle.html","./node_modules/src/material/datepicker/datepicker-intl.ts","./node_modules/src/material/datepicker/calendar-body.ts","./node_modules/src/material/datepicker/date-selection-model.ts","./node_modules/src/material/datepicker/date-range-selection-strategy.ts","./node_modules/src/material/datepicker/month-view.ts","./node_modules/src/material/datepicker/multi-year-view.ts","./node_modules/src/material/datepicker/multi-year-view.html","./node_modules/src/material/datepicker/year-view.ts","./node_modules/src/material/datepicker/year-view.html","./node_modules/src/material/datepicker/calendar.ts","./node_modules/src/material/datepicker/calendar-header.html","./node_modules/src/material/datepicker/datepicker-animations.ts","./node_modules/src/material/datepicker/datepicker-base.ts","./node_modules/src/material/datepicker/datepicker-content.html","./node_modules/src/material/datepicker/datepicker.ts","./node_modules/src/material/datepicker/datepicker-input-base.ts","./node_modules/src/material/datepicker/datepicker-input.ts","./node_modules/src/material/datepicker/datepicker-toggle.ts","./node_modules/src/material/datepicker/datepicker-module.ts","./src/modules/ui-components/components/flights/unified-flight-object/unified-flight-object.component.html","./src/modules/ui-components/components/flights/unified-flight-object/unified-flight-object.component.ts","./src/modules/dapi/api/services/self-reacc.service.ts","./src/modules/ui-components/components/filters/filters.component.html","./src/modules/ui-components/components/filters/filters.component.ts","./src/modules/cms/components/components/cms-link-block.component.ts","./src/modules/booking/store/selectors/booking.selector.ts","./src/modules/booking/store/selectors/multi-city.selector.ts","./src/modules/ui-components/components/popover/directive/popover.directive.ts","./src/modules/ond-marketing-landing-core/services/link-utils.ts","./src/modules/ond-marketing-landing-core/components/ond-marketing-cross-linking.component.html","./src/modules/ond-marketing-landing-core/components/ond-marketing-cross-linking.component.ts","./src/modules/cms/components/offers/offer-details.component.ts","./src/modules/cms/components/offers/offer-details.component.html","./node_modules/packages/platform-browser/src/browser/generic_browser_adapter.ts","./node_modules/packages/platform-browser/src/browser/browser_adapter.ts","./node_modules/packages/platform-browser/src/browser/xhr.ts","./node_modules/packages/platform-browser/src/dom/events/event_manager.ts","./node_modules/packages/platform-browser/src/dom/shared_styles_host.ts","./node_modules/packages/platform-browser/src/dom/dom_renderer.ts","./node_modules/packages/platform-browser/src/dom/events/dom_events.ts","./node_modules/packages/platform-browser/src/dom/events/key_events.ts","./node_modules/packages/platform-browser/src/browser.ts","./node_modules/packages/platform-browser/src/browser/testability.ts","./node_modules/packages/platform-browser/src/browser/meta.ts","./node_modules/packages/platform-browser/src/browser/title.ts","./node_modules/packages/platform-browser/src/security/dom_sanitization_service.ts","./node_modules/packages/platform-browser/src/hydration.ts","./src/modules/common/components/header/breadcrumb/breadcrumb.component.html","./src/modules/common/components/header/breadcrumb/breadcrumb.component.ts","./src/modules/common/components/header/navigation.module.ts","./src/modules/common-booking/components/expander-card/expander-card.component.html","./src/modules/common-booking/components/expander-card/expander-card.component.ts","./src/modules/cms/components/icon-with-text/icon-with-text.component.html","./src/modules/cms/components/icon-with-text/icon-with-text.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/refCount.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/takeLast.ts","./node_modules/packages/router/src/shared.ts","./node_modules/packages/router/src/utils/collection.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isObservable.ts","./node_modules/packages/router/src/url_tree.ts","./node_modules/packages/router/src/create_url_tree.ts","./node_modules/packages/router/src/events.ts","./node_modules/packages/router/src/utils/config.ts","./node_modules/packages/router/src/router_outlet_context.ts","./node_modules/packages/router/src/utils/tree.ts","./node_modules/packages/router/src/router_state.ts","./node_modules/packages/router/src/directives/router_outlet.ts","./node_modules/packages/router/src/create_router_state.ts","./node_modules/packages/router/src/models.ts","./node_modules/packages/router/src/navigation_canceling_error.ts","./node_modules/packages/router/src/operators/activate_routes.ts","./node_modules/packages/router/src/utils/preactivation.ts","./node_modules/packages/router/src/utils/type_guards.ts","./node_modules/packages/router/src/operators/prioritized_guard_value.ts","./node_modules/packages/router/src/operators/check_guards.ts","./node_modules/packages/router/src/apply_redirects.ts","./node_modules/packages/router/src/utils/config_matching.ts","./node_modules/packages/router/src/recognize.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/last.ts","./node_modules/packages/router/src/operators/resolve_data.ts","./node_modules/packages/router/src/operators/switch_tap.ts","./node_modules/packages/router/src/page_title_strategy.ts","./node_modules/packages/router/src/router_config.ts","./node_modules/packages/router/src/components/empty_outlet.ts","./node_modules/packages/router/src/router_config_loader.ts","./node_modules/packages/router/src/url_handling_strategy.ts","./node_modules/packages/router/src/utils/view_transition.ts","./node_modules/packages/router/src/navigation_transition.ts","./node_modules/packages/router/src/operators/recognize.ts","./node_modules/packages/router/src/route_reuse_strategy.ts","./node_modules/packages/router/src/statemanager/state_manager.ts","./node_modules/packages/router/src/utils/navigations.ts","./node_modules/packages/router/src/router.ts","./node_modules/packages/router/src/directives/router_link.ts","./node_modules/packages/router/src/directives/router_link_active.ts","./node_modules/packages/router/src/router_preloader.ts","./node_modules/packages/router/src/router_scroller.ts","./node_modules/packages/router/src/provide_router.ts","./node_modules/packages/router/src/router_module.ts","./src/modules/core/services/cookie/cookie.service.ts","./src/modules/common/pipes/intl-join.pipe.ts","./src/modules/common/utils/form-utils.ts","./src/modules/booking-widget/interfaces/booking-widget.interface.ts","./src/modules/core/constants.ts","./src/modules/common-booking/components/flight-review-card/flight-review-card.component.html","./src/modules/common-booking/components/flight-review-card/flight-review-card.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/Immediate.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/asap.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/AsapAction.ts","./node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/Notification.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/groupBy.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/models.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effect_creator.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/utils.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_resolver.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_metadata.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/materialize.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_error_handler.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/actions.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/tokens.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_actions.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/lifecycle_hooks.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effect_sources.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effect_notification.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/dematerialize.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_runner.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_root_module.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_feature_module.ts","./node_modules/.pnpm/@ngrx+effects@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__@ngrx+store@17.2.0_@ang_ebeobvcigafxafwjqgv5swklsy/modules/effects/src/effects_module.ts","./src/modules/ui-components/components/icons/services/icons.service.ts","./src/modules/common-booking/utils/date-utils.ts","./src/modules/booking-widget/services/booking-widget.service.ts","./src/modules/common/services/phone-prefix/phone-prefix.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/arrRemove.ts","./src/modules/common-booking/components/section-review/section-review-item.component.html","./src/modules/common-booking/components/section-review/section-review-item.component.ts","./src/modules/dapi/api/services/emergency-contact.service.ts","./src/modules/booking-widget/utils/utils.am.ts","./src/modules/booking-widget/services/booking-widget-am.service.ts","./src/modules/booking-widget/utils/utils.pax-amount.ts","./src/modules/booking-widget/components/air-calendar/air-calendar.component.html","./src/modules/booking-widget/components/air-calendar/air-calendar.component.ts","./src/modules/booking-widget/components/am-booking-widget/am-booking-widget.component.html","./src/modules/booking-widget/components/am-booking-widget/am-booking-widget.component.ts","./src/modules/booking-widget/components/cartrawler-booking-widget/cartrawler-booking-widget.component.ts","./src/modules/booking-widget/components/cartrawler-booking-widget/cartrawler-booking-widget.component.html","./src/modules/booking-widget/components/am-duration-selector/am-duration-selector.component.html","./src/modules/booking-widget/components/am-duration-selector/am-duration-selector.component.ts","./src/modules/booking-widget/components/am-room-selector/am-room-selector.component.html","./src/modules/booking-widget/components/am-room-selector/am-room-selector.component.ts","./src/modules/booking-widget/components/booking-widget-selector/booking-widget-selector.component.html","./src/modules/booking-widget/components/booking-widget-selector/booking-widget-selector.component.ts","./src/modules/booking-widget/components/pax-amount-selector/pax-amount-selector.component.html","./src/modules/booking-widget/components/pax-amount-selector/pax-amount-selector.component.ts","./src/modules/booking-widget/components/trip-type-selector/trip-type-selector.component.html","./src/modules/booking-widget/components/trip-type-selector/trip-type-selector.component.ts","./src/modules/booking-widget/components/location-selector/location-selector.component.html","./src/modules/booking-widget/components/location-selector/location-selector.component.ts","./src/modules/booking-widget/components/discount-code/discount-code.component.html","./src/modules/booking-widget/components/discount-code/discount-code.component.ts","./src/modules/booking-widget/components/booking-widget-notification/booking-widget-notification.component.html","./src/modules/booking-widget/components/booking-widget-notification/booking-widget-notification.component.ts","./src/modules/booking-widget/components/previous-searches/previous-searches.component.html","./src/modules/booking-widget/components/previous-searches/previous-searches.component.ts","./src/modules/booking-widget/components/booking-widget-common/booking-widget-common.component.html","./src/modules/booking-widget/components/booking-widget-common/booking-widget-common.component.ts","./src/modules/booking-widget/components/multicity-selector/multicity-selector.component.html","./src/modules/booking-widget/components/multicity-selector/multicity-selector.component.ts","./src/modules/booking-widget/components/am-dates-selector/am-dates-selector.component.html","./src/modules/booking-widget/components/am-dates-selector/am-dates-selector.component.ts","./src/modules/booking-widget/booking-widget.module.ts","./src/modules/booking-widget/store/constants.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/zip.ts","./src/modules/common/components/country-and-language-selector/country-and-language-selector.component.html","./src/modules/common/components/country-and-language-selector/country-and-language-selector.component.ts","./src/modules/common-booking/components/login-promotion/login-promotion.component.html","./src/modules/common-booking/components/login-promotion/login-promotion.component.ts","./src/modules/dapi/api/services/advance-passenger-information.service.ts","./src/modules/common/pipes/msg-format.pipe.ts","./src/modules/common-booking/components/inform-block/inform-block.component.html","./src/modules/common-booking/components/inform-block/inform-block.component.ts","./src/modules/common/interfaces/booking/booking-step.interface.ts","./src/modules/common/services/media-query/media-query.service.ts","./src/modules/cms/components/booking-entry/booking-entry.component.ts","./src/modules/cms/components/booking-entry/booking-entry.component.html","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/filter.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/forkJoin.ts","./src/modules/common-booking/components/section-review/section-review.component.html","./src/modules/common-booking/components/section-review/section-review.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/pluck.ts","./node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/retryWhen.ts","./src/modules/common-booking/modules/ancillaries/interfaces/ancillaries-interface.ts","./node_modules/src/material/autocomplete/autocomplete.ts","./node_modules/src/material/autocomplete/autocomplete.html","./node_modules/src/material/autocomplete/animations.ts","./node_modules/src/material/autocomplete/autocomplete-origin.ts","./node_modules/src/material/autocomplete/autocomplete-trigger.ts","./node_modules/src/material/autocomplete/module.ts","./src/modules/ui-components/components/popover/service/popover.service.ts","./src/modules/common/pipes/pipes.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts","./src/modules/service-forms/service-forms.module.ts","./src/modules/ui-components/components/buttons/cta-button/enums.ts","./src/modules/booking/modules/pax-details/components/corporate-passenger-search/corporate-passenger-search.component.html","./src/modules/booking/modules/pax-details/components/corporate-passenger-search/corporate-passenger-search.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/race.ts","./src/modules/common-booking/components/itinerary/bound-header/itinerary-timeline-bound-header.component.html","./src/modules/common-booking/components/itinerary/bound-header/itinerary-timeline-bound-header.component.ts","./src/modules/common-booking/components/itinerary/layover/itinerary-timeline-layover.component.html","./src/modules/common-booking/components/itinerary/layover/itinerary-timeline-layover.component.ts","./src/modules/common-booking/components/itinerary/leg-endpoint/leg-endpoint.component.html","./src/modules/common-booking/components/itinerary/leg-endpoint/leg-endpoint.component.ts","./src/modules/common-booking/components/itinerary/leg-technical-stops/leg-technical-stops.component.html","./src/modules/common-booking/components/itinerary/leg-technical-stops/leg-technical-stops.component.ts","./src/modules/common-booking/components/itinerary/flight/itinerary-timeline-flight.component.html","./src/modules/common-booking/components/itinerary/flight/itinerary-timeline-flight.component.ts","./src/modules/common-booking/components/login-promotion/greeting-card/greeting-card.component.ts","./src/modules/common-booking/components/login-promotion/greeting-card/greeting-card.component.html","./src/modules/common-booking/components/passenger-info-renewed/passenger-info-renewed.component.html","./src/modules/common-booking/components/passenger-info-renewed/passenger-info-renewed.component.ts","./src/modules/common-booking/components/refund-detail/refund-price-breakdown/refund-price-breakdown.component.html","./src/modules/common-booking/components/refund-detail/refund-price-breakdown/refund-price-breakdown.component.ts","./src/modules/common-booking/components/ufo-with-modify-button/ufo-with-modify-button.component.html","./src/modules/common-booking/components/ufo-with-modify-button/ufo-with-modify-button.component.ts","./src/modules/common-booking/components/flight-selection/fare-family-list-option/fare-family-list-option.component.html","./src/modules/common-booking/components/flight-selection/fare-family-list-option/fare-family-list-option.component.ts","./src/modules/common-booking/common-booking.module.ts","./src/modules/core/services/cms/cms-data.service.ts","./src/modules/ui-components/components/modal/modal.module.ts","./src/modules/common-booking/components/sub-header/sub-header.component.html","./src/modules/common-booking/components/sub-header/sub-header.component.ts","./src/modules/common/multivariate-test/multivariate-test.module.ts","./node_modules/.pnpm/qs@6.14.0/node_modules/qs/lib/index.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/subscribeOn.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/from.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/scheduled.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts","./src/modules/common/services/navigated-path-to-content-wrapper/navigated-path-to-content-wrapper.service.ts","./src/modules/common/services/navigation-menu/navigation-menu.service.ts","./src/modules/common/services/toaster/toaster.service.ts","./src/modules/common/services/cms/page.service.ts","./src/modules/common/interfaces/recommendation.interface.ts","./src/modules/common/services/recommendation/recommendation.service.ts","./src/modules/common/services/fragments/fragment.service.ts","./src/modules/common/services/welcome-back-message/welcome-back-message.service.ts","./src/modules/common/services/hotjar/hotjar.service.ts","./src/modules/common/services/loyalty-tier/loyalty-tier.service.ts","./src/modules/common/services/user-agent/user-agent.service.ts","./src/modules/common/utils/flight-search.utils.ts","./src/modules/common/services/price-calendar/price-calendar.service.ts","./src/modules/dapi/api/models/category.ts","./src/modules/core/utils/replaceMsgFormat.ts","./src/modules/ui-components/directives/click-outside/click-outside-directive.module.ts","./src/modules/service-forms/services/submit.service.ts","./src/modules/service-forms/services/prefill.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/startWith.ts","./src/modules/loyalty-core/utils/page-metadata.utils.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js","./src/modules/destination-search/interfaces/destination-search-filter.interface.ts","./src/modules/common/components/header/campaign-banner/campaign-banner.component.html","./src/modules/common/components/header/campaign-banner/campaign-banner.component.ts","./src/modules/common/directives/click-outside.directive.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/queue.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/QueueAction.ts","./src/modules/ui-components/components/popover/component/popover.component.html","./src/modules/ui-components/components/popover/component/popover.component.ts","./node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js","./src/modules/common/store/constants.ts","./src/modules/ui-components/components/tabs/tab/tab.component.ts","./src/modules/ui-components/components/tabs/tab/tab.component.html","./src/modules/ui-components/components/tag/tag.module.ts","./src/modules/ui-components/components/buttons/icon-button/enums.ts","./src/modules/ui-components/components/forms/text-input/text-input.component.html","./src/modules/ui-components/components/forms/text-input/text-input.component.ts","./src/modules/manage-booking-common/utils/order-utils.ts","./src/modules/manage-booking-common/utils/bound-utils.ts","./src/modules/dapi/api/dapi-request-builder.ts","./src/modules/common-booking/services/booking-order.service.ts","./src/modules/common/components/base-layout/base-layout.component.html","./src/modules/common/components/base-layout/base-layout.component.ts","./src/modules/common/components/base-layout/base-layout.module.ts","./src/modules/ui-components/directives/trap-focus/trap-focus.directive.ts","./src/modules/core-api/interfaces/cms-interface.ts","./node_modules/.pnpm/call-bound@1.0.3/node_modules/call-bound/index.js","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/switchMapTo.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/tap.ts","./src/modules/ui-components/components/carousel/carousel.module.ts","./src/modules/common/components/header/navigation-trigger.module.ts","./src/modules/cms/services/template/data-mappers.ts","./src/modules/cms/services/external-template/external-template.service.ts","./src/modules/cms/services/cms-3d-seat-map/interfaces.ts","./src/modules/cms/services/cms-3d-seat-map/cms-3d-seat-map.service.ts","./src/modules/cms/components/continue-reading/cms-show-more.component.ts","./src/modules/cms/components/continue-reading/cms-show-more.component.html","./src/modules/common/enums.ts","./src/modules/core-api/services/response-code-handler.service.ts","./src/modules/core-api/utils/isCmsArticle.util.ts","./src/modules/ui-components/components/icons/icons.config.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/throttleTime.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/throttle.ts","./src/modules/rx/operators/finShare.ts","./src/modules/cms/components/components/cms-travel-guide.component.html","./src/modules/cms/components/components/cms-travel-guide.component.ts","./src/modules/ui-components/components/buttons/button.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/iif.ts","./src/modules/common-booking/components/flight-selection/fare-family-details/fare-family-details.component.html","./src/modules/common-booking/components/flight-selection/fare-family-details/fare-family-details.component.ts","./src/modules/common-booking/store/selectors/services.selector.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/catchError.ts","./src/modules/ui-components/components/progress-indicator/progress-indicator.module.ts","./src/modules/ui-components/components/pagination/pagination.module.ts","./src/modules/ui-components/components/table/table.module.ts","./src/modules/ui-components/components/filters/filters.module.ts","./src/modules/ui-components/components/product-variants/titled-card.module.ts","./src/modules/ui-components/ui-components.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts","./src/modules/ui-components/components/datepicker/datepicker.module.ts","./node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js","./src/modules/loyalty-core/store/reducers/trips.reducer.ts","./src/modules/loyalty-core/store/reducers/milestones.reducer.ts","./src/modules/loyalty-core/store/reducers/index.ts","./src/modules/loyalty-core/store/effects/trips.effects.ts","./src/modules/loyalty-core/loyalty-core.module.ts","./src/modules/ond-marketing-landing-core/ond-marketing-landing-core.module.ts","./src/modules/common/directives/focus.directive.ts","./src/modules/core/utils/format.ts","./src/modules/cms/components/footer-offer/footer-offer.component.html","./src/modules/cms/components/footer-offer/footer-offer.component.ts","./node_modules/src/cdk/bidi/dir-document-token.ts","./node_modules/src/cdk/bidi/directionality.ts","./node_modules/src/cdk/bidi/bidi-module.ts","./src/modules/common-booking/components/additional-email/additional-email.component.html","./src/modules/common-booking/components/additional-email/additional-email.component.ts","./src/modules/common-booking/manage-booking-config.ts","./src/modules/common/config/booking-config.ts","./src/modules/booking-widget/components/global-booking-widget-summary-header/global-booking-widget-summary-header.component.html","./src/modules/booking-widget/components/global-booking-widget-summary-header/global-booking-widget-summary-header.component.ts","./node_modules/src/cdk/keycodes/keycodes.ts","./node_modules/src/cdk/keycodes/modifiers.ts","./src/modules/cms/services/template/cms-template.service.ts","./src/modules/common/interfaces/breakpoint.interface.ts","./node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js","./src/modules/common/pipes/to-observable.pipe.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/combineLatest.ts","./src/modules/booking-widget/services/booking-widget-trip.service.ts","./src/modules/booking-widget/utils/utils.gtm.ts","./src/modules/booking/modules/ancillaries/services/ancillary.service.ts","./src/modules/common/store/selectors/global-booking.selectors.ts","./src/modules/ui-components/components/icons/enums.ts","./src/modules/ui-components/components/icons/services/icons-preload.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/Subscription.ts","./src/modules/common-booking/components/passenger-info/passenger-info.component.html","./src/modules/common-booking/components/passenger-info/passenger-info.component.ts","./src/modules/common/directives/scrolled-past.service.ts","./src/modules/common/directives/scrolled-past.directive.ts","./src/modules/common-booking/components/flight-selection/fare-family-option/fare-family-option.component.html","./src/modules/common-booking/components/flight-selection/fare-family-option/fare-family-option.component.ts","./node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","./src/modules/cms/components/components/cms-page.component.ts","./src/modules/common-booking/store/actions/redirect.actions.ts","./src/modules/reaccommodation/utils/bound.utils.ts","./src/modules/loyalty-core/interfaces/store.interface.ts","./src/modules/common/components/images/block-image.component.ts","./src/modules/common/components/images/block-image.component.html","./src/modules/ui-components/directives/trap-focus/trap-focus.module.ts","./src/modules/common/components/cms/content-with-modal/content-with-modal.component.html","./src/modules/common/components/cms/content-with-modal/content-with-modal.component.ts","./src/modules/common-booking/components/flight-selection/upsell-option/upsell-option.component.html","./src/modules/common-booking/components/flight-selection/upsell-option/upsell-option.component.ts","./src/modules/core/utils/cms-data-utils.ts","./src/modules/cms/components/components/cms-full-width-booking-widget/cms-full-width-booking-widget.component.ts","./src/modules/cms/components/components/cms-full-width-booking-widget/cms-full-width-booking-widget.component.html","./src/modules/cms/components/link-block/link-block.component.html","./src/modules/cms/components/link-block/link-block.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/timeout.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/debounceTime.ts","./src/modules/cms/components/components/cms-text-on-image.component.html","./src/modules/cms/components/components/cms-text-on-image.component.ts","./src/modules/ui-components/components/interfaces.ts","./node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js","./src/modules/common-booking/components/purchase-checkout/purchase-checkout.component.ts","./src/modules/common-booking/components/purchase-checkout/purchase-checkout.component.html","./src/modules/common-booking/components/itinerary/itinerary-timeline.component.html","./src/modules/common-booking/components/itinerary/itinerary-timeline.component.ts","./src/modules/core/interfaces/triptype.interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/config.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/skip.ts","./src/modules/ui-components/components/table/table.component.html","./src/modules/ui-components/components/table/table.component.ts","./src/modules/common/pipes/date-format.pipe.ts","./src/modules/common-booking/utils/payment.utils.ts","./src/modules/cms/services/content-services.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/pairwise.ts","./src/modules/ui-components/components/forms/checkbox/checkbox.component.html","./src/modules/ui-components/components/forms/checkbox/checkbox.component.ts","./src/modules/common/components/trip-location-info/trip-location-info.component.html","./src/modules/common/components/trip-location-info/trip-location-info.component.ts","./src/modules/booking/store/selectors/booking-feature-state.selector.ts","./src/modules/voluntary-change/enums.ts","./src/modules/cms/services/newsletter-signup/newsletter-signup.service.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/throwError.ts","./src/modules/ui-components/components/tabs/tabs/tabs.component.html","./src/modules/ui-components/components/tabs/tabs/tabs.component.ts","./src/modules/booking-widget/components/booking-widget/booking-widget.component.html","./src/modules/booking-widget/components/booking-widget/booking-widget.component.ts","./src/modules/common/gtm/gtm.module.ts","./src/modules/ui-components/utils/string.utils.ts","./node_modules/packages/common/http/src/backend.ts","./node_modules/packages/common/http/src/headers.ts","./node_modules/packages/common/http/src/params.ts","./node_modules/packages/common/http/src/context.ts","./node_modules/packages/common/http/src/request.ts","./node_modules/packages/common/http/src/response.ts","./node_modules/packages/common/http/src/client.ts","./node_modules/packages/common/http/src/fetch.ts","./node_modules/packages/common/http/src/interceptor.ts","./node_modules/packages/common/http/src/xhr.ts","./node_modules/packages/common/http/src/xsrf.ts","./node_modules/packages/common/http/src/provider.ts","./node_modules/packages/common/http/src/transfer_cache.ts","./src/modules/common/utils/booking-common.utils.ts","./src/modules/loyalty-personalization/services/personalization-tracking.service.ts","./src/modules/common/pipes/empty.pipe.ts","./src/modules/core/services/config/config.service.ts","./src/modules/ui-components/components/buttons/icon-button/icon-button.component.html","./src/modules/ui-components/components/buttons/icon-button/icon-button.component.ts","./src/modules/cms/components/components/cms-teaser.component.html","./src/modules/cms/components/components/cms-teaser.component.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/Subject.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isPromise.ts","./src/modules/common/forms/input-checkbox.component.html","./src/modules/common/forms/input-checkbox.component.ts","./src/modules/common-booking/store/constants.ts","./src/modules/service-forms-lazy/utils/utils.ts","./src/modules/common/interfaces/component-types.interface.ts","./src/modules/common/interfaces/consents.interface.ts","./src/modules/common/interfaces/datacloud-interface.ts","./src/modules/common/interfaces/deeplink.interface.ts","./src/modules/common/interfaces/images.interface.ts","./src/modules/common/interfaces/join-finnair-plus.interface.ts","./src/modules/common/interfaces/multivariate-test.interface.ts","./src/modules/common/interfaces/utils.interface.ts","./src/modules/common/interfaces/loyalty-tier.interface.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/EmptyError.ts","./src/modules/cms/components/components/cms-offers-grid.component.ts","./src/modules/ui-translate/pipes/plural-localization.pipe.ts","./src/modules/common/login/services/utils.ts","./src/modules/common-booking/components/country-selection/country-selection.component.html","./src/modules/common-booking/components/country-selection/country-selection.component.ts","./src/modules/ui-components/components/tabs/tabs.module.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/executeSchedule.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/mapTo.ts","./src/modules/common-booking/modules/ancillaries/services/common-booking-ancillary.service.ts","./src/modules/core/interfaces/tier-benefit.interface.ts","./src/modules/common/pipes/resolve-links.pipe.ts","./src/modules/reaccommodation/interfaces/stage.interface.ts","./src/modules/ui-components/components/tag/tag.component.ts","./src/modules/ui-components/components/tag/tag.component.html","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/util/isInteropObservable.ts","./src/modules/common/pipes/safe.pipe.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/switchMap.ts","./src/modules/ui-components/utils/date.interface.ts","./src/modules/ui-components/components/datepicker/services/calendar.service.ts","./src/modules/cms/components/components/cms-global-disruption-banner.component.html","./src/modules/cms/components/components/cms-global-disruption-banner.component.ts","./src/modules/booking/utils/cart-data.utils.ts","./src/modules/booking/utils/common-data.utils.ts","./src/modules/booking/utils/offer.utils.ts","./src/modules/booking/utils/selection-utils.ts","./src/modules/app/client-init.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/actions.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/config.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/utils.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/zone-config.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/devtools-dispatcher.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/extension.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/reducer.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/devtools.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/provide-store-devtools.ts","./node_modules/.pnpm/@ngrx+store-devtools@17.2.0_@ngrx+store@17.2.0_@angular+core@18.2.13_rxjs@7.8.2_zone.js@0.15.0__rxjs@7.8.2__rxjs@7.8.2/modules/store-devtools/src/instrument.ts","./src/modules/common/login/marketing-preferences.module.ts","./src/modules/common/components/toaster/toaster.module.ts","./src/modules/ui-components/components/icons/services/client-icons.service.ts","./src/modules/app/app/app.component.html","./src/modules/app/app/app.component.ts","./node_modules/packages/animations/browser/src/error_helpers.ts","./node_modules/packages/animations/browser/src/render/shared.ts","./node_modules/packages/animations/browser/src/render/animation_driver.ts","./node_modules/packages/animations/browser/src/dsl/style_normalization/animation_style_normalizer.ts","./node_modules/packages/animations/browser/src/util.ts","./node_modules/packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts","./node_modules/packages/animations/browser/src/dsl/animation_transition_expr.ts","./node_modules/packages/animations/browser/src/dsl/animation_ast_builder.ts","./node_modules/packages/animations/browser/src/dsl/animation_timeline_instruction.ts","./node_modules/packages/animations/browser/src/dsl/element_instruction_map.ts","./node_modules/packages/animations/browser/src/dsl/animation_timeline_builder.ts","./node_modules/packages/animations/browser/src/dsl/animation_transition_instruction.ts","./node_modules/packages/animations/browser/src/dsl/animation_transition_factory.ts","./node_modules/packages/animations/browser/src/dsl/animation_trigger.ts","./node_modules/packages/animations/browser/src/render/timeline_animation_engine.ts","./node_modules/packages/animations/browser/src/render/transition_animation_engine.ts","./node_modules/packages/animations/browser/src/render/animation_engine_next.ts","./node_modules/packages/animations/browser/src/render/special_cased_styles.ts","./node_modules/packages/animations/browser/src/render/web_animations/web_animations_player.ts","./node_modules/packages/animations/browser/src/render/web_animations/web_animations_driver.ts","./node_modules/packages/animations/browser/src/render/renderer.ts","./node_modules/packages/animations/browser/src/render/animation_renderer.ts","./node_modules/packages/platform-browser/animations/src/providers.ts","./node_modules/packages/platform-browser/animations/src/module.ts","./src/modules/common/components/cookie-policy/cookie-policy.module.ts","./src/modules/core/store/storage-versions.ts","./src/modules/core/reducers/language.reducer.ts","./src/modules/core/reducers/login.reducer.ts","./src/modules/core/reducers/navigator.reducer.ts","./src/modules/core/reducers/pseudo-local.reducer.ts","./src/modules/core/reducers/root.reducer.ts","./src/modules/core/store/state-tree.module.ts","./src/modules/dapi/api/instantsearch-api.module.ts","./src/modules/app/app/language-setting-layout.component.ts","./src/modules/app/app/language-setting-layout.component.html","./src/modules/app/app/lang.guard.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/observable/connectable.ts","./src/modules/common/components/cookie-policy/cookie-settings.component.html","./src/modules/common/components/cookie-policy/cookie-settings.component.ts","./src/modules/common/components/cookie-policy/cookie-policy.component.html","./src/modules/common/components/cookie-policy/cookie-policy.component.ts","./src/modules/common/components/toaster/toaster.component.html","./src/modules/common/components/toaster/toaster.component.ts","./src/modules/app/app/language-setting-root.component.ts","./src/modules/app/app/language-setting-root.component.html","./src/modules/app/app/language-setting-layout.module.ts","./src/modules/app/app/app.routes.ts","./src/modules/core/services/language/cms-localization.provider.ts","./src/modules/common/interceptors/datadog-headers.interceptor.ts","./src/modules/core/interceptors/dapi-uat-interceptor.ts","./src/modules/core/interceptors/error.interceptor.ts","./src/modules/core/interceptors/dapi-headers-interceptor.ts","./src/modules/app/services/client-gtm.service.ts","./src/modules/app/services/client-datacloud.service.ts","./src/modules/app/app/providers.ts","./src/modules/app/app/app.module.ts","./src/modules/app/services/client-login.service.ts","./src/modules/app/app/client.module.ts","./src/main.ts","./node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/src/internal/operators/retry.ts","./src/modules/ui-translate/pipes/has-localization-key.pipe.ts","./src/modules/cms/components/accordion/cms-accordion.component.html","./src/modules/cms/components/accordion/cms-accordion.component.ts","./src/modules/common/utils/language.utils.ts","./src/modules/cms/components/offers/offer-grid.component.html","./src/modules/cms/components/offers/offer-grid.component.ts","./node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","./src/modules/ui-components/components/notifications/notifications.module.ts","./src/modules/common/utils/histogram.utils.ts","./src/modules/common/components/histogram/histogram.component.html","./src/modules/common/components/histogram/histogram.component.ts","./src/modules/common/components/booking-header-summary-item/booking-header-summary-item.component.html","./src/modules/common/components/booking-header-summary-item/booking-header-summary-item.component.ts","./src/modules/common/components/components.module.ts","./node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js","./node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js","./src/modules/service-forms/components/common/form-input-checkbox-list.component.html","./src/modules/service-forms/components/common/form-input-checkbox-list.component.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { ElementRef, Inject, Injectable } from '@angular/core';\n\nimport { fromEvent, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { WindowRef } from '@fcom/core';\nimport { findScrollContainer } from '@fcom/core/utils';\n\nconst HEADER_OFFSET = 40;\nconst ease = (t: number): number => 1 + --t * t * t * t * t;\n\nconst trimOffsets = (rect: ClientRect, parentRect: ClientRect): ClientRect => {\n return {\n ...rect,\n top: rect.top - parentRect.top,\n bottom: rect.bottom - parentRect.top,\n };\n};\n\nconst getNativeElement = (target: ElementRef | HTMLElement) => {\n if (target instanceof HTMLElement) {\n return target;\n }\n return target.nativeElement;\n};\n\ntype ScrollPosition = 'start' | 'center' | 'end';\n\ninterface ScrollOptions {\n duration?: number;\n offsetX?: number;\n offsetY?: number;\n edgeX?: ScrollPosition;\n edgeY?: ScrollPosition;\n container?: HTMLElement;\n}\n\nconst defaultScrollOptions: ScrollOptions = {\n duration: 500,\n edgeX: 'start',\n edgeY: 'start',\n offsetX: 0,\n offsetY: 0,\n};\n\n@Injectable()\nexport class ScrollService {\n static readonly INVALID_INPUT_SELECTOR =\n 'input.ng-invalid.ng-touched, select.ng-invalid.ng-touched, textarea.ng-invalid.ng-touched';\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private windowRef: WindowRef\n ) {}\n\n scrollToImmediate(\n target: ElementRef | HTMLElement,\n offset = 0,\n includeHeaderHeight = false,\n smoothScroll = false\n ): void {\n const minusOffset: number = includeHeaderHeight ? HEADER_OFFSET + offset : offset;\n const scrollContainer = this.resolveScrollContainer(target);\n const [, scrollTop] = this.resolveScrollPositions(scrollContainer, target, {\n ...defaultScrollOptions,\n offsetY: minusOffset,\n });\n\n if (smoothScroll) {\n this.smoothScroll(target, {\n ...defaultScrollOptions,\n offsetY: minusOffset,\n });\n } else {\n this.setScroll(scrollContainer, scrollTop);\n this.dispatchScrollEvent(scrollContainer);\n }\n }\n\n smoothScroll(target: ElementRef | HTMLElement, scrollOptions: ScrollOptions = {}): void {\n const useScrollOptions = { ...defaultScrollOptions, ...scrollOptions };\n const { duration, container } = useScrollOptions;\n const containerToUse = container ?? this.resolveScrollContainer(target);\n const [scrollLeft, scrollTop] = this.resolveScrollPositions(containerToUse, target, useScrollOptions);\n this.smoothAnimate(\n containerToUse,\n duration,\n Date.now(),\n containerToUse.scrollLeft,\n containerToUse.scrollTop,\n scrollLeft,\n scrollTop\n );\n }\n\n listen(element: ElementRef | HTMLElement, shouldFindScrollContainer = true): Observable {\n const nativeElement = getNativeElement(element);\n const scrollContainer = shouldFindScrollContainer\n ? findScrollContainer(nativeElement) || this.document.documentElement\n : nativeElement;\n return fromEvent(this.findEventContainer(scrollContainer), 'scroll').pipe(\n map(() =>\n this.isHtmlEvent(scrollContainer)\n ? nativeElement.getBoundingClientRect()\n : trimOffsets(nativeElement.getBoundingClientRect(), scrollContainer.getBoundingClientRect())\n )\n );\n }\n\n scrollToFirstInvalidInput(element: ElementRef | HTMLElement, offset = 0, smoothScroll = false): void {\n const nativeElement = getNativeElement(element);\n const firstInvalidElement = nativeElement.querySelector(ScrollService.INVALID_INPUT_SELECTOR);\n if (firstInvalidElement) {\n if (smoothScroll) {\n this.scrollToImmediate(firstInvalidElement, offset, false, true);\n } else {\n this.scrollToImmediate(firstInvalidElement, offset);\n }\n } else {\n console.log(`WARN: no invalid input found with selector ${ScrollService.INVALID_INPUT_SELECTOR}`);\n }\n }\n\n scrollTop(): void {\n this.windowRef.nativeWindow.scrollTo(0, 0);\n }\n\n private smoothAnimate(\n container: HTMLElement,\n duration: number,\n startTime: number,\n startX: number,\n startY: number,\n xToScroll: number,\n yToScroll: number\n ): void {\n const time = Date.now();\n const elapsed = Math.min((time - startTime) / duration, 1);\n const currentEase = ease(elapsed);\n const currentX = startX + (xToScroll - startX) * currentEase;\n const currentY = startY + (yToScroll - startY) * currentEase;\n\n this.setScroll(container, currentY, currentX);\n\n if (currentX !== xToScroll || currentY !== yToScroll) {\n requestAnimationFrame(() =>\n this.smoothAnimate(container, duration, startTime, startX, startY, xToScroll, yToScroll)\n );\n }\n }\n\n private resolveScrollContainer(target: ElementRef | HTMLElement) {\n const nativeElement = getNativeElement(target);\n return findScrollContainer(nativeElement) || this.document.documentElement;\n }\n\n private resolveScrollPositions(\n container: HTMLElement,\n target: ElementRef | HTMLElement,\n scrollOptions: ScrollOptions\n ): [number, number] {\n const nativeElement = getNativeElement(target);\n const viewportHeight = this.getViewPortHeight(container);\n const targetRect = nativeElement.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n const containerOffsetTop: number = this.isHtmlEvent(container) ? 0 : containerRect.top;\n\n const [containerScrollLeft, containerScrollTop] = this.getScrollPosition(container);\n\n const scrollLeft = this.resolveX(containerScrollLeft, containerRect, targetRect, scrollOptions);\n const scrollTop = this.resolveY(containerOffsetTop, viewportHeight, containerScrollTop, targetRect, scrollOptions);\n\n return [scrollLeft, scrollTop];\n }\n\n private resolveX(\n containerScrollLeft: number,\n containerRect: DOMRect,\n targetRect: DOMRect,\n { offsetX, edgeX }: ScrollOptions\n ): number {\n const elementLeft = targetRect.left - containerRect.left;\n const [containerEdge, targetEdge] = this.resolveEdgeX(containerRect, targetRect, edgeX);\n\n const elementRelativeEdge = elementLeft + targetEdge;\n const scrollChange = elementRelativeEdge - containerEdge;\n\n return containerScrollLeft + scrollChange + offsetX;\n }\n\n private resolveEdgeX(containerRect: DOMRect, targetRect: DOMRect, edgeX: ScrollPosition): [number, number] {\n if (edgeX === 'center') {\n return [containerRect.width / 2, targetRect.width / 2];\n } else if (edgeX === 'end') {\n return [containerRect.width, targetRect.width];\n } else {\n return [0, 0];\n }\n }\n\n private resolveY(\n containerOffsetTop: number,\n viewPortHeight: number,\n containerScrollTop: number,\n targetRect: DOMRect,\n { offsetY, edgeY }: ScrollOptions\n ): number {\n const [containerEdge, targetEdge] = this.resolveEdgeY(viewPortHeight, targetRect, edgeY);\n return containerScrollTop - containerOffsetTop + targetRect.top - containerEdge + targetEdge - offsetY;\n }\n\n private resolveEdgeY(viewPortHeight: number, targetRect: DOMRect, edgeY: ScrollPosition): [number, number] {\n if (edgeY === 'center') {\n return [viewPortHeight / 2, targetRect.height / 2];\n } else if (edgeY === 'end') {\n return [viewPortHeight, targetRect.height];\n } else {\n return [0, 0];\n }\n }\n\n private getScrollPosition(container: HTMLElement): [number, number] {\n // For Microsoft Edge we need to read the scrollTop from document.body\n const currentScrollTop: number =\n container.parentNode instanceof Document\n ? container.scrollTop ||\n (this.document.body.parentNode as HTMLElement).scrollTop ||\n this.document.body.scrollTop\n : container.scrollTop;\n\n const currentScrollLeft: number =\n container.parentNode instanceof Document\n ? container.scrollLeft ||\n (this.document.body.parentNode as HTMLElement).scrollLeft ||\n this.document.body.scrollLeft\n : container.scrollLeft;\n\n return [currentScrollLeft, currentScrollTop];\n }\n\n private setScroll(scrollContainer: HTMLElement, newScrollTopValue: number, newScrollLeftValue?: number): void {\n // Fix for Microsoft Edge scrollTop not working in the html element\n if (scrollContainer.parentNode instanceof Document) {\n scrollContainer.parentNode.defaultView.scrollTo(newScrollLeftValue ?? 0, newScrollTopValue);\n } else {\n scrollContainer.scrollTop = newScrollTopValue;\n if (newScrollLeftValue) {\n scrollContainer.scrollLeft = newScrollLeftValue;\n }\n }\n }\n\n private isHtmlEvent(scrollContainer: HTMLElement): boolean {\n return scrollContainer === this.document.documentElement;\n }\n\n private findEventContainer(scrollContainer: HTMLElement): HTMLElement | Window {\n return this.isHtmlEvent(scrollContainer) ? this.windowRef.nativeWindow : scrollContainer;\n }\n\n private dispatchScrollEvent(scrollContainer: HTMLElement): void {\n const evt = this.document.createEvent('MouseEvent');\n evt.initEvent('scroll', true, true);\n scrollContainer.dispatchEvent(evt);\n }\n\n private getViewPortHeight(container: HTMLElement): number {\n if (this.isHtmlEvent(container)) {\n return this.windowRef.nativeWindow['visualViewport']?.height ?? this.windowRef.nativeWindow.innerHeight;\n }\n\n return container.getBoundingClientRect().height;\n }\n}\n","
\n \n

\n {{ content$ | finMap: 'teaserTitle' | async }}\n

\n
\n \n \n
\n
\n\n \n
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\n\nimport { Observable } from 'rxjs';\nimport { map, filter, startWith, switchMap, withLatestFrom } from 'rxjs/operators';\n\nimport { CmsCollection, CmsContent, CmsTemplate } from '@fcom/core-api';\nimport { safeMap } from '@fcom/core/utils';\nimport { SelectOption } from '@fcom/common/interfaces';\nimport { finShare } from '@fcom/rx';\n\n@Component({\n selector: 'cms-content-switcher-dropdown',\n templateUrl: './cms-content-switcher-dropdown.component.html',\n styleUrls: ['./cms-content-switcher-dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsContentSwitcherDropdownComponent implements OnInit {\n @Input()\n content$: Observable;\n\n contentOptions$: Observable;\n contentForm$: Observable;\n selectedContent$: Observable;\n\n constructor(private fb: UntypedFormBuilder) {}\n\n ngOnInit(): void {\n this.contentOptions$ = this.content$.pipe(\n map((c) =>\n c.items.map((ct) => ({\n name: ct.teaserTitle,\n value: ct.teaserTitle,\n }))\n )\n );\n\n const initialValue$ = this.content$.pipe(\n filter((c) => c.items.length > 0),\n map((c) => safeMap(c.items[0], (i) => i.teaserTitle))\n );\n\n this.contentForm$ = initialValue$.pipe(\n map((content) => this.fb.group({ content })),\n finShare()\n );\n\n this.selectedContent$ = this.contentForm$.pipe(\n withLatestFrom(initialValue$),\n switchMap(([contentForm, startValue]) => contentForm.get('content').valueChanges.pipe(startWith(startValue))),\n withLatestFrom(this.content$.pipe(map((c) => c.items))),\n map(([selectedContent, contentData]) =>\n contentData.find((item: CmsContent) => item.teaserTitle === selectedContent)\n ),\n filter(Boolean),\n map((template) => ({\n header: null,\n main: [template as CmsCollection],\n footer: null,\n }))\n );\n }\n}\n","
\n \n {{ legend }}\n *\n \n\n \n\n
\n \n {{ [translationPrefix, name, firstErrorKey(name)].join('.') | finLocalization }}\n \n
\n\n
\n
\n {{ [groupTranslationPrefix || translationPrefix, firstErrorKey()].join('.') | finLocalization }}\n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport { isPresent } from '@fcom/core/utils';\n\n@Component({\n selector: 'fin-form-group',\n styleUrls: ['form-group.component.scss'],\n templateUrl: 'form-group.component.html',\n})\nexport class FormGroupComponent {\n @Input()\n group: UntypedFormGroup | AbstractControl;\n @Input()\n names: string[];\n @Input()\n translationPrefix: string;\n @Input()\n groupTranslationPrefix: string;\n @Input()\n legend: string = undefined;\n @Input()\n inline = false;\n @Input()\n required: boolean;\n @Input()\n showOnlyGroupLevelErrors = false;\n\n firstErrorKey(name?: string): string {\n const errors = this.showOnlyGroupLevelErrors || !isPresent(name) ? this.group.errors : this.group.get(name).errors;\n\n if (!errors) {\n return undefined;\n }\n return Object.keys(errors).filter((k) => errors[k])[0];\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { CmsArticle } from '@fcom/core-api';\nimport { isNotBlank } from '@fcom/core/utils';\n\n@Component({\n selector: 'cms-icon-with-text',\n template:\n '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsIconWithTextComponent implements OnInit {\n @Input()\n content$: Observable;\n\n title$: Observable;\n icons$: Observable;\n\n ngOnInit(): void {\n this.title$ = this.content$.pipe(\n map((t) => t.teaserTitle),\n filter(isNotBlank)\n );\n\n this.icons$ = this.content$.pipe(\n map((content) => content.localSettings?.iconName),\n map((icon) => (Array.isArray(icon) ? icon : [icon])),\n map((icons) => icons.filter((x) => !!x)),\n filter((icons) => !!icons.length)\n );\n }\n}\n","/** @prettier */\nimport { MonoTypeOperatorFunction, SchedulerLike } from '../types';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Re-emits all notifications from source Observable with specified scheduler.\n *\n * Ensure a specific scheduler is used, from outside of an Observable.\n *\n * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule\n * notifications emitted by the source Observable. It might be useful, if you do not have control over\n * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless.\n *\n * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable,\n * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal\n * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits\n * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`.\n * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split\n * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source\n * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a\n * little bit more, to ensure that they are emitted at expected moments.\n *\n * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications\n * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn`\n * will delay all notifications - including error notifications - while `delay` will pass through error\n * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator\n * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used\n * for notification emissions in general.\n *\n * ## Example\n *\n * Ensure values in subscribe are called just before browser repaint\n *\n * ```ts\n * import { interval, observeOn, animationFrameScheduler } from 'rxjs';\n *\n * const someDiv = document.createElement('div');\n * someDiv.style.cssText = 'width: 200px;background: #09c';\n * document.body.appendChild(someDiv);\n * const intervals = interval(10); // Intervals are scheduled\n * // with async scheduler by default...\n * intervals.pipe(\n * observeOn(animationFrameScheduler) // ...but we will observe on animationFrame\n * ) // scheduler to ensure smooth animation.\n * .subscribe(val => {\n * someDiv.style.height = val + 'px';\n * });\n * ```\n *\n * @see {@link delay}\n *\n * @param scheduler Scheduler that will be used to reschedule notifications from source Observable.\n * @param delay Number of milliseconds that states with what delay every notification should be rescheduled.\n * @return A function that returns an Observable that emits the same\n * notifications as the source Observable, but with provided scheduler.\n */\nexport function observeOn(scheduler: SchedulerLike, delay = 0): MonoTypeOperatorFunction {\n return operate((source, subscriber) => {\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay),\n () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay),\n (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)\n )\n );\n });\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n QueryList,\n ViewChild,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { debounceTime } from 'rxjs/operators';\nimport { Subscription } from 'rxjs';\n\nimport { ScrollService } from '@fcom/common/services';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { Direction } from '../../interfaces';\n\nconst SCROLL_BUTTON_HIDE_MARGIN = 10;\n\n@Component({\n selector: 'fin-scroll-handle-container',\n templateUrl: './scroll-handle-container.component.html',\n styleUrls: ['./scroll-handle-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScrollHandleContainerComponent implements AfterViewInit, OnDestroy {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @ViewChild('container', { static: false, read: ElementRef }) container: ElementRef;\n @ViewChild('scrollHandleLeft', { static: false, read: ElementRef }) scrollHandleLeft: ElementRef;\n @ViewChild('scrollHandleRight', { static: false, read: ElementRef }) scrollHandleRight: ElementRef;\n\n @Input()\n elements: QueryList;\n\n @Input()\n disableKeyboardNavigation = false;\n\n @Output()\n scrollElements: EventEmitter = new EventEmitter();\n\n subscription: Subscription = new Subscription();\n\n constructor(private scrollService: ScrollService) {}\n\n ngAfterViewInit(): void {\n this.updateScrollHandles();\n const scrollListener$ = this.scrollService.listen(this.container, false);\n this.subscription.add(\n scrollListener$.pipe(debounceTime(100)).subscribe(() => {\n this.updateScrollHandles();\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n scrollToElement(element: ElementRef): void {\n if (!(element && element.nativeElement)) {\n return;\n }\n const container = this.container.nativeElement;\n this.scrollService.smoothScroll(element.nativeElement, { container, edgeX: 'center' });\n }\n\n updateScrollHandles(): void {\n const [showLeftScrollButton, showRightScrollButton] = this.getScrollHandlesVisibility();\n\n this.scrollHandleLeft.nativeElement.hidden = !showLeftScrollButton;\n this.scrollHandleRight.nativeElement.hidden = !showRightScrollButton;\n }\n\n scrollRight(): void {\n this.scrollElements.emit(Direction.RIGHT);\n this.scrollToElementByIndex(this.getVisibleElementIndex() + 1);\n }\n\n scrollLeft(): void {\n this.scrollElements.emit(Direction.LEFT);\n this.scrollToElementByIndex(this.getVisibleElementIndex() - 1);\n }\n\n private getScrollHandlesVisibility(): [boolean, boolean] {\n if (!this.container || !this.container.nativeElement) {\n return [false, false];\n }\n\n const element = this.container.nativeElement;\n const contentWidth = element.scrollWidth;\n const visibleWidth = element.offsetWidth;\n const scrollPosition = element.scrollLeft;\n\n const showLeftScrollButton: boolean = scrollPosition > SCROLL_BUTTON_HIDE_MARGIN;\n const showRightScrollButton: boolean = scrollPosition + visibleWidth < contentWidth - SCROLL_BUTTON_HIDE_MARGIN;\n\n return [showLeftScrollButton, showRightScrollButton];\n }\n\n // Get index of the element closest to the container center\n private getVisibleElementIndex(): number {\n const container = this.container.nativeElement;\n const containerRect = container.getBoundingClientRect();\n const containerCenter = containerRect.width / 2;\n const allChildren = this.elements?.toArray() || [];\n\n const sorted = [...allChildren]\n .map((cardElement: ElementRef, index) => {\n const cardRect = cardElement.nativeElement.getBoundingClientRect();\n const cardRelativeLeft = cardRect.left - containerRect.left;\n const cardRelativeCenter = cardRect.width / 2 + cardRelativeLeft;\n return {\n distanceToCenter: Math.abs(cardRelativeCenter - containerCenter),\n index,\n };\n })\n .sort((a, b) => a.distanceToCenter - b.distanceToCenter);\n\n return sorted.length ? sorted[0].index : 0;\n }\n\n private scrollToElementByIndex(index: number): void {\n const container = this.container.nativeElement;\n const targetElement: ElementRef = this.elements?.toArray()[index];\n if (targetElement) {\n this.scrollService.smoothScroll(targetElement.nativeElement, { container, edgeX: 'center' });\n }\n }\n}\n","
\n \n \n \n\n \n \n \n\n \n
\n","import { LanguageActions } from '@fcom/core/actions';\nimport { setIn, deleteIn, DataUtils } from '@fcom/core/utils';\n\nimport { LocationsState } from '../../interfaces';\nimport { LocationActions } from '../actions';\n\nexport const initialState: LocationsState = Object.seal({\n language: null,\n locations: {},\n search: {\n locations: [],\n input: null,\n },\n});\n\nexport function locationsReducer(state = initialState, action: LocationActions.LocationActionsUnion): LocationsState {\n switch (action.type) {\n case LanguageActions.setLanguage.type:\n if (action.language !== state.language) {\n return setIn(initialState, 'language', action.language);\n }\n return state;\n case LocationActions.storeLocationData.type:\n if (!action.location?.locationCode) {\n return state;\n }\n return setIn(state, ['locations', action.location.locationCode], action.location);\n case LocationActions.removeLocationData.type:\n if (!action.location?.locationCode) {\n return state;\n }\n return deleteIn(state, ['locations', action.location.locationCode]);\n case LocationActions.cleanLocationSearch.type:\n return setIn(state, 'search', { locations: [], input: null });\n case LocationActions.updateLocationSearch.type:\n if (!action.searchData) {\n return state;\n }\n return setIn(state, ['search', 'locations'], action.searchData);\n case LocationActions.updateLocationSearchInput.type:\n if (!action.input) {\n return state;\n } else if (state.search.input !== action.input) {\n // Reset locations if input changes\n return DataUtils.wrap(state)\n .setIn(['search', 'locations'], [])\n .setIn(['search', 'input'], action.input)\n .value();\n }\n return setIn(state, ['search', 'input'], action.input);\n default:\n return state;\n }\n}\n\nexport const getLocationData = (state: LocationsState, locationCode: string) =>\n state?.locations?.[locationCode] || null;\n","import { Inject, Injectable, OnDestroy, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser, Location } from '@angular/common';\n\nimport { Store } from '@ngrx/store';\nimport { asapScheduler, combineLatest, Observable, of, Subscription, zip } from 'rxjs';\nimport { catchError, map, skipWhile } from 'rxjs/operators';\n\nimport { LanguageService, TranslateOptions } from '@fcom/ui-translate';\nimport { finShare, snapshot } from '@fcom/rx';\n\nimport { getIn, replaceMsgFormat, ReplaceParams, unsubscribe } from '../../utils';\nimport { LanguageActions } from '../../actions';\nimport { AppState, DdsLanguage } from '../../interfaces';\nimport { currentLocalization, ddsLanguage, language, locale } from '../../selectors';\nimport { shouldISendCmsKeyMissingError } from '../../utils/cms-utils';\nimport { ConfigService } from '../config/config.service';\nimport { CookieService } from '../cookie/cookie.service';\nimport { SentryLogger } from '../sentry/sentry.logger';\nimport { LocalizationProvider } from './localization.provider';\nimport { I18nKey, i18nKeyToDataMap, I18nLazyLoadingPrefix } from '../cms/cms-data.service';\nimport { ddsLangToNewLang } from '../../selectors/dds-languages';\n\nconst COOKIE_KEY = 'FinnairComLanguagePreference';\n\n@Injectable()\nexport class FinLanguageService extends LanguageService implements OnDestroy {\n private readonly translateOptionsDefaults: Readonly = {\n logErrors: true,\n };\n\n private lang$: Observable;\n private localizations$: Observable;\n private locale$: Observable;\n private subscriptions = new Subscription();\n\n constructor(\n private store$: Store,\n private cookieService: CookieService,\n private localizationProvider: LocalizationProvider,\n private configService: ConfigService,\n private sentryLogger: SentryLogger,\n private location: Location,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n super();\n this.allowableLangs = Object.keys(this.configService.cfg.allowedLocales);\n this.lang$ = this.languageFromStore().pipe(finShare());\n this.localizations$ = this.store$.pipe(currentLocalization(), finShare());\n this.locale$ = this.localeFromStore().pipe(finShare());\n this.updateLocaleBasedOnLanguage(this.lang$);\n this.setInitialLanguageFromCookieOrPath();\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n verifyLangAllowed = (lang: string, throwExpection = true): boolean => {\n const isLangSupported = lang && this.allowableLangs.includes(lang);\n const isDdsLang = this.allowableLangs.includes(ddsLangToNewLang(this.location.path()));\n if (!(isLangSupported || isDdsLang) && throwExpection) {\n throw new Error(`lang ${lang} not allowed. Allowable: ${this.allowableLangs}`);\n }\n return isLangSupported;\n };\n\n setLang(lang: string): void {\n const languageValue = this.verifyLangAllowed(lang) ? lang : ddsLangToNewLang(this.location.path());\n this.store$.dispatch(\n LanguageActions.setLanguage({\n language: languageValue,\n locale: this.configService.cfg.allowedLocales[languageValue],\n })\n );\n const expires = new Date();\n expires.setTime(expires.getTime() + FinLanguageService.TTL);\n this.cookieService.setItem(COOKIE_KEY, languageValue, expires);\n }\n\n get countryCode(): Observable {\n return this.locale.pipe(\n map((l) => {\n const [, countryCode] = l.split('_');\n return countryCode || 'INT';\n })\n );\n }\n\n get cookieValue(): string {\n return this.cookieService.getItem(COOKIE_KEY) || FinLanguageService.FALLBACK_LANGUAGE;\n }\n\n // Example: ca-fr\n get lang(): Observable {\n return this.lang$;\n }\n\n // Example: en or fr\n get langKey(): Observable {\n return this.lang$.pipe(map((val) => val.slice(-2)));\n }\n\n // Example: en_GB for gb-en – see ALLOWED_LOCALES\n get locale(): Observable {\n return this.locale$;\n }\n\n get localeValue(): string {\n return snapshot(this.store$.pipe(locale()));\n }\n\n get langValue(): string {\n return snapshot(this.store$.pipe(language()));\n }\n\n get langKeyValue(): string {\n return this.langValue.slice(-2);\n }\n\n get ddsLocaleValue(): DdsLanguage {\n return snapshot(this.store$.pipe(ddsLanguage()));\n }\n\n get localizations(): Observable {\n return this.localizations$;\n }\n\n translate(key: string | string[], args: ReplaceParams = [], options?: TranslateOptions): Observable {\n options = {\n ...this.translateOptionsDefaults,\n ...options,\n };\n\n const keyAsArray: string[] = Array.isArray(key) ? key : key.split('.');\n const rootKey = keyAsArray[0];\n if (rootKey === i18nKeyToDataMap.taxCodes.lazyLoadingPrefix) {\n this.localizationProvider.triggerLazyLocalizations(I18nKey.TAX_CODES);\n } else if (rootKey === i18nKeyToDataMap.countryRegions.lazyLoadingPrefix) {\n this.localizationProvider.triggerLazyLocalizations(I18nKey.COUNTRY_REGIONS);\n } else if (rootKey === i18nKeyToDataMap.serviceForms.lazyLoadingPrefix) {\n this.localizationProvider.triggerLazyLocalizations(I18nKey.SERVICE_FORMS);\n } else if (rootKey === i18nKeyToDataMap.corporate.lazyLoadingPrefix) {\n this.localizationProvider.triggerLazyLocalizations(I18nKey.CORPORATE);\n } else if (rootKey === i18nKeyToDataMap.travelReady.lazyLoadingPrefix) {\n this.localizationProvider.triggerLazyLocalizations(I18nKey.TRAVEL_READY);\n }\n\n return this.localizations$.pipe(\n skipWhile((localizations) => {\n if (!Object.values(I18nLazyLoadingPrefix).includes(rootKey as I18nLazyLoadingPrefix)) {\n return false;\n }\n return !localizations[rootKey]?.loaded; // wait till loaded is truthy\n }),\n map((localeString) => {\n const str: string = getIn(localeString, keyAsArray) as string;\n\n if (str === undefined && shouldISendCmsKeyMissingError(keyAsArray)) {\n throw new Error(`CMS missing key: ${key}`);\n }\n return str;\n }),\n catchError((err: unknown) => {\n if (options.logErrors) {\n this.sentryLogger.error((err as Error).message || JSON.stringify(err));\n }\n\n return of('');\n }),\n map((str) => replaceMsgFormat(str, args))\n );\n }\n\n translateMultiple(keys: string[], args: ReplaceParams = [], options?: TranslateOptions): Observable {\n const translations: Array> = keys.map((k) => this.translate(k, args, options));\n return zip(...translations);\n }\n\n private languageFromStore(): Observable {\n return this.store$.pipe(language());\n }\n\n private localeFromStore(): Observable {\n return this.store$.pipe(locale());\n }\n\n private setInitialLanguageFromCookieOrPath() {\n if (isPlatformBrowser(this.platform)) {\n const languageValue = this.getInitialLanguageValue();\n\n this.store$.dispatch(\n LanguageActions.setLanguage({\n language: languageValue,\n locale: this.configService.cfg.allowedLocales[languageValue],\n })\n );\n }\n }\n\n /**\n * Resolve initial language value either from url or from cookie\n */\n private getInitialLanguageValue(): string {\n const currentLang: string | undefined = this.location.path().split('/')[1];\n\n if (this.verifyLangAllowed(currentLang, false)) {\n return currentLang;\n } else if (this.verifyLangAllowed(this.cookieValue)) {\n return this.cookieValue;\n }\n\n return ddsLangToNewLang(this.location.path());\n }\n\n private updateLocaleBasedOnLanguage(languageValue$: Observable): void {\n this.subscriptions.add(\n combineLatest([this.localizationProvider.getLocalizations(languageValue$), languageValue$]).subscribe(\n ([localeValue, lang]) =>\n asapScheduler.schedule(() =>\n this.store$.dispatch(\n LanguageActions.setLocalizations({\n language: lang,\n localization: localeValue,\n })\n )\n )\n )\n );\n }\n}\n","export const shouldISendCmsKeyMissingError = (keyAsArray: string[]): boolean => {\n return !(keyAsArray[0] === '' || keyAsArray.includes('fragments'));\n};\n","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subscriber } from '../Subscriber';\nimport { ObservableInput, SchedulerLike } from '../types';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * A process embodying the general \"merge\" strategy. This is used in\n * `mergeMap` and `mergeScan` because the logic is otherwise nearly identical.\n * @param source The original source observable\n * @param subscriber The consumer subscriber\n * @param project The projection function to get our inner sources\n * @param concurrent The number of concurrent inner subscriptions\n * @param onBeforeNext Additional logic to apply before nexting to our consumer\n * @param expand If `true` this will perform an \"expand\" strategy, which differs only\n * in that it recurses, and the inner subscription must be schedule-able.\n * @param innerSubScheduler A scheduler to use to schedule inner subscriptions,\n * this is to support the expand strategy, mostly, and should be deprecated\n */\nexport function mergeInternals(\n source: Observable,\n subscriber: Subscriber,\n project: (value: T, index: number) => ObservableInput,\n concurrent: number,\n onBeforeNext?: (innerValue: R) => void,\n expand?: boolean,\n innerSubScheduler?: SchedulerLike,\n additionalFinalizer?: () => void\n) {\n // Buffered values, in the event of going over our concurrency limit\n const buffer: T[] = [];\n // The number of active inner subscriptions.\n let active = 0;\n // An index to pass to our accumulator function\n let index = 0;\n // Whether or not the outer source has completed.\n let isComplete = false;\n\n /**\n * Checks to see if we can complete our result or not.\n */\n const checkComplete = () => {\n // If the outer has completed, and nothing is left in the buffer,\n // and we don't have any active inner subscriptions, then we can\n // Emit the state and complete.\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n\n // If we're under our concurrency limit, just start the inner subscription, otherwise buffer and wait.\n const outerNext = (value: T) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n\n const doInnerSub = (value: T) => {\n // If we're expanding, we need to emit the outer values and the inner values\n // as the inners will \"become outers\" in a way as they are recursively fed\n // back to the projection mechanism.\n expand && subscriber.next(value as any);\n\n // Increment the number of active subscriptions so we can track it\n // against our concurrency limit later.\n active++;\n\n // A flag used to show that the inner observable completed.\n // This is checked during finalization to see if we should\n // move to the next item in the buffer, if there is on.\n let innerComplete = false;\n\n // Start our inner subscription.\n innerFrom(project(value, index++)).subscribe(\n createOperatorSubscriber(\n subscriber,\n (innerValue) => {\n // `mergeScan` has additional handling here. For example\n // taking the inner value and updating state.\n onBeforeNext?.(innerValue);\n\n if (expand) {\n // If we're expanding, then just recurse back to our outer\n // handler. It will emit the value first thing.\n outerNext(innerValue as any);\n } else {\n // Otherwise, emit the inner value.\n subscriber.next(innerValue);\n }\n },\n () => {\n // Flag that we have completed, so we know to check the buffer\n // during finalization.\n innerComplete = true;\n },\n // Errors are passed to the destination.\n undefined,\n () => {\n // During finalization, if the inner completed (it wasn't errored or\n // cancelled), then we want to try the next item in the buffer if\n // there is one.\n if (innerComplete) {\n // We have to wrap this in a try/catch because it happens during\n // finalization, possibly asynchronously, and we want to pass\n // any errors that happen (like in a projection function) to\n // the outer Subscriber.\n try {\n // INNER SOURCE COMPLETE\n // Decrement the active count to ensure that the next time\n // we try to call `doInnerSub`, the number is accurate.\n active--;\n // If we have more values in the buffer, try to process those\n // Note that this call will increment `active` ahead of the\n // next conditional, if there were any more inner subscriptions\n // to start.\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift()!;\n // Particularly for `expand`, we need to check to see if a scheduler was provided\n // for when we want to start our inner subscription. Otherwise, we just start\n // are next inner subscription.\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n } else {\n doInnerSub(bufferedValue);\n }\n }\n // Check to see if we can complete, and complete if so.\n checkComplete();\n } catch (err) {\n subscriber.error(err);\n }\n }\n }\n )\n );\n };\n\n // Subscribe to our source observable.\n source.subscribe(\n createOperatorSubscriber(subscriber, outerNext, () => {\n // Outer completed, make a note of it, and check to see if we can complete everything.\n isComplete = true;\n checkComplete();\n })\n );\n\n // Additional finalization (for when the destination is torn down).\n // Other finalization is added implicitly via subscription above.\n return () => {\n additionalFinalizer?.();\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { LoaderComponent } from './loader.component';\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule, UiTranslateModule],\n exports: [LoaderComponent],\n providers: [],\n})\nexport class LoaderModule {}\n","import { Directive, ElementRef, HostListener, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\n@Directive({\n selector: '[finFormErrorFocus]',\n})\nexport class FormErrorFocusDirective {\n @Input('finFormErrorFocus') formGroup: UntypedFormGroup;\n\n constructor(private el: ElementRef) {}\n\n @HostListener('submit', ['$event'])\n onFormSubmit(event: Event): void {\n if (this.formGroup && this.formGroup.status === 'INVALID') {\n event.preventDefault();\n const invalidElements = this.el.nativeElement.querySelectorAll(\n 'input.ng-invalid, select.ng-invalid, textarea.ng-invalid'\n );\n if (invalidElements.length > 0) {\n invalidElements[0].focus();\n }\n }\n }\n}\n","import { Directive, Input, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\n\nimport { ProfileTier } from '@fcom/core-api/login';\nimport { AppState } from '@fcom/core';\nimport { profile } from '@fcom/core/selectors';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\n@Directive({\n selector: '[finShowForProfileTiers]',\n})\nexport class ShowForProfileTiersDirective implements OnDestroy {\n private hasView = false;\n private subscriptions = new Subscription();\n\n constructor(\n private templateRef: TemplateRef,\n private viewContainer: ViewContainerRef,\n private store$: Store\n ) {}\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('finShowForProfileTiers') set finShowForProfileTiers(tiers: ProfileTier[]) {\n if (!tiers || tiers.length === 0) {\n if (!this.hasView) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n }\n } else {\n this.subscriptions.add(\n this.store$.pipe(profile(), finShare()).subscribe((memberProfile) => {\n if (tiers.includes(memberProfile.tier)) {\n if (!this.hasView) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n }\n } else {\n this.viewContainer.clear();\n this.hasView = false;\n }\n })\n );\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","export enum ModalButtons {\n /**\n * Show secondary \"Done\" button in modal footer.\n * Closes the modal and calls onClose()\n */\n DONE = 'DONE',\n\n /**\n * Show secondary \"OK\" button in modal footer.\n * Closes the modal and calls onClose()\n */\n OK = 'OK',\n\n /**\n * Show primary continue and secondary cancel button.\n * These use the onContinue and onCancel callbacks\n */\n CONTINUE_CANCEL = 'CONTINUE_CANCEL',\n\n /**\n * Show secondary \"Close\" button in modal footer.\n * Closes the modal and calls onClose()\n */\n CLOSE = 'CLOSE',\n\n /**\n * No buttons will be shown within the modal. It is expected that the parent component will pass\n * the buttons through as part of ng-content.\n *\n * The ng-content selector to use is \"buttons\"\n *\n * Warning.\n * - By using custom buttons you will need to handle disabling these buttons when needed.\n * - The parent component will need to handle the modal close behavior by listening to click\n * events.\n */\n CUSTOM = 'CUSTOM',\n}\n","'use strict';\n\nvar bind = require('function-bind');\nvar $TypeError = require('es-errors/type');\n\nvar $call = require('./functionCall');\nvar $actualApply = require('./actualApply');\n\n/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */\nmodule.exports = function callBindBasic(args) {\n\tif (args.length < 1 || typeof args[0] !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\treturn $actualApply(bind, $call, args);\n};\n","import { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\nexport function map(project: (value: T, index: number) => R): OperatorFunction;\n/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */\nexport function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction;\n\n/**\n * Applies a given `project` function to each value emitted by the source\n * Observable, and emits the resulting values as an Observable.\n *\n * Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),\n * it passes each source value through a transformation function to get\n * corresponding output values.\n *\n * ![](map.png)\n *\n * Similar to the well known `Array.prototype.map` function, this operator\n * applies a projection to each value and emits that projection in the output\n * Observable.\n *\n * ## Example\n *\n * Map every click to the `clientX` position of that click\n *\n * ```ts\n * import { fromEvent, map } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const positions = clicks.pipe(map(ev => ev.clientX));\n *\n * positions.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link mapTo}\n * @see {@link pluck}\n *\n * @param project The function to apply to each `value` emitted by the source\n * Observable. The `index` parameter is the number `i` for the i-th emission\n * that has happened since the subscription, starting from the number `0`.\n * @param thisArg An optional argument to define what `this` is in the\n * `project` function.\n * @return A function that returns an Observable that emits the values from the\n * source Observable transformed by the given `project` function.\n */\nexport function map(project: (value: T, index: number) => R, thisArg?: any): OperatorFunction {\n return operate((source, subscriber) => {\n // The index of the value from the source. Used with projection.\n let index = 0;\n // Subscribe to the source, all errors and completions are sent along\n // to the consumer.\n source.subscribe(\n createOperatorSubscriber(subscriber, (value: T) => {\n // Call the projection function with the appropriate this context,\n // and send the resulting value to the consumer.\n subscriber.next(project.call(thisArg, value, index++));\n })\n );\n });\n}\n","import { Subject } from './Subject';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\n\n/**\n * A variant of Subject that requires an initial value and emits its current\n * value whenever it is subscribed to.\n */\nexport class BehaviorSubject extends Subject {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n return this.getValue();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): Subscription {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n\n getValue(): T {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n","import { Params, Router } from '@angular/router';\n\nimport { ERROR_CTA_ACTIONS } from '@fcom/common/components';\nimport { RootPaths } from '@fcom/core/constants';\nimport { isInMmb } from '@fcom/common-booking/utils/common-booking.utils';\n\nconst defaultQueryParams: Params = {\n cta: 'errors.booking.cta',\n info: 'errors.booking.description',\n title: 'sorry',\n subtitle: 'errors.booking.title',\n ctaAction: ERROR_CTA_ACTIONS.NAVIGATE_TO_BOOKING,\n};\n\nconst defaultQueryParamsInMmb: Params = {\n cta: 'errors.booking.cta',\n info: 'errors.booking.description',\n title: 'sorry',\n subtitle: 'errors.booking.title',\n ctaAction: ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING_VIEW_PNR,\n showButton: true,\n noGrid: true,\n};\n\nexport const navigateToError = (router: Router, lang: string, error: string, queryParams: Params = {}): void => {\n const inMmb = isInMmb(router.url);\n router.navigate([lang, inMmb ? RootPaths.MANAGE_BOOKING_ROOT : RootPaths.BOOKING_ROOT, 'error', error], {\n skipLocationChange: true,\n queryParams: { ...(inMmb ? defaultQueryParamsInMmb : defaultQueryParams), ...queryParams },\n });\n};\n","import { ReadableStreamLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = await reader.read();\n if (done) {\n return;\n }\n yield value!;\n }\n } finally {\n reader.releaseLock();\n }\n}\n\nexport function isReadableStreamLike(obj: any): obj is ReadableStreamLike {\n // We don't want to use instanceof checks because they would return\n // false for instances from another Realm, like an \n \n \n}\n","import { DOCUMENT, Location } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, OnInit, computed, input } from '@angular/core';\nimport { ActivatedRoute, UrlSegment } from '@angular/router';\n\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';\n\nimport { ConsentService } from '@fcom/common/login';\nimport { QualtricsSurvey, QualtricsSurveys, getQualtricsUrl } from '@fcom/common/qualtrics/qualtrics.utils';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ConsentTextId } from '@fcom/common';\nimport { PageViewType } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-qualtrics-embedded-page-feedback',\n templateUrl: './qualtrics-embedded-page-feedback.component.html',\n styleUrl: './qualtrics-embedded-page-feedback.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class QualtricsEmbeddedPageFeedbackComponent implements OnInit {\n readonly PageViewType = PageViewType;\n readonly survey: QualtricsSurvey = QualtricsSurveys.PAGE_FEEDBACK;\n\n private survey$: BehaviorSubject;\n\n pageType = input('');\n surveyName = computed(() => this.survey.name);\n classByPageType = computed(() => {\n switch (this.pageType()) {\n case PageViewType.BLUEWINGS_LANDING_PAGE:\n case PageViewType.EDITORIAL_LANDING_PAGE:\n return 'md-col-4-12 sm-col-2-11 mr-xxsmall-l';\n case PageViewType.EDITORIAL_CATEGORY_PAGE:\n return 'md-col-4-12 sm-col-2-11 mr-xxsmall-l mr-xxlarge-t';\n case PageViewType.PREMIUM_ECONOMY_LANDING_PAGE_2021:\n return 'md-col-4-12 sm-col-2-11 pr-large-t';\n case PageViewType.SECTION_PAGE_WITH_TITLE:\n return 'md-col-5-12 pr-large-b';\n case 'full': // manually set pageType in timetables component\n return 'mr-clear-l mr-clear-r mr-large-t';\n case 'myFplus': // manually set pageType in my-finnair-plus\n return 'col-1-12 md-col-4-12 mr-large-t';\n case PageViewType.NO_GRID_FULL_WIDTH_PAGE_WITH_TITLE:\n case PageViewType.NO_GRID_FULL_WIDTH_PAGE:\n default:\n return 'flex--center mr-xlarge-t';\n }\n });\n\n qualtricsUrl$: Observable;\n consentGiven$: Observable;\n\n showFeedback = false;\n\n constructor(\n private languageService: LanguageService,\n private activatedRoute: ActivatedRoute,\n private consentService: ConsentService,\n @Inject(DOCUMENT) private document: Document,\n private location: Location\n ) {}\n\n ngOnInit(): void {\n this.survey$ = new BehaviorSubject(this.survey);\n\n this.qualtricsUrl$ = this.survey$.pipe(\n filter(Boolean),\n distinctUntilChanged((a, b) => a.name === b.name && a.url === b.url),\n switchMap((survey) => this.languageService.translate(survey.url)),\n filter(Boolean),\n map(\n (url) =>\n getQualtricsUrl(this.languageService.langKeyValue, this.languageService.langValue, url) +\n `¤t_page_url=${this.location.path()}&pagePath=${this.strippedPath()}&locale=${this.languageService.ddsLocaleValue.countrySite}`\n )\n );\n\n this.consentGiven$ = this.consentService\n .getCookieConsentStatusById(ConsentTextId.COOKIE_ANALYTICS)\n .pipe(distinctUntilChanged());\n\n this.showFeedback = this.checkVisibility();\n }\n\n strippedPath(): string {\n const path: string = this.location.path();\n const stripParams: string = path.split('?')[0];\n const splitPath: string[] = stripParams.split('/');\n if (path.includes('/int/gb/') || splitPath.length <= 2) {\n return path;\n }\n return splitPath.slice(2).join('/');\n }\n\n checkVisibility(): boolean {\n const pathUrl: string = this.location.path();\n const activatedRouteSnapshot: UrlSegment[] = this.activatedRoute.snapshot?.url;\n\n // if frontpage && NOT timetables (was being evaluated as frontpage)\n if (\n activatedRouteSnapshot?.length < 1 &&\n !(pathUrl.includes('timetables') || pathUrl.includes('my-finnair-plus'))\n ) {\n return false;\n }\n\n // hide for given paths\n if (this.hideFeedback(pathUrl)) {\n return false;\n }\n\n // hide for 404 page\n if (pathUrl.includes('404-not-found')) {\n return false;\n }\n\n return true;\n }\n\n private hideFeedback(pathUrl: string): boolean {\n //parse through alternateUrls to remove feedback on page for all languages\n const alternateUrl: HTMLElement = this.document?.querySelector('link[hreflang=\"en-GB\"]');\n const alternateUrlHref: string = alternateUrl?.getAttribute('href');\n\n return [\n 'flash-sale',\n 'finnair100',\n 'offers',\n 'special-offers',\n 'business-class-flights',\n 'customer-care-and-contact-information',\n 'newsletter',\n 'compensation-wizard',\n 'contact-finnair-corporate-programme',\n 'join-finnair-corporate-programme',\n 'claim-missing-points',\n 'contact-and-request-forms',\n 'emergency-in-operations',\n ].some((page) => pathUrl.includes(page) || alternateUrlHref?.includes(page));\n }\n}\n","import { ChangeDetectorRef, Injectable, Pipe, PipeTransform, OnDestroy } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable } from 'rxjs';\n\nimport { isPresent } from '@fcom/core/utils';\nimport { CurrencyService } from '@fcom/core';\nimport { Amount } from '@fcom/dapi';\nimport { PriceSettings } from '@fcom/core/interfaces/currency.interface';\n\n/**\n * Asynchronous price pipe that supports localizations.\n * Uses currencyService to get price in localized format.\n *\n */\n@Injectable()\n@Pipe({\n name: 'finPrice',\n pure: false,\n})\nexport class PricePipe implements OnDestroy, PipeTransform {\n private async: AsyncPipe;\n private cached$: Observable;\n private cachedAmount: string;\n private cachedCurrencyCode: string;\n\n constructor(\n private ref: ChangeDetectorRef,\n private currencyService: CurrencyService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(amount: Amount, settings?: PriceSettings): string {\n if (!isPresent(amount)) {\n return undefined;\n }\n if (this.valueChanged(amount)) {\n this.updatePrice(amount, settings);\n }\n\n return this.async.transform(this.cached$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n\n private valueChanged(amount: Amount): boolean {\n return !this.cached$ || amount.amount !== this.cachedAmount || amount.currencyCode !== this.cachedCurrencyCode;\n }\n\n private updatePrice(amount: Amount, settings?: PriceSettings): void {\n this.cached$ = this.currencyService.formatPrice(amount, settings);\n this.cachedAmount = amount.amount;\n this.cachedCurrencyCode = amount.currencyCode;\n }\n}\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\n/** @type {import('./sign')} */\nmodule.exports = function sign(number) {\n\tif ($isNaN(number) || number === 0) {\n\t\treturn number;\n\t}\n\treturn number < 0 ? -1 : +1;\n};\n","import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n","\n
\n

{{ title | finLocalization }}

\n
\n
\n
\n
{{ paragraph | finLocalization }}
\n
\n
\n\n\n \n
\n
\n \n
\n
\n\n \n
\n \n
\n\n \n
\n
\n
\n\n \n
\n
\n
\n\n \n
\n
\n
\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { LoaderColor, LoaderTheme } from './enums';\n\n/**\n * This component can be used to display a loading icon with text in a variety of use cases.\n *\n * Make sure to set the theme to be the one required depending on if you need a full page or inline\n * layout.\n */\n@Component({\n selector: 'fcom-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoaderComponent {\n readonly LoaderTheme = LoaderTheme;\n /**\n * The theme to use for the loader.\n */\n @Input()\n loaderType = LoaderTheme.EMBEDDED;\n\n /**\n * The heading tag to use above the loading icon, note that will not render with\n * LoaderTheme.INLINE or LoaderTheme.INLINE_TEXT.\n */\n @Input()\n title: string;\n\n /**\n * The paragraph tag to use below the loading icon, note that will not render with\n * LoaderTheme.INLINE or LoaderTheme.INLINE_TEXT.\n */\n @Input()\n paragraph: string;\n\n /**\n * The color to use with the loader. Defaults to nordic-blue-900\n */\n @Input()\n color: LoaderColor = LoaderColor.BLUE;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, makeStateKey, StateKey } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { ConfigService, SentryLogger, StateTransferService } from '@fcom/core/services';\n\nimport { AmDestinationResponseItem } from '../interfaces/destination-search.interface';\n\n@Injectable()\nexport class AmDestinationService {\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private sentryLogger: SentryLogger,\n private stateTransferService: StateTransferService\n ) {}\n\n static createStateKey = (): StateKey =>\n makeStateKey('amdestinations');\n\n public amDestinationList(): Observable {\n if (this.configService.cfg.buildEnv === 'prod') {\n return this.stateTransferService.wrapToStateCache(AmDestinationService.createStateKey(), () =>\n this.fetchAmDestinationList()\n );\n }\n return this.fetchAmDestinationList();\n }\n\n private fetchAmDestinationList(): Observable {\n const apiUrl = this.configService.cfg.amFlightHotelDestinationUrl;\n const apiUrlLocalized = `${apiUrl}?dep=HEL`;\n return this.http.get(apiUrlLocalized).pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to fetch AM flight + hotel list', { error: err });\n return of([]);\n })\n );\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { filter, switchMap } from 'rxjs/operators';\n\nimport { CmsDataService } from '@fcom/core/services';\nimport { CmsContent, CmsTeaser } from '@fcom/core-api/interfaces';\n\n/**\n * Used for rendering fragments from CMS whose styling is left entirely to the\n * responsibility of the UX.\n */\n@Component({\n selector: 'cms-unstyled-fragment',\n styleUrls: ['./cms-unstyled-fragment.component.scss'],\n templateUrl: './cms-unstyled-fragment.component.html',\n})\nexport class CmsUnstyledFragmentComponent implements OnInit {\n @Input()\n contentUrl$: Observable;\n @Input()\n cmsContent$: Observable;\n @Input()\n showIcon = false;\n @Input()\n showTitle = true;\n\n content$: Observable;\n\n constructor(private cmsDataService: CmsDataService) {}\n\n ngOnInit(): void {\n this.content$ = this.cmsContent$\n ? (this.cmsContent$ as Observable)\n : this.contentUrl$.pipe(\n filter(Boolean),\n switchMap((url: string) => this.cmsDataService.getFragmentJson(url))\n );\n }\n}\n","\n","/* eslint-disable rxjs/no-implicit-any-catch */\nimport { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';\nimport { Injectable, OnDestroy } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { TypedAction } from '@ngrx/store/src/models';\nimport { NEVER, Observable, PartialObserver, Subscription, throwError } from 'rxjs';\nimport { catchError, map, share, switchMap, takeUntil, tap, timeout } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { mapError, mapErrorForSentry, SentryLogger } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { DapiError, DapiErrorCode, DapiHttpErrorResponse, PartialCartFareRuleRecord, PaxAmount } from '@fcom/dapi';\nimport { retryWithBackoff, snapshot } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { BookingAppState, PaxDetailsState } from '@fcom/common/interfaces/booking';\nimport { FareRules, FinnairCart, FinnairPassengerCode, FinnairServiceRequestItem } from '@fcom/dapi/api/models';\nimport { CartService } from '@fcom/dapi/api/services/cart.service';\nimport { CommonBookingAncillaryService } from '@fcom/common-booking/modules/ancillaries/services';\nimport { globalBookingPaxAmount } from '@fcom/common/store';\nimport { FareRuleCategory } from '@fcom/dapi/api/models/fare-rule-category';\nimport { DapiHttpResponse } from '@fcom/dapi/api/dapi-http-response';\n\nimport { CartActions } from '../store/actions';\nimport { mapTravelersAndCorporateCode } from '../utils';\nimport { navigateToError } from '../utils/route-utils';\n\n@Injectable()\nexport class BookingCartService implements OnDestroy {\n static NUMBER_OF_RETRIES = 2;\n\n private cartSubscription: Subscription;\n private paxSubscription: Subscription;\n private ancillarySubscription: Subscription;\n private fareRulesSubscription: Subscription = new Subscription();\n\n constructor(\n private http: HttpClient,\n private configService: ConfigService,\n private store$: Store,\n private languageService: LanguageService,\n private sentryLogger: SentryLogger,\n private router: Router,\n private cartService: CartService,\n private commonBookingAncillaryService: CommonBookingAncillaryService\n ) {}\n\n ngOnDestroy(): void {\n this.fareRulesSubscription.unsubscribe();\n }\n\n /**\n * Triggers cart creation for the given offer id. Stores the cart info in the app state store.\n * @param selectedOfferId the id of the selected offer, e.g., SULL-6158699516561791804-3\n * @param locale the locale for the cart to create\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n * @param offersHash the hash provided with the offers see {@link BaseOfferList#hash}\n */\n triggerCreateCart(\n selectedOfferId: string,\n locale: string,\n offersHash: string,\n cancelStream$: Observable = NEVER\n ): Observable {\n const urlParams: HttpParams = new HttpParams().set('airOfferId', selectedOfferId);\n\n return this.createCart(urlParams, locale, offersHash, { airOfferId: selectedOfferId }, cancelStream$);\n }\n\n /**\n * Triggers cart creation for the given air bound ids. Stores the cart info in the app state store.\n * @param selectedAirBoundIds the ids of the selected air bounds\n * @param locale the locale for the cart to create\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n * @param boundsHash the hash provided with the bounds see {@link BookingAirBounds#hash}\n */\n triggerCreateCartByBounds(\n selectedAirBoundIds: string[],\n locale: string,\n boundsHash: string,\n cancelStream$: Observable = NEVER\n ): Observable {\n return this.createCart(new HttpParams(), locale, boundsHash, { airBoundIds: selectedAirBoundIds }, cancelStream$);\n }\n\n /**\n * Requests the full ticket rules for the given traveler and category. Stores the rules in `cart` slice, inside the `fareRules` slice.\n * The full rules are written in cryptic format, and are not localized.\n *\n * Does not reload the cart after the update.\n * @param cartId\n * @param travelerId\n * @param ruleCategory\n * @param hash\n */\n triggerTicketRules(cartId: string, travelerId: string, ruleCategory: FareRuleCategory, hash?: string): void {\n const params = { cartId, travelerId, ruleCategory, hash };\n this.store$.dispatch(CartActions.fareRulesLoadStart({ travelerId, category: ruleCategory }));\n this.fareRulesSubscription.add(\n this.cartService\n .getFareRulesByCart$Response(this.configService.cfg.cartUrlWithoutAPI, params)\n .pipe(\n timeout(10000),\n map((res: DapiHttpResponse) => res.body),\n map((res) => this.createRulesFromResponse(res, ruleCategory)),\n catchError((err: unknown) => {\n this.sentryLogger.error('Error fetching full ticket rules', {\n error: mapErrorForSentry(err),\n });\n\n this.store$.dispatch(CartActions.fareRulesLoadEnd({ travelerId, category: ruleCategory }));\n this.store$.dispatch(CartActions.fareRulesError({ travelerId, category: ruleCategory }));\n\n return throwError(() => err);\n })\n )\n .subscribe((rules: PartialCartFareRuleRecord) => {\n this.store$.dispatch(CartActions.fareRulesLoadEnd({ travelerId, category: ruleCategory }));\n this.store$.dispatch(\n CartActions.fareRulesCreateCategories({\n travelerId,\n rules,\n })\n );\n })\n );\n }\n\n /**\n * Update services selections for given selections.\n *\n * Reloads the cart after the update. Will add `locale` parameter to request, if not present in URL.\n *\n * @experimental\n * @param requests @FinnairServiceRequestItem[]\n * @param cartUrl the url of the cart to update\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n * @return {Subscription} subscription fot the update that can be canceled if, e.g., a new cart creation is started\n */\n triggerUpdateServices(\n requests: FinnairServiceRequestItem[],\n cartUrl: string,\n cancelStream$: Observable = NEVER\n ): Observable {\n const [baseUrl, urlParams] = this.splitUrlAndParamsAddLocaleIfNotPresent(cartUrl);\n unsubscribe(this.ancillarySubscription);\n const { subscription, stream$ } = this.createCancelableUpdateStream(\n `${baseUrl}/services`,\n urlParams,\n cancelStream$,\n requests,\n undefined,\n CartActions.updateNotCompleted.type,\n {}\n );\n this.ancillarySubscription = subscription;\n return stream$;\n }\n\n /**\n * Trigger setting travelers and reloading cart.\n *\n * Reloads the cart after the update. Will add `locale` parameter to request, if not present in URL.\n *\n * @param cartUrl the url of the cart to update\n * @param passengersState the passengers form data to update\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n * @param usePutMethod\n * @return subscription that can be canceled if, e.g., a new cart creation is started\n */\n triggerTravelersAndCorporateCodeUpdate(\n cartUrl: string,\n passengersState: PaxDetailsState,\n cancelStream$: Observable = NEVER,\n usePutMethod = false\n ): Observable {\n const [baseUrl, urlParams] = this.splitUrlAndParamsAddLocaleIfNotPresent(cartUrl);\n unsubscribe(this.paxSubscription);\n\n const { stream$, subscription } = this.createCancelableUpdateStream(\n `${baseUrl}/passengers`,\n urlParams,\n cancelStream$,\n mapTravelersAndCorporateCode(passengersState),\n undefined,\n undefined,\n { usePutMethod, includeServiceCatalog: true }\n );\n this.paxSubscription = subscription;\n return stream$;\n }\n\n /**\n * Reset seat selections for all flights on the cart.\n *\n * Reloads the cart after the update. Will add `locale` parameter to request, if not present in URL.\n *\n * @param cartUrl the url of the cart to update\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n * @return {Subscription} subscription fot the update that can be canceled if, e.g., a new cart creation is started\n */\n triggerResetSeatSelections(cartUrl: string, cancelStream$: Observable = NEVER): Observable {\n const [baseUrl, urlParams] = this.splitUrlAndParamsAddLocaleIfNotPresent(cartUrl);\n unsubscribe(this.ancillarySubscription);\n this.store$.dispatch(CartActions.updateStart());\n const includeServiceCatalog = false;\n const stream$ = this.http\n .delete(`${baseUrl}/seats`, {\n params: urlParams,\n })\n .pipe(\n retryWithBackoff(BookingCartService.NUMBER_OF_RETRIES),\n catchError((err: DapiHttpErrorResponse) =>\n throwError(() =>\n Object.assign(mapError(err), {\n uxErrorType: CartActions.updateNotCompleted.type,\n })\n )\n ),\n switchMap(() => this.loadCart(cartUrl, includeServiceCatalog)),\n catchError((err: DapiHttpErrorResponse) =>\n this.doOnCartUpdateError(mapError(err), baseUrl, urlParams)\n ),\n takeUntil(cancelStream$),\n share()\n );\n\n this.ancillarySubscription = new Subscription();\n this.ancillarySubscription.add(\n stream$.subscribe(this.updateSubscriber(this.ancillarySubscription, includeServiceCatalog))\n );\n\n return stream$;\n }\n\n triggerLoadCart(cartUrl: string, cancelStream$: Observable = NEVER): Observable {\n unsubscribe(this.cartSubscription);\n const { stream$, subscription } = this.createCancelableLoadCartStream(cartUrl, cancelStream$);\n this.cartSubscription = subscription;\n return stream$;\n }\n\n /**\n * Triggers loading of cart from the given cart url.\n * @param cartUrl the URL of the cart\n * @return {Observable} observable of cart data\n */\n private loadCart(cartUrl: string, includeServiceCatalog: boolean): Observable {\n this.store$.dispatch(CartActions.loadStart());\n const params = new HttpParams().set('includeServiceCatalog', includeServiceCatalog);\n return this.http.get(cartUrl, { params }).pipe(\n retryWithBackoff(BookingCartService.NUMBER_OF_RETRIES),\n catchError((error: DapiHttpErrorResponse) =>\n throwError(() => Object.assign(mapError(error), { uxErrorType: CartActions.loadError.type }))\n )\n );\n }\n\n private createCart(\n urlParams: HttpParams,\n locale: string,\n offersHash: string,\n postData: object,\n cancelStream$: Observable = NEVER\n ): Observable {\n const pax = snapshot(this.store$.pipe(globalBookingPaxAmount()));\n urlParams = urlParams.set('locale', locale).set('hash', offersHash);\n\n unsubscribe(this.cartSubscription);\n\n const { stream$, subscription } = this.createCancelableUpdateStream(\n this.configService.cfg.cartUrl,\n urlParams,\n cancelStream$,\n { ...{ passengerTypeCodes: this.paxTypeCodes(pax) }, ...postData },\n CartActions.creationStart(),\n CartActions.creationError.type,\n { includeServiceCatalog: true }\n );\n this.cartSubscription = subscription;\n return stream$;\n }\n\n private createCancelableUpdateStream(\n baseUrl: string,\n urlParams: HttpParams,\n cancelStream$: Observable,\n body: any = {},\n startAction: TypedAction = CartActions.updateStart(),\n uxErrorType: string = CartActions.updateError.type,\n { usePutMethod = false, includeServiceCatalog = false }: { usePutMethod?: boolean; includeServiceCatalog?: boolean }\n ): { subscription: Subscription; stream$: Observable } {\n this.store$.dispatch(startAction);\n\n const request$ = usePutMethod\n ? this.putToUrlAndReloadCart(baseUrl, urlParams, body, uxErrorType, includeServiceCatalog)\n : this.postToUrlAndReloadCart(baseUrl, urlParams, body, uxErrorType, includeServiceCatalog);\n\n const stream$ = request$.pipe(takeUntil(cancelStream$), share());\n\n const subscription = new Subscription();\n subscription.add(stream$.subscribe(this.updateSubscriber(subscription, includeServiceCatalog)));\n return { subscription, stream$ };\n }\n\n private createCancelableLoadCartStream(\n url: string,\n cancelStream$: Observable\n ): { subscription: Subscription; stream$: Observable } {\n const includeServiceCatalog = true;\n const stream$ = this.loadCart(url, includeServiceCatalog).pipe(takeUntil(cancelStream$), share());\n const subscription = new Subscription();\n subscription.add(stream$.subscribe(this.updateSubscriber(subscription, includeServiceCatalog)));\n return { subscription, stream$ };\n }\n\n private postToUrlAndReloadCart(\n baseUrl: string,\n urlParams: HttpParams,\n body: any = {},\n uxErrorType,\n includeServiceCatalog: boolean\n ): Observable {\n const request$ = this.http.post(baseUrl, body, {\n params: urlParams,\n observe: 'response',\n responseType: 'text',\n });\n\n return this.doRequestAndReloadCart(request$, baseUrl, urlParams, uxErrorType, includeServiceCatalog);\n }\n\n private putToUrlAndReloadCart(\n baseUrl: string,\n urlParams: HttpParams,\n body: any = {},\n uxErrorType,\n includeServiceCatalog: boolean\n ): Observable {\n const request$ = this.http.put(baseUrl, body, {\n params: urlParams,\n observe: 'response',\n responseType: 'text',\n });\n\n return this.doRequestAndReloadCart(request$, baseUrl, urlParams, uxErrorType, includeServiceCatalog);\n }\n\n private doRequestAndReloadCart(\n request$: Observable>,\n baseUrl: string,\n urlParams: HttpParams,\n uxErrorType,\n includeServiceCatalog: boolean\n ) {\n return request$.pipe(\n map((res) => res.headers.get('Location')),\n retryWithBackoff(BookingCartService.NUMBER_OF_RETRIES),\n catchError((err: DapiHttpErrorResponse) => throwError(() => Object.assign(mapError(err), { uxErrorType }))),\n tap((cartLocation: string) => this.store$.dispatch(CartActions.creationSuccess({ cartUrl: cartLocation }))),\n switchMap((cartLocation: string) => this.loadCart(cartLocation, includeServiceCatalog)),\n catchError((err: DapiHttpErrorResponse) =>\n this.doOnCartUpdateError(mapError(err), baseUrl, urlParams)\n )\n );\n }\n\n private updateSubscriber = (\n subscription: Subscription,\n includeServiceCatalog: boolean\n ): PartialObserver => ({\n next: (cartData: FinnairCart) => {\n this.store$.dispatch(CartActions.setCartData({ cartData }));\n if (includeServiceCatalog) {\n this.commonBookingAncillaryService.setServiceCatalog(cartData);\n }\n unsubscribe(subscription);\n },\n error: (err: DapiError) => {\n if (err.key === DapiErrorCode.UNABLE_TO_RETRIEVE_OFFER) {\n navigateToError(this.router, this.languageService.langValue, 'OFFER_EXPIRED', {\n iconName: SvgLibraryIcon.SAVE_TIME,\n subtitle: 'errors.offerExpired.title',\n info: 'errors.offerExpired.description',\n });\n } else if (err.uxErrorType !== CartActions.updateNotCompleted.type) {\n navigateToError(this.router, this.languageService.langValue, 'CART_ERROR');\n }\n unsubscribe(subscription);\n },\n complete: () => unsubscribe(subscription),\n });\n\n private doOnCartUpdateError(error: DapiError, baseUrl, urlParams): Observable {\n if (error.uxErrorType === CartActions.creationError.type) {\n this.store$.dispatch(CartActions.creationError());\n const errorMessage: string =\n error.key === DapiErrorCode.UNABLE_TO_RETRIEVE_OFFER\n ? 'Offer expired when creating cart'\n : 'Error creating cart';\n this.sentryLogger.error(`${errorMessage}: [${error.key}]`, {\n baseUrl,\n urlParams,\n error: mapErrorForSentry(error),\n });\n } else if (error.uxErrorType === CartActions.loadError.type) {\n this.store$.dispatch(CartActions.loadError());\n this.sentryLogger.error(`Error fetching cart after update: [${error.key}]`, {\n baseUrl,\n urlParams,\n error: mapErrorForSentry(error),\n });\n } else if (error.uxErrorType === CartActions.updateNotCompleted.type) {\n this.store$.dispatch(CartActions.updateNotCompleted());\n this.sentryLogger.error(`Error storing ancillaries: [${error.key}]`, {\n baseUrl,\n urlParams,\n error: mapErrorForSentry(error),\n });\n } else {\n this.store$.dispatch(CartActions.updateError());\n this.sentryLogger.error(`Error updating cart: [${error.key}]`, {\n baseUrl,\n urlParams,\n error: mapErrorForSentry(error),\n });\n }\n return throwError(() => error);\n }\n\n private splitUrlAndParamsAddLocaleIfNotPresent(cartUrl: string): [string, HttpParams] {\n const [baseUrl, parameters] = cartUrl.split('?');\n\n let urlParams: HttpParams = new HttpParams({ fromString: parameters });\n if (!urlParams.get('locale')) {\n urlParams = urlParams.set('locale', this.languageService.localeValue);\n }\n return [baseUrl, urlParams];\n }\n\n private paxTypeCodes(pax: PaxAmount): string[] {\n const ptcMap = {\n adults: FinnairPassengerCode.ADT,\n c15s: FinnairPassengerCode.C_15,\n children: FinnairPassengerCode.CHD,\n infants: FinnairPassengerCode.INF,\n };\n return Object.keys(ptcMap)\n .sort()\n .reduce((acc: FinnairPassengerCode[], k: string) => {\n const temp = Array(pax[k])\n .fill('')\n .map(() => ptcMap[k]);\n return acc.concat(temp);\n }, []);\n }\n\n private createRulesFromResponse(res: FareRules, ruleCategory: FareRuleCategory): PartialCartFareRuleRecord {\n return res.fareRules.reduce(\n (ticketRules, rule) => {\n ticketRules[rule.ruleCategory] = ticketRules[rule.ruleCategory] || [];\n\n ticketRules[rule.ruleCategory].push({\n flightId: rule.flightId,\n rule: rule.rule,\n });\n\n return ticketRules;\n },\n { [ruleCategory]: [] } as PartialCartFareRuleRecord\n );\n }\n}\n","
\n \n
\n \n \n
\n \n

{{ tooltipHeading }}

\n

{{ tooltipContent }}

\n
\n \n \n \n
\n
\n \n
\n
\n
\n \n {{ instruction }}\n \n\n
\n \n {{ printError }}\n \n
\n
\n","import {\n Component,\n forwardRef,\n ChangeDetectionStrategy,\n EventEmitter,\n Input,\n ChangeDetectorRef,\n Injector,\n HostBinding,\n Attribute,\n Output,\n OnInit,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { replaceMsgFormat } from '@fcom/core/utils/replaceMsgFormat';\n\nimport { AbstractInputComponent } from '../abstracts/abstract-input.component';\nimport { PopoverOptions } from '../../popover/popover.interface';\n\n@Component({\n selector: 'fcom-floating-input',\n templateUrl: './floating-input.component.html',\n styleUrls: ['./floating-input.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FloatingInputComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FloatingInputComponent extends AbstractInputComponent implements OnInit {\n @HostBinding('class.floatLabel')\n get doesLabelFloat(): boolean {\n return this.floatLabel;\n }\n\n @HostBinding('class.floating')\n get shouldLabelFloat(): boolean {\n return !this.floatLabel || this.focused || !this.empty || !!this.placeholder;\n }\n\n @HostBinding('attr.tabindex')\n get hostTabIndex(): null {\n // Set host tabindex to null after having transferred the tabStop to the input element\n return null;\n }\n\n /** Label text for the input */\n @Input()\n label = '';\n\n /** Additional label for screen reader accessibility. Read before the label */\n @Input()\n hiddenLabel: string;\n\n /** Instructional text providing additional information on what to enter in the input */\n @Input()\n instruction: string;\n\n /** Autocomplete attribute specifies whether or not an input field should have autocomplete enabled. */\n @Input()\n autocomplete: string;\n\n /** Placeholder text of the element. */\n @Input()\n placeholder = '';\n\n /** Input type of the element. */\n @Input()\n get type(): string {\n return this.inputType;\n }\n\n set type(type: string) {\n if (type === 'tel') {\n this.inputPattern = this.inputPattern || '[0-9]*';\n }\n this.inputType = type || 'text';\n this.cdRef.markForCheck();\n }\n\n inputType = 'text';\n\n /** Input pattern for validation in template-driven forms. */\n @Input()\n inputPattern: string;\n\n /**\n * Boolean attribute indicating if the label should float.\n * Use with caution. Intention by designers to deprecate the floating option at a later date.\n */\n @Input()\n floatLabel = true;\n\n /** Boolean indicating if the simple styling class should be added. */\n @Input()\n simple = false;\n\n /** Boolean indicating if errors should be hidden from the user */\n @Input()\n hideError = false;\n\n /** Boolean indicating if the sensitive class should be added to hide the input from quantum metrics */\n @Input()\n sensitive = false;\n\n /** Name value will be applied to the input element if present */\n @Input()\n name: string | null = null;\n\n /**\n * Object containing the error key and corresponding error text to show the user. Error text can contain placeholders\n * Todo: improve validation message documentation.\n */\n @Input()\n validationMessages: { [key: string]: string } = {};\n\n /**\n * Name of the icon to display at the end of the input\n */\n @Input()\n iconName: SvgLibraryIcon;\n\n /**\n * Labels for aria attribute of the icon\n */\n @Input()\n iconAriaLabel: string;\n\n @Output() iconClicked: EventEmitter = new EventEmitter();\n\n @Input()\n tooltipHeading: string;\n\n @Input()\n tooltipContent: string;\n\n @Input()\n tooltipOptions: PopoverOptions;\n\n tabIndex: number;\n\n constructor(cdRef: ChangeDetectorRef, injector: Injector, @Attribute('tabindex') tabIndex: string) {\n super(cdRef, injector);\n this.tabIndex = parseInt(tabIndex, 10) || 0;\n }\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n get empty(): boolean {\n return !(this.value || '').trim();\n }\n\n private firstError(): any {\n if (!this.ngControl) {\n return { key: undefined, data: undefined };\n }\n const errors = this.ngControl.errors;\n if (!errors) {\n return { key: undefined, data: undefined };\n }\n const key = Object.keys(errors).filter((k) => errors[k])[0];\n\n return {\n key,\n data: errors[key],\n };\n }\n\n get printError(): string {\n const firstError = this.firstError();\n if (!firstError.key) {\n return '';\n }\n const searchKey = firstError.key.toLowerCase();\n\n for (const key in this.validationMessages) {\n // eslint-disable-next-line no-prototype-builtins\n if (this.validationMessages.hasOwnProperty(key) && key.toLowerCase() === searchKey) {\n return replaceMsgFormat(this.validationMessages[key], firstError.data);\n }\n }\n\n return '';\n }\n\n emitClickedIcon(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n this.iconClicked.emit();\n }\n}\n","import { createAction, union, props } from '@ngrx/store';\n\nexport const setViewedNotification = createAction('[Common] setViewedNotification', props<{ id: number }>());\nexport const clearViewedNotification = createAction('[Common] clearViewedNotification', props<{ id: number }>());\nexport const clearAllViewedNotification = createAction('[Common] clearViewedNotification');\n\nconst all = union({ setViewedNotification, clearViewedNotification, clearAllViewedNotification });\n\nexport type NotificationsActionsUnion = typeof all;\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { LocationRouteType } from '@fcom/core-api/interfaces';\nimport { PaxAmount } from '@fcom/dapi/interfaces';\nimport { PreviousSearch } from '@fcom/booking-widget/interfaces';\n\nimport { TripType, GlobalBookingTripDates } from '../../interfaces';\nimport { GlobalBookingFlight, GlobalBookingState, TravelClassAvailabilityMap } from '../store.interface';\n\nexport const updateSelection = createAction(\n '[GlobalBookingActions] UpdateSelection',\n props<{ selection: GlobalBookingState }>()\n);\n\nexport const setTripType = createAction('[GlobalBookingActions] SetTripType', props<{ tripType: TripType }>());\n\nexport const setTravelClass = createAction(\n '[GlobalBookingActions] SetTravelClass',\n props<{ travelClass: GlobalBookingTravelClass }>()\n);\n\nexport const setOrigin = createAction('[GlobalBookingActions] SetOrigin', props<{ origin: string }>());\n\nexport const setRouteType = createAction(\n '[GlobalBookingActions] SetRouteType',\n props<{ routeType: LocationRouteType }>()\n);\n\nexport const increasePaxAmountField = createAction(\n '[GlobalBookingActions] IncreasePaxAmountField',\n props<{ field: string; increment: number }>()\n);\n\nexport const decreasePaxAmountField = createAction(\n '[GlobalBookingActions] DecreasePaxAmountField',\n props<{ field: string; decrement: number }>()\n);\n\nexport const setDiscountCode = createAction(\n '[GlobalBookingActions] SetDiscountCode',\n props<{ discountCode: string }>()\n);\nexport const setAvailableClasses = createAction(\n '[GlobalBookingActions] setAvailableClasses',\n props<{ availability: TravelClassAvailabilityMap }>()\n);\n\nexport const setSelection = createAction('[GlobalBookingActions] SetSelection', props<{ selection: PreviousSearch }>());\n\nexport const setPaxAmount = createAction('[GlobalBookingActions] SetPaxAmount', props<{ paxAmount: PaxAmount }>());\n\nexport const paymentVerified = createAction('[GlobalBookingActions] HandlePaymentStatus');\n\nexport const resetSelection = createAction('[GlobalBookingActions] ResetSelection');\n\nexport const setFlights = createAction(\n '[GlobalBookingActions] SetFlights',\n props<{\n flights: GlobalBookingFlight[];\n }>()\n);\nexport const updateFlight = createAction(\n '[GlobalBookingActions] UpdateFlight',\n props<{\n flight: GlobalBookingFlight;\n index: number;\n }>()\n);\n\nexport const addFlight = createAction('[GlobalBookingActions] AddFlight');\nexport const removeFlight = createAction('[GlobalBookingActions] RemoveFlight', props<{ index: number }>());\n\nexport const setFlightDate = createAction(\n '[GlobalBookingActions] SetFlightDate',\n props<{ dates: GlobalBookingTripDates; index: number }>()\n);\n\nconst all = union({\n setFlightDate,\n setTripType,\n setTravelClass,\n setOrigin,\n setRouteType,\n setPaxAmount,\n decreasePaxAmountField,\n increasePaxAmountField,\n setDiscountCode,\n setSelection,\n paymentVerified,\n resetSelection,\n setFlights,\n updateFlight,\n updateSelection,\n});\n\nexport type GlobalBookingActionsUnion = typeof all;\n","import { createReducer, on } from '@ngrx/store';\n\nimport { NotificationActions } from '../actions';\nimport { NotificationsState } from '../store.interface';\n\nexport const initialState: NotificationsState = {\n viewedNotifications: [],\n};\n\nconst notificationReducer = createReducer(\n initialState,\n on(NotificationActions.setViewedNotification, (state, { id }) => ({\n ...state,\n viewedNotifications: [...state.viewedNotifications, id],\n })),\n on(NotificationActions.clearViewedNotification, (state, { id }) => ({\n ...state,\n viewedNotifications: state.viewedNotifications.filter((idInStore) => idInStore !== id),\n })),\n on(NotificationActions.clearAllViewedNotification, (state) => ({\n ...state,\n viewedNotifications: [],\n }))\n);\n\nexport function reducer(state: NotificationsState, action: NotificationActions.NotificationsActionsUnion) {\n return notificationReducer(state, action);\n}\n\nexport const getViewedNotifications = (state: NotificationsState) => state.viewedNotifications;\n","import { createReducer, on } from '@ngrx/store';\n\nimport { GlobalBookingTravelClass, setIn, updateIn } from '@fcom/core';\nimport { TripType } from '@fcom/core/interfaces';\n\nimport { GlobalBookingActions } from '../actions';\nimport { GlobalBookingFlight, GlobalBookingState } from '../store.interface';\nimport { MAX_PAX_AMOUNT, MIN_LEAD_PAX_AMOUNT } from '../constants';\n\nexport const initialState: GlobalBookingState = {\n tripType: TripType.RETURN,\n travelClasses: {\n selected: GlobalBookingTravelClass.MIXED,\n availability: {\n MIXED: true,\n ECONOMY: true,\n ECOPREMIUM: false,\n BUSINESS: true,\n FIRST: false,\n },\n },\n origin: undefined,\n routeType: undefined,\n paxAmount: {\n adults: 1,\n c15s: 0,\n children: 0,\n infants: 0,\n },\n flights: [{ origin: undefined, destination: undefined, departureDate: undefined }],\n};\n\nconst globalBooking = createReducer(\n initialState,\n on(GlobalBookingActions.setTripType, (state, { tripType }) =>\n tripType === state.tripType\n ? state\n : {\n ...state,\n tripType,\n flights:\n tripType === TripType.ONEWAY\n ? [state.flights[0]]\n : tripType === TripType.RETURN\n ? [\n state.flights[0],\n {\n ...state.flights[0],\n origin: state.flights?.[0]?.destination,\n destination: state.flights?.[0]?.origin,\n departureDate: undefined,\n },\n ]\n : [state.flights[0], {}],\n }\n ),\n on(GlobalBookingActions.setTravelClass, (state, { travelClass }) => ({\n ...state,\n travelClasses: {\n ...state.travelClasses,\n selected: travelClass === GlobalBookingTravelClass.FIRST ? GlobalBookingTravelClass.BUSINESS : travelClass,\n },\n })),\n on(GlobalBookingActions.setOrigin, (state, { origin }) => ({\n ...state,\n origin,\n })),\n on(GlobalBookingActions.setRouteType, (state, { routeType }) => ({\n ...state,\n routeType,\n })),\n on(GlobalBookingActions.setFlightDate, (state, { dates, index }) => ({\n ...state,\n flights:\n state.tripType === TripType.RETURN\n ? [\n { ...state.flights[0], departureDate: dates.departureDate },\n { ...state.flights[1], departureDate: dates.returnDate },\n ]\n : [\n ...state.flights.slice(0, index),\n { ...state.flights[index], departureDate: dates.departureDate },\n ...state.flights.slice(index + 1),\n ],\n })),\n on(GlobalBookingActions.setPaxAmount, (state, { paxAmount }) => ({\n ...state,\n paxAmount,\n })),\n on(GlobalBookingActions.increasePaxAmountField, (state, { field, increment }) =>\n updatePaxAmountField(state, field, (old) => old + increment)\n ),\n on(GlobalBookingActions.decreasePaxAmountField, (state, { field, decrement }) =>\n updatePaxAmountField(state, field, (old) => Math.max(old - decrement, 0))\n ),\n on(GlobalBookingActions.setDiscountCode, (state, { discountCode }) => ({\n ...state,\n discountCode,\n })),\n on(GlobalBookingActions.setSelection, (state, { selection }) => ({\n ...state,\n paxAmount: selection.paxAmount,\n flights: selection.flights,\n tripType: selection.tripType,\n travelClasses: { ...state.travelClasses, selected: selection.travelClass },\n discountCode: selection.discountCode ?? undefined,\n })),\n on(GlobalBookingActions.resetSelection, (state) => ({\n ...state,\n paxAmount: initialState.paxAmount,\n flights: [{ origin: state.flights[0]?.origin }],\n tripType: initialState.tripType,\n travelClasses: initialState.travelClasses,\n discountCode: initialState.discountCode,\n })),\n on(GlobalBookingActions.updateSelection, (state, { selection }) => ({\n ...state,\n ...selection,\n })),\n // This was moved here from booking reducer, is it even relevant?\n // Should we move PaymentActions and PaymentStatus under common?\n // Data Clean-ups: When Payment verified\n on(GlobalBookingActions.paymentVerified, (state) => ({\n ...state,\n flights: [{ origin: state.flights[0].origin }],\n })),\n on(GlobalBookingActions.setFlights, (state, { flights }) => {\n return {\n ...state,\n flights,\n };\n }),\n on(GlobalBookingActions.updateFlight, (state, { flight, index }) => ({\n ...state,\n flights: updateFlights(state, flight, index),\n })),\n on(GlobalBookingActions.addFlight, (state) => ({\n ...state,\n flights: [\n ...state.flights,\n {\n origin: state.flights[state.flights.length - 1]?.destination,\n destination: undefined,\n departureDate: undefined,\n },\n ],\n })),\n on(GlobalBookingActions.removeFlight, (state, { index }) => ({\n ...state,\n flights: state.flights.filter((_f, i) => i !== index),\n })),\n on(GlobalBookingActions.setAvailableClasses, (state, { availability }) => ({\n ...state,\n travelClasses: {\n ...state.travelClasses,\n availability: {\n ...Object.keys(initialState.travelClasses.availability).reduce(\n (availableClasses, travelClass: GlobalBookingTravelClass) => {\n availableClasses[travelClass] = false;\n return availableClasses;\n },\n {}\n ),\n ...availability,\n },\n },\n }))\n);\n\nconst updatePaxAmountField = (state: GlobalBookingState, field: string, mutator: (oldValue: number) => number) => {\n const newState = disallowMoreInfantsThanAdults(updateIn(state, ['paxAmount', field], mutator));\n const newLeadPaxAmount = newState?.paxAmount?.adults;\n const newTotal = newLeadPaxAmount + state?.paxAmount?.c15s + state?.paxAmount?.children;\n if (newTotal > MAX_PAX_AMOUNT || newLeadPaxAmount < MIN_LEAD_PAX_AMOUNT) {\n return state;\n }\n return newState;\n};\n\nconst disallowMoreInfantsThanAdults = (state: GlobalBookingState) => {\n const numAdults = state.paxAmount.adults;\n if (state.paxAmount.infants > numAdults) {\n return setIn(state, 'paxAmount.infants', numAdults);\n }\n return state;\n};\n\nexport const globalBookingReducer = (\n state: GlobalBookingState,\n action: GlobalBookingActions.GlobalBookingActionsUnion\n): GlobalBookingState => {\n return globalBooking(state, action);\n};\n\nconst updateFlights = (\n state: GlobalBookingState,\n updatedFlightData: GlobalBookingFlight,\n indexFlightNeedUpdate: number\n): GlobalBookingFlight[] => {\n switch (state.tripType) {\n case TripType.MULTICITY:\n return state.flights.map((flight, index) => {\n if (index === indexFlightNeedUpdate) {\n return { ...flight, ...updatedFlightData };\n }\n\n if (index === indexFlightNeedUpdate + 1) {\n return !flight.origin ? { ...flight, origin: updatedFlightData.destination } : flight;\n }\n\n return flight;\n });\n\n case TripType.RETURN:\n return [\n { ...state.flights[0], ...updatedFlightData },\n {\n ...state.flights[1],\n origin: updatedFlightData.destination,\n destination: updatedFlightData.origin,\n },\n ];\n\n default:\n return state.flights.map((flight, index) =>\n index === indexFlightNeedUpdate ? { ...flight, ...updatedFlightData } : flight\n );\n }\n};\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport * as fromNotification from './notification.reducer';\nimport { globalBookingReducer } from './global-booking.reducer';\nimport { CommonState } from '../store.interface';\n\nexport const reducers: ActionReducerMap = {\n notifications: fromNotification.reducer,\n globalBooking: globalBookingReducer,\n};\n","import { createSelector, createFeatureSelector } from '@ngrx/store';\n\nimport { CommonState, CommonFeatureState } from '../store.interface';\nimport * as fromNotification from '../reducers/notification.reducer';\nimport { COMMON_FEATURE_KEY } from '../constants';\n\nconst selectCommonState = createFeatureSelector(COMMON_FEATURE_KEY);\nconst selectNotificationState = createSelector(selectCommonState, (state: CommonState) => state.notifications);\n\nexport const getViewedNotifications = createSelector(selectNotificationState, fromNotification.getViewedNotifications);\n","import { NgModule } from '@angular/core';\n\nimport { StoreModule } from '@ngrx/store';\n\nimport { COMMON_FEATURE_KEY } from './constants';\nimport { reducers } from './reducers';\n\n@NgModule({\n imports: [StoreModule.forFeature(COMMON_FEATURE_KEY, reducers)],\n})\nexport class CommonStoreModule {}\n","import { FinnairLocation } from '@fcom/dapi/api/models';\nimport { isPresent } from '@fcom/core/utils';\nimport { Location } from '@fcom/core-api';\n\n/**\n * List of short haul country codes\n * Taken from ancillaries microservice\n */\nconst shortHaulCountries: string[] = [\n 'AT',\n 'BE',\n 'BG',\n 'CH',\n 'CY',\n 'CZ',\n 'DE',\n 'DK',\n 'ES',\n 'FI',\n 'FR',\n 'GB',\n 'GR',\n 'HU',\n 'IE',\n 'IT',\n 'LT',\n 'LU',\n 'LV',\n 'NL',\n 'NO',\n 'PL',\n 'PT',\n 'RO',\n 'SE',\n 'SK',\n 'IL',\n 'HR',\n 'TR',\n 'SI',\n 'MT',\n 'EE',\n 'RU',\n 'IS',\n 'EG',\n];\n\nexport const isShortHaulCountry = (countryCode: string): boolean =>\n shortHaulCountries.some((country) => country === countryCode?.toUpperCase());\n\nexport const isShortHaulFlight = (\n departureLocation: FinnairLocation | Location,\n arrivalLocation: FinnairLocation | Location\n): boolean => {\n if (!isPresent(departureLocation) || !isPresent(arrivalLocation)) {\n return true;\n }\n return isShortHaulCountry(departureLocation.countryCode) && isShortHaulCountry(arrivalLocation.countryCode);\n};\n","import { Type } from '@angular/core';\nimport { Route } from '@angular/router';\n\nimport { Step } from './../interfaces';\nimport { ClientOnlyComponent } from '../components/helpers/client-only.component';\n\nexport function createRoute(\n step: Step,\n componentType: Type,\n onUnload: any = [],\n canActivateGuard: any = [],\n resolveGuard: any = []\n): Route {\n return {\n path: step.path,\n component: step.data?.server ? componentType : ClientOnlyComponent,\n data: {\n componentType,\n ...step.data,\n },\n canActivate: canActivateGuard,\n resolve: resolveGuard,\n canDeactivate: onUnload,\n };\n}\n","import { Observable, of, switchMap, forkJoin, map } from 'rxjs';\n\nimport { LocationRouteCffService } from '@fcom/core';\nimport { AmDestinationOffer, AmDestinationResponseItem } from '@fcom/destination-search/interfaces';\nimport { BlockOfferData } from '@fcom/cms';\n\nexport const mapToAmDestinationOffer = (amDestination: AmDestinationResponseItem): AmDestinationOffer => ({\n dest: amDestination.dest,\n bookUrl: amDestination.bookUrl,\n price: {\n // AM service is only avalible in finnish market\n currencyCode: 'EUR',\n amount: amDestination.price.toString(),\n },\n duration: amDestination.duration,\n});\n\nexport const getOfferWithAmDestination = (\n offer: BlockOfferData[],\n amDestinationList$: Observable,\n locationRouteCffService: LocationRouteCffService\n): Observable =>\n amDestinationList$.pipe(\n switchMap((amDestinationList: AmDestinationResponseItem[]) =>\n forkJoin(offer.map((offer) => addAmDestination(amDestinationList, offer, locationRouteCffService)))\n )\n );\n\nconst addAmDestination = (\n amDestinationList: AmDestinationResponseItem[],\n offer: BlockOfferData,\n locationRouteCffService: LocationRouteCffService\n): Observable => {\n if (!amDestinationList || !offer) {\n return of(offer);\n }\n const amDestination = amDestinationList.find((amDestination) => amDestination.dest === offer?.destination);\n //If target destination match none of destination in am list, then convert the city name to finnish to check again\n if (!amDestination) {\n return locationRouteCffService.getLocaleCityName(offer?.destination, 'fi_FI').pipe(\n map((localeCityName) => {\n const destination = amDestinationList.find((amDestination) => amDestination.destName_fi === localeCityName);\n return { ...offer, amDestination: destination ? mapToAmDestinationOffer(destination) : null };\n })\n );\n }\n return of({ ...offer, amDestination: amDestination ? mapToAmDestinationOffer(amDestination) : null });\n};\n","import {\n AirCalendarList,\n FinnairAirCalendarChangeListResponse,\n FinnairCalendarChangeItineraryItem,\n FinnairRequestItineraryItem,\n} from '@fcom/dapi/api/models';\nimport { isPresent } from '@fcom/core/utils';\n\nexport const isBookingCalendarList = (\n calendarList: FinnairAirCalendarChangeListResponse | AirCalendarList\n): calendarList is AirCalendarList => isPresent((calendarList as AirCalendarList).finnairSearchParameters);\n\nexport const isChangeItinerary = (\n itinerary: FinnairCalendarChangeItineraryItem[] | FinnairRequestItineraryItem[]\n): itinerary is FinnairCalendarChangeItineraryItem[] => {\n return (itinerary as FinnairCalendarChangeItineraryItem[]).some((item) => isPresent(item.boundId));\n};\n","import { TzDate } from '@fcom/core/index';\n\nexport enum ThirdPartyAncillariesProvider {\n CAR_TRAWLER_RENTAL = 'CAR_TRAWLER_RENTAL',\n CAR_TRAWLER_TRANSFER = 'CAR_TRAWLER_TRANSFER',\n CAR_TRAWLER_SMARTBLOCK = 'CAR_TRAWLER_SMARTBLOCK',\n}\n\nconst REMOVE_TIMEZONE = /(Z|\\+|-)(\\d|:){0,5}$/;\n\nconst carTrawlerRentalLangMap = {\n 'dk-da': 'da',\n 'de-de': 'de',\n 'ch-de': 'ch',\n 'at-de': 'de',\n 'ee-et': 'et',\n 'us-en': 'en-us',\n 'es-es': 'es',\n 'fr-fr': 'fr',\n 'ca-fr': 'fr-ca',\n 'ch-fr': 'fr',\n 'it-it': 'it',\n 'no-no': 'no',\n 'pl-pl': 'pl',\n 'fi-fi': 'fi',\n 'se-sv': 'sv',\n 'ru-ru': 'ru',\n 'kr-ko': 'ko',\n 'jp-ja': 'ja',\n 'hk-zh': 'zh-hk',\n 'cn-zh': 'zh',\n};\n\nconst carRentalTransferLangMap = {\n 'dk-da': 'da-DK',\n 'ch-de': 'de-CH',\n 'de-de': 'de-DE',\n 'gb-en': 'en-GB',\n 'us-en': 'en-US',\n 'es-es': 'es-ES',\n 'ee-et': 'et-EE',\n 'fi-fi': 'fi-FI',\n 'ca-fr': 'fr-CA',\n 'fr-fr': 'fr-FR',\n 'it-it': 'it-IT',\n 'jp-ja': 'ja-JP',\n 'kr-ko': 'ko-KR',\n 'no-no': 'no-NO',\n 'pl-pl': 'pl-PL',\n 'ru-ru': 'ru-RU',\n 'se-sv': 'sv-SE',\n 'cn-zh': 'zh-CN',\n 'hk-zh': 'zh-HK',\n 'tw-zh': 'zh-TW',\n};\n\nconst carRentalSmartBlockLangMap = {\n ...carRentalTransferLangMap,\n};\n\nexport const carTrawlerCountryLangMap = {\n [ThirdPartyAncillariesProvider.CAR_TRAWLER_RENTAL]: carTrawlerRentalLangMap,\n [ThirdPartyAncillariesProvider.CAR_TRAWLER_TRANSFER]: carRentalTransferLangMap,\n [ThirdPartyAncillariesProvider.CAR_TRAWLER_SMARTBLOCK]: carRentalSmartBlockLangMap,\n};\n\nexport const carTrawlerSupportedCurrencies = [\n 'EUR',\n 'SEK',\n 'DKK',\n 'NOK',\n 'CHF',\n 'PLN',\n 'HUF',\n 'CZK',\n 'GBP',\n 'USD',\n 'AUD',\n 'CAD',\n 'HKD',\n 'CNY',\n 'SGD',\n 'JPY',\n 'KRW',\n 'INR',\n 'THB',\n];\n\nexport const getCarTrawlerLang = (provider: ThirdPartyAncillariesProvider, finnairLocale: string): string => {\n return carTrawlerCountryLangMap[provider]?.[finnairLocale] || 'en';\n};\n\nexport const supportedCarTrawlerCurrencies = (finnairCurrency: string): string => {\n return carTrawlerSupportedCurrencies.includes(finnairCurrency) ? finnairCurrency : 'EUR';\n};\n\n/**\n * Manipulate an ISO 8601 dateTime string into the format that CarTrawler requires.\n *\n * Example format that CarTrawler requires 2024-06-20T05:15:00\n *\n * 1) CarTrawler wants local datetime, but no timezone in the string.\n * 2) CarTrawler transfers.finnair.com site does not allow milliseconds in the string\n */\nexport const getCarTrawlerDateTime = (dateTime: string, addHours: number): string => {\n return new TzDate(dateTime.replace(REMOVE_TIMEZONE, 'Z')).addHours(addHours).toISOString().split('.')[0];\n};\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n","export const BUS_AIRCRAFT_CODE = 'BUS';\nexport const TRAIN_AIRCRAFT_CODE = 'TRN';\n\nexport enum TransportType {\n Flight = 'FLIGHT',\n Bus = 'BUS',\n Train = 'TRAIN',\n Unknown = 'UNKNOWN',\n}\n\nexport const GENDER_OPTIONS = [{ value: 'mr' }, { value: 'ms' }];\n\nexport enum Title {\n MS = 'Ms.',\n MRS = 'Mrs.',\n MR = 'Mr.',\n}\n\nexport enum FrequentFlyerTierLevel {\n PLUS = 'PLUS',\n SILVER = 'SILV',\n GOLD = 'GOLD',\n PLATINUM = 'PLAT',\n LUMO = 'LUMO',\n JUNIOR = 'JUNR',\n}\n","import { Injectable } from '@angular/core';\n\nimport { iif, Observable, of } from 'rxjs';\nimport { catchError, map, share, switchMap, withLatestFrom } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { ConfigService } from '@fcom/core/services';\nimport {\n AirCalendarList,\n Cabin,\n FinnairAirBoundsRequest,\n FinnairAirBoundsResponse,\n FinnairRequestItineraryItem,\n FinnairSearchParameters,\n OfferList,\n StatusCode,\n} from '@fcom/dapi/api/models';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\nimport { FlightSearchParams, PriceCalendarService, PriceCalendarWithPricesParams } from '@fcom/common';\nimport { OffersService } from '@fcom/dapi/api/services';\nimport { isPresent } from '@fcom/core/utils';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { CommonFeatureState } from '@fcom/common/store';\nimport { loginStatus } from '@fcom/core/selectors';\nimport { LoginStatus } from '@fcom/core-api/login';\n\nimport { notificationWarnings } from '../store';\nimport { NotificationWarning, SeasonalNotificationData, WarningData } from '../interfaces';\nimport { getBookingWidgetCabinClass } from '../utils/utils';\nimport { BookingWidgetActions } from '../store/actions';\n\n@Injectable()\nexport class BookingWidgetCalendarService {\n static NUMBER_OF_RETRIES = 2;\n\n loginStatus$: Observable;\n\n constructor(\n private store$: Store,\n private commonStore$: Store,\n private languageService: LanguageService,\n private configService: ConfigService,\n private offersService: OffersService,\n private priceCalendarService: PriceCalendarService\n ) {\n this.loginStatus$ = this.commonStore$.pipe(loginStatus(), finShare());\n }\n\n getAirCalendar(params: FlightSearchParams): Observable {\n const airCalendarRequest = this.createOffersRequest(params);\n return this.loginStatus$.pipe(\n switchMap((status) => {\n if (airCalendarRequest.isAward && status !== LoginStatus.LOGGED_IN) {\n this.setNotificationWarning(NotificationWarning.GENERAL);\n return of({ airCalendars: undefined, status: StatusCode.INVALID_INPUT, messages: [] } as AirCalendarList);\n }\n return this.offersService.findAirCalendar(this.configService.cfg.offersUrl, { body: airCalendarRequest }).pipe(\n switchMap((airCalendarList: AirCalendarList) => {\n if (isPresent(airCalendarList.airCalendars)) {\n this.store$.dispatch(BookingWidgetActions.setAirCalendarPrices({ prices: airCalendarList }));\n return of(airCalendarList);\n } else if (params.isAward) {\n const priceCalendarParams: PriceCalendarWithPricesParams = {\n origin: params.flights[0]?.origin.locationCode,\n destination: params.flights[0]?.destination.locationCode,\n tripType: params.tripType,\n travelClass: params.travelClass,\n paxAmount: params.paxAmount,\n };\n return this.priceCalendarService\n .getPricesForFollowingMonth(priceCalendarParams, params.flights[0]?.departureDate)\n .pipe(\n map((prices) => {\n this.setNotificationWarning(\n Object.entries(prices || {}).length === 0\n ? NotificationWarning.NO_FLIGHTS\n : NotificationWarning.NO_AWARD_FLIGHTS\n );\n return { airCalendars: undefined, status: StatusCode.NO_FLIGHTS_FOUND, messages: [] };\n })\n );\n } else {\n this.setNotificationWarning(NotificationWarning.NO_FLIGHTS);\n return of({ airCalendars: undefined, status: StatusCode.NO_FLIGHTS_FOUND, messages: [] });\n }\n }),\n retryWithBackoff(BookingWidgetCalendarService.NUMBER_OF_RETRIES),\n catchError(() => {\n this.setNotificationWarning(NotificationWarning.GENERAL);\n\n return of({ airCalendars: undefined, status: StatusCode.NO_FLIGHTS_FOUND, messages: [] });\n }),\n share()\n );\n })\n );\n }\n\n checkFlightAvailabilityAndContinue(params: FlightSearchParams): Observable {\n return iif(\n () => params.isAward,\n this.checkOffersAvailability(params),\n this.checkAirboundsAvailability(params)\n ).pipe(\n withLatestFrom(this.store$.pipe(notificationWarnings(), finShare())),\n map(([response, storeNotificationMap]: [OfferList | FinnairAirBoundsResponse, Record]) => {\n if (!response || !response?.status) {\n this.setNotificationWarning(NotificationWarning.GENERAL);\n return false;\n }\n\n if (storeNotificationMap[NotificationWarning.GENERAL]?.isActive) {\n // remove the general notification if stored previously\n this.setNotificationWarning(NotificationWarning.GENERAL, false);\n }\n\n const hasAvailability = ![StatusCode.NO_FLIGHTS_FOUND, StatusCode.NO_FLIGHTS_LEFT_FOR_TODAY].includes(\n response.status\n );\n\n if (!hasAvailability) {\n this.setNotificationWarning(NotificationWarning.NO_FLIGHTS);\n }\n return hasAvailability;\n })\n );\n }\n\n checkOffersAvailability(params: FlightSearchParams): Observable {\n const offersRequest: FinnairSearchParameters = this.createOffersRequest(params);\n\n return this.offersService\n .findOfferList(this.configService.cfg.offersUrl, { body: offersRequest })\n .pipe(share())\n .pipe(\n retryWithBackoff(BookingWidgetCalendarService.NUMBER_OF_RETRIES),\n catchError(() => of(undefined)),\n finShare()\n );\n }\n\n checkAirboundsAvailability(params: FlightSearchParams): Observable {\n const airBoundsRequest: FinnairAirBoundsRequest = this.createAirboundsRequest(params);\n return this.offersService\n .findAirBounds(this.configService.cfg.offersUrl, { body: airBoundsRequest })\n .pipe(share())\n .pipe(\n retryWithBackoff(BookingWidgetCalendarService.NUMBER_OF_RETRIES),\n catchError(() => of(undefined)),\n finShare()\n );\n }\n\n private setNotificationWarning(type: NotificationWarning, isActive = true, data?: SeasonalNotificationData): void {\n this.store$.dispatch(\n BookingWidgetActions.setNotificationWarning({\n key: type,\n isActive,\n data: data,\n })\n );\n }\n\n private createOffersItinerary(params: FlightSearchParams): FinnairRequestItineraryItem[] {\n const { flights } = params;\n\n return flights.map((flight) => ({\n departureDate: flight.departureDate?.id,\n departureLocationCode: flight.origin?.locationCode,\n destinationLocationCode: flight.destination?.locationCode,\n }));\n }\n\n private createOffersRequest(params: FlightSearchParams): FinnairSearchParameters {\n const itinerary = this.createOffersItinerary(params);\n return {\n adults: params.paxAmount.adults,\n c15s: params.paxAmount.c15s,\n cabin: getBookingWidgetCabinClass(\n params.travelClass,\n params.isCorporate,\n this.configService.cfg.enableCorporateTravelClassLimit\n ) as string as Cabin,\n children: params.paxAmount.children,\n infants: params.paxAmount.infants,\n isAward: params.isAward,\n itinerary,\n locale: params.locale,\n promoCode: params.promoCode,\n };\n }\n\n private createAirboundsRequest({\n paxAmount,\n flights,\n travelClass,\n isCorporate,\n }: FlightSearchParams): FinnairAirBoundsRequest {\n return {\n cabin: getBookingWidgetCabinClass(\n travelClass,\n isCorporate,\n this.configService.cfg.enableCorporateTravelClassLimit\n ) as string as Cabin,\n locale: this.languageService.localeValue,\n travelers: paxAmount,\n itineraries: flights.map((flight, i) => ({\n departureDate: flight.departureDate.id,\n departureLocationCode: flight.origin.locationCode,\n destinationLocationCode: flight.destination.locationCode,\n directFlights: false,\n isRequestedBound: i === 0,\n })),\n };\n }\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * If the source observable completes without emitting a value, it will emit\n * an error. The error will be created at that time by the optional\n * `errorFactory` argument, otherwise, the error will be {@link EmptyError}.\n *\n * ![](throwIfEmpty.png)\n *\n * ## Example\n *\n * Throw an error if the document wasn't clicked within 1 second\n *\n * ```ts\n * import { fromEvent, takeUntil, timer, throwIfEmpty } from 'rxjs';\n *\n * const click$ = fromEvent(document, 'click');\n *\n * click$.pipe(\n * takeUntil(timer(1000)),\n * throwIfEmpty(() => new Error('The document was not clicked within 1 second'))\n * )\n * .subscribe({\n * next() {\n * console.log('The document was clicked');\n * },\n * error(err) {\n * console.error(err.message);\n * }\n * });\n * ```\n *\n * @param errorFactory A factory function called to produce the\n * error to be thrown when the source observable completes without emitting a\n * value.\n * @return A function that returns an Observable that throws an error if the\n * source Observable completed without emitting.\n */\nexport function throwIfEmpty(errorFactory: () => any = defaultErrorFactory): MonoTypeOperatorFunction {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n hasValue = true;\n subscriber.next(value);\n },\n () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))\n )\n );\n });\n}\n\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LazyLoadImageModule } from 'ng-lazyload-image';\n\nimport { ImageComponent } from './image/image.component';\n\n@NgModule({\n declarations: [ImageComponent],\n imports: [CommonModule, LazyLoadImageModule],\n exports: [ImageComponent],\n providers: [],\n})\nexport class ImagesModule {}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nconst TAGS = /<[^>]*>/g;\n\n@Pipe({\n name: 'finStripHtml',\n})\nexport class StripHtmlPipe implements PipeTransform {\n transform(input: string, replaceWith = ''): string {\n if (typeof input !== 'string') {\n return input;\n }\n return input.replace(TAGS, replaceWith);\n }\n}\n","import { JsConfig } from '../../interfaces';\nimport { environment } from '../../../../environments/environment';\n\nconst getJsConfig = (): JsConfig => {\n let overrides;\n if (environment.isServer) {\n overrides = require('@fcom/server/server/jsConfigOverride').jsConfigOverride;\n } else {\n // @TODO: How to handle separate configs for real/dev servers\n try {\n overrides = require('jsConfigOverride');\n } catch (e) {\n overrides = {};\n }\n }\n\n return Object.assign({}, environment, overrides);\n};\n\nexport const jsConfig = getJsConfig();\n","\n \n \n \n {{ 'leftSeatsAvailable' | finPluralLocalization: quota }}\n \n \n \n {{ 'pricesStartingFrom' | finLocalization }}\n \n\n \n \n \n \n {{ (isShowTotalPrice ? prices.totalPrice : prices.price) | finPrice }}\n \n {{ (isShowTotalPrice ? prices.originalTotalPrice : prices.originalPrice) | finPrice }}\n \n \n \n {{\n {\n amount: (selectedFareFamilyPerCabin$ | finMap: cabin | async).totalPrice,\n currencyCode: currencyCode,\n } | finPrice\n }}\n \n \n \n\n\n\n {{\n 'travelClass.' + (cabin | lowercase) | finLocalization\n }}\n \n \n \n\n : {{ 'ticketSelection.header.selectTicketTypeBelow' | finLocalization }}\n \n\n\n\n {{ selectedFareFamily.benefits.brandName }}\n \n\n\n
    \n \n \n
    \n
    \n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n \n \n @if ((cabinIsExpanded$ | async) === cabin) {\n \n \n
    \n \n \n
    \n \n \n \n }\n \n \n
\n\n\n \n\n","import { AfterViewInit, Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\nimport {\n BehaviorSubject,\n combineLatest,\n distinctUntilChanged,\n EMPTY,\n filter,\n map,\n Observable,\n of,\n Subscription,\n take,\n} from 'rxjs';\n\nimport { Cabin, TranslatedBenefitRow } from '@fcom/dapi/api/models';\nimport { Amount } from '@fcom/dapi/interfaces';\nimport { unsubscribe } from '@fcom/core/index';\nimport { NotificationButtonStyle, TagTheme } from '@fcom/ui-components';\nimport { CabinClassSelectionFareFamily } from '@fcom/booking/modules/ticket-selection/interfaces';\nimport { effectiveCabinClass } from '@fcom/booking/modules/ticket-selection/utils/offer.utils';\nimport { ScrollService } from '@fcom/common/services';\n\nimport { DimensionsAndDetails, ExtendedFareFamily } from '../../../interfaces';\n\nconst SEATS_LEFT_LIMIT = 9;\ntype FareFamilyByCabin = Record;\n\n@Component({\n selector: 'fin-fare-family-list',\n styleUrls: ['./fare-family-list.component.scss'],\n templateUrl: './fare-family-list.component.html',\n})\nexport class FlightSelectionFareFamilyListComponent implements OnInit, OnDestroy, AfterViewInit {\n readonly Cabin = Cabin;\n readonly NotificationButtonStyle = NotificationButtonStyle;\n readonly SEATS_LEFT_LIMIT = SEATS_LEFT_LIMIT;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagTheme = TagTheme;\n\n @Input({ required: true }) fareFamilies$: Observable;\n @Input({ required: true }) currencyCode: string;\n @Input() showUpsellCard = false;\n @Input() showKoreaNotification = false;\n @Input() roundedTop = false;\n @Input() allowAutoExpand = false;\n @Input()\n preSelectedFareFamilyId: string;\n @Input()\n isShortHaul$: Observable;\n @Input()\n isLongHaulLegAndAy$: Observable = EMPTY;\n @Input()\n isShowTotalPrice = true;\n @Input()\n enableFareFamilyAutoScroll$: Observable = of(false);\n\n @Output() selectFareFamily = new EventEmitter<{\n fareFamily: ExtendedFareFamily;\n checked: boolean;\n }>();\n\n @Output() cabinIsExpanded = new EventEmitter();\n\n @Output() openCabinClassModal = new EventEmitter();\n\n @Output() fareFamilyAutoScrolled = new EventEmitter();\n\n private subscriptions: Subscription = new Subscription();\n\n fareFamiliesByCabin$: Observable;\n cabins$: Observable;\n cabinIsExpanded$ = new BehaviorSubject(null);\n minPricePerCabin$: Observable<\n Record<\n Cabin,\n {\n totalPrice: Amount;\n price: Amount;\n originalTotalPrice: Amount;\n originalPrice: Amount;\n quota: number;\n discountReasonCode?: string;\n isSpecialOffer?: boolean;\n }\n >\n >;\n selectedFareFamilyPerCabin$: Observable>;\n fareFamilyBenefits$: Observable>;\n uuid: string;\n isTicketTypeModalOpen = false;\n ticketTypeInfo$: Observable;\n cabinUpsellMap = {\n [Cabin.ECONOMY]: Cabin.ECOPREMIUM,\n [Cabin.ECOPREMIUM]: Cabin.BUSINESS,\n [Cabin.BUSINESS]: Cabin.FIRST,\n };\n defaultCabinOrder = [Cabin.ECONOMY, Cabin.ECOPREMIUM, Cabin.BUSINESS, Cabin.FIRST];\n upsellCardFareFamily$: Observable;\n\n // These are used for autoscroll for preselected fare family\n carouselReady$: BehaviorSubject = new BehaviorSubject(false);\n cabinExpandedAnimationEnded$: BehaviorSubject = new BehaviorSubject(false);\n\n constructor(\n private scrollService: ScrollService,\n @Inject(DOCUMENT) private document: Document\n ) {}\n\n ngOnInit(): void {\n this.uuid = uuid();\n this.fareFamiliesByCabin$ = this.fareFamilies$.pipe(\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n map((fareFamilies) => {\n return fareFamilies.reduce(\n (acc, fareFamily) => {\n const cabin = effectiveCabinClass(fareFamily) as Cabin;\n\n acc[cabin] = acc[cabin] || [];\n acc[cabin].push(fareFamily);\n\n return acc;\n },\n {} as Record\n );\n })\n );\n\n this.cabins$ = this.fareFamilies$.pipe(\n map((fareFamilies) => {\n return fareFamilies.reduce((acc, fareFamily) => {\n const cabin = effectiveCabinClass(fareFamily) as Cabin;\n if (!acc.includes(cabin)) {\n acc.push(cabin);\n }\n\n return acc;\n }, []);\n }),\n map((cabinList) =>\n cabinList.sort((a, b) => this.defaultCabinOrder.indexOf(a) - this.defaultCabinOrder.indexOf(b))\n )\n );\n\n this.selectedFareFamilyPerCabin$ = this.fareFamilies$.pipe(\n map((fareFamilies) => {\n return fareFamilies.reduce(\n (acc, fareFamily) => {\n const cabinClass = effectiveCabinClass(fareFamily);\n\n acc[cabinClass] = acc[cabinClass] || null;\n\n if (fareFamily.selected) {\n acc[effectiveCabinClass(fareFamily)] = fareFamily;\n }\n\n return acc;\n },\n {} as Record\n );\n })\n );\n\n this.subscriptions.add(\n this.cabins$.pipe(take(1)).subscribe((cabins) => {\n if (cabins.length === 1 && this.allowAutoExpand) {\n this.cabinIsExpanded$.next(cabins[0]);\n }\n })\n );\n\n this.minPricePerCabin$ = this.fareFamilies$.pipe(\n map((fareFamilies) => {\n return fareFamilies.reduce(\n (acc, fareFamily) => {\n const cabin = effectiveCabinClass(fareFamily);\n const currentLowestPrice = acc[cabin]?.totalPrice;\n\n if (!currentLowestPrice || Number(fareFamily.totalPrice) < Number(currentLowestPrice.amount)) {\n acc[cabin] = {\n totalPrice: {\n amount: fareFamily.totalPrice,\n currencyCode: this.currencyCode,\n },\n price: {\n amount: fareFamily.price,\n currencyCode: this.currencyCode,\n },\n isSpecialOffer: fareFamily?.isSpecialOffer,\n discountReasonCode: fareFamily?.discountReasonCode,\n quota: fareFamily.quota || 9,\n ...(fareFamily.originalPrice\n ? {\n originalPrice: {\n amount: fareFamily.originalPrice,\n currencyCode: this.currencyCode,\n },\n }\n : {}),\n ...(fareFamily.originalTotalPrice\n ? {\n originalTotalPrice: {\n amount: fareFamily.originalTotalPrice,\n currencyCode: this.currencyCode,\n },\n }\n : {}),\n };\n }\n\n return acc;\n },\n {} as Record<\n Cabin,\n {\n price: Amount;\n totalPrice: Amount;\n originalTotalPrice: Amount;\n originalPrice: Amount;\n quota: number;\n }\n >\n );\n })\n );\n\n this.ticketTypeInfo$ = combineLatest([this.fareFamilies$, this.cabinIsExpanded$]).pipe(\n map(([fareFamilies, expandedCabin]) => {\n if (!expandedCabin) {\n return null;\n }\n\n return {\n extendedFareFamilies: fareFamilies,\n cabinClass: expandedCabin,\n itineraries: [],\n };\n })\n );\n\n this.upsellCardFareFamily$ = combineLatest([this.cabinIsExpanded$, this.fareFamiliesByCabin$]).pipe(\n map(([currentCabin, fareFamiliesByCabin]) => {\n if (!this.showUpsellCard) {\n return null;\n }\n\n if (!currentCabin) {\n return null;\n }\n const nextCabinClass = this.findNextAvailableCabin(currentCabin, fareFamiliesByCabin);\n\n const nextCabinFareFamily: ExtendedFareFamily[] = fareFamiliesByCabin[nextCabinClass];\n\n if (!nextCabinFareFamily) {\n return null;\n }\n return {\n ...nextCabinFareFamily[0],\n cabinClass: nextCabinClass,\n preSelectFareFamily: nextCabinFareFamily[0],\n } as CabinClassSelectionFareFamily;\n })\n );\n\n this.subscriptions.add(\n this.cabinIsExpanded$.pipe(distinctUntilChanged()).subscribe((cabin) => {\n this.cabinIsExpanded.emit(cabin);\n })\n );\n }\n\n ngAfterViewInit(): void {\n this.subscriptions.add(\n combineLatest([\n this.enableFareFamilyAutoScroll$,\n this.carouselReady$,\n this.cabinExpandedAnimationEnded$,\n this.cabinIsExpanded$,\n ])\n .pipe(\n distinctUntilChanged(),\n filter(\n ([isFareFamilyAutoScrollEnabled, isReady, isEnded, isCabinExpanded]) =>\n isFareFamilyAutoScrollEnabled && isReady && isEnded && Boolean(isCabinExpanded)\n )\n )\n .subscribe(() => {\n const element = this.document.getElementById(this.preSelectedFareFamilyId);\n if (element) {\n this.scrollService.scrollToImmediate(element, 100, true, true);\n this.fareFamilyAutoScrolled.emit();\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n toggleCabin(cabin: Cabin): void {\n const nextValue = this.cabinIsExpanded$.getValue() ? null : cabin;\n this.cabinIsExpanded$.next(nextValue);\n }\n\n trackByFn(_i: number, item: ExtendedFareFamily): string {\n return item.fareFamilyCode;\n }\n\n openCabinAndSelect(fareFamily: CabinClassSelectionFareFamily): void {\n this.cabinIsExpanded$.next(fareFamily.cabinClass as Cabin);\n }\n\n private findNextAvailableCabin = (currentCabin: Cabin, fareFamiliesByCabin: FareFamilyByCabin) => {\n let nextCabin = this.cabinUpsellMap[currentCabin];\n // Loop to find the next available cabin by checking the keys in fareFamiliesByCabin\n while (nextCabin) {\n if (Object.keys(fareFamiliesByCabin).some((cabin) => cabin === nextCabin)) {\n return nextCabin;\n }\n nextCabin = this.cabinUpsellMap[nextCabin];\n }\n return null;\n };\n\n afterCarouselViewInit(): void {\n if (this.preSelectedFareFamilyId) {\n this.carouselReady$.next(true);\n }\n }\n\n cabinExpanded(): void {\n if (this.preSelectedFareFamilyId) {\n this.cabinExpandedAnimationEnded$.next(true);\n }\n }\n}\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { combineLatest, Observable } from 'rxjs';\nimport { filter, switchMap, take } from 'rxjs/operators';\n\nimport { AppState, ConfigService, NativeBridgeService } from '@fcom/core';\nimport { loginStatus, loginToken } from '@fcom/core/selectors';\nimport { isPresent } from '@fcom/core/utils';\nimport { LoginStatus } from '@fcom/core-api/login';\n\nconst containsUrl = (urlsToCheck: string[], url: string): boolean =>\n isPresent(urlsToCheck.find((urlToCheck: string) => url.indexOf(urlToCheck) >= 0));\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoginTokenInterceptor implements HttpInterceptor {\n static readonly LOGIN_TOKEN_HEADER = 'Authorization';\n static readonly LOGIN_TOKEN_PREFIX = 'Bearer ';\n\n constructor(\n private configService: ConfigService,\n private nativeBridgeService: NativeBridgeService,\n private store$: Store\n ) {}\n\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\n if (!containsUrl(this.configService.sendLoginTokenForUrls, req.url)) {\n return next.handle(req);\n }\n return combineLatest([\n this.store$.pipe(\n loginStatus(),\n filter((status: LoginStatus) => this.hasCorrectStatus(req, status))\n ),\n this.store$.pipe(loginToken()),\n ]).pipe(\n take(1),\n switchMap(([_status, token]) => {\n const request: HttpRequest = isPresent(token)\n ? req.clone({\n headers: req.headers.set(\n LoginTokenInterceptor.LOGIN_TOKEN_HEADER,\n `${LoginTokenInterceptor.LOGIN_TOKEN_PREFIX}${btoa(token)}`\n ),\n withCredentials: true,\n })\n : req;\n return next.handle(request);\n })\n );\n }\n\n private hasCorrectStatus(req: HttpRequest, status: LoginStatus): boolean {\n const notLoggedInsideApp = status === LoginStatus.INITIAL && this.nativeBridgeService.isInsideNativeWebView;\n const statusNotInitialOrPending = status !== LoginStatus.INITIAL && status !== LoginStatus.PENDING;\n const hasCorrectReqUrl = this.configService.cfg.loyaltyServices.legacy.apiProfileUrl.indexOf(req.url) >= 0;\n const statusPendingAndCustomerProfileUrl = status === LoginStatus.PENDING && hasCorrectReqUrl;\n\n return notLoggedInsideApp || statusNotInitialOrPending || statusPendingAndCustomerProfileUrl;\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\n\nimport {\n FinnairItineraryItem,\n FinnairItineraryItemFlight,\n ItineraryItemFlight,\n ItineraryItemLayover,\n} from '@fcom/dapi/api/models';\n\n/**\n * Map all flight numbers of one bound.\n */\n@Injectable()\n@Pipe({\n name: 'finFlightNumbers',\n pure: true,\n})\nexport class FlightNumbersPipe implements PipeTransform {\n transform(itinerary: (FinnairItineraryItem | ItineraryItemFlight | ItineraryItemLayover)[]): string {\n return (\n itinerary\n ?.map((i: FinnairItineraryItemFlight) => i?.flightNumber)\n .filter(Boolean)\n .join(', ') ?? ''\n );\n }\n}\n","\n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { combineLatest, Observable, of } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { FetchPriorityEnum } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common';\nimport { TripType } from '@fcom/core/interfaces';\nimport { safeMap, snapshot } from '@fcom/rx';\nimport { isBlank } from '@fcom/core/utils';\nimport { GtmService } from '@fcom/common/gtm';\nimport { GlobalBookingActions } from '@fcom/common/store';\nimport { AppState, GlobalBookingTravelClass } from '@fcom/core';\n\nimport { BlockOfferData, MarketingOffer, BlockOffer } from '../../interfaces';\nimport { CheapestPriceForAllDestinationsService } from '../../services';\n\n@Component({\n selector: 'fin-block-offer',\n templateUrl: './block-offer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockOfferComponent implements OnInit {\n @Output()\n destinationClicked: EventEmitter<[BlockOffer, GlobalBookingTravelClass]> = new EventEmitter();\n @Output()\n flightHotelClicked: EventEmitter<{ amLink: string; destination: string }> = new EventEmitter();\n @Output()\n calendarClicked: EventEmitter<[Event, BlockOffer, GlobalBookingTravelClass, TripType]> = new EventEmitter();\n\n @Input()\n tripType: TripType = TripType.RETURN;\n\n @Input()\n offer: BlockOfferData;\n\n @Input()\n fetchImagePriority?: keyof typeof FetchPriorityEnum;\n\n blockOffer$: Observable;\n\n constructor(\n private languageService: LanguageService,\n private store$: Store,\n private gtmService: GtmService,\n private cheapestPriceForAllDestinationsService: CheapestPriceForAllDestinationsService\n ) {}\n\n ngOnInit(): void {\n this.blockOffer$ = combineLatest([\n this.offer ? this.countryName(this.offer) : of(undefined),\n this.offer ? this.marketingOffer(this.offer) : of(undefined),\n ]).pipe(\n map(([countryName, marketingOffer]: [string, MarketingOffer]) => ({\n ...this.setUpPrices(this.offer, marketingOffer, this.tripType),\n countryName,\n marketingOffer,\n }))\n );\n }\n\n emitCalendarClick(\n [event, travelClass, tripType]: [Event, GlobalBookingTravelClass, TripType],\n blockOffer: BlockOffer\n ): void {\n this.calendarClicked.emit([event, blockOffer, travelClass, tripType]);\n }\n\n private countryName({ flag }: BlockOfferData): Observable {\n if (isBlank(flag)) {\n return of(undefined);\n }\n return this.languageService.translate('countryCodes').pipe(\n map((countries: any[]) => countries.find((country: any) => country.countryCode === flag.toUpperCase())),\n safeMap(({ name }) => name),\n startWith(undefined as string)\n );\n }\n\n private marketingOffer({ destination }: BlockOfferData): Observable {\n return this.cheapestPriceForAllDestinationsService.offerFor(destination, this.tripType).pipe(\n map((offer: MarketingOffer) => {\n return {\n ...offer,\n prices: offer.prices.filter(Boolean),\n };\n }),\n startWith(undefined as MarketingOffer)\n );\n }\n\n private setUpPrices(offer: BlockOfferData, marketingOffer: MarketingOffer, tripType: TripType): BlockOfferData {\n const priceOffer = marketingOffer?.prices.find((price) => price.travelClass === GlobalBookingTravelClass.ECONOMY);\n\n const onewayPrice = tripType === TripType.ONEWAY ? priceOffer : undefined;\n const returnPrice = tripType === TripType.RETURN ? priceOffer : undefined;\n\n return { ...offer, onewayPrice, returnPrice };\n }\n\n onLinkClick([travelClass]: [GlobalBookingTravelClass, TripType]): void {\n this.destinationClicked.emit([this.offer, travelClass]);\n this.prefillBookingWidget(travelClass);\n }\n\n prefillBookingWidget(travelClass: GlobalBookingTravelClass): void {\n const offerDestination = snapshot(this.blockOffer$)?.destination;\n if (offerDestination) {\n this.store$.dispatch(GlobalBookingActions.setTripType({ tripType: this.tripType }));\n this.store$.dispatch(\n GlobalBookingActions.setTravelClass({\n travelClass: travelClass === GlobalBookingTravelClass.BUSINESS ? travelClass : GlobalBookingTravelClass.MIXED,\n })\n );\n this.gtmService.trackElement(\n `tile-${this.tripType.toLowerCase()}-${travelClass.toLowerCase()}`,\n GaContext.BLOCK_OFFER,\n ElementTypes.BANNER,\n `${offerDestination}`,\n ElementActions.CLICK\n );\n }\n }\n}\n","/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, of } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { map } from 'rxjs/operators';\n\nimport { AppState, NativeBridgeService } from '@fcom/core';\nimport { casProfileName, casProfileOrNot, loginStatus } from '@fcom/core/selectors';\nimport { CasCustomerType, LoginStatus } from '@fcom/core-api/login';\nimport { finShare } from '@fcom/rx';\nimport { ButtonMode, ButtonSize, ButtonTheme, IconPosition } from '@fcom/ui-components';\n\nimport { ElementTypes } from '../../interfaces';\nimport { MediaQueryService } from '../../services';\n\nconst SHOW_BUTTON_STATES = [\n LoginStatus.LOGGED_IN,\n LoginStatus.NOT_LOGGED_IN,\n LoginStatus.ERROR,\n LoginStatus.PENDING,\n LoginStatus.INITIAL,\n];\n\n@Component({\n selector: 'fin-login-button',\n templateUrl: 'login-button.component.html',\n styleUrls: ['./login-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoginButtonComponent implements OnInit {\n readonly ButtonMode = ButtonMode;\n readonly ButtonSize = ButtonSize;\n readonly ButtonTheme = ButtonTheme;\n readonly ElementTypes = ElementTypes;\n readonly IconPosition = IconPosition;\n readonly LoginStatus = LoginStatus;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n showButton$: Observable;\n isMobile$: Observable;\n icon$: Observable;\n\n profileName$: Observable;\n loginStatus$: Observable;\n\n @Input()\n showName = false;\n\n @Input()\n nameStyle = 'font-body-1';\n\n @Input()\n trackingContext: string;\n\n constructor(\n private store$: Store,\n private nativeBridgeService: NativeBridgeService,\n private mediaQueryService: MediaQueryService\n ) {}\n\n ngOnInit(): void {\n this.profileName$ = this.store$.pipe(casProfileName());\n this.loginStatus$ = this.store$.pipe(loginStatus(), finShare());\n this.icon$ = this.store$.pipe(\n casProfileOrNot(),\n map((casProfile) => {\n if (!casProfile) {\n return SvgLibraryIcon.SINGLE_PAX;\n }\n if (casProfile.customerType === CasCustomerType.CORPORATE_USER) {\n return SvgLibraryIcon.B2B;\n }\n return SvgLibraryIcon.LOGGED_IN;\n })\n );\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n this.showButton$ = this.nativeBridgeService.isInsideNativeWebView\n ? of(false)\n : this.loginStatus$.pipe(\n map((s) => SHOW_BUTTON_STATES.indexOf(s) !== -1),\n finShare()\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.dev/license\n */\n\nimport {assertInInjectionContext, DestroyRef, inject} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n/**\n * Operator which completes the Observable when the calling context (component, directive, service,\n * etc) is destroyed.\n *\n * @param destroyRef optionally, the `DestroyRef` representing the current context. This can be\n * passed explicitly to use `takeUntilDestroyed` outside of an [injection\n * context](guide/di/dependency-injection-context). Otherwise, the current `DestroyRef` is injected.\n *\n * @developerPreview\n */\nexport function takeUntilDestroyed(destroyRef?: DestroyRef): MonoTypeOperatorFunction {\n if (!destroyRef) {\n assertInInjectionContext(takeUntilDestroyed);\n destroyRef = inject(DestroyRef);\n }\n\n const destroyed$ = new Observable((observer) => {\n const unregisterFn = destroyRef!.onDestroy(observer.next.bind(observer));\n return unregisterFn;\n });\n\n return (source: Observable) => {\n return source.pipe(takeUntil(destroyed$));\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.dev/license\n */\n\nimport {\n assertInInjectionContext,\n assertNotInReactiveContext,\n computed,\n DestroyRef,\n inject,\n Injector,\n signal,\n Signal,\n WritableSignal,\n ɵRuntimeError,\n ɵRuntimeErrorCode,\n} from '@angular/core';\nimport {ValueEqualityFn} from '@angular/core/primitives/signals';\nimport {Observable, Subscribable} from 'rxjs';\n\n/**\n * Options for `toSignal`.\n *\n * @publicApi\n */\nexport interface ToSignalOptions {\n /**\n * Initial value for the signal produced by `toSignal`.\n *\n * This will be the value of the signal until the observable emits its first value.\n */\n initialValue?: unknown;\n\n /**\n * Whether to require that the observable emits synchronously when `toSignal` subscribes.\n *\n * If this is `true`, `toSignal` will assert that the observable produces a value immediately upon\n * subscription. Setting this option removes the need to either deal with `undefined` in the\n * signal type or provide an `initialValue`, at the cost of a runtime error if this requirement is\n * not met.\n */\n requireSync?: boolean;\n\n /**\n * `Injector` which will provide the `DestroyRef` used to clean up the Observable subscription.\n *\n * If this is not provided, a `DestroyRef` will be retrieved from the current [injection\n * context](guide/di/dependency-injection-context), unless manual cleanup is requested.\n */\n injector?: Injector;\n\n /**\n * Whether the subscription should be automatically cleaned up (via `DestroyRef`) when\n * `toSignal`'s creation context is destroyed.\n *\n * If manual cleanup is enabled, then `DestroyRef` is not used, and the subscription will persist\n * until the `Observable` itself completes.\n */\n manualCleanup?: boolean;\n\n /**\n * Whether `toSignal` should throw errors from the Observable error channel back to RxJS, where\n * they'll be processed as uncaught exceptions.\n *\n * In practice, this means that the signal returned by `toSignal` will keep returning the last\n * good value forever, as Observables which error produce no further values. This option emulates\n * the behavior of the `async` pipe.\n */\n rejectErrors?: boolean;\n\n /**\n * A comparison function which defines equality for values emitted by the observable.\n *\n * Equality comparisons are executed against the initial value if one is provided.\n */\n equal?: ValueEqualityFn;\n}\n\n// Base case: no options -> `undefined` in the result type.\nexport function toSignal(source: Observable | Subscribable): Signal;\n// Options with `undefined` initial value and no `requiredSync` -> `undefined`.\nexport function toSignal(\n source: Observable | Subscribable,\n options: NoInfer> & {\n initialValue?: undefined;\n requireSync?: false;\n },\n): Signal;\n// Options with `null` initial value -> `null`.\nexport function toSignal(\n source: Observable | Subscribable,\n options: NoInfer> & {initialValue?: null; requireSync?: false},\n): Signal;\n// Options with `undefined` initial value and `requiredSync` -> strict result type.\nexport function toSignal(\n source: Observable | Subscribable,\n options: NoInfer> & {initialValue?: undefined; requireSync: true},\n): Signal;\n// Options with a more specific initial value type.\nexport function toSignal(\n source: Observable | Subscribable,\n options: NoInfer> & {initialValue: U; requireSync?: false},\n): Signal;\n\n/**\n * Get the current value of an `Observable` as a reactive `Signal`.\n *\n * `toSignal` returns a `Signal` which provides synchronous reactive access to values produced\n * by the given `Observable`, by subscribing to that `Observable`. The returned `Signal` will always\n * have the most recent value emitted by the subscription, and will throw an error if the\n * `Observable` errors.\n *\n * With `requireSync` set to `true`, `toSignal` will assert that the `Observable` produces a value\n * immediately upon subscription. No `initialValue` is needed in this case, and the returned signal\n * does not include an `undefined` type.\n *\n * By default, the subscription will be automatically cleaned up when the current [injection\n * context](guide/di/dependency-injection-context) is destroyed. For example, when `toSignal` is\n * called during the construction of a component, the subscription will be cleaned up when the\n * component is destroyed. If an injection context is not available, an explicit `Injector` can be\n * passed instead.\n *\n * If the subscription should persist until the `Observable` itself completes, the `manualCleanup`\n * option can be specified instead, which disables the automatic subscription teardown. No injection\n * context is needed in this configuration as well.\n *\n * @developerPreview\n */\nexport function toSignal(\n source: Observable | Subscribable,\n options?: ToSignalOptions & {initialValue?: U},\n): Signal {\n ngDevMode &&\n assertNotInReactiveContext(\n toSignal,\n 'Invoking `toSignal` causes new subscriptions every time. ' +\n 'Consider moving `toSignal` outside of the reactive context and read the signal value where needed.',\n );\n\n const requiresCleanup = !options?.manualCleanup;\n requiresCleanup && !options?.injector && assertInInjectionContext(toSignal);\n const cleanupRef = requiresCleanup\n ? (options?.injector?.get(DestroyRef) ?? inject(DestroyRef))\n : null;\n\n const equal = makeToSignalEqual(options?.equal);\n\n // Note: T is the Observable value type, and U is the initial value type. They don't have to be\n // the same - the returned signal gives values of type `T`.\n let state: WritableSignal>;\n if (options?.requireSync) {\n // Initially the signal is in a `NoValue` state.\n state = signal({kind: StateKind.NoValue}, {equal});\n } else {\n // If an initial value was passed, use it. Otherwise, use `undefined` as the initial value.\n state = signal>(\n {kind: StateKind.Value, value: options?.initialValue as U},\n {equal},\n );\n }\n\n // Note: This code cannot run inside a reactive context (see assertion above). If we'd support\n // this, we would subscribe to the observable outside of the current reactive context, avoiding\n // that side-effect signal reads/writes are attribute to the current consumer. The current\n // consumer only needs to be notified when the `state` signal changes through the observable\n // subscription. Additional context (related to async pipe):\n // https://github.com/angular/angular/pull/50522.\n const sub = source.subscribe({\n next: (value) => state.set({kind: StateKind.Value, value}),\n error: (error) => {\n if (options?.rejectErrors) {\n // Kick the error back to RxJS. It will be caught and rethrown in a macrotask, which causes\n // the error to end up as an uncaught exception.\n throw error;\n }\n state.set({kind: StateKind.Error, error});\n },\n // Completion of the Observable is meaningless to the signal. Signals don't have a concept of\n // \"complete\".\n });\n\n if (options?.requireSync && state().kind === StateKind.NoValue) {\n throw new ɵRuntimeError(\n ɵRuntimeErrorCode.REQUIRE_SYNC_WITHOUT_SYNC_EMIT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.',\n );\n }\n\n // Unsubscribe when the current context is destroyed, if requested.\n cleanupRef?.onDestroy(sub.unsubscribe.bind(sub));\n\n // The actual returned signal is a `computed` of the `State` signal, which maps the various states\n // to either values or errors.\n return computed(\n () => {\n const current = state();\n switch (current.kind) {\n case StateKind.Value:\n return current.value;\n case StateKind.Error:\n throw current.error;\n case StateKind.NoValue:\n // This shouldn't really happen because the error is thrown on creation.\n throw new ɵRuntimeError(\n ɵRuntimeErrorCode.REQUIRE_SYNC_WITHOUT_SYNC_EMIT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.',\n );\n }\n },\n {equal: options?.equal},\n );\n}\n\nfunction makeToSignalEqual(\n userEquality: ValueEqualityFn = Object.is,\n): ValueEqualityFn> {\n return (a, b) =>\n a.kind === StateKind.Value && b.kind === StateKind.Value && userEquality(a.value, b.value);\n}\n\nconst enum StateKind {\n NoValue,\n Value,\n Error,\n}\n\ninterface NoValueState {\n kind: StateKind.NoValue;\n}\n\ninterface ValueState {\n kind: StateKind.Value;\n value: T;\n}\n\ninterface ErrorState {\n kind: StateKind.Error;\n error: unknown;\n}\n\ntype State = NoValueState | ValueState | ErrorState;\n","export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function');","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FareRuleCategory } from '../models/fare-rule-category';\nimport { FareRules } from '../models/fare-rules';\nimport { FinnairCart } from '../models/finnair-cart';\nimport { FinnairCartRequest } from '../models/finnair-cart-request';\nimport { FinnairPassengerRequest } from '../models/finnair-passenger-request';\nimport { FinnairServiceRequestItem } from '../models/finnair-service-request-item';\n\n\n/**\n * Cart resources currently used\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class CartService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation createCart\n */\n static readonly CreateCartPath = '/api/v2/cart';\n\n /**\n * createCart.\n *\n * Creates an empty cart and returns the cart id\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `createCart()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n createCart$Response(rootUrl: string, params: {\n hash: string;\n body?: FinnairCartRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.CreateCartPath, 'post');\n\n if (params) {\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * createCart.\n *\n * Creates an empty cart and returns the cart id\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `createCart$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n createCart(rootUrl: string, params: {\n hash: string;\n body?: FinnairCartRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.createCart$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation getCart\n */\n static readonly GetCartPath = '/api/v2/cart/{cartId}';\n\n /**\n * getCart.\n *\n * Fetches current cart content using id\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getCart()` instead.\n *\n * This method doesn't expect any request body.\n */\n getCart$Response(rootUrl: string, params: {\n cartId: string;\n hash?: string;\n locale?: string;\n includeServiceCatalog?: boolean;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.GetCartPath, 'get');\n\n if (params) {\n rb.path('cartId', params.cartId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.query('includeServiceCatalog', params.includeServiceCatalog, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getCart.\n *\n * Fetches current cart content using id\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getCart$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getCart(rootUrl: string, params: {\n cartId: string;\n hash?: string;\n locale?: string;\n includeServiceCatalog?: boolean;\n },\n context?: HttpContext\n\n): Observable {\n return this.getCart$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairCart)\n );\n }\n\n /**\n * Path part for operation updatePassengerDetailsInCart\n */\n static readonly UpdatePassengerDetailsInCartPath = '/api/v2/cart/{cartId}/passengers';\n\n /**\n * updatePassengerDetailsInCart.\n *\n * Update passenger details in cart\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `updatePassengerDetailsInCart()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updatePassengerDetailsInCart$Response(rootUrl: string, params: {\n cartId: string;\n locale?: string;\n hash?: string;\n body: FinnairPassengerRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.UpdatePassengerDetailsInCartPath, 'put');\n\n if (params) {\n rb.path('cartId', params.cartId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * updatePassengerDetailsInCart.\n *\n * Update passenger details in cart\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `updatePassengerDetailsInCart$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updatePassengerDetailsInCart(rootUrl: string, params: {\n cartId: string;\n locale?: string;\n hash?: string;\n body: FinnairPassengerRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.updatePassengerDetailsInCart$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation addPassengerDetailsToCart\n */\n static readonly AddPassengerDetailsToCartPath = '/api/v2/cart/{cartId}/passengers';\n\n /**\n * addPassengerDetailsToCart.\n *\n * Adds passenger details into cart\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `addPassengerDetailsToCart()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n addPassengerDetailsToCart$Response(rootUrl: string, params: {\n cartId: string;\n locale?: string;\n hash?: string;\n body: FinnairPassengerRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.AddPassengerDetailsToCartPath, 'post');\n\n if (params) {\n rb.path('cartId', params.cartId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * addPassengerDetailsToCart.\n *\n * Adds passenger details into cart\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `addPassengerDetailsToCart$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n addPassengerDetailsToCart(rootUrl: string, params: {\n cartId: string;\n locale?: string;\n hash?: string;\n body: FinnairPassengerRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.addPassengerDetailsToCart$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation getFareRulesByCart\n */\n static readonly GetFareRulesByCartPath = '/api/v2/cart/{cartId}/rules';\n\n /**\n * getFareRulesByCart.\n *\n * Fetches fare rules based the cart offers, traveler id and fare rule category. Raw rules are always returned in English.\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getFareRulesByCart()` instead.\n *\n * This method doesn't expect any request body.\n */\n getFareRulesByCart$Response(rootUrl: string, params: {\n cartId: string;\n travelerId: string;\n ruleCategory: FareRuleCategory;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.GetFareRulesByCartPath, 'get');\n\n if (params) {\n rb.path('cartId', params.cartId, {});\n rb.query('travelerId', params.travelerId, {});\n rb.query('ruleCategory', params.ruleCategory, {});\n rb.query('hash', params.hash, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getFareRulesByCart.\n *\n * Fetches fare rules based the cart offers, traveler id and fare rule category. Raw rules are always returned in English.\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getFareRulesByCart$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getFareRulesByCart(rootUrl: string, params: {\n cartId: string;\n travelerId: string;\n ruleCategory: FareRuleCategory;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.getFareRulesByCart$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FareRules)\n );\n }\n\n /**\n * Path part for operation deleteAllSeats\n */\n static readonly DeleteAllSeatsPath = '/api/v2/cart/{cartId}/seats';\n\n /**\n * deleteSeatSelection.\n *\n * Delete all seat selections in cart\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `deleteAllSeats()` instead.\n *\n * This method doesn't expect any request body.\n */\n deleteAllSeats$Response(rootUrl: string, params: {\n cartId: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.DeleteAllSeatsPath, 'delete');\n\n if (params) {\n rb.path('cartId', params.cartId, {});\n rb.query('hash', params.hash, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * deleteSeatSelection.\n *\n * Delete all seat selections in cart\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `deleteAllSeats$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n deleteAllSeats(rootUrl: string, params: {\n cartId: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.deleteAllSeats$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation setServices\n */\n static readonly SetServicesPath = '/api/v2/cart/{cartId}/services';\n\n /**\n * manageServicesToCart.\n *\n * Adds/Remove/Updates services to the cart\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `setServices()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n setServices$Response(rootUrl: string, params: {\n cartId: string;\n hash?: string;\n locale?: string;\n body: Array\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CartService.SetServicesPath, 'post');\n\n if (params) {\n rb.path('cartId', params.cartId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * manageServicesToCart.\n *\n * Adds/Remove/Updates services to the cart\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `setServices$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n setServices(rootUrl: string, params: {\n cartId: string;\n hash?: string;\n locale?: string;\n body: Array\n },\n context?: HttpContext\n\n): Observable {\n return this.setServices$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { map, first } from 'rxjs/operators';\nimport { Observable, combineLatest } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { DateRange } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { DateFormat, DateFormatInput, LocalDate, Pattern, TzDate } from '@fcom/core/utils';\nimport { formatTime } from '@fcom/common';\nimport { getCityName } from '@fcom/common/utils/booking.utils';\nimport { FinnairBoundItem, FinnairOrder } from '@fcom/dapi/api/models';\nimport { Airport } from '@fcom/common/interfaces/booking';\n\nimport { CommonBookingFeatureState, orderData } from '../store';\n\n/**\n * Copied from finDateFormat\n */\nconst getPattern = (input: string) => DateFormat[input] || new Pattern(input);\n\n@Injectable()\nexport class UtilsService {\n constructor(\n private languageService: LanguageService,\n private store$: Store\n ) {}\n private currentDate: LocalDate = LocalDate.now();\n /**\n * Copied and modified from finDateFormat\n */\n getDate(input: DateFormatInput, pattern: string): Observable {\n return this.languageService.translate('date').pipe(\n map((translations: any) => {\n return new DateFormat(translations).format(input, getPattern(pattern));\n })\n );\n }\n\n getLocation(locationCode: string, dateTime: string): Observable {\n return combineLatest([\n this.store$.pipe(\n orderData(),\n map((order) => order?.locations)\n ),\n this.getDate(dateTime, 'WEEKDAY'),\n ]).pipe(\n first(),\n map(([locations, day]) => ({\n dateTime: `${formatTime(dateTime)} ${day}`,\n city: getCityName(locationCode, locations),\n airportCode: locationCode,\n airport: locations[locationCode].name,\n }))\n );\n }\n getDisabledDateRange(selectedBoundsForChange: Array, booking: FinnairOrder): DateRange {\n if (booking?.bounds?.length === 1 || selectedBoundsForChange?.length === 2 || !selectedBoundsForChange[0]) {\n return [];\n }\n const selectedBound = selectedBoundsForChange[0];\n const selectedBoundDeparture = new TzDate(selectedBound.departure.dateTime).toLocalDate();\n const otherBound = booking?.bounds?.find((bound) => bound.id !== selectedBound.id);\n const otherBoundDeparture = new TzDate(otherBound?.departure?.dateTime).toLocalDate();\n\n if (selectedBoundDeparture.lte(otherBoundDeparture)) {\n return [otherBoundDeparture, this.currentDate.plusDays(361)];\n }\n return [this.currentDate, new TzDate(otherBound.arrival.dateTime).toLocalDate()];\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { EMPTY, NEVER, Observable, of } from 'rxjs';\nimport { catchError, map, switchMap, take, takeUntil } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { RootPaths, SentryLogger, WindowRef } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { mapError, mapErrorForSentry, isPresent } from '@fcom/core/utils';\nimport { OrderService } from '@fcom/dapi/api/services';\nimport { DapiHttpResponse } from '@fcom/dapi/api/dapi-http-response';\nimport { IdAndHash } from '@fcom/dapi/interfaces';\nimport { BookingAndAppState } from '@fcom/common/interfaces/booking';\nimport { cartIdAndHash } from '@fcom/booking/store/selectors/cart.selector';\nimport { finShare } from '@fcom/rx';\n\nimport { mapDeviceForPayment } from '../utils/payment.utils';\nimport { PaymentActions } from '../store/actions';\nimport { orderFetchInformation } from '../store/selectors/order.selector';\nimport { QueueService } from './queue.service';\nimport { PaymentFlow, PaymentServiceName, PaymentStatus } from '../interfaces';\n\n@Injectable()\nexport class PaymentService {\n static ROOT_PATHS = {\n [PaymentFlow.BOOKING]: RootPaths.BOOKING_ROOT,\n [PaymentFlow.MANAGE_BOOKING]: RootPaths.MANAGE_BOOKING_ROOT,\n [PaymentFlow.VOLUNTARY_CHANGE]: RootPaths.VOLUNTARY_CHANGE_ROOT,\n [PaymentFlow.CHECK_IN_FUNNEL]: RootPaths.MANAGE_BOOKING_ROOT + '/check-in/step',\n };\n\n constructor(\n private configService: ConfigService,\n private store$: Store,\n private sentryLogger: SentryLogger,\n private windowRef: WindowRef,\n private orderService: OrderService,\n private queueService: QueueService,\n private languageService: LanguageService\n ) {}\n\n queuePaymentInit(serviceName: PaymentServiceName, paymentFlow: PaymentFlow): void {\n this.queueService.cancelServiceAvailability$.next();\n\n const cancelStream$ = this.queueService.toCancelEvent(this.queueService.cancelPayment);\n this.queueService.sendToQueue(\n 'paymentInit',\n this.fromOrderCart((idAndHash: IdAndHash) =>\n this.triggerPaymentInit(\n idAndHash.id,\n idAndHash.hash,\n this.languageService.localeValue,\n this.languageService.langValue,\n cancelStream$,\n serviceName,\n paymentFlow,\n idAndHash.orderChangeId\n )\n ),\n cancelStream$\n );\n }\n\n /**\n * Triggers payment init. Fetches payment tokenizer url and paymentid\n *\n * @param cartOrOrderId the id of the cart or order\n * @param hash the hash signature of the cart or order\n * @param locale the locale we want the tokenizer form, example: fi_FI\n * @param lang the language to use in urls\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n * @param service differentiate which flow was used to trigger the payment\n * @param paymentFlow in which workflow is the payment happening\n * @param orderChangeId the order change id gotten from voluntary change flow\n */\n public triggerPaymentInit(\n cartOrOrderId: string,\n hash: string,\n locale: string,\n lang: string,\n cancelStream$: Observable = NEVER,\n service: PaymentServiceName,\n paymentFlow: PaymentFlow,\n orderChangeId?: string\n ): Observable {\n const cartOrOrderIdParam = cartOrOrderId.length === 6 ? 'orderId' : 'cartId';\n const paymentInitData$ = this.orderService\n .initializeCheckoutV2$Response(this.configService.cfg.orderUrl, {\n hash,\n [cartOrOrderIdParam]: cartOrOrderId,\n ...(orderChangeId && { orderChangeId }),\n locale,\n device: mapDeviceForPayment(this.windowRef.nativeWindow.screen.width),\n service,\n ...this.getUrls(paymentFlow, lang),\n })\n .pipe(\n // eslint-disable-next-line rxjs/no-implicit-any-catch\n catchError((errorResponse: HttpErrorResponse) => {\n this.sentryLogger.error('Error initializing payment', {\n error: mapErrorForSentry(mapError(errorResponse)),\n });\n this.store$.dispatch(PaymentActions.setPaymentStatus({ status: PaymentStatus.TECHNICAL_ERROR }));\n return EMPTY;\n }),\n finShare(),\n takeUntil(cancelStream$)\n );\n\n paymentInitData$.pipe(take(1)).subscribe({\n next: (response) => {\n this.store$.dispatch(PaymentActions.setPaymentRedirectionUrl({ url: response.headers.get('Location') }));\n // This has to be set to something different than Initialize because of the success/fail redirection, and the root.reducer\n this.store$.dispatch(PaymentActions.setPaymentStatus({ status: PaymentStatus.PENDING_VERIFICATION }));\n },\n // eslint-disable-next-line rxjs/no-implicit-any-catch\n error: (error: Error) => {\n this.sentryLogger.error('Error in payment init interaction', {\n error: mapErrorForSentry(error),\n });\n this.store$.dispatch(PaymentActions.setPaymentStatus({ status: PaymentStatus.TECHNICAL_ERROR }));\n },\n });\n\n return paymentInitData$.pipe(map((response: DapiHttpResponse) => response.body));\n }\n\n private getUrls(paymentFlow: PaymentFlow, lang: string): { successUrl: string; failureUrl: string } {\n const urlPrefix = `${document.location.origin}/${lang}`;\n const flowRootPath = PaymentService.ROOT_PATHS[paymentFlow];\n if (paymentFlow === PaymentFlow.CHECK_IN_FUNNEL) {\n return {\n successUrl: `${urlPrefix}/${flowRootPath}/rules/payment/success`,\n failureUrl: `${urlPrefix}/${flowRootPath}/know-your-trip/payment/error`,\n };\n }\n return {\n successUrl: `${urlPrefix}/${flowRootPath}/confirmation`,\n failureUrl: `${urlPrefix}/${flowRootPath}/payment/error`,\n };\n }\n\n private fromOrderCart = (fn: (idAndHash: IdAndHash) => Observable) => {\n const orderIdAndHash$ = this.store$.pipe(orderFetchInformation(), finShare());\n\n const cartInfo$ = this.store$.pipe(cartIdAndHash(), take(1));\n\n return orderIdAndHash$.pipe(\n switchMap((idAndHash) => {\n return isPresent(idAndHash) ? of(idAndHash) : cartInfo$;\n }),\n switchMap((a) => fn(a))\n );\n };\n}\n","import { Observable, pipe } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\nimport { createFeatureSelector, createSelector, select } from '@ngrx/store';\n\nimport {\n CasProfile,\n LoginAccessToken,\n LoginPhase,\n LoginPhaseError,\n LoginPhaseProfile,\n LoginState,\n LoginStatus,\n Profile,\n ProfileType,\n} from '@fcom/core-api/login';\nimport { finShare, safeMap } from '@fcom/rx';\n\nimport { BaseState } from '../interfaces';\nimport { safeSelect, StateSelector } from './selector-utils';\n\nconst ACCESS_TOKEN: keyof LoginState = 'accessToken';\nconst TOKEN: keyof LoginAccessToken = 'token';\n\nexport const loginSelector = createFeatureSelector('login');\nexport const loginStatusSelector = createSelector(loginSelector, (l) => l.loginStatus);\nexport const profileTypeSelector = createSelector(loginSelector, (l) => l?.type || undefined);\nexport const profileSelector = createSelector(loginSelector, (l) => l.profile);\nexport const casProfileSelector = createSelector(loginSelector, (l) => l.casProfile);\nexport const tokenSelector = createSelector(loginSelector, (l) => {\n return l?.[ACCESS_TOKEN]?.[TOKEN] || undefined;\n});\nexport const loginPhaseSelector = createSelector(loginSelector, (l) => l?.loginPhase || undefined);\nexport const loginPhaseProfileSelector = createSelector(loginPhaseSelector, (phase) => phase?.profile);\nexport const loginPhaseErrorSelector = createSelector(loginPhaseSelector, (phase) => phase?.error);\n\nexport const loginState = (): StateSelector => safeSelect(loginSelector);\nexport const loginStatus = (): StateSelector =>\n pipe(safeSelect(loginStatusSelector), distinctUntilChanged());\nexport const profileType = (): StateSelector => select(profileTypeSelector);\n\nexport const loginPhase = (): StateSelector => select(loginPhaseSelector);\nexport const loginPhaseProfile = (): StateSelector => select(loginPhaseProfileSelector);\nexport const loginPhaseError = (): StateSelector => select(loginPhaseErrorSelector);\n\n/** Profile, waits until we have one. Waits until user is logged in. See also profileOrUndefinedIfNotLoggedIn */\nexport const profile = (): StateSelector =>\n pipe(safeSelect(profileSelector), distinctUntilChanged());\n\n/** Profile if logged in, undefined if not ready yet or if not logged in */\nexport const profileOrNot = (): StateSelector => select(profileSelector);\n\nexport const casProfileOrNot = (): StateSelector => select(casProfileSelector);\n\n/** Token from the LoginAccessToken. Can be undefined. */\nexport const loginToken = (): StateSelector => select(tokenSelector);\n\n/**\n * Profile, waits over the INITIAL and PENDING states to know if we have a profile,\n * then returns either the profile or undefined\n */\nexport const profileOrUndefinedIfNotLoggedIn =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n loginState(),\n filter(\n (l: LoginState) =>\n l.loginStatus === LoginStatus.LOGGED_IN ||\n l.loginStatus === LoginStatus.NOT_LOGGED_IN ||\n l.loginStatus === LoginStatus.ERROR\n ),\n safeMap((l: LoginState) => l.profile), // l.profile is undefined if not logged in\n finShare()\n );\n\nexport const casProfileOrUndefinedIfNotLoggedIn =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n loginState(),\n filter(\n (l: LoginState) =>\n l.loginStatus === LoginStatus.LOGGED_IN ||\n l.loginStatus === LoginStatus.NOT_LOGGED_IN ||\n l.loginStatus === LoginStatus.ERROR\n ),\n safeMap((l: LoginState) => l.casProfile), // l.casProfile is undefined if not logged in\n finShare()\n );\n\n/**\n * Waits until the profile is available, if logged in and has a first name and last name they are returned otherwise null\n */\nexport const profileName =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n profileOrNot(),\n filter(Boolean),\n map((profileData: Profile) => {\n if (profileData.firstname && profileData.lastname) {\n return `${profileData.firstname} ${profileData.lastname}`;\n }\n\n return null;\n })\n );\n\nexport const casProfileName =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n casProfileOrNot(),\n filter(Boolean),\n map((profileData: CasProfile) => {\n if (profileData.firstName && profileData.lastName) {\n return `${profileData.firstName} ${profileData.lastName}`;\n }\n\n return null;\n })\n );\n\nexport const loginIsOpen =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n loginPhase(),\n map((phase) => !!phase?.step),\n finShare(),\n distinctUntilChanged()\n );\n","\n\n
\n \n
\n\n
\n
\n @if (passengerFormGroup.contains(FIELDS.gender)) {\n \n \n }\n
\n
\n \n
\n
\n\n\n 0\"\n >\n
\n

\n {{ 'paxDetails.copyFrom.title' | finLocalization }}\n

\n\n \n \n
\n \n\n \n\n \n \n \n
\n \n \n \n \n
\n \n
\n \n\n \n
\n \n \n\n \n \n
\n \n \n \n\n \n \n
{{ 'paxDetails.copyDetailsToAll.info' | finLocalization }}
\n \n
\n\n\n
\n {{ 'paxDetails.dateOfBirthLabel' | finLocalization }}\n
\n
\n \n \n\n \n \n\n \n \n
\n\n\n\n \n\n\n\n \n\n\n\n \n \n {{ 'paxDetails.frequentFlyerSection.title' | finLocalization }}\n \n\n \n \n
\n \n {{ 'paxDetails.fields.frequentFlyerCard.title' | finLocalization }}\n \n \n {{ 'paxDetails.fields.frequentFlyerCard.label' | finLocalization }}\n \n
\n \n
\n \n \n \n \n
\n \n \n \n
\n \n {{ 'paxDetails.fields.joinFinnairPlus.title' | finLocalization }}\n \n \n {{ 'paxDetails.fields.joinFinnairPlus.label' | finLocalization }}\n \n
\n \n
\n
\n\n\n
\n {{ 'paxDetails.mandatory' | finLocalization }}\n
\n\n\n

\n {{ 'paxDetails.frequentFlyerDetails' | finLocalization }}\n

\n

{{ 'paxDetails.frequentFlyerHelp' | finLocalization }}

\n \n \n \n
\n \n \n \n \n
\n \n
\n \n
\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { FormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, NEVER, Observable, of, Subscription, take } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';\n\nimport { ElementTypes, SelectOption } from '@fcom/common/interfaces';\nimport {\n isBlank,\n isEmpty,\n isFrequentFlyerNumber,\n PHONE_PATTERN,\n PHONE_PREFIX_PATTERN,\n sortBy,\n uniqueBy,\n unsubscribe,\n} from '@fcom/core/utils';\nimport { LanguageService } from '@fcom/ui-translate';\nimport {\n ControlData,\n FinnairFrequentFlyerCardItem,\n FinnairPassengerCode,\n FinnairPassengerItem,\n} from '@fcom/dapi/api/models';\nimport { ValidationErrors } from '@fcom/common/utils';\nimport { TypedFormGroup } from '@fcom/service-forms';\nimport { finShare } from '@fcom/rx';\nimport {\n ButtonMode,\n ButtonSize,\n ButtonTheme,\n ButtonType,\n CheckBoxTheme,\n IconButtonSize,\n IconButtonTheme,\n IconPosition,\n LoaderTheme,\n RadioButtonTheme,\n} from '@fcom/ui-components';\nimport { AppConstants } from '@fcom/booking/app-constants';\nimport { Profile, ProfileType } from '@fcom/core-api/login';\nimport { isFrequentFlyerFieldFilled } from '@fcom/booking/utils/passenger-utils';\nimport { CorporateUser } from '@fcom/common/interfaces/corporate/corporate.interface';\nimport { isCorporateAdminOrTravelBooker } from '@fcom/common/login/services/utils';\n\nimport { GENDER_OPTIONS } from '../../interfaces';\n\nexport const PaxFormFields = {\n gender: 'gender',\n firstName: 'firstName',\n lastName: 'lastName',\n type: 'type',\n email: 'email',\n phone: 'phone',\n phones: 'phones',\n phoneNumber: 'phoneNumber',\n phonePrefix: 'phonePrefix',\n birthDate: 'birthDate',\n yearOfBirth: 'yearOfBirth',\n monthOfBirth: 'monthOfBirth',\n dateOfBirth: 'dateOfBirth',\n frequentFlyerCard: 'frequentFlyerCard',\n frequentFlyerCards: 'frequentFlyerCards',\n companyCode: 'companyCode',\n cardNumber: 'cardNumber',\n joinFinnairPlus: 'joinFinnairPlus',\n};\n\nexport interface TranslatedCountryCode {\n countryCode: string;\n name: string;\n phonePrefix: string;\n}\n\nconst SEPARATOR: SelectOption = {\n name: '-------------------',\n value: '-------------------',\n disabled: true,\n};\n\nconst countryCodeToOption = (cc: TranslatedCountryCode): SelectOption =>\n cc && {\n name: `${cc.name} (+${cc.phonePrefix})`,\n value: `${cc.countryCode}|${cc.phonePrefix}`,\n };\n\nconst matchingCountryCode =\n (countryCode = '') =>\n (cc: TranslatedCountryCode) =>\n countryCode.toLowerCase() === (cc.countryCode || '').toLowerCase();\n\nexport const validateFrequentFlyer = (\n formGroup: UntypedFormGroup,\n existingCards: FinnairFrequentFlyerCardItem[]\n): ValidationErrors => {\n const companyCode = formGroup.get(PaxFormFields.companyCode);\n const cardNumber = formGroup.get(PaxFormFields.cardNumber);\n\n if (!companyCode.value && !cardNumber.value) {\n companyCode.setErrors(null);\n cardNumber.setErrors(null);\n return null;\n }\n\n if (!isFrequentFlyerNumber(companyCode.value, cardNumber.value) && !!companyCode.value) {\n cardNumber.setErrors({\n custom: 'notValidCardNumber',\n });\n } else if (\n existingCards?.some((card) => card.cardNumber === cardNumber.value && card.companyCode === companyCode.value)\n ) {\n cardNumber.setErrors({\n custom: 'sameCardNumberExists',\n });\n } else {\n cardNumber.setErrors(null);\n }\n\n companyCode.setErrors(Validators.required(companyCode));\n return null;\n};\n\nexport const validatePhoneNumber = (\n formGroup: UntypedFormGroup,\n phoneNumberRegex: string,\n required: boolean\n): ValidationErrors => {\n const phonePrefix = formGroup.get(PaxFormFields.phonePrefix);\n const phoneNumber = formGroup.get(PaxFormFields.phoneNumber);\n\n if (!phonePrefix.value && !phoneNumber.value && !required) {\n phonePrefix.setErrors(null);\n phoneNumber.setErrors(null);\n return null;\n }\n\n const phonePrefixValidation = Validators.compose([Validators.required, Validators.pattern(PHONE_PREFIX_PATTERN)])(\n phonePrefix\n );\n const phoneNumberValidation = Validators.compose([\n Validators.required,\n Validators.pattern(phoneNumberRegex || PHONE_PATTERN),\n ])(phoneNumber);\n\n phonePrefix.setErrors(phonePrefixValidation);\n phoneNumber.setErrors(phoneNumberValidation);\n return null;\n};\n\n@Component({\n selector: 'fin-pax-details-form-group',\n templateUrl: 'pax-details-form-group.component.html',\n styleUrls: ['pax-details-form-group.component.scss'],\n})\nexport class PaxDetailsFormGroupComponent implements OnInit, OnChanges, OnDestroy {\n @HostBinding('class.relative')\n @HostBinding('class.block')\n defaultClass = true;\n\n readonly FinnairPassengerCode = FinnairPassengerCode;\n readonly ElementTypes = ElementTypes;\n readonly LoaderTheme = LoaderTheme;\n\n readonly GENDER_OPTIONS = GENDER_OPTIONS;\n readonly FIELDS = PaxFormFields;\n readonly REQUIRED = Validators.required;\n readonly IconPosition = IconPosition;\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonType = ButtonType;\n readonly ButtonMode = ButtonMode;\n readonly ButtonSize = ButtonSize;\n readonly CheckBoxTheme = CheckBoxTheme;\n readonly C = AppConstants;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n readonly RadioButtonTheme = RadioButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() passengerFormGroup: TypedFormGroup;\n @Input() groupIndex: number;\n @Input() allowMultipleFFCards = false;\n @Input() trackingContext: string;\n\n @Input() controlData: ControlData;\n @Input() isMainPassenger = false;\n @Input() frequentFlyerAirlines$: Observable = of([]);\n @Input() availableDates: { days$: Observable; months: number[]; years: number[] };\n @Input() allFrequentFlyerCards: FinnairFrequentFlyerCardItem[];\n @Input() profileType$: Observable;\n @Input() profile$: Observable = NEVER;\n @Input() showContactDetails = false;\n @Input() hideDisabledFields = false;\n @Input() hideGroups = false;\n @Input() corporateUsers$: Observable;\n @Input() showCopyDetailsButton = false;\n @Input() copyFromPassengersList: FinnairPassengerItem[] = [];\n\n @Output() focusEvent: EventEmitter = new EventEmitter();\n @Output() blurEvent: EventEmitter = new EventEmitter();\n @Output() corporateUserSelected = new EventEmitter();\n @Output() corporateUserCleared = new EventEmitter();\n @Output() copyDetailsClicked: EventEmitter = new EventEmitter();\n\n @ViewChild('loaderContainer') loaderContainer: ElementRef;\n\n phonePrefixes$: Observable;\n frequentFlyerCardOptions$: Observable;\n frequentFlyerGroupConfig = {\n [PaxFormFields.companyCode]: ['', []],\n [PaxFormFields.cardNumber]: ['', []],\n };\n phoneNumbersGroupConfig = {\n [PaxFormFields.phoneNumber]: ['', []],\n [PaxFormFields.phonePrefix]: ['', []],\n };\n\n frequentFlyerGroupOptions = {\n validators: (formGroup: UntypedFormGroup): ValidationErrors =>\n validateFrequentFlyer(formGroup, this.allFrequentFlyerCards),\n };\n phoneGroupOptions = {\n validators: (formGroup: UntypedFormGroup): ValidationErrors =>\n validatePhoneNumber(formGroup, this.controlData?.phoneNumberRegex, this.isMainPassenger),\n };\n\n copyFromPassengerGroup: UntypedFormGroup;\n copyFromPassengers: SelectOption[];\n\n isFFCardInputDisabled: boolean;\n hasFFCardValue: boolean;\n shouldShowFFCardSection: boolean;\n isJoinFinnairPlusDisabled: boolean;\n hasJoinFinnairPlusValue: boolean;\n shouldShowJoinFinnairPlusSection: boolean;\n\n dayOptions$: Observable;\n monthOptions: SelectOption[];\n yearOptions: SelectOption[];\n frequentFlyerToggle$ = new BehaviorSubject(false);\n frequentFlyerIsOpen$: Observable = of(false);\n isCorporateAdminOrTravelBooker$: Observable;\n showLoader$ = new BehaviorSubject(false);\n\n subscriptions = new Subscription();\n\n constructor(\n private languageService: LanguageService,\n private elementRef: ElementRef,\n private changeDetectorRef: ChangeDetectorRef,\n private renderer: Renderer2,\n private fb: FormBuilder\n ) {}\n\n ngOnInit(): void {\n this.initializeCopyFrom();\n\n this.isFFCardInputDisabled = this.passengerFormGroup.get(PaxFormFields.frequentFlyerCard)?.disabled;\n this.isJoinFinnairPlusDisabled = this.passengerFormGroup.get(PaxFormFields.joinFinnairPlus)?.disabled;\n\n this.hasFFCardValue =\n this.passengerFormGroup.get([PaxFormFields.frequentFlyerCard, 'companyCode'])?.value !== '' &&\n this.passengerFormGroup.get([PaxFormFields.frequentFlyerCard, 'cardNumber'])?.value !== '';\n this.hasJoinFinnairPlusValue = this.passengerFormGroup.get(PaxFormFields.joinFinnairPlus)?.value !== '';\n\n this.shouldShowFFCardSection = !(this.hideDisabledFields && this.isFFCardInputDisabled && !this.hasFFCardValue);\n\n this.shouldShowJoinFinnairPlusSection = !(\n this.hideDisabledFields &&\n this.isJoinFinnairPlusDisabled &&\n !this.hasJoinFinnairPlusValue\n );\n\n // availableDates is not set for non-american routes as DoB is not required.\n this.dayOptions$ = this.availableDates?.days$.pipe(\n map((days) => {\n return days.map((day) => {\n return { name: String(day), value: String(day) };\n });\n })\n );\n\n this.monthOptions = this.availableDates?.months.map((month) => {\n return { name: String(month), value: String(month) };\n });\n\n this.yearOptions = this.availableDates?.years.map((year) => {\n return { name: String(year), value: String(year) };\n });\n\n const phonePrefixSelected = this.passengerFormGroup.controls[PaxFormFields.phone]?.value[PaxFormFields.phonePrefix];\n const phoneNumberFilled = this.passengerFormGroup.controls[PaxFormFields.phone]?.value[PaxFormFields.phoneNumber];\n const emailFilled = this.passengerFormGroup.controls[PaxFormFields.email]?.value;\n\n if (emailFilled || phoneNumberFilled || phonePrefixSelected) {\n this.showContactDetails = true;\n }\n\n this.setupPhonePrefixes();\n this.setupJoinFinnairPlus();\n\n this.passengerFormGroup.controls[PaxFormFields.frequentFlyerCard]?.addValidators((formGroup: UntypedFormGroup) =>\n validateFrequentFlyer(formGroup, this.allFrequentFlyerCards)\n );\n this.passengerFormGroup.controls[PaxFormFields.phone]?.addValidators((formGroup: UntypedFormGroup) =>\n validatePhoneNumber(formGroup, this.controlData.phoneNumberRegex, this.isMainPassenger)\n );\n const frequentFlyerCards = this.passengerFormGroup.controls[PaxFormFields.frequentFlyerCards];\n if (frequentFlyerCards) {\n this.frequentFlyerCardOptions$ = combineLatest([\n frequentFlyerCards.valueChanges.pipe(startWith(frequentFlyerCards.value as [])),\n this.frequentFlyerAirlines$,\n ]).pipe(\n map(([currentSelection, frequentFlyerAirlines]) => {\n if (isEmpty(currentSelection)) {\n return [frequentFlyerAirlines];\n }\n const selectedCodes = currentSelection.map((selected) => selected.companyCode);\n return currentSelection.map(({ companyCode }) =>\n frequentFlyerAirlines.filter(\n (airline) => !selectedCodes.includes(airline.value) || companyCode === airline.value\n )\n );\n }),\n distinctUntilChanged(),\n finShare()\n );\n }\n\n const frequentFlyerCard = this.passengerFormGroup.get(PaxFormFields.frequentFlyerCard);\n if (frequentFlyerCard) {\n this.frequentFlyerIsOpen$ = combineLatest([\n frequentFlyerCard.valueChanges.pipe(\n startWith({ companyCode: '', cardNumber: '' }), // to trigger valueChanges when already logged in\n map(({ companyCode, cardNumber }) => {\n return !isBlank(companyCode) || !isBlank(cardNumber);\n })\n ),\n this.frequentFlyerToggle$,\n ]).pipe(\n map(([ffHasData, toggle]) => {\n return ffHasData || toggle;\n })\n );\n }\n\n this.isCorporateAdminOrTravelBooker$ = this.profile$.pipe(\n map((profile) => isCorporateAdminOrTravelBooker(profile))\n );\n this.subscriptions.add(\n this.showLoader$.pipe(filter(Boolean), take(1)).subscribe(() => {\n setTimeout(() => {\n this.setLoaderContainerSize();\n });\n })\n );\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['copyFromPassengersList']) {\n this.copyFromPassengers = this.getCopyFromList();\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n private getCopyFromList(): SelectOption[] {\n return this.copyFromPassengersList.map((passenger) => ({\n name: `${passenger.firstName} ${passenger.lastName}`,\n value: passenger.id,\n }));\n }\n\n private initializeCopyFrom(): void {\n this.copyFromPassengers = this.getCopyFromList();\n\n this.copyFromPassengerGroup = this.fb.group({\n copyFromPassengers: [''],\n });\n\n this.subscriptions.add(\n this.copyFromPassengerGroup\n .get('copyFromPassengers')\n .valueChanges.pipe(filter((passengerId) => !!passengerId))\n .subscribe((passengerId) => {\n const copyFrom = this.copyFromPassengersList.find((p) => p.id === passengerId);\n\n this.passengerFormGroup.get(PaxFormFields.email).setValue(copyFrom.email);\n\n const createPhone = (number) =>\n this.fb.group(\n {\n [PaxFormFields.phonePrefix]: number?.countryPrefix\n ? `${number.countryCode}|${number.countryPrefix}`\n : '',\n [PaxFormFields.phoneNumber]: number?.number ?? '',\n },\n {\n validators: (formGroup: UntypedFormGroup) =>\n validatePhoneNumber(formGroup, this.controlData?.phoneNumberRegex, this.isMainPassenger),\n }\n );\n\n this.passengerFormGroup.setControl(\n PaxFormFields.phones,\n this.fb.array(\n copyFrom.phoneNumbers?.length > 0\n ? copyFrom.phoneNumbers.map((number) => {\n return createPhone(number);\n })\n : [createPhone({})]\n )\n );\n this.passengerFormGroup.markAsDirty();\n })\n );\n }\n\n private setLoaderContainerSize(): void {\n const parentTop = this.elementRef.nativeElement.getBoundingClientRect().top;\n const loaderTop = this.loaderContainer.nativeElement.getBoundingClientRect().top;\n this.renderer.setStyle(this.loaderContainer.nativeElement, 'height', `calc(100% - ${loaderTop - parentTop}px`);\n }\n\n private setupPhonePrefixes() {\n this.phonePrefixes$ = this.languageService.translate('countryCodes').pipe(\n map((countryCodes: TranslatedCountryCode[]) => {\n const locations = [this.controlData?.originCountryCode, this.controlData?.destinationCountryCode];\n const baseOptions = sortBy(countryCodes.map(countryCodeToOption), (option) => option.name);\n const optionsBasedOnLocations = locations\n .map((code) => countryCodeToOption(countryCodes.find(matchingCountryCode(code))))\n .filter((option) => !!option)\n .filter(uniqueBy((country) => country['value']));\n return optionsBasedOnLocations.length === 0\n ? baseOptions\n : [...optionsBasedOnLocations, SEPARATOR, ...baseOptions];\n })\n );\n }\n\n showContactDetailsFields(): void {\n this.showContactDetails = true;\n this.changeDetectorRef.detectChanges();\n\n this.elementRef.nativeElement.querySelector('[data-testid=\"pax-details-email\"] input')?.focus();\n }\n\n removeLeadingZero(event: Event): void {\n if (event.type !== 'input') {\n return;\n }\n\n const inputEvent = event as InputEvent;\n const inputField = event.target as HTMLInputElement;\n\n if (!inputEvent.inputType && inputField.value[0] === '0') {\n this.passengerFormGroup.get(this.FIELDS.phone).get(this.FIELDS.phoneNumber).setValue(inputField.value.slice(1));\n }\n }\n\n toggleFrequentFlyerSection(isOpen: boolean): void {\n const joinFinnairPlus = this.passengerFormGroup.get(PaxFormFields.joinFinnairPlus);\n this.frequentFlyerToggle$.next(isOpen);\n const frequentFlyer = this.passengerFormGroup.get(PaxFormFields.frequentFlyerCard);\n\n if (!isOpen) {\n frequentFlyer.get(PaxFormFields.cardNumber).setValue('');\n frequentFlyer.get(PaxFormFields.companyCode).setValue('');\n }\n if (isOpen && frequentFlyer.get(PaxFormFields.companyCode).value === '') {\n // Preselect Finnair\n frequentFlyer.get(PaxFormFields.companyCode).setValue('AY');\n }\n if (joinFinnairPlus.value === true) {\n joinFinnairPlus.setValue(false);\n }\n }\n\n toggleJoinFinnairPlus(): void {\n const joinFinnairPlus = this.passengerFormGroup.get(PaxFormFields.joinFinnairPlus);\n const frequentFlyer = this.passengerFormGroup.get(PaxFormFields.frequentFlyerCard);\n\n if (joinFinnairPlus.value) {\n this.frequentFlyerToggle$.next(false);\n frequentFlyer.get(PaxFormFields.cardNumber).setValue('');\n frequentFlyer.get(PaxFormFields.companyCode).setValue('');\n }\n }\n\n setupJoinFinnairPlus(): void {\n const frequentFlyer = this.passengerFormGroup.get(PaxFormFields.frequentFlyerCard);\n const joinFinnairPlus = this.passengerFormGroup.get(PaxFormFields.joinFinnairPlus);\n if (!frequentFlyer) {\n return;\n }\n // Set initial statuses\n if (\n isFrequentFlyerFieldFilled(\n frequentFlyer.get(PaxFormFields.cardNumber).value,\n frequentFlyer.get(PaxFormFields.companyCode).value\n )\n ) {\n this.frequentFlyerToggle$.next(true);\n joinFinnairPlus.setValue(false);\n } else if (joinFinnairPlus.value) {\n this.frequentFlyerToggle$.next(false);\n joinFinnairPlus.setValue(true);\n }\n }\n\n selectCorporateUser(user: CorporateUser): void {\n this.corporateUserSelected.emit(user);\n this.showContactDetails = true;\n }\n}\n","import { isBlank } from '@fcom/core/utils';\n\nexport interface AdultAndChildrenCount {\n adults: number;\n c15s: number;\n children: number;\n}\n\nexport const getAdultsAndChildren = (adults = 0, c15s = 0, children = 0, childrenAges = ''): AdultAndChildrenCount => {\n const listOfAges = childrenAges.split(',').filter((age) => !isBlank(age));\n const numberOfAges = listOfAges.length;\n const childrenIsDefined = children === numberOfAges;\n return listOfAges.reduce(\n (adultsAndChilds, currentValue) => {\n if (parseInt(currentValue, 10) > 15) {\n adultsAndChilds.adults++;\n if (childrenIsDefined) {\n adultsAndChilds.children--;\n }\n } else if (parseInt(currentValue, 10) > 11) {\n adultsAndChilds.c15s++;\n if (childrenIsDefined) {\n adultsAndChilds.children--;\n }\n } else {\n if (!childrenIsDefined) {\n adultsAndChilds.children++;\n }\n }\n return adultsAndChilds;\n },\n { adults, c15s, children }\n );\n};\n\nexport const isFrequentFlyerFieldFilled = (cardNumber: string, companyCode: string): boolean => {\n return !!cardNumber || !!companyCode;\n};\n","export enum ButtonSize {\n MEDIUM = 'button-medium',\n LARGE = 'button-large',\n}\n\nexport enum ButtonMode {\n FILL = 'fill',\n INLINE = 'inline',\n FILL_MOBILE = 'fill-mobile',\n}\n\nexport enum ButtonTheme {\n LIGHT_PRIMARY_NORDIC_BLUE = 'light-primary-nordic-blue',\n LIGHT_PRIMARY_CTA_HEATHER = 'light-primary-cta-heather',\n LIGHT_SECONDARY_OUTLINE = 'light-secondary-outline',\n LIGHT_TERTIARY_GHOST = 'light-tertiary-ghost',\n DARK_PRIMARY_NORDIC_BLUE = 'dark-primary-nordic-blue',\n DARK_PRIMARY_CTA_HEATHER = 'dark-primary-cta-heather',\n DARK_SECONDARY_OUTLINE = 'dark-secondary-outline',\n DARK_TERTIARY_GHOST = 'dark-tertiary-ghost',\n}\n\nexport enum ButtonType {\n SUBMIT = 'submit',\n BUTTON = 'button',\n MENU = 'menu',\n RESET = 'reset',\n}\n","\n
\n \n \n \n {{ attachment.file.name }}\n \n \n {{ attachment.file.name }}\n \n \n \n
\n
\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { type AbstractControl } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { AttachmentStatus, type Attachment } from '../../interfaces';\nimport { LoaderTheme } from '../../loader';\nimport { NotificationTheme } from '../../notifications';\n\n@Component({\n selector: 'fcom-attachment-list',\n templateUrl: './attachment-list.component.html',\n})\nexport class AttachmentListComponent {\n readonly AttachmentStatus = AttachmentStatus;\n readonly LoaderTheme = LoaderTheme;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input({ required: true }) attachments: Attachment[];\n @Input() ctrlField: AbstractControl;\n @Output() fileDeleted: EventEmitter = new EventEmitter();\n\n deleteAttachment(attachment: Attachment): void {\n this.fileDeleted.emit(attachment);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { PipesModule } from '@fcom/common/pipes';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { AbstractNgModelComponent } from './abstracts/abstract-ng-model.component';\nimport { AbstractCheckboxComponent } from './abstracts/abstract-checkbox.component';\nimport { AbstractInputComponent } from './abstracts/abstract-input.component';\nimport { FloatingInputComponent } from './floating-input/floating-input.component';\nimport { CheckboxComponent, FcomCheckboxRequiredValidator } from './checkbox/checkbox.component';\nimport { BlockSelectionGroupComponent } from './block-selection-group/block-selection-group.component';\nimport { BlockSelectionComponent, BlockSelectionRequiredValidator } from './block-selection/block-selection.component';\nimport { PopoverModule } from '../popover/popover.module';\nimport { RadioItemComponent } from './radio-item/radio-item.component';\nimport { TextInputComponent } from './text-input/text-input.component';\nimport { SelectInputComponent } from './select-input/select-input.component';\nimport { ButtonModule } from '../buttons';\nimport { FileUploaderComponent } from './file-uploader/file-uploader.component';\nimport { AttachmentListComponent } from './file-uploader/attachment-list.component';\nimport { NotificationsModule } from '../notifications';\nimport { LoaderModule } from '../loader';\nimport { RadioItemGroupComponent } from './radio-item-group/radio-item-group.component';\nimport { ComboBoxComponent } from './combo-box/combo-box.component';\n\n@NgModule({\n declarations: [\n AbstractCheckboxComponent,\n AbstractInputComponent,\n AbstractNgModelComponent,\n AttachmentListComponent,\n FileUploaderComponent,\n FloatingInputComponent,\n BlockSelectionGroupComponent,\n BlockSelectionComponent,\n BlockSelectionRequiredValidator,\n CheckboxComponent,\n FcomCheckboxRequiredValidator,\n RadioItemComponent,\n RadioItemGroupComponent,\n TextInputComponent,\n SelectInputComponent,\n ComboBoxComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n UiTranslateModule,\n IconsModule,\n ButtonModule,\n PipesModule,\n PopoverModule,\n NotificationsModule,\n LoaderModule,\n ],\n exports: [\n AbstractCheckboxComponent,\n AbstractInputComponent,\n AbstractNgModelComponent,\n AttachmentListComponent,\n FileUploaderComponent,\n FloatingInputComponent,\n BlockSelectionGroupComponent,\n BlockSelectionComponent,\n BlockSelectionRequiredValidator,\n CheckboxComponent,\n FcomCheckboxRequiredValidator,\n RadioItemComponent,\n RadioItemGroupComponent,\n TextInputComponent,\n SelectInputComponent,\n ComboBoxComponent,\n ],\n})\nexport class FcomFormsModule {}\n","import { LocalDate } from '@fcom/core/utils';\n\nimport { Month, Day } from '../../utils/date.interface';\n\nexport interface Calendar {\n today: Day;\n months: Month[];\n}\n\nexport type DateRange = [LocalDate?, LocalDate?];\n\nexport enum CalendarNavigationType {\n ARROWS = 'arrows',\n MIXED = 'mixed',\n}\n\nexport enum CalendarNavigationEvent {\n PREV,\n NEXT,\n}\n","import { pad } from './format';\nimport { isPresent } from './utils';\nimport { DateString } from './interfaces';\n\nconst MINUTE_IN_MILLIS = 60 * 1000;\nconst HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;\nconst DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS;\n\nexport class TzDate {\n private _millis: number;\n private _localDate: string;\n private _localTime: string;\n private _tzString: string;\n private _weekday: number; // [0-6]\n\n /**\n * Examples:\n * new Date(\"2016-10-28T08:20:23.897Z\"), offset=undefined -> \"11:20\"\n * \"2016-10-28T08:20:23.897Z\", offset=undefined -> \"08:20\"\n * \"2016-10-28T08:20:23.897+03:00\", offset=undefined -> \"08:20\"\n * new Date(\"2016-10-28T08:20:23.897Z\"), offset=0 -> \"08:20\"\n * \"2016-10-28T08:20:23.897Z\", offset=0 -> \"08:20\"\n * \"2016-10-28T08:20:23.897+03:00\", offset=0 -> \"05:20\"\n * \"2016-10-28T08:20:23.897+03:00\", offset = undefined -> 08:20\n * \"2016-10-28T08:20:23.897+03:00\", offset = 180000 => 08:20 11:20\n * Conversions from number\n * number, offset => date from millis, format in given timezone, offset = 0 => Z\n * Conversions from date (with / without timezone)\n * Date(\"2016-10-28T08:20:23.897Z\"), offset=-6*60*60*1000 => 02:20\n * Date(\"2016-10-28T11:20:23.897+03:00\"), offset=-6*60*60*1000 => 02:20\n * @param millis\n * @param tzOffsetMillis\n * @returns {string}\n */\n static fromMillis(millis: number, tzOffsetMillis = 0): TzDate {\n const localDateStringInWrongTimezone = new Date(millis + tzOffsetMillis).toISOString();\n const dateStringWithoutTimezone = localDateStringInWrongTimezone.substr(0, 23);\n\n if (tzOffsetMillis === 0) {\n return new TzDate(`${dateStringWithoutTimezone}Z`);\n }\n const timeZoneHours = parseInt(`${tzOffsetMillis / HOUR_IN_MILLIS}`, 10);\n const timeZoneMinutes = Math.abs(tzOffsetMillis % HOUR_IN_MILLIS);\n const prefix = timeZoneHours < 0 ? '-' : '+';\n const dateStringInCorrectTimezone = `${dateStringWithoutTimezone}${prefix}${pad(Math.abs(timeZoneHours))}:${pad(\n timeZoneMinutes\n )}`;\n return new TzDate(dateStringInCorrectTimezone);\n }\n\n static now(): TzDate {\n return this.fromMillis(Date.now());\n }\n\n static of(dateString: string): TzDate {\n return isPresent(dateString) ? new TzDate(dateString) : undefined;\n }\n\n /**\n * Construct a TzDate based on fullYear, month (1 = January, 12 = December), and day.\n * @param fullYear\n * @param monthOneBased\n * @param day\n * @return {TzDate}\n */\n static utcMidnight(fullYear: string | number, monthOneBased: string | number, day: string | number): TzDate {\n return TzDate.of(`${fullYear}-${pad(monthOneBased)}-${pad(day)}T00:00:00Z`);\n }\n\n constructor(ds: string) {\n const dateString = String(ds);\n\n // eslint-disable-next-line id-blacklist\n if (Number.isNaN(Date.parse(dateString))) {\n throw new Error(`Invalid TzDate: ${dateString}`);\n }\n\n this._millis = Date.parse(dateString);\n this._localDate = new Date(dateString.substr(0, 10)).toISOString().substr(0, 10);\n this._localTime = dateString.substr(11, 12);\n this._tzString = dateString.substr(23);\n this._weekday = this.toLocalDate().weekday;\n }\n\n get localHours(): number {\n return parseInt(this._localTime.substr(0, 2), 10);\n }\n\n get localMinutes(): number {\n return parseInt(this._localTime.substr(3, 2), 10);\n }\n\n get localDay(): number {\n return parseInt(this._localDate.substr(8, 2), 10);\n }\n\n get localMonth(): number {\n return parseInt(this._localDate.substr(5, 2), 10);\n }\n\n get localYear(): number {\n return parseInt(this._localDate.substr(0, 4), 10);\n }\n\n get millis(): number {\n return this._millis;\n }\n\n /**\n * Returns weekday in range [0-6] like Date does\n * @returns {number}\n */\n get weekday(): number {\n return this._weekday;\n }\n\n get localDateString(): string {\n return this._localDate;\n }\n\n get timeAndTzString(): string {\n return `${this._localTime}${this._tzString}`;\n }\n\n get tzOffsetInMilliseconds(): number {\n if (this._tzString.includes('Z')) {\n return 0;\n }\n\n const direction = this._tzString.substring(0, 1);\n const hours = Number(this._tzString.substring(1, 3));\n const minutes = Number(this._tzString.substring(4, 6));\n\n if (!['+', '-'].includes(direction)) {\n return 0;\n }\n\n const total = (hours * 60 * 60 + minutes * 60) * 1000;\n\n return direction === '+' ? total : -total;\n }\n\n equals(other: TzDate): boolean {\n return other && other.toTzString === this.toTzString;\n }\n\n toTzString(): string {\n return `${this._localDate}T${this.timeAndTzString}`;\n }\n\n toISOString(): string {\n return new Date(this._millis).toISOString();\n }\n\n toString(): string {\n return this.toTzString();\n }\n\n toJSON(): string {\n return this.toTzString();\n }\n\n toDate(): Date {\n return new Date(this._millis);\n }\n\n toLocalDate(): LocalDate {\n return new LocalDate(this.localDateString);\n }\n\n isBefore(date: TzDate): boolean {\n return this._millis - date.millis < 0;\n }\n\n isAfter(date: TzDate): boolean {\n return this._millis - date.millis > 0;\n }\n\n hoursTo(date: TzDate): number {\n const hoursTo = (date.millis - this.millis) / (60 * 60 * 1000);\n return hoursTo > 0 ? Math.floor(hoursTo) : 0;\n }\n\n daysTo(date: TzDate): number {\n const hoursTo = this.hoursTo(date);\n return hoursTo > 0 ? Math.floor(hoursTo / 24) : 0;\n }\n\n addHours(amount: number): TzDate {\n return TzDate.fromMillis(this.toDate().getTime() + amount * HOUR_IN_MILLIS, this.tzOffsetInMilliseconds);\n }\n\n removeHours(amount: number): TzDate {\n return this.addHours(-amount);\n }\n}\n\nexport enum DateField {\n DAY,\n MONTH,\n}\n\nexport class LocalDate {\n static EXPECTED_LENGTH = 10;\n private readonly localDateString;\n\n static forDate(year: number | string, month: number | string, day: number | string): LocalDate {\n return new LocalDate(`${pad(year, 4)}-${pad(month, 2)}-${pad(day, 2)}`);\n }\n\n static forDateObj(date: Date): LocalDate {\n return new LocalDate(date.toISOString().substr(0, 10));\n }\n\n static now(): LocalDate {\n return LocalDate.forDateObj(new Date());\n }\n\n static fromTzDate(tzDate?: TzDate): LocalDate {\n return tzDate?.toLocalDate();\n }\n\n static equals(a: LocalDate, b: LocalDate): boolean {\n return (!a && !b) || (a && b && a.equals(b));\n }\n\n static isLocalDate(localDateString: string): boolean {\n /* eslint-disable id-blacklist */\n return !(\n !isPresent(localDateString) ||\n localDateString.length !== LocalDate.EXPECTED_LENGTH ||\n Number.isNaN(Date.parse(localDateString))\n );\n /* eslint-enable id-blacklist */\n }\n\n static toDDSDate(date: LocalDate): string {\n return `${date.localYear}${pad(date.localMonth)}${pad(date.localDay)}0000`;\n }\n\n /**\n * Month should be one-indexed. e.g. December will be 12\n */\n static getAmountOfDaysInMonth(year: number, month: number): number {\n const rolloverYear = month === 12 ? year + 1 : year;\n const rolloverMonth = month === 12 ? 1 : month;\n\n return LocalDate.forDate(rolloverYear, rolloverMonth + 1, 1).minusDays(1).localDay;\n }\n\n /**\n * Create a new local date from the ISO8601 date string\n * @param localDateString the date string, e.g. 2016-12-31 or 0012-01-04\n */\n constructor(localDateString: string) {\n const ls = String(localDateString);\n if (!LocalDate.isLocalDate(ls)) {\n throw new Error(`Invalid localDate: ${ls}`);\n }\n // Convert, e.g., 2018-02-31 using browsers parser\n this.localDateString = new Date(ls).toISOString().substr(0, 10);\n }\n\n plusYears(amount: number): LocalDate {\n return this.withYear(this.localYear + amount);\n }\n\n minusYears(amount: number): LocalDate {\n return this.plusYears(-amount);\n }\n\n plus(dateField: DateField, amount: number): LocalDate {\n return dateField === DateField.MONTH ? this.plusMonths(amount) : this.plusDays(amount);\n }\n\n minus(dateField: DateField, amount: number): LocalDate {\n return this.plus(dateField, -amount);\n }\n\n plusMonths(amount: number): LocalDate {\n if (!amount) {\n return this;\n }\n const daysInMonth = (year, monthOneBased) => new Date(year, monthOneBased, 0).getDate();\n const neg = amount < 0 ? -1 : 1;\n const yearsToMove = neg * Math.floor(Math.abs(amount) / 12);\n const monthsToMove = amount % 12;\n\n const { localYear, localMonth, localDay } = this;\n const tmpTargetMonth = monthsToMove + localMonth;\n let targetMonth;\n let targetYear;\n if (tmpTargetMonth <= 0) {\n targetMonth = 12 + tmpTargetMonth;\n targetYear = localYear + yearsToMove - 1;\n } else if (tmpTargetMonth > 12) {\n targetMonth = tmpTargetMonth % 12;\n targetYear = localYear + yearsToMove + 1;\n } else {\n targetYear = localYear + yearsToMove;\n targetMonth = localMonth + monthsToMove;\n }\n\n const daysInTargetMonth = daysInMonth(targetYear, targetMonth);\n const targetDay = daysInTargetMonth <= localDay ? daysInTargetMonth : localDay;\n\n return LocalDate.forDate(targetYear, targetMonth, targetDay);\n }\n\n minusMonths(amount: number): LocalDate {\n return this.plusMonths(-amount);\n }\n\n plusDays(amount: number): LocalDate {\n if (!amount) {\n return this;\n }\n const newUtcMillis = this.toDate().getTime() + amount * DAY_IN_MILLIS;\n return LocalDate.forDateObj(new Date(newUtcMillis));\n }\n\n minusDays(amount: number): LocalDate {\n return this.plusDays(-amount);\n }\n\n get firstDayOfMonth(): LocalDate {\n return new LocalDate(`${this.localDateString.substr(0, 8)}01`);\n }\n\n get lastDayOfMonth(): LocalDate {\n return new LocalDate(\n `${this.localDateString.substr(0, 8)}${LocalDate.getAmountOfDaysInMonth(this.localYear, this.localMonth)}`\n );\n }\n\n lte(other: LocalDate): boolean {\n return other && this.localDateString <= other.localDateString;\n }\n\n lt(other: LocalDate): boolean {\n return other && this.localDateString < other.localDateString;\n }\n\n gt(other: LocalDate): boolean {\n return other && this.localDateString > other.localDateString;\n }\n\n gte(other: LocalDate): boolean {\n return other && this.localDateString >= other.localDateString;\n }\n\n isBetween(start: LocalDate, end: LocalDate): boolean {\n return this.gte(start) && this.lte(end);\n }\n\n get localDay(): number {\n return parseInt(this.localDateString.substr(8, 2), 10);\n }\n\n get localMonth(): number {\n return parseInt(this.localDateString.substr(5, 2), 10);\n }\n\n get localYear(): number {\n return parseInt(this.localDateString.substr(0, 4), 10);\n }\n\n /**\n * Returns weekday in range [0-6] like Date does\n * @returns {number}\n */\n get weekday(): number {\n return this.toDate().getUTCDay();\n }\n\n equals(other: LocalDate): boolean {\n return other && other.localDateString === this.localDateString;\n }\n\n get id(): string {\n return this.localDateString;\n }\n\n toString(): DateString {\n return this.localDateString;\n }\n\n toJSON(): DateString {\n return this.localDateString;\n }\n\n toDate(): Date {\n return new Date(`${this.localDateString}T00:00:00Z`);\n }\n\n toTzDate(): TzDate {\n return new TzDate(`${this.localDateString}T00:00:00Z`);\n }\n\n toISOString(): string {\n return `${this.localDateString}T00:00:00.000Z`;\n }\n\n toDDSDate(): string {\n return LocalDate.toDDSDate(this);\n }\n\n toDottedUIString(): string {\n return `${pad(this.localDay)}.${pad(this.localMonth)}.${this.localYear}`;\n }\n\n toDottedString(): string {\n return `${this.localYear}.${pad(this.localMonth)}.${pad(this.localDay)}`;\n }\n\n private withYear(newYear: number): LocalDate {\n const dateStringWithoutYears = this.localDateString.substr(4);\n const newDateString = `${pad(newYear, 4, '0')}${dateStringWithoutYears}`;\n return new LocalDate(newDateString);\n }\n}\n","import { FrequentFlyerTierLevel } from '../interfaces/utils.interface';\n\nexport const getCMSTier = (tier: string): string => {\n switch (tier) {\n case FrequentFlyerTierLevel.JUNIOR.toString():\n return 'JUNIOR';\n case FrequentFlyerTierLevel.PLUS.toString():\n return 'BASIC';\n case FrequentFlyerTierLevel.SILVER.toString():\n return 'SILVER';\n case FrequentFlyerTierLevel.GOLD.toString():\n return 'GOLD';\n case FrequentFlyerTierLevel.PLATINUM.toString():\n return 'PLATINUM';\n case FrequentFlyerTierLevel.LUMO.toString():\n return 'PLATINUM LUMO';\n default:\n return '';\n }\n};\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport {\n BehaviorSubject,\n Observable,\n Subscription,\n catchError,\n combineLatest,\n distinctUntilChanged,\n filter,\n forkJoin,\n map,\n of,\n switchMap,\n take,\n withLatestFrom,\n iif,\n throwError,\n} from 'rxjs';\n\nimport { finShare, retryWithBackoff } from '@fcom/rx';\nimport { Location, LocationSuggestions, LocationGeoLocData } from '@fcom/core-api';\nimport {\n LatLng,\n LocationRouteCffService,\n equals,\n isPresent,\n unsubscribe,\n isEmptyObjectOrHasEmptyValues,\n StorageService,\n} from '@fcom/core';\nimport { FlightSearchParams, RecommendationService } from '@fcom/common';\nimport {\n CommonFeatureState,\n GlobalBookingActions,\n GlobalBookingFlight,\n LocationPair,\n globalBookingLocations,\n globalBookingFlights,\n} from '@fcom/common/store';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { akamaiGeolocation } from '@fcom/core/selectors';\n\nimport { createPreviousSearches } from '../utils/utils';\nimport { PREVIOUS_SEARCHES_KEY } from '../constants';\nimport { PreviousSearch } from '../interfaces';\nimport { BookingWidgetAppState } from '../store';\nimport { BookingWidgetGtmService } from './booking-widget-gtm.service';\n\n@Injectable({ providedIn: 'root' })\nexport class BookingWidgetFlightService implements OnDestroy {\n readonly locations$: Observable;\n readonly bookingLocations$: Observable;\n readonly flights$: Observable;\n readonly suggestedLocations$: Observable;\n readonly trendingDestinations$: Observable;\n readonly selectedPreviousSearches$: Observable;\n private suggestedLocationsMap$ = new BehaviorSubject>({});\n private trendingDestinationsMap$ = new BehaviorSubject>({});\n private subscription = new Subscription();\n private defaultLocations$ = new BehaviorSubject([]);\n private _selectedPreviousSearches$ = new BehaviorSubject(undefined);\n\n constructor(\n private store$: Store,\n private languageService: LanguageService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private locationRouteCffService: LocationRouteCffService,\n private recommendationService: RecommendationService,\n private storageService: StorageService\n ) {\n // selectors\n this.bookingLocations$ = this.store$.pipe(\n globalBookingLocations(),\n distinctUntilChanged((prev, next) => prev.length === next.length && next.every((l, i) => equals(l, prev[i]))),\n finShare()\n );\n\n this.locations$ = this.bookingLocations$.pipe(\n map((locations) => locations[0]),\n distinctUntilChanged((prev, next) => equals(prev, next)),\n finShare()\n );\n\n this.flights$ = this.store$.pipe(\n globalBookingFlights(),\n distinctUntilChanged((prev, next) => equals(prev, next)),\n finShare()\n );\n\n this.suggestedLocations$ = combineLatest([this.languageService.countryCode, this.suggestedLocationsMap$]).pipe(\n map(([countryCode, suggestedLocationsMap]) => suggestedLocationsMap[countryCode]),\n finShare()\n );\n\n this.trendingDestinations$ = combineLatest([this.locations$, this.trendingDestinationsMap$]).pipe(\n map(([locations, trendingDestinationsMap]) => trendingDestinationsMap[locations?.origin?.locationCode]),\n finShare()\n );\n this.selectedPreviousSearches$ = this._selectedPreviousSearches$.asObservable();\n //get suggested locations, trending destinations and default locations\n this.getSuggestedLocationBasedOnCountryCode();\n this.getTrendingDestinationsBasedOnOrigin();\n this.initDefaultLocations();\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n removeFlight(index: number): void {\n this.store$.dispatch(GlobalBookingActions.removeFlight({ index }));\n }\n\n addFlight(): void {\n this.store$.dispatch(GlobalBookingActions.addFlight());\n }\n\n setLocations({ origin, destination }: LocationPair, index = 0): void {\n this.bookingWidgetGtmService.trackElementEvent(\n 'locations',\n `${origin?.locationCode} - ${destination?.locationCode}`\n );\n\n this.store$.dispatch(GlobalBookingActions.updateFlight({ flight: { origin, destination }, index }));\n }\n\n setDefaultLocations(defaultLocations$: Observable): void {\n this.subscription.add(\n defaultLocations$.subscribe((defaultLocations) => {\n this.defaultLocations$.next(defaultLocations);\n })\n );\n }\n\n getSuggestedLocationBasedOnCountryCode(): void {\n this.subscription.add(\n this.languageService.countryCode\n .pipe(\n distinctUntilChanged(),\n withLatestFrom(this.suggestedLocationsMap$),\n filter(([countryCode, suggestedLocationsMap]) => !suggestedLocationsMap[countryCode]),\n switchMap(([countryCode, suggestedLocationsMap]) =>\n this.locationRouteCffService.getSuggestedLocations(countryCode, this.languageService.localeValue).pipe(\n map((suggestedLocationByCountryCode) => ({\n ...suggestedLocationsMap,\n [countryCode]: suggestedLocationByCountryCode,\n }))\n )\n )\n )\n .subscribe((suggestedLocations) => {\n this.suggestedLocationsMap$.next(suggestedLocations);\n })\n );\n }\n\n getTrendingDestinationsBasedOnOrigin(): void {\n this.subscription.add(\n this.locations$\n .pipe(\n distinctUntilChanged(),\n withLatestFrom(this.trendingDestinationsMap$),\n filter(\n ([locations, trendingDestinationsMap]) =>\n locations?.origin?.locationCode && !trendingDestinationsMap[locations?.origin?.locationCode]\n ),\n switchMap(([locations, trendingDestinationsMap]) =>\n this.recommendationService.getTrendingDestinations(locations?.origin?.locationCode, 0, 10).pipe(\n map((trendingDestinations) => ({\n ...trendingDestinationsMap,\n [locations?.origin?.locationCode]: trendingDestinations,\n }))\n )\n )\n )\n .subscribe((trendingDestinations) => {\n this.trendingDestinationsMap$.next(trendingDestinations);\n })\n );\n }\n\n initDefaultLocations(): void {\n this.defaultLocations$\n .pipe(\n distinctUntilChanged((prev, next) => equals(prev, next)),\n map((defaultLocations) => (isEmptyObjectOrHasEmptyValues(defaultLocations) ? null : defaultLocations)),\n filter(Boolean),\n withLatestFrom(this.locations$),\n switchMap(([locationsToBeSet, locationFromStore]) => {\n const origin = isPresent(locationsToBeSet?.[0]?.origin?.locationCode)\n ? locationsToBeSet?.[0]?.origin\n : locationFromStore?.origin;\n const destination = isPresent(locationsToBeSet?.[0]?.destination?.locationCode)\n ? locationsToBeSet?.[0]?.destination\n : locationFromStore?.destination;\n\n // fetch default locations\n return forkJoin({\n origin: origin?.locationCode\n ? this.locationRouteCffService.bestGuessFor(origin.locationCode, this.languageService.localeValue)\n : of(origin),\n destination: destination?.locationCode\n ? this.locationRouteCffService.bestGuessFor(destination?.locationCode, this.languageService.localeValue)\n : of(destination),\n });\n }),\n finShare()\n )\n .subscribe((location) => {\n this.setLocations(location);\n });\n }\n\n // fetch user geoLocation data and set to origin, when origin data is missing or default location is missing\n fetchUserLocationAndSetDefaultOrigin(): void {\n this.subscription.add(\n combineLatest([this.locations$, this.defaultLocations$, this.store$.pipe(akamaiGeolocation())])\n .pipe(\n take(1),\n filter(\n ([{ origin }, defaultLocations]) =>\n !isPresent(origin) || (defaultLocations.length > 0 && !isPresent(defaultLocations[0]?.origin))\n ),\n map(([_, __, geoLocation]) => geoLocation)\n )\n .pipe(\n switchMap((value: LatLng) =>\n this.locationRouteCffService.geolocMatchFor(value.lat, value.lng, this.languageService.localeValue)\n ),\n switchMap((location: LocationGeoLocData) =>\n this.locationRouteCffService.bestGuessFor(location.item.locationCode, this.languageService.localeValue)\n ),\n retryWithBackoff(2),\n catchError((err: unknown) => {\n return throwError(() => err);\n }),\n withLatestFrom(this.defaultLocations$),\n switchMap(([cffLocation, defaultLocations]) =>\n iif(\n () => isPresent(defaultLocations?.[0]?.destination?.locationCode),\n this.locationRouteCffService\n .bestGuessFor(defaultLocations?.[0]?.destination?.locationCode, this.languageService.localeValue)\n .pipe(map((destination) => [cffLocation, destination])),\n of([cffLocation])\n )\n ),\n finShare()\n )\n .subscribe(([cffLocation, destination]) => {\n this.setLocations({\n origin: cffLocation,\n ...(isPresent(destination) && { destination }),\n });\n })\n );\n }\n\n setPreviousSearchToLocalStorage = (flightSearchParams: FlightSearchParams): void => {\n if (flightSearchParams.isAward) {\n return;\n }\n\n let previousSearches: PreviousSearch[];\n const previousSearchesStorage = this.storageService.LOCAL.get(PREVIOUS_SEARCHES_KEY);\n\n try {\n previousSearches = JSON.parse(previousSearchesStorage) ?? [];\n } catch {\n previousSearches = [];\n }\n\n const updatedPreviousSearches = createPreviousSearches(flightSearchParams, previousSearches);\n this.storageService.LOCAL.set(PREVIOUS_SEARCHES_KEY, JSON.stringify(updatedPreviousSearches));\n };\n\n setPreviousFlightSelection(previousSearch: PreviousSearch, isGlobalBookingWidget: boolean): void {\n if (isGlobalBookingWidget) {\n this._selectedPreviousSearches$.next(previousSearch);\n }\n this.store$.dispatch(GlobalBookingActions.setSelection({ selection: previousSearch }));\n }\n\n resetSelectedPreviousSearch(): void {\n this._selectedPreviousSearches$.next(undefined);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'finToLowerCase',\n})\nexport class FinLowerCasePipe implements PipeTransform {\n transform(input: string, split: string = undefined): string {\n if (!input) {\n return input;\n }\n const splitted: string[] = input.split(split);\n return `${splitted[0].toLowerCase()}${split ? split : ''}${splitted.slice(1).join('')}`;\n }\n}\n","\n \n\n
\n \n
\n \n
\n \n \n
\n
\n\n
    \n \n 0) || item.link) && !item.hideInMenu\"\n role=\"list\"\n class=\"no-list-style font-body-2 section-items\"\n >\n \n {{ item.teaserTitle }}\n {{ 'navigation.currentPage' | finLocalization }}\n {{ item.teaserTitle }}\n
\n \n \n 0 && child.teaserTitle && child.hasVisibleChildren\"\n >\n \n
\n
\n {{ child.teaserTitle }}\n \n
\n
\n
\n \n
\n \n \n
\n \n \n {{ 'actions.back' | finLocalization }}\n \n
\n \n {{ child.teaserTitle }}\n {{\n 'navigation.currentPage' | finLocalization\n }}\n \n \n
\n
    \n \n
  • \n \n {{ subchild.teaserTitle }}\n {{\n 'navigation.currentPage' | finLocalization\n }}\n \n \n
  • \n
    \n
\n
\n \n \n\n {{ child.teaserTitle }}\n {{ 'navigation.currentPage' | finLocalization }}\n \n
\n \n \n\n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n \n\n","import { DOCUMENT } from '@angular/common';\nimport { Component, ElementRef, Inject, NgZone, OnDestroy } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CountryState, unsubscribe, RootPaths } from '@fcom/core';\nimport { isVisible, safeMap, stopPropagation } from '@fcom/core/utils';\nimport { finShare, keepState } from '@fcom/rx';\nimport { allowedConfs } from '@fcom/core/reducers/langs';\nimport { ButtonTheme, IconButtonSize, IconButtonTheme, IconPosition } from '@fcom/ui-components';\n\nimport { MenuItem, MenuJson, ElementTypes, GaContext, ElementActions } from '../../../interfaces';\nimport { NavigationMenuService, PageMetaService } from '../../../services';\nimport { CountryAndLanguageSelection } from '../../country-and-language-selector/country-and-language-selector.component';\nimport { getLocalizedLinkForLangCode } from '../../../utils/language.utils';\nimport { GtmService } from '../../../gtm/services/gtm.service';\nimport { isNavigationEvent } from '../../../utils';\n\n@Component({\n selector: 'fin-navigation',\n styleUrls: ['./navigation.component.scss'],\n templateUrl: './navigation.component.html',\n})\nexport class NavigationComponent implements OnDestroy {\n static readonly TRANSITION_DURATION_MS = 300;\n static readonly START_MENU_ITEM_APPEAR_AFTER_MS = 100;\n\n readonly ButtonTheme = ButtonTheme;\n readonly CustomIcon = CustomIcon;\n readonly ElementTypes = ElementTypes;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconLibrary = IconLibrary;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n readonly isMenuOpen$: Observable;\n readonly menuInDom$: Observable;\n readonly homeLink$: Observable;\n readonly menuItems$: Observable;\n readonly countriesList$: Observable;\n readonly currentLanguage$: Observable;\n readonly appearAfter = NavigationComponent.START_MENU_ITEM_APPEAR_AFTER_MS;\n readonly expandedNaviCat$: Observable;\n readonly _selectLanguageRoot: string = '/';\n\n countries$: Observable;\n enableNewLanguageSelector$: Observable;\n languageSelectorOpen: boolean;\n\n private subscriptions = new Subscription();\n private removeFocusListener: Function;\n\n constructor(\n private navigationMenuService: NavigationMenuService,\n private languageService: LanguageService,\n private elementRef: ElementRef,\n private ngZone: NgZone,\n private router: Router,\n private pageMetaService: PageMetaService,\n private gtmService: GtmService,\n @Inject(DOCUMENT) private document: Document\n ) {\n this.isMenuOpen$ = this.navigationMenuService.isNavigationMenuOpen$;\n this.menuItems$ = this.navigationMenuService.menuItems$;\n this.homeLink$ = this.languageService.lang.pipe(map((lang) => `/${lang}`));\n this.currentLanguage$ = this.languageService.langKey;\n this.countries$ = this.initListOfCountries();\n this.expandedNaviCat$ = navigationMenuService.expandedNaviCategory;\n\n this.menuInDom$ = this.isMenuOpen$.pipe(\n keepState(NavigationComponent.TRANSITION_DURATION_MS),\n distinctUntilChanged()\n );\n\n this.subscriptions.add(\n this.isMenuOpen$.subscribe((isOpen) => {\n if (isOpen) {\n this.bindEventListeners();\n } else {\n this.cleanUpEventHandlers();\n }\n })\n );\n\n this.enableNewLanguageSelector$ = this.router.events.pipe(\n filter(isNavigationEvent),\n map(({ url }) => url),\n startWith(this.router.url),\n map((url) => !this.isRootPath(url)),\n finShare()\n );\n }\n\n setCategoryAsExpanded(event: Event, item: MenuItem) {\n this.navigationMenuService.setCategoryAsExpanded(event, item);\n this.elementRef.nativeElement.querySelector('.navigation-wrapper').scrollTop = 0;\n }\n\n closeNaviMenu(): void {\n this.navigationMenuService.closeNaviMenu();\n }\n\n closeMenu(): void {\n this.navigationMenuService.closeMenu();\n }\n\n trackItems(index: number) {\n return index;\n }\n\n openLanguageSelector(): void {\n this.gtmService.trackElement(\n 'language-selector-open',\n GaContext.TOP_NAVIGATION,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.OPEN\n );\n\n this.languageSelectorOpen = true;\n }\n\n closeLanguageSelector(): void {\n this.languageSelectorOpen = false;\n }\n\n selectLanguageAndRedirect(selection: CountryAndLanguageSelection): void {\n this.gtmService.trackElement(\n 'language-selector-select',\n GaContext.TOP_NAVIGATION,\n ElementTypes.BUTTON,\n selection.languageCode,\n ElementActions.SUBMIT\n );\n\n this.subscriptions.add(\n this.pageMetaService.links.subscribe((links) => {\n const url = getLocalizedLinkForLangCode(selection.languageCode, links, undefined);\n this.router.navigateByUrl(url);\n })\n );\n\n this.closeLanguageSelector();\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n private initListOfCountries(): Observable {\n return this.languageService.countryCode.pipe(\n map(\n (countryCode) =>\n allowedConfs.find((country) => country.code === countryCode) || {\n languages: [],\n name: '',\n code: '',\n }\n )\n );\n }\n\n // @ToDo: create utility to handle focus trapping in a centralized way\n private bindEventListeners(): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n this.ngZone.runOutsideAngular(() => {\n const listener = (event) => {\n return self.ngZone.run(() => {\n self.onNaviFocus(event);\n });\n };\n self.document.addEventListener('focus', listener, true);\n self.document.addEventListener('focusin', listener);\n self.removeFocusListener = () => {\n self.document.removeEventListener('focus', listener, true);\n self.document.removeEventListener('focusin', listener);\n };\n });\n }\n\n private onNaviFocus(event: FocusEvent): void {\n const el = safeMap(this.elementRef, (e) => e.nativeElement);\n if (!!el && !el.contains(event.target)) {\n stopPropagation(event);\n\n const focusSelector = 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n const focusableElements: Element[] = Array.from((el as Element).querySelectorAll(focusSelector))\n .filter((e) => e instanceof HTMLElement)\n .filter(isVisible);\n\n if (focusableElements.length !== 0) {\n (focusableElements[0] as HTMLElement).focus();\n }\n }\n }\n\n private cleanUpEventHandlers() {\n if (this.removeFocusListener) {\n this.removeFocusListener();\n this.removeFocusListener = undefined;\n }\n }\n\n private isRootPath(path: string): boolean {\n return Object.values(RootPaths).some((rootPath) => path.includes(rootPath));\n }\n}\n","\n \n \n \n \n

\n\n\n\n {{ text }}\n\n\n \n\n","import { Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nexport enum InfoBoxSize {\n DEFAULT = 'Default',\n}\n\nexport enum InfoBoxTheme {\n DEFAULT = 'Default',\n ALERT = 'Alert',\n}\n\n/**\n * @Deprecated\n * This component has been deprecated and you should move to fcom-notification. It will be removed\n * in an upcoming major release.\n *\n * Shows a info box banner. Example usage:\n *\n * @example\n * \n * {{ 'TRANSLATION.KEY' | finLocalization }}\n * \n */\n@Component({\n selector: 'fcom-info-box',\n templateUrl: './info-box.component.html',\n})\nexport class InfoBoxComponent {\n public readonly InfoBoxSize = InfoBoxSize;\n public readonly InfoBoxTheme = InfoBoxTheme;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n /**\n * @deprecated will be removed in v10 release. superseded by ng-content\n * Text content of the info-box-component\n * If not provided ng-content will be rendered instead\n */\n @Input()\n text = '';\n\n /**\n * @deprecated will be removed in v10 release. superseded by theme\n * Boolean indicating if alert styling should be used\n */\n @Input()\n set isAlert(isAlert) {\n this.theme = isAlert ? InfoBoxTheme.ALERT : InfoBoxTheme.DEFAULT;\n }\n\n /**\n * The paddings, text sizes and icon sizes to use for the component.\n *\n * Note. This only has 1 option right now and is not hooked up to the template.\n */\n @Input()\n size: InfoBoxSize = InfoBoxSize.DEFAULT;\n\n /**\n * The theme to use for the component, this styles the component as an alert or notification.\n */\n @Input()\n theme: InfoBoxTheme = InfoBoxTheme.DEFAULT;\n\n /**\n * Name of the icon to be displayed\n *\n * @example SvgLibraryIcon.INFO\n */\n @Input()\n icon: SvgLibraryIcon;\n}\n","/**\n *\n * @param goLiveDate Set a date to enable or disable a flag. By default it will be enabled on this date.\n * @param goOfflineDate If set, the flag will be disabled after the set date.\n * @returns\n */\nexport const isFlagEnabled = (goLiveDate: string, goOfflineDate?: string): boolean => {\n const goLive = Date.now() >= Date.parse(goLiveDate);\n const goOffline = goOfflineDate ? Date.now() <= Date.parse(goOfflineDate) : true;\n return goLive && goOffline;\n};\n","import { JsConfig } from '@fcom/core';\nimport { isFlagEnabled } from '@fcom/core/utils/env.utils';\n\nconst apiBaseUrl = 'https://api.finnair.com';\nconst apiFullBaseUrl = `${apiBaseUrl}/d/fcom`;\nconst loyaltyApiBaseUrl = 'https://api.finnair.com/d/loyalty-service';\n\nconst isUpgradeBenefitsEffective = isFlagEnabled('2024-03-09T00:00:00.000+0300');\nconst isVisaLightCreditCardBannerEffective = isFlagEnabled('2024-12-12T00:00:00.000+0300');\n\nconst config: JsConfig = {\n hmr: false,\n production: true,\n /**\n * Map from lang to locale. E.g. { 'gb-en': 'en_GB' }\n */\n allowedLocales: {\n 'master-en': 'en_GB',\n 'at-de': 'de_AT',\n 'at-en': 'en_AT',\n 'au-en': 'en_AU',\n 'be-en': 'en_BE',\n 'ca-en': 'en_CA',\n 'ca-fr': 'fr_CA',\n 'ch-de': 'de_CH',\n 'ch-en': 'en_CH',\n 'ch-fr': 'fr_CH',\n 'cn-en': 'en_CN',\n 'cn-zh': 'zh_CN',\n 'cz-en': 'en_CZ',\n 'de-de': 'de_DE',\n 'de-en': 'en_DE',\n 'dk-da': 'da_DK',\n 'dk-en': 'en_DK',\n 'ee-en': 'en_EE',\n 'ee-et': 'et_EE',\n en: 'en',\n 'es-en': 'en_ES',\n 'es-es': 'es_ES',\n 'fi-en': 'en_FI',\n 'fi-fi': 'fi_FI',\n 'fi-sv': 'sv_FI',\n 'fr-en': 'en_FR',\n 'fr-fr': 'fr_FR',\n 'gb-en': 'en_GB',\n 'hk-zh': 'zh_HK',\n 'hk-en': 'en_HK',\n 'hu-en': 'en_HU',\n 'is-en': 'en_IS',\n 'ie-en': 'en_IE',\n 'il-en': 'en_IL',\n 'in-en': 'en_IN',\n 'it-en': 'en_IT',\n 'it-it': 'it_IT',\n 'jp-en': 'en_JP',\n 'jp-ja': 'ja_JP',\n 'kr-en': 'en_KR',\n 'kr-ko': 'ko_KR',\n 'lt-en': 'en_LT',\n 'lv-en': 'en_LV',\n 'nl-en': 'en_NL',\n 'no-en': 'en_NO',\n 'no-no': 'no_NO',\n 'pl-en': 'en_PL',\n 'pl-pl': 'pl_PL',\n 'ru-en': 'en_RU',\n 'ru-ru': 'ru_RU',\n 'se-en': 'en_SE',\n 'se-sv': 'sv_SE',\n 'sg-en': 'en_SG',\n 'th-en': 'en_TH',\n 'us-en': 'en_US',\n },\n apiBaseUrl,\n uxAuthBasePath: '/d/fcom/ux-auth-prod',\n baseUrl: 'https://www.finnair.com',\n buildEnv: 'prod',\n casAllowHttp: false,\n casClientId: 'I9AZwG5z3os',\n casClientIdDds: 'FFfOZx2as6M',\n casHost: 'auth.finnair.com',\n casEnv: 'prod',\n upgradeAvailabilityUrl: 'https://api.finnair.com/amadeus-upgrade-availability',\n checkoutUrl: 'https://pay.finnair.com',\n cmsUrl: 'https://cms.finnair.com',\n cmsEnv: 'prod',\n isCmsPreview: false,\n translationsApiUrl: `${apiFullBaseUrl}/ux-translation-prod/current`,\n ddsServerUrl: 'https://www.finnair.com/pl/AYPortal/wds/CASRedirect.action?SITE=FINRFINR',\n cartUrl: `${apiFullBaseUrl}/cart-prod/current/api/v2/cart`,\n cartUrlWithoutAPI: `${apiFullBaseUrl}/cart-prod/current`,\n configUrl: `${apiFullBaseUrl}/config-prod/current`,\n instantSearchUrl: `${apiFullBaseUrl}/instantsearch-prod/current`,\n giftCardApiKey: '5iUkA9Pwly7DYTAJ2eRe77nzWrdrEDI93MaT6GY7',\n giftCardConversionUrl: `${apiBaseUrl}/d/payments/gift-card/public/gift-cards/payout`,\n giftCardVerificationUrl: `${apiBaseUrl}/d/payments/gift-card/public/gift-cards`,\n googleMapsApiKey: 'AIzaSyDvTBJvICnNK-DI14X6M1hXF9SXB8Dfuec',\n sentryDsnServer:\n 'https://bce7d6be750ade48c6bc76b73d5ed1c5:3ddaedd1938b4e97fd5226fc0f2ee2a9@o4507887724986368.ingest.de.sentry.io/4508097692893264',\n sentryDsn: 'https://bce7d6be750ade48c6bc76b73d5ed1c5@o4507887724986368.ingest.de.sentry.io/4508097692893264',\n sentryEnv: 'prod',\n sentryPrefix: 'lambda-',\n versionInfo: {\n releaseGitCommitHash: 'unkown-commit-hash',\n releaseGitTag: 'unkown-git-tag',\n },\n locationRouteCffUrl: `${apiFullBaseUrl}/locations-prod/current`,\n timeGeoUrl: 'https://api.finnair.com/timegeo',\n orderUrl: `${apiFullBaseUrl}/order-prod/current`,\n offersUrl: `${apiFullBaseUrl}/offers-prod/current`,\n tierBenefitUrl: 'https://api.finnair.com/d/fcom/benefits-prod/current/v2/tierBenefits',\n oneUpgradeRootUrl: 'https://api.finnair.com/d/business-upgrade/bookings',\n upgradeApiGwKey: 'WknUloDLslm39Xtd2EbjWctxRUHpdc',\n showMarketingOffers: true,\n pnrSummaryInMMBWidget: true,\n servicesUrl: `${apiFullBaseUrl}/ancillary-prod/current`,\n checkInPostUrl: 'https://checkin.si.amadeus.net/1ASIHSSCWEBAY/sscway/checkindirect',\n cookieSnippetUrl: 'https://privacy.finnair.com/snippet.js?locale={locale}',\n consentApiUrl: 'https://api.finnair.com/a/consent/',\n forceWithCredentials: true,\n serviceForm: {\n customerCare: {\n apiUrl: `${apiBaseUrl}/d/customer-care-api`,\n keyId: 'hEJnqZ0PWJ2W47zgpb1YC8JtkwhjDo8c27GEYCnQ',\n },\n customerCareAttachment: {\n apiUrl: `${apiBaseUrl}/d/customer-care-api/attachment/v1`,\n keyId: 'Z65C5iKKLL7okJRww5X4d5HOVRIRUeAA5Fnc4QsG',\n },\n customerFeedback: {\n apiUrl: `${apiBaseUrl}/d/customer-care-api/feedback`,\n keyId: 'hEJnqZ0PWJ2W47zgpb1YC8JtkwhjDo8c27GEYCnQ',\n options: {\n lastNameQueryParam: 'lastName',\n attachmentPath: 'attachments',\n linkAttachmentPath: 'link-attachments',\n },\n },\n customerRefunds: {\n apiUrl: `${apiBaseUrl}/d/customer-care-api/refund-case/v1`,\n keyId: 'gMh8jRxonX47xTbxhT6blaZe2OWsFDNp9kU68Z1U',\n },\n eTicketReceipt: {\n apiUrl: 'https://api.finnair.com/a/booking-service/api/member/name/emailReceipt',\n keyId: '5mBIAH9Mpzaiu2zcHtN956rX0UYEv3hU8oP7BYb1',\n },\n loggedInMissingPoints: {\n apiUrl: `${loyaltyApiBaseUrl}/legacy/current/api/claim`,\n keyId: 'Y6DcOC6tLW2IIKKUm2Ff5KLHNWd1Qd7386WGvVI0',\n },\n portalServices: {\n apiUrl: 'https://api.finnair.com/v1/portalservices',\n keyId: 'qcRfk4ZSaU7g6FLDfNUar3r7Q1bVt1kFaXwqORKI',\n },\n },\n siteSearch: {\n siteSearchRequest: {\n apiUrl: 'https://finnair-app-search.ent.eu-central-1.aws.cloud.es.io/api/as/v1/engines/www-finnair-com-{lang}/',\n searchKey: 'search-dq8nn4v4fega72csth86bxch',\n },\n },\n carRental: {\n apiUrl: 'https://cars.finnair.com',\n clientId: '395702',\n },\n ondMarketingOffersUrl: `${apiFullBaseUrl}/destination-seo-prod/current`,\n chat: {\n chatServiceQueueConfig: {\n RTGS_FINNISH: {\n language: 'fi',\n buttonId: '5731o000000GsW4',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFaUAM_16a6df87b8c',\n },\n RGTS_SWEDISH: {\n language: 'sv',\n buttonId: '5731o000000GsVQ',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFLUA2_16a6df75f3a',\n },\n RTGS_ENGLISH: {\n language: 'en',\n buttonId: '5731o000000GsVR',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFQUA2_16a6df7d9bf',\n },\n SGS_CHINESE: {\n language: 'zh-CN',\n buttonId: '5731o000000GsVU',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFfUAM_16a6df8cf73',\n },\n Chatbot_EN: {\n language: 'en',\n buttonId: '5731o0000004IiY',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1o0000008OQFEA2_170440347e3',\n },\n Chatbot_EN_SGS: {\n language: 'en',\n buttonId: '5731o000000GsWT',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1o000000GmgCEAS_170ede64e2a',\n },\n SGS_FRENCH: {\n language: 'fr',\n buttonId: '5731o000000GsVX',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFbUAM_16a6e01a08f',\n },\n SGS_GERMAN: {\n language: 'de',\n buttonId: '5731o000000GsVY',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFkUAM_16a6dfab458',\n },\n SGS_ITALIAN: {\n language: 'it',\n buttonId: '5731o000000GsVZ',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFpUAM_16a6dfc45ee',\n },\n SGS_JAPANESE: {\n language: 'ja',\n buttonId: '5731o000000GsVa',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFWUA2_16a6dfc93b5',\n },\n SGS_KOREAN: {\n language: 'ko',\n buttonId: '5731o000000GsVb',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFuUAM_16a6dfe0dc8',\n },\n SGS_RUSSIAN: {\n language: 'ru',\n buttonId: '5731o000000GsVc',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CFzUAM_16a6dfe76b7',\n },\n SGS_SPANISH: {\n language: 'es',\n buttonId: '5731o000000GsVd',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CG4UAM_16a6dfedbc4',\n },\n SGS_CHINESE_HK: {\n language: 'pt-BR',\n buttonId: '5731o000000GsVV',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I1X0000004CRMUA2_16b02321ba9',\n },\n Chatbot_FTH: {\n language: 'en',\n buttonId: '573UB0000007HXB',\n eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04IUB000000OnnZ2AS_192b420b51e',\n },\n },\n chatInitParamsConfig: {\n baseCoreURL: 'https://finnair.my.salesforce.com',\n communityEndpointURL: 'https://finnair.my.salesforce-sites.com/chat',\n gslbBaseURL: 'https://service.force.com',\n orgId: '00D24000000Zb2l',\n baseLiveAgentContentURL: 'https://c.la11-core1.sfdc-cehfhs.salesforceliveagent.com/content',\n deploymentId: '5721o000000Gs1h',\n baseLiveAgentURL: 'https://d.la11-core1.sfdc-cehfhs.salesforceliveagent.com/chat',\n },\n chatDefaultLanguage: '_DEFAULT',\n },\n chatScriptSrcURL: 'https://service.force.com/embeddedservice/5.0/esw.min.js',\n enableSplitChat: false,\n\n oneClickPaymentUrl: 'https://api.finnair.com/d/payments/paymentgw-prod/oneclick',\n oneClickPaymentApiKey: '5258bf96-5581-47d3-90ce-71c289dd009f',\n membershipCardApiUrl: 'https://api.finnair.com/a/membershipcard',\n loyaltyServices: {\n memberService: {\n gauthUrl: `${loyaltyApiBaseUrl}/member-service/gauth`,\n gauthApiKey: '08Clo0m74Z8arPmCbTpyd8ravNu3N5xd3nBrYymZ',\n },\n legacy: {\n apiUrl: `${loyaltyApiBaseUrl}/legacy/current/api`,\n apiProfileUrl: `${loyaltyApiBaseUrl}/legacy/current/api/profile`,\n apiProfileApiKey: '5mBIAH9Mpzaiu2zcHtN956rX0UYEv3hU8oP7BYb1',\n loyaltyMemberUrl: `${loyaltyApiBaseUrl}/legacy/current/loyalty/member`,\n loyaltyMemberResendUrl: `${loyaltyApiBaseUrl}/legacy/current/loyalty/member/resend`,\n loyaltyMemberVerifyUrl: `${loyaltyApiBaseUrl}/legacy/current/loyalty/member/confirm`,\n loyaltyMemberVerifyApiKey: 'cHaRX5zbFQ9onwwPgvnNP26WKPVD29wCaKp1xlAt',\n loyaltyMemberApiKey: 'eb6b23a6-d3bd-4fcf-903d-c9be9763eab0',\n loyaltyAviosLinkingUrl: `${loyaltyApiBaseUrl}/legacy/current/api/avios/linked-accounts`,\n },\n },\n britishAirwaysExchangeUrl: 'https://exchange.shopping.ba.com/partner/finnair',\n bookingServiceUrl: 'https://api.finnair.com/a/booking-service/api',\n bookingServiceApiKey: '9114c782-00f5-4a99-b78a-68c6ce513ca3',\n destinationsSearchUrl: `${apiFullBaseUrl}/fcom-service-destinations-prod/destinations`,\n destinationsSearchApiKey: 'h4xl99cRYO5M7POBECCrO70M0NFc6Pb7Nl5y6lb3',\n amApiUrl: 'https://www.aurinkomatkat.fi/api/fcom-locations/v1',\n amFlightHotelDestinationUrl: 'https://www.aurinkomatkat.fi/api/fcom-fh-destinations',\n amDeeplinkUrl: 'https://www.aurinkomatkat.fi/matkahaku/finnair',\n buyPointsIframeUrl: 'https://ssogateway.points.com/SSOGateway/gateway.do',\n recommendationApiUrl: 'https://api.finnair.com/d/finnair-personalization/recommendation',\n reaccommodationTimeout: 15,\n corporateApiUrl: `${apiBaseUrl}/d/customer/corporate-rest-api/current`,\n corporateApiKey: '51E1mQPFsa6XOOgsp1e2l79tiq93xAXL7vL5lML2',\n customerCommunicationsApiUrl: 'https://api.finnair.com/d/email-sender/customer-communications/current',\n storageRoot: 'finnaircom',\n appName: 'finnair-app',\n appIdIos: '933867978',\n manifestPathAndroid: 'assets/mobile-app/manifest-android.json',\n enableAwsXRay: true,\n enableExtraAuth: false,\n enableMockDapi: false,\n enableCorsCredentials: false,\n enableWelcomeBackMessage: true,\n enableGlobalBanner: true,\n enableReaccommodationMockData: false,\n enableUpgradeTravelClass: false,\n enableBuyPoints: false,\n enableDapiBackendSwitch: false,\n enableDevTools: false,\n enableDevToolPath: false,\n choooseUrl: 'https://finnair.chooose.today/{lang}',\n enableTicketTypeUpselling: false,\n enableQualtricsPageFeedback: true,\n enableNewsletterSignUpForm: true,\n enableUpgradeAvailabilityInBooking: true,\n enableUpgradeAvailabilityPremiumEconomyInBooking: true,\n enableClaimMissingPointsLoggedIn: true,\n enableCookiePolicy: true,\n enableLoginDialog: true,\n enableJoinDialog: true,\n enableSelfReaccFlow: true,\n finnairShopDonateUrl: 'https://finnairshop.com/{lang}/finnair-plus-awards-and-products/charity',\n enableUpgradeBenefitInUpgrade: isUpgradeBenefitsEffective,\n finnairShopUrl: 'https://finnairshop.com/{lang}',\n benefitApi: 'https://api.finnair.com/d/fcom/benefitsv2-prod/current/v2/tierBenefits',\n enableCountrySelector: false,\n enableAviosOverhaul: {\n isAviosCuttoffDateEffective: '2024-03-09T00:00:00.000+0300',\n },\n enableAdditionalEmailInBookingFlow: false,\n enableRefetchOrder: false,\n enableMultiCity: true,\n enableCorporateTravelClassLimit: true,\n disableTermsAndConditionCheckbox: true,\n enableNewClaimMissingPointFlow: true,\n enableTicketTypeCardChanges: true,\n travelReady: {\n gatewayBaseUrl: 'https://widget-api.safetravel.amadeus.com',\n gatewayClientId: 'x1ASrT2jbpxSx0nacYnCYpswFF9iHOQ5',\n gatewayClientSecret: 'gmLFbYfYQE7kbjas',\n assetBaseUrl: '/cdn/lambda/prod/browser/',\n },\n gtmContainerSrc: '//www.googletagmanager.com',\n gtmContainerId: 'GTM-5JS398',\n enableMMBThirdPartyAncillaries: true,\n enableShowingSAF: false,\n enableBwThirdPartyAncillaries: true,\n enableSalesforceDataCloud: true,\n salesforceDataCloudScriptSrcURL:\n 'https://cdn.c360a.salesforce.com/beacon/c360a/db5e18f4-83ad-4c55-81d1-9c17648c979c/scripts/c360a.min.js',\n corporatePredict: false,\n enableSynchronousTicketingOnConfirmationPage: true,\n enableCorporateData: true,\n enableSafContributionCard: true,\n enableVisaLightCreditCardBanner: isVisaLightCreditCardBannerEffective,\n enableEditPaxDetailsOnReviewPage: true,\n enableGermanRailway: false,\n enableShowFlightNumbers: true,\n enableShowCheaperOnlineTag: false,\n enableAccountCreationVerification: false,\n enableEuropeUnder100: false,\n enableCorporateSaf: false,\n corporateChoooseUrl: 'https://chooose.today',\n enableNewDownloadAttachmentFlow: true,\n enableCorporateSeatBenefit: true,\n enableSpecialUpsellCategory: false,\n enableNewUploadAttachmentFlow: true,\n enableTravelExtrasTierBenefitTag: false,\n enableBookingFlowSeatMapPreFetch: true,\n enableNewStepper: false,\n enableBookingFlowAncillaryBundles: false,\n};\n\nexport const environment = config;\n","import { createSelector, MemoizedSelector } from '@ngrx/store';\n\nimport { AppState } from '@fcom/core';\n\nimport { BookingWidgetState } from '../../interfaces/store.interface';\n\nexport interface BookingWidgetAppState {\n bookingWidget: BookingWidgetState;\n}\n\nexport type BookingWidgetAndAppState = AppState & BookingWidgetAppState;\n\nexport const bookingWidgetFeatureState: MemoizedSelector =\n createSelector(\n (appState: BookingWidgetAppState) => appState,\n (a) => a\n );\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport {\n ButtonModule,\n FcomFormsModule,\n IconsModule,\n LoaderModule,\n NotificationsModule,\n UiComponentsModule,\n} from '@fcom/ui-components';\n\nimport { ComponentsModule } from '../components/components.module';\nimport { NavigationTriggerModule } from '../components/header/navigation-trigger.module';\nimport { GtmModule } from '../gtm';\nimport { PipesModule } from '../pipes';\nimport {\n LoginButtonComponent,\n LoginFormComponent,\n LoginIframeComponent,\n LoginWidgetComponent,\n ProfileQuickViewComponent,\n LoginCardComponent,\n JoinFormComponent,\n LoginFormContainerComponent,\n} from './components';\nimport { DirectiveModule } from '../directives';\nimport { LoginDialogComponent } from './components/login-dialog/login-dialog.component';\nimport { FinFormsModule } from '../forms';\n\n@NgModule({\n imports: [\n CommonModule,\n ComponentsModule,\n GtmModule,\n PipesModule,\n NavigationTriggerModule,\n UiTranslateModule,\n DirectiveModule,\n IconsModule,\n ButtonModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n FcomFormsModule,\n LoaderModule,\n NotificationsModule,\n FinFormsModule,\n UiComponentsModule,\n ],\n declarations: [\n LoginIframeComponent,\n LoginButtonComponent,\n ProfileQuickViewComponent,\n LoginWidgetComponent,\n LoginFormContainerComponent,\n LoginCardComponent,\n LoginFormComponent,\n JoinFormComponent,\n LoginDialogComponent,\n ],\n exports: [\n LoginIframeComponent,\n LoginButtonComponent,\n ProfileQuickViewComponent,\n LoginWidgetComponent,\n LoginFormContainerComponent,\n LoginCardComponent,\n LoginFormComponent,\n JoinFormComponent,\n LoginDialogComponent,\n ],\n})\nexport class LoginModule {}\n","import { Cabin } from '@fcom/dapi/api/models';\n\nexport enum FlightTimeOption {\n MORNING = 'MORNING',\n AFTERNOON = 'AFTERNOON',\n EVENING = 'EVENING',\n}\n\nexport type FlightFilters = {\n departureTime?: FlightTimeOption[];\n arrivalTime?: FlightTimeOption[];\n refundable?: boolean;\n stopsCount?: number | null;\n cabin?: Cabin;\n maxStops?: number | null;\n};\n\nexport const defaultFilterValues = {\n defaultStopsOption: null,\n defaultRefundabilityOption: false,\n defaultTravelClass: Cabin.MIXED,\n defaultTimeOptions: [...Object.values(FlightTimeOption)],\n};\n\nexport const FAKE_LOAD_TIME = 600;\n","import { textMatch } from '@fcom/core/utils';\n\nimport {\n DestinationSearchItem,\n DestinationSearchItemType,\n DestinationSearchQueryParamNames,\n} from '../interfaces/destination-search.interface';\n\nexport const flattenDestinations = (destinations: DestinationSearchItem[]): DestinationSearchItem[] => {\n return destinations?.reduce((flattened: DestinationSearchItem[], destination: DestinationSearchItem) => {\n if (destination?.items) {\n const flattenedChildren = flattenDestinations(destination.items);\n const { items: _, ...destWithoutChildren } = destination;\n return [...flattened, destWithoutChildren, ...flattenedChildren];\n } else {\n return [...flattened, destination];\n }\n }, []);\n};\n\nexport const findDestinationsForQueryParams = (\n destinations: DestinationSearchItem[],\n preSelectedDestinations: DestinationSearchQueryParamNames\n): DestinationSearchItem[] => {\n return flattenDestinations(destinations)?.filter((d: DestinationSearchItem) => {\n switch (d.type) {\n case DestinationSearchItemType.DESTINATION:\n return preSelectedDestinations?.destination?.some((locationCode) => textMatch(d.locationCode, locationCode));\n case DestinationSearchItemType.COUNTRY:\n return preSelectedDestinations?.country?.some(\n (countryCodeOrName) =>\n textMatch(d.countryCode, countryCodeOrName) || textMatch(d.titleMaster, countryCodeOrName)\n );\n case DestinationSearchItemType.CONTINENT:\n return preSelectedDestinations?.continent?.some((continentName) => textMatch(d.titleMaster, continentName));\n default:\n return false;\n }\n });\n};\n","import { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { ObservableInput, ObservedValueOf, ReadableStreamLike } from '../types';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { Subscriber } from '../Subscriber';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\n\nexport function innerFrom>(input: O): Observable>;\nexport function innerFrom(input: ObservableInput): Observable {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n\n throw createInvalidObservableTypeError(input);\n}\n\n/**\n * Creates an RxJS Observable from an object that implements `Symbol.observable`.\n * @param obj An object that properly implements `Symbol.observable`.\n */\nexport function fromInteropObservable(obj: any) {\n return new Observable((subscriber: Subscriber) => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n // Should be caught by observable subscribe function error handling.\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\n\n/**\n * Synchronously emits the values of an array like and completes.\n * This is exported because there are creation functions and operators that need to\n * make direct use of the same logic, and there's no reason to make them run through\n * `from` conditionals because we *know* they're dealing with an array.\n * @param array The array to emit values from\n */\nexport function fromArrayLike(array: ArrayLike) {\n return new Observable((subscriber: Subscriber) => {\n // Loop over the array and emit each value. Note two things here:\n // 1. We're making sure that the subscriber is not closed on each loop.\n // This is so we don't continue looping over a very large array after\n // something like a `take`, `takeWhile`, or other synchronous unsubscription\n // has already unsubscribed.\n // 2. In this form, reentrant code can alter that array we're looping over.\n // This is a known issue, but considered an edge case. The alternative would\n // be to copy the array before executing the loop, but this has\n // performance implications.\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\n\nexport function fromPromise(promise: PromiseLike) {\n return new Observable((subscriber: Subscriber) => {\n promise\n .then(\n (value) => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n },\n (err: any) => subscriber.error(err)\n )\n .then(null, reportUnhandledError);\n });\n}\n\nexport function fromIterable(iterable: Iterable) {\n return new Observable((subscriber: Subscriber) => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\n\nexport function fromAsyncIterable(asyncIterable: AsyncIterable) {\n return new Observable((subscriber: Subscriber) => {\n process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n });\n}\n\nexport function fromReadableStreamLike(readableStream: ReadableStreamLike) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\n\nasync function process(asyncIterable: AsyncIterable, subscriber: Subscriber) {\n for await (const value of asyncIterable) {\n subscriber.next(value);\n // A side-effect may have closed our subscriber,\n // check before the next iteration.\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n}\n","import { ChangeDetectorRef, Injectable, Pipe, OnDestroy, PipeTransform } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { Location } from '@fcom/core-api';\n\nimport { LocationsService } from '../services/locations.service';\n\n@Injectable()\n@Pipe({\n name: 'finLocationName',\n pure: false,\n})\nexport class LocationNamePipe implements OnDestroy, PipeTransform {\n private async: AsyncPipe;\n private cachedInputs: string[] = [];\n private location$: Observable;\n\n constructor(\n private ref: ChangeDetectorRef,\n private locationsService: LocationsService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(key: string): string {\n this.location$ = this.locationsService.retrieveLocation(key);\n\n const locationName$: Observable = this.location$.pipe(\n map((location: Location) => {\n if (!location) {\n if (!this.cachedInputs.includes(key)) {\n this.locationsService.triggerLocationFetch(key);\n this.cachedInputs.push(key);\n }\n\n return key;\n }\n\n if (!location.cityName && !location.title) {\n return key;\n }\n\n return location.cityName ? location.cityName : location.title;\n })\n );\n\n return this.async.transform(locationName$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n}\n","import {\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n OnInit,\n OnDestroy,\n Inject,\n PLATFORM_ID,\n NgZone,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { WindowRef } from '@fcom/core/providers/window';\n\nconst mutationObserverInitConfig: { [key: string]: MutationObserverInit } = {\n default: {\n attributes: false,\n childList: true,\n characterData: false,\n subtree: true,\n },\n travelRestrictions: {\n attributes: true,\n childList: true,\n characterData: false,\n subtree: true,\n },\n};\n\n/**\n * @class MutationObserverDirective\n * @description Observe DOM mutations according to the Inputted MutationObserver init configuration and emit them to the Output\n *\n * Usage example:\n * \n */\n@Directive({\n selector: '[finMutationObserver]',\n})\nexport class MutationObserverDirective implements OnInit, OnDestroy {\n @Input()\n mutationObserverInitConfigKey = 'default';\n\n @Output()\n finMutationObserver: EventEmitter = new EventEmitter();\n\n @Output()\n finObserverRemoved: EventEmitter = new EventEmitter();\n\n private changes: MutationObserver;\n\n constructor(\n private windowRef: WindowRef,\n private elementRef: ElementRef,\n @Inject(PLATFORM_ID) private platform: object,\n private ngZone: NgZone\n ) {}\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platform) && this.detectMutationSupport()) {\n this.observeMutations();\n }\n }\n\n detectMutationSupport(): boolean {\n return 'MutationObserver' in this.windowRef.nativeWindow;\n }\n\n observeMutations(): void {\n const element: Node = this.elementRef.nativeElement;\n this.ngZone.runOutsideAngular(() => {\n this.changes = new MutationObserver((mutations: MutationRecord[]) => {\n mutations.forEach((mutation: MutationRecord) => this.ngZone.run(() => this.finMutationObserver.emit(mutation)));\n });\n\n this.changes.observe(element, mutationObserverInitConfig[this.mutationObserverInitConfigKey]);\n });\n }\n\n ngOnDestroy(): void {\n if (this.changes) {\n this.finObserverRemoved.emit();\n this.changes.disconnect();\n }\n }\n}\n","import { GlobalBookingTravelClass } from '@fcom/core';\nimport { uniqueBy } from '@fcom/core/utils';\nimport {\n Bound,\n FareFamily,\n FareInformation,\n FinnairBoundFareFamily,\n FinnairCabinClass,\n Offer,\n} from '@fcom/dapi/api/models';\nimport { FlightTimeOption } from '@fcom/common-booking/interfaces/flight-filters.interface';\nimport { shouldTimeBeKept } from '@fcom/common-booking/utils/date-utils';\nimport { BoundFareFamily } from '@fcom/common/interfaces/booking';\nimport { ExtendedFareFamily } from '@fcom/common-booking/interfaces';\nimport { fareFamiliesWithoutCampaignFiltering } from '@fcom/common/config/booking-config';\nimport { getCabinClassShortCode } from '@fcom/common-booking/utils/common-booking.utils';\n\nimport { ItineraryDetails } from '../interfaces';\n\nconst cabinClassPriorityOrder = [\n GlobalBookingTravelClass.FIRST.toString(),\n GlobalBookingTravelClass.BUSINESS.toString(),\n GlobalBookingTravelClass.ECOPREMIUM.toString(),\n GlobalBookingTravelClass.ECONOMY.toString(),\n];\n\nexport const effectiveCabinClass = (fareFamily: FinnairBoundFareFamily): string => {\n const fareFamilyCabinClasses = fareFamily?.fareInformation\n ?.filter(uniqueBy((fareInformation) => fareInformation.cabinClass))\n .map((fareInformation) => fareInformation.cabinClass)\n .sort((a, b) => cabinClassPriorityOrder.indexOf(a) - cabinClassPriorityOrder.indexOf(b));\n return fareFamilyCabinClasses?.[0] ?? undefined;\n};\n\nconst cabinClasses = [...cabinClassPriorityOrder].reverse();\nconst getHighestCabinClassIndex = (fareFamily: FinnairBoundFareFamily): number => {\n return Math.max(\n ...fareFamily.fareInformation.map((fareInfo) => {\n return cabinClasses.indexOf(fareInfo.cabinClass as FinnairCabinClass);\n })\n );\n};\n\nexport const getHighestCabinClass = (fareFamily: FinnairBoundFareFamily): string => {\n const index = getHighestCabinClassIndex(fareFamily);\n return cabinClasses[index];\n};\n\nexport const filterAndSortFareFamilyByCabinClass = (\n fareFamilies: FinnairBoundFareFamily[]\n): FinnairBoundFareFamily[] => {\n return [...fareFamilies]\n .sort((a, b) => parseFloat(a.totalPrice) - parseFloat(b.totalPrice))\n .filter(uniqueBy((fareFamily) => effectiveCabinClass(fareFamily)))\n .sort((a, b) => {\n return getHighestCabinClassIndex(a) - getHighestCabinClassIndex(b);\n });\n};\n\nconst sortValue = (number: string): number => +number || Infinity;\n\nexport const getBoundFareFamilies = (\n fareFamilies: FareFamily[],\n offers: Offer[],\n bound: Bound,\n type: 'outbound' | 'inbound'\n): BoundFareFamily[] => {\n return fareFamilies\n .map((f) => {\n const cheapestOffer = offers\n .filter((offer) =>\n type === 'outbound'\n ? offer.outboundFareFamily === f.fareFamilyCode && offer.outboundId === bound.boundId\n : offer.inboundFareFamily === f.fareFamilyCode && offer.inboundId === bound.boundId\n )\n .sort(\n (a, b) =>\n sortValue(a.totalPointsPrice) - sortValue(b.totalPointsPrice) ||\n sortValue(a.totalPrice) - sortValue(b.totalPrice)\n )[0];\n if (!cheapestOffer) {\n return undefined;\n }\n return {\n ...f,\n fareFamilyCode: f.fareFamilyCode,\n price: type === 'outbound' ? cheapestOffer.outboundPrice : cheapestOffer.inboundPrice,\n totalPrice: cheapestOffer.totalPrice,\n points: type === 'outbound' ? cheapestOffer.outboundPointsPrice : cheapestOffer.inboundPointsPrice,\n totalPoints: cheapestOffer.totalPointsPrice,\n id: bound.boundId,\n quota: bound.quotas[f.fareFamilyCode],\n fareInformation:\n type === 'outbound' ? cheapestOffer.outboundFareInformation : cheapestOffer.inboundFareInformation,\n };\n })\n .filter(Boolean)\n .sort((a, b) => sortValue(a.points) - sortValue(b.points) || sortValue(a.price) - sortValue(b.price));\n};\n\nexport const isDepartureTimeInGivenOptions = (departureTimes: FlightTimeOption[], departureTime: string): boolean => {\n return !departureTimes || departureTimes.length === 3 || shouldTimeBeKept(departureTimes, departureTime);\n};\n\nexport const isArrivalTimeInGivenOptions = (arrivalTimes: FlightTimeOption[], arrivalTime: string): boolean => {\n return !arrivalTimes || arrivalTimes.length === 3 || shouldTimeBeKept(arrivalTimes, arrivalTime);\n};\n\nexport const matchesBoundStopCount = (stopsCount: number, stops: number): boolean => {\n return stopsCount == null || (stopsCount === 0 ? stops === 0 : stops >= stopsCount);\n};\n\nexport const containsOnlyOneCabin = (\n details: (ItineraryDetails | FareInformation)[],\n cabinClass?: GlobalBookingTravelClass\n): boolean => {\n const cClass = cabinClass ?? details?.[0]?.cabinClass;\n return details.every((fi) => fi.cabinClass === cClass);\n};\n\nexport const getPreselectedFareFamily = (\n cabinClass: string,\n fareFamilies: T[]\n): T => {\n const codeStart = getCabinClassShortCode(cabinClass);\n const regexPrefix = codeStart === 'E' ? '^[^P]*' : '';\n const campaignCode = new RegExp(`${regexPrefix}${codeStart}CCAMP`);\n const campaignFare = fareFamilies.find(\n (ff) =>\n campaignCode.test(ff.fareFamilyCode) &&\n !Object.values(fareFamiliesWithoutCampaignFiltering).includes(ff.fareFamilyCode)\n );\n\n // if campaign fare is avalible then preselect campaignFare\n if (campaignFare) {\n return campaignFare;\n }\n\n // Otherwise, preselect classic fare family of current cabin class\n const classicFareFamily = new RegExp(`${regexPrefix}${codeStart}CLAS`);\n\n return fareFamilies.find((ff) => classicFareFamily.test(ff.fareFamilyCode));\n};\n","\n
0\" [ngClass]=\"content.subjectTaxonomyTags\">\n
\n
\n
\n \n {{ content.teaserTitle }}\n \n
\n
\n \n\n \n \n \n
\n \n\n \n \n\n \n
\n {{ link.teaserTitle }}\n
\n
\n
\n
\n
\n
\n
\n \n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, of } from 'rxjs';\n\nimport { CmsArticle, CmsCollection, CmsContentType, CmsPicture, CmsVideo, CmsViewType } from '@fcom/core-api';\nimport { AspectRatios } from '@fcom/ui-components';\n\n@Component({\n selector: 'cms-article-collection',\n templateUrl: './cms-article-collection.component.html',\n styleUrls: ['./cms-article-collection.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsArticleCollectionComponent {\n readonly CmsContentType = CmsContentType;\n readonly CmsViewType = CmsViewType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n aspectRatio$?: Observable = of('16x9');\n\n @Input()\n content$: Observable>;\n\n @Input()\n useGrid = true;\n\n @Input()\n disableTeaserTitle = false;\n\n @Input()\n sectionWrapperClass = 'section pr-large-y';\n\n @Input()\n sectionClass = 'section-one-third-right pr-xlarge-b';\n}\n","import { NgModule } from '@angular/core';\n\nimport { LocationNamePipe } from './location-name.pipe';\n\n@NgModule({\n declarations: [LocationNamePipe],\n exports: [LocationNamePipe],\n})\nexport class LocationsPipeModule {}\n","import { NgModule } from '@angular/core';\n\nimport { StoreModule } from '@ngrx/store';\n\nimport { LocationsPipeModule, LocationNamePipe } from './pipes';\nimport { locationsReducer } from './store/reducers';\nimport { LOCATIONS_FEATURE_KEY } from './constants';\n\n@NgModule({\n imports: [StoreModule.forFeature(LOCATIONS_FEATURE_KEY, locationsReducer), LocationsPipeModule],\n declarations: [],\n exports: [LocationNamePipe],\n providers: [],\n})\nexport class LocationsModule {}\n","export const LOCATIONS_FEATURE_KEY = 'locations';\n","

\n \n {{ flightOrBound.departure.dateTime | finDateFormat: 'DATE' }}\n \n /\n \n {{ flightOrBound.departure.dateTime | finTime }} {{ flightOrBound.departure.locationCode }}\n \n \n \n \n \n {{ flightOrBound.arrival.dateTime | finTime }}\n \n \n +1\n \n \n {{ flightOrBound.arrival.locationCode }}\n \n /\n \n {{ uniqueAirlineName }},\n \n / {{ flightOrBound?.duration | finDuration | async }} /\n \n {{ 'bookingSummary.direct' | finLocalization }}\n {{ 'stopOver' | finLocalization: [stops] }}\n {{ 'stopOvers' | finLocalization: [stops] }}\n \n \n /\n {{ fareFamily ?? (cabinClass | finLocalization) }} \n \n

\n","import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport {\n FinnairBoundItem,\n FinnairDisruptedBoundItem,\n FinnairItineraryItemFlight,\n FinnairItineraryItemType,\n} from '@fcom/dapi/api/models';\nimport { COMMON_BOOKING_TRAVEL_CLASSES } from '@fcom/core';\n\nimport { isDifferentDay } from '../../../../reaccommodation/utils/bound.utils';\nimport { isBound, isBusOrTrain } from '../../../utils/common-booking.utils';\n\n@Component({\n selector: 'fin-flight-summary',\n templateUrl: './flight-summary.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlightSummaryComponent implements OnInit, OnChanges {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() flightOrBound: FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight;\n\n returnIsDifferentDay: boolean;\n uniqueAirlineNames: string[];\n stops: number;\n fareFamily: string;\n cabinClass: string;\n icon: SvgLibraryIcon;\n\n ngOnInit(): void {\n this.update();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['flightOrBound']) {\n this.update();\n }\n }\n\n private update(): void {\n this.returnIsDifferentDay = isDifferentDay(\n this.flightOrBound.departure.dateTime,\n this.flightOrBound.arrival.dateTime\n );\n\n if (isBound(this.flightOrBound)) {\n this.uniqueAirlineNames = this.flightOrBound.uniqueAirlineNames;\n this.stops = this.flightOrBound.stops;\n this.fareFamily = this.flightOrBound.fareFamily?.name;\n\n if (!this.fareFamily) {\n this.cabinClass = COMMON_BOOKING_TRAVEL_CLASSES[this.flightOrBound['cabinClass']]?.translationKey;\n }\n this.icon = this.getIcon(\n this.flightOrBound.itinerary\n .filter((itinerary) => itinerary.type === FinnairItineraryItemType.FLIGHT)\n .some((flight: FinnairItineraryItemFlight) => isBusOrTrain(flight))\n );\n } else {\n this.uniqueAirlineNames = [this.flightOrBound.operatingAirline.name];\n this.stops = 0;\n this.cabinClass = COMMON_BOOKING_TRAVEL_CLASSES[this.flightOrBound.cabinClass].translationKey;\n this.icon = this.getIcon(isBusOrTrain(this.flightOrBound));\n }\n }\n\n private getIcon(isTrainOrBus: boolean): SvgLibraryIcon {\n if (isTrainOrBus) {\n return SvgLibraryIcon.MINUS;\n }\n return SvgLibraryIcon.AIRCRAFT_HORIZONTAL;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { map, Observable } from 'rxjs';\n\nimport { finShare } from '@fcom/rx';\nimport { ConfigService, TzDate } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { FinnairOrderPreview, FinnairOrderPreviewsResponse } from '@fcom/dapi/api/models';\nimport { OrderService } from '@fcom/dapi/api/services';\n\n@Injectable()\nexport class OrderPreviewsService {\n constructor(\n private orderService: OrderService,\n private languageService: LanguageService,\n private configService: ConfigService\n ) {}\n\n getUpcomingTrips(): Observable {\n return this.orderService\n .fetchOrderPreviews(this.configService.cfg.orderUrl, {\n locale: this.languageService.localeValue,\n })\n .pipe(\n map((response: FinnairOrderPreviewsResponse) => ({\n ...response,\n orderPreviews: this.getSortedOrderPreviewsByDepartureDate(response.orderPreviews),\n })),\n finShare()\n );\n }\n\n private getSortedOrderPreviewsByDepartureDate(orderPreviews: FinnairOrderPreview[]): FinnairOrderPreview[] {\n return [...(orderPreviews || [])].sort((previousOrder, nextOrder) =>\n this.compareOrderPreviewDates(previousOrder, nextOrder)\n );\n }\n\n private compareOrderPreviewDates(previousOrder: FinnairOrderPreview, nextOrder: FinnairOrderPreview): number {\n const previousDate = TzDate.of(previousOrder.bounds[0].departure.dateTime).toLocalDate();\n const nextDate = TzDate.of(nextOrder.bounds[0].departure.dateTime).toLocalDate();\n if (previousDate.gt(nextDate)) {\n return 1;\n }\n if (previousDate.lt(nextDate)) {\n return -1;\n }\n return 0;\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { OrderApiModule } from '@fcom/dapi/api/order-api.module';\n\nimport { OrderPreviewsService } from './services/order-previews.service';\n\n@NgModule({\n declarations: [],\n exports: [],\n imports: [OrderApiModule],\n providers: [OrderPreviewsService],\n})\nexport class OrderModule {}\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\nvar inspect = require('object-inspect');\n\nvar $TypeError = require('es-errors/type');\n\n/*\n* This function traverses the list returning the node corresponding to the given key.\n*\n* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.\n* By doing so, all the recently used nodes can be accessed relatively quickly.\n*/\n/** @type {import('./list.d.ts').listGetNode} */\n// eslint-disable-next-line consistent-return\nvar listGetNode = function (list, key, isDelete) {\n\t/** @type {typeof list | NonNullable<(typeof list)['next']>} */\n\tvar prev = list;\n\t/** @type {(typeof list)['next']} */\n\tvar curr;\n\t// eslint-disable-next-line eqeqeq\n\tfor (; (curr = prev.next) != null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tif (!isDelete) {\n\t\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\t\tcurr.next = /** @type {NonNullable} */ (list.next);\n\t\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\t}\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\n/** @type {import('./list.d.ts').listGet} */\nvar listGet = function (objects, key) {\n\tif (!objects) {\n\t\treturn void undefined;\n\t}\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\n/** @type {import('./list.d.ts').listSet} */\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = /** @type {import('./list.d.ts').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t});\n\t}\n};\n/** @type {import('./list.d.ts').listHas} */\nvar listHas = function (objects, key) {\n\tif (!objects) {\n\t\treturn false;\n\t}\n\treturn !!listGetNode(objects, key);\n};\n/** @type {import('./list.d.ts').listDelete} */\n// eslint-disable-next-line consistent-return\nvar listDelete = function (objects, key) {\n\tif (objects) {\n\t\treturn listGetNode(objects, key, true);\n\t}\n};\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannelList() {\n\t/** @typedef {ReturnType} Channel */\n\t/** @typedef {Parameters[0]} K */\n\t/** @typedef {Parameters[1]} V */\n\n\t/** @type {import('./list.d.ts').RootNode | undefined} */ var $o;\n\n\t/** @type {Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\t'delete': function (key) {\n\t\t\tvar root = $o && $o.next;\n\t\t\tvar deletedNode = listDelete($o, key);\n\t\t\tif (deletedNode && root && root === deletedNode) {\n\t\t\t\t$o = void undefined;\n\t\t\t}\n\t\t\treturn !!deletedNode;\n\t\t},\n\t\tget: function (key) {\n\t\t\treturn listGet($o, key);\n\t\t},\n\t\thas: function (key) {\n\t\t\treturn listHas($o, key);\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (!$o) {\n\t\t\t\t// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head\n\t\t\t\t$o = {\n\t\t\t\t\tnext: void undefined\n\t\t\t\t};\n\t\t\t}\n\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\tlistSet(/** @type {NonNullable} */ ($o), key, value);\n\t\t}\n\t};\n\t// @ts-expect-error TODO: figure out why this is erroring\n\treturn channel;\n};\n","\n \n \n\n\n\n \n \n\n\n\n \n \n \n \n {{ text }}\n \n \n \n \n \n\n\n\n \n \n\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n isDevMode,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\n\nimport { filter, Observable, of, Subscription } from 'rxjs';\n\nimport { SentryLogger, unsubscribe } from '@fcom/core/index';\n\nimport { ButtonMode, ButtonSize, ButtonTheme, ButtonType } from './enums';\nimport { IconPosition } from '../../icons';\nimport { ButtonIcon } from './interfaces';\nimport { LoaderTheme } from '../../loader';\nimport { AriaOptions } from '../../interfaces';\n\n@Component({\n selector: 'fcom-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss', '../buttons-shared-styles.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements OnChanges, AfterViewInit, OnDestroy {\n @HostBinding('class.fill-mode') fillMode = false;\n @HostBinding('class.fill-mode-mobile') fillModeMobile = false;\n\n /**\n * The size of the button, currently 2 static sizes\n */\n @Input() size: ButtonSize = ButtonSize.MEDIUM;\n\n /**\n * There are 8 themes available right now that renders different backgrounds, font colors and borders\n */\n @Input() theme: ButtonTheme = ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE;\n\n /**\n * The pre-translated text to show\n */\n @Input({ required: true }) text: string;\n\n /**\n * The aria tags that must be added to a button or link if it has a loading or disabled state\n */\n @Input() aria?: AriaOptions = {};\n\n /**\n * An icon to include, with its category, name and position\n */\n @Input() icon?: ButtonIcon;\n\n /**\n * Whether the button should be disabled or not\n */\n @Input() disabled = false;\n\n /**\n * Disables the button and either replaces the current icon with the loading spinner. Or will add an icon to the right of text.\n */\n @Input() loading = false;\n\n /**\n * The type of button, for example \"button\" or \"submit\"\n */\n @Input() type: ButtonType = ButtonType.BUTTON;\n\n /**\n * The pre-translated hover text to display\n */\n @Input() title: string;\n\n /**\n * If button should render as an a tag, then pass in the url\n */\n @Input() href?: string;\n\n /**\n * If link, should it open in a new tab\n */\n @Input() openInNewTab?: boolean;\n\n /**\n * If link, is it external\n */\n @Input() externalLink?: boolean;\n\n /**\n * Do we fill the whole container or work as inline-block\n */\n @Input() mode: ButtonMode = ButtonMode.INLINE;\n\n /**\n * Can the button be focused by tab key\n */\n @Input() removeFromNavigation = false;\n\n /**\n * Focus to button after some action for accessibility\n */\n @Input() focus$: Observable = of(false);\n\n @Input() id?: string = null;\n\n /**\n * Only applicable when using the href input. With this you can control the `rel` parameter on the a tag.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel\n */\n @Input() rel?: string;\n\n @ViewChild('buttonElement') buttonElement: ElementRef;\n\n /**\n * Event emitter for blur event\n */\n @Output() blurBtn = new EventEmitter();\n\n @Output() clickBtn = new EventEmitter();\n\n public readonly IconPosition = IconPosition;\n public readonly ButtonSize = ButtonSize;\n public readonly ButtonTheme = ButtonTheme;\n public readonly ButtonMode = ButtonMode;\n public readonly LoaderTheme = LoaderTheme;\n\n ariaLabel: string;\n\n constructor(@Optional() private logger?: SentryLogger) {}\n\n private subscriptions: Subscription = new Subscription();\n\n ngOnChanges(changes: SimpleChanges): void {\n const mode = 'mode';\n\n if (changes[mode]) {\n this.fillMode = changes[mode].currentValue === ButtonMode.FILL;\n this.fillModeMobile = changes[mode].currentValue === ButtonMode.FILL_MOBILE;\n }\n\n if (this.loading) {\n if (isDevMode() && !this.aria.loadingLabel) {\n this.logger?.warn('Missing aria label for loading button');\n }\n\n this.ariaLabel = this.aria.loadingLabel;\n } else {\n this.ariaLabel = this.aria.label;\n }\n }\n\n onClick(event: Event): void {\n if (this.disabled || this.loading || this.aria?.disabled) {\n event.preventDefault();\n return;\n }\n\n this.clickBtn.emit(event);\n }\n\n focus(): void {\n this.buttonElement?.nativeElement?.focus();\n }\n\n ngAfterViewInit(): void {\n this.subscriptions.add(this.focus$.pipe(filter(Boolean)).subscribe(() => this.focus()));\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n get ariaRole(): string | undefined {\n return (!this.href && this.aria?.role !== 'button') || Boolean(this.href) ? this.aria?.role : undefined;\n }\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { setLanguage } from '@fcom/core/actions/language.actions';\nimport { Location } from '@fcom/core-api/interfaces';\n\nexport const storeLocationData = createAction('[Locations] Store', props<{ location: Location }>());\nexport const removeLocationData = createAction('[Locations] Remove', props<{ location: Location }>());\nexport const cleanLocationSearch = createAction('[Locations] Clean search');\nexport const updateLocationSearch = createAction(\n '[Locations] Update search destination',\n props<{ searchData: Location[] }>()\n);\nexport const updateLocationSearchInput = createAction('[Locations] Update search input', props<{ input: string }>());\n\nconst all = union({\n setLanguage,\n storeLocationData,\n removeLocationData,\n cleanLocationSearch,\n updateLocationSearch,\n updateLocationSearchInput,\n});\n\nexport type LocationActionsUnion = typeof all;\n","export const LOYALTY_FEATURE_KEY = 'loyalty';\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\nimport { RootPaths, UTM_PARAMS } from '../constants';\n\nexport const pathIsAnyHardcodedPath = (path: string): boolean => {\n const pathArr = path.split('/');\n\n return Object.values(RootPaths).some((root) => pathArr[2] === root || pathArr.length <= 2);\n};\n\nexport const pathIsWithinHardcodedPath = (path: string, testHardcodedPath: RootPaths): boolean =>\n testHardcodedPath === path?.split('/')?.[2];\n\nexport const matchesLastPathSegment = (path: string, testPath: string): boolean => {\n const pathArr = sanitizePath(path).split('/');\n\n return testPath === pathArr[pathArr.length - 1];\n};\n\n/**\n * Used to return a route path without hash or query params\n * @param str\n */\nexport const sanitizePath = (str: string): string => {\n return str.split('#')[0].split('?')[0];\n};\n\nexport const urlWithoutQueryString = (url: string): string => url.split('?')[0];\n\nexport const urlQueryString = (url: string): string | undefined => url.split('?')[1];\n\nexport const pathSegmentsToPathString = (segments: ActivatedRouteSnapshot[]): string => {\n return segments\n .map((activeRoute) => activeRoute.url)\n .filter((urlArray) => urlArray.length)\n .flatMap((urlArray) => urlArray)\n .join('/');\n};\n\nexport const filteredUtmParamsQueryString = (url: string): string => {\n const allowedUtmParamsQueryString =\n urlQueryString(url)\n ?.split('&')\n ?.reduce((query, param) => {\n const key = param.split('=')[0];\n if (UTM_PARAMS.includes(key)) {\n return `${query}${query.length > 0 ? '&' : ''}${param}`;\n }\n return query;\n }, '') ?? '';\n\n return allowedUtmParamsQueryString ? `?${allowedUtmParamsQueryString}` : '';\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { isPlatformServer, Location } from '@angular/common';\n\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap, take } from 'rxjs/operators';\n\nimport { ModalButtons } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { equals, unsubscribe } from '@fcom/core/utils';\n\nimport { ElementActions, ElementTypes, GaContext } from '../../interfaces';\nimport { GtmService } from '../../gtm';\nimport { HotjarService, MediaQueryService } from '../../services';\nimport {\n getQualtricsUrl,\n messageAllowedForSurvey,\n QUALTRICS_DOMAIN,\n QualtricsMessageTypes,\n QualtricsSurvey,\n} from '../qualtrics.utils';\nimport { MultivariateTestService } from '../../multivariate-test/services/multivariate-test.service';\n\ninterface QualtricsPostMessage {\n bubbles: boolean;\n cancelBubble: boolean;\n cancealable: boolean;\n composed: boolean;\n currentTarget: any;\n data: any;\n defaultPrevented: boolean;\n eventPhase: number;\n isTrusted?: boolean;\n lastEventId?: string;\n message?: string;\n origin: string;\n originalTarget?: any;\n path: Array;\n ports: Array;\n returnValue: boolean;\n source: any;\n srcElement: any;\n target: any;\n timestamp: number;\n type: string;\n userActivation?: null;\n}\n\n@Component({\n selector: 'fin-qualtrics',\n templateUrl: './qualtrics.component.html',\n styleUrls: ['./qualtrics.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class QualtricsComponent implements OnInit, OnDestroy, OnChanges {\n @Input()\n survey: QualtricsSurvey = { name: '', url: '' };\n\n @Input()\n set open(open) {\n if (open) {\n this.openModal();\n }\n }\n\n @Output()\n openChange: EventEmitter = new EventEmitter();\n\n @ViewChild('surveyContainer') iframe;\n\n readonly ModalButtons = ModalButtons;\n readonly ElementTypes = ElementTypes;\n readonly ElementActions = ElementActions;\n\n qualtricsUrl$: Observable;\n removeGlobalListener: Function;\n previousEvent: any = {};\n modalOpen = false;\n private survey$: BehaviorSubject;\n private subscription = new Subscription();\n\n constructor(\n private languageService: LanguageService,\n private mediaQueryService: MediaQueryService,\n private gtmService: GtmService,\n private renderer: Renderer2,\n @Inject(PLATFORM_ID) private platform: object,\n private location: Location,\n private hotjarService: HotjarService,\n private multivariateTestService: MultivariateTestService\n ) {}\n\n ngOnInit(): void {\n this.survey$ = new BehaviorSubject(this.survey);\n this.qualtricsUrl$ = this.survey$.pipe(\n filter(Boolean),\n distinctUntilChanged((a, b) => a.name === b.name && a.url === b.url),\n switchMap((survey) => this.languageService.translate(survey.url)),\n filter(Boolean),\n switchMap((url) =>\n this.multivariateTestService.segmentsFeed$.pipe(\n take(1),\n map((segment) => [url, segment.segment])\n )\n ),\n map(\n ([url, segment]): string =>\n getQualtricsUrl(\n this.languageService.langKeyValue,\n this.languageService.langValue,\n url,\n segment,\n this.hotjarService.getUserId()\n ) + this.embeddedData()\n )\n );\n this.watchPostMessages();\n\n this.subscription.add(\n this.mediaQueryService.getResizeEvent$().subscribe(() => {\n this.adjustIframeHeight();\n })\n );\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['survey'] && !changes['survey'].firstChange) {\n this.survey$.next(changes['survey'].currentValue);\n }\n }\n\n ngOnDestroy(): void {\n if (this.removeGlobalListener) {\n this.removeGlobalListener();\n }\n unsubscribe(this.subscription);\n }\n\n embeddedData(): string {\n const path: string = this.location.path();\n const stripParams: string = path.split('?')[0];\n const splitPath: string[] = stripParams.split('/');\n const pagePath: string = path.includes('/int/gb/') || splitPath.length <= 2 ? path : splitPath.slice(2).join('/');\n\n /**\n * Send additional data to Qualtrics\n * Can be used from survey if instructed to extract the embedded data\n * current_page_url = full path with params stripped of page ex: /fi-en/url/path\n * pagePath = path with locale-lang removed ex: url/path\n * locale = countrySite code ex: FI\n */\n return `¤t_page_url=${stripParams}&pagePath=${pagePath}&locale=${this.languageService.ddsLocaleValue.countrySite}`;\n }\n\n openModal(): void {\n this.modalOpen = true;\n\n this.gtmService.trackElement(\n this.survey.name,\n GaContext.QUALTRICS,\n ElementTypes.SURVEY,\n undefined,\n ElementActions.OPEN\n );\n }\n\n onClose(): void {\n this.modalOpen = false;\n\n this.openChange.emit(false);\n\n this.gtmService.trackElement(\n this.survey.name,\n GaContext.QUALTRICS,\n ElementTypes.SURVEY,\n undefined,\n ElementActions.CLOSE\n );\n }\n\n surveyLoaded(): void {\n this.adjustIframeHeight();\n }\n\n private adjustIframeHeight(): void {\n const parentHeight: number = this.iframe?.nativeElement.parentElement?.offsetHeight;\n if (!parentHeight) {\n return;\n }\n const margin = 8;\n this.iframe.nativeElement.style.minHeight = 'auto';\n this.iframe.nativeElement.style.height = `${parentHeight - margin}px`;\n }\n\n private watchPostMessages() {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n this.removeGlobalListener = this.renderer.listen('window', 'message', (event) => {\n this.processMessage(event);\n });\n }\n\n private processMessage(event: QualtricsPostMessage) {\n if (event.origin !== QUALTRICS_DOMAIN) {\n return;\n }\n\n const key = event.message ? 'message' : 'data';\n const data = event[key];\n if (!data) {\n return;\n }\n const currentMessage = Object.keys(data)[0];\n\n if (\n this.messageHasRealValue(currentMessage) &&\n !equals(this.previousEvent, event.data) &&\n messageAllowedForSurvey(this.survey.name, currentMessage)\n ) {\n this.previousEvent = event.data; // Sometimes qualtrics sends duplicate messages, so we filter those out by saving the previous one\n\n switch (currentMessage) {\n case QualtricsMessageTypes.OPTIN_RESPONSE:\n this.gtmService.trackElement(\n `${event.data.optInResponse.surveyName}-${event.data.optInResponse.result}`,\n GaContext.QUALTRICS,\n ElementTypes.SURVEY,\n `${event.data.optInResponse.result}`,\n ElementActions.CLICK\n );\n break;\n case QualtricsMessageTypes.NPS_RATING_RESPONSE:\n this.gtmService.trackElement(\n `${event.data.npsRatingResponse.surveyName}-${event.data.npsRatingResponse.result}`,\n GaContext.QUALTRICS,\n ElementTypes.SURVEY,\n `${event.data.npsRatingResponse.result}`,\n ElementActions.CLICK\n );\n break;\n case QualtricsMessageTypes.SURVEY_DONE:\n this.gtmService.trackElement(\n `${event.data.surveyDone}`,\n GaContext.QUALTRICS,\n ElementTypes.SURVEY,\n undefined,\n ElementActions.SUBMIT\n );\n break;\n case QualtricsMessageTypes.CONFSURVEY_DONE:\n this.gtmService.trackElement(\n `${event.data.confSurveyDone}`,\n GaContext.QUALTRICS,\n ElementTypes.SURVEY,\n undefined,\n ElementActions.SUBMIT\n );\n break;\n default:\n break;\n }\n }\n }\n\n private messageHasRealValue(messageValue: string): boolean {\n return (\n messageValue.indexOf(QualtricsMessageTypes.OPTIN_RESPONSE) > -1 ||\n messageValue.indexOf(QualtricsMessageTypes.NPS_RATING_RESPONSE) > -1 ||\n messageValue.indexOf(QualtricsMessageTypes.SURVEY_DONE) > -1 ||\n messageValue.indexOf(QualtricsMessageTypes.CONFSURVEY_DONE) > -1\n );\n }\n}\n","\n \n \n\n","/**\n * Checks to see if a value is not only a `Date` object,\n * but a *valid* `Date` object that can be converted to a\n * number. For example, `new Date('blah')` is indeed an\n * `instanceof Date`, however it cannot be converted to a\n * number.\n */\nexport function isValidDate(value: any): value is Date {\n return value instanceof Date && !isNaN(value as any);\n}\n","/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n","
\n
\n \n
\n\n
\n \n {{ 'actions.home' | finLocalization }}\n \n \n\n \n
\n\n
\n \n
\n
\n\n\n \n\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n OnInit,\n EventEmitter,\n Output,\n ChangeDetectorRef,\n} from '@angular/core';\n\nimport { CustomIcon, IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\nimport { NEVER, Observable } from 'rxjs';\n\nimport { NativeBridgeService } from '@fcom/core/services/native-bridge/native-bridge.service';\n\n@Component({\n selector: 'fin-header-boxes',\n styleUrls: ['./header-boxes.component.scss'],\n templateUrl: './header-boxes.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HeaderBoxesComponent implements OnInit {\n readonly CustomIcon = CustomIcon;\n readonly IconLibrary = IconLibrary;\n\n @Input()\n homeLink$: Observable = NEVER;\n\n showLink: boolean;\n\n @Output()\n homeGtmEvent: EventEmitter = new EventEmitter();\n\n constructor(\n private nativeBridgeService: NativeBridgeService,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n if (this.nativeBridgeService.isInsideNativeWebView) {\n this.showLink = false;\n } else {\n this.showLink = true;\n }\n this.cdr.markForCheck();\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\n\nimport { isEmpty, resolveTailName } from '@fcom/core/utils';\n\n/**\n * Map airline codes into tail names.\n * airlineCodes Operating airline code array\n */\n@Injectable()\n@Pipe({\n name: 'finTailNames',\n pure: true,\n})\nexport class TailNamesPipe implements PipeTransform {\n transform(airlineCodes: string[]): string[] {\n if (isEmpty(airlineCodes)) {\n return [];\n }\n\n return airlineCodes.map((code) => resolveTailName(code?.toLowerCase())).filter(Boolean);\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\n/**\n *\n * Async Scheduler\n *\n * Schedule task as if you used setTimeout(task, duration)\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asapScheduler} scheduler.\n *\n * ## Examples\n * Use async scheduler to delay task\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * const task = () => console.log('it works!');\n *\n * asyncScheduler.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n * ```\n *\n * Use async scheduler to repeat task in intervals\n * ```ts\n * import { asyncScheduler } from 'rxjs';\n *\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * asyncScheduler.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n * ```\n */\n\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\n\n/**\n * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.\n */\nexport const async = asyncScheduler;\n","import { Injectable } from '@angular/core';\n\nimport { ValidationErrors } from '@fcom/common/utils';\nimport { LocalDate } from '@fcom/core/utils';\nimport { FinnairPassengerCode } from '@fcom/dapi/api/models';\n\n@Injectable()\nexport class PaxValidationService {\n /**\n * Validates the passengers age based on business rules:\n *\n * - Infants must be infants for the whole trip (cannot be 2 years old at the time of last flight's arrival)\n * - Infants must be born -1 days before current day\n * - Children must be at most 11 years of age\n *\n * @param paxType the type of the traveling passenger\n * @param birthDate the passengers birth date (midnight is fine)\n * @param minBirthDateInclusive the minimum local date\n * @param maxBirthDateInclusive the local arrival date and time of the last flight\n * @return {ValidationErrors} errors occurred during validation or `null` if valid.\n */\n validatePaxAge(\n paxType: FinnairPassengerCode | string,\n birthDate: LocalDate,\n minBirthDateInclusive: LocalDate,\n maxBirthDateInclusive: LocalDate\n ): ValidationErrors {\n switch (paxType) {\n case FinnairPassengerCode.C_15:\n return this.validateAge(birthDate, minBirthDateInclusive, maxBirthDateInclusive, 'c15TooOld', 'c15TooYoung');\n case FinnairPassengerCode.CHD:\n return this.validateAge(\n birthDate,\n minBirthDateInclusive,\n maxBirthDateInclusive,\n 'childTooOld',\n 'childTooYoung'\n );\n case FinnairPassengerCode.INF:\n return this.validateAge(\n birthDate,\n minBirthDateInclusive,\n maxBirthDateInclusive,\n 'infantTooOld',\n 'infantNotBorn'\n );\n default:\n return this.validateAge(birthDate, null, maxBirthDateInclusive, null, 'adultTooYoung');\n }\n }\n\n private validateAge(\n birthDate: LocalDate,\n minBirthDateInclusive: LocalDate,\n maxBirthDateInclusive: LocalDate,\n minBirthDateInclusiveErrorKey: string,\n maxBirthDateInclusiveErrorKey: string\n ): ValidationErrors {\n if (birthDate.gt(maxBirthDateInclusive)) {\n return { [maxBirthDateInclusiveErrorKey]: true };\n }\n if (minBirthDateInclusive && birthDate.lt(minBirthDateInclusive)) {\n return { [minBirthDateInclusiveErrorKey]: true };\n }\n return null;\n }\n}\n","import { ChangeDetectorRef, Pipe, PipeTransform, OnDestroy } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { isNull, isUndefined, ReplaceParams } from '@fcom/core/utils';\n\nimport { equals } from '../utils/equals';\nimport { LanguageService, TranslateOptions } from '../services/language.service';\n\n/**\n * Asynchronous localization pipe\n * - Uses LanguageService to localize the input\n *\n * - Allows message format like substitution\n *\n * @example\n *\n * When having\n *\n * localizations = {\n * foo: 'My name is {me}',\n * bar: 'Hello {you}, my name is {me}'\n * }\n *\n * The pipe would translate the following\n *\n * 'foo' | finLocalization: { me: 'Matti' } -> 'My name is Matti',\n * 'bar' | finLocalization: { you: 'Matti', me: 'Teppo' } -> 'Hello Matti, my name is Teppo'\n *\n * Or the old way:\n *\n * localizations = {\n * foo: 'My name is {0}',\n * bar: 'Hello {1}, my name is {0}'\n * }\n *\n * The pipe would translate the following\n *\n * 'foo' | finLocalization:['Matti'] -> 'My name is Matti',\n * 'bar' | finLocalization:['Teppo', 'Matti'] -> 'Hello Matti, my name is Teppo'\n *\n * - TranslateOptions can be specified as a last optional parameter\n *\n * @example\n *\n * Error will not be thrown if translation is not found for the 'foo' key\n *\n * 'foo' | finLocalization:['Matti']:{ logErrors: false },\n * 'foo' | finLocalization:undefined:{ logErrors: false }\n */\n@Pipe({\n name: 'finLocalization',\n pure: false,\n})\nexport class LocalizationPipe implements PipeTransform, OnDestroy {\n private async: AsyncPipe;\n private cached$: Observable;\n private cachedKey: string | string[];\n private cachedParams: ReplaceParams;\n private cachedOptions: TranslateOptions;\n\n constructor(\n private ref: ChangeDetectorRef,\n private languageService: LanguageService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(key: string | string[], params: ReplaceParams = [], options?: TranslateOptions): any {\n if (isUndefined(key) || isNull(key)) {\n return undefined;\n }\n\n if (this.valueChanged(key, params, options)) {\n this.update(key, params, options);\n }\n return this.async.transform(this.cached$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n\n private valueChanged(key: string | string[], params: ReplaceParams, options?: TranslateOptions): boolean {\n return (\n !this.cached$ ||\n key !== this.cachedKey ||\n !equals(params, this.cachedParams) ||\n !equals(options, this.cachedOptions)\n );\n }\n\n private update(key: string | string[], params: ReplaceParams, options?: TranslateOptions): void {\n this.cached$ = this.languageService.translate(key, params, options).pipe(map((str) => (str ? str : '')));\n this.cachedKey = key;\n this.cachedParams = params;\n this.cachedOptions = options;\n }\n}\n","\n
\n \n {{ translationPrefix + '.label' | finLocalization }}\n *\n \n
\n \n \n \n \n \n\n \n \n {{ translationPrefix + '.required' | finLocalization }}\n \n \n\n \n \n {{ translationPrefix + '.helper' | finLocalization }}\n \n \n\n","import { Component, Input, OnInit } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport { RadioButtonTheme } from '../enums';\nimport { RadioItemGroupOption } from '../interfaces';\n@Component({\n selector: 'fcom-radio-item-group',\n templateUrl: './radio-item-group.component.html',\n styleUrls: ['./radio-item-group.component.scss'],\n})\nexport class RadioItemGroupComponent implements OnInit {\n readonly RadioButtonTheme = RadioButtonTheme;\n\n @Input() theme = RadioButtonTheme.ROUND;\n\n @Input({ required: true }) parentForm: UntypedFormGroup;\n\n @Input({ required: true }) controlName: string;\n\n @Input({ required: true }) options: RadioItemGroupOption[];\n\n @Input() name?: string;\n\n @Input() isRequired = false;\n\n /**\n * This input is needed if you want to use title, helper or error text\n */\n @Input() translationPrefix: string;\n\n /**\n * translationPrefix is needed if you want to use this text\n */\n @Input() helperText = false;\n\n /**\n * translationPrefix is needed if you want to use this text\n */\n @Input() titleText = true;\n\n /**\n * translationPrefix is needed if you want to use this text\n */\n @Input() errorText = true;\n\n /**\n * the field input hidden in analytics such as Hotjar\n */\n @Input() isSensitive = false;\n\n /**\n * The round theme is by default vertical, but it can be forced to horizontal\n */\n @Input() isHorizontal = false;\n\n control: AbstractControl;\n\n ngOnInit(): void {\n this.control = this.parentForm.get(this.controlName);\n }\n}\n","/* eslint-disable rxjs/no-implicit-any-catch */\nimport { Injectable } from '@angular/core';\nimport { HttpHeaders, HttpClient } from '@angular/common/http';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, throwError, combineLatest, of } from 'rxjs';\nimport { map, catchError, switchMap, first, tap } from 'rxjs/operators';\n\nimport { ConfigService } from '@fcom/core';\nimport { loginToken, profile } from '@fcom/core/selectors';\nimport { Profile } from '@fcom/core-api/login';\nimport { FinnairOrderPreview, FinnairOrderPreviewsResponse } from '@fcom/dapi/api/models';\nimport { finShare } from '@fcom/rx';\nimport { OrderPreviewsService } from '@fcom/order';\n\nimport { Trip, AddFrequentFlyerResponse, Journey } from '../interfaces/pax-trip.interface';\nimport { TripsActions } from '../store/actions';\nimport { FetchTripsStatus, State } from '../interfaces/store.interface';\n\n@Injectable()\nexport class PaxTripService {\n private accessToken$: Observable;\n private profile$: Observable;\n\n constructor(\n private http: HttpClient,\n private orderPreviewsService: OrderPreviewsService,\n private store$: Store,\n private configService: ConfigService\n ) {\n this.accessToken$ = this.store$.pipe(loginToken(), first(Boolean)) as Observable;\n this.profile$ = this.store$.pipe(profile(), first(Boolean)) as Observable;\n }\n\n getTrips(): Observable {\n return this.orderPreviewsService.getUpcomingTrips().pipe(\n map((response: FinnairOrderPreviewsResponse) =>\n this.mapFetchOrderPreviewsResponse(response.orderPreviews, response.locations)\n ),\n finShare()\n );\n }\n\n addTrip(bookingReference: string): Observable {\n return combineLatest([this.accessToken$, this.profile$]).pipe(\n switchMap(([token, memberProfile]: [string, Profile]) => {\n const apiUrl = `${this.configService.cfg.bookingServiceUrl}/booking/${bookingReference}/${memberProfile.lastname}/addFrequentFlyer`;\n const keyId = this.configService.cfg.bookingServiceApiKey;\n\n const httpOptions = {\n headers: new HttpHeaders({\n // eslint-disable-next-line camelcase\n oauth_token: token,\n 'X-Api-Key': keyId,\n 'Content-Type': 'application/json',\n }),\n };\n\n const params = {\n firstName: memberProfile.firstname,\n frequentFlyerNumber: memberProfile.memberNumber,\n };\n return this.http.post(apiUrl, params, httpOptions);\n }),\n map((response) => {\n if (response.status.message === 'OK') {\n return response;\n }\n throw new Error('Error when adding booking');\n }),\n catchError((err) => {\n return throwError(() => err);\n })\n );\n }\n\n verifyAddedTrip(bookingReference: string): Observable {\n return this.getTrips().pipe(\n tap((trips: Trip[]) => {\n this.store$.dispatch(TripsActions.setTrips({ trips: trips, status: FetchTripsStatus.OK }));\n }),\n map((trips: Trip[]) => trips.some((trip) => trip.recLoc === bookingReference)),\n catchError(() => {\n this.store$.dispatch(TripsActions.setTrips({ trips: [], status: FetchTripsStatus.ERROR }));\n return of(false);\n })\n );\n }\n\n private mapFetchOrderPreviewsResponse(\n orderPreviews: FinnairOrderPreview[],\n locations: FinnairOrderPreviewsResponse['locations']\n ): Trip[] {\n return (\n orderPreviews?.map((orderPreview) => {\n return {\n passengers: [\n {\n lastName: orderPreview.lastName,\n },\n ],\n journeys: this.mapBoundPreviewsToJourneys(orderPreview, locations),\n lastName: orderPreview.lastName,\n recLoc: orderPreview.id,\n };\n }) || []\n );\n }\n\n private mapBoundPreviewsToJourneys(\n orderPreview: FinnairOrderPreview,\n locations: FinnairOrderPreviewsResponse['locations']\n ): Journey[] {\n return (\n orderPreview.bounds?.map((boundPreview) => {\n const departureLocation = locations[boundPreview.departure.locationCode];\n const arrivalLocation = locations[boundPreview.arrival.locationCode];\n return {\n passengerAmount: orderPreview.numberOfTravelers,\n departure: {\n airport: boundPreview.departure.locationCode,\n airportName: departureLocation.name,\n municipality: departureLocation.cityName,\n scheduledDateTime: boundPreview.departure.dateTime,\n },\n arrival: {\n airport: boundPreview.arrival.locationCode,\n airportName: arrivalLocation.name,\n municipality: arrivalLocation.cityName,\n scheduledDateTime: boundPreview.arrival.dateTime,\n },\n recLoc: orderPreview.id,\n };\n }) || []\n );\n }\n}\n","\n {{ title }}\n {{ 'navigation.currentPage' | finLocalization }}\n \n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { ElementTypes, GaContext } from '@fcom/common/interfaces';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[finSideBarNavigationItem]',\n styleUrls: ['./sidebar-navigation-item.component.scss'],\n templateUrl: './sidebar-navigation-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SidebarNavigationItemComponent {\n readonly ElementTypes = ElementTypes;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TRACKING_CONTEXT = GaContext.SECTION_NAVIGATION;\n\n @Input()\n title: string;\n\n @Input()\n link: string = undefined;\n\n @Input()\n external = false;\n\n @Input()\n openInNewTab = false;\n\n @Input()\n active = false;\n\n @Input()\n loginRequired = false;\n\n @Input()\n styleClasses = 'nordic-blue-900-text';\n\n @Output()\n linkClicked: EventEmitter = new EventEmitter();\n\n onLinkClick(clickEvent: Event): void {\n clickEvent.stopPropagation();\n this.linkClicked.emit(clickEvent);\n }\n}\n","import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\n\n/* tslint:disable:max-line-length */\nexport function mergeMap>(\n project: (value: T, index: number) => O,\n concurrent?: number\n): OperatorFunction>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function mergeMap>(\n project: (value: T, index: number) => O,\n resultSelector: undefined,\n concurrent?: number\n): OperatorFunction>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function mergeMap>(\n project: (value: T, index: number) => O,\n resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R,\n concurrent?: number\n): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable.\n *\n * Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link mergeAll}.\n *\n * ![](mergeMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an Observable, and then merging those resulting Observables and\n * emitting the results of this merger.\n *\n * ## Example\n *\n * Map and flatten each letter to an Observable ticking every 1 second\n *\n * ```ts\n * import { of, mergeMap, interval, map } from 'rxjs';\n *\n * const letters = of('a', 'b', 'c');\n * const result = letters.pipe(\n * mergeMap(x => interval(1000).pipe(map(i => x + i)))\n * );\n *\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // a0\n * // b0\n * // c0\n * // a1\n * // b1\n * // c1\n * // continues to list a, b, c every second with respective ascending integers\n * ```\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link merge}\n * @see {@link mergeAll}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switchMap}\n *\n * @param project A function that, when applied to an item emitted by the source\n * Observable, returns an Observable.\n * @param concurrent Maximum number of `ObservableInput`s being subscribed to concurrently.\n * @return A function that returns an Observable that emits the result of\n * applying the projection function (and the optional deprecated\n * `resultSelector`) to each item emitted by the source Observable and merging\n * the results of the Observables obtained from this transformation.\n */\nexport function mergeMap>(\n project: (value: T, index: number) => O,\n resultSelector?: ((outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R) | number,\n concurrent: number = Infinity\n): OperatorFunction | R> {\n if (isFunction(resultSelector)) {\n // DEPRECATED PATH\n return mergeMap((a, i) => map((b: any, ii: number) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n } else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { isPresent } from './utils';\nimport { pad } from './format';\nimport { LocalDate } from './tz-date';\n\nconst normalizeDate = (date: Date): Date => {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n};\n\nconst ISO_8601_DATE_TIME_REGEX = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(.\\d{1,3})?(([+-]\\d{2}:\\d{2})|Z)?$/i;\nconst ISO_8601_DATE_REGEX = /^\\d{4}-\\d{2}-\\d{2}$/;\nconst TIME_REGEX = /^([0-1]?\\d|2[0-3]):([0-5]?\\d)$/;\n\nexport enum TimeUnit {\n millisecond,\n second,\n minute,\n hour,\n day,\n month,\n year,\n}\n\nexport const toMonthId = (date: LocalDate): string => {\n return date.id.substr(0, 7);\n};\n\nexport const MILLIS_IN_DAY = 24 * 60 * 60 * 1000;\n\nexport const MILLIS_IN_HOUR = 60 * 60 * 1000;\n\nexport const MILLIS_IN_MINUTE = 60 * 1000;\n\nexport const MILLIS_IN_SECOND = 1000;\n\nexport const startOfUTC = (date: Date, unit: TimeUnit): Date => {\n const copy: Date = new Date(date.getTime());\n if (unit >= TimeUnit.second) {\n copy.setUTCMilliseconds(0);\n }\n if (unit >= TimeUnit.minute) {\n copy.setUTCSeconds(0);\n }\n if (unit >= TimeUnit.hour) {\n copy.setUTCMinutes(0);\n }\n if (unit >= TimeUnit.day) {\n copy.setUTCHours(0);\n }\n if (unit >= TimeUnit.month) {\n copy.setUTCDate(1);\n }\n if (unit >= TimeUnit.year) {\n copy.setUTCMonth(0);\n }\n return copy;\n};\n\nexport const startOf = (date: Date, unit: TimeUnit): Date => {\n const copy: Date = new Date(date.getTime());\n if (unit >= TimeUnit.second) {\n copy.setMilliseconds(0);\n }\n if (unit >= TimeUnit.minute) {\n copy.setSeconds(0);\n }\n if (unit >= TimeUnit.hour) {\n copy.setMinutes(0);\n }\n if (unit >= TimeUnit.day) {\n copy.setHours(0);\n }\n if (unit >= TimeUnit.month) {\n copy.setDate(1);\n }\n if (unit >= TimeUnit.year) {\n copy.setMonth(0);\n }\n return copy;\n};\n\nexport const before = (date: Date, of: Date, unit: TimeUnit): boolean => {\n return startOf(date, unit).getTime() < startOf(of, unit).getTime();\n};\n\nexport const after = (date: Date, of: Date, unit: TimeUnit): boolean => {\n return before(of, date, unit);\n};\n\nexport const same = (date1: Date, date2: Date, unit: TimeUnit): boolean => {\n return startOf(date1, unit).getTime() === startOf(date2, unit).getTime();\n};\n\nexport const diff = (date1: Date, date2: Date, unit?: TimeUnit): number => {\n const func = (fdate1: Date, fdate2: Date, divider: number): number => {\n return Math.floor((fdate2.getTime() - fdate1.getTime()) / divider);\n };\n\n switch (unit) {\n case TimeUnit.second:\n return func(date1, date2, MILLIS_IN_SECOND);\n case TimeUnit.minute:\n return func(date1, date2, MILLIS_IN_MINUTE);\n case TimeUnit.hour:\n return func(date1, date2, MILLIS_IN_HOUR);\n case TimeUnit.day:\n return func(normalizeDate(date1), normalizeDate(date2), MILLIS_IN_DAY);\n default:\n return func(date1, date2, 1);\n }\n};\n\nexport const add = (date: Date, amount: number, unit: TimeUnit): Date => {\n const func = (callback: (date: Date) => void): Date => {\n const copy: Date = new Date(date.getTime());\n callback(copy);\n return copy;\n };\n switch (unit) {\n case TimeUnit.millisecond:\n return func((d) => {\n d.setMilliseconds(d.getMilliseconds() + amount);\n });\n case TimeUnit.second:\n return func((d) => {\n d.setSeconds(d.getSeconds() + amount);\n });\n case TimeUnit.minute:\n return func((d) => {\n d.setMinutes(d.getMinutes() + amount);\n });\n case TimeUnit.hour:\n return func((d) => {\n d.setHours(d.getHours() + amount);\n });\n case TimeUnit.day:\n return func((d) => {\n d.setDate(d.getDate() + amount);\n });\n case TimeUnit.month:\n return func((d) => {\n d.setMonth(d.getMonth() + amount);\n });\n case TimeUnit.year:\n return func((d) => {\n d.setFullYear(d.getFullYear() + amount);\n });\n default:\n }\n};\n\nexport const subtract = (date: Date, amount: number, unit: TimeUnit): Date => add(date, -amount, unit);\n\nexport const quantityOfMonths = (startDate: LocalDate, endDate: LocalDate): number => {\n return (endDate.localYear - startDate.localYear) * 12 + (endDate.localMonth - startDate.localMonth) + 1;\n};\n\nexport class WeekdayMap {\n private static NAMES: object = {\n sun: 0,\n mon: 1,\n tue: 2,\n wed: 3,\n thu: 4,\n fri: 5,\n sat: 6,\n };\n private content: number[] = [0, 1, 2, 3, 4, 5, 6];\n\n constructor(weekStartsOn: string) {\n const offset = WeekdayMap.NAMES[weekStartsOn.toLowerCase()] || 0;\n // Rotate weekdays to correct order\n // eslint-disable-next-line prefer-spread\n this.content.unshift.apply(this.content, this.content.splice(-offset));\n }\n\n get(day: number): number {\n const index = day >= 0 ? day : 7 + (day % 7);\n return this.content[index % 7];\n }\n}\n\nexport const toISO8601 = (date: Date): string => {\n // TODO: is it really necessary to do this way? will the server accept Date.toISOString()?\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n};\n\nexport const toISO8601UTC = (date: Date): string => {\n return date.toISOString().substr(0, 10);\n};\n\nexport const isISODateTimeString = (input: any): boolean => {\n return typeof input === 'string' && ISO_8601_DATE_TIME_REGEX.test(input);\n};\n\nexport const isISODateString = (input: any): boolean => {\n return typeof input === 'string' && ISO_8601_DATE_REGEX.test(input);\n};\n\n/**\n * Returns true is a string is in time format, overwize false\n * Accepts formats \"xx:yy\", \"x:yy\", \"xx:y\", \"x:y\"\n */\nexport const isTime = (input: string): boolean => {\n return TIME_REGEX.test(input);\n};\n\nexport const convertStringDatesToDateObjects = (convertData: any) => {\n if (!isPresent(convertData)) {\n return convertData;\n }\n if (typeof convertData === 'string') {\n if (isISODateTimeString(convertData)) {\n return new Date(convertData);\n }\n if (isISODateString(convertData)) {\n return new LocalDate(convertData);\n }\n return convertData;\n }\n if (typeof convertData === 'number' || convertData instanceof Date || typeof convertData === 'boolean') {\n return convertData;\n }\n if (Array.isArray(convertData)) {\n return convertData.map(convertStringDatesToDateObjects);\n }\n\n const target = Object.assign({}, convertData);\n\n Object.keys(convertData).forEach((key) => {\n const val = convertData[key];\n\n if (Array.isArray(val)) {\n target[key] = val.map(convertStringDatesToDateObjects);\n } else {\n target[key] = convertStringDatesToDateObjects(val);\n }\n });\n\n return target;\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { ModalModule } from '@fcom/ui-components';\nimport { CmsModule } from '@fcom/cms';\n\nimport { DirectiveModule } from '../directives';\nimport { FinFormsModule } from '../forms';\nimport { PipesModule } from '../pipes';\nimport { QualtricsComponent } from './components/qualtrics.component';\n\n@NgModule({\n imports: [\n CommonModule,\n DirectiveModule,\n PipesModule,\n CmsModule,\n FinFormsModule,\n FormsModule,\n UiTranslateModule,\n ModalModule,\n ],\n declarations: [QualtricsComponent],\n exports: [QualtricsComponent],\n})\nexport class QualtricsModule {}\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","export enum CarouselTheme {\n DEFAULT = 'default',\n HAS_BACKGROUND = 'has-background',\n}\n","import { Inject, Injectable, OnDestroy, Optional, PLATFORM_ID, makeStateKey } from '@angular/core';\nimport { DOCUMENT, isPlatformServer } from '@angular/common';\n\nimport { combineLatest, Observable, of, ReplaySubject, Subscription } from 'rxjs';\nimport { distinctUntilKeyChanged, map, take, tap } from 'rxjs/operators';\n\nimport { CookieService } from '@fcom/core/services';\nimport { ConfigService, StateTransferService } from '@fcom/core';\nimport { entrySet, unsubscribe } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { GtmService } from '../../gtm';\nimport {\n AKAMAI_AB_SEGMENT_COOKIE,\n akamaiSegmentToNumericMap,\n GtmEvent,\n GtmMultivariateEvent,\n MANUAL_AB_SEGMENT_COOKIE,\n MULTIVARIATE_TEST_COOKIES,\n MultivariateTestConfiguration,\n MultivariateTestCookies,\n MultivariateTestId,\n Segment,\n TestVariant,\n TestVariantWithId,\n UserVariantSegment,\n VariantSource,\n} from '../../interfaces';\n\nconst CONTROL_SEGMENT = 0 as Segment;\n\nexport const RUNNING_TESTS: MultivariateTestConfiguration[] = [\n {\n id: MultivariateTestId.FRONT_PAGE_PERSONALISATION,\n requiresInjectScript: false,\n segments: {\n [TestVariant.A]: [CONTROL_SEGMENT],\n [TestVariant.B]: [1],\n },\n enabledInAllEnvs: true,\n },\n {\n id: MultivariateTestId.ENHANCED_CALENDAR_STYLING,\n requiresInjectScript: false,\n segments: {\n [TestVariant.A]: [CONTROL_SEGMENT],\n [TestVariant.B]: [1],\n },\n enabledInAllEnvs: false,\n },\n {\n id: MultivariateTestId.NEW_FLIGHT_SELECTION_STYLE,\n requiresInjectScript: false,\n segments: {\n [TestVariant.A]: [CONTROL_SEGMENT],\n [TestVariant.B]: [2],\n },\n enabledInAllEnvs: true,\n },\n {\n id: MultivariateTestId.NEW_PRODUCT_CARDS,\n requiresInjectScript: false,\n segments: {\n [TestVariant.A]: [CONTROL_SEGMENT],\n [TestVariant.B]: [4],\n },\n enabledInAllEnvs: true,\n },\n {\n id: MultivariateTestId.FLIGHT_SELECTION_FILTERS,\n requiresInjectScript: false,\n segments: {\n [TestVariant.A]: [CONTROL_SEGMENT],\n [TestVariant.B]: [2],\n },\n enabledInAllEnvs: false,\n },\n // This is a workaround to hide things from playwright regression tests in master\n {\n id: MultivariateTestId.REGRESSION_TEST_WORKAROUND,\n requiresInjectScript: false,\n segments: {\n [TestVariant.A]: [CONTROL_SEGMENT],\n [TestVariant.B]: [1, 2, 3, 4],\n },\n enabledInAllEnvs: false,\n },\n];\n\nconst RESTRICTED_BUILD_ENVS = ['preprod', 'staging', 'prod'];\n\nexport const generateSegmentResolver =\n (testId: MultivariateTestId, countryCode: string, runningTests: MultivariateTestConfiguration[], buildEnv: string) =>\n (segment: Segment): TestVariant => {\n const test = runningTests.find((t) => t.id === testId);\n\n if (!test) {\n // If no test setup we always resolve to NOT_IN_TEST\n return TestVariant.NOT_IN_TEST;\n }\n\n if (!test.enabledInAllEnvs && RESTRICTED_BUILD_ENVS.includes(buildEnv)) {\n return TestVariant.NOT_IN_TEST;\n }\n\n if (test.includeCountries?.length && !test.includeCountries.includes(countryCode)) {\n return TestVariant.NOT_IN_TEST;\n }\n\n const variant = entrySet(test.segments).find((entry) => entry.value.includes(segment));\n\n if (!variant) {\n return TestVariant.NOT_IN_TEST;\n }\n\n const sameSegmentUsedForCountryTest = runningTests.some((test) => {\n if (!test.includeCountries?.length) {\n return false;\n }\n\n if (test.id === testId) {\n return false;\n }\n\n const testEntries = entrySet(test.segments);\n\n if (\n test.includeCountries.includes(countryCode) &&\n testEntries\n .filter((entry) => entry.key !== TestVariant.A)\n .some((entry) => entry.value.some((segment) => variant.value.includes(segment)))\n ) {\n return true;\n }\n\n return false;\n });\n\n if (sameSegmentUsedForCountryTest && testId !== MultivariateTestId.REGRESSION_TEST_WORKAROUND) {\n return TestVariant.NOT_IN_TEST;\n }\n\n return variant.key as TestVariant;\n };\n\n@Injectable()\nexport class MultivariateTestService implements OnDestroy {\n segmentsFeed$: ReplaySubject = new ReplaySubject(1);\n\n reportedTestIds: MultivariateTestId[] = [];\n\n private subscriptions = new Subscription();\n\n constructor(\n private cookieService: CookieService,\n private gtmService: GtmService,\n private stateTransferService: StateTransferService,\n private languageService: LanguageService,\n private configService: ConfigService,\n @Inject(PLATFORM_ID) private platform: object,\n @Inject(DOCUMENT) private document: Document,\n @Optional() @Inject(MULTIVARIATE_TEST_COOKIES) private readonly multivariateTestCookies: MultivariateTestCookies\n ) {\n this.stateTransferService\n .wrapToStateCache(makeStateKey('ab-test-segment'), () => of(this.getSegmentFromCookies()))\n .pipe(take(1))\n .subscribe((value) => {\n const nextValue = value || { segment: 0, source: VariantSource.RANDOMIZED };\n this.segmentsFeed$.next(nextValue);\n\n this.injectAkamaiSegmentToBodyIfRequired(nextValue);\n });\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n /**\n * This is returning a subscription to segment, you need to provide your experiment\n * id and remember to unsubscribe.\n * It reports your id and the dynamic segment to gtmService (segment can change from initial after CAS response).\n * @param testId\n * @param variant\n */\n reportTest(testId: string, variant: string): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n this.subscriptions.add(\n this.segmentsFeed$\n .pipe(distinctUntilKeyChanged('source'), distinctUntilKeyChanged('segment'))\n .subscribe((segment) => {\n const eventData: GtmMultivariateEvent = {\n testId,\n segment: segment.segment,\n source: segment.source,\n variant,\n };\n\n this.gtmService.pushEventToDataLayer(GtmEvent.MULTIVARIATE_TEST, eventData);\n })\n );\n }\n\n getTestVariant(\n id: MultivariateTestId,\n autoReportTest = true,\n skipCountryCheck = false\n ): Observable {\n const variant$ = combineLatest([\n this.segmentsFeed$,\n skipCountryCheck ? of('int') : this.languageService.countryCode,\n ]).pipe(\n map(([userVariantSegment, countryCode]) => {\n const segmentResolver = generateSegmentResolver(\n id,\n countryCode,\n RUNNING_TESTS,\n this.configService.cfg.buildEnv\n );\n const variant = segmentResolver(userVariantSegment.segment);\n return { variant, id };\n })\n );\n\n if (autoReportTest && !isPlatformServer(this.platform)) {\n return variant$.pipe(\n tap(({ id, variant }) => {\n if (variant !== TestVariant.NOT_IN_TEST && !this.reportedTestIds.includes(id)) {\n this.reportTest(id, variant);\n this.reportedTestIds.push(id);\n }\n }),\n finShare()\n );\n }\n\n return variant$;\n }\n\n // This is here because service is injected to app component, and needs a method call not to crash linters\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n init(): void {}\n\n private getCookieValue(name: string): any {\n if (isPlatformServer(this.platform)) {\n return this.multivariateTestCookies[name];\n }\n return this.cookieService.getItem(name);\n }\n\n private getSegmentFromCookies(): UserVariantSegment {\n const manualSegment = this.getCookieValue(MANUAL_AB_SEGMENT_COOKIE);\n\n if (manualSegment) {\n return {\n segment: Number(manualSegment) as Segment,\n source: VariantSource.MANUAL,\n };\n }\n return {\n segment: akamaiSegmentToNumericMap[this.getCookieValue(AKAMAI_AB_SEGMENT_COOKIE)] || 0,\n source: VariantSource.AKAMAI,\n };\n }\n\n private injectAkamaiSegmentToBodyIfRequired(variantSegment: UserVariantSegment): void {\n if (RUNNING_TESTS.some((test) => test.requiresInjectScript)) {\n const script = this.document.createElement('script');\n script.innerHTML = `(function (d) {\n d.body.setAttribute('data-segment', ${variantSegment.segment});\n })(document);`;\n this.document.body.appendChild(script);\n }\n }\n}\n","
\n
\n \n
\n
\n\n","import { ChangeDetectionStrategy, Component, Input, OnInit, ViewChild } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { LoginEvent, PopoverService } from '@fcom/ui-components';\nimport { AppState } from '@fcom/core/interfaces';\nimport { LoginStep } from '@fcom/core-api/login';\nimport { LoginActions } from '@fcom/core/actions';\nimport { ConfigService } from '@fcom/core/services';\nimport { getCurrentBreakPoint } from '@fcom/common/utils/layout.utils';\nimport { loginIsOpen } from '@fcom/core/selectors';\n\nimport { Breakpoint } from '../../../interfaces';\nimport { LoginWidgetComponent, LoginWidgetContext } from '../login-widget/login-widget.component';\nimport { LoginService } from '../../services';\n\n@Component({\n selector: 'fin-login-dialog',\n templateUrl: './login-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoginDialogComponent implements OnInit {\n @ViewChild('loginWidget', { static: true }) loginWidget: LoginWidgetComponent;\n\n @Input()\n context: LoginWidgetContext;\n\n loginOpen$: Observable;\n mobileOrTablet: boolean;\n constructor(\n private loginService: LoginService,\n private store$: Store,\n private configService: ConfigService,\n private popoverService: PopoverService\n ) {}\n\n toggleLogin(loginEvent: LoginEvent): void {\n this.popoverService.close();\n const currentBreakpoint = getCurrentBreakPoint();\n\n loginEvent.event.stopPropagation();\n\n this.mobileOrTablet = [Breakpoint.MOBILE, Breakpoint.TABLET].includes(currentBreakpoint);\n if (loginEvent.loggedIn || this.mobileOrTablet) {\n this.loginWidget.open();\n } else if (this.configService.cfg.enableLoginDialog) {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n } else {\n this.loginService.redirectToLogin();\n }\n }\n\n ngOnInit(): void {\n this.loginOpen$ = this.store$.pipe(loginIsOpen());\n }\n}\n","/* eslint-disable no-underscore-dangle */\nimport { createFeatureSelector, createSelector, select } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport {\n Category,\n FinnairChangeEligibility,\n FinnairCheckInEligibility,\n FinnairItineraryItemFlight,\n FinnairOrder,\n FinnairPassengerItem,\n FinnairServiceBoundItem,\n FinnairServiceItem,\n} from '@fcom/dapi/api/models';\nimport { DapiErrorStatus, IdAndHash } from '@fcom/dapi';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { cloneDeep } from '@fcom/core/utils';\n\nimport {\n CommonBookingFeatureState,\n CommonBookingState,\n OrderPartStatus,\n OrderState,\n OrderStatus,\n PassengerNameRecord,\n QuantityForFragmentAndPassenger,\n UpdatingOrderPart,\n} from '../store.interface';\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\nimport { mapServicesToBookingSummary } from '../utils/services.utils';\nimport { BookingSummaryService } from '../../interfaces';\nimport { combineServices, isBoundBasedCategory } from '../../modules/ancillaries/utils';\nimport { isFlight } from '../../utils/common-booking.utils';\n\nconst _selectCommonBookingState = createFeatureSelector(\n COMMON_BOOKING_FEATURE_KEY\n);\nconst _orderState = createSelector(_selectCommonBookingState, (state: CommonBookingState) => state?.order);\nconst _orderStatus = createSelector(_orderState, (_os) => _os?.orderStatus);\nconst _orderResponseErrorStatus = createSelector(_orderState, (_os) => _os?.orderResponseErrorStatus);\nconst _orderData = createSelector(_orderState, (_os) => _os?.orderData);\nconst _hasOrderData = createSelector(_orderState, (_os) => !!_os?.orderData);\n\nconst _orderDataPrimaryPassenger = createSelector(\n _orderData,\n (_od) => _od?.passengers.find((p) => p.id === _od.primaryTravelerId) || ({} as FinnairPassengerItem)\n);\nconst _getOrderPassengers = createSelector(_orderData, (_od) => _od?.passengers.map((pax) => pax.id));\nconst _getCheckInEligibilities = createSelector(_orderData, (_od) => _od?.eligibilities?.checkIn || []);\nconst _orderFetchInformation = createSelector(_orderState, (_os) => _os?.orderFetchInformation);\nconst _PNR = createSelector(_orderState, (_os) => _os?.PNR);\nconst _categoryPartStatus = (category: Category) =>\n createSelector(_orderState, (_os: OrderState) => _os?.isUpdating?.[category] ?? OrderPartStatus.OK);\nconst _updatingOrderPart = () => createSelector(_orderState, (_os: OrderState) => _os?.isUpdating);\nconst _currentServices = createSelector(_orderData, (data) =>\n mapServicesToBookingSummary(data?.prices?.unpaid?.services, data?.passengers)\n);\nconst _includedServices = (category: Category) =>\n createSelector(\n _orderData,\n (_od) => _od?.services?.included?.filter((service) => service.category === category) || ([] as FinnairServiceItem[])\n );\nconst _getUnpaidSeatsBySegmentId = (segmentId: string) =>\n createSelector(_orderData, (_od) => {\n return (\n _od?.services?.unpaid\n ?.flatMap((service) => (service.category === Category.SEAT ? service.bounds : []))\n .filter((bound) => bound.segments.some((segment) => segment.id === segmentId)) || []\n );\n });\nconst _includedVariantsQuantity = (variants: string[]) =>\n createSelector(_orderData, (order): QuantityForFragmentAndPassenger => {\n const included = order?.services?.included ?? [];\n return included.reduce((allCategoriesQuantity, selection: FinnairServiceItem) => {\n return selection.bounds\n .flatMap((bound) =>\n (isBoundBasedCategory(selection.category) ? [bound.segments[0]] : bound.segments).map((segment) => ({\n ...segment,\n bound,\n }))\n )\n .flatMap((segment) => segment.passengers.map((passengerService) => ({ ...passengerService, segment })))\n .flatMap((passenger) =>\n passenger.services\n .filter((service) => variants.includes(service.variant))\n .map((service) => {\n const fragmentId = isBoundBasedCategory(selection.category)\n ? passenger.segment.bound.id\n : passenger.segment.id;\n return { ...service, fragmentId, passenger };\n })\n )\n .reduce((fragmentQuantity, { fragmentId, quantity, passenger }) => {\n if (!fragmentQuantity[fragmentId]) {\n fragmentQuantity[fragmentId] = {};\n }\n fragmentQuantity[fragmentId][passenger.id] = quantity + (fragmentQuantity[fragmentId][passenger.id] ?? 0);\n return fragmentQuantity;\n }, allCategoriesQuantity);\n }, {});\n });\n\nconst _includedServicesMap = createSelector(\n _orderData,\n (_od) =>\n _od?.services?.included?.reduce((categories, service) => {\n categories[service.category] = cloneDeep(service);\n return categories;\n }, {}) ?? {}\n);\nconst _combinedServices = createSelector(_orderData, (_od) =>\n combineServices([_od?.services?.included ?? [], _od?.services?.unpaid ?? []])\n);\nconst _combinedServicesMap = createSelector(_combinedServices, (_services) =>\n _services.reduce((categories, service) => {\n categories[service.category] = cloneDeep(service);\n return categories;\n }, {})\n);\nconst _orderFlights = () =>\n createSelector(\n _orderData,\n (od) => od?.bounds?.reduce((all, b) => all.concat(...b.itinerary.filter(isFlight)), []) ?? []\n );\nconst _acceptTerms = createSelector(_orderState, (_os: OrderState) => !!_os?.acceptTerms);\nconst _changeEligibilities = createSelector(_orderData, (_od: FinnairOrder) => _od?.eligibilities?.change ?? []);\nconst _changeableBoundIds = createSelector(_changeEligibilities, (_ce: Array) =>\n _ce?.filter(({ isAllowedToUse }) => isAllowedToUse).map(({ id }) => id)\n);\n\nexport const orderState = (): StateSelector => select(_orderState);\nexport const orderStatus = (): StateSelector => safeSelect(_orderStatus);\nexport const orderResponseErrorStatus = (): StateSelector =>\n safeSelect(_orderResponseErrorStatus);\nexport const orderData = (emitUndefined = false): StateSelector =>\n !emitUndefined ? safeSelect(_orderData) : select(_orderData);\nexport const hasOrderData = (): StateSelector => select(_hasOrderData);\nexport const orderFlights = (): StateSelector =>\n safeSelect(_orderFlights());\n\nexport const orderDataPrimaryPassenger = (): StateSelector =>\n select(_orderDataPrimaryPassenger);\nexport const getOrderPassengers = (): StateSelector => select(_getOrderPassengers);\nexport const getCheckInEligibilities = (): StateSelector =>\n select(_getCheckInEligibilities);\nexport const PNR = (): StateSelector => select(_PNR);\nexport const categoryPartStatus = (category: Category): StateSelector =>\n safeSelect(_categoryPartStatus(category));\nexport const updatingOrderPart = (): StateSelector =>\n select(_updatingOrderPart());\nexport const currentServices = (): StateSelector =>\n safeSelect(_currentServices);\nexport const includedServices = (category: Category): StateSelector =>\n safeSelect(_includedServices(category));\nexport const includedServicesMap = (): StateSelector<\n CommonBookingFeatureState,\n { [category: string]: FinnairServiceItem }\n> => safeSelect(_includedServicesMap);\n\nexport const combinedServicesMap = (): StateSelector<\n CommonBookingFeatureState,\n { [category: string]: FinnairServiceItem }\n> => safeSelect(_combinedServicesMap);\n\nexport const getChangeableBoundIds = (): StateSelector =>\n select(_changeableBoundIds);\n\nexport const includedVariantsQuantity = (\n variants: string[]\n): StateSelector =>\n select(_includedVariantsQuantity(variants));\n\n/**\n * To be used when fetching order information from the backend first time\n */\nexport const orderFetchInformation = (): StateSelector =>\n select(_orderFetchInformation);\n\nexport const acceptTerms = (): StateSelector => safeSelect(_acceptTerms);\n\nexport const getUnpaidSeatsBySegmentId = (\n segmentId: string\n): StateSelector =>\n safeSelect(_getUnpaidSeatsBySegmentId(segmentId));\n","
\n \n\n \n\n \n
\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { ConfigService } from '@fcom/core/services';\nimport {\n FinnairCabinClass,\n FinnairItineraryItemFlight,\n FinnairItineraryItemType,\n FinnairOrder,\n} from '@fcom/dapi/api/models';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { loginStatus } from '@fcom/core/selectors';\nimport { AspectRatioString } from '@fcom/common/interfaces';\nimport { LoginStatus } from '@fcom/core-api/login';\nimport { isPresent } from '@fcom/core/utils';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\n\n@Component({\n selector: 'fin-promotion-banners',\n templateUrl: './promotion-banners.component.html',\n styleUrls: ['./promotion-banners.component.scss'],\n})\nexport class PromotionBannersComponent implements OnInit {\n readonly LoginStatus = LoginStatus;\n\n @Input()\n orderData$?: Observable = of(null);\n\n aspectRatio$: Observable;\n\n loggedIn$: Observable;\n\n chooseUrl$: Observable;\n finnairShopDonateUrl: string;\n\n cabinClassMap = {\n [FinnairCabinClass.ECONOMY]: 'economy',\n [FinnairCabinClass.ECOPREMIUM]: 'premiumEconomy',\n [FinnairCabinClass.BUSINESS]: 'business',\n [FinnairCabinClass.FIRST]: 'first',\n };\n\n constructor(\n private configService: ConfigService,\n private languageService: LanguageService,\n private store$: Store\n ) {}\n\n ngOnInit(): void {\n this.loggedIn$ = this.store$.pipe(loginStatus());\n\n let lang = this.languageService.langKeyValue?.toLowerCase();\n\n // Only EN FI SV languages are supported by Chooose.\n if (!['en', 'fi', 'sv'].includes(lang)) {\n lang = 'en';\n }\n\n this.finnairShopDonateUrl = this.configService.cfg.finnairShopDonateUrl.replace('{lang}', lang);\n\n this.chooseUrl$ = this.orderData$.pipe(\n map((orderData) => {\n if (!isPresent(orderData)) {\n return this.configService.cfg.choooseUrl.replace('{lang}', lang);\n }\n\n const items = orderData.bounds\n .flatMap((bound) => bound.itinerary)\n .filter((itinerary) => itinerary.type === FinnairItineraryItemType.FLIGHT)\n .reduce((acc: string, itinerary: FinnairItineraryItemFlight, index: number) => {\n const itemParam = `&items[${index}]`;\n return `${acc}\n ${itemParam}[type]=flights.fromTo\n ${itemParam}[from]=${itinerary.departure.locationCode}\n ${itemParam}[to]=${itinerary.arrival.locationCode}\n ${itemParam}[travellers]=${orderData.passengers.length}\n ${itemParam}[travelClass]=${this.cabinClassMap[itinerary.cabinClass]}\n ${itemParam}[roundTrip]=false`;\n }, '')\n .replace(/\\s/g, '');\n const htmlElementId = '2d8771d7-f9e7-4ce2-a5d7-caf3276d9b79';\n\n return `${this.configService.cfg.choooseUrl}?page=cart${items}&orderId=${orderData.id}#scrollTo=${htmlElementId}`.replace(\n '{lang}',\n lang\n );\n })\n );\n }\n}\n","
\n
\n \n
\n
\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { ExpandComponent } from '../..';\nimport { NavigationMenuService } from '../../../services';\nimport { MenuItem, ElementTypes, GaContext } from '../../../interfaces';\n\n@Component({\n selector: 'fin-light-section-navi',\n styleUrls: ['./light-section-navi.component.scss'],\n templateUrl: './light-section-navi.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LightSectionNaviComponent {\n readonly ElementTypes = ElementTypes;\n readonly activeNaviSection$: Observable;\n readonly activeNaviItem$: Observable;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TRACKING_CONTEXT = GaContext.SECTION_NAVIGATION;\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.activeNaviSection$ = this.navigationMenuService.activeNaviSection;\n this.activeNaviItem$ = this.navigationMenuService.activeNaviItem;\n }\n\n trackItems(index: number) {\n return index;\n }\n\n toggleDetails(expandComponent: ExpandComponent, external: boolean): void {\n if (!external) {\n expandComponent.toggleDetails();\n }\n }\n}\n","
\n
\n \n

{{ title }}

\n
\n\n \n
\n\n
\n \n

{{ title }}

\n
\n\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, of } from 'rxjs';\n\nimport { ExpandComponent } from '../..';\nimport { NavigationMenuService } from '../../../services';\nimport { MenuItem, ElementTypes, GaContext } from '../../../interfaces';\n\n@Component({\n selector: 'fin-section-navi',\n styleUrls: ['./section-navi.component.scss'],\n templateUrl: './section-navi.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SectionNaviComponent {\n readonly activeNaviItem$: Observable;\n readonly activeNaviSection$: Observable;\n readonly ElementTypes = ElementTypes;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TRACKING_CONTEXT = GaContext.SECTION_NAVIGATION;\n\n @Input()\n title: string = null;\n\n @Input()\n showTitle$: Observable = of(true);\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.activeNaviSection$ = this.navigationMenuService.activeNaviSection;\n this.activeNaviItem$ = this.navigationMenuService.activeNaviItem;\n }\n\n trackByIndex(index: number): number {\n return index;\n }\n\n toggleDetails(expandComponent: ExpandComponent, external: boolean): void {\n if (!external) {\n expandComponent.toggleDetails();\n }\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTarget } from '@fcom/core-api';\n\nimport { toLinkData } from '../../services';\n\n@Component({\n selector: 'cms-cta-big-link',\n template: `\n \n \n `,\n styleUrls: ['./cms-cta-big-link.component.scss'],\n})\nexport class CmsCtaBigLinkComponent implements OnInit {\n @Input()\n content$: Observable;\n\n cmsTarget$: Observable;\n\n ngOnInit(): void {\n this.cmsTarget$ = this.content$.pipe(map((d) => toLinkData(d.target)));\n }\n}\n","\n {{ tt }}\n
\n \n\n
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { CmsTarget } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-cta-big-link',\n styleUrls: ['./cta-big-link.component.scss'],\n templateUrl: './cta-big-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CtaBigLinkComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n teaserTitle$: Observable;\n @Input()\n target$: Observable;\n @Input()\n teaserText$: Observable;\n @Input()\n layout: 'small' | 'xsmall' | undefined;\n\n ctaButton$: Observable;\n\n ngOnInit(): void {\n this.ctaButton$ = this.target$.pipe(\n filter((target) => !!target),\n map((target) => Object.assign({}, target))\n );\n }\n}\n","
\n

{{ content.teaserTitle }}

\n\n \n
\n
\n {{ item.teaserTitle }}\n
\n \n
\n
\n \n
\n \n
\n\n
\n

{{ content.teaserTitle }}

\n
\n {{ item.teaserTitle }}\n \n
\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { CmsCollection } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-conditional-accordion',\n templateUrl: './cms-conditional-accordion.component.html',\n styleUrls: ['cms-conditional-accordion.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsConditionalAccordionComponent {\n readonly DEFAULT_HEADER_LEVEL = 3;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n content$: Observable;\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTarget } from '@fcom/core-api';\n\nimport { toLinkData } from '../../services';\n\n@Component({\n selector: 'cms-cta-link',\n template: `\n \n \n `,\n})\nexport class CmsCtaLinkComponent implements OnInit {\n @Input()\n content$: Observable;\n\n cmsTarget$: Observable;\n\n ngOnInit(): void {\n this.cmsTarget$ = this.content$.pipe(map((d) => toLinkData(d.target)));\n }\n}\n","\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { isNotBlank } from '@fcom/core/utils';\nimport { CmsTeaser } from '@fcom/core-api';\nimport { finShare, safeMap } from '@fcom/rx';\n\n@Component({\n selector: 'cms-back-link',\n templateUrl: './cms-back-link.component.html',\n styleUrls: ['./cms-back-link.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsBackLinkComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n content$: Observable;\n\n title$: Observable;\n\n ngOnInit(): void {\n const shared$ = this.content$.pipe(finShare());\n this.title$ = shared$.pipe(\n safeMap((t: CmsTeaser) => t.teaserTitle),\n filter(isNotBlank)\n );\n }\n}\n","
\n
\n
{{ campaign.introductionTitle | finEmpty }}
\n

{{ campaign.title | finEmpty }}

\n
\n \n
\n
{{ 'travelType.' + campaign.priceTypeName | finLocalization | finEmpty }}
\n
{{ 'pricesStartingFrom' | finLocalization }}
\n
\n
\n
\n {{ campaign.amount | finPrice: { roundPrice: true } }}\n
\n
\n {{ campaign.teaserTitle }}\n
\n\n
\n \n \n
\n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { combineLatest, Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { AspectRatioString } from '@fcom/common/interfaces/images.interface';\nimport { CmsOffer } from '@fcom/core-api';\nimport { Amount } from '@fcom/dapi';\nimport { isPresent } from '@fcom/core/utils';\n\nexport interface CmsCampaign extends CmsOffer {\n introductionTitle: string;\n amount?: Amount;\n priceTypeName: string;\n}\n\n@Component({\n selector: 'cms-campaign',\n styleUrls: ['./cms-campaign.component.scss'],\n templateUrl: './cms-campaign.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsCampaignComponent implements OnInit {\n @Input()\n content$: Observable;\n campaign$: Observable;\n aspectRatio$: Observable = of('4x3' as AspectRatioString);\n\n constructor(private languageService: LanguageService) {}\n\n ngOnInit(): void {\n this.campaign$ = combineLatest([this.languageService.translate('number.currency'), this.content$]).pipe(\n map(([currencyCode, offer]: [string, CmsCampaign]) => {\n if (!isPresent(offer.price)) {\n return offer;\n }\n return { ...offer, amount: { currencyCode, amount: String(offer.price) } };\n })\n );\n }\n}\n","
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsTarget, CmsTeaser } from '@fcom/core-api';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\n\ninterface DescriptiveLink {\n title: string;\n text: string;\n target: CmsTarget;\n linkText: string;\n}\n\n@Component({\n selector: 'cms-descriptive-link-list',\n templateUrl: './cms-descriptive-link-list.component.html',\n styleUrls: ['./cms-descriptive-link-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsDescriptiveLinkListComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n content$: Observable;\n items$: Observable;\n\n ngOnInit(): void {\n this.items$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items)),\n map((items: CmsTeaser[]) =>\n items.map((item) => ({\n title: item.teaserTitle,\n text: item.teaserText,\n target: item.target ? item.target : null,\n linkText: item.linkText,\n }))\n ),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n}\n","\n \n \n {{ title }}\n \n
\n\n
\n
\n \n \n

{{ item.teaserTitle }}

\n
\n \n {{ related?.teaserTitle }}\n \n \n \n \n
\n
\n \n
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsArticle, CmsCollection, CmsTaxonomyGeneral } from '@fcom/core-api/interfaces/cms-interface';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\n\n@Component({\n selector: 'cms-discover-now',\n styleUrls: ['./cms-discover-now.component.scss'],\n templateUrl: './cms-discover-now.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsDiscoverNowComponent implements OnInit {\n @Input()\n content$: Observable;\n itemsObs$: Observable;\n\n public readonly SvgLibraryIcon: typeof SvgLibraryIcon = SvgLibraryIcon;\n public readonly TAXONOMY: typeof CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n\n ngOnInit(): void {\n this.itemsObs$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items as CmsArticle[])),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { ExternalLink } from '../../interfaces';\n\n@Component({\n selector: 'cms-external-link',\n template: '',\n})\nexport class CmsExternalLinkComponent implements OnInit {\n @Input()\n content$: Observable;\n\n link$: Observable;\n\n ngOnInit(): void {\n this.link$ = this.content$.pipe(\n map((data) => ({\n url: data.url,\n text: data.teaserTitle,\n target: '_blank',\n }))\n );\n }\n}\n","\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsContent } from '@fcom/core-api/interfaces/cms-interface';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\n\n@Component({\n selector: 'cms-important-links',\n styleUrls: ['./cms-important-links.component.scss'],\n templateUrl: './cms-important-links.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsImportantLinksComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n content$: Observable;\n items$: Observable;\n\n ngOnInit(): void {\n this.items$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items)),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n}\n","
\n
\n
\n
\n
\n
\n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsContent } from '@fcom/core-api/interfaces/cms-interface';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\n\n@Component({\n selector: 'cms-unique-selling-point',\n styleUrls: ['./cms-unique-selling-point.component.scss'],\n templateUrl: './cms-unique-selling-point.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsUniqueSellingPointComponent implements OnInit {\n @Input()\n content$: Observable;\n items$: Observable;\n\n ngOnInit(): void {\n this.items$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items)),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n}\n","\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsContent, CmsTarget } from '@fcom/core-api';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\n\n/**\n * Maps links with url in root object to use 'target' object instead\n * @param items\n * @returns copy of items with url within 'target'\n */\nconst mapUrlToTarget = (items: CmsTarget[] | CmsContent[]) => {\n const formattedItems: CmsContent[] = [];\n items.forEach((item) => {\n if (item.target?.url) {\n formattedItems.push(item);\n } else if (item.url) {\n const formattedItem = { ...item };\n formattedItem.target = {\n url: item.url,\n external: item.external,\n };\n formattedItems.push(formattedItem);\n }\n });\n return formattedItems;\n};\n\n@Component({\n selector: 'cms-link-list-with-icons',\n templateUrl: './cms-link-list-with-icons.component.html',\n styleUrls: ['./cms-link-list-with-icons.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsLinkListWithIconsComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n content$: Observable;\n items$: Observable;\n\n ngOnInit(): void {\n this.items$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items)),\n map(mapUrlToTarget),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n}\n","
\n

{{ (content$ | async)?.teaserTitle }}

\n
    \n
  • \n \n \n \n \n
  • \n
\n
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsTeaser } from '@fcom/core-api';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\n\ninterface TextWithIcon {\n iconName: SvgLibraryIcon;\n text: string;\n}\n\n@Component({\n selector: 'cms-list-with-icons',\n templateUrl: './cms-list-with-icons.component.html',\n styleUrls: ['./cms-list-with-icons.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsListWithIconsComponent implements OnInit {\n @Input()\n content$: Observable;\n @Input()\n useTeaserTitle: boolean;\n items$: Observable;\n\n ngOnInit(): void {\n this.items$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items)),\n map((items: CmsTeaser[]) =>\n items.map((item) => ({\n text: this.useTeaserTitle ? item.teaserTitle : item.teaserText,\n iconName: item.localSettings?.iconName,\n }))\n ),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsDestination } from '@fcom/core-api';\nimport { OndMarketingOffersService } from '@fcom/ond-marketing-landing-core/services';\n\n@Component({\n selector: 'cms-ond-marketing-offers',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsOndMarketingOffersComponent implements OnInit {\n @Input()\n content$: Observable;\n\n destinationLocationCode$: Observable;\n\n constructor(private ondMarketingOffersService: OndMarketingOffersService) {}\n\n ngOnInit(): void {\n this.destinationLocationCode$ = this.ondMarketingOffersService.getDestinationLocationCode(this.content$);\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsDestination } from '@fcom/core-api';\nimport { OndMarketingOffersService } from '@fcom/ond-marketing-landing-core/services';\n\n@Component({\n selector: 'cms-ond-marketing-offers-list',\n template: `\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsOndMarketingOffersListComponent implements OnInit {\n @Input()\n content$: Observable;\n\n destinationLocationCode$: Observable;\n constructor(private ondMarketingOffersService: OndMarketingOffersService) {}\n\n ngOnInit(): void {\n this.destinationLocationCode$ = this.ondMarketingOffersService.getDestinationLocationCode(this.content$);\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsDestination } from '@fcom/core-api';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { OndPageType, OndPairEnhancedResponse } from '@fcom/ond-marketing-landing-core/interfaces';\nimport { OndMarketingOffersService } from '@fcom/ond-marketing-landing-core/services';\nimport { getCurrentCountry } from '@fcom/ond-marketing-landing-core/services/utils';\n\n@Component({\n selector: 'cms-ond-marketing-cross-linking',\n template: `\n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsOndMarketingCrossLinkingComponent implements OnInit, OnDestroy {\n @Input()\n content$: Observable;\n links$: Observable;\n ondPageType: OndPageType = OndPageType.LANDING;\n private subscriptions: Subscription = new Subscription();\n\n constructor(\n readonly route: ActivatedRoute,\n private ondMarketingOffersService: OndMarketingOffersService,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n this.links$ = this.ondMarketingOffersService.getDestinationLocationCode(this.content$).pipe(\n switchMap((destinationLocationCode) =>\n this.ondMarketingOffersService.fetchLocationPairs({\n destination: destinationLocationCode,\n originCountry: getCurrentCountry(this.languageService.langValue),\n lang: this.languageService.langValue,\n })\n )\n );\n }\n\n ngOnDestroy() {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","\n
\n \n \n
\n \n \n \n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { AspectRatioString } from '@fcom/common';\nimport { CmsArticle, CmsImageData, CmsTaxonomy, CmsTaxonomyGeneral, CmsTeaser } from '@fcom/core-api';\nimport { isPresent, safeMap } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\n\n@Component({\n selector: 'cms-text-with-side-image',\n styleUrls: ['./cms-text-with-side-image.component.scss'],\n templateUrl: './cms-text-with-side-image.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsTextWithSideImageComponent implements OnInit {\n @Input()\n content$: Observable;\n\n cmsTags$: Observable>;\n\n aspectRatio$: Observable = of('16x9' as AspectRatioString);\n textContent$: Observable;\n image$: Observable;\n link$: Observable;\n isBlackFriday$: Observable;\n showSectionMarker$: Observable;\n\n public readonly TAXONOMY: typeof CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n\n ngOnInit(): void {\n this.textContent$ = this.content$.pipe(\n filter(isPresent),\n map(({ media: _, ...rest }: CmsArticle) => ({ ...rest, media: [] })),\n finShare()\n );\n this.image$ = this.content$.pipe(\n filter(isPresent),\n map(({ media = [] }: CmsArticle) => media[0] as CmsImageData),\n finShare()\n );\n this.link$ = this.content$.pipe(\n filter(isPresent),\n map(({ related = [] }: CmsArticle) => related[0] as CmsTeaser),\n finShare()\n );\n this.cmsTags$ = this.content$.pipe(\n filter(isPresent),\n map((content: CmsArticle) => safeMap(content, (c: CmsArticle) => c.subjectTaxonomyTags)),\n distinctUntilChanged()\n );\n this.isBlackFriday$ = this.cmsTags$.pipe(map((a) => a.includes(this.TAXONOMY.BLACK_FRIDAY)));\n this.showSectionMarker$ = this.cmsTags$.pipe(map((a) => !a.includes(this.TAXONOMY.NO_SECTION_MARKER)));\n }\n}\n","
\n

\n {{ tt }}\n

\n\n
\n
\n\n \n \n\n {{ ctaButton$ | finMap: 'title' | async }}\n \n
\n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { CmsTarget } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-cta-with-image-and-text',\n styleUrls: ['./cta-with-image-and-text.component.scss'],\n templateUrl: './cta-with-image-and-text.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CtaWithImageAndTextComponent implements OnInit {\n @Input()\n teaserTitle$: Observable;\n @Input()\n target$: Observable;\n @Input()\n teaserText$: Observable;\n @Input()\n iconUrl$: Observable;\n\n ctaButton$: Observable;\n\n ngOnInit(): void {\n this.ctaButton$ = this.target$.pipe(\n filter((target) => !!target),\n map((target) => Object.assign({}, target))\n );\n }\n}\n","\n
\n

\n
{{ 'flightsTo' | finLocalization }}
\n
{{ content | finMap: 'title' }}
\n

\n
\n
\n
\n","import { Component, Input } from '@angular/core';\n\nimport { CmsContent } from '@fcom/core-api';\n\n/**\n * Hero component for destination category page\n *\n * @example\n * \n */\n@Component({\n selector: 'fin-destination-category-hero',\n templateUrl: './destination-category-hero.component.html',\n})\nexport class DestinationCategoryHeroComponent {\n @Input()\n content: CmsContent;\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { MenuItem, NavigationMenuService } from '@fcom/common';\nimport { CmsContent, CmsContentType, CmsFormType, CmsTemplate, CmsViewType, PageViewType } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-editorial-category-page',\n templateUrl: './cms-editorial-category-page.component.html',\n styleUrls: ['./cms-editorial-category-page.component.scss'],\n})\nexport class CmsEditorialCategoryPageComponent implements OnInit {\n @Input()\n template$: Observable;\n\n alteredTemplate$: Observable;\n activeNaviSection$: Observable;\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n public readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n public readonly FORMTYPE: typeof CmsFormType = CmsFormType;\n public readonly PAGETYPE: typeof PageViewType = PageViewType;\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.activeNaviSection$ = this.navigationMenuService.activeNaviSection;\n }\n\n ngOnInit(): void {\n this.alteredTemplate$ = this.template$.pipe(\n map((template) => {\n if (template?.header?.[0]?.viewTypeName !== this.PAGETYPE.EDITORIAL_CATEGORY_PAGE) {\n return template;\n }\n\n const alteredTemplate = template;\n alteredTemplate.main = alteredTemplate.main.map((contentItem: CmsContent) => {\n if (\n (contentItem.contentType === CmsContentType.CMTeaser &&\n contentItem.viewTypeName !== CmsViewType.BACK_LINK) ||\n (contentItem.contentType === CmsContentType.CMArticle && contentItem.main)\n ) {\n return Object.assign(contentItem, { viewType: CmsViewType.MAIN_ARTICLE });\n }\n return contentItem;\n });\n\n return alteredTemplate;\n })\n );\n }\n}\n","\n\n
\n
\n \n \n\n \n
\n \n
\n
\n
\n","
\n
\n
\n

\n {{ title }}\n

\n \n {{ title }}\n \n
\n
\n
\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-editorial-page-head',\n templateUrl: './editorial-page-head.component.html',\n styleUrls: ['./editorial-page-head.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EditorialPageHeadComponent {\n @Input()\n titleAsHeading = true;\n @Input()\n title: string;\n}\n","
\n

{{ editorialCategory.teaserTitle }}

\n \n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { CmsContent, CmsTaxonomyGeneral } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-editorial-category',\n templateUrl: './editorial-category.component.html',\n styleUrls: ['./editorial-category.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EditorialCategoryComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n editorialCategory: CmsContent;\n\n get segmentId(): string {\n if (this.editorialCategory.segment !== JSON.stringify(this.editorialCategory.contentId)) {\n return this.editorialCategory.segment;\n }\n return null;\n }\n\n isShowAllLink(article: CmsContent): boolean {\n return article.subjectTaxonomyTags.includes(CmsTaxonomyGeneral.ARROW_LINK);\n }\n}\n","\n\n
\n
\n \n \n\n \n
\n \n \n \n \n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\n\nimport { Observable } from 'rxjs';\n\nimport { LoaderType, MenuItem, NavigationMenuService } from '@fcom/common';\nimport { CmsContentType, CmsFormType, CmsTemplate, CmsViewType, PageViewType } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-editorial-main-page',\n templateUrl: './cms-editorial-main-page.component.html',\n styleUrls: ['./cms-editorial-main-page.component.scss'],\n animations: [\n trigger('fadeIn', [state('void', style({ opacity: 0 })), transition(':enter', [animate('0.5s ease-in')])]),\n ],\n})\nexport class CmsEditorialMainPageComponent {\n @Input()\n template$: Observable;\n\n @Input()\n hasContent = false;\n\n activeNaviSection$: Observable;\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n public readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n public readonly FORMTYPE: typeof CmsFormType = CmsFormType;\n public readonly PAGETYPE: typeof PageViewType = PageViewType;\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.activeNaviSection$ = this.navigationMenuService.activeNaviSection;\n }\n\n protected readonly LoaderType = LoaderType;\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsTemplate } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-bluewings-cluster-page',\n templateUrl: './cms-bluewings-cluster-page.component.html',\n styleUrls: ['./cms-bluewings-cluster-page.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsBluewingsClusterPageComponent {\n @Input()\n template$: Observable;\n\n @Input()\n hasContent = false;\n}\n","
\n \n
\n\n
\n
\n \n
\n
\n","\n\n
\n
\n \n \n\n \n
\n \n \n \n \n
\n
\n
\n","import { Component, Input } from '@angular/core';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\n\nimport { Observable } from 'rxjs';\n\nimport { LoaderType, MenuItem, NavigationMenuService } from '@fcom/common';\nimport { CmsContentType, CmsFormType, CmsTemplate, CmsViewType, PageViewType } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-bluewings-main-page',\n templateUrl: './cms-bluewings-main-page.component.html',\n styleUrls: ['./cms-bluewings-main-page.component.scss'],\n animations: [\n trigger('fadeIn', [state('void', style({ opacity: 0 })), transition(':enter', [animate('0.5s ease-in')])]),\n ],\n})\nexport class CmsBluewingsMainPageComponent {\n @Input()\n template$: Observable;\n\n @Input()\n hasContent = false;\n\n activeNaviSection$: Observable;\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n public readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n public readonly FORMTYPE: typeof CmsFormType = CmsFormType;\n public readonly PAGETYPE: typeof PageViewType = PageViewType;\n readonly LoaderType = LoaderType;\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.activeNaviSection$ = this.navigationMenuService.activeNaviSection;\n }\n}\n","
\n
\n \n \n\n \n
\n
\n \n {{ title }}\n \n
\n \n
\n
\n
\n","import { Component, Input } from '@angular/core';\n\nimport { NEVER, Observable } from 'rxjs';\n\nimport { MenuItem, NavigationMenuService } from '@fcom/common';\nimport { CmsContentType, CmsFormType, CmsTemplate, CmsViewType, PageViewType } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-child-page',\n templateUrl: './cms-child-page.component.html',\n styleUrls: ['./cms-child-page.component.scss'],\n})\nexport class CmsChildPageComponent {\n @Input()\n template$: Observable;\n\n @Input()\n title$: Observable = NEVER;\n\n activeNaviSection$: Observable;\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n public readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n public readonly FORMTYPE: typeof CmsFormType = CmsFormType;\n public readonly PAGETYPE: typeof PageViewType = PageViewType;\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.activeNaviSection$ = this.navigationMenuService.activeNaviSection;\n }\n}\n","import {\n Component,\n OnDestroy,\n OnInit,\n ViewChild,\n ElementRef,\n Renderer2,\n AfterViewInit,\n Input,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { Router } from '@angular/router';\n\nimport { Subscription, Observable, Subject } from 'rxjs';\nimport { map, switchMap, tap, filter } from 'rxjs/operators';\n\nimport { unsubscribe, urlToPathname } from '@fcom/core/utils';\nimport { CmsTemplate } from '@fcom/core-api';\n\nimport { ExternalTemplateService } from '../../services';\n\n@Component({\n selector: 'cms-external-page-renderer',\n templateUrl: './external-page-renderer.html',\n})\nexport class CmsExternalPageRendererComponent implements OnInit, OnDestroy, AfterViewInit {\n @Inject(DOCUMENT) document: any;\n\n @Input()\n template$: Observable;\n\n @ViewChild('contentWrapper', { static: true })\n contentWrapper: ElementRef;\n\n @ViewChild('scriptWrapper', { static: true })\n scriptWrapper: ElementRef;\n\n externalHtml: any;\n removeGlobalListener: Function;\n scriptToBeLoaded$: Subject = new Subject();\n allowScriptLoad$: Subject = new Subject();\n\n private subscriptions: Subscription = new Subscription();\n\n constructor(\n private externalTemplateService: ExternalTemplateService,\n private renderer: Renderer2,\n private router: Router,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platform)) {\n this.externalHtml = this.template$.pipe(\n map((template) => template.main.find((item) => item.contentType === 'CMExternalLink')),\n switchMap((link: any) => {\n return this.externalTemplateService.loadExternalHtml(link.url).pipe(\n tap((htmlAsText) => {\n const elementForParsing: HTMLDivElement = document.createElement('div');\n elementForParsing.innerHTML = htmlAsText;\n\n this.scriptToBeLoaded$.next(elementForParsing.getElementsByTagName('script')[0].src);\n }),\n map((htmlAsText) => {\n const elementForParsing: HTMLDivElement = document.createElement('div');\n elementForParsing.innerHTML = htmlAsText;\n\n const scripts = elementForParsing.getElementsByTagName('script');\n let i = scripts.length;\n\n while (i) {\n i--;\n scripts[i].parentNode.removeChild(scripts[i]);\n }\n return elementForParsing.innerHTML;\n })\n );\n })\n );\n\n // Wait until .innerHTML is in place and ngAfterViewInit sends true to allowScriptLoad$\n this.subscriptions.add(\n this.allowScriptLoad$\n .pipe(\n filter(Boolean),\n switchMap(() => this.scriptToBeLoaded$)\n )\n .subscribe((scriptToLoad) => this.loadScripts(scriptToLoad))\n );\n }\n }\n\n ngAfterViewInit(): void {\n this.useRouterForLinkClicks();\n this.allowScriptLoad$.next(true);\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n\n if (this.removeGlobalListener) {\n this.removeGlobalListener();\n }\n\n // Dispatch global event so that external script will erase event bindings, intervals and variables\n this.broadcastEvent();\n }\n\n private broadcastEvent(): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n const evt = document.createEvent('Event');\n evt.initEvent('finUnloadExternalScripts', true, true);\n document.dispatchEvent(evt);\n }\n\n private loadScripts(scriptToLoad): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n const script: HTMLScriptElement = document.createElement('script');\n script.type = 'text/javascript';\n script.src = scriptToLoad;\n\n this.renderer.appendChild(this.scriptWrapper.nativeElement, script);\n }\n\n private useRouterForLinkClicks() {\n if (isPlatformServer(this.platform)) {\n return;\n }\n this.removeGlobalListener = this.renderer.listen('document', 'click', (event) => {\n const target = event.target;\n const isInsideTheElement = this.contentWrapper.nativeElement.contains(target);\n\n if (!isInsideTheElement) {\n return;\n }\n if (target.tagName.toLowerCase() === 'a' && target.target !== '_blank') {\n // Application internal URL, use the router to navigate\n this.router.navigateByUrl(urlToPathname(target.href));\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n });\n }\n}\n","
\n
\n","\n \n\n\n
\n
\n \n \n \n \n \n
\n \n \n
\n
\n
\n \n \n \n \n
\n
\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsContentType, CmsFormType, CmsTemplate, CmsViewType, TemplateName, CmsContent } from '@fcom/core-api';\n\nenum Placement {\n HERO = 'hero',\n MAIN = 'main',\n MAIN_RIGHT = 'main-right',\n HIDDEN = 'hidden',\n}\n\nconst setCustomPlacement = (content: CmsContent): string => {\n switch (content.template) {\n case TemplateName.CMS_DESTINATION_HERO:\n return Placement.HERO;\n case TemplateName.CMS_TRAVEL_GUIDE:\n return Placement.MAIN_RIGHT;\n case TemplateName.CMS_ITEMS:\n return Placement.MAIN;\n default: {\n if (content.viewType === CmsViewType.LINK_LIST_WITH_ICONS) {\n return Placement.MAIN_RIGHT;\n }\n return null;\n }\n }\n};\n\nconst hasCustomPlacement = (content: CmsContent): boolean => {\n switch (content.template) {\n case TemplateName.CMS_DESTINATION_HERO:\n case TemplateName.CMS_TRAVEL_GUIDE:\n return true;\n default:\n if (content.viewType === CmsViewType.LINK_LIST_WITH_ICONS) {\n return true;\n }\n return false;\n }\n};\n\nconst isTeaserWithItems = (item: CmsContent): boolean => {\n return item.contentType === CmsContentType.CMTeaser && Array.isArray(item.items) && item.items.length > 0;\n};\n\nconst filterNonCustomPlacement = (data: CmsContent[]): CmsContent[] => {\n const filteredItems = [...data];\n return filteredItems\n .filter((item) => isTeaserWithItems(item) || !hasCustomPlacement(item))\n .map((item) => {\n if (isTeaserWithItems(item)) {\n item.items = filterNonCustomPlacement(item.items);\n }\n return item;\n });\n};\n\nconst addCustomPlacement = (item: CmsContent): CmsContent => {\n const content: CmsContent = {\n ...item,\n customPlacement: setCustomPlacement(item),\n };\n if (item.contentType === CmsContentType.CMTeaser && Array.isArray(item.items) && item.items.length) {\n return {\n ...content,\n items: item.items.map(addCustomPlacement),\n };\n }\n return content;\n};\n\nconst filterRegularContent = (data: CmsTemplate): CmsTemplate => {\n return {\n header: data.header,\n main: filterNonCustomPlacement(data.main.map(addCustomPlacement)),\n footer: data.footer,\n };\n};\n\nconst filterMainLeftContent = (data: CmsTemplate): CmsContent => {\n for (const item of data.main.map(addCustomPlacement)) {\n if (item.customPlacement === Placement.MAIN && item.items) {\n return item.items[0];\n }\n }\n};\n\nconst filterMainRightContent = (data: CmsTemplate): CmsContent[] => {\n return data.main\n .map(addCustomPlacement)\n .filter((item) => item.customPlacement === Placement.MAIN && item.items)\n .map((item) => item.items)\n .reduce((accumulatedChildItems, childItems) => {\n return accumulatedChildItems.concat(\n childItems.filter((item, index) => item.customPlacement === Placement.MAIN_RIGHT && index > 0)\n );\n }, []);\n};\n\nconst filterHeroContent = (data: CmsTemplate): CmsContent => {\n return data.main.map(addCustomPlacement).find((item) => item.customPlacement === Placement.HERO);\n};\n\n@Component({\n selector: 'cms-destination',\n templateUrl: './cms-destination.component.html',\n styleUrls: ['./cms-destination.component.scss'],\n})\nexport class CmsDestinationComponent implements OnInit {\n @Input()\n template$: Observable;\n @Input()\n pageViewType$: Observable;\n\n hero$: Observable;\n mainLeft$: Observable;\n mainRight$: Observable;\n remainingContent$: Observable;\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n public readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n public readonly FORMTYPE: typeof CmsFormType = CmsFormType;\n\n ngOnInit(): void {\n this.hero$ = this.template$.pipe(map(filterHeroContent));\n this.mainLeft$ = this.template$.pipe(map(filterMainLeftContent));\n this.mainRight$ = this.template$.pipe(map(filterMainRightContent));\n this.remainingContent$ = this.template$.pipe(map(filterRegularContent));\n }\n}\n","import { Component, createNgModuleRef, Injector, Input, ViewChild, ViewContainerRef, type OnInit } from '@angular/core';\n\nimport { type Observable } from 'rxjs';\n\nimport { CmsFormType, CmsViewType, type CmsPlaceholder, type CmsTemplate } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-render-lazy-component',\n templateUrl: './render-lazy-component.component.html',\n styleUrls: [],\n})\nexport class RenderLazyComponent implements OnInit {\n @ViewChild('lazyLoadComponent', { read: ViewContainerRef })\n lazyLoadComponent!: ViewContainerRef;\n\n @Input()\n viewType: CmsViewType | CmsFormType;\n\n @Input()\n content?: CmsPlaceholder;\n\n @Input()\n content$?: Observable;\n\n @Input()\n template?: CmsTemplate;\n\n constructor(private injector: Injector) {}\n\n ngOnInit(): void {\n // Form\n if (this.viewType === CmsViewType.RETRIEVE_PAGE_CONTENT) {\n this.loadRetrievePage();\n } else if (\n Object.keys(CmsFormType)\n .map((key) => CmsFormType[key])\n .includes(this.viewType)\n ) {\n this.loadForm();\n }\n // Destination-search\n if (this.viewType === CmsViewType.DESTINATIONS_SEARCH || this.viewType === CmsViewType.DESTINATION_SEARCH_HERO) {\n this.loadDestinationSearch();\n }\n }\n\n async loadDestinationSearch(): Promise {\n const { DestinationSearchLazyModule, DestinationSearchPageComponent, DestinationSearchHeroComponent } =\n await import('@fcom/destination-search-lazy');\n\n const destinationSearchTypeToComponentMap = {\n [CmsViewType.DESTINATIONS_SEARCH]: DestinationSearchPageComponent,\n [CmsViewType.DESTINATION_SEARCH_HERO]: DestinationSearchHeroComponent,\n };\n const moduleRef = createNgModuleRef(DestinationSearchLazyModule, this.injector);\n\n const { instance } = this.lazyLoadComponent.createComponent(\n destinationSearchTypeToComponentMap[this.viewType],\n {\n ngModuleRef: moduleRef,\n }\n );\n\n instance.template = this.template;\n instance.content$ = this.content$;\n instance.content = this.content;\n }\n\n async loadForm(): Promise {\n const {\n BaggageTracingFormComponent,\n CancellationCoverClaimFormComponent,\n CaseAttachmentsFormComponent,\n CertificatesForInsuranceCompanyFormComponent,\n ClaimMissingPartnerPointsFormComponent,\n ClaimMissingPointsFormComponent,\n CorporateContactFormComponent,\n ETicketReceiptFormComponent,\n GiftCardInformationFormComponent,\n JoinCorporateFormComponent,\n RefundFormComponent,\n RefundStatusCheckerFormComponent,\n SafDownloadFormComponent,\n ServiceFormsLazyModule,\n SpecialAssistanceFormComponent,\n SpecialAssistanceWizardComponent,\n VatReceiptFormComponent,\n } = await import('@fcom/service-forms-lazy');\n const moduleRef = createNgModuleRef(ServiceFormsLazyModule, this.injector);\n\n const formTypeToComponentMap = {\n [CmsFormType.BAGGAGE_TRACING_FORM]: BaggageTracingFormComponent,\n [CmsFormType.CANCELLATION_COVER_CLAIM_FORM]: CancellationCoverClaimFormComponent,\n [CmsFormType.CASE_ATTACHMENT_FORM]: CaseAttachmentsFormComponent,\n [CmsFormType.CERTIFICATES_FOR_INSURANCE_COMPANY_FORM]: CertificatesForInsuranceCompanyFormComponent,\n [CmsFormType.CLAIM_MISSING_PARTNER_POINTS_FORM]: ClaimMissingPartnerPointsFormComponent,\n [CmsFormType.CLAIM_MISSING_POINTS_FORM]: ClaimMissingPointsFormComponent,\n [CmsFormType.CORPORATE_CONTACT_FORM]: CorporateContactFormComponent,\n [CmsFormType.E_TICKET_RECEIPT_FORM]: ETicketReceiptFormComponent,\n [CmsFormType.GIFT_CARD_INFORMATION_FORM]: GiftCardInformationFormComponent,\n [CmsFormType.JOIN_CORPORATE_FORM]: JoinCorporateFormComponent,\n [CmsFormType.REFUND_FORM]: RefundFormComponent,\n [CmsFormType.REFUND_STATUS_CHECKER_FORM]: RefundStatusCheckerFormComponent,\n [CmsFormType.SAF_DOWNLOADABLE_FORM]: SafDownloadFormComponent,\n [CmsFormType.SPECIAL_ASSISTANCE_FORM]: SpecialAssistanceFormComponent,\n [CmsFormType.SPECIAL_ASSISTANCE_WIZARD]: SpecialAssistanceWizardComponent,\n [CmsFormType.VAT_RECEIPT_FORM]: VatReceiptFormComponent,\n };\n\n if (formTypeToComponentMap[this.viewType]) {\n const { instance } = this.lazyLoadComponent.createComponent(formTypeToComponentMap[this.viewType], {\n ngModuleRef: moduleRef,\n });\n instance.template = this.template;\n }\n }\n\n async loadRetrievePage(): Promise {\n const { RetrieveModule, RetrievePageContentComponent } = await import(\n '@fcom/service-forms-lazy/components/retrieve-page'\n );\n\n const moduleRef = createNgModuleRef(RetrieveModule, this.injector);\n\n this.lazyLoadComponent.createComponent(RetrievePageContentComponent, { ngModuleRef: moduleRef });\n }\n}\n","\n","import { Component, Input } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { ExternalLink } from '../../interfaces';\n\n@Component({\n selector: 'fin-external-link',\n templateUrl: './external-link.component.html',\n})\nexport class ExternalLinkComponent {\n @Input()\n link$: Observable;\n\n constructor() {}\n}\n","
\n \n {{ link$ | finMap: 'text' | async }}\n \n
\n","\n\n\n \n\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { EMPTY, Observable } from 'rxjs';\n\nimport { CmsPicture, CmsTarget } from '@fcom/core-api';\nimport { AspectRatios } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-text-on-image',\n templateUrl: './text-on-image.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TextOnImageComponent {\n @Input()\n teaserTitle$: Observable;\n @Input()\n teaserText$: Observable = EMPTY;\n @Input()\n imageData$: Observable;\n /**\n * The preferred aspect ratio of the image\n */\n @Input()\n imageAspectRatio$: Observable;\n @Input()\n target$: Observable;\n}\n","
\n \n
\n

\n {{ teaserTitle$ | async }}\n

\n
\n
\n
\n \n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { EMPTY, Observable } from 'rxjs';\n\nimport { CmsPicture } from '@fcom/core-api';\nimport { AspectRatios } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-text-on-image-no-link',\n styleUrls: ['./text-on-image-no-link.component.scss'],\n templateUrl: './text-on-image-no-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TextOnImageNoLinkComponent {\n @Input()\n teaserTitle$: Observable;\n @Input()\n teaserText$: Observable = EMPTY;\n @Input()\n imageData$: Observable;\n /**\n * The preferred aspect ratio of the image\n */\n @Input()\n imageAspectRatio$: Observable;\n}\n","
\n

{{ phraseGroup.title }}

\n
\n
\n
\n
\n
\n
\n
\n","import { Component, Input } from '@angular/core';\n\nimport { PhraseGroup } from '../../interfaces';\n\n@Component({\n selector: 'fin-travel-guide-phrases',\n templateUrl: './travel-guide-phrases.component.html',\n styleUrls: ['./travel-guide-phrases.component.scss'],\n})\nexport class TravelGuidePhrasesComponent {\n @Input()\n phraseGroup: PhraseGroup;\n}\n","\n \n\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsDisclaimer } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-disclaimer',\n styleUrls: ['./cms-disclaimer.component.scss'],\n templateUrl: './cms-disclaimer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsDisclaimerComponent {\n @Input()\n content$: Observable;\n}\n","\n \n
\n {{ c.teaserTitle }}\n {{ item.teaserTitle }}\n
\n
\n \n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsCollection } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-badge',\n styleUrls: ['cms-badge.component.scss'],\n templateUrl: 'cms-badge.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsBadgeComponent {\n @Input()\n content$: Observable;\n\n constructor() {}\n}\n","\n {{ teaserTitle$ | async }}\n \n\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { CmsTarget } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-text-link',\n templateUrl: './text-link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TextLinkComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n teaserTitle$: Observable;\n @Input()\n target$: Observable;\n @Input()\n colorClass: string;\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTarget } from '@fcom/core-api';\n\nimport { toLinkData } from '../../services';\n\n@Component({\n selector: 'cms-text-link',\n template: `\n \n `,\n})\nexport class CmsTextLinkComponent implements OnInit {\n @Input()\n content$: Observable;\n @Input()\n colorClass: string;\n\n cmsTarget$: Observable;\n\n ngOnInit(): void {\n this.cmsTarget$ = this.content$.pipe(map((d) => toLinkData(d.target)));\n }\n}\n","@if (content$ | async; as content) {\n \n @if (items$ | async; as items) {\n {{ content.teaserTitle }}\n\n @if (content.subjectTaxonomyTags.includes(TAXONOMY.QUERY_LIST_TEASER_STYLE)) {\n @for (teaserItem of items; track trackByUrl) {\n \n }\n } @else if (content.subjectTaxonomyTags.includes(TAXONOMY.TEXT_LINK_LEFT_LIST)) {\n
\n @for (teaserItem of items; track trackByUrl) {\n \n }\n
\n } @else if (content.subjectTaxonomyTags.includes(TAXONOMY.QUERY_TEASER_LIST_THIRD)) {\n @for (teaserItem of items; track trackByUrl) {\n \n }\n } @else if (content.subjectTaxonomyTags.includes(TAXONOMY.QUERY_LIST_NEWS_COLLECTION)) {\n
\n @for (teaserItem of items; track trackByUrl) {\n \n }\n
\n } @else {\n @for (teaserItem of items; track trackByUrl) {\n \n }\n }\n }\n \n \n \n\n @if (content.subjectTaxonomyTags.includes(TAXONOMY.TEXT_LINK_LEFT_LIST) && content.teaserText) {\n
\n }\n \n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { BehaviorSubject, combineLatest, Observable, Subscription } from 'rxjs';\nimport { catchError, map, take } from 'rxjs/operators';\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport {\n CmsContentType,\n CmsQueryList,\n CmsQueryListItem,\n CmsTaxonomy,\n CmsTaxonomyGeneral,\n CmsViewType,\n} from '@fcom/core-api';\nimport { sanitizeWhiteListedPath, stopPropagation, unsubscribe } from '@fcom/core/utils';\nimport { ConfigService, SentryLogger } from '@fcom/core';\nimport { finShare } from '@fcom/rx';\nimport { ButtonTheme, IconPosition, LoaderColor, LoaderTheme } from '@fcom/ui-components';\n\nimport { CmsTemplateService } from '../../../services';\nimport { getFontLevel, getHeaderLevel } from '../../../services/cms-utils/cms-utils';\n\n@Component({\n selector: 'fin-teaser-list',\n templateUrl: './teaser-list.component.html',\n styleUrls: ['./teaser-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TeaserListComponent implements OnInit, OnDestroy {\n readonly DEFAULT_HEADER_LEVEL = 3;\n readonly TAXONOMY: typeof CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n protected readonly LoaderTheme = LoaderTheme;\n protected readonly LoaderColor = LoaderColor;\n protected readonly ButtonTheme = ButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly IconPosition = IconPosition;\n readonly CmsContentType = CmsContentType;\n\n path: string;\n loading: boolean;\n\n numberOfPages$: Observable;\n showLoadMore$: Observable;\n currentPage$ = new BehaviorSubject(0);\n nextPageLink$: Observable;\n items$: BehaviorSubject = new BehaviorSubject([]);\n\n subscription = new Subscription();\n\n headerLevel(tags: CmsTaxonomy[]): number {\n return getHeaderLevel(tags);\n }\n\n headerFontLevel(tags: CmsTaxonomy[]): string {\n return getFontLevel(tags);\n }\n\n renderHeading(tags: CmsTaxonomy[]): boolean {\n if (\n tags?.includes(this.TAXONOMY.TEXT_LINK_LEFT_LIST) ||\n tags?.includes(this.TAXONOMY.QUERY_TEASER_LIST_THIRD) ||\n tags?.includes(this.TAXONOMY.QUERY_LIST_NEWS_COLLECTION)\n ) {\n return true;\n }\n return false;\n }\n\n constructor(\n private router: Router,\n private configService: ConfigService,\n private cmsTemplateService: CmsTemplateService,\n private sentryLogger: SentryLogger\n ) {}\n\n @Input()\n content$: Observable;\n\n @ViewChildren('listItem', { read: ElementRef }) listItems: QueryList;\n\n ngOnInit(): void {\n this.path = sanitizeWhiteListedPath(this.router.url, this.configService.cfg);\n const parsedPageNum = this.router.parseUrl(this.path).queryParams.pageNum;\n if (parsedPageNum) {\n this.currentPage$.next(+parsedPageNum);\n }\n this.numberOfPages$ = this.content$.pipe(\n map((content) => content.numberOfPages || 1),\n finShare()\n );\n this.showLoadMore$ = combineLatest([this.numberOfPages$, this.currentPage$]).pipe(\n map(([numberOfPages, currentPage]) => currentPage < numberOfPages - 1)\n );\n this.subscription.add(\n this.content$\n .pipe(\n map((content) => content.items),\n take(1)\n )\n .subscribe((items) => this.items$.next(items))\n );\n this.nextPageLink$ = this.currentPage$.pipe(\n map((page) => {\n const urlWithoutPageNum = this.path.replace(/[?&]pageNum=\\d/, '');\n const delimiter = urlWithoutPageNum.includes('?') ? '&' : '?';\n return `${urlWithoutPageNum}${delimiter}pageNum=${page + 1}`;\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n loadNextItems(event: Event): boolean {\n if (this.loading) {\n return false;\n }\n stopPropagation(event);\n this.loading = true;\n const nextPage = this.currentPage$.value + 1;\n this.currentPage$.next(nextPage);\n const delimiter = this.path.includes('?') ? '&' : '?';\n const templatePath = `${this.path}${delimiter}pageNum=${nextPage}`;\n this.subscription.add(\n this.cmsTemplateService\n .load(templatePath)\n .pipe(\n take(1),\n catchError((error: unknown) => {\n this.sentryLogger.error('Error loading additional query list items', { error, path: templatePath });\n this.loading = false;\n throw error;\n })\n )\n .subscribe((template) => {\n const currentItems = this.items$.value;\n const firstNewItemIndex = currentItems.length;\n const newItems: CmsQueryListItem[] = template.main\n .filter((content) => content.viewType === CmsViewType.TEASER_LIST)\n ?.flatMap((content: CmsQueryList) => content.items);\n this.items$.next(currentItems.concat(newItems));\n this.loading = false;\n // Set focus to first new element to improve a11y\n this.setFocus(firstNewItemIndex);\n })\n );\n return false;\n }\n\n trackByUrl(_index: number, item: CmsQueryListItem): string {\n return item.url;\n }\n\n private setFocus(index: number): void {\n setTimeout(() => {\n this.listItems.get(index)?.nativeElement?.querySelector('a')?.focus();\n });\n }\n}\n","
\n

{{ content.teaserTitle }}

\n \n
\n \n {{ 'readMore' | finLocalization }}\n {{ content.teaserTitle }}\n \n \n \n \n
\n","import { ChangeDetectionStrategy, Component, Input, Output, EventEmitter } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { CmsQueryListItem } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-teaser',\n templateUrl: './teaser.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TeaserComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Output()\n linkClicked: EventEmitter = new EventEmitter(); // mainly for click tracking if normal link tracking is not enough\n\n @Input()\n content: CmsQueryListItem;\n\n emitClick(): void {\n this.linkClicked.emit();\n }\n}\n","
\n \n
\n \n
\n
\n

\n {{ content.teaserTitle }}\n

\n \n
\n \n
\n","import { ChangeDetectionStrategy, Component, Input, Output, EventEmitter } from '@angular/core';\n\nimport { AspectRatioString } from '@fcom/common';\nimport { CmsImageData, CmsMedia, CmsQueryListItem } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-teaser-card',\n templateUrl: './teaser-card.component.html',\n styleUrls: ['./teaser-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TeaserCardComponent {\n @Input()\n aspectRatio: AspectRatioString;\n @Input()\n content: CmsQueryListItem;\n\n @Output()\n linkClicked: EventEmitter = new EventEmitter(); // mainly for click tracking if normal link tracking is not enough\n\n emitClick(): void {\n this.linkClicked.emit();\n }\n\n getPics(media: CmsMedia[]): CmsImageData[] {\n return media.filter((m) => 'responsiveImageLinksData' in m) as CmsImageData[];\n }\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-author',\n templateUrl: './author.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AuthorComponent {\n @Input()\n author = '';\n\n constructor() {}\n}\n","{{ author }}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { formatDate } from '@angular/common';\n\n@Pipe({\n name: 'finTimestamp',\n pure: false, // Depends on date\n})\nexport class TimestampPipe implements PipeTransform {\n transform(timestamp: any): string {\n return formatDate(timestamp, 'dd.MM.yyyy', 'en-FI');\n }\n}\n","\n {{ text }} {{ date | finTimestamp }}\n\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-date',\n templateUrl: './date.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DateComponent {\n @Input()\n date = 0;\n\n @Input()\n text = '';\n\n constructor() {}\n}\n","
\n
\n \n
\n \n \n \n \n
\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { CmsMedia } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-detail-text',\n templateUrl: './detail-text.component.html',\n styleUrls: ['./detail-text.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DetailTextComponent {\n @Input()\n mediaObject: CmsMedia[];\n\n @Input()\n markup = '';\n}\n","
0\" />\n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { CmsQueryList } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-related-teaser',\n templateUrl: './related-teaser.component.html',\n styleUrls: ['./related-teaser.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RelatedTeaserComponent {\n @Output()\n linkClicked: EventEmitter = new EventEmitter(); // mainly for click tracking if normal link tracking is not enough\n\n @Input()\n relatedTeaser: CmsQueryList;\n\n emitClick(): void {\n this.linkClicked.emit();\n }\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-tag',\n templateUrl: './tags.component.html',\n styleUrls: ['./tags.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TagComponent {\n @Input()\n tagTitle: string;\n\n @Input()\n tagUrl: string;\n\n constructor() {}\n}\n","{{ tagTitle }}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'finEncode',\n pure: false, // Depends on date\n})\nexport class EncodePipe implements PipeTransform {\n transform(inputString: string): string {\n return `https://finnair.com${encodeURI(inputString)}`;\n }\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fin-social',\n templateUrl: './social.component.html',\n styleUrls: ['./social.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SocialComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n public url = input('');\n title = input();\n colour = input('grey-200-bg');\n}\n","
\n \n \n \n \n \n \n
\n","

\n {{ content.teaserTitle }}\n

\n\n
\n \n \n
\n
\n
\n \n\n \n \n \n \n\n \n \n \n \n
\n
\n \n
\n
\n
\n\n","import { ChangeDetectionStrategy, Component, Inject, Input, OnInit } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { CmsEditorialArticle, CmsTaxonomyGeneral } from '@fcom/core-api';\nimport { SchemaService } from '@fcom/common/services/schema/schema.service';\nimport { toISO8601UTC } from '@fcom/core/utils/date';\n@Component({\n selector: 'fin-article-bluewings',\n templateUrl: './article-bluewings.component.html',\n styleUrls: ['./article-bluewings.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ArticleBluewingsComponent implements OnInit {\n @Input()\n content: CmsEditorialArticle;\n\n constructor(\n private schemaService: SchemaService,\n @Inject(DOCUMENT) private document: Document\n ) {}\n\n ngOnInit(): void {\n const media = this.content.media.length ? this.content.media[0] : null;\n\n this.schemaService.addArticleSchema({\n id: this.document.location.href,\n headline: this.content.teaserTitle,\n description: this.content.teaserText,\n dateModified: toISO8601UTC(new Date(this.content.creationDate)),\n datePublished: toISO8601UTC(\n new Date(\n this.content.localSettings?.firstPublished\n ? this.content.localSettings.firstPublished\n : this.content.creationDate\n )\n ),\n image: {\n url: media?.['data'],\n width: media?.['width']?.toString(),\n height: media?.['height']?.toString(),\n },\n });\n }\n\n readonly CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n}\n","

\n {{ content.teaserTitle }}\n

\n\n
\n \n \n
\n
\n\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { CmsEditorialArticle } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-article-child',\n templateUrl: './article-child.component.html',\n styleUrls: ['./article-child.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ArticleChildComponent {\n @Input()\n content: CmsEditorialArticle;\n}\n","// TODO: Refactor this soon for the Blue Wings footer offer and merge the logic either into FooterOfferComponent or into the template using it.\n// This component is currently not referred to in cms.module.ts or index.ts.\nimport { Component, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { filter, map, take } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { Amount } from '@fcom/dapi';\nimport { LocationRouteCffService } from '@fcom/core/services';\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { CheapestPriceForAllDestinationsService } from '../../services';\nimport { FooterOffer, MarketingOffer } from '../../interfaces';\n\n@Component({\n selector: 'cms-book-now',\n template: ' ',\n styleUrls: ['./cms-book-now.component.scss'],\n})\nexport class CmsBookNowComponent implements OnInit, OnDestroy {\n offer: FooterOffer;\n price$: Observable;\n\n @Input()\n locationCode: string;\n\n private subscription = new Subscription();\n\n constructor(\n private cheapestPriceForAllDestinationsService: CheapestPriceForAllDestinationsService,\n private locationRouteCffService: LocationRouteCffService,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n this.offer = {\n locationCode: this.locationCode,\n location: '',\n };\n\n if (this.locationCode) {\n this.subscription.add(\n this.locationRouteCffService\n .bestGuessFor(this.locationCode, this.languageService.localeValue)\n .pipe(take(1))\n .subscribe((res) => {\n this.offer.location = res.title;\n })\n );\n }\n\n this.price$ = this.cheapestPriceForAllDestinationsService.offerForSingleTrip(this.offer.locationCode, true).pipe(\n map(\n (offer: MarketingOffer) =>\n offer.prices.find((t) => t.travelClass.toUpperCase() === GlobalBookingTravelClass.ECONOMY)?.price\n ),\n filter(Boolean)\n );\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n}\n","
\n
\n {{ informationalTeaser.teaserTitle }}\n
\n
\n 0\"\n >\n \n \n
\n {{ informationalTeaser.localSettings.extraText }}\n
\n\n","import { Component, Input } from '@angular/core';\n\nimport { CmsContent } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-informational-teaser',\n templateUrl: './informational-teaser.component.html',\n styleUrls: ['./informational-teaser.component.scss'],\n})\nexport class InformationalTeaserComponent {\n @Input()\n informationalTeaser: CmsContent;\n\n constructor() {}\n}\n","
\n \n {{ content.teaserTitle }}\n \n \n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsCollection, CmsTaxonomyGeneral } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-list-with-heading',\n styleUrls: ['./cms-list-with-heading.component.scss'],\n templateUrl: './cms-list-with-heading.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsListWithHeadingComponent {\n readonly TAXONOMY = CmsTaxonomyGeneral;\n\n @Input()\n content$: Observable;\n}\n","\n \n\n
\n \n
\n
\n","import { AfterViewInit, Component, ElementRef, Inject, PLATFORM_ID, Renderer2, ViewChild } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { ActivatedRoute, ParamMap } from '@angular/router';\n\nimport { combineLatest, Observable, Subject } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { RootPaths } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { OndMarketingRoutesPath } from '@fcom/ond-marketing-landing-core';\n\nconst SMARTVEL_WIDGET_DESTINATION_FIELD = 'smt-combobox-labeledby-destination';\nconst SMARTVEL_WIDGET_ORIGIN_FIELD = 'smt-combobox-labeledby-origin';\n\n@Component({\n selector: 'fin-travel-restrictions',\n templateUrl: './travel-restrictions.component.html',\n styleUrls: ['./travel-restrictions.component.scss'],\n})\nexport class TravelRestrictionsComponent implements AfterViewInit {\n readonly smartvelSource = 'https://cdn.smartvel.com/scripts/gcovwidget/boot.min.js';\n readonly smartvelApiKey = '76556e09-358b-452c-bb0d-c639c16c9fc3';\n\n @ViewChild('smartvelWidget', { static: false }) smartvelWidget;\n\n origin$: Observable;\n destination$: Observable;\n oneway$: Observable;\n flightsPageRedirectionUrl$: Observable;\n\n private destinationLocationCodeSubject: Subject = new Subject();\n private originLocationCodeSubject: Subject = new Subject();\n\n constructor(\n private languageService: LanguageService,\n private route: ActivatedRoute,\n private ref: ElementRef,\n private renderer: Renderer2,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n this.origin$ = this.parseLocationParamFromRoute('originLocationCode');\n this.destination$ = this.parseLocationParamFromRoute('destinationLocationCode');\n this.oneway$ = this.route.queryParamMap.pipe(map((params: ParamMap) => params.get('oneway') === 'true'));\n this.flightsPageRedirectionUrl$ = combineLatest([\n this.originLocationCodeSubject,\n this.destinationLocationCodeSubject,\n ]).pipe(\n map(([originLocationCode, destinationLocationCode]) => {\n return originLocationCode && destinationLocationCode\n ? this.createRedirectionUrl(originLocationCode, destinationLocationCode)\n : null;\n })\n );\n }\n\n ngAfterViewInit(): void {\n // Wait until elements are in place before loading the scripts\n this.loadScript(this.smartvelSource);\n }\n\n onWidgetChange(record: MutationRecord): void {\n if (record.attributeName == 'data-value') {\n const id = (record.target as Element)?.id;\n if (id === SMARTVEL_WIDGET_DESTINATION_FIELD) {\n this.destinationLocationCodeSubject.next(\n this.parseLocCodeFromSmartvelWidget(SMARTVEL_WIDGET_DESTINATION_FIELD)\n );\n }\n if (id === SMARTVEL_WIDGET_ORIGIN_FIELD) {\n this.originLocationCodeSubject.next(this.parseLocCodeFromSmartvelWidget(SMARTVEL_WIDGET_ORIGIN_FIELD));\n }\n }\n }\n\n private parseLocationParamFromRoute(param: string): Observable {\n return this.route.queryParamMap.pipe(\n map((params: ParamMap) => params.get(param)),\n filter((iataCode) => !!iataCode && iataCode.length === 3)\n );\n }\n\n private createRedirectionUrl(originLocationCode: string, destinationLocationCode: string): string {\n return `${this.languageService.langValue}/${RootPaths.OND_MARKETING_LANDING_ROOT}/${OndMarketingRoutesPath.CITY_TO_CITY}/${originLocationCode}/${destinationLocationCode}`;\n }\n\n private parseLocCodeFromSmartvelWidget(selector: string): string | null {\n const location = this.smartvelWidget.nativeElement.querySelector(`#${selector}`)?.value;\n // Value is like 'Berlin, Germany (BER)' or 'New York, United States of America (USA) (JFK)' or 'Everywhere' when defined\n if (!location || location === 'Everywhere') {\n return null;\n }\n return [...location.matchAll(/\\(([A-Z]+)+\\)/g)].pop()[1];\n }\n\n private loadScript(src: string): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n const script: HTMLScriptElement = document.createElement('script');\n script.type = 'text/javascript';\n script.src = src;\n this.renderer.appendChild(this.ref.nativeElement, script);\n }\n}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PipesModule } from '@fcom/common/pipes';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { UiComponentsModule } from '@fcom/ui-components';\nimport { DirectiveModule } from '@fcom/common';\n\nimport { TravelRestrictionsComponent } from './travel-restrictions.component';\n\n@NgModule({\n imports: [CommonModule, PipesModule, UiTranslateModule, UiComponentsModule, ComponentsModule, DirectiveModule],\n declarations: [TravelRestrictionsComponent],\n exports: [TravelRestrictionsComponent],\n providers: [],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class TravelRestrictionsModule {}\n","
\n \n {{ content.teaserTitle }}\n \n
\n
\n \n {{ content.linkText }}\n \n \n
\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { CmsTeaser } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-horizontal-title',\n styleUrls: ['./horizontal-title.component.scss'],\n templateUrl: './horizontal-title.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HorizontalTitleComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n @Input()\n content$: Observable;\n\n @Input()\n headerLevel = 2;\n}\n","\n \n\n\n\n

\n \n

\n

\n \n

\n

\n \n

\n
\n \n
\n
\n \n
\n

\n \n

\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'cms-heading-tag',\n templateUrl: './cms-heading-tag.component.html',\n styleUrls: ['./cms-heading-tag.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsHeadingTagComponent {\n @Input()\n level = 3;\n\n @Input()\n extraClasses: string;\n}\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, Observable, of, Subject, switchMap, Subscription, NEVER } from 'rxjs';\nimport { buffer, catchError, debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsOffer } from '@fcom/core-api';\nimport { ConfigService, GlobalBookingTravelClass, LocationRouteCffService, stopPropagation } from '@fcom/core';\nimport {\n ElementActions,\n ElementTypes,\n GaContext,\n PageMetaService,\n PriceCalendarCTAParams,\n PriceCalendarParams,\n PriceCalendarService,\n PromotionItem,\n PromotionType,\n RecommendationService,\n TripType,\n} from '@fcom/common';\nimport {\n TrendingDestinationLocation,\n TrendingDestinationsBaseLocation,\n} from '@fcom/common/interfaces/recommendation.interface';\nimport { GtmService } from '@fcom/common/gtm';\nimport { finShare } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { AmDestinationService } from '@fcom/destination-search/services/am-destination.service';\nimport { getOfferWithAmDestination } from '@fcom/common/utils';\nimport { LocationsService } from '@fcom/locations/services/locations.service';\nimport { DestinationSearchService } from '@fcom/destination-search/services/destination-search.service';\nimport { DestinationSearchItem } from '@fcom/destination-search/interfaces/destination-search.interface';\n\nimport { BlockOffer, BlockOfferData, MarketingOffer, MarketingOfferPrices } from '../../interfaces';\nimport { CheapestPriceForAllDestinationsService, toPromoBlock } from '../../services';\n\nconst TRENDING_BADGE_LABEL = 'popularNow';\n\n@Component({\n selector: 'fin-trending-destinations-grid',\n template: `\n \n \n \n \n \n `,\n})\nexport class TrendingDestinationsComponent implements OnInit, OnDestroy {\n @Input()\n content: CmsCollection;\n\n offers$: Observable;\n scrollEvents$: Subject<[BlockOffer, number]> = new Subject<[BlockOffer, number]>();\n flightHotelUrl: string;\n tripType: TripType;\n originLocationCode$: Observable;\n calendarOpen$: Observable = NEVER;\n enableEuropeUnder100: boolean;\n\n isAmContinueModalOpen = false;\n\n readonly scrollDebounceTime = 1000;\n readonly popularTrendLimit = 2;\n readonly maxNumberOfOffers = 8;\n readonly minNumberOfOffers = 4;\n\n private subscriptions = new Subscription();\n\n constructor(\n private recommendationService: RecommendationService,\n private pageMetaService: PageMetaService,\n private gtmService: GtmService,\n private languageService: LanguageService,\n private cheapestPriceForAllDestinationsService: CheapestPriceForAllDestinationsService,\n private amDestinationService: AmDestinationService,\n private locationRouteCffService: LocationRouteCffService,\n private priceCalendarService: PriceCalendarService,\n private locationsService: LocationsService,\n private configService: ConfigService,\n private destinationSearchService: DestinationSearchService\n ) {\n this.calendarOpen$ = this.priceCalendarService.calendarOpen$;\n this.originLocationCode$ = this.pageMetaService.defaultOriginLocationCode$;\n }\n\n ngOnInit(): void {\n this.tripType = this.getTripType();\n\n this.enableEuropeUnder100 = this.configService.cfg.enableEuropeUnder100;\n\n this.offers$ = combineLatest([\n this.pageMetaService.defaultOriginLocationCode$.pipe(filter(Boolean)),\n this.cheapestPriceForAllDestinationsService.bothWayOffers(),\n ]).pipe(\n switchMap(([origin, offers]) =>\n (this.enableEuropeUnder100\n ? this.getEuropeUnder100(origin)\n : this.recommendationService.getTrendingDestinations(origin).pipe(catchError(() => of([])))\n ).pipe(\n // filter out current pageMeta location if found and convert first n items to BlockOfferData[]\n map((locations) => {\n const filteredDestination = locations\n .filter((item: TrendingDestinationLocation) => item.locationCode !== origin)\n .map((location: TrendingDestinationLocation) =>\n this.trendingToOffer(location, ...this.getBadgeLabelAndIcon(location))\n )\n .filter((item: BlockOfferData) => this.flightPriceFilter(item, offers, this.tripType))\n .reduce((locations, loc) => {\n // combine same locations but keeps the original value if new value is null/undefined\n locations.set(loc.destination, {\n ...locations.get(loc.destination),\n ...Object.fromEntries(\n Object.entries(loc).map(([key, value]) => [key, value ?? locations.get(loc.destination)?.[key]])\n ),\n });\n return locations;\n }, new Map());\n\n const filteredDestinationList = [...filteredDestination.values()];\n return filteredDestinationList.slice(0, this.getAmountOfOffers(filteredDestinationList));\n }),\n // fallback to CMS content if the recommendation api fails to deliver\n switchMap((locations: BlockOfferData[]) =>\n locations?.length > 0\n ? of(locations)\n : this.languageService.lang.pipe(\n map((lang) => this.content.items.map((offer) => toPromoBlock(offer as CmsOffer, lang))),\n map((offs) => offs.slice(0, this.getAmountOfOffers(offs)))\n )\n ),\n switchMap((offs) =>\n this.languageService.localeValue.includes('FI')\n ? getOfferWithAmDestination(\n offs,\n this.amDestinationService.amDestinationList(),\n this.locationRouteCffService\n )\n : of(offs)\n ),\n distinctUntilChanged(),\n finShare()\n )\n )\n );\n\n const debounceScroll$ = this.scrollEvents$.pipe(debounceTime(this.scrollDebounceTime));\n\n this.subscriptions.add(\n this.scrollEvents$.pipe(buffer(debounceScroll$)).subscribe((events) => {\n const items = events.map(([offer, index]: [BlockOffer, number]) => this.toPromotionItem(offer, index));\n this.gtmService.internalPromotion(items, PromotionType.VIEW);\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n destinationClick([destinationItem, index]: [BlockOffer, number]): void {\n this.gtmService.internalPromotion([this.toPromotionItem(destinationItem, index)], PromotionType.CLICK);\n }\n\n openAmContinueModal({ amLink, destination }: { amLink: string; destination: string }): void {\n this.gtmService.trackElement(\n `tile-${destination.toLowerCase().replace(/ /g, '_')}-flight-hotel`,\n GaContext.CONTENT,\n ElementTypes.LIST_ITEM,\n undefined,\n ElementActions.CLICK\n );\n this.isAmContinueModalOpen = true;\n this.flightHotelUrl = amLink;\n }\n\n closeAmContinueModal(): void {\n this.isAmContinueModalOpen = false;\n }\n\n getTripType(): TripType {\n const tripType = TripType[this.content.localSettings?.tripType?.toUpperCase()] ?? TripType.RETURN;\n return this.languageService.localeValue.includes('FI') ? TripType.ONEWAY : tripType;\n }\n\n calendarClicked(\n selectedOriginLocationCode: string,\n [event, destinationItem, travelClass, tripType]: [Event, BlockOffer, GlobalBookingTravelClass, TripType]\n ): void {\n stopPropagation(event);\n this.priceCalendarService.openPriceCalendar(\n selectedOriginLocationCode,\n destinationItem.destination,\n tripType,\n travelClass,\n destinationItem.title\n );\n }\n\n priceCalendarCTAClicked(params: PriceCalendarCTAParams): void {\n this.priceCalendarService.priceCalendarCTAClicked(params);\n }\n\n closePriceCalendar(): void {\n this.priceCalendarService.closePriceCalendar();\n }\n\n // filter out the destination where oneway price is more expensive than return\n private flightPriceFilter(location: BlockOfferData, offers: MarketingOffer[], tripType: TripType): BlockOfferData {\n const priceOffer = this.getPriceOffer(offers, location);\n //skip checking if the destination doesn't have price available\n\n if (!priceOffer?.find((i) => i.price.tripType === tripType)?.price?.amount) {\n return null;\n }\n\n // do not check price if trending destination type is return\n if (tripType === TripType.RETURN) {\n return location;\n }\n\n if (\n Number(priceOffer?.find((i) => i.price.tripType === TripType.ONEWAY)?.price.amount) <\n Number(priceOffer?.find((i) => i.price.tripType === TripType.RETURN)?.price.amount)\n ) {\n return location;\n }\n }\n\n private getPriceOffer(offers: MarketingOffer[], location: BlockOfferData): MarketingOfferPrices[] {\n return offers\n .find((offer) => offer.destination === location.destination)\n ?.prices.filter((priceOffer) => priceOffer.travelClass === GlobalBookingTravelClass.ECONOMY);\n }\n\n private getAmountOfOffers(destination: BlockOfferData[]): number {\n const amountOfOfferWithPrice = destination.length;\n // If amount offer with price < 3, then no offer will be shown\n if (amountOfOfferWithPrice < this.minNumberOfOffers) {\n return 0;\n }\n // If amount offer with price < 8 and >=4, then 4 offers will be returned\n if (amountOfOfferWithPrice < this.maxNumberOfOffers) {\n return this.minNumberOfOffers;\n }\n // others return 9 offers\n return this.maxNumberOfOffers;\n }\n\n private getBadgeLabelAndIcon(location: TrendingDestinationLocation): [string, SvgLibraryIcon] {\n return !location.isIncludedInCampaign && location.trend >= this.popularTrendLimit\n ? [TRENDING_BADGE_LABEL, SvgLibraryIcon.TRENDING_ARROW_UP]\n : [null, null];\n }\n\n private trendingToOffer(\n location: TrendingDestinationLocation,\n badgeLabel: string,\n badgeIcon: SvgLibraryIcon\n ): BlockOfferData {\n return {\n title: location.cityName || location.title,\n price: null,\n subtitle: null,\n callToAction: null,\n link: location.destinationUrl,\n flag: location.countryCode,\n imageData: location.picture,\n destination: location.locationCityCode ?? location.locationCode, //destination in marketing offer is locationCityCode if that is available (e.g. REK)\n badgeLabel: location.badgeLabel ?? badgeLabel,\n badgeIcon,\n enableBlackTeaser: location.enableBlackTeaser,\n } as BlockOfferData;\n }\n\n private toPromotionItem(offer: BlockOfferData, index: number): PromotionItem {\n return {\n position: `${index}`,\n id: 'trending-destinations',\n product: offer.destination,\n type: 'dynamic',\n };\n }\n\n private getEuropeUnder100(origin: string): Observable {\n return combineLatest([\n this.recommendationService.getTrendingDestinationsByContinent(origin, 'eu').pipe(catchError(() => of([]))),\n this.cheapestPriceForAllDestinationsService.bothWayOffers(),\n this.destinationSearchService.destinationSearch(),\n ]).pipe(\n switchMap(\n ([locations, offers, destinationSearchResult]: [\n TrendingDestinationsBaseLocation[],\n MarketingOffer[],\n DestinationSearchItem[],\n ]) => {\n const finlandDestinations = destinationSearchResult\n .find((continent) => continent.id === 'continenteurope')\n ?.items.find((country) => country.id === 'countryfinland')\n .items.map((destination) => destination.locationCode);\n\n const locationsUnder100 = locations\n .filter((location) => !finlandDestinations.includes(location.locationCode))\n .map((location) => [\n location,\n parseInt(\n offers\n .find((offer) => offer.destination === location.locationCode)\n ?.prices.find((price) => price.travelClass === GlobalBookingTravelClass.ECONOMY)?.price.amount,\n 10\n ),\n ])\n .filter(([_location, price]: [TrendingDestinationsBaseLocation, number]) => price < 100)\n .slice(0, this.maxNumberOfOffers)\n .sort(\n (a: [TrendingDestinationsBaseLocation, number], b: [TrendingDestinationsBaseLocation, number]) =>\n a[1] - b[1]\n )\n .map(([location]: [TrendingDestinationsBaseLocation]) => location);\n\n return this.locationsService\n .triggerLocationFetchAll(locationsUnder100.map((location) => location.locationCode))\n .pipe(\n map((locationsMap) =>\n locationsUnder100.map(\n (location) =>\n ({\n ...location,\n ...locationsMap[location.locationCode],\n }) as TrendingDestinationLocation\n )\n )\n );\n }\n )\n );\n }\n}\n","import { Component, createNgModuleRef, Injector, Input, OnInit, ViewChild, ViewContainerRef } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CmsTemplate } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-render-lazy-wizard',\n templateUrl: './render-lazy-wizard.component.html',\n styleUrls: ['./render-lazy-wizard.component.scss'],\n})\nexport class RenderLazyWizardComponent implements OnInit {\n @ViewChild('lazyLoadComponent', { read: ViewContainerRef })\n lazyLoadComponent!: ViewContainerRef;\n\n @Input()\n template$: Observable;\n\n constructor(private injector: Injector) {}\n\n ngOnInit(): void {\n this.loadWizard();\n }\n\n async loadWizard() {\n const { MultiStepConditionalFormModule, MultiStepConditionalFormComponent } = await import(\n '@fcom/service-forms-lazy/components/multi-step-conditional-forms'\n );\n const moduleRef = createNgModuleRef(MultiStepConditionalFormModule, this.injector);\n\n const { instance } = this.lazyLoadComponent.createComponent(MultiStepConditionalFormComponent, {\n ngModuleRef: moduleRef,\n });\n instance.template$ = this.template$;\n }\n}\n","\n","\n \n","import { Component, ElementRef, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { catchError, filter, map, Observable, Subscription, switchMap, take } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { FragmentService, GtmEvent, ScrollService, SelectOption } from '@fcom/common';\nimport { AppState, ConfigService, CountryLanguage, CountryState, LATIN_ALPHA_PATTERN } from '@fcom/core';\nimport { EMAIL_PATTERN, unsubscribe } from '@fcom/core/utils';\nimport { shownConfs } from '@fcom/core/reducers/langs';\nimport { ButtonTheme, LoaderTheme, NotificationTheme } from '@fcom/ui-components';\nimport { FormStatus } from '@fcom/service-forms';\nimport { profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { CmsArticle } from '@fcom/core-api';\nimport { GtmService } from '@fcom/common/gtm';\nimport { atLeastOneRequired } from '@fcom/service-forms-lazy/utils';\n\nimport { NewsletterSignupService } from '../../../services/newsletter-signup/newsletter-signup.service';\nimport { NewsletterSignupPayload, NewsLetterSource } from '../../../interfaces/newsletter-signup.interface';\n\n@Component({\n selector: 'fin-newsletter-signup-form',\n templateUrl: './newsletter-signup-form.component.html',\n styleUrls: ['./newsletter-signup-form.component.scss'],\n})\nexport class NewsletterSignupFormComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly FormStatus = FormStatus;\n readonly LoaderTheme = LoaderTheme;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n reactiveForm: UntypedFormGroup;\n countries: SelectOption[];\n languages: SelectOption[];\n formStatus: FormStatus = FormStatus.INITIAL;\n isLoggedInUser$: Observable;\n errorArticle$: Observable;\n enableNewsletterSignUpForm = false;\n\n private countryLanguageList: CountryState[];\n private subscriptions: Subscription = new Subscription();\n\n constructor(\n private fb: UntypedFormBuilder,\n private router: Router,\n private newsletterService: NewsletterSignupService,\n private fragmentService: FragmentService,\n private configService: ConfigService,\n private store$: Store,\n private languageService: LanguageService,\n private gtmService: GtmService,\n private scrollService: ScrollService,\n private elementRef: ElementRef\n ) {}\n\n ngOnInit(): void {\n this.countryLanguageList = shownConfs\n .filter((conf) => conf.code !== 'INT')\n .map((country) => ({\n ...country,\n languages: country.languages.map(\n (language): CountryLanguage => ({\n name: language.name,\n code: language.code.split('-').pop(),\n })\n ),\n }));\n\n this.isLoggedInUser$ = this.store$.pipe(\n profileOrUndefinedIfNotLoggedIn(),\n map((profile) => !!profile)\n );\n\n this.errorArticle$ = this.fragmentService\n .getFragment('fragments.newsletterSignUpForm.url')\n .pipe(take(1));\n\n this.enableNewsletterSignUpForm = this.configService.cfg.enableNewsletterSignUpForm;\n\n this.countries = this.createSelectOption(this.countryLanguageList);\n this.createForm();\n\n this.subscriptions.add(\n this.reactiveForm.get('country').valueChanges.subscribe((val) => {\n if (val) {\n this.reactiveForm.get('language').enable();\n } else {\n this.reactiveForm.get('language').disable();\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n onSubmit(): void {\n if (!this.reactiveForm.valid) {\n this.scrollToInvalidField();\n return;\n }\n\n this.formStatus = FormStatus.LOADING;\n const countryCode = this.reactiveForm.get('country').value;\n const countryName = this.countries.find((country) => country.value === countryCode)?.name;\n const singleLanguage = this.countryLanguageList.find((item) => item.code === countryCode).languages[0]?.code;\n const languageCode = ((this.reactiveForm.get('language').value as string) || singleLanguage || '').toUpperCase();\n const languageName = this.countryLanguageList\n .find((item) => item.code === countryCode)\n .languages.find((language) => language.code === languageCode.toLowerCase()).name;\n\n const payload: NewsletterSignupPayload = {\n firstName: this.reactiveForm.get('firstName').value,\n lastName: this.reactiveForm.get('lastName').value,\n email: this.reactiveForm.get('email').value,\n country: countryCode,\n language: languageCode,\n pageUrl: this.router.url,\n marketingNewsletter: this.reactiveForm.get('marketingNewsletter').value,\n advertising: this.reactiveForm.get('advertising').value,\n source: NewsLetterSource.NEWSLETTER_FORM,\n };\n\n this.subscriptions.add(\n this.newsletterService\n .postSubscribeRequest(payload)\n .pipe(\n take(1),\n catchError((err: unknown) => {\n this.formStatus = FormStatus.INITIALIZING_ERROR;\n throw err;\n })\n )\n .subscribe((result) => {\n if (result?.message) {\n this.formStatus = FormStatus.COMPLETE;\n\n this.gtmService.pushEventToDataLayer(GtmEvent.NEWSLETTER_FORM_SUBMITTED, {\n selected_country: countryName,\n selected_language: languageName,\n });\n } else {\n this.formStatus = FormStatus.INITIALIZING_ERROR;\n }\n })\n );\n }\n\n countryChanged(countryCode: string): void {\n this.languages = this.createSelectOption(\n this.countryLanguageList.find((item) => item.code === countryCode).languages\n );\n\n if (this.languages.length === 1) {\n this.reactiveForm.controls['language'].reset();\n this.reactiveForm.controls['language'].clearValidators();\n } else {\n this.reactiveForm.controls['language'].setValidators([Validators.required]);\n }\n this.reactiveForm.controls['language'].updateValueAndValidity();\n }\n\n private createForm = (): void => {\n const [language, country] = (this.languageService.localeValue || '_').split('_');\n\n this.reactiveForm = this.fb.group(\n {\n firstName: ['', [Validators.required, Validators.pattern(LATIN_ALPHA_PATTERN), Validators.maxLength(20)]],\n lastName: ['', [Validators.required, Validators.pattern(LATIN_ALPHA_PATTERN), Validators.maxLength(30)]],\n email: ['', [Validators.required, Validators.pattern(EMAIL_PATTERN)]],\n country: [country, Validators.required],\n language: [{ value: language, disabled: !country }, Validators.required],\n marketingNewsletter: [false],\n advertising: [{ value: false, disabled: true }],\n },\n {\n validators: [atLeastOneRequired(['marketingNewsletter', 'advertising'])],\n }\n );\n\n if (country) {\n this.countryChanged(country);\n }\n\n this.subscriptions.add(\n this.isLoggedInUser$.pipe(filter(Boolean)).subscribe(() => {\n this.reactiveForm.get('advertising').enable();\n })\n );\n\n this.subscriptions.add(\n this.isLoggedInUser$\n .pipe(\n filter((isLoggedIn) => !isLoggedIn),\n switchMap(() => this.reactiveForm.get('marketingNewsletter').valueChanges)\n )\n .subscribe((val) => {\n if (val === true) {\n this.reactiveForm.get('advertising').enable();\n } else {\n this.reactiveForm.get('advertising').setValue(false);\n this.reactiveForm.get('advertising').disable();\n }\n })\n );\n };\n\n private createSelectOption = (object: CountryLanguage[]): SelectOption[] =>\n object.map((item: CountryLanguage) => ({ value: item.code, name: item.name }) as SelectOption);\n\n private scrollToInvalidField(): void {\n this.reactiveForm.markAllAsTouched();\n setTimeout(() => {\n this.scrollService.scrollToFirstInvalidInput(this.elementRef, 40);\n });\n }\n}\n","
\n
\n
\n {{ content.title || content.teaserTitle }}\n
\n \n \n
\n \n
\n
\n
\n
\n \n {{ link.teaserTitle }}\n \n \n \n \n
\n
\n
\n\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport {\n CmsArticle,\n CmsCollection,\n CmsContent,\n CmsContentType,\n CmsTaxonomy,\n CmsTeaser,\n CmsViewType,\n} from '@fcom/core-api';\nimport { isNotBlank } from '@fcom/core';\n\nimport { getFontLevel, getHeaderLevel } from '../../services/cms-utils/cms-utils';\n\n@Component({\n selector: 'cms-articles-with-icons',\n templateUrl: './cms-articles-with-icons.component.html',\n styleUrls: ['./cms-articles-with-icons.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsArticlesWithIconsComponent implements OnInit {\n readonly CmsContentType = CmsContentType;\n readonly CmsViewType = CmsViewType;\n readonly DEFAULT_HEADER_LEVEL = 3;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @HostBinding('class.col-1-12')\n defaultClass = true;\n\n @Input()\n content$: Observable;\n\n articles$: Observable;\n link$: Observable;\n hasGridClass$: Observable;\n\n public headerLevel(tags: CmsTaxonomy[]): number {\n return getHeaderLevel(tags);\n }\n\n public headerFontLevel(tags: CmsTaxonomy[]): string {\n return getFontLevel(tags) ? `white-text ${getFontLevel(tags)}` : 'white-text';\n }\n\n ngOnInit(): void {\n this.articles$ = this.content$.pipe(\n map(\n (collection: CmsCollection): CmsArticle[] =>\n collection.items.filter(\n (i: CmsContent): boolean => i.contentType === CmsContentType.CMArticle\n ) as CmsArticle[]\n )\n );\n this.link$ = this.content$.pipe(\n map(\n (collection: CmsCollection): CmsTeaser =>\n collection.items.find((i: CmsContent): boolean => i.contentType === CmsContentType.CMTeaser) as CmsTeaser\n ),\n filter(Boolean)\n );\n this.hasGridClass$ = this.content$.pipe(\n map((collection: CmsCollection): boolean => isNotBlank(collection.gridClass))\n );\n }\n}\n","@if (target$() | async; as link) {\n \n {{ teaserTitle$() | async }}\n @if (useIcon()) {\n \n }\n \n}\n","import { Component, input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { CmsTarget } from '@fcom/core-api';\nimport { LocalizationPipe } from '@fcom/ui-translate';\n\n@Component({\n selector: 'fin-text-link-left',\n templateUrl: './text-link-left.component.html',\n styleUrl: './text-link-left.component.scss',\n})\nexport class TextLinkLeftComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly newTabText = ` (${this.finLocalization.transform('ariaLabels.newTab')})`;\n\n teaserTitle$ = input>();\n target$ = input>();\n useIcon = input(true);\n underline = input(false);\n\n constructor(private finLocalization: LocalizationPipe) {}\n}\n","@if (content(); as content) {\n
\n @if (content.teaserTitle) {\n {{ content.teaserTitle }}\n }\n @for (item of content.items; track item.contentId) {\n \n }\n @if (content.teaserText) {\n
\n }\n
\n}\n","import { Component, input, InputSignal } from '@angular/core';\n\nimport { CmsQueryList, CmsTaxonomy, CmsTaxonomyGeneral } from '@fcom/core-api';\nimport { ButtonTheme } from '@fcom/ui-components';\n\nimport { getFontLevel, getHeaderLevel } from '../../services/cms-utils/cms-utils';\n\n@Component({\n selector: 'cms-cmrelated',\n templateUrl: './cms-cmrelated.component.html',\n styleUrl: './cms-cmrelated.component.scss',\n})\nexport class CmsCmrelatedComponent {\n readonly ButtonTheme = ButtonTheme;\n readonly CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n readonly DEFAULT_HEADER_LEVEL = 3;\n\n content: InputSignal = input();\n\n public headerLevel(tags: CmsTaxonomy[]): number {\n return getHeaderLevel(tags);\n }\n\n public headerFontLevel(tags: CmsTaxonomy[]): string {\n return getFontLevel(tags);\n }\n}\n","@if (content$() | async; as content) {\n \n}\n","import { Component, input } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { CmsCollection, CmsContentType, CmsTaxonomy, CmsTaxonomyGeneral } from '@fcom/core-api';\n\nimport { getFontLevel, getHeaderLevel } from '../../services/cms-utils/cms-utils';\n\n@Component({\n selector: 'cms-arrow-link-list',\n templateUrl: './cms-arrow-link-list.component.html',\n styleUrl: './cms-arrow-link-list.component.scss',\n})\nexport class CmsArrowLinkListComponent {\n readonly DEFAULT_HEADER_LEVEL = 3;\n readonly CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly CmsContentType = CmsContentType;\n\n content$ = input>();\n arrows = input(true);\n\n headerLevel(tags: CmsTaxonomy[]): number {\n return getHeaderLevel(tags);\n }\n\n headerFontLevel(tags: CmsTaxonomy[]): string {\n return getFontLevel(tags);\n }\n}\n","import { Component, computed, input, InputSignal } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { CmsQueryListItem, CmsTaxonomyGeneral } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-news-feed-item',\n templateUrl: './news-feed-item.component.html',\n styleUrl: './news-feed-item.component.scss',\n})\nexport class NewsFeedItemComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n content: InputSignal = input.required();\n companyNews: InputSignal = input(false);\n targetBlank = computed((): boolean => {\n if (this.companyNews()) {\n return true;\n } else {\n return this.content().subjectTaxonomyTags.includes(CmsTaxonomyGeneral.EMERGENCY_IN_OPERATIONS_COMPANY);\n }\n });\n target = computed((): string => {\n const itemHasCompanyTag: boolean = this.content().subjectTaxonomyTags.includes(\n CmsTaxonomyGeneral.EMERGENCY_IN_OPERATIONS_COMPANY\n );\n /*\n * Teasers & external link content items do not have a way to set custom dates, only articles.\n * So for the external company news links, tag is added to tell the component to fetch the text (which should render as the link)\n * from the teaserText and use that for the target/href.\n * Custom date is important for being able to control the externallyDisplayedDate used for query lists and personalised search.\n */\n if (itemHasCompanyTag || this.companyNews()) {\n return this.content().teaserText.replace(/<[^>]*>/g, '');\n } else {\n return this.content().url;\n }\n });\n}\n","\n
\n {{ content().teaserTitle }}\n
\n
\n \n \n
\n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { CmsCollection, CmsTeaser } from '@fcom/core-api';\nimport { isNotEmpty, safeMap } from '@fcom/core/utils';\nimport { QuickLink } from '@fcom/ui-components';\nimport { GtmService } from '@fcom/common/gtm';\nimport { ElementTypes } from '@fcom/common';\n\n@Component({\n selector: 'cms-quick-links',\n templateUrl: './cms-quick-links.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsQuickLinksComponent implements OnInit {\n @Input()\n content$: Observable;\n\n links$: Observable;\n\n constructor(private gtmService: GtmService) {}\n\n ngOnInit(): void {\n this.links$ = this.content$.pipe(\n map((content: CmsCollection) => safeMap(content, (c: CmsCollection) => c.items)),\n map((items: CmsTeaser[]) =>\n items.map((item) => ({\n title: item.teaserTitle,\n iconName: item.localSettings?.iconName,\n url: item.target?.url,\n external: item.target?.external,\n }))\n ),\n filter(isNotEmpty),\n distinctUntilChanged()\n );\n }\n\n clickLink(link: QuickLink): void {\n this.gtmService.trackElement(`quick-links: ${link.title}`, 'front-page', ElementTypes.LINK, link.url, 'click');\n }\n}\n","
\n \n \n
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, map } from 'rxjs';\n\nimport { BreadcrumbItem, ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { CmsTemplate } from '@fcom/core-api';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { NavigationMenuService } from '@fcom/common';\nimport { LanguageSelectorContext } from '@fcom/common/components/language-selector/language-selector.component';\n\n@Component({\n selector: 'cms-emergency-in-operations',\n templateUrl: './cms-emergency-in-operations.component.html',\n styleUrl: './cms-emergency-in-operations.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsEmergencyInOperationsComponent implements OnInit {\n readonly currentLanguage$: Observable;\n readonly CustomIcon = CustomIcon;\n readonly ElementTypes = ElementTypes;\n readonly GaContext = GaContext;\n readonly IconLibrary = IconLibrary;\n readonly LANGUAGE_SELECTOR_CONTEXT = LanguageSelectorContext.TOP_NAVI;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n homeLink$: Observable;\n oneworldLink$: Observable;\n\n @Input() template$: Observable;\n\n constructor(\n private navigationMenuService: NavigationMenuService,\n private languageService: LanguageService\n ) {\n this.currentLanguage$ = this.languageService.langKey;\n }\n\n ngOnInit(): void {\n this.homeLink$ = this.languageService.lang.pipe(map((lang): string => `/${lang}`));\n this.oneworldLink$ = this.navigationMenuService.oneworldLink$;\n }\n}\n","\n \n \n\n
\n
\n \n
\n
\n \n\n\n
\n
\n \n
\n
\n","@if (content(); as content) {\n
\n
\n \n \n
\n\n
\n {{ content.teaserTitle }}\n\n
\n \n \n
\n\n \n\n
\n
\n \n\n @if (content.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.EMERGENCY_IN_OPERATIONS_UPDATED)) {\n \n }\n
\n
\n \n
\n
\n\n \n\n
\n

\n\n @for (item of content.related; track item.contentId; let last = $last) {\n @if (item.subjectTaxonomyTags.includes(CmsTaxonomyGeneral.EMERGENCY_IN_OPERATIONS)) {\n \n
\n \n }\n } @empty {}\n\n @if (!content.localSettings.hideChatInfo) {\n \n \n\n @if (emergencyInOperationsTexts.chatAfterText) {\n
{{ emergencyInOperationsTexts.chatAfterText }}\n }\n \n }\n
\n\n @for (item of content.related; track item.contentId; let last = $last) {\n @if (!item.subjectTaxonomyTags.includes(CmsTaxonomyGeneral.EMERGENCY_IN_OPERATIONS)) {\n \n }\n } @empty {}\n
\n
\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit } from '@angular/core';\n\nimport { CustomIcon, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, map } from 'rxjs';\n\nimport { ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { CmsArticle, CmsTaxonomyGeneral } from '@fcom/core-api';\nimport { LanguageService, LocalizationPipe } from '@fcom/ui-translate';\nimport {\n ButtonTheme,\n IconPosition,\n NotificationButtonStyle,\n NotificationLayout,\n NotificationTheme,\n} from '@fcom/ui-components';\n\nimport { SalesforceChatService } from '../../../../chat';\n\n@Component({\n selector: 'fin-emergency-in-operations-article',\n templateUrl: './emergency-in-operations-article.component.html',\n styleUrl: './emergency-in-operations-article.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmergencyInOperationsArticleComponent implements OnInit {\n readonly ButtonTheme = ButtonTheme;\n readonly CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n readonly CustomIcon = CustomIcon;\n readonly ElementTypes = ElementTypes;\n readonly GaContext = GaContext;\n readonly IconPosition = IconPosition;\n readonly NotificationButtonStyle = NotificationButtonStyle;\n readonly NotificationLayout = NotificationLayout;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n homeLink$: Observable;\n publishedText: string;\n updatedText: string;\n emergencyInOperationsTexts: { [key: string]: string };\n\n content = input();\n\n constructor(\n private languageService: LanguageService,\n private chatService: SalesforceChatService,\n private finLocalization: LocalizationPipe\n ) {}\n\n ngOnInit(): void {\n this.homeLink$ = this.languageService.lang.pipe(map((lang): string => `/${lang}`));\n this.publishedText = this.finLocalization.transform('shared.published');\n this.updatedText = this.finLocalization.transform('shared.updated');\n this.emergencyInOperationsTexts = this.finLocalization.transform('emergencyInOp');\n }\n\n /**\n * Use existing openChat$ logic to bypass pre-chat view\n * when element in the article is clicked\n * logic for chat to use Chatbot_FTH on darksite page is done from\n * salesforce chat config service file. (needed to be evaluated prior to\n * page rendering)\n */\n initChat(): void {\n this.chatService.openChat$.next({\n firstName: null,\n lastName: null,\n email: null,\n });\n }\n}\n","\n
0\">\n

{{ content.teaserTitle }}

\n
\n \n \n
\n
\n
\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { map, NEVER, Observable } from 'rxjs';\n\nimport { CmsCollection, CmsTeaser } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-marketing-activity-blocks',\n templateUrl: './cms-marketing-activity-blocks.component.html',\n styleUrls: ['./cms-marketing-activity-blocks.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsMarketingActivityBlocksComponent implements OnInit {\n @Input()\n content$: Observable>;\n\n mappedContent$: Observable>;\n\n readonly NEVER = NEVER;\n\n ngOnInit(): void {\n this.mappedContent$ = this.content$.pipe(\n map((content) => ({\n ...content,\n items: content.items.map((item) => ({\n ...item,\n target: {\n ...item.target,\n title: item.linkText,\n },\n })),\n }))\n );\n }\n}\n","
\n @if (content.teaserTitle) {\n {{\n content.teaserTitle\n }}\n }\n\n @if (content.teaserText && content.contentType === CmsContentType.CMArticle) {\n
\n }\n\n @if (content.media) {\n @for (image of content.media; track image.contentId) {\n
\n \n
\n } @empty {}\n }\n\n @for (item of content.related; track item.contentId) {\n \n } @empty {}\n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { CmsArticle, CmsContentType, CmsTaxonomyGeneral } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-hero-bluewings-cluster',\n templateUrl: './hero-bluewings-cluster.component.html',\n styleUrl: './hero-bluewings-cluster.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HeroBluewingsClusterComponent {\n readonly CmsContentType = CmsContentType;\n readonly CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n\n @Input()\n content: CmsArticle;\n}\n","
\n \n \n \n \n \n \n
\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { Observable } from 'rxjs';\n\nimport { SelectOption } from '../interfaces';\n\n@Component({\n selector: 'fin-simple-select-field',\n styleUrls: ['./simple-select-field.component.scss'],\n templateUrl: './simple-select-field.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SimpleSelectFieldComponent {\n @Input()\n group$: Observable;\n @Input()\n name$: Observable;\n @Input()\n modelName$: Observable;\n @Input()\n label$: Observable;\n @Input()\n options$: Observable;\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport {\n ButtonModule,\n FcomFormsModule,\n HeadersModule,\n IconsModule,\n LoaderModule,\n ModalModule,\n NotificationsModule,\n PromoCardModule,\n QuickLinksModule,\n CarouselModule,\n} from '@fcom/ui-components';\nimport { LightSectionNaviComponent } from '@fcom/common/components/header/light-section-navi/light-section-navi.component';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { SectionNaviComponent } from '@fcom/common/components/header/section-navi/section-navi.component';\nimport { ImagesModule } from '@fcom/common/components/images/images.module';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { GtmModule } from '@fcom/common/gtm';\nimport { PipesModule } from '@fcom/common/pipes';\nimport { ServiceFormsModule } from '@fcom/service-forms';\nimport { CmsDataService } from '@fcom/core/services';\nimport {\n OndMarketingDataService,\n OndMarketingLandingCoreModule,\n OndMarketingOffersService,\n} from '@fcom/ond-marketing-landing-core';\nimport { FinFormsModule } from '@fcom/common/forms';\nimport { DestinationSearchModule } from '@fcom/destination-search';\nimport { MediaQueryService, RecommendationService } from '@fcom/common';\nimport { BookingService } from '@fcom/booking/services';\nimport { BookingWidgetModule } from '@fcom/booking-widget/booking-widget.module';\n\nimport { CmsCtaBigLinkComponent } from './components/cms-cta-big-link.component';\nimport { CtaBigLinkComponent } from './cta-big-link/cta-big-link.component';\nimport { CmsConditionalAccordionComponent } from './conditional-accordion/cms-conditional-accordion.component';\nimport { CmsCtaLinkComponent } from './components/cms-cta-link.component';\nimport { CheapestPricePipe, DecodeURIPipe, OffsetToLocalTimePipe } from '../pipes';\nimport { Cms3DSeatMapService, CmsTemplateService, ExternalTemplateService, NewsletterSignupService } from '../services';\nimport { BlockOfferComponent } from './block-offer/block-offer.component';\nimport { CmsBackLinkComponent } from './components/cms-back-link.component';\nimport { CmsCampaignComponent } from './components/cms-campaign.component';\nimport { CmsCategoryComponent } from './components/cms-category.component';\nimport { CmsCtaWithImageAndTextComponent } from './components/cms-cta-with-image-and-text.component';\nimport { CmsDescriptiveLinkListComponent } from './components/cms-descriptive-link-list.component';\nimport { CmsDestinationHeroComponent } from './components/cms-destination-hero.component';\nimport { CmsDiscoverNowComponent } from './components/cms-discover-now.component';\nimport { CmsDisruptionsComponent } from './components/cms-disruptions.component';\nimport { CmsExternalLinkComponent } from './components/cms-external-link.component';\nimport { CmsFooterComponent } from './components/cms-footer.component';\nimport { CmsImportantLinksComponent } from './components/cms-important-links.component';\nimport { CmsUniqueSellingPointComponent } from './components/cms-unique-selling-point.component';\nimport { CmsLinkBlockComponent } from './components/cms-link-block.component';\nimport { CmsLinkListWithIconsComponent } from './components/cms-link-list-with-icons.component';\nimport { CmsListWithIconsComponent } from './components/cms-list-with-icons.component';\nimport { CmsOffersGridComponent } from './components/cms-offers-grid.component';\nimport { CmsPageComponent } from './components/cms-page.component';\nimport { CmsRichTextComponent } from './components/cms-rich-text.component';\nimport { CmsOndMarketingOffersComponent } from './components/cms-ond-marketing-offers.component';\nimport { CmsOndMarketingOffersListComponent } from './components/cms-ond-marketing-offers-list.component';\nimport { CmsOndMarketingCrossLinkingComponent } from './components/cms-ond-marketing-cross-linking.component';\nimport { CmsTeaserComponent } from './components/cms-teaser.component';\nimport { CmsTextOnImageComponent } from './components/cms-text-on-image.component';\nimport { CmsTravelGuideComponent } from './components/cms-travel-guide.component';\nimport { CmsTextWithSideImageComponent } from './components/cms-text-with-side-image.component';\nimport { ContinueReadingComponent } from './continue-reading/continue-reading.component';\nimport { CtaWithImageAndTextComponent } from './cta-with-image-and-text/cta-with-image-and-text.component';\nimport { DestinationHeroComponent } from './destination/destination-hero/destination-hero.component';\nimport { DestinationCategoryHeroComponent } from './destination/destination-category-hero/destination-category-hero.component';\nimport { DynamicRouteComponent } from './dynamic';\nimport { CmsEditorialCategoryPageComponent } from './dynamic/cms-editorial-category-page.component';\nimport { EditorialPageHeadComponent } from './editorial/editorial-page-head/editorial-page-head.component';\nimport { EditorialCategoryComponent } from './editorial/editorial-category/editorial-category.component';\nimport { CmsEditorialMainPageComponent } from './dynamic/cms-editorial-main-page.component';\nimport { CmsBluewingsClusterPageComponent } from './dynamic/cms-bluewings-cluster-page.component';\nimport { CmsBluewingsMainPageComponent } from './dynamic/cms-bluewings-main-page.component';\nimport { CmsChildPageComponent } from './dynamic/cms-child-page.component';\nimport { CmsExternalPageRendererComponent } from './dynamic/external-page-renderer';\nimport { CmsDestinationComponent } from './dynamic/cms-destination.component';\nimport { CmsJsonContentComponent } from './dynamic/cms-json-content/cms-json-content.component';\nimport { RenderLazyComponent } from './dynamic/cms-json-content/render-lazy-component.component';\nimport { ExternalLinkComponent } from './external-link/external-link.component';\nimport { FooterOfferComponent } from './footer-offer/footer-offer.component';\nimport { LinkBlockComponent } from './link-block/link-block.component';\nimport { OfferDetailsComponent } from './offers/offer-details.component';\nimport { OfferGridComponent } from './offers/offer-grid.component';\nimport { RichTextComponent } from './rich-text/rich-text.component';\nimport { TextOnImageComponent } from './text-on-image/text-on-image.component';\nimport { TextOnImageNoLinkComponent } from './text-on-image-no-link/text-on-image-no-link.component';\nimport { TravelGuideComponent } from './travel-guides';\nimport { TravelGuidePhrasesComponent } from './travel-guides/travel-guide-phrases.component';\nimport { VideoComponent } from './video/video.component';\nimport { CmsDisclaimerComponent } from './components/cms-disclaimer.component';\nimport { CmsShowMoreComponent } from './continue-reading/cms-show-more.component';\nimport { CmsAccordionComponent } from './accordion/cms-accordion.component';\nimport { CmsContentSwitcherDropdownComponent } from './content-switcher-dropdown/cms-content-switcher-dropdown.component';\nimport { CmsBadgeComponent } from './components/cms-badge/cms-badge.component';\nimport { CmsContentSwitcherTabsComponent } from './components/content-switcher-tabs/cms-content-switcher-tabs.component';\nimport { TextLinkComponent } from './text-link/text-link.component';\nimport { CmsTextLinkComponent } from './components/cms-text-link.component';\nimport { IconWithTextComponent } from './icon-with-text/icon-with-text.component';\nimport { CmsIconWithTextComponent } from './components/cms-icon-with-text.component';\nimport { BookingEntryComponent } from './booking-entry';\nimport { ContentComponentsModule } from './content-components.module';\nimport { TeaserListComponent } from './teaser/teaser-list/teaser-list.component';\nimport { TeaserComponent } from './teaser/teaser/teaser.component';\nimport { TeaserCardComponent } from './teaser/teaser-card/teaser-card.component';\nimport { AuthorComponent } from './article/author/author.component';\nimport { DateComponent } from './article/date/date.component';\nimport { DetailTextComponent } from './article/detail-text/detail-text.component';\nimport { RelatedTeaserComponent } from './article/related-teaser/related-teaser.component';\nimport { TagComponent } from './article/tags/tags.component';\nimport { ContentServicesModule } from '../services/content-services.module';\nimport { SocialComponent } from './article/social/social.component';\nimport { ArticleBluewingsComponent } from './dynamic/article-bluewings.component';\nimport { ArticleChildComponent } from './dynamic/article-child.component';\nimport { CmsBookNowComponent } from './components/cms-book-now.component';\nimport { InformationalTeaserComponent } from './teaser/informational-teaser/informational-teaser.component';\nimport { CmsListWithHeadingComponent } from './components/cms-list-with-heading.component';\nimport { TravelRestrictionsModule } from './placeholders/travel-restrictions/travel-restrictions.module';\nimport { CmsFullWidthBookingWidgetComponent } from './components/cms-full-width-booking-widget/cms-full-width-booking-widget.component';\nimport { HorizontalTitleComponent } from './horizontal-title/horizontal-title.component';\nimport { CmsArticleCollectionComponent } from './article-collection/cms-article-collection.component';\nimport { CmsHeadingTagComponent } from './cms-heading-tag/cms-heading-tag.component';\nimport { TrendingDestinationsComponent } from './trending-destinations-grid/trending-destinations-grid.component';\nimport { RenderLazyWizardComponent } from './dynamic/render-lazy-wizard.component';\nimport { NewsletterSignupFormComponent } from './placeholders/newsletter-signup-form/newsletter-signup-form.component';\nimport { DynamicHtmlComponent } from './dynamic/dynamic-html.component';\nimport { CmsArticlesWithIconsComponent } from './components/cms-articles-with-icons.component';\nimport { CmsGlobalDisruptionBannerComponent } from './components/cms-global-disruption-banner.component';\nimport { QualtricsEmbeddedPageFeedbackComponent } from './qualtrics-embedded-page-feedback/qualtrics-embedded-page-feedback.component';\nimport { TextLinkLeftComponent } from './teaser/text-link-left/text-link-left.component';\nimport { CmsCmrelatedComponent } from './components/cms-cmrelated.component';\nimport { CmsArrowLinkListComponent } from './components/cms-arrow-link-list.component';\nimport { NewsFeedItemComponent } from './news-feed-item/news-feed-item.component';\nimport { CmsQuickLinksComponent } from './components/cms-quick-links.component';\nimport { CmsEmergencyInOperationsComponent } from './dynamic/cms-emergency-in-operations.component';\nimport { EmergencyInOperationsArticleComponent } from './components/emergency-in-operations-article/emergency-in-operations-article.component';\nimport { CmsMarketingActivityBlocksComponent } from './components/cms-marketing-activity-blocks.component';\nimport { HeroBluewingsClusterComponent } from './dynamic/hero-bluewings-cluster.component';\n\nconst PRIVATE_PARTS = [\n BlockOfferComponent,\n DestinationHeroComponent,\n DestinationCategoryHeroComponent,\n CmsFullWidthBookingWidgetComponent,\n ExternalLinkComponent,\n FooterOfferComponent,\n OfferDetailsComponent,\n OfferGridComponent,\n TravelGuideComponent,\n TravelGuidePhrasesComponent,\n ContinueReadingComponent,\n RichTextComponent,\n VideoComponent,\n TextOnImageNoLinkComponent,\n TextOnImageComponent,\n CtaWithImageAndTextComponent,\n LinkBlockComponent,\n TextLinkComponent,\n CtaBigLinkComponent,\n IconWithTextComponent,\n TeaserComponent,\n TeaserCardComponent,\n AuthorComponent,\n DateComponent,\n DetailTextComponent,\n RelatedTeaserComponent,\n TagComponent,\n SocialComponent,\n HorizontalTitleComponent,\n CmsHeadingTagComponent,\n RenderLazyComponent,\n RenderLazyWizardComponent,\n TextLinkLeftComponent,\n CmsEmergencyInOperationsComponent,\n CmsMarketingActivityBlocksComponent,\n];\n\n@NgModule({\n imports: [\n ButtonModule,\n HeadersModule,\n CommonModule,\n ComponentsModule,\n DirectiveModule,\n GtmModule,\n ImagesModule,\n PipesModule,\n FinFormsModule,\n FcomFormsModule,\n IconsModule,\n OndMarketingLandingCoreModule,\n ServiceFormsModule,\n UiTranslateModule,\n ContentComponentsModule,\n ContentServicesModule.forRoot(),\n DestinationSearchModule,\n NotificationsModule,\n TravelRestrictionsModule,\n LoaderModule,\n ModalModule,\n BookingWidgetModule,\n QuickLinksModule,\n CarouselModule,\n PromoCardModule,\n ],\n declarations: [\n CmsAccordionComponent,\n CmsConditionalAccordionComponent,\n CmsBadgeComponent,\n CmsCategoryComponent,\n CmsDestinationHeroComponent,\n CmsFullWidthBookingWidgetComponent,\n CmsExternalLinkComponent,\n CmsJsonContentComponent,\n CmsDestinationComponent,\n CmsEditorialMainPageComponent,\n CmsBluewingsClusterPageComponent,\n CmsBluewingsMainPageComponent,\n CmsChildPageComponent,\n CmsEditorialCategoryPageComponent,\n EditorialCategoryComponent,\n EditorialPageHeadComponent,\n CmsExternalPageRendererComponent,\n CmsOffersGridComponent,\n CmsListWithHeadingComponent,\n CmsPageComponent,\n CmsFooterComponent,\n CmsRichTextComponent,\n CmsCtaBigLinkComponent,\n CmsShowMoreComponent,\n CmsTeaserComponent,\n CmsBackLinkComponent,\n CmsDisclaimerComponent,\n CmsTravelGuideComponent,\n CmsOndMarketingOffersComponent,\n CmsOndMarketingOffersListComponent,\n CmsOndMarketingCrossLinkingComponent,\n DynamicRouteComponent,\n CmsTextOnImageComponent,\n CmsTextLinkComponent,\n CmsImportantLinksComponent,\n CmsUniqueSellingPointComponent,\n CmsDisruptionsComponent,\n CmsDiscoverNowComponent,\n CmsCampaignComponent,\n CmsCtaWithImageAndTextComponent,\n CmsLinkBlockComponent,\n CmsLinkListWithIconsComponent,\n CmsListWithIconsComponent,\n CmsDescriptiveLinkListComponent,\n CmsContentSwitcherDropdownComponent,\n CmsContentSwitcherTabsComponent,\n TeaserListComponent,\n ArticleBluewingsComponent,\n HeroBluewingsClusterComponent,\n ArticleChildComponent,\n CmsBookNowComponent,\n InformationalTeaserComponent,\n QualtricsEmbeddedPageFeedbackComponent,\n ...PRIVATE_PARTS,\n DecodeURIPipe,\n CheapestPricePipe,\n OffsetToLocalTimePipe,\n SectionNaviComponent,\n LightSectionNaviComponent,\n CmsIconWithTextComponent,\n CmsCtaLinkComponent,\n CmsTextWithSideImageComponent,\n BookingEntryComponent,\n CmsArticleCollectionComponent,\n TrendingDestinationsComponent,\n NewsletterSignupFormComponent,\n DynamicHtmlComponent,\n CmsArticlesWithIconsComponent,\n CmsGlobalDisruptionBannerComponent,\n CmsCmrelatedComponent,\n CmsArrowLinkListComponent,\n NewsFeedItemComponent,\n CmsQuickLinksComponent,\n EmergencyInOperationsArticleComponent,\n ],\n exports: [\n CmsBadgeComponent,\n CmsCategoryComponent,\n CmsDestinationHeroComponent,\n CmsFullWidthBookingWidgetComponent,\n CmsExternalLinkComponent,\n CmsJsonContentComponent,\n CmsDestinationComponent,\n CmsEditorialMainPageComponent,\n CmsBluewingsClusterPageComponent,\n CmsBluewingsMainPageComponent,\n CmsChildPageComponent,\n CmsEditorialCategoryPageComponent,\n EditorialCategoryComponent,\n EditorialPageHeadComponent,\n CmsExternalPageRendererComponent,\n CmsOffersGridComponent,\n CmsListWithHeadingComponent,\n CmsPageComponent,\n CmsFooterComponent,\n CmsRichTextComponent,\n CmsCtaBigLinkComponent,\n CmsShowMoreComponent,\n CmsTeaserComponent,\n CmsBackLinkComponent,\n CmsTravelGuideComponent,\n CmsOndMarketingOffersComponent,\n CmsOndMarketingOffersListComponent,\n CmsOndMarketingCrossLinkingComponent,\n DynamicRouteComponent,\n CmsTextOnImageComponent,\n CmsTextLinkComponent,\n CmsCtaWithImageAndTextComponent,\n CmsLinkBlockComponent,\n CmsLinkListWithIconsComponent,\n CmsListWithIconsComponent,\n CmsDescriptiveLinkListComponent,\n CmsContentSwitcherDropdownComponent,\n CmsContentSwitcherTabsComponent,\n CmsImportantLinksComponent,\n CmsUniqueSellingPointComponent,\n CmsDisruptionsComponent,\n CmsDiscoverNowComponent,\n CmsCampaignComponent,\n SectionNaviComponent,\n LightSectionNaviComponent,\n CmsIconWithTextComponent,\n CmsCtaLinkComponent,\n CmsTextWithSideImageComponent,\n BookingEntryComponent,\n TeaserListComponent,\n ArticleBluewingsComponent,\n HeroBluewingsClusterComponent,\n ArticleChildComponent,\n CmsBookNowComponent,\n InformationalTeaserComponent,\n QualtricsEmbeddedPageFeedbackComponent,\n CmsArticleCollectionComponent,\n TrendingDestinationsComponent,\n NewsletterSignupFormComponent,\n DynamicHtmlComponent,\n CmsArticlesWithIconsComponent,\n CmsGlobalDisruptionBannerComponent,\n CmsCmrelatedComponent,\n CmsArrowLinkListComponent,\n NewsFeedItemComponent,\n CmsQuickLinksComponent,\n EmergencyInOperationsArticleComponent,\n ],\n})\nexport class CmsModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: CmsModule,\n providers: [\n BookingService,\n CmsDataService,\n CmsTemplateService,\n OndMarketingOffersService,\n OndMarketingDataService,\n ExternalTemplateService,\n MediaQueryService,\n RecommendationService,\n Cms3DSeatMapService,\n NewsletterSignupService,\n ],\n };\n }\n}\n","import { Observable } from 'rxjs';\n\nimport { FinnairPassengerItem } from '@fcom/dapi/api/models';\n\nexport interface OrderDataForNative {\n recloc: string;\n travelers?: FinnairPassengerItem[];\n rawBooking: any;\n}\n\nexport interface CheckInStatus {\n status: boolean;\n}\n\nexport interface CheckInResult extends CheckInStatus {\n travelerIds: string[];\n flightIds: string[];\n}\n\nexport abstract class NativeBridgeService {\n abstract init(): void;\n\n abstract setAppHideStatus(status: boolean): void;\n\n abstract urlForAddAJourneyInApp(recloc: string, lastName: string): string;\n\n abstract openNativeMenu(): void;\n\n abstract onShowHamburgerMenu(isOpen: boolean): void;\n\n abstract onBackPressed(): void;\n\n abstract clientReady(): void;\n\n abstract addBooking(booking: OrderDataForNative): void;\n\n abstract onAcceptCheckIn(data: CheckInResult): void;\n\n abstract onCheckInLoaded(data: CheckInStatus): void;\n\n abstract get appHideStatus(): Observable;\n\n abstract get isInsideNativeWebView(): boolean;\n\n abstract get isInsideNativeiOSWebView(): boolean;\n\n abstract get isInsideNativeAndroidWebView(): boolean;\n\n abstract get isLocalView(): boolean;\n\n abstract get backButtonPressed(): Observable;\n\n abstract get isHamburgerMenuVisible(): Observable;\n}\n","

\n {{ 'travelGuide' | finLocalization }}\n {{ outputContent$ | finMap: 'title' | async }}\n

\n\n\n\n
\n \n
\n\n\n \n\n\n\n \n\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { CmsContentType } from '@fcom/core-api';\nimport { finShare, safeMap } from '@fcom/rx';\n\nimport { Media, MediaPicture, MediaType, MediaVideo, PhraseGroup, TravelGuide } from '../../interfaces';\nimport { removeEmptyCmsText } from '../../services/cms-utils/cms-utils';\n\nconst isVideo = (o: Media): o is MediaVideo => o.type === 'video' && !!o.url;\n\nconst extractMedia: (data: any) => Media = (data = {}) => {\n if (!data.media) {\n return;\n }\n\n const video = data.media.find((m) => m.contentType === CmsContentType.CMVideo);\n const picture = data.media.find((m) => m.contentType === CmsContentType.CMPicture);\n\n if (video) {\n return {\n type: 'video',\n url: video.dataUrl,\n } as MediaVideo;\n } else if (picture) {\n return {\n type: 'picture',\n picture,\n } as MediaPicture;\n }\n};\n\nconst mapTravelGuide: (data: TravelGuide) => TravelGuide = (data) => ({\n ...data,\n title: data.teaserTitle,\n text: removeEmptyCmsText(data.detailText),\n media: extractMedia(data),\n localSettings: data.localSettings || {},\n});\n\n@Component({\n selector: 'fin-travel-guide',\n templateUrl: './travel-guide.component.html',\n styleUrls: ['./travel-guide.component.scss'],\n})\nexport class TravelGuideComponent implements OnInit {\n @Input()\n content$: Observable;\n @Input()\n showLabel: boolean;\n @Input()\n showHeading: boolean;\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n\n outputContent$: Observable;\n text$: Observable;\n videoUrl$: Observable;\n phraseGroups$: Observable;\n mediaType$: Observable;\n\n ngOnInit(): void {\n this.outputContent$ = this.content$.pipe(map(mapTravelGuide));\n this.mediaType$ = this.outputContent$.pipe(\n safeMap((content) => content.media),\n safeMap((media) => media.type)\n );\n\n this.text$ = this.outputContent$.pipe(\n safeMap(({ text }) => text),\n finShare()\n );\n\n this.videoUrl$ = this.outputContent$.pipe(\n safeMap((content) => content.media),\n filter((media) => isVideo(media)),\n safeMap((media: MediaVideo) => media.url)\n );\n\n this.phraseGroups$ = this.outputContent$.pipe(\n safeMap((tg: TravelGuide) => tg.localSettings),\n safeMap((ls) => ls.commonPhrases)\n );\n }\n}\n","import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n","import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param value The `next` value.\n */\n next(value: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param err The `error` exception.\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as ((value: T) => void) | undefined,\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent.\n * @param subscriber The stopped subscriber.\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n","\n
\n
\n \n \n
\n \n
\n {{ disclaimer.target.teaserTitle }}\n
\n
\n \n
\n
\n
\n
\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { CmsDisclaimer } from '@fcom/core-api/interfaces';\n\n@Component({\n selector: 'fin-disclaimer',\n templateUrl: 'disclaimer.component.html',\n styleUrls: ['disclaimer.component.scss'],\n})\nexport class DisclaimerComponent implements OnInit {\n @Input()\n disclaimer: CmsDisclaimer;\n\n backgroundColor: string;\n\n ngOnInit(): void {\n this.backgroundColor = this.disclaimer.backgroundColor\n ? `${this.disclaimer.backgroundColor}-bg`\n : 'nordic-blue-50-bg';\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { PopoverComponent } from './component/popover.component';\nimport { PopoverDirective } from './directive/popover.directive';\nimport { FocusOutDirectiveModule } from '../../directives/focus-out/focus-out.directive.module';\nimport { TrapFocusModule } from '../../directives/trap-focus';\n\n@NgModule({\n declarations: [PopoverComponent, PopoverDirective],\n imports: [CommonModule, IconsModule, FocusOutDirectiveModule, TrapFocusModule],\n exports: [PopoverComponent, PopoverDirective],\n})\nexport class PopoverModule {}\n","import { MonoTypeOperatorFunction, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\n\n/**\n * Emits the values emitted by the source Observable until a `notifier`\n * Observable emits a value.\n *\n * Lets values pass until a second Observable,\n * `notifier`, emits a value. Then, it completes.\n *\n * ![](takeUntil.png)\n *\n * `takeUntil` subscribes and begins mirroring the source Observable. It also\n * monitors a second Observable, `notifier` that you provide. If the `notifier`\n * emits a value, the output Observable stops mirroring the source Observable\n * and completes. If the `notifier` doesn't emit any value and completes\n * then `takeUntil` will pass all values.\n *\n * ## Example\n *\n * Tick every second until the first click happens\n *\n * ```ts\n * import { interval, fromEvent, takeUntil } from 'rxjs';\n *\n * const source = interval(1000);\n * const clicks = fromEvent(document, 'click');\n * const result = source.pipe(takeUntil(clicks));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link take}\n * @see {@link takeLast}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @param notifier The `ObservableInput` whose first emitted value will cause the output\n * Observable of `takeUntil` to stop emitting values from the source Observable.\n * @return A function that returns an Observable that emits the values from the\n * source Observable until `notifier` emits its first value.\n */\nexport function takeUntil(notifier: ObservableInput): MonoTypeOperatorFunction {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n","import { Directive, ElementRef, OnInit, OnDestroy } from '@angular/core';\n\nimport { Subscription, fromEvent } from 'rxjs';\n\nimport { unsubscribe, KeyCodes, isKeyboardEvent, safeMap } from '@fcom/core/utils';\n\n@Directive({\n selector: '[finPhoneNumberMask]',\n})\nexport class PhoneNumberMaskDirective implements OnInit, OnDestroy {\n private subscription: Subscription;\n\n constructor(private element: ElementRef) {}\n\n ngOnInit(): void {\n this.subscription = new Subscription();\n\n this.addKeyPressEvent();\n this.addPasteEvent();\n }\n\n addKeyPressEvent(): void {\n this.subscription.add(\n fromEvent(this.element.nativeElement.querySelector('input'), 'keypress').subscribe((event: KeyboardEvent) => {\n if (isKeyboardEvent(event, KeyCodes.SPACE)) {\n event.preventDefault();\n }\n })\n );\n }\n\n addPasteEvent(): void {\n this.subscription.add(\n fromEvent(this.element.nativeElement.querySelector('input'), 'paste').subscribe((event: ClipboardEvent) => {\n const text =\n safeMap(\n event,\n (e: ClipboardEvent) => e.clipboardData,\n (d: DataTransfer) => d.getData('text/plain')\n ) || '';\n event.preventDefault();\n (event.target as HTMLInputElement).value = text.replace(/ /g, '');\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n}\n","/* tslint:disable:no-empty */\nexport function noop() { }\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CancelAndRefundRequest } from '../models/cancel-and-refund-request';\nimport { EmailSenderOrderRequest } from '../models/email-sender-order-request';\nimport { FetchOrderRequest } from '../models/fetch-order-request';\nimport { FinnairBoardingPassDocumentType } from '../models/finnair-boarding-pass-document-type';\nimport { FinnairOrder } from '../models/finnair-order';\nimport { FinnairOrderCancelRefund } from '../models/finnair-order-cancel-refund';\nimport { FinnairOrderPreviewsResponse } from '../models/finnair-order-previews-response';\nimport { FinnairPassengerRequest } from '../models/finnair-passenger-request';\nimport { FinnairServiceRequestItem } from '../models/finnair-service-request-item';\nimport { RequestInitiator } from '../models/request-initiator';\n\n\n/**\n * Booking list for finnair plus user\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class OrderService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation initializeCheckoutV2\n */\n static readonly InitializeCheckoutV2Path = '/api/v2/checkout/initialize';\n\n /**\n * initializeCheckoutV2.\n *\n * Initialize the checkout process\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `initializeCheckoutV2()` instead.\n *\n * This method doesn't expect any request body.\n */\n initializeCheckoutV2$Response(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n orderChangeId?: string;\n locale?: string;\n hash?: string;\n 'True-Client-IP'?: string;\n 'X-Forwarded-For'?: string;\n device?: string;\n service?: string;\n successUrl: string;\n failureUrl: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.InitializeCheckoutV2Path, 'post');\n\n if (params) {\n rb.query('cartId', params.cartId, {});\n rb.query('orderId', params.orderId, {});\n rb.query('orderChangeId', params.orderChangeId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.header('True-Client-IP', params['True-Client-IP'], {});\n rb.header('X-Forwarded-For', params['X-Forwarded-For'], {});\n rb.query('device', params.device, {});\n rb.query('service', params.service, {});\n rb.query('successUrl', params.successUrl, {});\n rb.query('failureUrl', params.failureUrl, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * initializeCheckoutV2.\n *\n * Initialize the checkout process\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `initializeCheckoutV2$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n initializeCheckoutV2(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n orderChangeId?: string;\n locale?: string;\n hash?: string;\n 'True-Client-IP'?: string;\n 'X-Forwarded-For'?: string;\n device?: string;\n service?: string;\n successUrl: string;\n failureUrl: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.initializeCheckoutV2$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation fetchOrderPreviews\n */\n static readonly FetchOrderPreviewsPath = '/api/v2/order-previews';\n\n /**\n * fetchOrderPreviews.\n *\n * API public; Fetch order previews content secured by hash\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fetchOrderPreviews()` instead.\n *\n * This method doesn't expect any request body.\n */\n fetchOrderPreviews$Response(rootUrl: string, params?: {\n locale?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.FetchOrderPreviewsPath, 'get');\n\n if (params) {\n rb.query('locale', params.locale, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * fetchOrderPreviews.\n *\n * API public; Fetch order previews content secured by hash\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `fetchOrderPreviews$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fetchOrderPreviews(rootUrl: string, params?: {\n locale?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.fetchOrderPreviews$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairOrderPreviewsResponse)\n );\n }\n\n /**\n * Path part for operation fetchOrderByEmailSenderOrderRequest1\n */\n static readonly FetchOrderByEmailSenderOrderRequest1Path = '/api/v2/order/email-sender';\n\n /**\n * fetchOrderByEmailSenderOrderRequest.\n *\n * Deprecated endpoint, use the private endpoint instead using sig4 signature\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fetchOrderByEmailSenderOrderRequest1()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n *\n * @deprecated\n */\n fetchOrderByEmailSenderOrderRequest1$Response(rootUrl: string, params: {\n body: EmailSenderOrderRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.FetchOrderByEmailSenderOrderRequest1Path, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * fetchOrderByEmailSenderOrderRequest.\n *\n * Deprecated endpoint, use the private endpoint instead using sig4 signature\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `fetchOrderByEmailSenderOrderRequest1$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n *\n * @deprecated\n */\n fetchOrderByEmailSenderOrderRequest1(rootUrl: string, params: {\n body: EmailSenderOrderRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.fetchOrderByEmailSenderOrderRequest1$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairOrder)\n );\n }\n\n /**\n * Path part for operation getOrderByPnrAndLastName\n */\n static readonly GetOrderByPnrAndLastNamePath = '/api/v2/order/get-order';\n\n /**\n * getOrderByPnrAndLastName.\n *\n * Gets URL to fetch Order. Uses record locator or e-ticket number, and lastname, optionally first name, as input. Url to fetch the order is part of the Location header\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getOrderByPnrAndLastName()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n getOrderByPnrAndLastName$Response(rootUrl: string, params: {\n body: FetchOrderRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.GetOrderByPnrAndLastNamePath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getOrderByPnrAndLastName.\n *\n * Gets URL to fetch Order. Uses record locator or e-ticket number, and lastname, optionally first name, as input. Url to fetch the order is part of the Location header\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getOrderByPnrAndLastName$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n getOrderByPnrAndLastName(rootUrl: string, params: {\n body: FetchOrderRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.getOrderByPnrAndLastName$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation getOrderByTourOperatorAndLastName\n */\n static readonly GetOrderByTourOperatorAndLastNamePath = '/api/v2/order/get-order-tour-operator';\n\n /**\n * getOrderByTourOperatorIdAndLastName.\n *\n * Get order with Tour Operator ID and last name for manage my booking\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getOrderByTourOperatorAndLastName()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n getOrderByTourOperatorAndLastName$Response(rootUrl: string, params: {\n body: FetchOrderRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.GetOrderByTourOperatorAndLastNamePath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getOrderByTourOperatorIdAndLastName.\n *\n * Get order with Tour Operator ID and last name for manage my booking\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getOrderByTourOperatorAndLastName$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n getOrderByTourOperatorAndLastName(rootUrl: string, params: {\n body: FetchOrderRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.getOrderByTourOperatorAndLastName$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation fetchOrder\n */\n static readonly FetchOrderPath = '/api/v2/order/{orderId}';\n\n /**\n * fetchOrder.\n *\n * API public; Fetch order content secured by hash\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fetchOrder()` instead.\n *\n * This method doesn't expect any request body.\n */\n fetchOrder$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n includeServiceCatalog?: boolean;\n includedBoardingPassTypes?: Array;\n requestInitiator?: RequestInitiator;\n includePredictions?: boolean;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.FetchOrderPath, 'get');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.query('includeServiceCatalog', params.includeServiceCatalog, {});\n rb.query('includedBoardingPassTypes', params.includedBoardingPassTypes, {});\n rb.query('requestInitiator', params.requestInitiator, {});\n rb.query('includePredictions', params.includePredictions, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * fetchOrder.\n *\n * API public; Fetch order content secured by hash\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `fetchOrder$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fetchOrder(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n includeServiceCatalog?: boolean;\n includedBoardingPassTypes?: Array;\n requestInitiator?: RequestInitiator;\n includePredictions?: boolean;\n },\n context?: HttpContext\n\n): Observable {\n return this.fetchOrder$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairOrder)\n );\n }\n\n /**\n * Path part for operation updatePassengerDetails\n */\n static readonly UpdatePassengerDetailsPath = '/api/v2/order/{orderId}/passengers';\n\n /**\n * updatePassengerDetailsOrder.\n *\n * add/modify/delete details into order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `updatePassengerDetails()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updatePassengerDetails$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: FinnairPassengerRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.UpdatePassengerDetailsPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * updatePassengerDetailsOrder.\n *\n * add/modify/delete details into order\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `updatePassengerDetails$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updatePassengerDetails(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: FinnairPassengerRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.updatePassengerDetails$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation confirmCancelAndRefund\n */\n static readonly ConfirmCancelAndRefundPath = '/api/v2/order/{orderId}/refund/confirm';\n\n /**\n * confirmCancelAndRefund.\n *\n * API public; Confirms cancel and refund\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `confirmCancelAndRefund()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n confirmCancelAndRefund$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: CancelAndRefundRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.ConfirmCancelAndRefundPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * confirmCancelAndRefund.\n *\n * API public; Confirms cancel and refund\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `confirmCancelAndRefund$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n confirmCancelAndRefund(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: CancelAndRefundRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.confirmCancelAndRefund$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairOrderCancelRefund)\n );\n }\n\n /**\n * Path part for operation fetchOrderCancelRefund\n */\n static readonly FetchOrderCancelRefundPath = '/api/v2/order/{orderId}/refund/informative';\n\n /**\n * fetchOrderCancelRefund.\n *\n * API public; Fetch order content with cancel refund information\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fetchOrderCancelRefund()` instead.\n *\n * This method doesn't expect any request body.\n */\n fetchOrderCancelRefund$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.FetchOrderCancelRefundPath, 'get');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * fetchOrderCancelRefund.\n *\n * API public; Fetch order content with cancel refund information\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `fetchOrderCancelRefund$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fetchOrderCancelRefund(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.fetchOrderCancelRefund$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairOrderCancelRefund)\n );\n }\n\n /**\n * Path part for operation setServices\n */\n static readonly SetServicesPath = '/api/v2/order/{orderId}/services';\n\n /**\n * manageServicesToOrder.\n *\n * Adds/Removes/Updates services to the order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `setServices()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n setServices$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: Array\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OrderService.SetServicesPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * manageServicesToOrder.\n *\n * Adds/Removes/Updates services to the order\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `setServices$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n setServices(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: Array\n },\n context?: HttpContext\n\n): Observable {\n return this.setServices$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n}\n","/*\n * IF YOU UPDATE THIS, BE SURE TO UPDATE cfg/README.md too\n */\n\n/*\n * For increased security, the overrides should only be allowed for parameters that\n * are necessary to be changed for preview environments.\n */\n\nimport { JsConfig } from '@fcom/core/interfaces';\n\nimport { getPreviewCmsUrl } from './cmsPreviewUrls';\nimport { getRunTimeConfigOverrides } from './runtimeConfig';\n\nlet versionInfo;\n// Import version information\ntry {\n versionInfo = require('../../../../target/version.json');\n} catch (e) {\n versionInfo = undefined;\n}\n\nconst jsConfigOverride: Partial = {\n versionInfo,\n};\n\nif (process.env.ENV) {\n // Default environment is local\n const processEnv = process.env.ENV || 'local';\n const overrides = getRunTimeConfigOverrides(processEnv);\n\n if (overrides) {\n jsConfigOverride.cmsEnv = overrides.cmsEnv;\n jsConfigOverride.isCmsPreview = overrides.cmsEnv?.indexOf('preview') !== -1;\n jsConfigOverride.enableCorsCredentials = jsConfigOverride.isCmsPreview;\n jsConfigOverride.sentryEnv = overrides.sentryEnv;\n jsConfigOverride.indexHtml = overrides.indexHtml;\n\n const previewUrl = getPreviewCmsUrl(jsConfigOverride.cmsEnv);\n if (previewUrl) {\n jsConfigOverride.cmsUrl = previewUrl;\n }\n }\n}\n\n/* Ensure that the values are not overwritten by undefined */\nObject.keys(jsConfigOverride).forEach((key) => {\n if (typeof jsConfigOverride[key] === 'undefined') {\n delete jsConfigOverride[key];\n }\n});\n\nexport { jsConfigOverride };\n","import { JsConfig } from '@fcom/core';\n\nexport const getRunTimeConfigOverrides = (environment: string): Partial => {\n if (environment.indexOf('-preview') !== -1) {\n return {\n buildEnv: environment,\n indexHtml: 'index-preview.html',\n sentryEnv: environment,\n cmsEnv: environment.replace('-', '_'),\n };\n }\n\n return undefined;\n};\n","export const getPreviewCmsUrl = (environment: string) => {\n switch (environment) {\n case 'fake':\n return 'http://localhost.finnair.com:5000/fake-cms';\n case 'dev_preview':\n case 'test_preview':\n return 'https://test-preview.coremedia.dev.app.finnair.com';\n case 'preprod_preview':\n return 'https://preprod-preview.coremedia.preprod.app.finnair.com';\n case 'staging_preview':\n case 'prod_preview':\n return 'https://prod-preview.coremedia.prod.app.finnair.com';\n default:\n return undefined;\n }\n};\n","import { Observable } from 'rxjs';\nimport { filter, distinctUntilChanged, map, switchMap } from 'rxjs/operators';\n\nimport { getIn, isPresent, isTruthy } from '@fcom/core/utils';\nimport { safeMap } from '@fcom/rx';\n\nimport { BaseState, DdsLanguage, LanguageState } from '../interfaces';\nimport { ddsLanguages } from './dds-languages';\n\nconst DEFAULT_LANG: DdsLanguage = { countrySite: 'INT', language: 'GB' };\n\nconst mapToDdsLanguage = (localeValue: string): DdsLanguage => ddsLanguages[localeValue] || DEFAULT_LANG;\n\n/**\n * Selects the current language from the state$, e.g., fi-fi, en\n */\nexport const language =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n safeMap((s: BaseState) => s.language),\n safeMap((s: LanguageState) => s.value),\n filter((s) => isTruthy(s)),\n distinctUntilChanged()\n );\n\n/**\n * Selects the current locale from the state$, e.g., fi_FI, en_GB\n */\nexport const locale =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n safeMap((s: BaseState) => s.language),\n safeMap((s: LanguageState) => s.locale),\n filter((s) => isTruthy(s)),\n distinctUntilChanged()\n );\n\n/**\n * Selects the current dds language from the state$, e.g., { countrySite: 'en', language: 'gb' }\n */\nexport const ddsLanguage =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n safeMap((s: BaseState) => s.language),\n safeMap((s: LanguageState) => s.locale),\n filter(isTruthy),\n map(mapToDdsLanguage),\n distinctUntilChanged()\n );\n\n/**\n * Selects to localization by the given language\n * @param lang the language key\n */\nexport const localization =\n (lang: string) =>\n (state$: Observable): Observable =>\n state$.pipe(\n safeMap((s: BaseState) => s.language),\n safeMap((s: LanguageState) => s.localizations),\n distinctUntilChanged(),\n safeMap((s: any) => s[lang]),\n filter(isPresent)\n );\n\n/**\n * Selects the current localizations based on the language\n */\nexport const currentLocalization =\n () =>\n (state$: Observable): Observable =>\n state$.pipe(\n language(),\n filter(isPresent),\n switchMap((lang) => state$.pipe(localization(lang))),\n filter(isPresent)\n );\n\n/**\n * Selects the localization key for current localizations\n */\nexport const translate =\n (key: string | string[]) =>\n (state$: Observable): Observable =>\n state$.pipe(\n currentLocalization(),\n safeMap((localizations) => getIn(localizations, key))\n );\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { ElementTypes, FlightSearchParams, PreFlightSearchParams } from '@fcom/common';\nimport { DataCloudService } from '@fcom/common/datacloud';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { GtmService } from '@fcom/common/gtm';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { ElementActions, SearchType } from '@fcom/common/interfaces/gtm.interface';\n\nimport { WidgetTab } from '../interfaces';\nimport { activeTab } from '../store';\n\n@Injectable()\nexport class BookingWidgetGtmService implements OnDestroy {\n private context$: BehaviorSubject = new BehaviorSubject(undefined);\n private searchType$: BehaviorSubject = new BehaviorSubject(undefined);\n private subscriptions: Subscription;\n\n constructor(\n private store$: Store,\n private gtmService: GtmService,\n private dataCloudService: DataCloudService\n ) {\n this.subscriptions = new Subscription();\n\n this.subscriptions.add(\n this.store$.pipe(activeTab(), finShare()).subscribe((widgetActiveTab: WidgetTab) => {\n if (widgetActiveTab === WidgetTab.AM) {\n this.context$.next('flight-search-aurinkomatkat');\n this.searchType$.next(undefined);\n } else {\n this.context$.next('flight-search');\n this.searchType$.next(widgetActiveTab === WidgetTab.FLIGHT ? SearchType.BOOKING_FLOW : SearchType.AWARD);\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n trackElementEvent(id: string, state?: string, action?: ElementActions): void {\n this.gtmService.trackElement(\n id,\n this.context$.getValue(),\n ElementTypes.BOOKING_WIDGET,\n state,\n action,\n undefined,\n this.searchType$.getValue()\n );\n }\n\n pageViewEvent(path: string): void {\n this.gtmService.pageView(path);\n }\n\n preFlightSearch(flightSearchParams: FlightSearchParams): void {\n const preFlightSearchParams: PreFlightSearchParams = {\n flights: flightSearchParams.flights.map((f) => ({\n origin: f.origin.locationCode,\n destination: f.destination.locationCode,\n departureDate: f.departureDate,\n })),\n paxAmount: flightSearchParams.paxAmount,\n travelClass: flightSearchParams.travelClass,\n isAward: !!flightSearchParams.isAward,\n };\n this.gtmService.preFlightSearch(preFlightSearchParams);\n this.dataCloudService.preFlightSearch(preFlightSearchParams);\n }\n}\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n allowEmptyArrays: false,\n arrayFormat: 'indices',\n charset: 'utf-8',\n charsetSentinel: false,\n commaRoundTrip: false,\n delimiter: '&',\n encode: true,\n encodeDotInKeys: false,\n encoder: utils.encode,\n encodeValuesOnly: false,\n filter: void undefined,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n allowEmptyArrays,\n strictNullHandling,\n skipNulls,\n encodeDotInKeys,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\\./g, '%2E') : String(prefix);\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;\n\n if (allowEmptyArrays && isArray(obj) && obj.length === 0) {\n return adjustedPrefix + '[]';\n }\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && key && typeof key.value !== 'undefined'\n ? key.value\n : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\\./g, '%2E') : String(key);\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n allowEmptyArrays,\n strictNullHandling,\n skipNulls,\n encodeDotInKeys,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n\n if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {\n throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n var arrayFormat;\n if (opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if ('indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = defaults.arrayFormat;\n }\n\n if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n arrayFormat: arrayFormat,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n commaRoundTrip: !!opts.commaRoundTrip,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];\n var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n var value = obj[key];\n\n if (options.skipNulls && value === null) {\n continue;\n }\n pushToArray(keys, stringify(\n value,\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.allowEmptyArrays,\n options.strictNullHandling,\n options.skipNulls,\n options.encodeDotInKeys,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { LowestPriceForFlights } from '../models/lowest-price-for-flights';\nimport { LowestPriceForOffers } from '../models/lowest-price-for-offers';\nimport { LowestPriceOfPeriod } from '../models/lowest-price-of-period';\nimport { Pong } from '../models/pong';\nimport { PostPricesForFlightsRequest } from '../models/post-prices-for-flights-request';\nimport { SearchSource } from '../models/search-source';\n\n\n/**\n * Instant search resources\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class InstantsearchService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation ping\n */\n static readonly PingPath = '/api/instantsearch/ping';\n\n /**\n * /ping.\n *\n * ping\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `ping()` instead.\n *\n * This method doesn't expect any request body.\n */\n ping$Response(rootUrl: string, params: {\n query: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, InstantsearchService.PingPath, 'get');\n\n if (params) {\n rb.query('query', params.query, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * /ping.\n *\n * ping\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `ping$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n ping(rootUrl: string, params: {\n query: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.ping$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as Pong)\n );\n }\n\n /**\n * Path part for operation getPricesForFlights\n */\n static readonly GetPricesForFlightsPath = '/api/instantsearch/prices/flights';\n\n /**\n * /prices/flights.\n *\n * getPricesForFlights - Deprecated because of the HTTP get limitation reached when a origin/destination list is too big.\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getPricesForFlights()` instead.\n *\n * This method doesn't expect any request body.\n *\n * @deprecated\n */\n getPricesForFlights$Response(rootUrl: string, params: {\n\n /**\n * IATA codes for airports, cities\n */\n departureLocationCodes: Array;\n\n /**\n * IATA codes for airports, cities\n */\n destinationLocationCodes: Array;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n departureDate?: string;\n\n /**\n * Number of days to search forward from given start date\n */\n numberOfDays?: number;\n\n /**\n * Length of stay\n */\n lengthOfStay?: string;\n\n /**\n * Travel classes\n */\n travelClasses?: Array;\n\n /**\n * Request oneway trip\n *\n * @deprecated\n */\n oneway?: boolean;\n\n /**\n * Trip types\n */\n tripTypes?: Array;\n\n /**\n * locale\n */\n locale?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, InstantsearchService.GetPricesForFlightsPath, 'get');\n\n if (params) {\n rb.query('departureLocationCodes', params.departureLocationCodes, {\"explode\":false});\n rb.query('destinationLocationCodes', params.destinationLocationCodes, {\"explode\":false});\n rb.query('departureDate', params.departureDate, {});\n rb.query('numberOfDays', params.numberOfDays, {});\n rb.query('lengthOfStay', params.lengthOfStay, {});\n rb.query('travelClasses', params.travelClasses, {\"explode\":false});\n rb.query('oneway', params.oneway, {});\n rb.query('tripTypes', params.tripTypes, {\"explode\":false});\n rb.query('locale', params.locale, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * /prices/flights.\n *\n * getPricesForFlights - Deprecated because of the HTTP get limitation reached when a origin/destination list is too big.\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getPricesForFlights$Response()` instead.\n *\n * This method doesn't expect any request body.\n *\n * @deprecated\n */\n getPricesForFlights(rootUrl: string, params: {\n\n /**\n * IATA codes for airports, cities\n */\n departureLocationCodes: Array;\n\n /**\n * IATA codes for airports, cities\n */\n destinationLocationCodes: Array;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n departureDate?: string;\n\n /**\n * Number of days to search forward from given start date\n */\n numberOfDays?: number;\n\n /**\n * Length of stay\n */\n lengthOfStay?: string;\n\n /**\n * Travel classes\n */\n travelClasses?: Array;\n\n /**\n * Request oneway trip\n *\n * @deprecated\n */\n oneway?: boolean;\n\n /**\n * Trip types\n */\n tripTypes?: Array;\n\n /**\n * locale\n */\n locale?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.getPricesForFlights$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as LowestPriceForFlights)\n );\n }\n\n /**\n * Path part for operation postPricesForFlights\n */\n static readonly PostPricesForFlightsPath = '/api/instantsearch/prices/flights';\n\n /**\n * /prices/flights.\n *\n * getPricesForFlights\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `postPricesForFlights()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n postPricesForFlights$Response(rootUrl: string, params: {\n body: PostPricesForFlightsRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, InstantsearchService.PostPricesForFlightsPath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * /prices/flights.\n *\n * getPricesForFlights\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `postPricesForFlights$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n postPricesForFlights(rootUrl: string, params: {\n body: PostPricesForFlightsRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.postPricesForFlights$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as LowestPriceForFlights)\n );\n }\n\n /**\n * Path part for operation getPricesForOffers\n */\n static readonly GetPricesForOffersPath = '/api/instantsearch/prices/offers';\n\n /**\n * /prices/offers.\n *\n * getPricesForOffers\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getPricesForOffers()` instead.\n *\n * This method doesn't expect any request body.\n */\n getPricesForOffers$Response(rootUrl: string, params: {\n\n /**\n * IATA code for airport or city\n */\n departureLocationCode: string;\n\n /**\n * IATA codes for airports or cities\n */\n destinationLocationCodes: Array;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n departureDate: string;\n\n /**\n * Number of days to search forward from given start date\n */\n numberOfDays: number;\n\n /**\n * Length of stay\n */\n lengthOfStay?: string;\n\n /**\n * Travel classes\n */\n travelClasses?: Array;\n\n /**\n * Request oneway trip\n */\n oneway?: boolean;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, InstantsearchService.GetPricesForOffersPath, 'get');\n\n if (params) {\n rb.query('departureLocationCode', params.departureLocationCode, {});\n rb.query('destinationLocationCodes', params.destinationLocationCodes, {\"explode\":false});\n rb.query('departureDate', params.departureDate, {});\n rb.query('numberOfDays', params.numberOfDays, {});\n rb.query('lengthOfStay', params.lengthOfStay, {});\n rb.query('travelClasses', params.travelClasses, {\"explode\":false});\n rb.query('oneway', params.oneway, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * /prices/offers.\n *\n * getPricesForOffers\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getPricesForOffers$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getPricesForOffers(rootUrl: string, params: {\n\n /**\n * IATA code for airport or city\n */\n departureLocationCode: string;\n\n /**\n * IATA codes for airports or cities\n */\n destinationLocationCodes: Array;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n departureDate: string;\n\n /**\n * Number of days to search forward from given start date\n */\n numberOfDays: number;\n\n /**\n * Length of stay\n */\n lengthOfStay?: string;\n\n /**\n * Travel classes\n */\n travelClasses?: Array;\n\n /**\n * Request oneway trip\n */\n oneway?: boolean;\n },\n context?: HttpContext\n\n): Observable {\n return this.getPricesForOffers$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as LowestPriceForOffers)\n );\n }\n\n /**\n * Path part for operation getPricesForPeriod\n */\n static readonly GetPricesForPeriodPath = '/api/instantsearch/pricesforperiod';\n\n /**\n * /pricesforperiod.\n *\n * getPricesForPeriod\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getPricesForPeriod()` instead.\n *\n * This method doesn't expect any request body.\n */\n getPricesForPeriod$Response(rootUrl: string, params: {\n\n /**\n * IATA code for airport, city\n */\n departureLocationCode: string;\n\n /**\n * IATA code for airport, city\n */\n destinationLocationCode: string;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n startDate: string;\n\n /**\n * Number of days to search forward from given startDate\n */\n numberOfDays: number;\n\n /**\n * Travel class\n */\n travelClass?: string;\n\n /**\n * Request oneway trip\n */\n oneway?: boolean;\n\n /**\n * length of stay for return trips\n */\n lengthOfStay?: number;\n\n /**\n * trip length flexibility\n */\n tripFlexibility?: number;\n\n /**\n * turn on debug\n */\n debug?: boolean;\n\n /**\n * number of adult travelers\n */\n adults?: number;\n\n /**\n * number of child travelers\n */\n children?: number;\n\n /**\n * number of infant travelers\n */\n infants?: number;\n\n /**\n * direct flights only\n */\n directFlights?: boolean;\n\n /**\n * search source\n */\n searchSource?: SearchSource;\n\n /**\n * locale\n */\n locale?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, InstantsearchService.GetPricesForPeriodPath, 'get');\n\n if (params) {\n rb.query('departureLocationCode', params.departureLocationCode, {});\n rb.query('destinationLocationCode', params.destinationLocationCode, {});\n rb.query('startDate', params.startDate, {});\n rb.query('numberOfDays', params.numberOfDays, {});\n rb.query('travelClass', params.travelClass, {});\n rb.query('oneway', params.oneway, {});\n rb.query('lengthOfStay', params.lengthOfStay, {});\n rb.query('tripFlexibility', params.tripFlexibility, {});\n rb.query('debug', params.debug, {});\n rb.query('adults', params.adults, {});\n rb.query('children', params.children, {});\n rb.query('infants', params.infants, {});\n rb.query('directFlights', params.directFlights, {});\n rb.query('searchSource', params.searchSource, {});\n rb.query('locale', params.locale, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * /pricesforperiod.\n *\n * getPricesForPeriod\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getPricesForPeriod$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getPricesForPeriod(rootUrl: string, params: {\n\n /**\n * IATA code for airport, city\n */\n departureLocationCode: string;\n\n /**\n * IATA code for airport, city\n */\n destinationLocationCode: string;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n startDate: string;\n\n /**\n * Number of days to search forward from given startDate\n */\n numberOfDays: number;\n\n /**\n * Travel class\n */\n travelClass?: string;\n\n /**\n * Request oneway trip\n */\n oneway?: boolean;\n\n /**\n * length of stay for return trips\n */\n lengthOfStay?: number;\n\n /**\n * trip length flexibility\n */\n tripFlexibility?: number;\n\n /**\n * turn on debug\n */\n debug?: boolean;\n\n /**\n * number of adult travelers\n */\n adults?: number;\n\n /**\n * number of child travelers\n */\n children?: number;\n\n /**\n * number of infant travelers\n */\n infants?: number;\n\n /**\n * direct flights only\n */\n directFlights?: boolean;\n\n /**\n * search source\n */\n searchSource?: SearchSource;\n\n /**\n * locale\n */\n locale?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.getPricesForPeriod$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as LowestPriceOfPeriod)\n );\n }\n\n /**\n * Path part for operation getPricesForPeriodWithFixedDepartureDate\n */\n static readonly GetPricesForPeriodWithFixedDepartureDatePath = '/api/instantsearch/pricesforperiod/fixeddeparture';\n\n /**\n * /pricesforperiod/fixeddeparture.\n *\n * getPricesForPeriodWithFixedDepartureDate\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getPricesForPeriodWithFixedDepartureDate()` instead.\n *\n * This method doesn't expect any request body.\n */\n getPricesForPeriodWithFixedDepartureDate$Response(rootUrl: string, params: {\n\n /**\n * IATA code for airport, city\n */\n departureLocationCode: string;\n\n /**\n * IATA code for airport, city\n */\n destinationLocationCode: string;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n departureDate: string;\n\n /**\n * Number of days to search forward from given startDate\n */\n numberOfDays: number;\n\n /**\n * Travel class\n */\n travelClass?: string;\n\n /**\n * Group by\n */\n groupBy?: string;\n\n /**\n * number of adult travelers\n */\n adults?: number;\n\n /**\n * number of child travelers\n */\n children?: number;\n\n /**\n * number of infant travelers\n */\n infants?: number;\n\n /**\n * direct flights only\n */\n directFlights?: boolean;\n\n /**\n * search source\n */\n searchSource?: SearchSource;\n\n /**\n * locale\n */\n locale?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, InstantsearchService.GetPricesForPeriodWithFixedDepartureDatePath, 'get');\n\n if (params) {\n rb.query('departureLocationCode', params.departureLocationCode, {});\n rb.query('destinationLocationCode', params.destinationLocationCode, {});\n rb.query('departureDate', params.departureDate, {});\n rb.query('numberOfDays', params.numberOfDays, {});\n rb.query('travelClass', params.travelClass, {});\n rb.query('groupBy', params.groupBy, {});\n rb.query('adults', params.adults, {});\n rb.query('children', params.children, {});\n rb.query('infants', params.infants, {});\n rb.query('directFlights', params.directFlights, {});\n rb.query('searchSource', params.searchSource, {});\n rb.query('locale', params.locale, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * /pricesforperiod/fixeddeparture.\n *\n * getPricesForPeriodWithFixedDepartureDate\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getPricesForPeriodWithFixedDepartureDate$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getPricesForPeriodWithFixedDepartureDate(rootUrl: string, params: {\n\n /**\n * IATA code for airport, city\n */\n departureLocationCode: string;\n\n /**\n * IATA code for airport, city\n */\n destinationLocationCode: string;\n\n /**\n * Show prices starting from this date (yyyy-MM-dd)\n */\n departureDate: string;\n\n /**\n * Number of days to search forward from given startDate\n */\n numberOfDays: number;\n\n /**\n * Travel class\n */\n travelClass?: string;\n\n /**\n * Group by\n */\n groupBy?: string;\n\n /**\n * number of adult travelers\n */\n adults?: number;\n\n /**\n * number of child travelers\n */\n children?: number;\n\n /**\n * number of infant travelers\n */\n infants?: number;\n\n /**\n * direct flights only\n */\n directFlights?: boolean;\n\n /**\n * search source\n */\n searchSource?: SearchSource;\n\n /**\n * locale\n */\n locale?: string;\n },\n context?: HttpContext\n\n): Observable {\n return this.getPricesForPeriodWithFixedDepartureDate$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as LowestPriceOfPeriod)\n );\n }\n\n}\n","import { Route } from '@angular/router';\n\nimport { createAction, props, union } from '@ngrx/store';\n\nexport const confirmation = createAction('[GlobalActions] Confirmation', props<{ route?: Route }>());\nexport const paymentVerified = createAction('[GlobalActions] Payment verified');\nexport const setPaymentIdPaid = createAction(\n '[GlobalActions] Payment setPaymentIdPaid',\n props<{ paymentId: string }>()\n);\nexport const paymentNotPaid = createAction('[GlobalActions] Payment not paid');\n\nconst all = union({ confirmation, paymentVerified, paymentNotPaid });\n\nexport type ActionsUnion = typeof all;\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { Trip } from '../../interfaces/pax-trip.interface';\nimport { FetchTripsStatus } from '../../interfaces/store.interface';\n\nexport const setTrips = createAction('[TripActions] SetTrips', props<{ trips: Trip[]; status: FetchTripsStatus }>());\nexport const fetchTrips = createAction('[TripActions] FetchTrips');\n\nconst all = union({ setTrips, fetchTrips });\nexport type TripsActionsUnion = typeof all;\n","import { createAction, props, union } from '@ngrx/store';\n\nexport const setDismissed = createAction('[MilestoneActions] setDismissed', props<{ points: number }>());\n\nconst all = union({ setDismissed });\nexport type MilestonesActionsUnion = typeof all;\n","import { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\n\n/**\n * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.\n *\n * ![](ignoreElements.png)\n *\n * The `ignoreElements` operator suppresses all items emitted by the source Observable,\n * but allows its termination notification (either `error` or `complete`) to pass through unchanged.\n *\n * If you do not care about the items being emitted by an Observable, but you do want to be notified\n * when it completes or when it terminates with an error, you can apply the `ignoreElements` operator\n * to the Observable, which will ensure that it will never call its observers’ `next` handlers.\n *\n * ## Example\n *\n * Ignore all `next` emissions from the source\n *\n * ```ts\n * import { of, ignoreElements } from 'rxjs';\n *\n * of('you', 'talking', 'to', 'me')\n * .pipe(ignoreElements())\n * .subscribe({\n * next: word => console.log(word),\n * error: err => console.log('error:', err),\n * complete: () => console.log('the end'),\n * });\n *\n * // result:\n * // 'the end'\n * ```\n *\n * @return A function that returns an empty Observable that only calls\n * `complete` or `error`, based on which one is called by the source\n * Observable.\n */\nexport function ignoreElements(): OperatorFunction {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n","\n{{ 'icons.' + name | finLocalization }}\n","import { Component, HostBinding, Input, type OnChanges, type OnInit } from '@angular/core';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { icons } from '@finnairoyj/fcom-ui-styles';\n\nimport { toKebabCase } from '../../../utils/string.utils';\nimport { type IconName } from '../icons.interfaces';\n\n@Component({\n selector: 'fcom-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss'],\n})\nexport class IconComponent implements OnChanges, OnInit {\n @Input()\n category: IconLibrary = IconLibrary.SVG_LIBRARY;\n\n @Input()\n dataTestId: string;\n\n @Input()\n name: IconName = null;\n\n // when this is set to true, make sure the translations are available in cms\n @Input()\n informative = false;\n\n private errorThrown = false;\n private icons: typeof icons = icons;\n\n @HostBinding('attr.data-testid')\n attrDataTestId: string;\n\n /** @default category-name-icon-name */\n get dataTestIdValue(): string {\n return this.dataTestId || toKebabCase(`${this.category}-${this.name ?? 'unknown'}`);\n }\n\n get iconRef(): string {\n return `${this.category}/${this.name}`;\n }\n\n get svgPath(): string {\n if (this.icons?.[this.category]?.[this.name]) {\n return this.icons[this.category][this.name];\n }\n\n this.throwSingleError(`Invalid Icon: ${String(this.category)}/${this.name}`);\n return '';\n }\n\n ngOnChanges(): void {\n this.attrDataTestId = this.dataTestIdValue;\n }\n\n ngOnInit(): void {\n this.category = this.category ?? IconLibrary.SVG_LIBRARY;\n this.attrDataTestId = this.dataTestIdValue;\n }\n\n // Throw an error in a timeout to stop it crashing other components but still report to sentry.\n throwSingleError(err): void {\n if (this.errorThrown) {\n return;\n }\n\n this.errorThrown = true;\n\n setTimeout(() => {\n throw new Error(err);\n }, 0);\n }\n}\n","\n \n \n {{ text }}\n \n \n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { type IconName } from '../icons';\nimport { TagTheme } from './interfaces';\n\n@Component({\n selector: 'fcom-tag-button',\n styleUrls: ['tag-button.component.scss'],\n templateUrl: 'tag-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TagButtonComponent {\n public readonly TagTheme = TagTheme;\n\n @Input()\n text: string;\n\n @Input()\n title: string;\n\n @Input()\n iconName: IconName;\n\n @Input()\n iconCategory: IconLibrary = IconLibrary.SVG_LIBRARY;\n\n @Input()\n theme: TagTheme = TagTheme.DEFAULT;\n\n @Input()\n disabled = false;\n\n @Output()\n tagClicked: EventEmitter = new EventEmitter();\n\n @Output()\n blur: EventEmitter = new EventEmitter();\n}\n","import { HttpErrorResponse, HttpResponse } from '@angular/common/http';\n\nimport { MappedError, MappedHttpError } from '../interfaces';\n\nconst jsonStringifyErrorReplacer = (_key: string, value: any) => {\n if (value instanceof Error) {\n const cache = [];\n return Object.getOwnPropertyNames(value).reduce((acc, propertyKey) => {\n if (cache.indexOf(propertyKey) !== -1) {\n // Circular reference\n return acc;\n }\n cache.push(propertyKey);\n acc[propertyKey] = value[propertyKey];\n return acc;\n }, {});\n }\n return value;\n};\n\n/**\n * Use for better Sentry error messages in extra parameter.\n * @param error\n */\nexport const mapErrorForSentry = (error: any): MappedHttpError | MappedError => {\n if (error instanceof HttpErrorResponse) {\n return {\n ...error,\n headers: error.headers.keys().reduce((all, key) => {\n all[key] = error.headers.getAll(key).join(', ');\n return all;\n }, {}),\n };\n }\n return {\n json: JSON.stringify(error, jsonStringifyErrorReplacer),\n errorCode: error?.errorCode || error?.key,\n errorMessage: error?.errorMessage || error?.message,\n };\n};\n\nconst errorResponse = (response: HttpResponse | HttpErrorResponse | any) => {\n if (response instanceof HttpResponse) {\n return response.body || {};\n }\n if (response instanceof HttpErrorResponse) {\n return response.error || {};\n }\n return response;\n};\n\nconst jsonOrString = (o) => {\n if (typeof o === 'string') {\n try {\n return JSON.parse(o);\n } catch (e) {\n return { message: o };\n }\n }\n return o;\n};\n\n/**\n * Use for mapping errors in observable catch blocks\n * XHR errors should always respond with Response object and other errors we pass through.\n * @param error\n * @returns {any}\n */\nexport const mapError = (error: HttpResponse | HttpErrorResponse | any = {}): T => {\n return jsonOrString(errorResponse(error));\n};\n","import { ElementRef } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { combineLatest, EMPTY, fromEvent, Observable } from 'rxjs';\nimport { filter, map, share } from 'rxjs/operators';\n\nimport { isPresent } from '@fcom/core/utils/utils';\n\nimport { WindowRef } from '../providers';\n\n/**\n * PostMessenger can be used to communicate with iframes using the `postMessage` callback.\n * Supports reading and writing both in string and JSON format (newer browsers).\n */\nexport class PostMessenger {\n public static readonly TARGET_ORIGIN: string = '*';\n\n public readonly inbound$: Observable;\n\n /**\n * Whether a message was received in stringified format (as opposed to JSON). Used\n * for configuring the postMessage the other way round to send the payload as string.\n * @type {boolean}\n */\n private stringifiedInteraction = false;\n\n /**\n * @param {WindowRef} windowRef the window instance, whose events should be listened to.\n * @param {Observable} iFrameSrcs$ the expected origins of the iFrame message.\n * @param {object} platform the PLATFORM_ID for determining if server or browser.\n * @param {ElementRef} iFrameGetter Function to get ElementRef to the iFrame instance, required only if you need to post messages\n * instead of just listening.\n */\n constructor(\n windowRef: WindowRef,\n iFrameSrcs$: Observable,\n platform: object,\n private iFrameGetter?: () => ElementRef\n ) {\n if (isPlatformServer(platform)) {\n this.inbound$ = EMPTY;\n return;\n }\n this.inbound$ = combineLatest([fromEvent(windowRef.nativeWindow, 'message'), iFrameSrcs$]).pipe(\n filter(([message, srcs]) => srcs.some((src) => src.indexOf(message.origin) !== -1)), // Ensure the message.origin\n // is the same as the iframe's loaded source\n map(([message]) => this.decode(message)),\n share()\n );\n }\n\n post(msg: Out): void {\n const iFrame = this.iFrameGetter();\n if (!isPresent(iFrame)) {\n console.warn('PostMessenger iFrame is missing => can not post messages');\n return;\n }\n iFrame.nativeElement.contentWindow.postMessage(this.encode(msg), PostMessenger.TARGET_ORIGIN);\n }\n\n private decode(message: any): In {\n if (typeof message.data === 'string') {\n try {\n this.stringifiedInteraction = true;\n return JSON.parse(message.data);\n } catch (_err) {\n return message.data;\n }\n }\n this.stringifiedInteraction = false;\n return message.data;\n }\n\n private encode(message: Out): any {\n return this.stringifiedInteraction ? JSON.stringify(message) : message;\n }\n}\n","import { LocalDate } from './tz-date';\nimport { isNull, isPresent, isUndefined } from './utils';\n\nconst isPrimitive = (a: unknown): a is string | number | boolean =>\n typeof a === 'string' || typeof a === 'number' || typeof a === 'boolean';\nconst isDate = (a: unknown): a is Date => a instanceof Date;\nconst isEmptyString = (a: unknown): a is '' => typeof a === 'string' && a.length === 0;\nconst isObject = (a: unknown): a is object => typeof a === 'object';\nconst isLocalDate = (a: unknown): a is LocalDate => a instanceof LocalDate;\n\nexport const cloneDeep = (b: T): T => {\n if (isUndefined(b) || isNull(b)) {\n return b;\n } else if (isLocalDate(b)) {\n return new LocalDate(b.toString()) as any;\n } else if (isDate(b)) {\n // If new value is a Date, we clone it\n return new Date(b.getTime()) as any;\n } else if (isPrimitive(b)) {\n return b;\n } else if (Array.isArray(b)) {\n return mergeArray([], b) as any;\n } else {\n return mergeDeep({}, b);\n }\n};\n\n/**\n * Merge arrays deeply. Will clone objects with mergeDeep.\n * @param a first array\n * @param b second array|object\n * @param overWriteWithEmpty do we overwrite with empty value\n * @returns {any}\n */\nconst mergeArray = (a: A[], b: B[] | { [key: number]: B }, overWriteWithEmpty = true): (A | B)[] => {\n const c = a.slice();\n Object.keys(b).forEach((e: string) => {\n if (isObject(b[e])) {\n c[e] = mergeDeep(a[e] || {}, b[e], overWriteWithEmpty);\n // eslint-disable-next-line no-prototype-builtins\n } else if (a.hasOwnProperty(e)) {\n c[e] = cloneDeep(b[e]);\n } else {\n c.push(cloneDeep(b[e]));\n }\n });\n return c;\n};\n\nfunction mergeObject(a: Partial, b: Partial, overWriteWithEmpty?: boolean): T;\nfunction mergeObject(a: Partial, b: Partial, overWriteWithEmpty?: boolean): T1 & T2;\n\n/**\n * Merge objects deeply. Will clone necessary properties.\n * ®\n * @example\n *\n * const a = { a: 'foo', b: { c: 'bar', d: { e: 'zoq' } } };\n * const b = { a: 'baz', b: { d: { f: 'fot' }, g: 'pik' } });\n * const c = mergeDeep(a, b);\n * console.log(c);\n * => {\n * a: 'baz',\n * b: {\n * c: 'bar',\n * d: {\n * e: 'zoq',\n * f: 'fot'\n * },\n * g: 'pik'\n * }\n * }\n *\n * @param a the first object\n * @param b the second object\n * @param overWriteWithEmpty do we overwrite with empty value\n * @returns {any|({}&any)}\n */\nfunction mergeObject(a: unknown, b: unknown, overWriteWithEmpty = true): unknown {\n const target = Object.assign({}, a);\n\n Object.keys(b).forEach((key) => {\n const val = b[key];\n if (Array.isArray(val)) {\n target[key] = mergeArray(a[key] || [], val, overWriteWithEmpty);\n } else if (isObject(val)) {\n target[key] = mergeDeep(target[key] || {}, val, overWriteWithEmpty);\n } else {\n if (overWriteWithEmpty || (isPresent(val) && !isEmptyString(val))) {\n target[key] = cloneDeep(val);\n }\n }\n });\n\n return target;\n}\n\nexport function mergeDeep(a: A[], b: B[] | { [key: number]: B }, overWriteWithEmpty?: boolean): (A | B)[];\nexport function mergeDeep(a: A, b: B, overWriteWithEmpty?: boolean): B;\nexport function mergeDeep(\n a: A,\n b: B,\n overWriteWithEmpty?: boolean\n): B;\nexport function mergeDeep(a: Partial, b: Partial, overWriteWithEmpty?: boolean): T;\nexport function mergeDeep(a: A, b: B, overWriteWithEmpty?: boolean): A & B;\n/**\n * Merge objects/arrays/primitives deeply. Will clone necessary properties.\n * ®\n * @example\n *\n * const a = { a: 'foo', b: { c: 'bar', d: { e: 'zoq' } } };\n * const b = { a: 'baz', b: { d: { f: 'fot' }, g: 'pik' } });\n * const c = mergeDeep(a, b);\n * console.log(c);\n * => {\n * a: 'baz',\n * b: {\n * c: 'bar',\n * d: {\n * e: 'zoq',\n * f: 'fot'\n * },\n * g: 'pik'\n * }\n * }\n *\n * @param a the first object\n * @param b the second object\n * @param overWriteWithEmpty do we overwrite with empty value\n * @returns {any|({}&any)}\n */\nexport function mergeDeep(a: unknown, b: unknown, overWriteWithEmpty = true): unknown {\n // If original is string, number, boolean, or date, we overwrite it\n if (isUndefined(a)) {\n return cloneDeep(b);\n } else if (isUndefined(b)) {\n return cloneDeep(a);\n } else if (isPrimitive(a) || isPrimitive(b) || isDate(a) || isLocalDate(b)) {\n return cloneDeep(b);\n } else if (isNull(b)) {\n return null;\n } else if (Array.isArray(a)) {\n return mergeArray(a, b as unknown[], overWriteWithEmpty);\n }\n return mergeObject(a, b, overWriteWithEmpty);\n}\n\nexport function mergeDeepMany(t1: T1, t2: T2): T1 & T2;\nexport function mergeDeepMany(t1: T1, t2: T2, t3: T3): T1 & T2 & T3;\nexport function mergeDeepMany(...args: Partial[]): T;\n/**\n * Merge multiple objects deeply. Will clone necessary properties.\n * Same as MergeDeep function, but takes an array of any number of objects as an argument\n */\nexport function mergeDeepMany(...args: unknown[]): unknown {\n return args.reduce((arr, cur) => mergeDeep(arr, cur), undefined);\n}\n","import { Action, ActionReducer, INIT, UPDATE } from '@ngrx/store';\n\nimport { isPresent } from '@fcom/core/utils/utils';\n\nimport { Storage } from '../interfaces';\nimport { mergeDeep } from './merge';\nimport { SentryLogger } from '../services';\n\nexport interface StorageKey {\n name: string;\n keys?: string[];\n}\n\nexport interface StorageConfig {\n storage: Storage;\n rehydrate: boolean;\n keys: StorageKey[];\n sentryLogger: SentryLogger;\n}\n\nexport interface ExtendedAction extends Action {\n payload?: any;\n features?: string[];\n}\n\nexport interface StateData {\n [key: string]: any;\n}\n\nconst pickKeys = (obj: string | StateData, keys: string[] = []) => {\n if (typeof obj === 'string') {\n return '';\n }\n return keys.reduce((values: StateData, key: string) => {\n values[key] = obj?.[key];\n return values;\n }, {});\n};\n\nconst syncStateToStorage = (config: StorageConfig, state: State) => {\n config.keys.forEach((key: StorageKey) => {\n const partOfState: string | StateData = state[key.name];\n if (isPresent(partOfState)) {\n const newPartOfState: string | StateData = Array.isArray(key.keys)\n ? pickKeys(partOfState, key.keys)\n : partOfState;\n\n try {\n config.storage.set(\n key.name,\n typeof newPartOfState === 'string' ? newPartOfState : JSON.stringify(newPartOfState)\n );\n } catch (e) {\n config.sentryLogger.warn('Failed to sync state to storage', {\n storageKeyName: key.name,\n error: e,\n });\n }\n }\n });\n};\n\nconst parseData = (jsonString: any) => {\n try {\n return JSON.parse(jsonString);\n } catch (e) {\n return jsonString;\n }\n};\n\nconst getStateFromStorage = (config: StorageConfig) => {\n if (config.rehydrate) {\n return config.keys.reduce((stateFromStorage, key: StorageKey) => {\n const storageData = config.storage.get(key.name);\n if (isPresent(storageData)) {\n return mergeDeep(stateFromStorage, { [key.name]: parseData(storageData) });\n }\n return stateFromStorage;\n }, {});\n }\n return {};\n};\n\nexport const storageSync =\n (config: StorageConfig) =>\n (reducer: ActionReducer) => {\n return function (state: State, action: ExtendedAction) {\n const stateToUpdate: State =\n action.type === UPDATE || action.type === INIT ? mergeDeep(state, getStateFromStorage(config)) : state;\n const nextState: State = reducer(stateToUpdate, action);\n syncStateToStorage(config, nextState);\n return nextState;\n };\n };\n","import { isPresent } from './utils';\nimport { mergeDeep } from './merge';\n\n/**\n * Converts 'foo.bar' to ['foo', 'bar'].\n * Keeps arrays intact.\n * throws error if not string or array\n */\nexport function pathToArray(path: string | string[]): string[] {\n if (Array.isArray(path)) {\n return path;\n } else if (typeof path === 'string') {\n return path.split('.');\n } else {\n throw new Error('Only Array and dot-separated string supported as path');\n }\n}\n\nfunction getInArray(object: T, paths: [U]): T[U];\nfunction getInArray(object: T, paths: [U, V]): T[U][V];\nfunction getInArray(\n object: T,\n paths: [U, V, W]\n): T[U][V][W];\nfunction getInArray(\n object: T,\n paths: [U, V, W, X]\n): T[U][V][W][X];\nfunction getInArray(object: unknown, paths: string[]): unknown {\n let retValue = object;\n for (const path of paths) {\n retValue = retValue?.[path];\n if (!retValue) {\n break;\n }\n }\n\n return retValue;\n}\n\n/**\n * Null-safe deep get for objects.\n *\n * @example\n * const a = {\n * b: {\n * c: {\n * d: 'heps'\n * }\n * }\n * }\n * getIn(a, 'b.c.d') => 'heps'\n * getIn(a, 'b.c.d.e') => undefined\n * getIn(a, 'b') => { b: { ... } }\n *\n */\nexport function getIn(o: T, path: U | [U]): T[U];\nexport function getIn(o: T, path: [U, V]): T[U][V];\nexport function getIn(\n o: T,\n path: [U, V, W]\n): T[U][V][W];\nexport function getIn(\n o: T,\n path: [U, V, W, X]\n): T[U][V][W][X];\nexport function getIn(o: T, path: string | string[]): unknown;\nexport function getIn(o: unknown, path: string | string[]): unknown {\n return getInArray(o, pathToArray(path) as any);\n}\n\n/**\n * Creates a recursive object tree with the given keys and the value at the leaf\n * @param keys\n * @param value\n * @param index\n * @returns {any}\n *\n * Example:\n *\n * createObject(['foo','bar','baz'], 'qux') => { foo: { bar: { baz: 'qux' } } }\n */\nconst createObject = (keys: string[], value: object | undefined, index = keys.length - 1): object | undefined => {\n if (index < 0) {\n return value;\n }\n return createObject(keys, { [keys[index]]: value }, index - 1);\n};\n\nconst setInArray = function setInArrayFn(object: T, paths: string[], value: any): T {\n if (getIn(object, paths) === value) {\n return object;\n }\n /* To ensure object values are overwritten, we first clear the value */\n const clearValueFirst = createObject(paths, undefined);\n const toAssign = createObject(paths, value);\n return mergeDeep(mergeDeep(object, clearValueFirst, true), toAssign, true);\n};\n\n/**\n * Sets value in target key.\n * Returns a new reference of each ancestor if value changes, but keeps the other branches intact.\n */\nexport const setIn = function setInFn(o: T, path: string | string[], value: any): T {\n return setInArray(o, pathToArray(path), value);\n};\n\nconst mergeInArray = function mergeInArrayFn(object: T, paths: string[], value: any): T {\n if (getIn(object, paths) === value) {\n return object;\n }\n const toAssign = createObject(paths, value);\n return mergeDeep(object, toAssign, true);\n};\n\nexport const mergeIn = (o: T, path: string | string[], value: any): T => mergeInArray(o, pathToArray(path), value);\n\nexport const updateIn = (o: T, path: string | string[], transform: (val: any) => any) => {\n const paths = pathToArray(path);\n const previousValue = getIn(o, paths);\n return setIn(o, paths, transform(Object.seal(previousValue)));\n};\n\nexport const deleteIn = (o: T, path: string | string[]): T => {\n const pathsInArray = pathToArray(path);\n if (pathsInArray.length === 0) {\n throw new Error('Cannot delete empty path');\n }\n const pathsToParent = pathsInArray.slice(0, -1);\n const keyToDelete = pathsInArray[pathsInArray.length - 1];\n const parent = pathsInArray.length === 1 ? o : getIn(o, pathsToParent);\n\n if (!isPresent(parent)) {\n return o;\n }\n\n if (Array.isArray(parent)) {\n const parentArray = parent;\n const index = parseInt(keyToDelete, 10);\n // eslint-disable-next-line id-blacklist\n if (Number.isNaN(index)) {\n throw new Error('Trying to delete non-numeric key from array');\n }\n if (index >= parentArray.length) {\n return o;\n } else {\n const temp = parentArray.slice(0);\n temp.splice(index, 1);\n if (pathsToParent.length === 0) {\n return temp as any as T;\n }\n return setIn(o, pathsToParent, temp);\n }\n }\n\n // eslint-disable-next-line no-prototype-builtins\n if (!parent.hasOwnProperty(keyToDelete)) {\n return o;\n }\n\n const newValue = setIn(o, path, undefined);\n const newParent = pathsToParent.length === 0 ? newValue : getIn(newValue, pathsToParent);\n delete newParent[keyToDelete];\n return newValue;\n};\n\nexport class DataUtils {\n /**\n * Helper method for chaining, e.g., setIn() calls\n * @param value\n * @returns {DataUtils}\n */\n static wrap(value: Y): DataUtils {\n return new DataUtils(value);\n }\n\n constructor(private data: T) {}\n\n setIn(path: U | [U], value: T[U]): this;\n setIn(path: [U, V], value: T[U][V]): this;\n setIn(path: [U, V, W], value: T[U][V][W]): this;\n setIn(\n path: [U, V, W, X],\n value: T[U][V][W][X]\n ): this;\n setIn(path: string | string[], value: unknown): this {\n this.data = setIn(this.data, path, value);\n return this;\n }\n\n mergeIn(path: U | [U], value: T[U]): this;\n mergeIn(path: [U, V], value: T[U][V]): this;\n mergeIn(path: [U, V, W], value: T[U][V][W]): this;\n mergeIn(\n path: [U, V, W, X],\n value: T[U][V][W][X]\n ): this;\n mergeIn(path: string | string[], value: unknown): this {\n this.data = mergeIn(this.data, path, value);\n return this;\n }\n\n deleteIn(path: U | [U]): DataUtils>;\n deleteIn(path: [U, V]): this;\n deleteIn(path: [U, V, W]): this;\n deleteIn(\n path: [U, V, W, X]\n ): this;\n deleteIn(path: string[]): DataUtils;\n deleteIn(path: string | string[]): this {\n this.data = deleteIn(this.data, path);\n return this;\n }\n\n updateIn(path: U | [U], mutator: (val: T[U]) => T[U]): this;\n updateIn(path: [U, V], mutator: (val: T[U][V]) => T[U][V]): this;\n updateIn(\n path: [U, V, W],\n mutator: (val: T[U][V][W]) => T[U][V][W]\n ): this;\n updateIn(\n path: [U, V, W, X],\n mutator: (val: T[U][V][W][X]) => T[U][V][W][X]\n ): this;\n updateIn(path: string | string[], mutator: (val: any) => any): this {\n this.data = updateIn(this.data, path, mutator);\n return this;\n }\n\n value = () => this.data;\n}\n","import { WeekdayMap } from './date';\nimport { pad } from './format';\nimport { LocalDate, TzDate } from './tz-date';\n\n// == PRIVATE =================================================================\n\ninterface Extractor {\n year(t: TzDate): number;\n month(t: TzDate): number;\n day(t: TzDate): number;\n weekday(t: TzDate): number;\n hours(t: TzDate): number;\n minutes(t: TzDate): number;\n}\n\nclass TzDateExtractor implements Extractor {\n private weekdayMap: WeekdayMap = new WeekdayMap('MON');\n\n year(t: TzDate): number {\n return t.localYear;\n }\n\n month(t: TzDate): number {\n return t.localMonth;\n }\n\n day(t: TzDate): number {\n return t.localDay;\n }\n\n weekday(t: TzDate): number {\n return this.weekdayMap.get(t.weekday);\n }\n\n hours(t: TzDate): number {\n return t.localHours;\n }\n\n minutes(t: TzDate): number {\n return t.localMinutes;\n }\n}\nconst tzDateExtractor: TzDateExtractor = new TzDateExtractor();\n\nclass UserDateExtractor implements Extractor {\n private weekdayMap: WeekdayMap = new WeekdayMap('MON');\n\n year(t: TzDate): number {\n return t.toDate().getFullYear();\n }\n\n month(t: TzDate): number {\n return t.toDate().getMonth() + 1;\n }\n\n day(t: TzDate): number {\n return t.toDate().getDate();\n }\n\n weekday(t: TzDate): number {\n return this.weekdayMap.get(t.toDate().getDay());\n }\n\n hours(t: TzDate): number {\n return t.toDate().getHours();\n }\n\n minutes(t: TzDate): number {\n return t.toDate().getMinutes();\n }\n}\nconst userDateExtractor: UserDateExtractor = new UserDateExtractor();\n\nconst MATCHER = /yy(?:yy)?|M{1,4}|d{1,2}|E{1,2}|hh|mm/g;\n\nconst safe = (n: number, callback: (n: number) => string): string => {\n if (typeof n === 'undefined' || n === null || isNaN(n)) {\n return '';\n }\n return callback(n);\n};\n\nconst REPLACEMENTS: any = {\n yy: (t: T, extractor: Extractor): string => {\n return safe(extractor.year(t), (n) => {\n return n.toString().slice(-2);\n });\n },\n yyyy: (t: T, extractor: Extractor): string => {\n return safe(extractor.year(t), (n) => {\n return n.toString();\n });\n },\n M: (t: T, extractor: Extractor): string => {\n return safe(extractor.month(t), (n) => {\n return n.toString();\n });\n },\n MM: (t: T, extractor: Extractor): string => {\n return safe(extractor.month(t), (n) => {\n return pad(n);\n });\n },\n MMM: (t: T, extractor: Extractor, translations: any): string => {\n return safe(extractor.month(t), (n) => {\n return translations['monthNamesShort'] ? translations['monthNamesShort'][n - 1] : '';\n });\n },\n MMMM: (t: T, extractor: Extractor, translations: any): string => {\n return safe(extractor.month(t), (n) => {\n return translations['monthNames'] ? translations['monthNames'][n - 1] : '';\n });\n },\n d: (t: T, extractor: Extractor): string => {\n return safe(extractor.day(t), (n) => {\n return n.toString();\n });\n },\n dd: (t: T, extractor: Extractor): string => {\n return safe(extractor.day(t), (n) => {\n return pad(n);\n });\n },\n E: (t: T, extractor: Extractor, translations: any): string => {\n return safe(extractor.weekday(t), (n) => {\n return translations['weekdaysShort'] ? translations['weekdaysShort'][n] : '';\n });\n },\n EE: (t: T, extractor: Extractor, translations: any): string => {\n return safe(extractor.weekday(t), (n) => {\n return translations['weekdays'] ? translations['weekdays'][n] : '';\n });\n },\n hh: (t: T, extractor: Extractor): string => {\n return safe(extractor.hours(t), (n) => {\n return pad(n);\n });\n },\n mm: (t: T, extractor: Extractor): string => {\n return safe(extractor.minutes(t), (n) => {\n return pad(n);\n });\n },\n};\n\n// == PUBLIC ==================================================================\n\n/*\n * Pattern is related to Java SimpleDateFormat syntax (examples for SAT 2016-01-02 on Finnish locale):\n * yy = year in 2 digits => 16\n * yyyy = year in 4 digits => 2016\n * M = month in 1-2 digit => 1\n * MM = month in 2 digits => 01\n * MMM = month's short name => Tam\n * MMMM = month's name => Tammikuu\n * d = day of month in 1-2 digits => 2\n * dd = day of month in 2 digits => 02\n * E = weekday's short name => la\n * EE = weekday's name => Lauantai\n *\n * \"localized = true\" means that the pattern's value is considered to be a localization key rather than a date format\n */\nexport class Pattern {\n constructor(\n private val: string,\n private localized: boolean = false\n ) {}\n\n getValue(translations: any): string {\n if (this.localized) {\n return translations[this.val];\n }\n return this.val;\n }\n}\n\nexport type DateFormatInput = string | LocalDate;\n\nexport class DateFormat {\n static FULL: Pattern = new Pattern('dateFormatFull', true);\n static FULL_NO_YEAR: Pattern = new Pattern('dateFormatFullNoYear', true);\n static DATE: Pattern = new Pattern('dateFormatLong', true);\n static DATE_WITH_TIME: Pattern = new Pattern('dateFormatLongWithTime', true);\n static DATE_SHORT: Pattern = new Pattern('dateFormatShort', true);\n static MONTH: Pattern = new Pattern('MMMM');\n static MONTH_SHORT: Pattern = new Pattern('MMM');\n static WEEKDAY: Pattern = new Pattern('EE');\n static WEEKDAY_SHORT: Pattern = new Pattern('E');\n static VOICE_OVER_DATE: Pattern = new Pattern('EE, d MMMM');\n static SHORT_MONTH_AND_YEAR: Pattern = new Pattern('MMM yyyy');\n static LONG_MONTH_AND_YEAR: Pattern = new Pattern('MMMM yyyy');\n\n constructor(public translations: any = {}) {}\n\n format(input: DateFormatInput, pattern: Pattern, useUserDate = false): string {\n let inputObj: any = input;\n if (typeof input === 'string') {\n inputObj = new TzDate(input);\n } else if (input instanceof LocalDate) {\n inputObj = input.toTzDate();\n }\n\n const extractor: Extractor = useUserDate ? userDateExtractor : tzDateExtractor;\n const strPattern = pattern.getValue(this.translations);\n if (!strPattern) {\n return '';\n }\n\n return strPattern.replace(MATCHER, (m) => {\n return REPLACEMENTS[m] ? REPLACEMENTS[m](inputObj, extractor, this.translations) : m;\n });\n }\n}\n","export const stopPropagation = (event: Event): false => {\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n return false;\n};\n\nexport const stopImmediatePropagation = (event: Event): false => {\n if (event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n return false;\n};\n","import { isPresent } from './utils';\nimport { pad } from './format';\n\nexport class PreciseNumber {\n static ZERO: PreciseNumber = PreciseNumber.from(0, 0);\n\n static fromString(s: string): PreciseNumber {\n const [before, after]: string[] = s.split('.');\n return PreciseNumber.from(parseInt(before + after, 10), isPresent(after) ? after.length : 0);\n }\n\n static from(n: number, decimals: number): PreciseNumber {\n return new PreciseNumber(n, decimals);\n }\n\n constructor(\n public readonly n: number,\n public readonly numDecimals: number\n ) {}\n\n withPrecision(precision: number): PreciseNumber {\n if (precision === this.numDecimals) {\n return this;\n }\n\n if (precision > this.numDecimals) {\n const newN = Math.pow(10, precision - this.numDecimals) * this.n;\n return PreciseNumber.from(newN, precision);\n }\n throw new Error('Would loose precision');\n }\n\n round(precision: number): PreciseNumber {\n if (precision === this.numDecimals) {\n return this;\n }\n const newN = Math.round(Math.pow(10, precision - this.numDecimals) * this.n);\n return PreciseNumber.from(newN, precision);\n }\n\n floor(precision: number): PreciseNumber {\n if (precision === this.numDecimals) {\n return this;\n }\n const newN = Math.floor(Math.pow(10, precision - this.numDecimals) * this.n);\n return PreciseNumber.from(newN, precision);\n }\n\n add(other: PreciseNumber): PreciseNumber {\n const numDecimals = Math.max(other.numDecimals, this.numDecimals);\n const a = this.withPrecision(numDecimals);\n const b = other.withPrecision(numDecimals);\n return PreciseNumber.from(a.n + b.n, numDecimals);\n }\n\n minus(other: PreciseNumber): PreciseNumber {\n const numDecimals = Math.max(other.numDecimals, this.numDecimals);\n const a = this.withPrecision(numDecimals);\n const b = other.withPrecision(numDecimals);\n return PreciseNumber.from(a.n - b.n, numDecimals);\n }\n\n divide(other: PreciseNumber): PreciseNumber {\n const numDecimals = Math.max(other.numDecimals, this.numDecimals);\n const a = this.withPrecision(numDecimals);\n const b = other.withPrecision(numDecimals);\n return PreciseNumber.from(a.n / b.n, 0).floor(numDecimals);\n }\n\n multiply(other: PreciseNumber): PreciseNumber {\n const numDecimals = Math.max(other.numDecimals, this.numDecimals);\n const a = this.withPrecision(numDecimals);\n const b = other.withPrecision(numDecimals);\n return PreciseNumber.from(a.n * b.n, numDecimals * 2).round(numDecimals);\n }\n\n toString(): string {\n if (this.numDecimals === 0) {\n return String(this.n);\n }\n const sign: string = this.n < 0 ? '-' : '';\n const numberStr: string = pad(String(Math.abs(this.n)), this.numDecimals + 1);\n const wholePart: string = numberStr.slice(0, numberStr.length - this.numDecimals);\n const decimalPart: string = numberStr.slice(-this.numDecimals);\n return `${sign}${wholePart}.${decimalPart}`;\n }\n}\n","import * as url from 'url';\n\nexport const urlToPathname = (urlString: string, { preserveQueryParams = false } = {}): string => {\n const parsed = url.parse(urlString || '');\n return parsed.pathname\n ? parsed.pathname + ((preserveQueryParams && parsed.search) || '') + (parsed.hash ? parsed.hash : '')\n : '';\n};\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { isPresent } from '../utils/utils';\nimport { ConfigService } from '../services/config/config.service';\n\nconst containsUrl = (urlsToCheck: string[], url: string): boolean =>\n urlsToCheck && isPresent(urlsToCheck.find((urlToCheck: string) => url.indexOf(urlToCheck) >= 0));\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AwsApiGwInterceptor implements HttpInterceptor {\n constructor(private configService: ConfigService) {}\n\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\n const headerName = 'x-api-key';\n if (!containsUrl(this.configService.sendApiGwKeyForUrls, req.url) || req.headers.get(headerName)) {\n return next.handle(req);\n }\n\n const token: string = this.configService.cfg.loyaltyServices.legacy.apiProfileApiKey;\n const request: HttpRequest = isPresent(token)\n ? req.clone({\n headers: req.headers.set(headerName, token),\n withCredentials: req.withCredentials !== false,\n })\n : req;\n return next.handle(request);\n }\n}\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { ConfigService } from '../services';\n\n// Match api.finnair.com, api-test.finnair.com etc\nconst URL_MATCHER = /api(-\\w+)?\\.finnair\\.com/;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WithCredentialsInterceptor implements HttpInterceptor {\n constructor(private configService: ConfigService) {}\n\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\n if (!this.configService.cfg.forceWithCredentials || !this.isApiCall(req)) {\n return next.handle(req);\n }\n\n return next.handle(req.clone({ withCredentials: true }));\n }\n\n private isApiCall(req: HttpRequest): boolean {\n return URL_MATCHER.test(req.url);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { BehaviorSubject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private hideCloseButtonSubject$ = new BehaviorSubject(false);\n hideCloseButton$ = this.hideCloseButtonSubject$.asObservable().pipe(distinctUntilChanged());\n\n setHideCloseButton(value: boolean): void {\n this.hideCloseButtonSubject$.next(value);\n }\n}\n","import { createReducer, on } from '@ngrx/store';\nimport { routerNavigatedAction } from '@ngrx/router-store';\n\nimport { GlobalActions } from '@fcom/core/actions';\nimport { updateStoreAction } from '@fcom/core/store/init-store.action';\nimport { DataUtils, setIn, unique, uniqueBy } from '@fcom/core/utils';\nimport { CustomServiceType, ServiceSelections, ServicesState, ServicesStatus, TravelerService } from '@fcom/dapi';\nimport { Category, FinnairPassengerServiceItem, FinnairServiceBoundItem, SubCategory } from '@fcom/dapi/api/models';\nimport { GlobalBookingActions } from '@fcom/common/store';\nimport { BookingActions, CartActions, OffersActions } from '@fcom/booking/store/actions';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { pathIsWithinHardcodedPath } from '@fcom/core/utils/app-url-utils';\nimport { RootPaths } from '@fcom/core/constants';\nimport { leaveError } from '@fcom/common/store/actions/error.actions';\n\nimport { OrderActions, ServicesActions } from '../actions';\nimport { CartOrOrder } from '../../interfaces';\nimport { isInMmb, isNotIncludedService } from '../../utils/common-booking.utils';\nimport {\n asTravelerService,\n loadBoundSelection,\n updateSelectionPricesFromServiceCatalog,\n} from '../utils/services.utils';\nimport { isBoundBasedCategory, isJourneyBasedCategory } from '../../modules/ancillaries/utils';\nimport { CommonBookingFeatureState } from '../store.interface';\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\n\nconst flightServices = (bounds: Array, flightId: string): FinnairPassengerServiceItem[] => {\n if (!bounds) {\n return [];\n }\n return [\n ...bounds.reduce(\n (allServices, b) => allServices.concat(...(b.segments.find((s) => s.id === flightId)?.passengers || [])),\n []\n ),\n ];\n};\n\nconst getInitialValue = (state: ServicesState, selection: string) =>\n Object.keys(state[selection] || {}).length ? setIn(state, selection, {}) : state;\n\nconst getOnlyIncludedCheckedAndMealsIfModifiable = (cartOrOrderData: CartOrOrder | undefined, category: Category) => {\n const includedServices = cartOrOrderData?.services?.included?.find((s) => s.category === category)?.bounds ?? [];\n return includedServices.map((service) => {\n return {\n ...service,\n segments: service.segments.map((segment) => {\n return {\n ...segment,\n passengers: segment.passengers.map((passengerServiceItem) => {\n return {\n ...passengerServiceItem,\n services: passengerServiceItem.services.filter(\n (s) =>\n SubCategory.CHECKED_BAGGAGE === s.subCategory ||\n ([SubCategory.SPECIAL_DIET, SubCategory.MEAL].includes(s.subCategory) && s.modifiable)\n ),\n };\n }),\n };\n }),\n };\n });\n};\n\nconst loadServiceSelectionsForCategoryFromCartOrOrderData = (\n initialValue: ServicesState,\n cartOrOrderData: CartOrOrder | undefined,\n category: Category,\n multi = false\n) => {\n const unpaidServices = cartOrOrderData?.services?.unpaid?.find((s) => s.category === category)?.bounds ?? [];\n // We support only special diet and checked bags as include services atm\n const includedServices = getOnlyIncludedCheckedAndMealsIfModifiable(cartOrOrderData, category);\n const unpaidAndIncludedServices = unpaidServices.concat(includedServices);\n return (\n unpaidAndIncludedServices.reduce((servicesState: ServicesState, currentBound) => {\n return currentBound.segments.reduce((boundServiceState: ServicesState, currentSegment) => {\n const servicesForFlight = flightServices(unpaidAndIncludedServices, currentSegment.id);\n const newServiceCatalogServices = servicesForFlight\n .filter((passengerServiceItem) => passengerServiceItem.services.length > 0)\n .reduce(\n (passengerServices, service) => {\n const sellableServices = service.services.filter(isNotIncludedService);\n const id = category === Category.COVER ? CustomServiceType.GROUP : service.id;\n if (multi) {\n passengerServices[id] = sellableServices.map((serviceItem) => asTravelerService(serviceItem));\n } else if (isBoundBasedCategory(category)) {\n const boundBasedPassengerServices = loadBoundSelection({ ...service, services: sellableServices });\n passengerServices[id] = ((passengerServices[id] as TravelerService[]) || []).concat(\n boundBasedPassengerServices.filter((passengerService) => passengerService.quantity > 0)\n );\n } else if (sellableServices[0]) {\n passengerServices[id] = asTravelerService(sellableServices[0]);\n }\n return passengerServices;\n },\n {} as { [key: string]: TravelerService | TravelerService[] }\n );\n\n const getFragmentId = () => {\n if (isBoundBasedCategory(category)) {\n return currentBound.id;\n }\n if (isJourneyBasedCategory(category)) {\n return CustomServiceType.JOURNEY;\n }\n return currentSegment.id;\n };\n if (!Object.keys(newServiceCatalogServices).length) {\n return boundServiceState;\n }\n\n return DataUtils.wrap(boundServiceState)\n .setIn(['selections', category as any, getFragmentId()], newServiceCatalogServices)\n .value();\n }, servicesState);\n }, initialValue) || initialValue\n );\n};\n\nexport const initialState: ServicesState = Object.seal({\n status: ServicesStatus.INITIAL,\n campaignsShown: [],\n});\n\nconst loadSelectionsFromCartOrOrder = (state: ServicesState, cartOrOrderData: CartOrOrder): ServicesState => {\n const supportedCategories = [\n Category.CABIN_BAGGAGE,\n Category.BAGGAGE,\n Category.MEAL,\n Category.WIFI,\n Category.LOUNGE,\n Category.COVER,\n Category.PET,\n Category.SPORT,\n Category.SAF,\n ];\n\n // TODO: Current way of loading selections will in some cases result in an incorrect selection state with pax-ancillaries enabled.\n // Refactor to work with pax-ancillaries.\n return supportedCategories.reduce((currentState: ServicesState, category) => {\n const innerState = currentState || state;\n\n currentState = loadServiceSelectionsForCategoryFromCartOrOrderData(\n getInitialValue(innerState, `selections.${category}`),\n cartOrOrderData,\n category,\n category === Category.COVER\n );\n\n return currentState;\n }, null as ServicesState);\n};\n\nexport const servicesReducer = createReducer(\n initialState,\n on(updateStoreAction, (state, { payload, features }) => {\n if (features.includes(COMMON_BOOKING_FEATURE_KEY)) {\n return loadSelectionsFromCartOrOrder(\n state,\n (payload as BookingAppState)?.cart?.cartData ??\n (payload as CommonBookingFeatureState)?.commonBooking?.order?.orderData\n );\n }\n return state;\n }),\n on(ServicesActions.startLoading, (state) => ({ ...state, status: ServicesStatus.PENDING })),\n on(ServicesActions.error, (state) => ({ ...state, status: ServicesStatus.LOAD_ERROR })),\n on(ServicesActions.resetCategory, (state, { category }) =>\n DataUtils.wrap(state).deleteIn(['selections', category]).value()\n ),\n on(ServicesActions.setSelectionsForFragment, (state, { category, fragmentId, selections }) =>\n DataUtils.wrap(state)\n .updateIn(['selections', category as keyof ServiceSelections, fragmentId], () => selections)\n .value()\n ),\n on(ServicesActions.setSelectionForFragmentForTraveler, (state, { category, fragmentId, travelerId, selection }) =>\n DataUtils.wrap(state)\n .updateIn(\n ['selections', category as keyof ServiceSelections, fragmentId, travelerId],\n (currentSelection: TravelerService | TravelerService[]): TravelerService | TravelerService[] => {\n if (Array.isArray(currentSelection)) {\n const selectionExists = currentSelection.find((ser) => ser.variant === selection.variant);\n return selectionExists\n ? currentSelection.map((s) => (s.variant === selection.variant ? selection : s))\n : [...currentSelection, selection];\n }\n\n return selection;\n }\n )\n .value()\n ),\n on(ServicesActions.setCoverForId, (state, { journeyId, travelerId, service }) =>\n DataUtils.wrap(state)\n .updateIn(['selections', Category.COVER, journeyId, travelerId], (covers) => {\n return [service]\n .concat(covers)\n .filter(Boolean)\n .filter(uniqueBy((cover) => cover.variant));\n })\n .value()\n ),\n // TODO: update seat selection similarly to other selections\n on(ServicesActions.setServiceCatalog, (state, { catalog }) => ({\n ...state,\n status: ServicesStatus.OK,\n services: catalog,\n campaignsShown: [],\n ...(state.selections && { selections: updateSelectionPricesFromServiceCatalog(state.selections, catalog) }),\n })),\n on(ServicesActions.setServiceAvailability, (state, { serviceAvailability }) => ({\n ...state,\n serviceAvailability,\n })),\n on(ServicesActions.setCampaignShown, (state, { id }) => ({\n ...state,\n campaignsShown: (Array.isArray(state.campaignsShown) ? state.campaignsShown : []).concat(id).filter(unique),\n })),\n on(ServicesActions.setUpsell, (state, upsell) => ({\n ...state,\n upsell,\n })),\n on(ServicesActions.clearUpsell, (state) => DataUtils.wrap(state).deleteIn(['upsell']).value()),\n on(routerNavigatedAction, (state, { payload }) => {\n if (\n pathIsWithinHardcodedPath(payload.routerState.url, RootPaths.BOOKING_ROOT) ||\n isInMmb(payload.routerState.url)\n ) {\n return state;\n }\n return DataUtils.wrap(state)\n .setIn('status', ServicesStatus.INITIAL)\n .deleteIn('services')\n .deleteIn('selections')\n .deleteIn('upsell')\n .value();\n }),\n on(CartActions.setCartData, (state, { cartData }) => {\n return loadSelectionsFromCartOrOrder({ ...state }, cartData);\n }),\n on(OrderActions.setOrderData, (state, { order }) => {\n return loadSelectionsFromCartOrOrder({ ...state }, order);\n }),\n on(\n ServicesActions.reset,\n // Data Clean-ups: BookingActions\n BookingActions.setTravelType, // @todo Do we need to fix this, as we moved setTravelType from the booking to the globalBooking store?\n BookingActions.selectTravelClass, // @todo Do we need to fix this, as we moved selectTravelClass from the booking to the globalBooking store?\n // Data Clean-ups: GlobalBookingActions\n GlobalBookingActions.setFlights,\n GlobalBookingActions.updateFlight,\n GlobalBookingActions.setPaxAmount,\n GlobalBookingActions.increasePaxAmountField,\n GlobalBookingActions.decreasePaxAmountField,\n // Data Clean-ups: When order created\n GlobalActions.confirmation,\n leaveError,\n // Data Clean-ups: OffersActions\n OffersActions.reset,\n OffersActions.setInboundId,\n OffersActions.setInboundFareFamily,\n OffersActions.setOutboundId,\n OffersActions.setOutboundFareFamily,\n () => ({ ...initialState })\n )\n);\n","import { ROUTER_NAVIGATED } from '@ngrx/router-store';\n\nimport { DataUtils, deleteIn, setIn } from '@fcom/core/utils';\nimport { VOLUNTARY_CHANGE_STEPS } from '@fcom/voluntary-change/voluntary-change-config';\n\nimport { OrderPartStatus, OrderState, OrderStatus, UpdatingOrderPart } from '../store.interface';\nimport { OrderActions } from '../actions';\nimport {\n isChangeFlowStep,\n isInBookingPurchase,\n isInCorporatePortal,\n isInMmb,\n isMmbStep,\n isTravelReady,\n} from '../../utils/common-booking.utils';\nimport { MANAGE_BOOKING_STEPS } from '../../manage-booking-config';\n\nexport const initialState: OrderState = Object.seal({\n orderStatus: OrderStatus.INITIAL,\n});\n\n// Extra type safety to make sure assigned constants are valid keys\ntype OrderStateKey = T extends keyof OrderState ? T : never;\n\nconst ORDER_STATUS: OrderStateKey<'orderStatus'> = 'orderStatus';\nconst ORDER_RESPONSE_ERROR_STATUS: OrderStateKey<'orderResponseErrorStatus'> = 'orderResponseErrorStatus';\nconst ORDER_DATA: OrderStateKey<'orderData'> = 'orderData';\nconst ORDER_FETCH_INFORMATION: OrderStateKey<'orderFetchInformation'> = 'orderFetchInformation';\nconst PNR: OrderStateKey<'PNR'> = 'PNR';\nconst IS_UPDATING: OrderStateKey<'isUpdating'> = 'isUpdating';\n\nconst setOrderPartUpdateStatus = (state: OrderState, newStatus: OrderPartStatus, partIds: string[] = []) =>\n DataUtils.wrap(state)\n .updateIn(IS_UPDATING, (updatingState: UpdatingOrderPart = {}) =>\n partIds.reduce((acc: UpdatingOrderPart, category: string) => setIn(acc, `${category}`, newStatus), updatingState)\n )\n .value();\nconst ACCEPT_TERMS: OrderStateKey<'acceptTerms'> = 'acceptTerms';\nexport function orderReducer(state = initialState, action: OrderActions.ActionsUnion): OrderState {\n switch (action.type) {\n case OrderActions.setOrderData.type:\n return DataUtils.wrap(state)\n .setIn(ORDER_DATA, action.order)\n .setIn(ORDER_STATUS, OrderStatus.OK)\n .deleteIn(ACCEPT_TERMS)\n .value();\n\n case OrderActions.reset.type:\n return initialState;\n\n case OrderActions.loadStart.type:\n return setIn(state, ORDER_STATUS, OrderStatus.PENDING);\n\n case OrderActions.loadError.type:\n return DataUtils.wrap(state)\n .setIn(ORDER_STATUS, OrderStatus.LOAD_ERROR)\n .setIn(ORDER_RESPONSE_ERROR_STATUS, action.status)\n .deleteIn(ORDER_DATA)\n .value();\n case OrderActions.setOrderFetchInformation.type:\n return setIn(state, ORDER_FETCH_INFORMATION, action.orderInformation);\n case OrderActions.setPNR.type:\n return setIn(state, PNR, action.PNR);\n case OrderActions.clearPNR.type:\n return deleteIn(state, PNR);\n case OrderActions.setCategoryUpdating.type:\n return setOrderPartUpdateStatus(\n state,\n OrderPartStatus.UPDATING,\n Array.isArray(action.orderPartIds) ? action.orderPartIds : [action.orderPartIds]\n );\n case OrderActions.resetCategoriesUpdating.type:\n return deleteIn(state, IS_UPDATING);\n case OrderActions.clearCategoryUpdating.type:\n return setOrderPartUpdateStatus(\n state,\n OrderPartStatus.OK,\n Array.isArray(action.orderPartIds) ? action.orderPartIds : [action.orderPartIds]\n );\n\n // Navigate outside confirmation page\n case ROUTER_NAVIGATED: {\n if (isInMmb(action.payload.routerState.url) || isTravelReady(action.payload.routerState.url)) {\n if (\n !isMmbStep(action.payload.routerState.url, MANAGE_BOOKING_STEPS.CONFIRMATION) &&\n !isMmbStep(action.payload.routerState.url, MANAGE_BOOKING_STEPS.CHECKOUT) &&\n !isChangeFlowStep(action.payload.routerState.url, VOLUNTARY_CHANGE_STEPS.PURCHASE_REVIEW)\n ) {\n return DataUtils.wrap(state).deleteIn(ORDER_FETCH_INFORMATION).value();\n }\n return state;\n }\n if (isInBookingPurchase(action.payload.routerState.url) || isInCorporatePortal(action.payload.routerState.url)) {\n return state;\n }\n return DataUtils.wrap(state)\n .setIn(ORDER_STATUS, OrderStatus.INITIAL)\n .deleteIn(ORDER_RESPONSE_ERROR_STATUS)\n .deleteIn(ORDER_DATA)\n .deleteIn(ORDER_FETCH_INFORMATION)\n .deleteIn(PNR)\n .deleteIn(ACCEPT_TERMS)\n .value();\n }\n case OrderActions.acceptTerms.type:\n return setIn(state, ACCEPT_TERMS, action.accept);\n default:\n return state;\n }\n}\n","import { Route } from '@angular/router';\n\nimport { createReducer, on } from '@ngrx/store';\n\nimport { GlobalActions } from '@fcom/core/actions';\nimport { updateStoreAction } from '@fcom/core/store/init-store.action';\nimport { Category, FinnairPassengerServiceItem, FinnairServiceItem } from '@fcom/dapi/api/models';\nimport { FlightSeatSelections, SeatMapState, SeatMapStatus } from '@fcom/common/interfaces/seat-map.interface';\nimport { SeatCharacteristics } from '@fcom/dapi/interfaces';\nimport { compareAsJson, DataUtils } from '@fcom/core/utils';\nimport { GlobalBookingActions } from '@fcom/common/store';\nimport { BookingActions, CartActions, OffersActions } from '@fcom/booking/store/actions';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { RootPaths } from '@fcom/core/constants';\nimport { leaveError } from '@fcom/common/store/actions/error.actions';\n\nimport { OrderActions, SeatMapActions } from '../actions';\nimport { combineIncludedAndUnpaidSeats } from '../../modules/ancillaries/utils';\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\nimport { CommonBookingFeatureState } from '../store.interface';\n\nexport const initialState: SeatMapState = Object.seal({});\n\nconst flightServices = (service: FinnairServiceItem | undefined, flightId: string) => {\n if (!service) {\n return [];\n }\n return [\n ...service.bounds.reduce(\n (allServices, b) => allServices.concat(...(b.segments.find((s) => s.id === flightId)?.passengers || [])),\n []\n ),\n ];\n};\n\nconst toFlightSeatSelections = (\n seatSelectionsInCart: FinnairServiceItem,\n flightId: string,\n includedSeats: FinnairPassengerServiceItem[],\n setPaidStatus: boolean\n): FlightSeatSelections =>\n flightServices(seatSelectionsInCart, flightId).reduce(\n (acc: FlightSeatSelections, service: FinnairPassengerServiceItem) => {\n const seatService = service.services.find((s) => !!s.seatNumber) || service.services[0];\n acc[service.id] = {\n seatNumber: seatService.seatNumber,\n seatType: seatService.seatType,\n characteristics: seatService.characteristics as SeatCharacteristics[],\n paid: setPaidStatus\n ? includedSeats.some((includedSeat) => compareAsJson(includedSeat, service)) &&\n parseFloat(seatService.totalPrice?.amount) > 0\n : false,\n modifiable: seatService.modifiable ?? true,\n ticketed: seatService.ticketed ?? false,\n travelerId: service.id,\n pricePerItem: seatService.unitPrice,\n };\n return acc;\n },\n {}\n );\n\nconst loadSeatSelections = function (\n state: SeatMapState,\n seatSelections: FinnairServiceItem | undefined,\n includedSeats: FinnairServiceItem[],\n setPaidStatus: boolean\n) {\n const clearedSelectionsAndLoadingStatus = Object.keys(state).reduce((s: SeatMapState, currentFlightId: string) => {\n return DataUtils.wrap(s)\n .deleteIn([currentFlightId, 'selections'])\n .updateIn([currentFlightId, 'status'], (status: SeatMapStatus) =>\n status === SeatMapStatus.PENDING ? SeatMapStatus.INITIAL : status\n )\n .value();\n }, state);\n return (\n seatSelections?.bounds.reduce((s: SeatMapState, currentBound) => {\n return currentBound.segments.reduce((s2: SeatMapState, currentSegment) => {\n const newSelections = toFlightSeatSelections(\n seatSelections,\n currentSegment.id,\n includedSeats.flatMap((service) =>\n service.bounds\n .filter((bound) => bound.id === currentBound.id)\n .flatMap((bound) =>\n bound.segments\n .filter((segment) => segment.id === currentSegment.id)\n .flatMap((segment) => segment.passengers)\n )\n ),\n setPaidStatus\n );\n return (\n DataUtils.wrap(s2)\n // Set default value for seat map status\n .updateIn([currentSegment.id, 'status'], (status: SeatMapStatus) => status || SeatMapStatus.INITIAL)\n .setIn([currentSegment.id, 'selections'], newSelections)\n .value()\n );\n }, s);\n }, clearedSelectionsAndLoadingStatus) || clearedSelectionsAndLoadingStatus\n );\n};\n\nfunction isCart(payload: BookingAppState | CommonBookingFeatureState): payload is BookingAppState {\n return !!(payload as BookingAppState)?.cart?.cartData;\n}\n\nfunction getServices(payload: BookingAppState | CommonBookingFeatureState): FinnairServiceItem[] {\n return isCart(payload)\n ? payload?.cart?.cartData?.services.unpaid\n : combineIncludedAndUnpaidSeats(\n payload?.commonBooking?.order?.orderData?.services?.included || [],\n payload?.commonBooking?.order?.orderData?.services?.unpaid || []\n );\n}\n\nexport const seatMapReducer = createReducer(\n initialState,\n on(updateStoreAction, (state, { payload, features }) => {\n if (features.includes(COMMON_BOOKING_FEATURE_KEY)) {\n const services: FinnairServiceItem[] = getServices(payload);\n return loadSeatSelections(\n state,\n services?.find((s) => s.category === Category.SEAT),\n !isCart(payload)\n ? ((payload as CommonBookingFeatureState)?.commonBooking?.order?.orderData?.services?.included ?? []).filter(\n (s) => s.category === Category.SEAT\n )\n : [],\n !isCart(payload)\n );\n }\n return state;\n }),\n on(OrderActions.setOrderData, (state, { order, keepSeatsData }) => {\n // TODO: Should use UX model instead of backend model\n const services: FinnairServiceItem[] = combineIncludedAndUnpaidSeats(\n order?.services?.included ?? [],\n order?.services?.unpaid ?? []\n );\n return loadSeatSelections(\n keepSeatsData ? state : initialState,\n services?.find((s) => s.category === Category.SEAT),\n (order?.services?.included ?? []).filter((s) => s.category === Category.SEAT),\n true\n );\n }),\n on(SeatMapActions.resetSeatSelections, (state, { cartOrOrder }) => {\n const seatServices: FinnairServiceItem = combineIncludedAndUnpaidSeats(\n cartOrOrder?.services?.included ?? [],\n cartOrOrder?.services?.unpaid ?? []\n )?.find((s) => s.category === Category.SEAT);\n const includedSeatServices: FinnairServiceItem[] = (cartOrOrder?.services?.included ?? [])?.filter(\n (s) => s.category === Category.SEAT\n );\n return loadSeatSelections(state, seatServices, includedSeatServices, true);\n }),\n on(SeatMapActions.startLoading, (state, { flightId }) => {\n return DataUtils.wrap(state).mergeIn(flightId, { status: SeatMapStatus.PENDING }).value();\n }),\n on(SeatMapActions.setNoAvailability, (state, { flightId }) => {\n return DataUtils.wrap(state).mergeIn(flightId, { status: SeatMapStatus.OK_NO_AVAILABILITY }).value();\n }),\n on(SeatMapActions.error, (state, { flightId }) => {\n return DataUtils.wrap(state).setIn(flightId, { status: SeatMapStatus.LOAD_ERROR }).value();\n }),\n on(SeatMapActions.setSeatForFlight, (state, { flightId, travelerId, seat }) => {\n return DataUtils.wrap(state)\n .updateIn([flightId, 'selections'], (selections: FlightSeatSelections) => {\n if (!selections) {\n return {};\n }\n const conflictingTravelerIds: string[] = Object.keys(selections)\n .filter((innerTravelerId) => innerTravelerId !== travelerId)\n .filter((innerTravelerId) => !!selections[innerTravelerId])\n .filter((innerTravelerId) => selections[innerTravelerId].seatNumber === seat?.seatNumber);\n\n return conflictingTravelerIds.reduce(\n (_acc, conflictingId) =>\n DataUtils.wrap(selections)\n .setIn([conflictingId, 'seatNumber'], null)\n .setIn([conflictingId, 'seatType'], null)\n .setIn([conflictingId, 'characteristics'], null)\n .value(),\n selections\n );\n })\n .setIn([flightId, 'selections', travelerId, 'seatNumber'], seat?.seatNumber || null)\n .setIn([flightId, 'selections', travelerId, 'seatType'], seat?.type || null)\n .setIn(\n [flightId, 'selections', travelerId, 'characteristics'],\n (seat?.characteristics as SeatCharacteristics[]) || null\n )\n .setIn([flightId, 'selections', travelerId, 'travelerId'], travelerId)\n .setIn([flightId, 'selections', travelerId, 'paid'], false)\n .setIn([flightId, 'selections', travelerId, 'ticketed'], false)\n .setIn([flightId, 'selections', travelerId, 'modifiable'], true)\n .setIn(\n [flightId, 'selections', travelerId, 'pricePerItem'],\n seat?.prices?.find((p) => p.travelerIds.includes(travelerId))?.price\n )\n .value();\n }),\n on(SeatMapActions.setSeatMap, (state, { seatMapForFlight }) => {\n return DataUtils.wrap(state)\n .mergeIn(seatMapForFlight.flightId, {\n status: SeatMapStatus.OK,\n seatMap: seatMapForFlight.seatMap,\n })\n .value();\n }),\n on(SeatMapActions.loadSeatSelectionsFromCart, CartActions.setCartData, (state, { cartData }) => {\n return loadSeatSelections(\n state,\n cartData?.services.unpaid?.find((s) => s.category === Category.SEAT),\n [],\n false\n );\n }),\n on(\n SeatMapActions.reset,\n SeatMapActions.clearSelections,\n BookingActions.setTravelType,\n BookingActions.selectTravelClass,\n GlobalBookingActions.setFlights,\n GlobalBookingActions.updateFlight,\n GlobalBookingActions.setPaxAmount,\n GlobalBookingActions.increasePaxAmountField,\n GlobalBookingActions.decreasePaxAmountField,\n GlobalActions.confirmation,\n leaveError,\n OffersActions.reset,\n OffersActions.setInboundId,\n OffersActions.setInboundFareFamily,\n OffersActions.setOutboundId,\n OffersActions.setOutboundFareFamily,\n (state, action) => {\n if ((action as { route?: Route }).route?.path === RootPaths.MANAGE_BOOKING_ROOT) {\n return state;\n }\n return initialState;\n }\n )\n);\n","import { createReducer, on } from '@ngrx/store';\n\nimport { GlobalActions } from '@fcom/core/actions';\nimport { updateStoreAction } from '@fcom/core/store/init-store.action';\nimport { CartActions } from '@fcom/booking/store/actions';\n\nimport { PaymentState, PaymentStatus } from '../../interfaces';\nimport { PaymentActions } from '../actions';\n\nexport const initialState: PaymentState = Object.seal({\n paymentStatus: PaymentStatus.INITIAL,\n redirectionUrl: null,\n paymentIds: [],\n});\n\ntype PaymentStateKey = T extends keyof PaymentState ? T : never;\n\nconst PAYMENT_STATUS: PaymentStateKey<'paymentStatus'> = 'paymentStatus'; // Persisted\nconst PAYMENT_REDIRECTIONURL: keyof PaymentState = 'redirectionUrl'; // Persisted\n\nexport const paymentReducer = createReducer(\n initialState,\n on(updateStoreAction, CartActions.setCartData, () => {\n return initialState;\n }),\n on(PaymentActions.setPaymentStatus, (state, { status }) => {\n return {\n ...state,\n [PAYMENT_STATUS]: status,\n };\n }),\n on(PaymentActions.setPaymentRedirectionUrl, (state, { url }) => {\n return {\n ...state,\n [PAYMENT_REDIRECTIONURL]: url,\n };\n }),\n on(GlobalActions.paymentVerified, (state) => {\n return {\n ...state,\n [PAYMENT_STATUS]: PaymentStatus.VERIFIED,\n };\n }),\n on(GlobalActions.setPaymentIdPaid, (state, { paymentId }) => {\n return {\n ...state,\n [PAYMENT_STATUS]: PaymentStatus.INITIAL,\n paymentIds: [...new Set([...state.paymentIds, paymentId])],\n };\n }),\n on(GlobalActions.paymentNotPaid, (state) => {\n return {\n ...state,\n [PAYMENT_STATUS]: PaymentStatus.INITIAL,\n };\n })\n);\n","import { ROUTER_NAVIGATED } from '@ngrx/router-store';\n\nimport { setIn } from '@fcom/core/utils';\n\nimport { DisruptionState } from '../store.interface';\nimport { DisruptionActions } from '../actions';\nimport { isInMmb, isMmbStep } from '../../utils/common-booking.utils';\nimport { MANAGE_BOOKING_STEPS } from '../../manage-booking-config';\n\nexport const initialState: DisruptionState = {};\n\nconst KEY = 'selectedBoundId';\n\nexport function disruptionReducer(state = initialState, action: DisruptionActions.ActionsUnion): DisruptionState {\n switch (action.type) {\n case DisruptionActions.setSelectedBoundId.type:\n return setIn(state, KEY, action.selectedBoundId);\n\n case ROUTER_NAVIGATED: {\n if (\n !isInMmb(action.payload.routerState.url) ||\n isMmbStep(action.payload.routerState.url, MANAGE_BOOKING_STEPS.VIEW)\n ) {\n return initialState;\n }\n return state;\n }\n default:\n return state;\n }\n}\n","import { ROUTER_NAVIGATED } from '@ngrx/router-store';\n\nimport { pathIsWithinHardcodedPath } from '@fcom/core/utils/app-url-utils';\nimport { RootPaths } from '@fcom/core/constants';\n\nimport { UpgradeOfferState } from '../store.interface';\nimport { UpgradeOfferActions } from '../actions';\n\nexport const initialState: UpgradeOfferState = {};\n\nexport function upgradeOfferReducer(state = initialState, action: UpgradeOfferActions.ActionsUnion): UpgradeOfferState {\n switch (action.type) {\n case UpgradeOfferActions.setUpgradeOffer.type:\n return action.offer;\n case UpgradeOfferActions.clearUpgradeOffer.type:\n return initialState;\n case ROUTER_NAVIGATED: {\n const isInBooking = pathIsWithinHardcodedPath(action.payload.routerState.url, RootPaths.BOOKING_ROOT);\n if (!isInBooking) {\n return initialState;\n }\n return state;\n }\n default:\n return state;\n }\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { RedirectActions, RedirectActionsUnion } from '../actions';\nimport { RedirectState } from '../store.interface';\n\nexport const initialState: RedirectState = {\n pnr: undefined,\n};\n\nconst reducer = createReducer(\n initialState,\n on(RedirectActions.setPNR, (state, { pnr }) => {\n return {\n ...state,\n pnr,\n };\n }),\n on(RedirectActions.clearPNR, () => initialState)\n);\n\nexport function redirectReducer(state: RedirectState, action: RedirectActionsUnion): RedirectState {\n return reducer(state, action);\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { CommonBookingState } from '../store.interface';\nimport { servicesReducer } from './services.reducer';\nimport { orderReducer } from './order.reducer';\nimport { seatMapReducer } from './seat-map.reducer';\nimport { paymentReducer } from './payment.reducer';\nimport { disruptionReducer } from './disruption.reducer';\nimport { upgradeOfferReducer } from './upgrade-offer.reducer';\nimport { redirectReducer } from './redirect.reducer';\n\nexport const reducers: ActionReducerMap = {\n services: servicesReducer,\n order: orderReducer,\n seatMap: seatMapReducer,\n payment: paymentReducer,\n disruption: disruptionReducer,\n upgradeOffer: upgradeOfferReducer,\n redirect: redirectReducer,\n};\n","import { NgModule } from '@angular/core';\n\nimport { StoreModule } from '@ngrx/store';\n\nimport { COMMON_BOOKING_FEATURE_KEY } from './constants';\nimport { reducers } from './reducers';\n\n@NgModule({\n imports: [StoreModule.forFeature(COMMON_BOOKING_FEATURE_KEY, reducers)],\n})\nexport class CommonBookingStoreModule {}\n","
\n
\n \n \n \n \n \n \n
\n
\n \n {{ translationPrefix + '.required' | finLocalization }}\n \n
\n
\n","import { Component, Input, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils';\nimport { SelectOption } from '@fcom/common/interfaces';\n\n/**\n * @deprecated Use SelectInputComponent from @fcom/ui-components instead.\n */\n@Component({\n selector: 'fin-form-input-select',\n templateUrl: 'form-input-select.component.html',\n styleUrls: ['./form-input-select.component.scss'],\n})\nexport class FormInputSelectComponent implements OnInit, OnDestroy {\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n options: SelectOption[];\n\n @Input()\n id: string;\n\n @Input()\n selectLabelTranslationKey = 'select';\n\n @Input()\n required = false;\n\n @Input()\n displayMargin = true;\n\n isRequired = false;\n idOrControlName: string;\n control: AbstractControl;\n\n @ViewChild('selectElement', { static: true })\n selectElement: ElementRef;\n\n protected subscriptions: Subscription = new Subscription();\n\n get fieldRequired(): boolean {\n return this.required || this.ctrlField.hasValidator(Validators.required);\n }\n\n get ctrlField(): AbstractControl {\n return this.parentForm.get(this.controlName);\n }\n\n ngOnInit(): void {\n this.control = this.ctrlField;\n this.isRequired = this.required || this.fieldRequired;\n this.idOrControlName = this.id || this.controlName;\n this.subscriptions.add(\n this.control.statusChanges.subscribe(() => {\n this.isRequired = this.fieldRequired;\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n setFocus(): void {\n this.selectElement.nativeElement.focus();\n }\n}\n","import { NgModule, Provider, ModuleWithProviders } from '@angular/core';\n\nimport { LocalizationPipe } from './pipes/localization.pipe';\nimport { LanguageService, MockLanguageService } from './services/language.service';\nimport { HasLocalizationKeyPipe } from './pipes/has-localization-key.pipe';\nimport { PluralLocalizationPipe } from './pipes/plural-localization.pipe';\n\nexport interface TranslateModuleConfig {\n languageService?: Provider;\n}\n\n@NgModule({\n declarations: [LocalizationPipe, HasLocalizationKeyPipe, PluralLocalizationPipe],\n exports: [LocalizationPipe, HasLocalizationKeyPipe, PluralLocalizationPipe],\n providers: [LocalizationPipe, HasLocalizationKeyPipe, PluralLocalizationPipe],\n})\nexport class UiTranslateModule {\n /**\n * Use this method in your root module to provide the TranslateService\n */\n static forRoot(config: TranslateModuleConfig = {}): ModuleWithProviders {\n return {\n ngModule: UiTranslateModule,\n providers: [config.languageService || { provide: LanguageService, useClass: MockLanguageService }],\n };\n }\n}\n","export enum DrawerDirection {\n FROM_RIGHT = 'right',\n FROM_LEFT = 'left',\n FROM_BOTTOM = 'bottom',\n}\n","export function getNavigator(): Navigator | undefined {\n return typeof window !== 'undefined' ? window.navigator : undefined;\n}\n\nexport function isChildOfPicture(element: HTMLImageElement | HTMLDivElement): boolean {\n return Boolean(element.parentElement && element.parentElement.nodeName.toLowerCase() === 'picture');\n}\n\nexport function isImageElement(element: HTMLImageElement | HTMLDivElement): element is HTMLImageElement {\n return element.nodeName.toLowerCase() === 'img';\n}\n\nexport function setImage(element: HTMLImageElement | HTMLDivElement, imagePath: string, useSrcset?: boolean) {\n if (isImageElement(element)) {\n if (useSrcset && 'srcset' in element) {\n element.srcset = imagePath;\n } else {\n element.src = imagePath;\n }\n } else {\n element.style.backgroundImage = `url('${imagePath}')`;\n }\n return element;\n}\n\nfunction setSources(attrName: string) {\n return (image: HTMLImageElement) => {\n const sources = image.parentElement!.getElementsByTagName('source');\n for (let i = 0; i < sources.length; i++) {\n const attrValue = sources[i].getAttribute(attrName);\n if (attrValue) {\n // Check if `srcset` is supported by the current browser\n if ('srcset' in sources[i]) {\n sources[i].srcset = attrValue;\n } else {\n sources[i].src = attrValue;\n }\n }\n }\n };\n}\n\nconst setSourcesToDefault = setSources('defaultImage');\nexport const setSourcesToLazy = setSources('lazyLoad');\nconst setSourcesToError = setSources('errorImage');\n\nfunction setImageAndSources(setSourcesFn: (image: HTMLImageElement) => void) {\n return (element: HTMLImageElement | HTMLDivElement, imagePath?: string, useSrcset?: boolean) => {\n if (isImageElement(element) && isChildOfPicture(element)) {\n setSourcesFn(element);\n }\n if (imagePath) {\n setImage(element, imagePath, useSrcset);\n }\n };\n}\n\nexport const setImageAndSourcesToDefault = setImageAndSources(setSourcesToDefault);\nexport const setImageAndSourcesToLazy = setImageAndSources(setSourcesToLazy);\nexport const setImageAndSourcesToError = setImageAndSources(setSourcesToError);\n","import { EventEmitter } from '@angular/core';\nimport { Observable, ObservableInput } from 'rxjs';\nimport { getNavigator } from './util/util';\n\nexport type StateChange = {\n reason: 'setup' | 'observer-emit' | 'start-loading' | 'mount-image' | 'loading-failed' | 'loading-succeeded' | 'finally';\n data?: unknown;\n};\n\nexport type Attributes = {\n /**\n * A reference to the element\n */\n element: HTMLImageElement | HTMLDivElement;\n /**\n * A URI path to the image to be lazyloaded\n */\n imagePath: string;\n /**\n * A URI path to the default image\n */\n defaultImagePath?: string;\n /**\n * A URI path to the error image\n */\n errorImagePath?: string;\n /**\n * If true, use a `srcset` for the image\n */\n useSrcset?: boolean;\n /**\n * Number of pixels to use as offset in all directions\n */\n offset: number;\n /**\n * A reference to the scroll container, if not window\n */\n scrollContainer?: HTMLElement;\n /**\n * A custom customObservable.\n */\n customObservable?: Observable;\n /**\n * If true, try to decode the image before put it to the DOM\n */\n decode?: boolean;\n /**\n * If true, try to decode the image before put it to the DOM\n */\n onStateChange: EventEmitter;\n /**\n * A uniq id for the image\n */\n id: string;\n};\n\nexport abstract class Hooks {\n navigator?: Navigator = getNavigator();\n protected platformId!: Object;\n\n setPlatformId(platformId: Object) {\n this.platformId = platformId;\n }\n\n abstract getObservable(attributes: Attributes): Observable;\n abstract isVisible(event: E, attributes: Attributes): boolean;\n abstract loadImage(attributes: Attributes): ObservableInput;\n abstract setLoadedImage(imagePath: string, attributes: Attributes): void;\n abstract setErrorImage(error: Error, attributes: Attributes): void;\n abstract setup(attributes: Attributes): void;\n abstract finally(attributes: Attributes): void;\n abstract isBot(attributes?: Attributes): boolean;\n abstract isDisabled(): boolean;\n abstract skipLazyLoading(attributes: Attributes): boolean;\n onDestroy(attributes: Attributes): void {}\n onAttributeChange(newAttributes: Attributes): void {}\n}\n","export const cssClassNames = {\n loaded: 'ng-lazyloaded',\n loading: 'ng-lazyloading',\n failed: 'ng-failed-lazyloaded',\n};\n\nexport function removeCssClassName(element: HTMLImageElement | HTMLDivElement, cssClassName: string) {\n element.className = element.className.replace(cssClassName, '');\n}\n\nexport function addCssClassName(element: HTMLImageElement | HTMLDivElement, cssClassName: string) {\n if (!element.className.includes(cssClassName)) {\n element.className += ` ${cssClassName}`;\n }\n}\n\nexport function hasCssClassName(element: HTMLImageElement | HTMLDivElement, cssClassName: string) {\n return element.className && element.className.includes(cssClassName);\n}\n","import { isPlatformServer } from '@angular/common';\nimport { ObservableInput } from 'rxjs';\nimport { Attributes, Hooks } from '../types';\nimport { addCssClassName, cssClassNames, hasCssClassName, removeCssClassName } from '../util/css.util';\nimport { isChildOfPicture, isImageElement, setImage, setImageAndSourcesToDefault, setImageAndSourcesToError, setImageAndSourcesToLazy, setSourcesToLazy } from '../util/util';\n\nexport abstract class SharedHooks extends Hooks {\n setup(attributes: Attributes): void {\n setImageAndSourcesToDefault(attributes.element, attributes.defaultImagePath, attributes.useSrcset);\n if (attributes.imagePath) {\n addCssClassName(attributes.element, cssClassNames.loading);\n }\n\n if (hasCssClassName(attributes.element, cssClassNames.loaded)) {\n removeCssClassName(attributes.element, cssClassNames.loaded);\n }\n }\n\n finally(attributes: Attributes): void {\n addCssClassName(attributes.element, cssClassNames.loaded);\n removeCssClassName(attributes.element, cssClassNames.loading);\n }\n\n loadImage(attributes: Attributes): ObservableInput {\n if (this.skipLazyLoading(attributes)) {\n // Set the image right away for bots for better SEO\n return [attributes.imagePath];\n }\n const { element, useSrcset, imagePath, decode } = attributes;\n let img: HTMLImageElement;\n if (isImageElement(element) && isChildOfPicture(element)) {\n const parentClone = element.parentNode!.cloneNode(true) as HTMLPictureElement;\n img = parentClone.getElementsByTagName('img')[0];\n setSourcesToLazy(img);\n setImage(img, imagePath, useSrcset);\n } else {\n img = new Image();\n if (isImageElement(element) && element.referrerPolicy) {\n img.referrerPolicy = element.referrerPolicy;\n }\n if (isImageElement(element) && element.sizes) {\n img.sizes = element.sizes;\n }\n if (useSrcset && 'srcset' in img) {\n img.srcset = imagePath;\n } else {\n img.src = imagePath;\n }\n }\n\n if (decode && img.decode) {\n return img.decode().then(() => imagePath);\n }\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(imagePath);\n img.onerror = () => reject(null);\n });\n }\n\n setErrorImage(error: Error, attributes: Attributes): void {\n const { element, useSrcset, errorImagePath } = attributes;\n setImageAndSourcesToError(element, errorImagePath, useSrcset);\n addCssClassName(element, cssClassNames.failed);\n }\n\n setLoadedImage(imagePath: string, attributes: Attributes): void {\n const { element, useSrcset } = attributes;\n setImageAndSourcesToLazy(element, imagePath, useSrcset);\n }\n\n isDisabled(): boolean {\n // Disable if SSR and the user isn't a bot\n return isPlatformServer(this.platformId) && !this.isBot();\n }\n\n skipLazyLoading(attributes: Attributes): boolean {\n return this.isBot(attributes);\n }\n\n isBot(attributes?: Attributes): boolean {\n if (this.navigator?.userAgent) {\n return /googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\\ link\\ preview|showyoubot|outbrain|pinterest\\/0\\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|duckduckbot|prerender/i.test(\n this.navigator.userAgent\n );\n }\n return false;\n }\n}\n","import { Observable, of, Subject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { SharedHooks } from '../shared-hooks/hooks';\nimport { Attributes } from '../types';\n\nexport class IntersectionObserverHooks extends SharedHooks<{ isIntersecting: boolean }> {\n private readonly observers = new WeakMap();\n private readonly intersectionSubject = new Subject();\n private readonly uniqKey = {};\n\n getObservable(attributes: Attributes<{ isIntersecting: boolean }>): Observable<{ isIntersecting: boolean }> {\n if (this.skipLazyLoading(attributes)) {\n return of({ isIntersecting: true });\n }\n if (attributes.customObservable) {\n return attributes.customObservable;\n }\n const scrollContainerKey = attributes.scrollContainer || this.uniqKey;\n const options: ObserverOptions = {\n root: attributes.scrollContainer || null,\n };\n if (attributes.offset) {\n options.rootMargin = `${attributes.offset}px`;\n }\n\n let observer = this.observers.get(scrollContainerKey);\n\n if (!observer) {\n observer = new IntersectionObserver((entrys) => this.loadingCallback(entrys), options);\n this.observers.set(scrollContainerKey, observer);\n }\n\n observer.observe(attributes.element);\n\n return Observable.create((obs: Subject) => {\n const subscription = this.intersectionSubject.pipe(filter((entry) => entry.target === attributes.element)).subscribe(obs);\n return () => {\n subscription.unsubscribe();\n observer!.unobserve(attributes.element);\n };\n });\n }\n\n isVisible(event: { isIntersecting: boolean }): boolean {\n return event.isIntersecting;\n }\n\n private loadingCallback(entrys: IntersectionObserverEntry[]) {\n entrys.forEach((entry) => this.intersectionSubject.next(entry));\n }\n}\n\ninterface ObserverOptions {\n root: Element | null;\n rootMargin?: string;\n}\n","import { InjectionToken } from '@angular/core';\nimport { Hooks } from './types';\n\nexport const LAZYLOAD_IMAGE_HOOKS = new InjectionToken('LazyLoadImageHooks');\n","import { AfterContentInit, Directive, ElementRef, EventEmitter, Inject, Input, NgZone, OnChanges, OnDestroy, Output, PLATFORM_ID } from '@angular/core';\nimport { never, Observable, ReplaySubject, Subscription } from 'rxjs';\nimport { switchMap, take, tap } from 'rxjs/operators';\nimport { lazyLoadImage } from './lazyload-image';\nimport { LAZYLOAD_IMAGE_HOOKS } from './token';\nimport { Attributes, Hooks, StateChange } from './types';\n\n@Directive({\n selector: '[lazyLoad]',\n})\nexport class LazyLoadImageDirective implements OnChanges, AfterContentInit, OnDestroy {\n @Input('lazyLoad') lazyImage!: string; // The image to be lazy loaded\n @Input() defaultImage?: string; // The image to be displayed before lazyImage is loaded\n @Input() errorImage?: string; // The image to be displayed if lazyImage load fails\n @Input() scrollTarget?: any; // Scroll container that contains the image and emits scoll events\n @Input() customObservable?: Observable; // Pass your own event emitter\n @Input() offset?: number; // The number of px a image should be loaded before it is in view port\n @Input() useSrcset?: boolean; // Whether srcset attribute should be used instead of src\n @Input() decode?: boolean; // Decode the image before appending to the DOM\n @Input() debug?: boolean; // Will print some debug info when `true`\n @Output() onStateChange: EventEmitter = new EventEmitter(); // Emits an event on every state change\n private propertyChanges$: ReplaySubject;\n private elementRef: ElementRef;\n private ngZone: NgZone;\n private loadSubscription?: Subscription;\n private debugSubscription?: Subscription;\n private hooks: Hooks;\n private uid: string;\n\n constructor(el: ElementRef, ngZone: NgZone, @Inject(PLATFORM_ID) platformId: Object, @Inject(LAZYLOAD_IMAGE_HOOKS) hooks: Hooks) {\n this.elementRef = el;\n this.ngZone = ngZone;\n this.propertyChanges$ = new ReplaySubject();\n this.hooks = hooks;\n this.hooks.setPlatformId(platformId);\n this.uid = Math.random().toString(36).substr(2, 9);\n }\n\n ngOnChanges() {\n if (this.debug === true && !this.debugSubscription) {\n this.debugSubscription = this.onStateChange.subscribe((e: StateChange) => console.log(e));\n }\n\n this.propertyChanges$.next({\n element: this.elementRef.nativeElement,\n imagePath: this.lazyImage,\n defaultImagePath: this.defaultImage,\n errorImagePath: this.errorImage,\n useSrcset: this.useSrcset,\n offset: this.offset ? this.offset | 0 : 0,\n scrollContainer: this.scrollTarget,\n customObservable: this.customObservable,\n decode: this.decode,\n onStateChange: this.onStateChange,\n id: this.uid,\n });\n }\n\n ngAfterContentInit() {\n if (this.hooks.isDisabled()) {\n return null;\n }\n\n this.ngZone.runOutsideAngular(() => {\n this.loadSubscription = this.propertyChanges$\n .pipe(\n tap((attributes) => this.hooks.onAttributeChange(attributes)),\n tap((attributes) => attributes.onStateChange.emit({ reason: 'setup' })),\n tap((attributes) => this.hooks.setup(attributes)),\n switchMap((attributes) => {\n if (!attributes.imagePath) {\n return never();\n }\n return this.hooks.getObservable(attributes).pipe(lazyLoadImage(this.hooks, attributes));\n })\n )\n .subscribe({\n next: () => null,\n });\n });\n }\n\n ngOnDestroy() {\n this.propertyChanges$\n .pipe(take(1))\n .subscribe({ next: (attributes) => this.hooks.onDestroy(attributes) })\n .unsubscribe();\n this.loadSubscription?.unsubscribe();\n this.debugSubscription?.unsubscribe();\n }\n}\n","import { Observable, of } from 'rxjs';\nimport { catchError, filter, map, mergeMap, take, tap } from 'rxjs/operators';\nimport { Attributes, Hooks } from './types';\n\nexport function lazyLoadImage(hooks: Hooks, attributes: Attributes) {\n return (evntObservable: Observable): Observable => {\n return evntObservable.pipe(\n tap((data) => attributes.onStateChange.emit({ reason: 'observer-emit', data })),\n filter((event) => hooks.isVisible(event, attributes)),\n take(1),\n tap(() => attributes.onStateChange.emit({ reason: 'start-loading' })),\n mergeMap(() => hooks.loadImage(attributes)),\n tap(() => attributes.onStateChange.emit({ reason: 'mount-image' })),\n tap((imagePath) => hooks.setLoadedImage(imagePath, attributes)),\n tap(() => attributes.onStateChange.emit({ reason: 'loading-succeeded' })),\n map(() => true),\n catchError((error) => {\n attributes.onStateChange.emit({ reason: 'loading-failed', data: error });\n hooks.setErrorImage(error, attributes);\n return of(false);\n }),\n tap(() => {\n attributes.onStateChange.emit({ reason: 'finally' });\n hooks.finally(attributes);\n })\n ) as Observable;\n };\n}\n","import { NgModule } from '@angular/core';\nimport { LazyLoadImageDirective } from './lazyload-image.directive';\nimport { IntersectionObserverHooks } from './intersection-observer-hooks/hooks';\nimport { LAZYLOAD_IMAGE_HOOKS } from './token';\n\n@NgModule({\n declarations: [LazyLoadImageDirective],\n exports: [LazyLoadImageDirective],\n providers: [{ provide: LAZYLOAD_IMAGE_HOOKS, useClass: IntersectionObserverHooks }],\n})\nexport class LazyLoadImageModule {}\n","export class Rect {\n static empty: Rect = new Rect(0, 0, 0, 0);\n\n left: number;\n top: number;\n right: number;\n bottom: number;\n\n constructor(left: number, top: number, right: number, bottom: number) {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n\n static fromElement(element: HTMLElement): Rect {\n const { left, top, right, bottom } = element.getBoundingClientRect();\n\n if (left === 0 && top === 0 && right === 0 && bottom === 0) {\n return Rect.empty;\n } else {\n return new Rect(left, top, right, bottom);\n }\n }\n\n static fromWindow(_window: Window): Rect {\n return new Rect(0, 0, _window.innerWidth, _window.innerHeight);\n }\n\n inflate(inflateBy: number) {\n this.left -= inflateBy;\n this.top -= inflateBy;\n this.right += inflateBy;\n this.bottom += inflateBy;\n }\n\n intersectsWith(rect: Rect): boolean {\n return rect.left < this.right && this.left < rect.right && rect.top < this.bottom && this.top < rect.bottom;\n }\n\n getIntersectionWith(rect: Rect): Rect {\n const left = Math.max(this.left, rect.left);\n const top = Math.max(this.top, rect.top);\n const right = Math.min(this.right, rect.right);\n const bottom = Math.min(this.bottom, rect.bottom);\n\n if (right >= left && bottom >= top) {\n return new Rect(left, top, right, bottom);\n } else {\n return Rect.empty;\n }\n }\n}\n","import { DdsLanguage } from '../interfaces';\n\nexport const ddsLanguages: { [locale: string]: DdsLanguage } = {\n de_AT: {\n countrySite: 'AT',\n language: 'DE',\n },\n en_AT: {\n countrySite: 'AT',\n language: 'GB',\n },\n en_AU: {\n countrySite: 'AU',\n language: 'GB',\n },\n en_BE: {\n countrySite: 'BE',\n language: 'GB',\n },\n fr_CA: {\n countrySite: 'CA',\n language: 'FR',\n },\n en_CA: {\n countrySite: 'CA',\n language: 'GB',\n },\n de_CH: {\n countrySite: 'CH',\n language: 'DE',\n },\n en_CH: {\n countrySite: 'CH',\n language: 'GB',\n },\n fr_CH: {\n countrySite: 'CH',\n language: 'FR',\n },\n en_CN: {\n countrySite: 'CN',\n language: 'GB',\n },\n zh_CN: {\n countrySite: 'CN',\n language: 'CN',\n },\n zh_HK: {\n countrySite: 'HK',\n language: 'GB',\n },\n en_CZ: {\n countrySite: 'CZ',\n language: 'GB',\n },\n de_DE: {\n countrySite: 'DE',\n language: 'DE',\n },\n en_DE: {\n countrySite: 'DE',\n language: 'GB',\n },\n da_DK: {\n countrySite: 'DK',\n language: 'DK',\n },\n en_DK: {\n countrySite: 'DK',\n language: 'GB',\n },\n en_EE: {\n countrySite: 'EE',\n language: 'GB',\n },\n et_EE: {\n countrySite: 'EE',\n language: 'ET',\n },\n en_ES: {\n countrySite: 'ES',\n language: 'GB',\n },\n es_ES: {\n countrySite: 'ES',\n language: 'ES',\n },\n en_FI: {\n countrySite: 'FI',\n language: 'GB',\n },\n fi_FI: {\n countrySite: 'FI',\n language: 'FI',\n },\n sv_FI: {\n countrySite: 'FI',\n language: 'SE',\n },\n en_FR: {\n countrySite: 'FR',\n language: 'GB',\n },\n fr_FR: {\n countrySite: 'FR',\n language: 'FR',\n },\n en_GB: {\n countrySite: 'GB',\n language: 'GB',\n },\n en_HK: {\n countrySite: 'HK',\n language: 'GB',\n },\n en_HU: {\n countrySite: 'HU',\n language: 'GB',\n },\n en_IE: {\n countrySite: 'IE',\n language: 'GB',\n },\n en_IS: {\n countrySite: 'IS',\n language: 'GB',\n },\n en_IL: {\n countrySite: 'IL',\n language: 'GB',\n },\n en_IN: {\n countrySite: 'IN',\n language: 'GB',\n },\n en_IT: {\n countrySite: 'IT',\n language: 'GB',\n },\n it_IT: {\n countrySite: 'IT',\n language: 'IT',\n },\n en_JP: {\n countrySite: 'JP',\n language: 'GB',\n },\n ja_JP: {\n countrySite: 'JP',\n language: 'JP',\n },\n en_KR: {\n countrySite: 'KR',\n language: 'GB',\n },\n ko_KR: {\n countrySite: 'KR',\n language: 'KO',\n },\n en_LT: {\n countrySite: 'LT',\n language: 'GB',\n },\n en_LV: {\n countrySite: 'LV',\n language: 'GB',\n },\n en_NL: {\n countrySite: 'NL',\n language: 'GB',\n },\n en_NO: {\n countrySite: 'NO',\n language: 'GB',\n },\n no_NO: {\n countrySite: 'NO',\n language: 'NO',\n },\n en_PL: {\n countrySite: 'PL',\n language: 'GB',\n },\n pl_PL: {\n countrySite: 'PL',\n language: 'PL',\n },\n en_RU: {\n countrySite: 'RU',\n language: 'GB',\n },\n ru_RU: {\n countrySite: 'RU',\n language: 'RU',\n },\n en_SE: {\n countrySite: 'SE',\n language: 'GB',\n },\n sv_SE: {\n countrySite: 'SE',\n language: 'SE',\n },\n en_SG: {\n countrySite: 'SG',\n language: 'GB',\n },\n en_TH: {\n countrySite: 'TH',\n language: 'GB',\n },\n en_US: {\n countrySite: 'US',\n language: 'GB',\n },\n};\n\nexport const ddsLocalesToNewLocales = {\n 'at/gb': 'at-en',\n 'au/gb': 'au-en',\n 'be/gb': 'be-en',\n 'ca/gb': 'ca-en',\n 'ch/gb': 'ch-en',\n 'cn/gb': 'cn-en',\n 'cz/gb': 'cz-en',\n 'de/gb': 'de-en',\n 'dk/gb': 'dk-en',\n 'ee/gb': 'ee-en',\n 'es/gb': 'es-en',\n 'fi/gb': 'fi-en',\n 'fr/gb': 'fr-en',\n 'gb/gb': 'gb-en',\n 'hk/gb': 'hk-en',\n 'hu/gb': 'hu-en',\n 'ie/gb': 'ie-en',\n 'il/gb': 'il-en',\n 'in/gb': 'in-en',\n 'is/gb': 'is-en',\n 'it/gb': 'it-en',\n 'jp/gb': 'jp-en',\n 'kr/gb': 'kr-en',\n 'lt/gb': 'lt-en',\n 'lv/gb': 'lv-en',\n 'nl/gb': 'nl-en',\n 'no/gb': 'no-en',\n 'pl/gb': 'pl-en',\n 'ru/gb': 'ru-en',\n 'se/gb': 'se-en',\n 'sg/gb': 'sg-en',\n 'th/gb': 'th-en',\n 'us/gb': 'us-en',\n 'at/de': 'at-de',\n 'ca/fr': 'ca-fr',\n 'ch/de': 'ch-de',\n 'ch/fr': 'ch-fr',\n 'de/de': 'de-de',\n 'ee/et': 'ee-et',\n 'es/es': 'es-es',\n 'fi/fi': 'fi-fi',\n 'fr/fr': 'fr-fr',\n 'it/it': 'it-it',\n 'kr/ko': 'kr-ko',\n 'no/no': 'no-no',\n 'pl/pl': 'pl-pl',\n 'ru/ru': 'ru-ru',\n 'int/gb': 'en',\n 'se/se': 'se-sv',\n 'cn/cn': 'cn-zh',\n 'dk/dk': 'dk-da',\n 'fi/se': 'fi-sv',\n 'jp/jp': 'jp-ja',\n};\n\nexport const ddsLangToNewLang = (url: string): string =>\n ddsLocalesToNewLocales[url?.split('/').slice(1, 3).join('/').toLowerCase()];\n","import { mergeMap } from './mergeMap';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { isFunction } from '../util/isFunction';\n\n/* tslint:disable:max-line-length */\nexport function concatMap>(\n project: (value: T, index: number) => O\n): OperatorFunction>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function concatMap>(\n project: (value: T, index: number) => O,\n resultSelector: undefined\n): OperatorFunction>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function concatMap>(\n project: (value: T, index: number) => O,\n resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R\n): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable, in a serialized fashion waiting for each one to complete before\n * merging the next.\n *\n * Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link concatAll}.\n *\n * ![](concatMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. Each new inner Observable is\n * concatenated with the previous inner Observable.\n *\n * __Warning:__ if source values arrive endlessly and faster than their\n * corresponding inner Observables can complete, it will result in memory issues\n * as inner Observables amass in an unbounded buffer waiting for their turn to\n * be subscribed to.\n *\n * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set\n * to `1`.\n *\n * ## Example\n *\n * For each click event, tick every second from 0 to 3, with no concurrency\n *\n * ```ts\n * import { fromEvent, concatMap, interval, take } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * concatMap(ev => interval(1000).pipe(take(4)))\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n * ```\n *\n * @see {@link concat}\n * @see {@link concatAll}\n * @see {@link concatMapTo}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switchMap}\n *\n * @param project A function that, when applied to an item emitted by the source\n * Observable, returns an Observable.\n * @return A function that returns an Observable that emits the result of\n * applying the projection function (and the optional deprecated\n * `resultSelector`) to each item emitted by the source Observable and taking\n * values from each projected inner Observable sequentially.\n */\nexport function concatMap>(\n project: (value: T, index: number) => O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R\n): OperatorFunction | R> {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","import { createAction, props, State, UPDATE } from '@ngrx/store';\n\nimport { AppState } from '../interfaces';\n\n/**\n * Adds the state synced from local and session storage to the @ngrx/store/init event.\n * Can be used, e.g., when wanting to repopulate data from other parts of the state tree.\n */\nexport const initStoreAction = createAction(State.INIT, props<{ payload: AppState }>());\nexport const updateStoreAction = createAction(UPDATE, props<{ payload: AppState; features: string[] }>());\n","
\n
\n \n
\n {{ label || (translationPrefix + '.label' | finLocalization) }}\n *\n
\n \n

{{ tooltipHeading }}

\n

{{ tooltipContent }}

\n
\n \n \n \n \n \n \n \n {{ option.name ? option.name : (translationPrefix + '.' + option.value | finLocalization) }}\n \n \n \n
\n
\n \n {{ translationPrefix + '.required' | finLocalization }}\n \n
\n
\n","import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Subscription } from 'rxjs';\n\nimport { SelectOption } from '@fcom/common/interfaces';\nimport { unsubscribe } from '@fcom/core/index';\n\nimport { PopoverOptions } from '../../popover';\n\n@Component({\n selector: 'fin-select-input',\n templateUrl: './select-input.component.html',\n styleUrls: ['./select-input.component.scss'],\n})\nexport class SelectInputComponent implements OnInit, OnDestroy, OnChanges {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n options: SelectOption[];\n\n @Input()\n id: string;\n\n @Input()\n selectLabelTranslationKey = 'select';\n\n @Input()\n required: boolean;\n\n @Input()\n displayMargin = true;\n\n idOrControlName: string;\n control: AbstractControl;\n\n @ViewChild('selectElement', { static: true })\n selectElement: ElementRef;\n\n protected subscriptions: Subscription = new Subscription();\n\n get fieldRequired(): boolean {\n return this.required || this.ctrlField.hasValidator(Validators.required);\n }\n\n get showAsterix(): boolean {\n return this.required ?? this.fieldRequired;\n }\n\n get ctrlField(): AbstractControl {\n return this.parentForm.get(this.controlName);\n }\n\n @Input()\n label: string;\n\n @Input()\n tooltipHeading: string;\n\n @Input()\n tooltipContent: string;\n\n @Input()\n tooltipOptions: PopoverOptions;\n\n @Input()\n disableLabel = false;\n\n @Input()\n disableSelectOption = false;\n\n ngOnInit(): void {\n this.control = this.ctrlField;\n this.idOrControlName = this.id || this.controlName;\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n setFocus(): void {\n this.selectElement.nativeElement.focus();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes.options || changes.options.firstChange) {\n return;\n }\n\n /**\n * Without this delay then selecting the value does not update the DOM when the new options\n * have rendered.\n */\n setTimeout(() => {\n const hasValueInOptions = changes.options.currentValue.find((option) => option.value === this.ctrlField.value);\n\n if (!hasValueInOptions) {\n this.ctrlField.patchValue('');\n } else {\n this.ctrlField.patchValue(this.ctrlField.value);\n }\n }, 0);\n }\n}\n","import { FormControl, FormGroup } from '@angular/forms';\n\nimport { CorporateUserRole } from '@fcom/core-api/login';\nimport { LocalDate } from '@fcom/core/utils';\nimport { Attachment } from '@fcom/ui-components/components/interfaces';\nimport { FinnairCabinClass, FinnairPassengerCode } from '@fcom/dapi/api/models';\n\nexport enum CorporateContactRole {\n PRIMARY = 'Online Primary Contact',\n SECONDARY = 'Online Secondary Contact',\n NONE = 'No role',\n}\n\ninterface CorporateContactPerson {\n id: string;\n name: string;\n email: string;\n}\n\nexport interface CorporateUser {\n clientId: string;\n contactRole: CorporateContactRole;\n email: string;\n firstname: string;\n lastname: string;\n role: CorporateUserRole;\n title?: string;\n mobile?: string;\n workPhone?: string;\n jobTitle?: string;\n finnairPlus?: string;\n passportNumber?: string;\n issued?: string;\n expires?: string;\n birthdate?: string;\n nationality?: string;\n userId: string;\n siebelId?: string;\n}\n\nexport interface CompanyAgreement {\n agreementType: string;\n agreementStart: string;\n agreementEnd: string;\n}\n\nexport interface Company {\n agreement1: CompanyAgreement;\n agreement2: CompanyAgreement;\n businessId: string;\n city: string;\n clientId: string;\n corporateCode: string;\n country: string;\n language: string;\n name: string;\n prefecture: string;\n primaryAdmin: CorporateContactPerson;\n province: string;\n secondaryAdmin: CorporateContactPerson;\n state: string;\n street: string;\n territory: string;\n zipcode: string;\n}\n\nexport interface CompanyUpdate {\n street: string;\n zipcode: string;\n city: string;\n primaryAdmin?: string;\n secondaryAdmin?: string;\n}\n\nexport interface CorporateContactForm {\n topic: FormControl;\n message: FormControl;\n attachments: FormControl;\n companyName: FormControl;\n country: FormControl;\n salutation: FormControl;\n firstName: FormControl;\n familyName: FormControl;\n email: FormControl;\n phonePrefix: FormControl;\n phoneNumber: FormControl;\n customerNumber: FormControl;\n}\n\nexport interface CorporateUserForm {\n personalDetails: FormGroup;\n passportDetails: FormGroup;\n userDetails: FormGroup;\n}\n\nexport interface PersonalDetailsForm {\n salutation: FormControl;\n firstName: FormControl;\n lastName: FormControl;\n email: FormControl;\n phonePrefix: FormControl;\n phoneNumber: FormControl;\n dateOfBirth: FormControl;\n workTitle: FormControl;\n fPlusNumber: FormControl;\n}\n\nexport interface PassportDetailsForm {\n passportNumber: FormControl;\n issueDate: FormControl;\n expirationDate: FormControl;\n nationality: FormControl;\n}\n\nexport interface UserDetailsForm {\n role: FormControl;\n}\n\nexport interface CompanyDetailsForm {\n address: FormControl;\n postalCode: FormControl;\n city: FormControl;\n}\n\nexport interface ContactPersonForm {\n primaryContact: FormControl;\n secondaryContact: FormControl;\n}\n\nexport interface CorporateSalesForceUser {\n allowEmails?: boolean;\n birthdate?: string;\n expires?: string;\n firstname: string;\n fplusNumber?: string;\n issued?: string;\n jobTitle?: string;\n lastname: string;\n mobileNumber: string;\n nationality?: string;\n passportNumber?: string;\n role: CorporateUserRole;\n title: string;\n travelingClass?: string;\n upClientId?: string;\n upEmail: string;\n}\n\nexport enum CorporateTripType {\n ONEWAY = 'ONEWAY',\n RETURN = 'RETURN',\n MULTICITY = 'MULTICITY',\n}\n\nexport interface TripPassenger {\n email?: string;\n firstName: string;\n frequentFlyerNumber?: string;\n gender?: 'MALE' | 'FEMALE';\n lastName: string;\n passengerType: FinnairPassengerCode;\n phoneNumber?: string;\n}\n\nexport interface TripFlight {\n bookingClass: FinnairCabinClass;\n flightNumber: string;\n id: string;\n arrival: TripEndPoint;\n departure: TripEndPoint;\n}\n\nexport interface TripBound {\n arrival: TripEndPoint;\n departure: TripEndPoint;\n flights: TripFlight[];\n}\n\nexport interface TripEndPoint {\n dateTime: string;\n locationCode: string;\n locationTitle?: string;\n}\n\nexport interface Trip {\n arrival: TripEndPoint;\n bookingClass: FinnairCabinClass;\n bookingReference: string;\n bounds: TripBound[];\n departure: TripEndPoint;\n flights: TripFlight[];\n passengers: TripPassenger[];\n tripType: CorporateTripType;\n}\n\nexport interface Pagination {\n from: number;\n total: number;\n size: number;\n}\n\nexport interface TripFilterDateRange {\n fromDate: string;\n toDate: string;\n allFlightsInRange?: boolean;\n}\n\nexport interface TripsRequest {\n from?: number;\n size?: number;\n fromSaved?: boolean;\n filter?: TripsFilter;\n}\n\nexport interface TripsFilter {\n searchTerm?: string;\n dateRange?: TripFilterDateRange;\n myTrips?: boolean;\n}\n\nexport interface TripsResponse {\n pagination: Pagination;\n trips: Trip[];\n}\n\nexport interface DataRequest {\n timeUnit: FilterTimeUnit;\n dateRange: TripFilterDateRange;\n fromSaved?: boolean;\n}\n\nexport interface Dataset {\n name: string;\n valueUnit: string;\n total: number;\n rows: DataRow[];\n}\n\nexport interface DataRow {\n xValue: string;\n value: number;\n}\n\nexport interface DataResponse {\n datasets: Dataset[];\n totalTrips: number;\n}\n\nexport interface Data {\n clientId: string;\n response?: DataResponse;\n error?: string;\n}\n\nexport interface DataFilters {\n dateFilter: FormControl;\n}\n\nexport enum DataFilterDateRange {\n LAST_YEAR = 'lastYear',\n YEAR_TO_DATE = 'yearToDate',\n LAST_SIX_MONTHS = 'lastSixMonths',\n}\n\nexport enum FilterTimeUnit {\n WEEK = 'week',\n MONTH = 'month',\n}\n","import { OfferList } from '@fcom/dapi/api/models';\nimport { SortBy } from '@fcom/common-booking';\nimport { FlightFilters } from '@fcom/common-booking/interfaces/flight-filters.interface';\n\nimport { OfferListFetchParams } from '..';\n\nexport enum AirOffersStatus {\n /** There are no offers to show and no request has been fired. */\n INITIAL,\n\n /** A request for loading the air offers has been initiated, but not yet completed */\n PENDING,\n\n /** The request for air offers was successful. */\n OK,\n\n /** The request for air offers resulted in error */\n ERROR,\n\n /** The input for air offers request contains invalid values */\n INVALID_INPUT,\n\n /** No flights or available seats were found for the given input criteria */\n NO_FLIGHTS_FOUND,\n}\n\n// Create a mapping from enum error offers statuses to text status\nexport const AirOffersStatusToText: Partial<{ [key in AirOffersStatus]: string }> = {\n [AirOffersStatus.ERROR]: 'General Error',\n [AirOffersStatus.INVALID_INPUT]: 'Invalid Input',\n [AirOffersStatus.NO_FLIGHTS_FOUND]: 'No flights found',\n};\n\nexport interface AirOffersState {\n /**\n * The current status of the air offers data.\n */\n status: AirOffersStatus;\n\n /**\n * The full response of offers from the Offer API\n */\n currentOffers: OfferList;\n\n /** Last used params for query */\n lastRequestParams?: OfferListFetchParams;\n\n /**\n * Selected id of the outbound flight.\n * Undefined if not selected.\n */\n selectedOutboundId?: string;\n\n /**\n * The fare family code of the selected outbound direction.\n * Undefined if not selected.\n */\n selectedOutboundFareFamilyCode?: string;\n\n /**\n * The id of the selected inbound direction.\n * Undefined if not selected.\n */\n selectedInboundId?: string;\n\n /**\n * The fare family code of the selected inbound direction.\n * Undefined if not selected.\n */\n selectedInboundFareFamilyCode?: string;\n\n /** Saved ticket sort by. Kept on reload. */\n sortBy: SortBy;\n\n /** Filters that will be applied in bounds */\n filters: FlightFilters;\n}\n","import { AbstractControl, AsyncValidatorFn, ValidationErrors } from '@angular/forms';\n\nimport { filter, map, Observable, of, take } from 'rxjs';\nimport { startWith, switchMap } from 'rxjs/operators';\n\nimport { Airport, BookingLocationCodes } from '@fcom/common/interfaces/booking';\nimport { formatTime } from '@fcom/common/pipes/time.pipe';\nimport { ScrollHandleContainerComponent } from '@fcom/common/components/scroll-handle-container/scroll-handle-container.component';\nimport { Step } from '@fcom/common/interfaces';\nimport { TripType } from '@fcom/core/interfaces';\nimport { RAIL_AND_FLY_LOCATION_CODES, RootPaths } from '@fcom/core/constants';\nimport { GlobalBookingFlight, LocationPair } from '@fcom/common/store';\nimport { LoginGender } from '@fcom/core-api/login';\nimport {\n Category,\n FinnairAmount,\n FinnairBoundGroup,\n FinnairBoundItem,\n FinnairCabinClass,\n FinnairCart,\n FinnairDisruptedBoundItem,\n FinnairGender,\n FinnairItineraryItem,\n FinnairItineraryItemFlight,\n FinnairItineraryItemFlightStatus,\n FinnairItineraryItemType,\n FinnairLocation,\n FinnairLowestPrice,\n FinnairOrder,\n FinnairOtherInformation,\n FinnairPassengerItem,\n FinnairPassengerServiceItem,\n FinnairPassengerServiceSelectionItem,\n FinnairServiceBoundItem,\n FinnairServiceCatalogEligibilityCategory,\n FinnairServiceCatalogItemV3,\n FinnairServiceCatalogV3,\n FinnairServiceItem,\n FinnairServices,\n FinnairServiceSegmentItem,\n FinnairTotalPricesDetails,\n FinnairTravelEndpoint,\n ItineraryItem,\n ItineraryItemFlight,\n ItineraryItemLayover,\n SubCategory,\n} from '@fcom/dapi/api/models';\nimport {\n Amount,\n CustomServiceType,\n DapiHttpErrorResponse,\n FinnairServiceItemWithUpsell,\n GroupedServices,\n LegEndpoint,\n ServiceStatus,\n Upsell,\n} from '@fcom/dapi/interfaces';\nimport {\n DateFormat,\n groupBy,\n isEmptyObject,\n isFinnairNorraOrWetLease,\n LocalDate,\n rangeFrom,\n TzDate,\n} from '@fcom/core/utils';\nimport { matchesLastPathSegment, pathIsWithinHardcodedPath } from '@fcom/core/utils/app-url-utils';\nimport { Bound } from '@fcom/dapi/api/models/bound';\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { TranslatedCountryCode } from '@fcom/common/services';\nimport { getIconForServiceCategory } from '@fcom/dapi/utils';\n\nimport {\n BUS_AIRCRAFT_CODE,\n CartOrOrder,\n FinnairBoundItemWithLocation,\n FinnairServiceItemWithIcon,\n GENDER_OPTIONS,\n Title,\n TRAIN_AIRCRAFT_CODE,\n} from '../interfaces';\nimport { isBoundBasedCategory, isJourneyBasedCategory } from '../modules/ancillaries/utils/category.utils';\nimport { combineServices, getPassengerTierLevel } from '../modules/ancillaries/utils/ancillary.utils';\nimport { SmpProduct } from '../modules';\nimport { ButtonState } from '../modules/ancillaries/interfaces';\n\nexport const toAmount = (amount): Amount => ({\n amount: String(amount.amount),\n currencyCode: amount.currencyCode,\n});\n\nexport const isInBookingPurchase = (url: string): boolean =>\n pathIsWithinHardcodedPath(url, RootPaths.BOOKING_ROOT) &&\n (matchesLastPathSegment(url, BOOKING_STEPS.PURCHASE_SUCCESS.path) ||\n matchesLastPathSegment(url, BOOKING_STEPS.CHECKOUT.path));\n\nexport const isInMmb = (url: string): boolean =>\n pathIsWithinHardcodedPath(url, RootPaths.MANAGE_BOOKING_ROOT) &&\n !matchesLastPathSegment(url, RootPaths.MANAGE_BOOKING_ROOT);\n\nexport const isInCorporatePortal = (url: string): boolean => pathIsWithinHardcodedPath(url, RootPaths.CORPORATE);\n\nexport const isTravelReady = (url: string): boolean => matchesLastPathSegment(url, RootPaths.TRAVEL_READY);\n\nexport const isMmbStep = (url: string, step: Step): boolean =>\n pathIsWithinHardcodedPath(url, RootPaths.MANAGE_BOOKING_ROOT) && matchesLastPathSegment(url, step.path);\n\nexport const isChangeFlowStep = (url: string, step: Step): boolean =>\n url.includes([RootPaths.VOLUNTARY_CHANGE_ROOT, step.path].join('/'));\n\nexport const isBoundFlown = (bound: FinnairBoundItem | FinnairDisruptedBoundItem): boolean =>\n allFlightsHaveStatuses(bound, [FinnairItineraryItemFlightStatus.FLOWN]);\n\nexport const isBoundOrFlightConfirmedOrCheckedIn = (\n boundOrFlight: FinnairBoundItem | FinnairItineraryItemFlight\n): boolean => {\n const confirmedOrCheckedIn = [\n FinnairItineraryItemFlightStatus.CONFIRMED,\n FinnairItineraryItemFlightStatus.CHECKED_IN,\n ];\n return isBound(boundOrFlight)\n ? allFlightsHaveStatuses(boundOrFlight, confirmedOrCheckedIn)\n : confirmedOrCheckedIn.includes(boundOrFlight.status);\n};\n\nconst allFlightsHaveStatuses = (\n bound: FinnairBoundItem | FinnairDisruptedBoundItem,\n statuses: FinnairItineraryItemFlightStatus[]\n): boolean => bound.itinerary.filter(isFlight).every((i) => statuses.includes(i.status));\n\nexport const isBound = (\n toBeDetermined: FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight | Bound\n): toBeDetermined is FinnairBoundItem | FinnairDisruptedBoundItem | Bound =>\n toBeDetermined && !!(toBeDetermined as FinnairBoundItem | FinnairDisruptedBoundItem | Bound).itinerary;\n\nconst asTimeAndWeekDay = (dateTime: string, translations: unknown): string =>\n `${formatTime(dateTime)} ${new DateFormat(translations).format(dateTime, DateFormat.WEEKDAY_SHORT)}`;\n\nexport const legEndpointToUfoAirport = (\n legEndpoint: LegEndpoint | FinnairTravelEndpoint,\n translations: unknown,\n locations?: { [key: string]: FinnairLocation }\n): Airport => {\n if (!legEndpoint) {\n return undefined;\n }\n const { dateTime, locationCode } = legEndpoint;\n const location = locations?.[locationCode];\n return {\n dateTime: asTimeAndWeekDay(dateTime, translations),\n airportCode: locationCode,\n city: location?.cityName ?? (legEndpoint as LegEndpoint).cityName,\n airport: location?.name ?? (legEndpoint as LegEndpoint).name,\n };\n};\n\n/**\n * Only feasible for cart model checking\n * @param totalPrices\n */\nexport const isAwardBooking = (totalPrices: FinnairTotalPricesDetails): boolean =>\n !!totalPrices?.total?.total?.totalPoints;\n\nexport const numberOfDaysInMonth = (year: number): number[] => {\n return rangeFrom(1, 12).map((m) => LocalDate.getAmountOfDaysInMonth(year, m));\n};\n\nexport const getAircraftTailForFlight = (flight: FinnairItineraryItemFlight): string => {\n if (isBus(flight)) {\n return BUS_AIRCRAFT_CODE.toLowerCase();\n }\n\n if (isTrain(flight)) {\n return TRAIN_AIRCRAFT_CODE.toLowerCase();\n }\n\n if (flight.operatingAirline?.name === 'Iberia for Finnair') {\n return 'IB';\n }\n\n return flight.operatingAirline?.code;\n};\n\nconst isBus = (flight: FinnairItineraryItemFlight): boolean =>\n flight?.aircraft?.code?.toUpperCase() === BUS_AIRCRAFT_CODE;\n\nconst isTrain = (flight: FinnairItineraryItemFlight): boolean =>\n flight?.aircraft?.code?.toUpperCase() === TRAIN_AIRCRAFT_CODE;\n\nexport const isBusOrTrain = (flight: FinnairItineraryItemFlight): boolean => isBus(flight) || isTrain(flight);\n\nexport const getTails = (\n boundOrFlight: FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight\n): string[] => {\n const tails: string[] = isBound(boundOrFlight)\n ? boundOrFlight.itinerary\n .filter(isFlight)\n .flatMap((itinerary: FinnairItineraryItemFlight) => getAircraftTailForFlight(itinerary))\n : [getAircraftTailForFlight(boundOrFlight)];\n return tails.filter((tail) => tail);\n};\n\nconst checkBoundsOrSegmentsAllFlightsMatchesWithFn = (\n boundOrFlight: FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight,\n fn: (flight: FinnairItineraryItemFlight) => boolean\n): boolean => {\n return isBound(boundOrFlight) ? boundOrFlight.itinerary.filter(isFlight).every(fn) : fn(boundOrFlight);\n};\n\nexport const isByBusOnly = (\n boundOrFlight: FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight\n): boolean => checkBoundsOrSegmentsAllFlightsMatchesWithFn(boundOrFlight, isBus);\nexport const isByTrainOnly = (\n boundOrFlight: FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight\n): boolean => checkBoundsOrSegmentsAllFlightsMatchesWithFn(boundOrFlight, isTrain);\n\nexport function isUsingSAF(\n boundOrFlight:\n | FinnairBoundItemWithLocation\n | FinnairBoundItem\n | FinnairDisruptedBoundItem\n | Bound\n | FinnairItineraryItemFlight\n): boolean {\n return isBound(boundOrFlight)\n ? boundOrFlight.itinerary.some((itineraryItem) => isSegmentUsingSAF(itineraryItem))\n : isSegmentUsingSAF(boundOrFlight);\n}\n\nexport function isSegmentUsingSAF(segment: FinnairItineraryItem | ItineraryItemFlight): boolean {\n if (!isFlight(segment)) {\n return false;\n }\n const opAirline = segment.operatingAirline;\n return !isBus(segment) && isFinnairNorraOrWetLease(opAirline.name, opAirline.code);\n}\n\n/**\n * Priority services aren't available if first leg is on bus and second is code share flight\n * @param itineraries\n * @returns {boolean}\n */\nexport const priorityServicesAvailable = (itineraries: (ItineraryItemFlight | ItineraryItemLayover)[]): boolean => {\n const legs: FinnairItineraryItemFlight[] = itineraries.filter(isFlight);\n if (legs.length <= 1) {\n return true;\n }\n const airLine = legs[1].operatingAirline;\n return !isByBusOnly(legs[0]) || isFinnairNorraOrWetLease(airLine?.name, airLine?.code);\n};\n\nexport const getDapiErrorKey = (err: unknown): string => {\n const error = (err as DapiHttpErrorResponse)?.error;\n return `${error?.key ?? 'UNKNOWN_ERROR'}_${error?.errorType ?? 'UNKNOWN_TYPE'}`;\n};\n\nexport const loginGenderToGenderOption = (loginGender: LoginGender): string => {\n const genderMap = {\n [LoginGender.MALE]: GENDER_OPTIONS[0].value,\n [LoginGender.FEMALE]: GENDER_OPTIONS[1].value,\n };\n\n return genderMap[loginGender];\n};\n\nexport const corporateSalutationToGenderOption = (title: string): string | undefined => {\n switch (title) {\n case 'Mr.':\n return 'mr';\n case 'Mrs.':\n case 'Ms.':\n return 'ms';\n default:\n return undefined;\n }\n};\n\nexport const finnairGenderToGenderOption = (finnairGender: FinnairGender): 'mr' | 'ms' => {\n const genderMap = {\n [FinnairGender.MALE]: GENDER_OPTIONS[0].value,\n [FinnairGender.FEMALE]: GENDER_OPTIONS[1].value,\n };\n\n return genderMap[finnairGender];\n};\n\nexport const titleToLoginGender = (title: string): LoginGender => {\n const genderMap = {\n [Title.MR]: LoginGender.MALE,\n [Title.MS]: LoginGender.FEMALE,\n [Title.MRS]: LoginGender.FEMALE,\n };\n\n return genderMap[title];\n};\n\nexport const titleToGender = (title: string): FinnairGender | undefined => {\n const genderMap = {\n MR: FinnairGender.MALE,\n MS: FinnairGender.FEMALE,\n MRS: FinnairGender.FEMALE,\n };\n\n return genderMap[title];\n};\n\nexport const getCabinClassShortCode = (cabinClass: string): string => {\n const map = {\n [FinnairCabinClass.ECONOMY]: 'E',\n [FinnairCabinClass.ECOPREMIUM]: 'PE',\n [FinnairCabinClass.BUSINESS]: 'B',\n [FinnairCabinClass.FIRST]: 'F',\n };\n return map[cabinClass] || '';\n};\n\nexport const getBrandNameShortCode = (brandName: string): string => {\n const name = brandName?.toUpperCase() || '';\n if (name.includes('LIGHT')) {\n return 'L';\n } else if (name.includes('CLASSIC')) {\n return 'C';\n } else if (name.includes('FLEX')) {\n return 'F';\n }\n return '';\n};\n\nexport const adjustFareFamilyOptionHeight = (\n scrollContainer: ScrollHandleContainerComponent,\n fareHeaderSelectors: string,\n property: string\n): void => {\n if (!scrollContainer) {\n return;\n }\n\n const fareHeaders: HTMLElement[] = Array.from(\n scrollContainer.container.nativeElement.querySelectorAll(fareHeaderSelectors)\n );\n fareHeaders.forEach((e) => {\n e.style[property] = 'auto';\n });\n\n const itemHeights = fareHeaders.map((e) => e.getBoundingClientRect().height);\n const maxHeight = Math.max(...itemHeights);\n fareHeaders.forEach((e) => {\n e.style[property] = `${maxHeight}px`;\n });\n};\n\nexport const getTripTypeFromBookingLocationCodes = (locations: BookingLocationCodes[]): TripType => {\n if (locations.length === 1) {\n return TripType.ONEWAY;\n }\n\n if (\n locations.length === 2 &&\n locations[0].originLocationCode === locations[1].destinationLocationCode &&\n locations[0].destinationLocationCode === locations[1].originLocationCode\n ) {\n return TripType.RETURN;\n }\n\n return TripType.MULTICITY;\n};\n\nexport const getLocationPairFromGlobalBookingFlights = (flights: GlobalBookingFlight[]): LocationPair[] => {\n return flights.map((flight) => {\n return {\n origin: flight.origin,\n destination: flight.destination,\n };\n });\n};\n\nexport const getTripTypeFromGlobalBookingFlights = (flights: GlobalBookingFlight[]): TripType => {\n return getTripTypeFromBookingLocationCodes(\n flights.map((flight) => {\n return {\n originLocationCode: flight.origin?.locationCode,\n destinationLocationCode: flight.destination?.locationCode,\n };\n })\n );\n};\n\nexport const getTripTypeFromBounds = (bounds: FinnairBoundItem[]): TripType => {\n return getTripTypeFromBookingLocationCodes(\n bounds.map((bound) => {\n return {\n originLocationCode: bound.departure.locationCode,\n destinationLocationCode: bound.arrival.locationCode,\n };\n })\n );\n};\n\n/**\n * Determine if there is cancelation with no alternative\n * @param bound\n */\nexport const isCancelledFlightWithNoAlternative = (bound: FinnairBoundItem): boolean =>\n [...bound.itinerary, ...(bound.disruptedBound?.disruptedBound?.itinerary ?? [])].some(\n (flight: FinnairItineraryItemFlight) =>\n flight.type === FinnairItineraryItemType.FLIGHT && flight.status === FinnairItineraryItemFlightStatus.CANCELED\n ) ?? false;\n\n/**\n * Determine if there is disrupted bound in the booking\n * @param booking Information about the whole booking\n */\nexport const bookingHasDisruption = (booking: FinnairOrder): boolean =>\n (booking?.eligibilities.acknowledge.some((eligility) => eligility.isAllowedToUse) ||\n booking?.bounds.some((bound) => isCancelledFlightWithNoAlternative(bound))) ??\n false;\n\nexport const bookingHasCoverService = (booking: FinnairOrder): boolean =>\n booking?.services?.included.some((includedService) => includedService.category === Category.COVER);\n\nexport const getAllFlightsFromCartOrOrder = (cartData: CartOrOrder): FinnairItineraryItemFlight[] =>\n cartData.bounds?.reduce((all, bound) => all.concat(bound.itinerary.filter(isFlight)), []);\n\nexport const isTourOperator = (hasOtherInformation: { otherInformation: FinnairOtherInformation }): boolean =>\n !!hasOtherInformation?.otherInformation?.tourOperator;\n\nexport const isNotIncludedService = (\n service: FinnairPassengerServiceSelectionItem\n): service is FinnairPassengerServiceSelectionItem => {\n return !service.includedInTicketType && !service.includedInTierBenefit;\n};\n\n/**\n * Check if a ItineraryItem is a flight or bus by checking the itineraryItem.type property.\n */\nexport const isFlight = (value: FinnairItineraryItem | ItineraryItem): value is FinnairItineraryItemFlight => {\n return value.type === FinnairItineraryItemType.FLIGHT;\n};\n\nexport const hasBusSegment = (order: FinnairOrder): boolean =>\n order.bounds.some((bound) =>\n bound.itinerary.filter(isFlight).some((i: FinnairItineraryItemFlight) => isByBusOnly(i))\n );\n\nconst isCatalogHavingService = (\n servicesToSell: FinnairServiceCatalogItemV3['services'],\n eligibilities: FinnairServiceCatalogEligibilityCategory['services'],\n bound: FinnairBoundItem\n): boolean => {\n const servicesForPaxes = servicesToSell[bound.id]\n ? [servicesToSell[bound.id]]\n : bound.itinerary\n .filter(isFlight)\n .map((flight) => servicesToSell[flight.id])\n .filter(Boolean);\n\n return servicesForPaxes.some((servicesForPax) => {\n return Object.entries(servicesForPax).some(([paxId, paxServices]) => {\n return paxServices.length > 0 && isBoundHavingEligibilityForPax(eligibilities, bound, paxId);\n });\n });\n};\n\nconst isBoundHavingEligibilityForPax = (\n eligibilities: FinnairServiceCatalogEligibilityCategory['services'],\n bound: FinnairBoundItem,\n paxId: string\n): boolean => {\n const realEligibilities = eligibilities[bound.id]\n ? [eligibilities[bound.id]]\n : bound.itinerary\n .filter(isFlight)\n .map((flight) => eligibilities[flight.id])\n .filter(Boolean);\n return realEligibilities.some((eligibilityForPax) => eligibilityForPax[paxId]?.isAllowedToUse);\n};\n\nexport const isBoundAirDiscount = (bound: FinnairBoundGroup): boolean =>\n Boolean(bound.originalCheapestPrice) && bound.fareFamilies.every((ff) => ff.discountReasonCode);\n\nexport const shouldWeSellForCategory = (category: Category, order: FinnairOrder, bound?: FinnairBoundItem): boolean => {\n const servicesToSell = order.serviceCatalog?.categories?.find((c) => c.category === category)?.services ?? {};\n const eligibilities =\n order.eligibilities.serviceCatalog?.categories?.find((c) => c.category === category)?.services ?? {};\n\n const bounds = bound ? [bound] : order.bounds;\n\n return bounds.some((currentBound) => isCatalogHavingService(servicesToSell, eligibilities, currentBound));\n};\n\nexport const passengersMissingCategoryService = (\n category: Category,\n cartOrOrder: CartOrOrder,\n bound?: FinnairBoundItem | FinnairDisruptedBoundItem,\n useEvery: boolean = true\n): boolean => {\n const eligibilities =\n cartOrOrder.eligibilities.serviceCatalog?.categories?.find((c) => c.category === category)?.services ?? {};\n\n const fragmentIds = isBoundBasedCategory(category)\n ? bound\n ? [bound.id]\n : cartOrOrder.bounds.map((b) => b.id)\n : (bound ? bound.itinerary.filter(isFlight) : cartOrOrder.bounds.flatMap((b) => b.itinerary).filter(isFlight)).map(\n ({ id }) => id\n );\n\n const eligibilitiesToUse = Object.entries(eligibilities).reduce((all, [fragmentId, eligibility]) => {\n if (fragmentIds.includes(fragmentId)) {\n all[fragmentId] = eligibility;\n }\n return all;\n }, {});\n\n const servicesForSegments =\n combineServices([cartOrOrder.services.included, cartOrOrder.services.unpaid])\n ?.find((service) => service.category === category)\n ?.bounds.filter((b) => (bound ? b.id === bound.id : true))\n .flatMap((b) => b.segments) ?? [];\n\n const predicateFunc = ([fragmentId, paxEligibilityForFlight]) => {\n const eligiblePaxIds = Object.keys(paxEligibilityForFlight)\n .filter((paxId) => paxEligibilityForFlight[paxId].isAllowedToUse)\n .sort()\n .join('');\n\n // for bounds we check the first segment\n const services = !isBoundBasedCategory(category)\n ? servicesForSegments.find((segment) => segment.id === fragmentId)\n : servicesForSegments[0];\n\n const paxIdsHavingService =\n services?.passengers\n .filter((p) => p.services.filter(isNotIncludedService).length > 0)\n .flatMap((p) => p.id)\n .sort()\n .join('') ?? '';\n\n return paxIdsHavingService !== eligiblePaxIds;\n };\n\n const noServiceForAllPassengerOnAnySegment = useEvery\n ? Object.entries(eligibilitiesToUse).every(predicateFunc)\n : Object.entries(eligibilitiesToUse).some(predicateFunc);\n\n return (\n Object.values(eligibilitiesToUse)\n .flatMap((s) => Object.values(s))\n .some((e) => e.isAllowedToUse) && noServiceForAllPassengerOnAnySegment\n );\n};\n\nexport const servicePresentedInServices = (\n services: FinnairServices,\n category: Category,\n whereToSearchArray: Exclude[] = ['included', 'pending', 'unpaid']\n): boolean =>\n whereToSearchArray\n .reduce((acc, key) => [...acc, ...(services[key]?.flatMap(({ category }) => category) || [])], [])\n .includes(category);\n\nexport const checkIfAdditionalEmailExists = (\n value: string,\n additionalEmails$: Observable\n): Observable => {\n return additionalEmails$.pipe(\n take(1),\n map((emails) => emails?.includes(value))\n );\n};\n\nexport const additionalEmailValidator = (additionalEmails$: Observable): AsyncValidatorFn => {\n return (control: AbstractControl): Observable => {\n return checkIfAdditionalEmailExists(control.value, additionalEmails$).pipe(\n map((result) => {\n return result ? { duplicate: true } : null;\n })\n );\n };\n};\n\n/**\n * Splits phone number into country code and national number\n * E.g. +358401234567 -> ['FI|358', '401234567']\n * @param phoneNumberWithCountryCode\n * @param countryCodes\n */\nexport const splitPhoneNumber = (\n phoneNumberWithCountryCode: string,\n countryCodes: TranslatedCountryCode[]\n): [string, string] => {\n if (!phoneNumberWithCountryCode) {\n return [undefined, phoneNumberWithCountryCode];\n }\n\n const onlyNumbers = phoneNumberWithCountryCode.replace(/\\D/g, '');\n\n const start = 0;\n let found = false,\n len = 1,\n countryCode: TranslatedCountryCode;\n while (!found && len < 4) {\n const predicate = onlyNumbers.substring(start, start + len);\n countryCode = countryCodes.find((cc) => cc.phonePrefix === predicate);\n found = !!countryCode;\n len++;\n }\n if (found) {\n return [\n `${countryCode.countryCode}|${countryCode.phonePrefix}`,\n onlyNumbers.slice(onlyNumbers.indexOf(countryCode.phonePrefix) + countryCode.phonePrefix.length),\n ];\n }\n return [undefined, phoneNumberWithCountryCode];\n};\n\nexport const getServiceStatus = (\n service: FinnairPassengerServiceSelectionItem,\n isCarrierConnect = false,\n includeAssignAtAirportStatus = false\n): ServiceStatus.CONFIRMED | ServiceStatus.PENDING_PAYMENT | ServiceStatus.ASSIGN_AT_AIRPORT => {\n return service.includedInTierBenefit || service.ticketed || service.includedInTicketType\n ? isAssignAtAirportSeat(service, includeAssignAtAirportStatus, isCarrierConnect)\n ? ServiceStatus.ASSIGN_AT_AIRPORT\n : ServiceStatus.CONFIRMED\n : ServiceStatus.PENDING_PAYMENT;\n};\n\nexport const isAssignAtAirportSeat = (\n service: FinnairPassengerServiceSelectionItem,\n includeAssignAtAirportStatus = false,\n isCarrierConnect = false\n): boolean => {\n return (\n service.subCategory === SubCategory.SEAT &&\n includeAssignAtAirportStatus &&\n isNotIncludedService(service) &&\n !isCarrierConnect &&\n !service.seatNumber\n );\n};\n\nconst getIconForService = (\n service: FinnairPassengerServiceSelectionItem,\n isCarrierConnect = false,\n includeAssignAtAirportStatus = false\n): 'checkmark' | 'shopping-cart' | 'time-zone' =>\n service.includedInTierBenefit || service.ticketed || service.includedInTicketType\n ? isAssignAtAirportSeat(service, includeAssignAtAirportStatus, isCarrierConnect)\n ? 'time-zone'\n : 'checkmark'\n : 'shopping-cart';\n\nconst isSameServiceItem = (\n servItem1: FinnairPassengerServiceSelectionItem,\n servItem2: FinnairPassengerServiceSelectionItem\n): boolean =>\n servItem1.variant === servItem2.variant &&\n servItem1.parameters?.baggageWeight === servItem2.parameters?.baggageWeight &&\n servItem1.totalPrice?.amount === servItem2.totalPrice?.amount &&\n servItem1.ticketed === servItem2.ticketed;\n\nconst sortIds = {\n confirmed: 2,\n pendingPayment: 1,\n availableForSell: 0,\n};\n\nexport const getGroupedServices = (\n allServices: FinnairPassengerServiceSelectionItem[] = [],\n tierLevel?: string,\n variantsWeCanSell: string[] = [],\n availableServices: FinnairPassengerServiceSelectionItem[] = [],\n isCarrierConnect = false,\n includeAssignAtAirportStatus = false\n): GroupedServices[] => {\n const filteredAvailableServices = availableServices.filter((service) => {\n return !allServices.some(\n (s) => s.subCategory === service.subCategory || s.subCategory.toLowerCase().includes(service.subCategory)\n );\n });\n\n const servicesByKey = groupBy(allServices, (service) =>\n getServiceStatus(service, isCarrierConnect, includeAssignAtAirportStatus)\n );\n\n const services = Object.entries(servicesByKey).map(\n ([key, innerServices]) =>\n ({\n key,\n icon: getIconForService(innerServices[0], isCarrierConnect, includeAssignAtAirportStatus),\n services: accumulateServicePrices(consolidateServiceAccumulateQuantities(innerServices)),\n showActionsButtons:\n key === ServiceStatus.PENDING_PAYMENT &&\n innerServices.some((s) => s.seatNumber || variantsWeCanSell.includes(s.variant)),\n tierLevel: tierLevel,\n }) as GroupedServices\n );\n\n const groupedServices =\n services.flatMap((s) => s.services.filter(isNotIncludedService)).length === 0 &&\n filteredAvailableServices.length > 0\n ? services.concat([\n {\n key: ServiceStatus.AVAILABLE_FOR_SELL,\n services: filteredAvailableServices,\n showActionsButtons: false,\n tierLevel: tierLevel,\n } as GroupedServices,\n ])\n : services;\n\n return groupedServices.sort((serviceA, serviceB) => sortIds[serviceB.key] - sortIds[serviceA.key]);\n};\n\nconst consolidateServiceAccumulateQuantities = (\n services: FinnairPassengerServiceSelectionItem[]\n): FinnairPassengerServiceSelectionItem[] => {\n return services.reduce((consolidatedServices, service) => {\n const consolidatedService = consolidatedServices.find((s) => isSameServiceItem(service, s));\n if (consolidatedService) {\n consolidatedService.quantity += service.quantity;\n } else {\n consolidatedServices.push({ ...service });\n }\n return consolidatedServices;\n }, []);\n};\n\nconst accumulateServicePrices = (\n services: FinnairPassengerServiceSelectionItem[]\n): FinnairPassengerServiceSelectionItem[] => {\n return services.reduce((consolidatedPriceServices, service) => {\n const consolidatedServiceWithPrice =\n service.includedInTicketType || service.includedInTierBenefit\n ? service\n : {\n ...service,\n totalPrice: getServicePrice(service.unitPrice, service.quantity),\n };\n consolidatedPriceServices.push(consolidatedServiceWithPrice);\n return consolidatedPriceServices;\n }, []);\n};\n\nconst getServicePrice = (price: FinnairAmount, quantity: number) => {\n return price?.amount\n ? {\n ...price,\n amount: (parseFloat(price.amount) * quantity).toFixed(2),\n }\n : price;\n};\n\nconst mapPassenger = (bookingPassenger: FinnairPassengerItem): FinnairPassengerServiceItem => ({\n id: bookingPassenger.id,\n firstName: bookingPassenger.firstName,\n lastName: bookingPassenger.lastName,\n services: [],\n});\n\nconst fulfillServicesBoundWithPassenger = (\n bookingBound: FinnairBoundItem,\n service: FinnairServiceItem,\n bookingPassengers: FinnairPassengerItem[]\n): FinnairServiceBoundItem => {\n const existedServiceBound = service.bounds.find((bound) => bound.id == bookingBound.id);\n\n if (existedServiceBound) {\n return {\n ...existedServiceBound,\n segments: bookingBound.itinerary.filter(isFlight).map((itineraryItem) => {\n const foundItem = existedServiceBound.segments.find((segment) => segment.id === itineraryItem.id);\n\n if (foundItem) {\n return {\n ...foundItem,\n passengers: bookingPassengers.map((bookingPassenger) => {\n const existingPassenger = foundItem.passengers.find((passenger) => passenger.id === bookingPassenger.id);\n\n return existingPassenger || mapPassenger(bookingPassenger);\n }),\n };\n }\n return {\n arrival: itineraryItem.arrival,\n departure: itineraryItem.departure,\n id: itineraryItem.id,\n passengers: bookingPassengers.map(mapPassenger),\n quantity: 1,\n totalPrice: {},\n } as FinnairServiceSegmentItem;\n }),\n } as FinnairServiceBoundItem;\n } else {\n return {\n id: bookingBound.id,\n totalPrice: {},\n segments: bookingBound.itinerary.filter(isFlight).map((itineraryItem) => ({\n arrival: itineraryItem.arrival,\n departure: itineraryItem.departure,\n id: itineraryItem.id,\n passengers: bookingPassengers.map(mapPassenger),\n quantity: 1,\n totalPrice: {},\n })),\n } as FinnairServiceBoundItem;\n }\n};\n\nconst upsellForCategory = (\n category: Category,\n bound: FinnairBoundItem,\n catalog: FinnairServiceCatalogV3 | undefined\n) => {\n const categoriesWithUpsell = [\n Category.CABIN_BAGGAGE,\n Category.BAGGAGE,\n Category.MEAL,\n Category.SEAT,\n Category.WIFI,\n Category.SPORT,\n Category.LOUNGE,\n Category.PET,\n ] as Category[];\n\n const catalogForCategory = catalog?.categories.find((c) => c.category === category);\n const fragmentIds = isJourneyBasedCategory(category)\n ? [CustomServiceType.JOURNEY]\n : isBoundBasedCategory(category)\n ? [bound.id]\n : bound.itinerary.filter(isFlight).map((flight) => flight.id);\n\n return (\n categoriesWithUpsell.includes(category) &&\n fragmentIds.some(\n (fragmentId) =>\n !!catalogForCategory?.services[fragmentId] ||\n (catalogForCategory?.category === Category.SEAT && !!catalogForCategory?.lowestPrice[fragmentId])\n )\n );\n};\n\nconst createEmptyServiceFromCatalog = (\n category: Category,\n bound: FinnairBoundItem,\n catalogForCategory: FinnairServiceCatalogItemV3\n): FinnairServiceItem => {\n return {\n ...catalogForCategory,\n bounds: [{ id: bound.id, segments: [], totalPrice: null, quantity: 0 }],\n category,\n quantity: 0,\n title: catalogForCategory.translations.title,\n };\n};\n\nexport const getLowestPrice = (\n lowestPrice: FinnairServiceCatalogItemV3['lowestPrice'],\n fragmentIds: string[]\n): FinnairLowestPrice | null => {\n if (!lowestPrice) {\n return null;\n }\n\n return fragmentIds.reduce((cheapest, fragmentId) => {\n const lowestPricesForPaxes = lowestPrice[fragmentId];\n\n if (!lowestPricesForPaxes || isEmptyObject(lowestPricesForPaxes)) {\n return cheapest;\n }\n\n const fragmentLowestPrice = Object.values(lowestPricesForPaxes).reduce(\n (innerCheapest, currentPrice) => {\n return !innerCheapest || +currentPrice.money.amount < +innerCheapest.money.amount\n ? currentPrice\n : innerCheapest;\n },\n null\n );\n\n return !cheapest || (fragmentLowestPrice && +fragmentLowestPrice.money.amount < +cheapest.money.amount)\n ? fragmentLowestPrice\n : cheapest;\n }, null);\n};\n\nconst getExpandUpsellService = (\n catalogForCategory: FinnairServiceCatalogItemV3,\n cartOrOrder: CartOrOrder,\n bound: FinnairBoundItem\n): boolean => {\n if (![Category.SEAT, Category.CABIN_BAGGAGE, Category.BAGGAGE].includes(catalogForCategory.category)) {\n return false;\n }\n\n const seatMissing = passengersMissingCategoryService(Category.SEAT, cartOrOrder, bound);\n const cabinBagMissing = passengersMissingCategoryService(Category.CABIN_BAGGAGE, cartOrOrder, bound);\n const bagMissing = passengersMissingCategoryService(Category.BAGGAGE, cartOrOrder, bound);\n\n return (\n (catalogForCategory.category === Category.SEAT && seatMissing) ||\n (catalogForCategory.category == Category.CABIN_BAGGAGE && cabinBagMissing && !seatMissing) ||\n (catalogForCategory.category == Category.BAGGAGE && bagMissing && !cabinBagMissing && !seatMissing)\n );\n};\n\nconst getUpsell = (\n cartOrOrder: CartOrOrder,\n catalogForCategory: FinnairServiceCatalogItemV3 | undefined,\n service: FinnairServiceItem,\n bound: FinnairBoundItem,\n shouldNotShowAddMoreBtn: boolean,\n products$: Observable\n): Upsell | null => {\n if (!catalogForCategory) {\n return null;\n }\n\n const fragmentIds = isJourneyBasedCategory(catalogForCategory.category)\n ? [CustomServiceType.JOURNEY]\n : isBoundBasedCategory(catalogForCategory.category)\n ? [bound.id]\n : bound.itinerary.filter(isFlight).map((flight) => flight.id);\n const lowestPrice = getLowestPrice(catalogForCategory.lowestPrice, fragmentIds);\n\n if (!lowestPrice?.money || +lowestPrice?.money.amount === 0) {\n return null;\n }\n\n const hasServicesForCategory =\n combineServices([cartOrOrder.services.included, cartOrOrder.services.unpaid])\n ?.find((service) => service.category === catalogForCategory.category)\n ?.bounds.filter((b) => bound.id === b.id)\n .flatMap((b) => b.segments)\n .flatMap((segment) => segment.passengers).length > 0;\n\n const isShowMoreBtn =\n hasServicesForCategory &&\n !shouldNotShowAddMoreBtn &&\n [Category.BAGGAGE, Category.SPORT].includes(service.category) &&\n servicePresentedInServices(cartOrOrder.services, service.category, ['included', 'unpaid']);\n\n const updatingService$ = products$.pipe(\n map((products) => products.find((product) => product.category === catalogForCategory.category)),\n filter(Boolean),\n switchMap((product) => product.status$),\n map((status) => status === ButtonState.UPDATING),\n startWith(false)\n );\n\n /**\n * Custom hasPlusTierBenefit tier logic for LOUNGE\n */\n const hasPlusTierBenefit =\n service.category === Category.LOUNGE &&\n service.bounds\n .flatMap((bound) => bound.segments.flatMap((segment) => segment.passengers))\n .some((passenger) => {\n return (\n getPassengerTierLevel(passenger.id, cartOrOrder.passengers)?.toLowerCase().includes('gold') &&\n passenger.services.some((s) => s.includedInTierBenefit)\n );\n });\n\n return {\n articleKey: `MMB.fragments.upsell.${service.category}.allPax.url`,\n expand: getExpandUpsellService(catalogForCategory, cartOrOrder, bound),\n enabled: !hasServicesForCategory,\n lowestPrice: lowestPrice.money,\n isShowMoreBtn,\n updatingService$,\n hasPlusTierBenefit,\n };\n};\n\nconst isBoundFlownWithTimeDifference = (bound: FinnairBoundItem, diffInHours = 0) => {\n const flights = bound.itinerary.filter(isFlight);\n return (\n TzDate.now().hoursTo(TzDate.fromMillis(Date.parse(flights[flights.length - 1]?.arrival.dateTime))) - diffInHours <=\n 0\n );\n};\n\nexport const shouldWeUpsell = (\n category: Category,\n bound: FinnairBoundItem,\n catalog: FinnairServiceCatalogV3\n): boolean => {\n return upsellForCategory(category, bound, catalog) && !isBoundFlownWithTimeDifference(bound);\n};\n\nconst defaultServicesOrder = [\n Category.CABIN_BAGGAGE,\n Category.SEAT,\n Category.BAGGAGE,\n Category.MEAL,\n Category.SPORT,\n Category.WIFI,\n Category.PET,\n Category.LOUNGE,\n Category.PRIORITY,\n Category.COVER,\n Category.OTHER,\n Category.SPECIAL,\n Category.SPECIAL_NEED,\n Category.TRAVEL_COMFORT,\n Category.FIREARM,\n Category.MEDIC,\n Category.CHILD,\n Category.SAF,\n];\n\nexport const findSegmentById = (segmentId: string, bound: FinnairBoundItem): FinnairItineraryItemFlight | undefined => {\n return bound.itinerary.filter(isFlight).find(({ id }) => id === segmentId);\n};\n\nexport const findPassengerById = (paxId: string, order: FinnairOrder): FinnairPassengerItem | undefined => {\n return order.passengers.find((p) => p.id === paxId);\n};\n\nexport const createEmptySeatServices = (\n servicesToShow: FinnairServiceItemWithIcon[],\n bound: FinnairBoundItem,\n requiredPassengerIds: string[] = [],\n order: FinnairOrder,\n seatsTitle: string\n): FinnairServiceItemWithIcon[] => {\n const allSegmentIds: string[] = bound.itinerary\n .filter((i) => i.type === FinnairItineraryItemType.FLIGHT)\n .map((i) => (i as ItineraryItemFlight).id);\n\n const seats = servicesToShow.find((service) => service.category === Category.SEAT);\n const seatServicesBound = seats?.bounds?.find((b) => b.id === bound.id);\n const fakeEmptySeatService = [\n {\n ticketed: true,\n seatNumber: null,\n subCategory: SubCategory.SEAT,\n },\n ];\n if (!seats || !seatServicesBound) {\n // create seat empty services for whole bound\n return [\n ...servicesToShow,\n {\n bounds: [\n {\n id: bound.id,\n segments: allSegmentIds.map((segmentId) => {\n const segment = findSegmentById(segmentId, bound);\n return {\n id: segmentId,\n arrival: segment.arrival,\n departure: segment.departure,\n passengers: requiredPassengerIds\n .map((paxId) => {\n const pax = findPassengerById(paxId, order);\n return pax\n ? {\n id: paxId,\n firstName: pax.firstName,\n lastName: pax.lastName,\n services: fakeEmptySeatService,\n }\n : null;\n })\n .filter((pax) => pax !== null),\n quantity: requiredPassengerIds.length,\n totalPrice: {},\n } as FinnairServiceSegmentItem;\n }),\n totalPrice: {},\n } as FinnairServiceBoundItem,\n ],\n category: Category.SEAT,\n quantity: allSegmentIds.length * requiredPassengerIds.length,\n title: seatsTitle,\n icon: getIconForServiceCategory(Category.SEAT),\n },\n ].sort(\n (a, b) => order.services.servicesOrder.indexOf(a.category) - order.services.servicesOrder.indexOf(b.category)\n );\n } else if (seats && seatServicesBound) {\n // fill in segments items with empty seats for all passengers\n const missingSegmentIds = allSegmentIds.filter(\n (id) => !seatServicesBound.segments.find((segment) => segment.id === id)\n );\n seatServicesBound.segments = [\n ...seatServicesBound.segments,\n ...missingSegmentIds\n .map((segmentId) => {\n const segment = findSegmentById(segmentId, bound);\n if (!segment) {\n return null;\n }\n return {\n id: segmentId,\n arrival: segment.arrival,\n departure: segment.departure,\n passengers: requiredPassengerIds\n .map((paxId) => {\n const pax = findPassengerById(paxId, order);\n return pax\n ? {\n id: paxId,\n firstName: pax.firstName,\n lastName: pax.lastName,\n services: fakeEmptySeatService,\n }\n : null;\n })\n .filter((pax) => pax !== null),\n quantity: requiredPassengerIds.length,\n totalPrice: {},\n } as FinnairServiceSegmentItem;\n })\n .filter(Boolean),\n ];\n\n // fill in missing passengers items (if passenger not found in segment)\n if (seatServicesBound?.segments) {\n seatServicesBound.segments = seatServicesBound?.segments?.map((segment) => {\n const missingPassengers = requiredPassengerIds\n .filter((id) => !segment.passengers?.some((passenger) => passenger.id === id))\n .map((paxId) => {\n const pax = findPassengerById(paxId, order);\n return pax\n ? {\n id: paxId,\n firstName: pax.firstName,\n lastName: pax.lastName,\n services: fakeEmptySeatService,\n }\n : null;\n })\n .filter((pax) => pax !== null) as FinnairPassengerServiceItem[];\n\n return {\n ...segment,\n passengers: [...segment.passengers, ...missingPassengers],\n };\n });\n }\n // fill in service items (if passenger.services has no seats)\n let segmentToPaxIdsMap = new Map();\n if (seatServicesBound?.segments) {\n segmentToPaxIdsMap = seatServicesBound.segments.reduce((segmentMissingPaxIds, segment) => {\n const paxIdsMissingSeatServices = segment.passengers\n .filter((p) => p.services.length === 0)\n .map((p) => p.id)\n .filter((paxId) => requiredPassengerIds.includes(paxId));\n\n if (paxIdsMissingSeatServices.length > 0) {\n segmentMissingPaxIds.set(segment.id, paxIdsMissingSeatServices);\n }\n\n return segmentMissingPaxIds;\n }, segmentToPaxIdsMap);\n }\n const filledInSeatServices = {\n ...seats,\n bounds: seats.bounds.map((b) => {\n return b.id === bound.id\n ? {\n ...seatServicesBound,\n segments: seatServicesBound.segments.map((segment) => {\n return {\n ...segment,\n passengers: segment.passengers.map((passenger) => {\n return {\n ...passenger,\n services: segmentToPaxIdsMap.get(segment.id)?.includes(passenger.id)\n ? [\n {\n ticketed: true,\n seatNumber: null,\n },\n ]\n : passenger.services,\n };\n }),\n };\n }),\n }\n : b;\n }),\n };\n return servicesToShow.map((service) => {\n return service.category === Category.SEAT ? filledInSeatServices : service;\n }) as FinnairServiceItemWithIcon[];\n }\n};\n\nexport const getServicesForBoundWithUpsell = (\n cartOrOrder: CartOrOrder,\n showUpsell: boolean,\n servicesToShow: FinnairServiceItem[],\n servicesOrder: Category[] = defaultServicesOrder,\n bound: FinnairBoundItem,\n catalog: FinnairServiceCatalogV3 | undefined,\n products$: Observable = of([])\n): FinnairServiceItemWithUpsell[] => {\n if (!showUpsell) {\n return servicesToShow\n .map((service) => {\n return {\n ...service,\n bounds: service.bounds.filter((b) => b.id === bound.id),\n };\n })\n .filter((s) => s.bounds.length > 0)\n .sort((a, b) => servicesOrder.indexOf(a.category) - servicesOrder.indexOf(b.category));\n }\n\n return servicesOrder\n .filter((category) => {\n const showService = servicesToShow.some(\n (service) => service.category === category && service.bounds.some((b) => b.id === bound.id)\n );\n return showService || shouldWeUpsell(category, bound, catalog) || category === Category.SPECIAL_NEED;\n })\n .map((category) => {\n const shouldWeUpsellForThisCategory = shouldWeUpsell(category, bound, catalog);\n const catalogForCategory = shouldWeUpsellForThisCategory\n ? catalog.categories.find((item) => item.category === category)\n : null;\n const existingService =\n servicesToShow.find((s) => s.category === category) ??\n (catalogForCategory ? createEmptyServiceFromCatalog(category, bound, catalogForCategory) : null);\n\n const bounds: FinnairServiceBoundItem[] = existingService\n ? [fulfillServicesBoundWithPassenger(bound, existingService, cartOrOrder.passengers)]\n : (existingService?.bounds ?? []);\n\n if (existingService) {\n const shouldNotShowAddMoreBtn = bounds.some((b) =>\n b.segments.some((s) => s.passengers.some((p) => p.services.length === 0))\n );\n\n const upsell = shouldWeUpsellForThisCategory\n ? getUpsell(cartOrOrder, catalogForCategory, existingService, bound, shouldNotShowAddMoreBtn, products$)\n : null;\n\n return {\n ...existingService,\n bounds,\n upsell,\n };\n }\n\n if (\n category === Category.SPECIAL_NEED &&\n !isBoundFlownWithTimeDifference(bound, 48) &&\n bound.itinerary\n .filter(isFlight)\n .some((flight) => isFinnairNorraOrWetLease(flight.operatingAirline?.name, flight.operatingAirline?.code))\n ) {\n return {\n bounds: [{ id: bound.id, segments: [], totalPrice: null, quantity: 0 }],\n category,\n quantity: 0,\n title: '',\n upsell: {\n enabled: true,\n lowestPrice: null,\n isShowMoreBtn: servicePresentedInServices(cartOrOrder.services, category, ['included', 'unpaid']),\n articleKey: `MMB.fragments.upsell.${category}.allPax.url`,\n expand: false,\n updatingService$: of(false),\n hasPlusTierBenefit: false,\n },\n };\n }\n\n return null;\n })\n .filter(Boolean)\n .filter((s) => s.bounds.length > 0);\n};\n\nexport const isBoundAPISRequired = (order: FinnairOrder, bound: FinnairBoundItem): boolean => {\n return !!order.eligibilities?.checkIn?.find(\n (eligibility) => eligibility.id === bound.id && eligibility.isApisRequired\n );\n};\n\nexport const isOrder = (order: FinnairCart | FinnairOrder): boolean => {\n return order.id.length === 6;\n};\n\nexport const isFlexFareFamilyBound = (bound: FinnairBoundItem): boolean => bound.fareFamily.code.includes('FLEX');\n\nexport const locationPairIncludesTrainDestination = (locations: LocationPair): boolean => {\n return ['origin', 'destination'].some((direction) => {\n return RAIL_AND_FLY_LOCATION_CODES.includes(locations?.[direction]?.locationCode);\n });\n};\n\nexport const hasPartiallyUNBoundInBooking = (order: FinnairOrder): boolean => {\n return order.bounds.some((bound) => isPartiallyUNBound(bound)) ?? false;\n};\n\nexport const isPartiallyUNBound = (bound: FinnairBoundItem): boolean => {\n const disruptedItinerary = bound.disruptedBound?.disruptedBound?.itinerary;\n\n if (!disruptedItinerary || disruptedItinerary.length === 0) {\n return false;\n }\n\n const flightCount = disruptedItinerary.filter(isFlight).length;\n\n const disruptedFlights = disruptedItinerary.filter(isFlight);\n\n const cancelledFlights = disruptedFlights.filter(\n ({ status }) => status === FinnairItineraryItemFlightStatus.CANCELED\n );\n\n return cancelledFlights.length > 0 && flightCount > cancelledFlights.length;\n};\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n/**\n * Base class for services\n */\n@Injectable()\nexport class DapiBaseService {\n constructor(\n protected http: HttpClient\n ) {\n }\n}\n","\n \n
\n {{ successNotification | finLocalization }}\n
\n\n \n \n
\n {{ 'login.join.verificationSuccess' | finLocalization }}\n
\n\n
\n
\n \n \n\n \n {{ 'login.forgot' | finLocalization }}\n \n\n \n {{\n 'login.keepLoggedIn' | finLocalization\n }}\n \n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n {{ 'login.b2bTitle' | finLocalization }}\n
\n
\n \n
\n
\n
\n
\n\n \n \n \n\n \n \n \n\n \n
\n
\n \n \n
\n \n \n\n \n \n
\n\n \n \n \n \n\n
\n
\n \n\n \n \n\n

\n {{ 'login.twoFactorAuthEmail.noCodeReceived' | finLocalization }}\n \n {{ 'actions.resend' | finLocalization }}\n \n

\n\n = 2\" class=\"ms-large-t\" [theme]=\"NotificationTheme.WARNING\">\n {{ 'login.twoFactorAuthEmail.stillNoCodeReceived' | finLocalization }}\n \n
\n\n \n
\n \n\n \n \n\n

\n {{ 'login.2faRequestCode' | finLocalization }}\n

\n \n
\n\n \n
\n \n\n \n \n
\n\n \n \n \n
\n \n\n \n \n
{{ 'login.join.verificationLoadingTitle' | finLocalization }}
\n \n \n\n \n

{{ 'login.join.verificationExpiredDescription' | finLocalization }}

\n

\n \n {{ 'login.join.verificationExpiredLinkText' | finLocalization }}\n

\n \n\n \n

{{ 'login.join.verificationErrorDescription' | finLocalization }}

\n \n
\n\n \n
\n
\n \n \n\n
\n \n {{ 'login.forgot' | finLocalization }}\n \n
\n\n \n {{\n 'login.keepLoggedIn' | finLocalization\n }}\n \n
\n
\n
\n \n
\n \n {{ 'login.b2bReadMore' | finLocalization }}\n \n
\n
\n
\n
\n
\n\n","import { Component, ElementRef, EventEmitter, HostListener, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { FormControl, FormGroup, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, Observable, of, Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport {\n catchError,\n distinctUntilChanged,\n filter,\n map,\n startWith,\n switchMap,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {\n ButtonMode,\n ButtonSize,\n ButtonTheme,\n ButtonType,\n IconPosition,\n InputType,\n LoaderTheme,\n NotificationTheme,\n} from '@fcom/ui-components';\nimport { loginPhaseError, loginPhase, loginStatus, loginPhaseProfile } from '@fcom/core/selectors';\nimport { finShare } from '@fcom/rx';\nimport { AppState } from '@fcom/core/interfaces';\nimport { LoginActions } from '@fcom/core/actions';\nimport { LoginPhaseError, LoginPhaseProfile, LoginStatus, LoginStep, PostLostPasswordBy } from '@fcom/core-api/login';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { LinkSize } from '@fcom/ui-components/components/link/enums';\nimport { ConfigService } from '@fcom/core/services';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { RootPaths } from '@fcom/core/constants';\n\nimport { JoinService, LoginService } from '../../services';\nimport { GtmService } from '../../../gtm';\nimport { ElementActions, ElementTypes, GaContext, VerifyAccountTokenResponseData } from '../../../interfaces';\nimport { corporateUsernameValidator, usernameValidator } from '../../../utils/form-validators';\nimport { HotjarCaptureEvent, HotjarService, ScrollService } from '../../../services';\n\ninterface CorporateCredentials {\n username: FormControl;\n password: FormControl;\n keep: FormControl;\n}\n\nexport enum AccountVerification {\n NORMAL_LOGIN = 'NORMAL_LOGIN',\n LOADING = 'LOADING',\n SUCCESS = 'SUCCESS',\n EXPIRED = 'EXPIRED',\n ERROR = 'ERROR',\n}\ntype LoginStepTranslationsBase = {\n title: string;\n description: string;\n error?: string;\n};\n\ntype StepToLoginTranslationsMap = {\n [key in LoginStep]: LoginStepTranslationsBase;\n} & {\n [LoginStep.TWO_FACTOR_EMAIL]: LoginStepTranslationsBase & {\n resendSuccess: string;\n resendError: string;\n };\n};\n\n@Component({\n selector: 'fin-login-form',\n templateUrl: './login-form.component.html',\n styleUrls: ['./login-form.component.scss'],\n})\nexport class LoginFormComponent implements OnInit, OnDestroy {\n private trackElementNamePrefix = 'login-form-';\n\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonType = ButtonType;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly LinkSize = LinkSize;\n readonly IconPosition = IconPosition;\n readonly LoaderTheme = LoaderTheme;\n readonly InputType = InputType;\n readonly LoginStep = LoginStep;\n readonly NotificationTheme = NotificationTheme;\n readonly PostLostPasswordBy = PostLostPasswordBy;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly AccountVerification = AccountVerification;\n readonly IconLibrary = IconLibrary;\n\n mfaMsg = {\n title: 'login.2faTitle',\n description: 'login.smsVerificationCode',\n error: 'login.smsCodeError',\n };\n\n loginTranslations: StepToLoginTranslationsMap = {\n [LoginStep.CREDENTIALS]: {\n title: 'login.title',\n description: 'login.description',\n error: 'login.failed',\n },\n [LoginStep.CORPORATE_CREDENTIALS]: {\n title: 'login.b2bTitle',\n description: 'login.b2bDescription',\n error: 'login.b2bFailed',\n },\n [LoginStep.CORPORATE_CREDENTIALS_DIRECT]: {\n title: 'login.b2bTitle',\n description: 'login.b2bDescription',\n error: 'login.b2bFailed',\n },\n [LoginStep.TWO_FACTOR_CODE]: {\n title: 'login.2faTitle',\n description: 'login.2faDescription',\n error: 'login.2faError',\n },\n [LoginStep.TWO_FACTOR_EMAIL]: {\n title: 'login.twoFactorAuthEmail.title',\n description: 'login.twoFactorAuthEmail.description',\n error: 'login.twoFactorAuthEmail.loginError',\n resendSuccess: 'login.twoFactorAuthEmail.resendSuccess',\n resendError: 'login.twoFactorAuthEmail.resendError',\n },\n [LoginStep.TWO_FACTOR_PHONE]: this.mfaMsg,\n [LoginStep.TWO_FACTOR_SMS]: this.mfaMsg,\n [LoginStep.LOCKED]: {\n title: 'login.lockedTitle',\n description: 'login.lockedDescription',\n },\n [LoginStep.FORGOT_PASSWORD]: {\n title: 'login.forgotPassword.title',\n description: 'login.forgotPassword.description',\n error: 'login.forgotPassword.failed',\n },\n [LoginStep.POST_LOST_PASSWORD_SENT]: {\n title: 'login.forgotPassword.successTitle',\n description: 'login.forgotPassword.successDescription',\n },\n };\n\n @Input()\n fullScreen = false;\n\n @Input()\n accountVerificationToken$: Observable = of('');\n @Output()\n verificationFinished = new EventEmitter();\n\n enableAccountCreationVerification = false;\n subscriptions = new Subscription();\n reactiveForm: UntypedFormGroup;\n corporateCredentialsForm: FormGroup;\n verificationForm: UntypedFormGroup;\n forgotPasswordForm: UntypedFormGroup;\n\n corporateChangePasswordUrl: string;\n resendEmailCount = 0;\n\n step$: Observable;\n loginPhaseProfile$: Observable;\n error$: Observable;\n successNotification$ = new BehaviorSubject(undefined);\n\n icon$: Observable;\n loading$ = new BehaviorSubject(false);\n\n @HostListener('document:keydown.escape', ['$event']) onKeydownHandler(_event: KeyboardEvent): void {\n this.closeDialog();\n }\n\n titleLabel$: Observable;\n accountVerification$: Observable;\n\n constructor(\n private loginService: LoginService,\n private fb: UntypedFormBuilder,\n private store$: Store,\n private gtmService: GtmService,\n private scrollService: ScrollService,\n private hotjarService: HotjarService,\n private configService: ConfigService,\n private languageService: LanguageService,\n private elementRef: ElementRef,\n private router: Router,\n private joinService: JoinService\n ) {\n this.enableAccountCreationVerification = configService.cfg.enableAccountCreationVerification;\n\n this.createForms();\n\n this.step$ = this.store$.pipe(\n loginPhase(),\n map((phase) => phase?.step),\n distinctUntilChanged(),\n finShare()\n );\n\n this.subscriptions.add(\n this.step$.subscribe((loginPhaseStep) => {\n this.loading$.next(false);\n this.verificationForm.reset();\n this.track2faViews(loginPhaseStep);\n })\n );\n\n this.loginPhaseProfile$ = this.store$.pipe(loginPhaseProfile(), finShare());\n\n this.subscriptions.add(\n this.store$.pipe(loginPhaseError()).subscribe((error) => {\n this.loading$.next(false);\n this.successNotification$.next(undefined);\n\n if (error === LoginPhaseError.LOGIN_FAILED) {\n this.trackButtonClickEvent('login-event', 'false');\n }\n })\n );\n\n this.error$ = this.store$.pipe(\n loginPhaseError(),\n withLatestFrom(this.step$),\n map(([loginError, step]) => {\n if (!loginError) {\n return undefined;\n }\n\n if (step === LoginStep.TWO_FACTOR_EMAIL && loginError === LoginPhaseError.RESEND_2FA_EMAIL) {\n return this.loginTranslations[step].resendError;\n } else {\n return this.loginTranslations[step].error;\n }\n })\n );\n\n this.icon$ = this.step$.pipe(\n map((step) => {\n switch (step) {\n case LoginStep.CREDENTIALS:\n return SvgLibraryIcon.FINNAIR_EMBLEM_BLOCK;\n case LoginStep.POST_LOST_PASSWORD_SENT:\n return SvgLibraryIcon.CHECKMARK_BLOCK;\n case LoginStep.CORPORATE_CREDENTIALS_DIRECT:\n return SvgLibraryIcon.B2B_BLOCK;\n default:\n return undefined;\n }\n })\n );\n\n this.subscriptions.add(\n this.store$\n .pipe(\n loginStatus(),\n filter((status) => status === LoginStatus.PENDING),\n take(1)\n )\n .subscribe(() => {\n this.trackButtonClickEvent('login-event', 'true');\n this.store$.dispatch(LoginActions.clearLoginPhase());\n })\n );\n\n this.corporateChangePasswordUrl = `https://${this.configService.cfg.casHost}/content/${this.languageService.localeValue}/login/corporate/forgot-password`;\n }\n\n ngOnInit(): void {\n this.accountVerification$ = this.accountVerificationToken$.pipe(\n switchMap((token) => {\n if (this.enableAccountCreationVerification && token) {\n return this.joinService.verifyAccountToken(token).pipe(\n map(() => AccountVerification.SUCCESS),\n catchError((error: VerifyAccountTokenResponseData) => {\n if (error?.reason.toLowerCase().includes('token not found or expired')) {\n return of(AccountVerification.EXPIRED);\n } else {\n return of(AccountVerification.ERROR);\n }\n }),\n startWith(AccountVerification.LOADING)\n );\n }\n return of(AccountVerification.NORMAL_LOGIN);\n }),\n finShare()\n );\n\n this.titleLabel$ = combineLatest([this.accountVerification$, this.step$]).pipe(\n map(([accountVerification, step]) => {\n switch (accountVerification) {\n case AccountVerification.NORMAL_LOGIN:\n case AccountVerification.SUCCESS:\n return this.loginTranslations[step ?? LoginStep.CREDENTIALS].title;\n case AccountVerification.LOADING:\n return '';\n case AccountVerification.ERROR:\n case AccountVerification.EXPIRED:\n return 'login.join.basicTitle';\n default:\n return '';\n }\n })\n );\n\n this.subscriptions.add(\n this.accountVerification$.subscribe((val) => {\n switch (val) {\n case AccountVerification.SUCCESS:\n this.gtmService.trackElement(\n 'join-form-account-verified',\n GaContext.FINNAIR_PLUS,\n ElementTypes.MODAL,\n 'account-confirmed',\n ElementActions.VIEW\n );\n }\n })\n );\n }\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n forgotPassword(): void {\n this.trackButtonClickEvent('forgot-password');\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.FORGOT_PASSWORD }));\n }\n\n postLostPassword(): void {\n if (this.forgotPasswordForm.invalid) {\n this.forgotPasswordForm.markAllAsTouched();\n return;\n }\n\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: undefined }));\n this.loading$.next(true);\n\n const { postLostPasswordBy, member, lastName } = this.forgotPasswordForm.getRawValue();\n\n this.trackButtonClickEvent('reset-password');\n\n this.subscriptions.add(\n this.loginService.postLostPassword(postLostPasswordBy, member, lastName).subscribe({\n next: (res) => {\n if (res?.message?.[0]?.severity === 'ERROR') {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: LoginPhaseError.POST_LOST_PASSWORD }));\n } else {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.POST_LOST_PASSWORD_SENT }));\n }\n },\n error: () => {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: LoginPhaseError.POST_LOST_PASSWORD }));\n },\n })\n );\n }\n\n login(): void {\n if (this.reactiveForm.invalid) {\n this.reactiveForm.markAllAsTouched();\n return this.scrollService.scrollToFirstInvalidInput(this.elementRef);\n }\n\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: undefined }));\n this.trackButtonClickEvent('submit-login');\n const { member, pwd, keep } = this.reactiveForm.getRawValue();\n this.loading$.next(true);\n this.loginService.login(member, pwd, keep);\n }\n\n corporateLogin(): void {\n if (this.corporateCredentialsForm.invalid) {\n this.corporateCredentialsForm.markAllAsTouched();\n return this.scrollService.scrollToFirstInvalidInput(this.elementRef);\n }\n\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: undefined }));\n this.trackButtonClickEvent('submit-corporate-login');\n const { username, password, keep } = this.corporateCredentialsForm.getRawValue();\n this.loading$.next(true);\n this.loginService.login(username, password, keep);\n this.subscriptions.add(this.hotjarService.startCapture(HotjarCaptureEvent.CORPORATE_LOGIN).subscribe());\n this.redirectToCorporatePortal();\n }\n\n login2fa(step: LoginStep): void {\n const track2faSubmitButtonElementName = this.get2faViewTrackElementNames(step)?.submitButton;\n\n if (track2faSubmitButtonElementName) {\n this.trackButtonClickEvent(track2faSubmitButtonElementName);\n }\n\n if (this.validateVerificationFormCode() === 'invalid') {\n return;\n }\n\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: undefined }));\n const { code } = this.verificationForm.getRawValue();\n\n this.loading$.next(true);\n this.loginService.login2fa(code, step === LoginStep.TWO_FACTOR_PHONE);\n }\n\n resendEmail(): void {\n this.resendEmailCount++;\n this.successNotification$.next(undefined);\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: undefined }));\n\n if (this.resendEmailCount > 2) {\n return;\n }\n\n this.trackButtonClickEvent('2fa-email-modal', 'resend-code');\n\n if (this.resendEmailCount === 2) {\n this.gtmService.trackElement(\n `${this.trackElementNamePrefix}2fa-message`,\n GaContext.FINNAIR_PLUS,\n ElementTypes.NOTIFICATION,\n 'still-no-code',\n ElementActions.VIEW\n );\n }\n\n this.subscriptions.add(\n this.loginService\n .resend2faEmail()\n .pipe(filter((response) => !response))\n .subscribe(() => {\n this.successNotification$.next(this.loginTranslations[LoginStep.TWO_FACTOR_EMAIL].resendSuccess);\n })\n );\n }\n\n requestSMS(): void {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: undefined }));\n this.loading$.next(true);\n this.trackButtonClickEvent('request-sms-login');\n this.loginService.requestSMS();\n }\n\n openCorporateLoginForm(): void {\n const { member, pwd } = this.reactiveForm.getRawValue();\n const formState = member || pwd ? 'form-filled' : 'form-empty';\n this.trackButtonClickEvent('corporate-login', formState);\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CORPORATE_CREDENTIALS }));\n }\n\n closeDialog(): void {\n this.trackButtonClickEvent('close');\n this.verificationFinished.emit();\n this.store$.dispatch(LoginActions.clearLoginPhase());\n }\n\n resetLogin(event: Event): void {\n event.stopPropagation();\n this.resendEmailCount = 0;\n this.loading$.next(false);\n this.reactiveForm.reset();\n this.successNotification$.next(undefined);\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n }\n\n trackAndCloseDialog(): void {\n this.closeDialog();\n this.trackButtonClickEvent('login-read-more-about-corporate');\n }\n\n redirectToCorporatePortal(): void {\n this.subscriptions.add(\n this.loginService.loginTrigger$.pipe(take(1)).subscribe(() => {\n if (!this.router.url.includes(RootPaths.CORPORATE)) {\n this.closeDialog();\n this.scrollService.scrollTop();\n this.router.navigate([this.languageService.langValue, RootPaths.CORPORATE, 'home']);\n }\n })\n );\n }\n\n onAlertNotificationLinkClicked(step: LoginStep): void {\n if (step === LoginStep.TWO_FACTOR_EMAIL) {\n this.resendEmail();\n }\n }\n\n private createForms(): void {\n this.reactiveForm = this.fb.group({\n member: this.fb.control('', Validators.compose([Validators.required, usernameValidator()])),\n pwd: this.fb.control('', Validators.compose([Validators.required])),\n keep: this.fb.control(false, { nonNullable: true }),\n });\n\n this.corporateCredentialsForm = this.fb.group({\n username: ['', [Validators.required, corporateUsernameValidator()]],\n password: ['', [Validators.required]],\n keep: [false],\n });\n\n this.verificationForm = this.fb.group({\n code: this.fb.control(\n '',\n Validators.compose([\n Validators.required,\n Validators.minLength(6),\n Validators.maxLength(6),\n Validators.pattern(/^\\d+$/),\n ])\n ),\n });\n\n this.forgotPasswordForm = this.fb.group({\n postLostPasswordBy: this.fb.control(PostLostPasswordBy.EMAIL, [Validators.required]),\n member: this.fb.control('', [Validators.required, usernameValidator()]),\n lastName: this.fb.control('', [Validators.required]),\n });\n }\n\n private validateVerificationFormCode(): 'valid' | 'invalid' {\n if (this.verificationForm.invalid) {\n this.verificationForm.markAllAsTouched();\n\n const validationErrors = this.verificationForm.get('code').errors;\n const state = validationErrors?.required\n ? 'code-required'\n : validationErrors?.minlength\n ? 'code-min-length'\n : validationErrors?.maxlength\n ? 'code-max-length'\n : 'code-pattern';\n\n this.gtmService.trackElement(\n `${this.trackElementNamePrefix}2fa-error`,\n GaContext.FINNAIR_PLUS,\n ElementTypes.NOTIFICATION,\n state,\n ElementActions.VIEW\n );\n return 'invalid';\n }\n return 'valid';\n }\n\n private trackButtonClickEvent(elementName: string, state: string = undefined): void {\n this.gtmService.trackElement(\n `${this.trackElementNamePrefix}${elementName}`,\n GaContext.FINNAIR_PLUS,\n ElementTypes.BUTTON,\n state,\n ElementActions.CLICK\n );\n }\n\n private track2faViews(loginStep: LoginStep): void {\n const track2faViewElementName = this.get2faViewTrackElementNames(loginStep)?.view;\n\n if (!track2faViewElementName) {\n return;\n }\n\n this.gtmService.trackElement(\n `${this.trackElementNamePrefix}${track2faViewElementName}`,\n GaContext.FINNAIR_PLUS,\n ElementTypes.MODAL,\n 'open',\n ElementActions.VIEW\n );\n }\n\n private get2faViewTrackElementNames(loginStep: LoginStep): { submitButton: string; view: string } | undefined {\n switch (loginStep) {\n case LoginStep.TWO_FACTOR_EMAIL:\n return { view: '2fa-email-modal', submitButton: 'login-2fa-email' };\n case LoginStep.TWO_FACTOR_CODE:\n return { view: '2fa-app-modal', submitButton: 'login-2fa-app' };\n case LoginStep.TWO_FACTOR_PHONE:\n return { view: '2fa-phone-modal', submitButton: 'login-2fa-sms' };\n case LoginStep.TWO_FACTOR_SMS:\n return { view: '2fa-sms-modal', submitButton: 'login-2fa-sms' };\n default:\n return undefined;\n }\n }\n}\n","
\n \n \n
\n
\n \n \n
\n\n\n
\n \n
\n
\n","import { Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { map, Observable, Subscription, take } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { GtmService } from '@fcom/common/gtm/services/gtm.service';\nimport {\n ButtonTheme,\n IconButtonSize,\n IconButtonTheme,\n IconPosition,\n PopoverOptions,\n PopoverPosition,\n} from '@fcom/ui-components';\nimport { CountryState } from '@fcom/core/interfaces';\nimport { allowedConfs } from '@fcom/core/reducers/langs';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { PopoverService } from '../../../ui-components/components/popover';\nimport { ElementActions, ElementTypes, GaContext } from '../../interfaces';\nimport { CountryAndLanguageSelection } from '../country-and-language-selector/country-and-language-selector.component';\nimport { PageMetaService } from '../../services/page-meta/page-meta.service';\nimport { getLocalizedLinkForLangCode } from '../../utils/language.utils';\n\nexport enum LanguageSelectorContext {\n BOOKING,\n TOP_NAVI,\n}\n\nconst CONTEXT_TO_GA_CONTEXT = {\n [LanguageSelectorContext.BOOKING]: GaContext.BOOKING_FLOW,\n [LanguageSelectorContext.TOP_NAVI]: GaContext.DESKTOP_MAIN_NAVIGATION,\n};\n\n@Component({\n selector: 'fin-language-selector',\n templateUrl: './language-selector.component.html',\n styleUrls: [],\n})\nexport class LanguageSelectorComponent implements OnInit, OnDestroy {\n styles: CSSStyleDeclaration;\n popoverOptions: PopoverOptions;\n\n readonly ButtonTheme = ButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n readonly currentLanguage$: Observable;\n\n @Input()\n showWarning = false;\n\n @Input()\n skipRedirect = false;\n\n @Input()\n context: LanguageSelectorContext;\n\n @Output()\n applySelection = new EventEmitter();\n\n countries$: Observable;\n subscriptions: Subscription = new Subscription();\n\n constructor(\n @Inject(PLATFORM_ID) private platform: unknown,\n private languageService: LanguageService,\n private router: Router,\n private pageMetaService: PageMetaService,\n private gtmService: GtmService,\n private popoverService: PopoverService\n ) {\n this.currentLanguage$ = this.languageService.langKey;\n }\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platform)) {\n this.styles = getComputedStyle(document.documentElement);\n this.popoverOptions = {\n popoverWidth: 340,\n showArrowCaret: false,\n showLeftBorder: false,\n roundedCorners: true,\n hasPadding: true,\n fullWidthContent: true,\n showFullscreenOnBreakpoint: 'tablet_down',\n popoverPosition: PopoverPosition.BOTTOM,\n useFixedPosition: true,\n zIndex: parseInt(this.styles.getPropertyValue('--z-index-nav')),\n };\n }\n this.countries$ = this.initListOfCountries();\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n openLanguageSelector(): void {\n this.gtmService.trackElement(\n 'language-selector-open',\n CONTEXT_TO_GA_CONTEXT[this.context],\n ElementTypes.BUTTON,\n undefined,\n ElementActions.OPEN\n );\n }\n\n closeLanguageSelector(): void {\n this.popoverService.close();\n }\n\n selectLanguageAndRedirect(selection: CountryAndLanguageSelection): void {\n this.gtmService.trackElement(\n 'language-selector-select',\n CONTEXT_TO_GA_CONTEXT[this.context],\n ElementTypes.BUTTON,\n selection.languageCode,\n ElementActions.SUBMIT\n );\n\n if (!this.skipRedirect && this.languageService.langValue !== selection.languageCode) {\n switch (this.context) {\n case LanguageSelectorContext.BOOKING:\n this.subscriptions.add(\n this.pageMetaService.prevPageUrl$.pipe(take(1)).subscribe((prevPageUrl) => {\n this.router.navigateByUrl(`/${selection.languageCode}${prevPageUrl}`);\n })\n );\n break;\n case LanguageSelectorContext.TOP_NAVI:\n this.subscriptions.add(\n this.pageMetaService.links.subscribe((links) => {\n const url = getLocalizedLinkForLangCode(selection.languageCode, links, this.getPreviousUrl());\n this.router.navigateByUrl(url);\n })\n );\n }\n }\n\n this.applySelection.emit(selection);\n\n this.closeLanguageSelector();\n }\n\n private initListOfCountries(): Observable {\n return this.languageService.countryCode.pipe(\n map(\n (countryCode) =>\n allowedConfs.find((country) => country.code === countryCode) || {\n languages: [],\n name: '',\n code: '',\n }\n )\n );\n }\n\n private getPreviousUrl(): string | undefined {\n const currentUrl = this.router.url;\n if (currentUrl.includes('/corporate/')) {\n return `/${currentUrl.split('/').slice(2).join('/')}`;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { DirectiveModule } from '@fcom/common/directives';\n\nimport { IconsModule } from '../icons';\nimport { QuickLinksComponent } from './quick-links.component';\n\n@NgModule({\n declarations: [QuickLinksComponent],\n imports: [CommonModule, IconsModule, DirectiveModule],\n exports: [QuickLinksComponent],\n})\nexport class QuickLinksModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport {\n PersonalizationTrackingService,\n NoopPersonalizationTrackingService,\n} from './services/personalization-tracking.service';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [],\n exports: [],\n})\nexport class PersonalizationModule {\n static forClient(): ModuleWithProviders {\n return {\n ngModule: PersonalizationModule,\n providers: [{ provide: PersonalizationTrackingService, useClass: PersonalizationTrackingService }],\n };\n }\n\n static forServer(): ModuleWithProviders {\n return {\n ngModule: PersonalizationModule,\n providers: [{ provide: PersonalizationTrackingService, useClass: NoopPersonalizationTrackingService }],\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { BookingHeaderComponent } from './booking-header/booking-header.component';\nimport { PlainHeaderAreaComponent } from './plain-header-area/plain-header-area.component';\nimport { ButtonModule } from '../buttons/button.module';\n\n@NgModule({\n declarations: [BookingHeaderComponent, PlainHeaderAreaComponent],\n exports: [BookingHeaderComponent, PlainHeaderAreaComponent],\n providers: [],\n imports: [CommonModule, UiTranslateModule, IconsModule, ButtonModule],\n})\nexport class HeadersModule {}\n","\n @let isFlightSelectionFiltersTestVariant = isFlightSelectionFiltersTestVariant$ | async;\n \n \n \n \n
\n \n \n
\n \n\n \n \n
\n \n \n
\n \n\n \n \n
\n \n \n
\n \n\n \n \n
\n \n \n \n {{ 'flightFilters.times.departure.from' | finLocalization }}\n {{ departureCityName }}\n \n\n
\n \n \n
\n \n {{ 'flightFilters.times.departure.' + departureTime.key.toLowerCase() | finLocalization }}\n \n {{ getTimeRange(departureTime.value) }}\n
\n \n
\n
\n
\n \n \n {{ 'flightFilters.times.arrival.landing' | finLocalization }}\n {{ arrivalCityName }}\n
\n \n \n
\n \n {{ 'flightFilters.times.arrival.' + arrivalTime.key.toLowerCase() | finLocalization }}\n \n {{ getTimeRange(arrivalTime.value) }}\n
\n \n
\n
\n
\n \n
\n \n\n \n \n \n \n\n \n @let isMobile = isMobile$ | async;\n \n 0\n \"\n (click)=\"clearAllFilters('master-reset')\"\n class=\"flex flex--middle\"\n data-testid=\"master-reset-button\"\n >\n \n {{\n 'flightFilters.resetFilters' | finLocalization\n }}\n \n \n \n {{ 'flightFilters.stopsCountB.direct' | finLocalization }}\n \n ({{ amountOfDirectFlights$ | async }})\n \n \n 0\"\n [buttonText]=\"\n ((isFlightSelectionFiltersTestVariant$ | async) && isMobile === false\n ? 'flightFilters.titleDesktop'\n : 'flightFilters.title'\n ) | finLocalization\n \"\n [modalTitle]=\"'flightFilters.modalTitle' | finLocalization\"\n [notificationContent]=\"'flightFilters.modalNotification' | finLocalization\"\n [numberToShowWhenFiltered]=\"selectedFiltersLength$ | async\"\n [displayNotification]=\"resultsAmount === 0\"\n [primaryFooterButtonTitle]=\"'flightFilters.action.showResults' | finLocalization: { flights: resultsAmount }\"\n [isFlightSelectionFiltersTestVariant$]=\"isFlightSelectionFiltersTestVariant$\"\n (primaryFooterButtonClick)=\"updateNextFiltersToStore()\"\n [secondaryFooterButtonTitle]=\"\n ((isFlightSelectionFiltersTestVariant$ | async) ? 'flightFilters.action.reset' : 'flightFilters.action.clear')\n | finLocalization\n \"\n (secondaryFooterButtonClick)=\"clearAllFilters(isMobile ? 'mobile' : 'desktop')\"\n (showModal)=\"showModal()\"\n (closeModal)=\"closeModal()\"\n >\n \n \n
\n {{ 'flightFilters.stopsCount.title' | finLocalization }}\n
\n \n \n \n\n \n \n
\n {{ 'flightFilters.travelClass.title' | finLocalization }}\n
\n \n \n \n
\n\n
\n\n @if ((isFlightSelectionFiltersTestVariant$ | async) && isMobile === false) {\n
\n
\n
\n \n
\n
\n
\n
\n } @else {\n
\n \n
\n
\n \n
\n }\n\n
\n\n \n
\n {{\n 'flightFilters.times.departure.title' | finLocalization\n }}\n \n {{ 'flightFilters.times.departure.from' | finLocalization }}\n {{ departureCityName }}\n \n
\n\n
\n \n \n
\n \n {{ 'flightFilters.times.departure.' + departureTime.key.toLowerCase() | finLocalization }}\n \n {{ getTimeRange(departureTime.value) }}\n
\n \n
\n
\n
\n\n \n
\n {{\n 'flightFilters.times.arrival.title' | finLocalization\n }}\n \n {{ 'flightFilters.times.arrival.landing' | finLocalization }}\n {{ arrivalCityName }}\n
\n
\n \n \n
\n \n {{ 'flightFilters.times.arrival.' + arrivalTime.key.toLowerCase() | finLocalization }}\n \n {{ getTimeRange(arrivalTime.value) }}\n
\n \n
\n
\n
\n\n
\n
\n {{ 'flightFilters.refundability.title' | finLocalization }}\n
\n \n \n
\n
\n \n \n \n\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { ActivatedRoute, NavigationExtras, Router } from '@angular/router';\nimport { FormControl, FormGroup, UntypedFormBuilder } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport {\n BehaviorSubject,\n combineLatest,\n filter,\n map,\n NEVER,\n Observable,\n of,\n Subject,\n Subscription,\n take,\n tap,\n} from 'rxjs';\nimport { distinctUntilChanged, pairwise, startWith, withLatestFrom } from 'rxjs/operators';\n\nimport {\n ElementActions,\n ElementTypes,\n GaContext,\n MediaQueryService,\n OfferListFetchParams,\n isShortHaulFlight,\n} from '@fcom/common';\nimport { GtmService } from '@fcom/common/gtm/services/gtm.service';\nimport { Cabin } from '@fcom/dapi/api/models';\nimport { getLocation } from '@fcom/locations';\nimport {\n ButtonSize,\n ButtonTheme,\n ButtonType,\n CheckBoxTheme,\n IconPosition,\n RadioItemGroupOption,\n TabTheme,\n PopoverOptions,\n PopoverPosition,\n PopoverService,\n} from '@fcom/ui-components';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { TicketSelectionPhase } from '@fcom/voluntary-change/enums';\nimport { AirOffersStatus, BookingAppState, SelectionPhase } from '@fcom/common/interfaces/booking';\nimport { BookingAirBoundsService } from '@fcom/booking/modules/ticket-selection/services';\nimport { profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { SentryLogger } from '@fcom/core';\nimport {\n resetAllNextFilters,\n setAllNextFilters,\n setNextArrivalTime,\n setNextDepartureTime,\n} from '@fcom/booking/store/actions/bounds.actions';\n\nimport { defaultFilterValues, FlightFilters, FlightTimeOption } from '../../interfaces/flight-filters.interface';\n\nexport interface ResetFiltersEvent {\n type: keyof FlightFilters;\n cabin?: Cabin;\n}\n\nexport interface ResetAllFiltersEvent {\n defaultCabin: Cabin | undefined;\n}\n\n@Component({\n selector: 'fin-flight-selection-filters',\n styleUrls: ['./flight-selection-filters.component.scss'],\n templateUrl: './flight-selection-filters.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlightSelectionFiltersComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Whether radio buttons in travel class filter should be disabled\n */\n @Input()\n isTravelClassChoicesDisabled: boolean;\n\n @Input()\n selectionPhase: SelectionPhase | TicketSelectionPhase;\n\n @Input()\n showRefundability = true;\n\n @Input()\n travelClasses$: Observable;\n\n /**\n * How many results the current filters produce\n * In desktop version used in all dropdowns' footer buttons\n * In mobile used in modal's footer button\n */\n @Input()\n resultsAmount: number;\n\n /**\n * Amount of layovers each flight has.\n * Used in stops filter\n */\n @Input()\n layoverAmounts: number[] = [];\n\n /**\n * Used in times filter\n */\n @Input()\n originLocationCode: string;\n\n /**\n * Used in times filter\n */\n @Input()\n destinationLocationCode: string;\n\n @Input() filters$: Observable;\n\n @Input()\n cabinLastRequestParam$: Observable<{ cabin: Cabin }> = of({ cabin: Cabin.MIXED });\n\n @Input()\n isTravelClassDisabled = false;\n\n @Input()\n showFlightSelectionFilters: boolean;\n\n @Input()\n isFlightSelectionFiltersTestVariant$: Observable = NEVER;\n\n @Input()\n boundsHasDirectFlights$: Observable = NEVER;\n\n @Input()\n allBoundsAreDirect$: Observable = NEVER;\n\n @Input()\n amountOfDirectFlights$: Observable = NEVER;\n\n @Output()\n setFilter: EventEmitter = new EventEmitter();\n @Output()\n resetFilter: EventEmitter = new EventEmitter();\n @Output()\n resetAllFilters: EventEmitter = new EventEmitter();\n @Output()\n showSpinner: EventEmitter = new EventEmitter();\n\n selectedStopsOption: number = defaultFilterValues.defaultStopsOption;\n selectedMaxStopsOption: number = defaultFilterValues.defaultStopsOption;\n selectedRefundabilityOption: boolean = defaultFilterValues.defaultRefundabilityOption;\n selectedTravelClass: Cabin;\n selectedDepartureTimes: FlightTimeOption[] = defaultFilterValues.defaultTimeOptions;\n selectedArrivalTimes: FlightTimeOption[] = defaultFilterValues.defaultTimeOptions;\n selectedNextDepartureTimes: FlightTimeOption[] = defaultFilterValues.defaultTimeOptions;\n selectedNextArrivalTimes: FlightTimeOption[] = defaultFilterValues.defaultTimeOptions;\n defaultInboundTravelClass: Cabin;\n\n departureCityName: string;\n arrivalCityName: string;\n\n isModalOpen: boolean;\n\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonType = ButtonType;\n readonly CheckBoxTheme = CheckBoxTheme;\n readonly ButtonSize = ButtonSize;\n readonly IconPosition = IconPosition;\n readonly TabTheme = TabTheme;\n readonly FlightTimeOption = FlightTimeOption;\n readonly Cabin = Cabin;\n readonly AirOffersStatus = AirOffersStatus;\n readonly SelectionPhase = SelectionPhase;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TicketSelectionPhase = TicketSelectionPhase;\n\n popoverOptions: PopoverOptions = {\n popoverID: 'flight-selection-filters',\n openByDefault: false,\n closeOnScroll: false,\n showArrowCaret: false,\n showLeftBorder: false,\n popoverPosition: PopoverPosition.BOTTOM,\n roundedCorners: true,\n };\n\n activeTab$ = new BehaviorSubject(0);\n showStopsFilter$: Observable;\n awardQueryParams$: Observable;\n isMobile$: Observable;\n showClearAllBtn: boolean;\n shouldNotClearTravelClass: boolean;\n defaultTravelClass: Cabin;\n selectedFiltersLength$: BehaviorSubject = new BehaviorSubject(0);\n resizedWatcher$: Subject = new Subject();\n subscriptions: Subscription = new Subscription();\n filtersForm: FormGroup<{\n stopsCount: FormControl;\n refundable: FormControl;\n cabin: FormControl;\n }>;\n travelClassFilters: RadioItemGroupOption[] = [];\n updateFilters$: Subject = new Subject();\n\n constructor(\n private store$: Store,\n private popoverService: PopoverService,\n private mediaQueryService: MediaQueryService,\n private gtmService: GtmService,\n private bookingAirBoundsService: BookingAirBoundsService,\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private fb: UntypedFormBuilder,\n private sentryLogger: SentryLogger\n ) {}\n\n ngOnInit(): void {\n this.subscriptions.add(\n this.cabinLastRequestParam$\n ?.pipe(\n filter(Boolean),\n withLatestFrom(this.store$.pipe(profileOrUndefinedIfNotLoggedIn()), this.isLongHaul()),\n // Don't do initial filtering for corporate long-hauls\n filter(([_, profile, isLongHaul]) => !(profile?.isCorporate && isLongHaul)),\n take(1),\n tap(([params]) => {\n if (this.selectionPhase === SelectionPhase.OUTBOUND) {\n this.setFilter.emit({ cabin: params.cabin });\n }\n })\n )\n .subscribe()\n );\n\n this.subscriptions.add(\n this.travelClasses$\n .pipe(\n tap((travelClasses) => {\n const defaultIsNotMixedCabinForInbound =\n this.selectionPhase === SelectionPhase.INBOUND && this.defaultInboundTravelClass !== Cabin.MIXED;\n this.shouldNotClearTravelClass =\n this.isTravelClassDisabled || defaultIsNotMixedCabinForInbound || travelClasses.length === 1;\n }),\n take(1)\n )\n .subscribe()\n );\n this.subscriptions.add(\n combineLatest([this.travelClasses$, this.cabinLastRequestParam$])\n .pipe(take(1))\n .subscribe(([travelClasses, params]) => {\n this.defaultTravelClass = travelClasses.includes(Cabin.MIXED) ? Cabin.MIXED : params.cabin;\n })\n );\n\n this.subscriptions.add(\n this.travelClasses$.pipe(take(1)).subscribe((cabinArray) => {\n cabinArray.forEach((cabin) => {\n this.travelClassFilters.push({\n value: cabin,\n label: 'travelClass.' + cabin.toLowerCase(),\n });\n });\n })\n );\n\n this.subscriptions.add(this.filters$.pipe(tap(this.handleFilterChange.bind(this))).subscribe());\n\n this.showStopsFilter$ = this.shouldShowStopsFilter();\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n this.updateLocations();\n\n this.filtersForm = this.fb.group({\n stopsCount: this.fb.control(null),\n cabin: this.fb.control({ value: this.defaultTravelClass, disabled: this.isTravelClassChoicesDisabled }),\n refundable: this.fb.control(false),\n });\n\n this.subscriptions.add(\n this.filters$\n .pipe(\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n withLatestFrom(this.isFlightSelectionFiltersTestVariant$, this.allBoundsAreDirect$)\n )\n .subscribe(([filters, isFlightSelectionFiltersTestVariant, allBoundsAreDirect]) => {\n this.onUpdateFilters(filters, isFlightSelectionFiltersTestVariant, allBoundsAreDirect);\n })\n );\n\n this.subscriptions.add(\n this.updateFilters$\n .pipe(\n withLatestFrom(\n this.filters$,\n this.isFlightSelectionFiltersTestVariant$.pipe(filter(Boolean)),\n this.allBoundsAreDirect$\n )\n )\n .subscribe(([_, filters, isFlightSelectionFiltersTestVariant, allBoundsAreDirect]) => {\n this.selectedNextArrivalTimes = this.selectedArrivalTimes;\n this.selectedNextDepartureTimes = this.selectedDepartureTimes;\n this.onUpdateFilters(filters, isFlightSelectionFiltersTestVariant, allBoundsAreDirect);\n })\n );\n\n this.subscriptions.add(\n this.isFlightSelectionFiltersTestVariant$.subscribe((isTestVariant) => {\n if (isTestVariant) {\n this.updateNextFiltersFromFormChanges();\n } else {\n this.updateStoreFromFormChanges();\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n ngOnChanges(): void {\n this.updateLocations();\n }\n\n onUpdateFilters(\n filters: FlightFilters,\n isFlightSelectionFiltersTestVariant: boolean,\n allBoundsAreDirect: boolean\n ): void {\n const refundable = filters.refundable === true ? 'true' : 'false';\n const stopsCountOrMaxStops = isFlightSelectionFiltersTestVariant ? filters.maxStops : filters.stopsCount;\n const stopsCount =\n stopsCountOrMaxStops === null || stopsCountOrMaxStops === undefined ? null : String(stopsCountOrMaxStops);\n this.filtersForm.setValue({\n stopsCount: isFlightSelectionFiltersTestVariant && allBoundsAreDirect ? '0' : stopsCount,\n cabin: filters.cabin,\n refundable: refundable,\n });\n }\n\n handleFilterChange(filters: FlightFilters): void {\n if (\n this.selectionPhase === SelectionPhase.OUTBOUND &&\n this.selectedTravelClass &&\n filters.cabin !== this.selectedTravelClass\n ) {\n this.subscriptions.add(\n this.activatedRoute.queryParams.pipe(take(1)).subscribe((p) => {\n try {\n const changedJson = JSON.stringify({\n ...JSON.parse(p.json),\n cabin: filters.cabin,\n });\n const navigationExtras: NavigationExtras = {\n queryParams: {\n json: changedJson,\n },\n queryParamsHandling: 'merge',\n };\n this.router.navigate([], navigationExtras);\n } catch (error) {\n this.sentryLogger.warn('Failed to parse deeplink', { json: p.json, error });\n }\n })\n );\n }\n\n if (\n this.selectedTravelClass &&\n this.selectedTravelClass !== filters.cabin &&\n this.selectionPhase === SelectionPhase.OUTBOUND\n ) {\n this.refetchBounds(filters.cabin);\n }\n\n this.selectedStopsOption = filters.stopsCount;\n this.selectedMaxStopsOption = filters.maxStops;\n this.selectedRefundabilityOption = filters.refundable;\n\n this.selectedTravelClass = filters.cabin;\n this.selectedDepartureTimes = filters.departureTime;\n this.selectedArrivalTimes = filters.arrivalTime;\n\n if (this.selectionPhase === SelectionPhase.INBOUND && !this.defaultInboundTravelClass) {\n this.defaultInboundTravelClass = filters.cabin;\n }\n\n this.updateSelectedFiltersLength();\n this.updateClearAllButton();\n }\n\n updateStoreFromFormChanges(): void {\n this.subscriptions.add(\n this.filtersForm.valueChanges\n .pipe(\n startWith(this.filtersForm.getRawValue()),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n pairwise()\n )\n .subscribe(([prev, next]) => {\n this.showSpinner.emit();\n this.updateCarouselWidth();\n\n if (prev.stopsCount !== next.stopsCount) {\n const stopsCount = next.stopsCount === null ? null : Number(next.stopsCount);\n this.setFilter.emit({ stopsCount });\n this.sendFiltersGaEvent(`booking-flow-select-filter-stops-${next.stopsCount}`);\n }\n\n if (prev.cabin !== next.cabin) {\n this.setFilter.emit({ cabin: next.cabin });\n this.sendFiltersGaEvent(`booking-flow-select-filter-class-${next.cabin.toLowerCase()}`);\n }\n\n if (prev.refundable !== next.refundable) {\n const refundable = next.refundable === 'true' ? true : false;\n this.setFilter.emit({ refundable });\n this.sendFiltersGaEvent(\n `booking-flow-select-filter-refundability-${refundable ? 'refundable' : 'nonrefundable'}`\n );\n }\n })\n );\n }\n\n updateNextFiltersFromFormChanges(): void {\n this.subscriptions.add(\n this.filtersForm.valueChanges\n .pipe(\n startWith(this.filtersForm.getRawValue()),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n )\n .subscribe((next) => {\n const nextFilters = {\n maxStops: next.stopsCount === null || next.stopsCount === undefined ? null : Number(next.stopsCount),\n cabin: next.cabin,\n refundable: next.refundable === 'true' ? true : false,\n };\n\n this.store$.dispatch(setAllNextFilters({ nextFilters }));\n })\n );\n }\n\n sendFiltersGaEvent(elementName: string): void {\n this.gtmService.trackElement(\n elementName,\n GaContext.BOOKING_FLOW,\n ElementTypes.RADIO,\n undefined,\n ElementActions.CLICK\n );\n }\n\n updateClearAllButton(): void {\n // Check if selected stops option is not the default\n const isNotDefaultStopsOption = this.selectedStopsOption !== defaultFilterValues.defaultStopsOption;\n\n // Check if selected refundability option is not the default\n const isNotDefaultRefundabilityOption =\n this.selectedRefundabilityOption &&\n this.selectedRefundabilityOption !== defaultFilterValues.defaultRefundabilityOption;\n\n // Check if selected travel class is not the default and the flag allows clearing\n const isNotDefaultTravelClass =\n this.selectedTravelClass !== defaultFilterValues.defaultTravelClass && this.shouldNotClearTravelClass === false;\n\n // Check if selected departure times or arrival times are less than 3\n const isLessThanThreeDepartureTimes = this.selectedDepartureTimes?.length < 3;\n const isLessThanThreeArrivalTimes = this.selectedArrivalTimes?.length < 3;\n\n // Set the clear button visibility based on the conditions\n this.showClearAllBtn =\n isNotDefaultStopsOption ||\n isNotDefaultRefundabilityOption ||\n isNotDefaultTravelClass ||\n isLessThanThreeDepartureTimes ||\n isLessThanThreeArrivalTimes;\n }\n\n updateSelectedFiltersLength(): void {\n const selectedFilters = [\n this.selectedStopsOption !== defaultFilterValues.defaultStopsOption,\n this.selectedMaxStopsOption !== defaultFilterValues.defaultStopsOption,\n this.selectedRefundabilityOption !== defaultFilterValues.defaultRefundabilityOption &&\n this.selectedRefundabilityOption !== undefined,\n this.selectedTravelClass !== defaultFilterValues.defaultTravelClass && this.selectedTravelClass !== undefined,\n (this.selectedDepartureTimes?.length ?? 0) < defaultFilterValues.defaultTimeOptions.length,\n (this.selectedArrivalTimes?.length ?? 0) < defaultFilterValues.defaultTimeOptions.length,\n ].filter(Boolean).length;\n\n this.selectedFiltersLength$.next(selectedFilters);\n }\n\n private isLongHaul(): Observable {\n return combineLatest([\n this.store$.select(getLocation(this.originLocationCode)),\n this.store$.select(getLocation(this.destinationLocationCode)),\n ]).pipe(\n take(1),\n map(([origin, destination]) => !isShortHaulFlight(origin, destination))\n );\n }\n\n private refetchBounds(cabin: Cabin) {\n const queryParams = this.bookingAirBoundsService.getLastRequestParams();\n\n if (this.selectionPhase === SelectionPhase.OUTBOUND && !queryParams?.isAward) {\n return this.bookingAirBoundsService.triggerFetchBounds({ ...queryParams, cabin });\n } else {\n return null;\n }\n }\n\n clearFilter(flightFilter: keyof FlightFilters): void {\n this.showSpinner.emit();\n this.updateCarouselWidth();\n this.resetFilter.emit({\n type: flightFilter,\n cabin: this.defaultTravelClass,\n });\n }\n\n clearAllFilters(contextForAnalytics: 'desktop' | 'mobile' | 'empty-state' | 'master-reset'): void {\n this.showSpinner.emit();\n\n this.resetAllFilters.emit({\n defaultCabin: this.defaultTravelClass,\n });\n\n this.store$.dispatch(resetAllNextFilters());\n\n this.updateCarouselWidth();\n\n this.selectedNextDepartureTimes = defaultFilterValues.defaultTimeOptions;\n this.selectedNextArrivalTimes = defaultFilterValues.defaultTimeOptions;\n\n this.gtmService.trackElement(\n `booking-flow-clear-all-filters-${contextForAnalytics}`,\n GaContext.BOOKING_FLOW,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n }\n\n onSelectDepartureTime(departureTime: FlightTimeOption, isTestVariant: boolean): void {\n if (isTestVariant) {\n this.selectedNextDepartureTimes = this.selectedNextDepartureTimes?.includes(departureTime)\n ? this.selectedNextDepartureTimes?.filter((d) => d !== departureTime)\n : [...this.selectedNextDepartureTimes, departureTime];\n this.store$.dispatch(setNextDepartureTime({ departureTime: this.selectedNextDepartureTimes }));\n } else {\n const newDepartureTime = this.selectedDepartureTimes?.includes(departureTime)\n ? this.selectedDepartureTimes?.filter((d) => d !== departureTime)\n : [...this.selectedDepartureTimes, departureTime];\n\n this.showSpinner.emit();\n this.setFilter.emit({ departureTime: newDepartureTime });\n this.updateCarouselWidth();\n }\n\n this.gtmService.trackElement(\n `booking-flow-select-filter-departure-${departureTime.toLowerCase()}`,\n GaContext.BOOKING_FLOW,\n ElementTypes.CHECKBOX,\n undefined,\n ElementActions.CLICK\n );\n }\n\n onSelectArrivalTime(arrivalTime: FlightTimeOption, isTestVariant: boolean): void {\n if (isTestVariant) {\n this.selectedNextArrivalTimes = this.selectedNextArrivalTimes?.includes(arrivalTime)\n ? this.selectedNextArrivalTimes.filter((d) => d !== arrivalTime)\n : [...this.selectedNextArrivalTimes, arrivalTime];\n this.store$.dispatch(setNextArrivalTime({ arrivalTime: this.selectedNextArrivalTimes }));\n } else {\n const newArrivalTime = this.selectedArrivalTimes?.includes(arrivalTime)\n ? this.selectedArrivalTimes.filter((d) => d !== arrivalTime)\n : [...this.selectedArrivalTimes, arrivalTime];\n\n this.showSpinner.emit();\n this.setFilter.emit({ arrivalTime: newArrivalTime });\n this.updateCarouselWidth();\n }\n\n this.gtmService.trackElement(\n `booking-flow-select-filter-arrival-${arrivalTime.toLowerCase()}`,\n GaContext.BOOKING_FLOW,\n ElementTypes.CHECKBOX,\n undefined,\n ElementActions.CLICK\n );\n }\n\n shouldShowStopsFilter(): Observable {\n return this.filters$.pipe(\n take(1),\n map((filters) => {\n if (typeof filters?.stopsCount === 'number') {\n return true;\n }\n\n const hasDirectFlights = this.layoverAmounts.some((value) => value === 0);\n const hasMultipleStops = this.layoverAmounts.some((value) => value > 0);\n\n return hasDirectFlights && hasMultipleStops;\n })\n );\n }\n\n updateLocations(): void {\n this.subscriptions.add(\n combineLatest([\n this.store$.select(getLocation(this.originLocationCode)),\n this.store$.select(getLocation(this.destinationLocationCode)),\n ])\n .pipe(take(1))\n .subscribe(([origin, destination]) => {\n this.departureCityName = origin?.cityName;\n this.arrivalCityName = destination?.cityName;\n })\n );\n }\n\n updateCarouselWidth(): void {\n this.resizedWatcher$.next();\n }\n\n closePopover(): void {\n this.popoverService.close(true);\n }\n\n keepOrder(_a: unknown, _b: unknown): number {\n return 0;\n }\n\n getTimeRange(option: FlightTimeOption): string {\n switch (option) {\n case FlightTimeOption.MORNING:\n return '00:00 - 11:59 h';\n case FlightTimeOption.AFTERNOON:\n return '12:00 - 16:59 h';\n case FlightTimeOption.EVENING:\n return '17:00 - 23:59 h';\n default:\n return '';\n }\n }\n\n setActiveTimesTab({ index }: { index: number; data: unknown }): void {\n this.activeTab$.next(index);\n }\n\n showModal(): void {\n this.isModalOpen = true;\n\n this.sendAnalytics('modal');\n }\n\n closeModal(): void {\n this.isModalOpen = false;\n this.updateFilters$.next();\n }\n\n updateNextFiltersToStore(): void {\n this.showSpinner.emit();\n this.subscriptions.add(\n this.isFlightSelectionFiltersTestVariant$.pipe(take(1)).subscribe((isTestVariant) => {\n if (isTestVariant) {\n const filters = this.filtersForm.getRawValue();\n\n const nextFilters = {\n departureTime: this.selectedNextDepartureTimes,\n arrivalTime: this.selectedNextArrivalTimes,\n maxStops:\n filters.stopsCount === null || filters.stopsCount === undefined ? null : Number(filters.stopsCount),\n cabin: filters.cabin,\n refundable: filters.refundable === 'true' ? true : false,\n };\n\n this.setFilter.emit(nextFilters);\n }\n })\n );\n\n this.isModalOpen = false;\n }\n\n sendAnalytics(contextForAnalytics: string): void {\n this.gtmService.trackElement(\n `booking-flow-open-filters-${contextForAnalytics}`,\n GaContext.BOOKING_FLOW,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n }\n\n onToggleDirectFlights(checked: boolean): void {\n this.filtersForm.get('stopsCount').setValue(checked ? '0' : null);\n this.setFilter.emit({ maxStops: checked ? 0 : null });\n\n this.gtmService.trackElement(\n 'booking-flow-direct-flights-shortcut-checkbox',\n GaContext.BOOKING_FLOW,\n ElementTypes.CHECKBOX,\n checked ? 'checked' : 'unchecked',\n ElementActions.CLICK\n );\n }\n}\n","import { Amount } from '@fcom/dapi';\nimport { Cabin, ControlData, FinnairCart, FinnairOrder, PaymentTransaction } from '@fcom/dapi/api/models';\nimport { BookingTripLocations } from '@fcom/common-booking';\nimport { LocationsMap } from '@fcom/core-api/interfaces';\n\nimport {\n ConsentData,\n ElementTypes,\n GA4Product,\n GA4PurchaseEvent,\n GtmEcommerceClickProduct,\n GtmEcommerceImpressionProduct,\n GtmEcommerceList,\n GtmEcommerceMeasurement,\n GtmEcommerceProduct,\n GtmEvent,\n GtmEventData,\n GtmFlightSelectionData,\n GtmPurchaseFlow,\n GtmTripType,\n PromotionItem,\n PromotionType,\n SeatMapData,\n SiteSearchEvents,\n SearchType,\n OfferListFetchParams,\n PreFlightSearchParams,\n GtmClickOutboundData,\n GTtmMulticityTicketTypeOptions,\n GtmMulticityFareFamilySelectionData,\n GtmMulticityOfferSelectionData,\n FlightSegment,\n} from '../../interfaces';\n\nexport abstract class GtmService {\n abstract pageView(path: string): void;\n\n abstract originalPageView(path: string): void;\n\n abstract internalPromotion(promotionItemArray: PromotionItem[], type: PromotionType): void;\n\n /**\n * GTM has a logic to find last valid value for specific object keys with same name.\n * This brings the need to 'flush' optional values with undefined, so that the gtm does not use\n * previous event's values for more recently pushed events.\n */\n abstract trackElement(\n elementName: string,\n context: string | undefined,\n elementType: ElementTypes,\n state: string | undefined,\n action: string | undefined,\n token?: string,\n trackElement?: SearchType\n ): void;\n\n abstract flightSelection(event: GtmEvent, data: GtmFlightSelectionData[]): void;\n\n abstract multicityFareFamilySelection(event: GtmEvent, data: GtmMulticityFareFamilySelectionData): void;\n\n abstract multicityOfferSelection(event: GtmEvent, data: GtmMulticityOfferSelectionData): void;\n\n abstract paxDetailsFlightReview(event: GtmEvent, data: GtmFlightSelectionData[]): void;\n\n abstract flowData(data: ControlData, purchaseFlow: GtmPurchaseFlow): void;\n\n abstract destinationPromotion(element: string, destCity: string, destCountry: string): void;\n\n abstract setConsents(consentData: ConsentData): void;\n\n abstract seatMapEvent(\n elementName: string,\n elementType: ElementTypes,\n state: string | undefined,\n action: string | undefined,\n seatMapData: SeatMapData\n ): void;\n\n /**\n * @TODO: When more ancillaries are implemented, we might want to rethink how they are implemented to\n * the gtm offer creation. For now seats are handled as their separate parameter\n * to the purchase function.\n * NOTE: orderData.seatSelections will be deprecated in the future. After this it will be\n * replaced with information inside orderData.services.\n * To prepare for this we are already sending the orderData.services to the dataLayer\n */\n abstract completePurchase(\n givenOrderData: FinnairOrder,\n type: GtmTripType,\n total: Amount,\n storeLocations: BookingTripLocations,\n totalPoints: string | undefined,\n purchaseFlow: GtmPurchaseFlow,\n discountCode?: string\n ): void;\n\n abstract completeManageBookingPurchase(\n order: FinnairOrder,\n paymentMethods: PaymentTransaction[],\n purchaseFlow: GtmPurchaseFlow\n ): void;\n\n /**\n * @deprecated use ecommerceEventGA4 for GA4\n * Used for old Google analytics.\n * @param event\n * @param type\n * @param products\n * @param purchaseFlow\n * @param currencyCode\n */\n abstract ecommerceEvent(\n event: GtmEvent,\n type: GtmEcommerceMeasurement.ADD | GtmEcommerceMeasurement.REMOVE | GtmEcommerceMeasurement.IMPRESSIONS,\n products: GtmEcommerceProduct[] | GtmEcommerceImpressionProduct[],\n purchaseFlow: GtmPurchaseFlow,\n currencyCode?: string\n ): void;\n\n /**\n * Event for:\n * - adding products from cart/order\n * - removing products from cart/order\n * - viewing not purchased items cart|order\n * - initializing checkout (purchase)\n * @param event\n * @param products\n */\n abstract ecommerceEventGA4(\n event:\n | GtmEvent.ADD_TO_CART\n | GtmEvent.REMOVE_FROM_CART\n | GtmEvent.VIEW_CART\n | GtmEvent.BEGIN_CHECKOUT\n | GtmEvent.VIEW_ITEM_LIST\n | GtmEvent.SELECT_ITEM,\n products: GA4Product[]\n ): void;\n\n abstract enhancedEcommerceProductClickOrDetailView(\n event: GtmEvent,\n type: GtmEcommerceMeasurement,\n product: GtmEcommerceClickProduct,\n list: GtmEcommerceList,\n purchaseFlow: GtmPurchaseFlow,\n currencyCode?: string\n ): void;\n\n abstract ecommercePurchaseEventGa4(eventData: GA4PurchaseEvent): void;\n\n abstract pushEventToDataLayer(event: GtmEvent, eventData?: GtmEventData): void;\n\n abstract checkoutFlights(cartData: FinnairCart, purchaseFlow: GtmPurchaseFlow): void;\n\n abstract siteSearch(\n event: SiteSearchEvents,\n query: string,\n results: number,\n pageNumber: number,\n clickUrl?: string\n ): void;\n\n abstract preFlightSearch(params: PreFlightSearchParams): void;\n\n abstract flightSearch(params: OfferListFetchParams, locations: LocationsMap): void;\n\n abstract clickOutboundEvent(event: GtmClickOutboundData): void;\n\n abstract multicityTicketTypeOptions(cabin: Cabin, ticketTypeOptions: GTtmMulticityTicketTypeOptions): void;\n\n abstract errorEvent(type: string, tripSelection?: FlightSegment[]): void;\n}\n","
\n \n \n
\n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { animate, style, transition, trigger, AnimationEvent } from '@angular/animations';\n\nimport { v4 as uuid } from 'uuid';\n\nimport { SentryLogger } from '@fcom/core';\n\nexport const EXPAND_ANIMATION_TIME = 300;\n\n/**\n * A expandable area controllable via inputs.\n *\n * This only handles the expandable area and not the button to trigger this content area. This\n * should be done in a case-by-case basis.\n *\n * @example\n *\n * \n *
\n *     
\n * \n *\n * \n *
\n *

My test content

\n *

A really descriptive and cool paragraph

\n *

A really descriptive and cool paragraph

\n *

A really descriptive and cool paragraph

\n *
\n * \n *
\n *
\n *
\n */\n@Component({\n selector: 'fcom-expand',\n templateUrl: './expand.component.html',\n styleUrls: ['./expand.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('openClose', [\n transition(':enter', [\n style({ height: 0 }),\n animate(`${EXPAND_ANIMATION_TIME}ms cubic-bezier(.17,.67,.83,.67)`, style({ height: '*' })),\n ]),\n transition(':leave', [animate(`${EXPAND_ANIMATION_TIME}ms cubic-bezier(.17,.67,.83,.67)`, style({ height: 0 }))]),\n ]),\n ],\n})\nexport class ExpandComponent implements OnInit, OnDestroy {\n /**\n * Boolean indicating whether the expandable area should be open or closed\n */\n @Input() open = false;\n\n /**\n * ID for the expanded container.\n * The button toggling the expand should have an `aria-controls=\"ID\"`\n * attribute with the matching ID string.\n */\n @Input() ariaId: string = uuid();\n\n /**\n * Id of the toggle button that expands and collapses the region.\n * Required for accessibility. This will throw a logger.error if not set.\n */\n @Input() ariaLabelledBy: string;\n\n @Output() expanded: EventEmitter = new EventEmitter();\n\n animationTimeOut: ReturnType;\n\n constructor(private logger: SentryLogger) {}\n\n ngOnInit(): void {\n if (!this.ariaLabelledBy) {\n this.logger.error('ariaLabelledBy Is required for accessibility');\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.animationTimeOut);\n }\n\n onAnimationStart(event: AnimationEvent): void {\n event.element.classList.add('transition');\n clearTimeout(this.animationTimeOut);\n\n this.animationTimeOut = setTimeout(() => {\n event?.element?.classList?.remove('transition');\n this.expanded.emit();\n }, EXPAND_ANIMATION_TIME);\n }\n}\n","import { LocalDate } from '@fcom/core/index';\n\nimport { DateSelection, Month } from './date.interface';\n\n/**\n * Util method to find a month that contains date out of given months\n * @param months to be checked\n * @param targetDate represents the date we are searching for\n * @returns found month or undefined\n */\nexport const getMonthByDate = (months: Month[], targetDate: LocalDate): Month | undefined => {\n return months.find((month) => month.weeks.some((week) => week.days.some((day) => targetDate.equals(day?.date))));\n};\n\n/**\n * Checks if prev value and next value are same\n * @param prev DateSelection\n * @param next DateSelection\n * @returns\n */\nexport const areSelectedDatesChanged = (prev: DateSelection, next: DateSelection): boolean => {\n return (\n !(prev?.startDate === next.startDate || prev?.startDate?.equals(next.startDate)) ||\n !(prev?.endDate === next.endDate || prev?.endDate?.equals(next.endDate))\n );\n};\n","import { createSelector, createFeatureSelector, MemoizedSelector } from '@ngrx/store';\n\nimport { Location, LocationsMap } from '@fcom/core-api';\n\nimport { LocationsState, LocationAppState } from '../../interfaces';\nimport * as fromLocations from '../reducers/locations.reducer';\n\nconst selectLocationsState = createFeatureSelector('locations');\n\nexport const getLocation = (locationCode: string): MemoizedSelector =>\n createSelector(selectLocationsState, (state) => {\n return fromLocations.getLocationData(state, locationCode);\n });\n\nexport const getLocations = (): MemoizedSelector =>\n createSelector(selectLocationsState, (state) => {\n return state.locations;\n });\n","'use strict';\n\n/** @type {import('./min')} */\nmodule.exports = Math.min;\n","import { TripType } from '../interfaces';\n\nexport const CmsTripTypeMap = {\n [TripType.ONEWAY]: 'oneWay',\n [TripType.RETURN]: 'return',\n [TripType.MULTICITY]: 'multiCity',\n};\n","'use strict';\n\n/** @type {import('./isNaN')} */\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","import { Abbreviation, CurrencySettings, PriceSettings } from '../../interfaces/currency.interface';\n\nconst NORDIC_EXACT_PRICE_FORMAT = '1$XYZ';\n\nexport const MAX_ABBR_DIGITS = 7;\n\nexport const DEFAULT_ABBR_SETTINGS: Abbreviation = {\n divider: 1000000,\n decimals: 1,\n};\n\nexport const ABBR_SETTINGS: { [digits: number]: Abbreviation } = {\n 5: {\n divider: 1000,\n decimals: 1,\n },\n 6: {\n divider: 1000,\n decimals: 0,\n },\n 7: {\n divider: 1000000,\n decimals: 2,\n },\n};\n\nconst ABBR_KO_JA_SETTINGS: { [digits: number]: Abbreviation } = {\n 5: {\n divider: 10000,\n decimals: 1,\n },\n 6: {\n divider: 10000,\n decimals: 1,\n },\n 7: {\n divider: 10000,\n decimals: 0,\n },\n};\n\nexport const DEFAULT_SETTINGS: PriceSettings = {\n roundPrice: false,\n useSymbol: true,\n absoluteValue: false,\n abbreviate: false,\n stripZeroCents: false,\n roundDigits: 1,\n useCustomFormat: false,\n};\n\nexport const ROUNDER = {\n 1: 1,\n 2: 10,\n 3: 100,\n 4: 1000,\n};\n\nexport const currencySettings: { [currencyCode: string]: CurrencySettings } = {\n // symbol: default is the 3-language code if no symbol is defined\n // roundDigits: Default is 0 (no rounding)\n EUR: {\n symbol: '€',\n },\n CNY: {},\n KRW: {\n symbol: '₩',\n roundDigits: 3,\n stripZeroCents: true,\n customAbbrSettings: {\n symbol: '만',\n settings: ABBR_KO_JA_SETTINGS,\n useSymbol: ['kr-ko'],\n },\n },\n JPY: {\n symbol: '¥',\n roundDigits: 4,\n stripZeroCents: true,\n customAbbrSettings: {\n symbol: '万',\n settings: ABBR_KO_JA_SETTINGS,\n useSymbol: ['jp-ja'],\n },\n },\n GBP: {\n symbol: '£',\n },\n RUB: {\n symbol: '₽',\n },\n DKK: {\n customAbbrSettings: {\n symbol: ',-',\n format: NORDIC_EXACT_PRICE_FORMAT,\n },\n },\n NOK: {\n customAbbrSettings: {\n symbol: ',-',\n format: NORDIC_EXACT_PRICE_FORMAT,\n },\n },\n SEK: {\n customAbbrSettings: {\n symbol: ':-',\n format: NORDIC_EXACT_PRICE_FORMAT,\n },\n },\n};\n","import { Injectable } from '@angular/core';\n\nimport { Observable, EMPTY } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { Amount } from '@fcom/dapi';\n\nimport { isPresent, isTruthy } from '../../utils';\nimport { Abbreviation, CustomAbbreviationSettings, PriceSettings } from '../../interfaces/currency.interface';\nimport {\n ABBR_SETTINGS,\n DEFAULT_ABBR_SETTINGS,\n DEFAULT_SETTINGS,\n MAX_ABBR_DIGITS,\n ROUNDER,\n currencySettings,\n} from './currency-settings';\n\n@Injectable()\nexport class CurrencyService {\n constructor(private languageService: LanguageService) {}\n\n formatPrice(price: Amount, settings?: PriceSettings): Observable {\n if (!isTruthy(price) || !isTruthy(price.amount) || !isTruthy(price.currencyCode)) {\n return EMPTY;\n }\n const mergedSettings = Object.assign({}, DEFAULT_SETTINGS, currencySettings[price.currencyCode], settings);\n // eslint-disable-next-line no-sparse-arrays\n const [, plusSign] = price.amount.match(/(^\\+)\\d{1,}/) || [, ''];\n\n const priceNumber = mergedSettings.absoluteValue ? Math.abs(Number(price.amount)) : Number(price.amount);\n\n let amount: string = priceNumber.toFixed(2);\n if (mergedSettings.roundPrice && mergedSettings.roundDigits) {\n amount =\n plusSign +\n (Math.ceil(priceNumber / ROUNDER[mergedSettings.roundDigits]) * ROUNDER[mergedSettings.roundDigits]).toString();\n }\n if (mergedSettings.stripZeroCents) {\n amount = plusSign + amount.replace(/\\.0{1,3}$/, '');\n }\n return this.languageService.translate('number').pipe(\n map((i18n) => {\n const customSymbol = mergedSettings.customAbbrSettings?.symbol;\n\n const currencyFormat =\n mergedSettings.useCustomFormat && isPresent(mergedSettings.customAbbrSettings?.format)\n ? mergedSettings.customAbbrSettings.format\n : i18n.currencyFormat;\n\n const code =\n mergedSettings.useSymbol &&\n isPresent(mergedSettings.symbol) &&\n (!isPresent(customSymbol) || !mergedSettings.abbreviate)\n ? mergedSettings.symbol\n : '';\n\n if (mergedSettings.abbreviate) {\n const { value, abbreviated } = this.abbreviateAmount(\n Number(amount).toFixed(0),\n i18n.thousandAbbreviation,\n i18n.millionAbbreviation,\n mergedSettings?.customAbbrSettings\n );\n\n const shouldSetSymbol = !abbreviated && !isPresent(mergedSettings?.symbol);\n const symbol = shouldSetSymbol && isPresent(customSymbol) ? customSymbol : '';\n const outputString = currencyFormat.replace(/1/, value).replace(/\\s/g, '');\n return outputString.replace(/\\$/, code).replace(/XYZ/, symbol).trim();\n }\n\n const outputAmount = amount\n .replace('.', i18n.decimalSeparator)\n .replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, `$1${i18n.thousandSeparator}`);\n const symbol = mergedSettings.useSymbol && isPresent(mergedSettings?.symbol) ? '' : price.currencyCode;\n const outputString = currencyFormat.replace(/1/, outputAmount);\n\n return outputString.replace(/\\$/, code).replace(/XYZ/, symbol).trim();\n })\n );\n }\n\n formatPoints(amount: number, abbreviate = false): Observable {\n return this.languageService.translate('number').pipe(\n switchMap((i18n) =>\n this.formatPrice(\n {\n amount: amount.toString(),\n currencyCode: i18n.currency,\n },\n {\n useSymbol: false,\n abbreviate,\n stripZeroCents: true,\n }\n ).pipe(map((points) => points.replace(i18n.currency, '').trim()))\n )\n );\n }\n\n private abbreviateAmount(\n amount: string,\n thousandAbbr: string,\n millionAbbr: string,\n customAbbrSettings: CustomAbbreviationSettings\n ): { value: string; abbreviated?: boolean } {\n if (!isPresent(amount) || amount.length <= 4) {\n return { value: amount, abbreviated: false };\n }\n\n const { divider, decimals }: Abbreviation =\n isPresent(customAbbrSettings) && customAbbrSettings?.useSymbol?.includes(this.languageService.langValue)\n ? customAbbrSettings.settings[amount.length] || customAbbrSettings.settings[MAX_ABBR_DIGITS]\n : ABBR_SETTINGS[amount.length] || DEFAULT_ABBR_SETTINGS;\n\n const basicAbbr: string =\n amount.length < MAX_ABBR_DIGITS || (isPresent(customAbbrSettings) && Math.log10(divider) < MAX_ABBR_DIGITS - 1)\n ? thousandAbbr\n : millionAbbr;\n const abbreviation: string =\n isPresent(customAbbrSettings) && customAbbrSettings?.useSymbol?.includes(this.languageService.langValue)\n ? customAbbrSettings.symbol\n : basicAbbr;\n const value = `${(Number(amount) / divider).toFixed(decimals).replace(/\\.0{1,3}$/, '')}${abbreviation}`;\n\n return { value, abbreviated: true };\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { Injectable, Inject } from '@angular/core';\n\n@Injectable()\nexport class FormPostService {\n constructor(@Inject(DOCUMENT) private document: Document) {}\n\n /**\n * Send the given data to the given url as traditional form post request, not XHR.\n *\n * NOTE: Used only in the browser after user interaction, will not work on server\n */\n post(url: string, data: any, method = 'POST', target = '_self'): void {\n // Construct form for POSTing data\n const form: HTMLFormElement = this.document.createElement('form');\n form.method = method;\n form.target = target;\n form.action = url;\n\n Object.keys(data).forEach((key) => {\n const value = data[key];\n const input: HTMLInputElement = this.document.createElement('input');\n form.appendChild(input);\n input.type = 'hidden';\n input.name = key;\n input.value = value;\n });\n\n this.document.body.appendChild(form);\n form.submit();\n }\n}\n","import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { EMPTY, Observable, of, throwError } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport {\n Location,\n LocationGeoLocData,\n LocationMatchData,\n LocationRouteCffData,\n LocationSuggestions,\n SuggestedLocationsResponse,\n} from '@fcom/core-api';\nimport { BUS_CONNECTION_LOCATION_CODES, RAIL_AND_FLY_LOCATION_CODES } from '@fcom/core/constants';\n\nimport { ConfigService } from '../config/config.service';\nimport { SentryLogger } from '../sentry/sentry.logger';\nimport { TransportType } from '../../../common-booking/interfaces/utils.interface';\n\nexport enum LocationMatchOnline {\n TRUE = 'true',\n FALSE = 'false',\n ALL = 'all',\n}\n\nconst endpoints = {\n ROUTE_CFF: '/routecff',\n LOCATION_MATCH: '/locationmatch',\n GEOLOCATION: '/geolocation',\n LOCATION: '/location/',\n SUGGESTIONS: '/suggestedlocations',\n};\n\nconst locationMatchFields = {\n QUERY: 'query',\n LOCALE: 'locale',\n ONLINE: 'online',\n CONTINENT_CODE: 'continentCode',\n};\n\nconst geolocationMatchFields = {\n LOCALE: 'locale',\n LATITUDE: 'latitude',\n LONGITUDE: 'longitude',\n};\n\nenum RouteCffFields {\n ORIGIN = 'originLocation',\n DESTINATION = 'destinationLocation',\n IS_AWARD = 'isAward',\n LOCALE = 'locale',\n IS_CORPORATE = 'isCorporate',\n}\n\nenum SuggestedLocationsFields {\n COUNTRY_CODE = 'countryCode',\n LOCALE = 'locale',\n}\n\nconst GERMAN_RAILWAY = 'QYG';\n\n@Injectable()\nexport class LocationRouteCffService {\n private routeCFFUrl: string;\n private locationMatchUrl: string;\n private geolocationMatchUrl: string;\n private singleLocationUrl: string;\n private suggestedLocationsUrl: string;\n private locationCache: Record>;\n private enableGermanRailway: boolean;\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private sentryLogger: SentryLogger\n ) {\n this.routeCFFUrl = configService.cfg.locationRouteCffUrl + endpoints.ROUTE_CFF;\n this.locationMatchUrl = configService.cfg.locationRouteCffUrl + endpoints.LOCATION_MATCH;\n this.geolocationMatchUrl = configService.cfg.locationRouteCffUrl + endpoints.GEOLOCATION;\n this.singleLocationUrl = configService.cfg.locationRouteCffUrl + endpoints.LOCATION;\n this.suggestedLocationsUrl = configService.cfg.locationRouteCffUrl + endpoints.SUGGESTIONS;\n this.enableGermanRailway = this.configService.cfg.enableGermanRailway;\n this.locationCache = {};\n }\n\n locationMatchesFor(\n query: string,\n locale: string,\n online: LocationMatchOnline = undefined,\n bail = false,\n continentCode?: string\n ): Observable {\n let search: HttpParams = new HttpParams()\n .set(locationMatchFields.QUERY, query)\n .set(locationMatchFields.LOCALE, locale);\n if (online) {\n search = search.set(locationMatchFields.ONLINE, online);\n }\n\n if (continentCode) {\n search = search.set(locationMatchFields.CONTINENT_CODE, continentCode);\n }\n\n return this.getLocationMatchesFor(this.locationMatchUrl, search, bail, online);\n }\n\n bestGuessFor(query: string, locale: string): Observable {\n if (this.locationCache[locale]?.[query]) {\n return of(this.locationCache[locale][query]);\n } else {\n return this.getLocationWithIataCode(this.singleLocationUrl, query, locale).pipe(\n catchError((error: unknown) => {\n this.sentryLogger.warn('Could not find exact location match for query', { query, error });\n return this.locationMatchesFor(query, locale, undefined, true).pipe(\n map((l: LocationMatchData) => l.items[0])\n );\n }),\n catchError((error: unknown) => {\n this.sentryLogger.error('Could not get best guess for query', {\n query,\n error,\n });\n return EMPTY;\n })\n );\n }\n }\n\n geolocMatchFor(\n latitude: string | number,\n longitude: string | number,\n locale: string\n ): Observable {\n const search: HttpParams = new HttpParams()\n .set(geolocationMatchFields.LATITUDE, parseFloat(`${latitude}`).toFixed(1))\n .set(geolocationMatchFields.LONGITUDE, parseFloat(`${longitude}`).toFixed(1))\n .set(geolocationMatchFields.LOCALE, locale);\n\n return this.getGeolocMatchFor(this.geolocationMatchUrl, search);\n }\n\n getLocationMatchesFor(\n endpointUrl: string,\n params: HttpParams,\n bail: boolean,\n online: LocationMatchOnline\n ): Observable {\n return this.http.get(endpointUrl, { params }).pipe(\n map((data: LocationMatchData) => {\n // we do not want to accidentally show rail and fly until it is developed\n const locationMatchData = this.enableGermanRailway ? data : this.checkForGermanRailway(data, online);\n\n // Ensure that LocationMatchData items is an array\n return Array.isArray(locationMatchData.items)\n ? locationMatchData\n : Object.assign({}, locationMatchData, { items: [] });\n }),\n map((data: LocationMatchData) => {\n return {\n ...data,\n items: data.items.map((location) => {\n const transportTypes = [];\n\n if (BUS_CONNECTION_LOCATION_CODES.includes(location.locationCode)) {\n transportTypes.push(TransportType.Bus);\n }\n\n if (RAIL_AND_FLY_LOCATION_CODES.includes(location.locationCode)) {\n transportTypes.push(TransportType.Train);\n }\n\n if (!transportTypes.length) {\n transportTypes.push(TransportType.Flight);\n }\n\n return {\n ...location,\n transportType: transportTypes,\n };\n }),\n };\n }),\n catchError((err: unknown) => {\n this.sentryLogger.error('Error getting location match data', {\n error: err,\n });\n const errorResponse: LocationMatchData = {\n ok: false,\n count: 0,\n locale: '',\n items: [],\n };\n return bail ? throwError(() => err) : of(errorResponse);\n })\n );\n }\n\n checkForGermanRailway(data: LocationMatchData, online: LocationMatchOnline): LocationMatchData {\n if (online !== undefined && online !== LocationMatchOnline.TRUE) {\n return data;\n }\n\n return {\n ...data,\n items: data.items?.filter((location) => location.locationCode !== GERMAN_RAILWAY),\n };\n }\n\n getGeolocMatchFor(endpointUrl: string, params: HttpParams): Observable {\n return this.http.get(endpointUrl, { params }).pipe(\n catchError((err: unknown) => {\n this.sentryLogger.error('Error getting geoloc data', { error: err });\n const errorResponse: LocationGeoLocData = {\n ok: false,\n locale: '',\n item: undefined,\n };\n return of(errorResponse);\n })\n );\n }\n\n routeCffsFor(\n departureLocation: string,\n destinationLocation: string,\n isAward?: string,\n locale?: string,\n isCorporate?: string\n ): Observable {\n let search: HttpParams = new HttpParams()\n .set(RouteCffFields.ORIGIN, departureLocation)\n .set(RouteCffFields.DESTINATION, destinationLocation);\n\n if (isAward) {\n search = search.set(RouteCffFields.IS_AWARD, isAward);\n }\n\n if (locale) {\n search = search.set(RouteCffFields.LOCALE, locale);\n }\n\n if (this.configService.cfg.enableCorporateTravelClassLimit && isCorporate) {\n search = search.set(RouteCffFields.IS_CORPORATE, isCorporate);\n }\n\n return this.getRouteCffsFor(this.routeCFFUrl, search);\n }\n\n getSuggestedLocations(countryCode: string, locale: string): Observable {\n const params: HttpParams = new HttpParams()\n .set(SuggestedLocationsFields.COUNTRY_CODE, countryCode)\n .set(SuggestedLocationsFields.LOCALE, locale);\n return this.http.get(this.suggestedLocationsUrl, { params }).pipe(\n catchError((error: unknown) => {\n this.sentryLogger.error('Error getting location suggestions', { error });\n return of({\n ok: false,\n departures: {\n count: 0,\n items: [],\n },\n destinations: {\n count: 0,\n items: [],\n },\n });\n }),\n map((suggestedLocationResponse) => {\n return {\n departures: suggestedLocationResponse.departures.items ?? [],\n destinations: suggestedLocationResponse.destinations.items ?? [],\n };\n })\n );\n }\n\n getLocaleCityName(query: string, targetLocale: string): Observable {\n return this.http.get(this.singleLocationUrl + query).pipe(\n map(\n (exactLocationData: any): string =>\n exactLocationData[`cityName_${targetLocale}`] || exactLocationData['cityName']\n ),\n catchError((err: unknown) => {\n this.sentryLogger.warn('Error finding LocaleCityName', { query, error: err });\n return throwError(() => err);\n })\n );\n }\n\n private getLocationWithIataCode(endpointUrl: string, query: string, locale: string): Observable {\n return this.http.get(endpointUrl + query).pipe(\n map((exactLocationData: any): Location => {\n const title = exactLocationData[`title_${locale}`] || exactLocationData['title'];\n const country = exactLocationData[`country_${locale}`] || exactLocationData['country'];\n const cityName = exactLocationData[`cityName_${locale}`] || exactLocationData['cityName'];\n const location: Location = {\n title,\n country,\n cityName,\n countryCode: exactLocationData.countryCode,\n locationCode: exactLocationData.locationCode,\n AJBPartner: exactLocationData.ajbPartner,\n SJBPartner: exactLocationData.sjbPartner,\n airAlliance: exactLocationData.airAlliance,\n airAward: exactLocationData.airAward,\n airPartner: exactLocationData.airPartner,\n latitude: exactLocationData.latitude,\n longitude: exactLocationData.longitude,\n type: exactLocationData.type,\n picture: exactLocationData.picture,\n continentCode: exactLocationData.continentCode,\n };\n if (exactLocationData.locationCityCode) {\n location.locationCityCode = exactLocationData.locationCityCode;\n }\n\n if (!this.locationCache[locale]) {\n this.locationCache[locale] = {};\n }\n this.locationCache[locale][query] = location;\n\n return location;\n }),\n catchError((err: unknown) => {\n this.sentryLogger.warn('Error finding location', { query, error: err });\n return throwError(() => err);\n })\n );\n }\n\n private getRouteCffsFor(endpointUrl: string, params: HttpParams): Observable {\n return this.http.get(endpointUrl, { params }).pipe(\n catchError((err: unknown) => {\n this.sentryLogger.error('Error getting route cff data', { error: err });\n return of({} as LocationRouteCffData);\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, ReplaySubject, Subject, merge, NEVER } from 'rxjs';\nimport { take, timeout, catchError, tap, switchMap, map, filter, takeUntil } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { Location, LocationGeoLocData } from '@fcom/core-api';\nimport { combineTemplate, finShare } from '@fcom/rx';\nimport { isPresent, mergeDeep } from '@fcom/core/utils';\n\nimport { LocationRouteCffService } from '../location-routecff/location-routecff.service';\nimport { NavigatorActions } from '../../actions';\nimport { AppState, LatLng } from '../../interfaces';\nimport { akamaiGeolocation, browserGeolocation } from '../../selectors';\nimport { mapErrorForSentry } from '../../utils';\nimport { SentryLogger } from '../sentry/sentry.logger';\n\n@Injectable()\nexport class GeolocationService {\n static INITIAL_LOCATION_TIMEOUT = 1000;\n static NAVIGATOR_GEOLOCATION_TIMEOUT_MS = 20000;\n static GEOLOCATION_MAX_AGE_MS: number = 60 * 60 * 1000;\n\n private browserGeolocation$: Observable;\n private akamaiGeolocation$: Observable;\n private userLocation$: Observable;\n private givenLocation$: Subject = new ReplaySubject(1);\n private nearestAirport$: Observable;\n private watchId: number;\n\n constructor(\n private locationRouteCffService: LocationRouteCffService,\n private languageService: LanguageService,\n private store$: Store,\n private sentryLogger: SentryLogger\n ) {\n this.akamaiGeolocation$ = this.store$.pipe(akamaiGeolocation());\n this.browserGeolocation$ = this.store$.pipe(browserGeolocation());\n\n this.userLocation$ = merge(this.givenLocation$, this.browserGeolocation$).pipe(\n take(1),\n timeout(GeolocationService.INITIAL_LOCATION_TIMEOUT),\n catchError(() => this.akamaiGeolocation$),\n finShare()\n );\n\n this.nearestAirport$ = this.getNearestAirportForLocation(this.userLocation$);\n }\n\n init(paramsLocation?: LatLng): void {\n if (paramsLocation) {\n this.givenLocation$.next(paramsLocation);\n this.givenLocation$.complete();\n }\n }\n\n get nearestAirport(): Observable {\n return this.nearestAirport$;\n }\n\n getGeolocationFromNavigator(cancelGeolocationFetch$: Observable): Observable {\n this.store$.dispatch(NavigatorActions.setBrowserGeolocationLoading());\n\n return new Observable((subscriber) => {\n try {\n this.clearWatchId();\n this.watchId = navigator.geolocation.watchPosition(\n (position) => {\n const latLng: LatLng = {\n lat: position.coords.latitude,\n lng: position.coords.longitude,\n };\n this.store$.dispatch(NavigatorActions.setBrowserGeolocation({ location: latLng }));\n subscriber.next(latLng);\n subscriber.complete();\n this.clearWatchId();\n },\n (error) => {\n this.sentryLogger.warn('Navigator.geolocation fetch failed', {\n error: mapErrorForSentry(error),\n });\n subscriber.error(error);\n // eslint-disable-next-line rxjs/no-redundant-notify\n subscriber.complete();\n this.clearWatchId();\n },\n {\n enableHighAccuracy: false,\n timeout: GeolocationService.NAVIGATOR_GEOLOCATION_TIMEOUT_MS,\n maximumAge: GeolocationService.GEOLOCATION_MAX_AGE_MS,\n }\n );\n } catch (e) {\n subscriber.error(e);\n // eslint-disable-next-line rxjs/no-redundant-notify\n subscriber.complete();\n this.clearWatchId();\n }\n return function dispose() {};\n }).pipe(\n this.getNearestAirportForLocation,\n tap(() => this.store$.dispatch(NavigatorActions.removeBrowserGeolocationLoading())),\n catchError(() => {\n this.store$.dispatch(NavigatorActions.removeBrowserGeolocationLoading());\n return NEVER;\n }),\n takeUntil(\n cancelGeolocationFetch$.pipe(\n tap(() => this.store$.dispatch(NavigatorActions.removeBrowserGeolocationLoading()))\n )\n )\n );\n }\n\n private clearWatchId = () => {\n if (this.watchId) {\n try {\n navigator.geolocation.clearWatch(this.watchId);\n // eslint-disable-next-line no-empty\n } catch {}\n }\n };\n\n private getNearestAirportForLocation = (location$: Observable) => {\n return combineTemplate({\n userLocation: location$,\n locale: this.languageService.locale,\n }).pipe(\n switchMap(({ userLocation, locale }) =>\n this.locationRouteCffService.geolocMatchFor(userLocation.lat, userLocation.lng, locale)\n ),\n filter((locationData: LocationGeoLocData) => locationData.ok),\n map((locationData: LocationGeoLocData) => locationData.item),\n map((l: Location) => mergeDeep(l, { isFromUserLocation: true })),\n filter(isPresent)\n );\n };\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable, of } from 'rxjs';\nimport { map, take, catchError } from 'rxjs/operators';\n\nimport { MaintenanceConfigResponse, MaintenanceConfigFeature } from '../../interfaces';\nimport { SentryLogger } from '../sentry/sentry.logger';\nimport { ConfigService } from '../config/config.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MaintenanceConfigService {\n constructor(\n private http: HttpClient,\n private configService: ConfigService,\n private sentryLogger: SentryLogger\n ) {}\n\n /**\n * Fetches response from maintenance config endpoint\n */\n getMaintenanceConfig(): Observable {\n return this.http.get(`${this.configService.cfg.configUrl}/config`).pipe(\n catchError((err: unknown) => {\n this.sentryLogger.error('Failed to fetch config for features under maintenance break', { error: err });\n return of({});\n })\n );\n }\n\n /**\n * Returns boolean value for the feature to check the disabled status\n * @param key feature to get from config response\n */\n getStatusForFeature(key: MaintenanceConfigFeature): Observable {\n return this.getMaintenanceConfig().pipe(\n take(1),\n map((config) => {\n // fallback to false when fetched feature is not in response\n // or if value for it is not boolean as expected\n if (!config[key] || typeof config[key] !== 'boolean') {\n return false;\n }\n\n return config[key];\n })\n );\n }\n}\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\n\nimport { convertStringDatesToDateObjects } from '@fcom/core/utils';\n\nimport { Storage } from '../../interfaces';\nimport { WindowRef } from '../../providers/window';\nimport { DEFAULT_STORAGE_ROOT } from './constants';\nimport { environment } from '../../../../environments/environment';\n\nexport const SESSION_STORAGE_VERSION = new InjectionToken('SessionStorageVersion');\nexport const LOCAL_STORAGE_VERSION = new InjectionToken('LocalStorageVersion');\n\nexport type StorageName = 'localStorage' | 'sessionStorage';\nexport type StorageType = 'SESSION' | 'LOCAL';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n public static readonly STORAGE_VERSION_KEY = '__STORAGE_VERSION__';\n\n SESSION: Storage;\n LOCAL: Storage;\n\n private root: string;\n\n constructor(\n private windowRef: WindowRef,\n @Inject(SESSION_STORAGE_VERSION) sessionStorageVersion: string,\n @Inject(LOCAL_STORAGE_VERSION) localStorageVersion: string\n ) {\n if (environment.storageRoot) {\n this.root = environment.storageRoot;\n } else {\n this.root = this.windowRef.nativeWindow['storageRoot'] || DEFAULT_STORAGE_ROOT;\n }\n this.SESSION = this.store('sessionStorage', sessionStorageVersion);\n this.LOCAL = this.store('localStorage', localStorageVersion);\n }\n\n private storageAvailable(type: StorageName): boolean {\n try {\n const storage = window[type];\n const x = '__storage_test__';\n storage.setItem(x, x);\n storage.removeItem(x);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private store(storageName: StorageName, storageVersion: string): Storage {\n const storageAvailable = this.storageAvailable(storageName);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n\n const storage: Storage = {\n set(key: string, object: any): void {\n if (storageAvailable) {\n self.setItem(storageName, key, object);\n }\n },\n get(key: string, convertDates = false): any {\n if (storageAvailable) {\n let value = self.getItem(storageName, key);\n if (value && convertDates) {\n value = convertStringDatesToDateObjects(value);\n }\n return value;\n }\n return undefined;\n },\n remove(key: string): void {\n if (storageAvailable) {\n self.removeItem(storageName, key);\n }\n },\n keys(): string[] {\n if (storageAvailable) {\n return self.keys(storageName);\n }\n return [];\n },\n clear(): void {\n this.keys().forEach(this.remove);\n },\n };\n\n if (storageAvailable && storageVersion && storage.get(StorageService.STORAGE_VERSION_KEY) !== storageVersion) {\n // TODO: Migrate if needed\n storage.clear();\n storage.set(StorageService.STORAGE_VERSION_KEY, storageVersion);\n }\n\n return storage;\n }\n\n private setItem(storageName: string, key: string, object: any): void {\n window[storageName].setItem(`${this.root}.${key}`, object);\n }\n\n private getItem(storageName: string, key: string): any {\n return window[storageName].getItem(`${this.root}.${key}`);\n }\n\n private removeItem(storageName: string, key: string): any {\n window[storageName].removeItem(`${this.root}.${key}`);\n }\n\n private keys(storageName: string): string[] {\n return Object.keys(window[storageName])\n .map((key) => key.substring(this.root.length + 1))\n .filter(Boolean);\n }\n}\n","export const DEFAULT_STORAGE_ROOT = 'finnaircom';\n","import { Inject, Injectable, NgZone, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Meta } from '@angular/platform-browser';\n\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\n\nimport { isFunction, isPresent } from '@fcom/core/utils';\n\nimport { WindowRef } from '../../providers/window';\nimport { StorageService } from '../storage/storage.service';\nimport { ConfigService } from '../config/config.service';\nimport { CheckInResult, CheckInStatus, NativeBridgeService, OrderDataForNative } from './native-bridge.service';\n\nconst NATIVE_KEY = 'X-Native';\n\ntype RequiredPostMessageFunc = { postMessage: (t: T) => void };\ntype OptionalPostMessageFunc = { postMessage: (t?: T) => void };\ntype PostMessageFunc = RequiredPostMessageFunc | OptionalPostMessageFunc;\n\ninterface NativeIosApp {\n addBooking?: RequiredPostMessageFunc;\n bookingFlowInitialized?: OptionalPostMessageFunc;\n openMenu?: OptionalPostMessageFunc;\n isNativeFinnairIosApp?: boolean;\n onCheckInLoaded?: RequiredPostMessageFunc;\n onAcceptCheckIn?: RequiredPostMessageFunc;\n}\n\ninterface NativeAndroidApp {\n addBooking?: (str: string) => void;\n bookingFlowInitialized?: () => void;\n openMenu?: () => void;\n showMenu?: () => void;\n onCheckInLoaded?: (checkInStatusStr: string) => void;\n onAcceptCheckIn?: (checkInResultStr: string) => void;\n}\n\nconst sendFn = (windowRef: WindowRef, device: string) => (message: string) =>\n windowRef.nativeWindow?.parent?.postMessage(`[APP_EVENT]: ${device} ${message}`, '*');\n\nconst getEmulatedAndroidRef = (windowRef: WindowRef): NativeAndroidApp => {\n const sendMessage = sendFn(windowRef, 'Android');\n return {\n addBooking: (str: string) => sendMessage(`addBooking ${str}`),\n bookingFlowInitialized: () => sendMessage('bookingFlowInitialized'),\n openMenu: () => sendMessage('openMenu'),\n showMenu: () => sendMessage('showMenu'),\n onCheckInLoaded: (checkInStatusStr: string) => sendMessage(`onCheckInLoaded ${checkInStatusStr}`),\n onAcceptCheckIn: (checkInResultStr: string) => sendMessage(`onAcceptCheckIn ${checkInResultStr}`),\n };\n};\n\nconst getEmulatedIosRef = (windowRef: WindowRef) => {\n const sendMessage = sendFn(windowRef, 'iOS');\n return {\n messageHandlers: {\n isNativeFinnairIosApp: true,\n addBooking: { postMessage: (data: OrderDataForNative) => sendMessage(`addBooking ${JSON.stringify(data)}`) },\n bookingFlowInitialized: { postMessage: () => sendMessage('bookingFlowInitialized') },\n openMenu: { postMessage: () => sendMessage('openMenu') },\n onCheckInLoaded: { postMessage: (data: CheckInStatus) => sendMessage(`onCheckInLoaded ${JSON.stringify(data)}`) },\n onAcceptCheckIn: { postMessage: (data: CheckInResult) => sendMessage(`onAcceptCheckIn ${JSON.stringify(data)}`) },\n } as NativeIosApp,\n };\n};\n\n@Injectable()\nexport class ClientNativeBridgeService implements NativeBridgeService {\n private nativeiOSApp: NativeIosApp;\n private nativeAndroidApp: NativeAndroidApp;\n private _appHideStatus$: Subject = new Subject();\n private backButtonPressed$: Subject = new Subject();\n private showHeaderHamburgerMenu$: BehaviorSubject = new BehaviorSubject(true);\n\n constructor(\n private windowRef: WindowRef,\n private meta: Meta,\n private ngZone: NgZone,\n private configService: ConfigService,\n private storageService: StorageService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n let webkitRef = this.windowRef.nativeWindow['webkit'];\n if (!webkitRef && this.configService.cfg.enableDevToolPath && this.isIOSEmulation) {\n webkitRef = getEmulatedIosRef(this.windowRef);\n }\n\n let androidRef = this.windowRef.nativeWindow['Android'];\n\n if (!androidRef && this.configService.cfg.enableDevToolPath && this.isANDROIDEmulation) {\n androidRef = getEmulatedAndroidRef(this.windowRef);\n }\n\n if (isPresent(webkitRef) && isPresent(webkitRef.messageHandlers.isNativeFinnairIosApp)) {\n this.nativeiOSApp = webkitRef.messageHandlers;\n }\n\n if (isPresent(androidRef)) {\n this.nativeAndroidApp = androidRef;\n }\n\n windowRef.nativeWindow['nativeBridge'] = this;\n }\n\n init(): void {\n this.makeUiTakeFullAreaInIosWebView();\n }\n\n /**\n * Passes forward a new hide status\n * @param {boolean} status the next hide status\n */\n setAppHideStatus(status: boolean): void {\n this.ngZone.run(() => this._appHideStatus$.next(status));\n }\n\n get appHideStatus(): Observable {\n return this._appHideStatus$;\n }\n\n get isInsideNativeWebView(): boolean {\n const isNativeOverride = this.configService.cfg.enableDevToolPath && this.isNativeEmulation;\n return isPresent(this.nativeiOSApp) || isPresent(this.nativeAndroidApp) || isNativeOverride;\n }\n\n get isInsideNativeiOSWebView(): boolean {\n return isPresent(this.nativeiOSApp) || (this.configService.cfg.enableDevToolPath && this.isIOSEmulation);\n }\n\n get isInsideNativeAndroidWebView(): boolean {\n return isPresent(this.nativeAndroidApp) || (this.configService.cfg.enableDevToolPath && this.isANDROIDEmulation);\n }\n\n get isLocalView(): boolean {\n return this.isNativeEmulation;\n }\n\n get backButtonPressed(): Observable {\n return this.backButtonPressed$;\n }\n\n get isHamburgerMenuVisible(): Observable {\n return this.showHeaderHamburgerMenu$;\n }\n\n urlForAddAJourneyInApp(recloc: string, lastName: string): string {\n return `https://app.finnair.com/addjourney/${recloc}/${lastName}?source=booking`;\n }\n\n openNativeMenu(): void {\n this.iOSCallIfAccessible(() => this.nativeiOSApp.openMenu)();\n if (this.isAndroidCallAccessible('showMenu')) {\n this.nativeAndroidApp.showMenu();\n }\n }\n\n addBooking(booking: OrderDataForNative): void {\n this.iOSCallIfAccessible(() => this.nativeiOSApp.addBooking)(booking);\n if (this.isAndroidCallAccessible('addBooking')) {\n this.nativeAndroidApp.addBooking(JSON.stringify(booking));\n }\n }\n\n onCheckInLoaded(data: CheckInStatus): void {\n this.iOSCallIfAccessible(() => this.nativeiOSApp.onCheckInLoaded)(data);\n if (this.isAndroidCallAccessible('onCheckInLoaded')) {\n this.nativeAndroidApp.onCheckInLoaded(JSON.stringify(data));\n }\n }\n\n onAcceptCheckIn(data: CheckInResult): void {\n this.iOSCallIfAccessible(() => this.nativeiOSApp.onAcceptCheckIn)(data);\n if (this.isAndroidCallAccessible('onAcceptCheckIn')) {\n this.nativeAndroidApp.onAcceptCheckIn(JSON.stringify(data));\n }\n }\n\n /**\n * Note: this should be called only after all hooks have been installed and client is ready\n * to receive postMessages from the application.\n */\n clientReady(): void {\n this.iOSCallIfAccessible(() => this.nativeiOSApp.bookingFlowInitialized)();\n if (this.isAndroidCallAccessible('bookingFlowInitialized')) {\n this.nativeAndroidApp.bookingFlowInitialized();\n }\n }\n\n /**\n * Passes forward a notion that a mobile device's back button has been pressed\n */\n onBackPressed(): void {\n this.ngZone.run(() => this.backButtonPressed$.next());\n }\n\n /**\n * Passes forward a information about hamburger menu visibility\n */\n onShowHamburgerMenu(isOpen: boolean): void {\n this.ngZone.run(() => this.showHeaderHamburgerMenu$.next(isOpen));\n }\n\n private iOSCallIfAccessible(target: () => OptionalPostMessageFunc): (T?) => void;\n private iOSCallIfAccessible(target: () => RequiredPostMessageFunc): (T) => void;\n private iOSCallIfAccessible(target: () => PostMessageFunc): (T?) => void {\n if (this.isInsideNativeiOSWebView && isPresent(this.nativeiOSApp) && isPresent(target())) {\n return (msg = '') => target().postMessage(msg);\n }\n return () => {};\n }\n\n private isAndroidCallAccessible(fnName: keyof NativeAndroidApp): boolean {\n return (\n this.isInsideNativeAndroidWebView && isPresent(this.nativeAndroidApp) && isFunction(this.nativeAndroidApp[fnName])\n );\n }\n\n private makeUiTakeFullAreaInIosWebView(): void {\n // TODO: Remove this when index.template.ejs has viewport-fit always\n if (isPlatformBrowser(this.platform) && this.isInsideNativeiOSWebView) {\n this.meta.updateTag(\n {\n content: 'width=device-width, initial-scale=1, viewport-fit=cover',\n },\n 'name=\"viewport\"'\n );\n }\n }\n\n private get isNativeEmulation(): boolean {\n return this.isIOSEmulation || this.isANDROIDEmulation;\n }\n\n private get isIOSEmulation(): boolean {\n return this.storageService.SESSION.get(NATIVE_KEY) === 'IOS';\n }\n\n private get isANDROIDEmulation(): boolean {\n return this.storageService.SESSION.get(NATIVE_KEY) === 'ANDROID';\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { switchMap, startWith, map, take } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { add, LocalDate, startOf, TimeUnit, TzDate } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\n\nimport { AppState, TimeData } from '../../interfaces';\nimport { serverTime } from '../../selectors';\n\nconst INTERVAL: number = 60 * 1000; // 1min\n\n@Injectable()\nexport class TimeService {\n timer$: Observable;\n currentTime$: Observable;\n listOfTimeout: Array = [];\n listOfInterval: Array = [];\n\n constructor(\n private store$: Store,\n private ngZone: NgZone\n ) {\n const serverTimeObs$ = this.store$.pipe(serverTime(), finShare());\n\n this.timer$ = this.tickAndReplayFullMinuteTimestamp(serverTimeObs$);\n\n this.currentTime$ = serverTimeObs$.pipe(map((data: TimeData) => this.calcTime(data.timeOffset)));\n }\n\n /**\n * Returns the timestamp for full minutes. Emits when the minute should\n * change.\n * @return {Observable}\n */\n get currentMinuteTimestamp(): Observable {\n return this.timer$;\n }\n\n /**\n * Emits and replays a single value with the current local date\n * @return {Observable}\n */\n get currentLocalDate(): Observable {\n return this.currentTime.pipe(take(1), map(TzDate.fromMillis), map(LocalDate.fromTzDate), finShare());\n }\n\n /**\n * A non-replayed stream\n * @return {Observable}\n */\n get currentTime(): Observable {\n return this.currentTime$;\n }\n\n clearTimers(): void {\n this.listOfInterval.forEach((i) => {\n window.clearInterval(i); // clear all the timeouts\n });\n this.listOfTimeout.forEach((i) => {\n window.clearTimeout(i); // clear all the timeouts\n });\n\n this.listOfInterval = [];\n this.listOfTimeout = [];\n }\n\n private getMsToFullMinute(serverMillis: number): number {\n return startOf(add(new Date(serverMillis), 1, TimeUnit.minute), TimeUnit.minute).getTime() - serverMillis;\n }\n\n private calcTime(offset: number): number {\n return Date.now() + offset;\n }\n\n private timerOutsideAngular(startAfterMs: number, intervalMs: number): Observable {\n return new Observable((observer) => {\n // We need to run interval outside angular zone. So protractor will not wait indefinitely.\n let timeout: any;\n let interval: any;\n\n this.ngZone.runOutsideAngular(() => {\n const nextValue = () => this.ngZone.run(() => observer.next());\n timeout = setTimeout(() => {\n interval = setInterval(nextValue, intervalMs);\n this.listOfInterval.push(interval);\n nextValue();\n }, startAfterMs);\n this.listOfTimeout.push(timeout);\n });\n\n return () => {\n clearTimeout(timeout);\n clearInterval(interval);\n };\n });\n }\n\n private tickAndReplayFullMinuteTimestamp(verifiedTimeOnStartup$: Observable): Observable {\n return verifiedTimeOnStartup$.pipe(\n switchMap((timeData: TimeData) =>\n this.timerOutsideAngular(this.getMsToFullMinute(timeData.serverMillisFromEpoch), INTERVAL).pipe(\n startWith(undefined as any),\n map(() => this.calcTime(timeData.timeOffset))\n )\n ),\n finShare()\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Subscription, throwError } from 'rxjs';\nimport { timeout } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { NavigatorActions } from '../../actions';\nimport { ConfigService } from '../config/config.service';\nimport { AppState } from '../../interfaces';\n\nexport interface AkamaiTimegeoResponse {\n /**\n * Milliseconds from UNIX epoch as echoed by Akamai\n */\n msepoch: string;\n\n /**\n * The Akamai EdgeScape geolocation headers' lat value\n */\n lat: string;\n\n /**\n * The Akamai EdgeScape geolocation headers' long value\n */\n long: string;\n}\n\n@Injectable()\nexport class TimeAndGeoipProvider implements OnDestroy {\n private subscription: Subscription;\n\n constructor(\n private http: HttpClient,\n private configService: ConfigService,\n private store$: Store\n ) {}\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n triggerTimeAndGeoipFetch(): void {\n if (this.subscription) {\n return;\n }\n this.subscription = this.http\n .get(this.configService.cfg.timeGeoUrl)\n .pipe(\n timeout({\n each: 5000,\n with: () => throwError(() => new Error('getting time and geoip from server timed out after 5 seconds')),\n })\n )\n .subscribe({\n next: (data: AkamaiTimegeoResponse) => {\n const serverMillis: number = parseInt(data.msepoch, 10);\n const browserOffset: number = serverMillis - Date.now();\n this.store$.dispatch(\n NavigatorActions.setServerTime({ serverMillisFromEpoch: serverMillis, timeOffset: browserOffset })\n );\n this.store$.dispatch(\n NavigatorActions.setAkamaiGeolocation({\n location: {\n lat: parseFloat(data.lat),\n lng: parseFloat(data.long),\n },\n })\n );\n },\n error: () => {\n /* Fall back to client time */\n this.store$.dispatch(NavigatorActions.setServerTime({ serverMillisFromEpoch: Date.now(), timeOffset: 0 }));\n },\n complete: () => {\n this.subscription = unsubscribe(this.subscription);\n },\n });\n }\n}\n","import { PreloadingStrategy, Route } from '@angular/router';\nimport { OnDestroy, Injectable } from '@angular/core';\n\nimport { filter, mergeMap, take } from 'rxjs/operators';\nimport { of, Observable, Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class AppPreloadingStrategyService implements PreloadingStrategy, OnDestroy {\n private preloadRequests = new Subject();\n\n preload(route: Route, loadModuleFn: Function): Observable {\n if (route.data?.preload) {\n return this.preloadRequests.pipe(\n filter((path) => path === route.path),\n take(1),\n mergeMap(() => loadModuleFn())\n );\n }\n return of(null);\n }\n\n triggerPreload(routePath: string): void {\n this.preloadRequests.next(routePath);\n }\n\n ngOnDestroy(): void {\n this.preloadRequests.complete();\n }\n}\n","export enum RefundDetailNotificationType {\n /** Before applying for refund */\n REVIEW = 'review',\n\n /** After applying for refund */\n CONFIRMATION = 'confirmation',\n}\n","import { Injectable } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { EMPTY, Observable, PartialObserver, Subject } from 'rxjs';\nimport { catchError, filter, switchMap, take, tap } from 'rxjs/operators';\n\nimport { CartState, IdAndHash } from '@fcom/dapi';\nimport { SeatMapStatus } from '@fcom/common/interfaces/seat-map.interface';\nimport { snapshot } from '@fcom/rx';\nimport { noop } from '@fcom/core/utils';\nimport { FinnairCart, FinnairServiceRequestItem, SubCategory } from '@fcom/dapi/api/models';\nimport { BookingAppState, PaxDetailsState } from '@fcom/common/interfaces/booking';\nimport { QueueService } from '@fcom/common-booking/services/queue.service';\nimport { seatMapForFlightStatus } from '@fcom/common-booking/store/selectors';\n\nimport { CartActions } from '../store/actions';\nimport { AncillaryService } from '../modules/ancillaries/services/ancillary.service';\nimport { getUpdateId } from '../utils';\nimport { cartFlights, cartIdAndHash, cartState, cartUrl } from '../store/selectors';\nimport { BookingCartService } from './booking-cart.service';\n\n@Injectable()\nexport class BookingQueueService {\n private cancelCartCreate$ = new Subject();\n private cancelCartUpdate$ = new Subject();\n private cancelPaxUpdate$ = new Subject();\n private cancelSeatMapSubjects: { [key: string]: Subject } = {};\n\n constructor(\n private cartService: BookingCartService,\n private ancillaryService: AncillaryService,\n private store$: Store,\n private queueService: QueueService\n ) {}\n\n queueCartCreate(selectedOfferId: string, locale: string, offersHash: string): void {\n // TODO: We should remember old offer selected so we can skip new cart creation when using the same offer.\n // For now we just create the cart again when offer is selected.\n const queueId = [selectedOfferId, locale, offersHash].join('_');\n this.queueService.startQueue(queueId);\n\n // We need to cancel any pax updates to previous carts\n this.cancelCartCreate$.next();\n this.cancelCartUpdate$.next();\n this.cancelPaxUpdate$.next();\n this.queueService.cancelServiceAvailability$.next();\n this.queueService.cancelPayment.next();\n\n const cancelStream$ = this.queueService.toCancelEvent(this.cancelCartCreate$);\n this.queueService.sendToQueue(\n 'createCart',\n this.cartService.triggerCreateCart(selectedOfferId, locale, offersHash, cancelStream$),\n cancelStream$\n );\n }\n\n queueCartCreateByBounds(selectedAirBoundIds: string[], locale: string, boundsHash: string): void {\n // TODO: We should remember old offer selected so we can skip new cart creation when using the same offer.\n // For now we just create the cart again when offer is selected.\n const queueId = [selectedAirBoundIds.join('_'), locale, boundsHash].join('_');\n this.queueService.startQueue(queueId);\n\n // We need to cancel any pax updates to previous carts\n this.cancelCartCreate$.next();\n this.cancelCartUpdate$.next();\n this.cancelPaxUpdate$.next();\n this.queueService.cancelServiceAvailability$.next();\n this.queueService.cancelPayment.next();\n\n const cancelStream$ = this.queueService.toCancelEvent(this.cancelCartCreate$);\n this.queueService.sendToQueue(\n 'createCart',\n this.cartService.triggerCreateCartByBounds(selectedAirBoundIds, locale, boundsHash, cancelStream$),\n cancelStream$\n );\n }\n\n queuePassengersAndCorporateCodeUpdate(passengersAndCorporateCode: PaxDetailsState): void {\n this.cancelCartUpdate$.next();\n this.queueService.cancelPayment.next();\n\n const cancelStream$ = this.queueService.toCancelEvent(this.cancelCartUpdate$);\n this.queueService.sendToQueue(\n 'paxDetailsAndCorporateCodeUpdate',\n this.fromCartState((cart: CartState) => {\n const persistedCartUpdateExist = Boolean(\n cart.cartData?.passengers &&\n cart.cartData?.passengers.length > 0 &&\n cart.cartData?.passengers.find((t) => !!t.firstName)\n );\n\n return this.cartService.triggerTravelersAndCorporateCodeUpdate(\n cart.cartUrl,\n passengersAndCorporateCode,\n cancelStream$,\n persistedCartUpdateExist\n );\n }),\n cancelStream$\n );\n }\n\n queueTriggerFetchSeatMap(flightId: string, currencyCode?: string): void {\n const status = snapshot(this.store$.pipe(seatMapForFlightStatus(flightId)));\n if (status !== SeatMapStatus.OK && status !== SeatMapStatus.OK_NO_AVAILABILITY) {\n if (!this.cancelSeatMapSubjects[flightId]) {\n this.cancelSeatMapSubjects[flightId] = new Subject();\n } else {\n this.cancelSeatMapSubjects[flightId].next();\n }\n const cancelStream$ = this.queueService.toCancelEvent(this.cancelSeatMapSubjects[flightId]);\n this.queueService.sendToQueue(\n 'TriggerFetchSeatmap',\n this.fromCartIdAndHash(({ id, hash }: IdAndHash) =>\n this.ancillaryService.triggerFetchSeatMap(flightId, id, hash, currencyCode, cancelStream$)\n ),\n cancelStream$\n );\n }\n }\n\n queueServicesUpdate(\n request: FinnairServiceRequestItem | FinnairServiceRequestItem[],\n observe: PartialObserver = { complete: noop }\n ): void {\n const allRequests = Array.isArray(request) ? request : [request];\n this.queueService.cancelPayment.next();\n this.updatePartialCart(\n `${allRequests.map((r) => r.category).join('-')}Update`,\n (url, cancelStream$) => this.cartService.triggerUpdateServices(allRequests, url, cancelStream$),\n observe,\n ...allRequests.map((r) => getUpdateId(r.category, r.fragmentId))\n );\n }\n\n queueSeatSelectionReset(observe: PartialObserver = { complete: noop }): void {\n this.queueService.cancelPayment.next();\n\n const flights = snapshot(this.store$.pipe(cartFlights()));\n const flightIds: string[] = flights.map((key) => getUpdateId(SubCategory.SEAT, key.id));\n\n this.updatePartialCart(\n 'seatSelectionReset',\n (url, cancelStream$) => this.cartService.triggerResetSeatSelections(url, cancelStream$),\n observe,\n ...flightIds\n );\n }\n\n private updatePartialCart(\n actionName: string,\n update: (cartUrl: string, cancelStream$: Observable) => Observable,\n observe: PartialObserver,\n ...cartPartIds: string[]\n ): void {\n this.store$.dispatch(CartActions.isUpdatingPartialCart({ cartPartIds }));\n const cancelStream$ = this.queueService.toCancelEvent(this.cancelPaxUpdate$);\n\n this.queueService.sendToQueue(\n actionName,\n this.fromCartUrl((url: string) => {\n return update(url, cancelStream$).pipe(\n tap({\n complete: () => this.store$.dispatch(CartActions.clearUpdatingPartialCart({ cartPartIds })),\n error: () => this.store$.dispatch(CartActions.errorUpdatingPartialCart({ cartPartIds })),\n }),\n tap(observe),\n catchError(() => EMPTY)\n );\n // Should just complete the stream, booking cart service logs the error to sentry\n }),\n cancelStream$\n );\n }\n\n private fromCartState = (fn: (cart: CartState) => Observable) =>\n this.store$.pipe(\n cartState(),\n filter((cart) => cart && !!cart.cartUrl),\n take(1),\n switchMap(fn)\n );\n\n private fromCartUrl = (fn: (url: string) => Observable) =>\n this.store$.pipe(cartUrl(), filter(Boolean), take(1), switchMap(fn));\n\n private fromCartIdAndHash = (fn: (currentCartIdAndHash: IdAndHash) => Observable) =>\n this.store$.pipe(\n cartIdAndHash(),\n filter(({ id, hash }: IdAndHash) => !!id && !!hash),\n take(1),\n switchMap((c) => fn(c))\n );\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { GtmClickOutboundLinkClass } from '@fcom/common';\nimport { ModalButtons } from '@fcom/ui-components';\nimport { GtmService } from '@fcom/common/gtm';\n\n@Component({\n selector: 'fin-am-destination-continue-modal',\n templateUrl: './am-destination-continue-modal.component.html',\n})\nexport class AmDestinationContinueModalComponent {\n readonly ModalButtons = ModalButtons;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n constructor(private gtmService: GtmService) {}\n\n @Input()\n open = false;\n\n @Input()\n bookUrl: string;\n\n @Output()\n closeModal: EventEmitter = new EventEmitter();\n\n navigateToAmBooking(): void {\n const fullUrl = `${this.bookUrl}&utm_content=destination_list`;\n this.gtmService.clickOutboundEvent({\n link_url: fullUrl,\n link_classes: GtmClickOutboundLinkClass.DESTINATION_LISTING_CARD,\n outbound: true,\n });\n // open a new am tab\n window.open(fullUrl, '_blank');\n }\n}\n","\n
\n
\n \n
\n {{ 'aurinkomatkat.continueModal.contentTitle' | finLocalization }}\n
\n
\n
{{ 'aurinkomatkat.continueModal.content' | finLocalization }}
\n
\n\n","import {\n Bound,\n Category,\n FinnairAmount,\n FinnairBoundItem,\n FinnairItineraryItem,\n FinnairItineraryItemFlight,\n FinnairOrder,\n FinnairPassengerCode,\n FinnairPassengerServiceItem,\n FinnairPassengerServiceSelectionItem,\n FinnairPrice,\n FinnairServiceItem,\n FinnairTotalPricesSplit,\n PaymentTransaction,\n SeatType,\n SubCategory,\n FareInformation,\n FinnairItineraryItemType,\n} from '@fcom/dapi/api/models';\nimport { BoundType, CustomServiceType, PaxAmount } from '@fcom/dapi/interfaces';\nimport { SEAT_TYPE_EXIT, SeatTypeCabinClass } from '@fcom/common/interfaces/seat-map.interface';\nimport { ExtendedServiceSelectionItem } from '@fcom/common-booking/modules/ancillaries/interfaces';\nimport { CartOrOrder, SmpProduct } from '@fcom/common-booking';\nimport { BoundFareFamily, FareFamilyMap, OffersPerBound } from '@fcom/common/interfaces/booking';\nimport { CombinedDateString, diff, TimeUnit, TzDate, unique } from '@fcom/core/utils';\nimport { isBoundBasedCategory } from '@fcom/common-booking/modules/ancillaries/utils/category.utils';\nimport { isAdult } from '@fcom/dapi/utils';\nimport { Profile, ProfileTier } from '@fcom/core-api/login';\nimport { snapshot } from '@fcom/rx';\nimport { isFlight, isNotIncludedService } from '@fcom/common-booking/utils/common-booking.utils';\nimport { getLastPaidServices } from '@fcom/common-booking/utils/order.utils';\n\nimport {\n FINNAIR,\n GA4Affiliation,\n GA4Category,\n GA4Product,\n GA4TripType,\n GtmCustomDimensions,\n GtmCustomMetrics,\n GtmEcommerceImpressionProduct,\n GtmEcommerceList,\n GtmEcommerceOrderData,\n GtmEcommerceProduct,\n GtmEcommerceProductSeatId,\n GtmFareFamilyProductCustomDefinitions,\n GtmFlightInformation,\n GtmFlightInformationData,\n GtmFlightProductCustomDefinitions,\n GtmFlightSelectionData,\n GtmHaulType,\n GtmMulticityOfferSelectionData,\n GtmPurchaseFlow,\n GtmTripType,\n GtmTripTypeLegacy,\n NOT_SET,\n UNSET,\n} from '../interfaces/gtm.interface';\nimport { FlightSegment } from '../interfaces';\n\nexport const toGtmString = (str: string): string => str.replace(/\\s/g, '-').toLowerCase();\n\nexport const getGtmFlightNumber = (itinerary: FinnairItineraryItem[]): string => {\n return itinerary\n .filter(isFlight)\n .map((f: FinnairItineraryItemFlight) => f.flightNumber)\n .join('-');\n};\n\nexport const getGtmAircraft = (itinerary: FinnairItineraryItem[]): string => {\n const airCraft = itinerary\n .filter(isFlight)\n .map((f: FinnairItineraryItemFlight) => f.aircraft?.name)\n .join('-');\n\n return toGtmString(airCraft);\n};\n\nconst getGtmTravelClass = (fareInformation: FareInformation[]): string => {\n const fareInformationString = fareInformation\n .map((f: FareInformation) => `${f.cabinClass}-${f.bookingClass}`)\n .join('-');\n\n return toGtmString(fareInformationString);\n};\n\nconst getGtmRoute = ({ departure, arrival }: FinnairBoundItem | Bound): string =>\n `${departure.locationCode}-${arrival.locationCode}`;\n\nconst getAllFlights = (cartData: CartOrOrder): FinnairItineraryItemFlight[] =>\n cartData.bounds.reduce((all, bound) => all.concat(bound.itinerary.filter(isFlight)), []);\n\n/**\n * Get comma separated string of flight ids belonging to flight list\n * @param flightIds\n * @param flights\n */\nexport const getGtmFlightNumbersFromFlightIds = (flightIds: string[], flights: FinnairItineraryItemFlight[]): string =>\n flightIds\n .map((id) => flights.find((f) => f.id === id)?.flightNumber)\n .filter(Boolean)\n .join(',');\n\n/**\n * Get dash separated route from flightsIds found from dapi dictionary\n * @param flightIds\n * @param flights\n */\nexport const getGtmRouteFromFlightIds = (flightIds: string[], flights: FinnairItineraryItemFlight[]): string => {\n const locations = flightIds.reduce(\n (locs, id) => {\n const flight = flights.find((f) => f.id === id);\n if (!locs.departure) {\n locs.departure = flight?.departure?.locationCode;\n }\n if (locs.departure !== flight?.arrival?.locationCode) {\n locs.arrival = flight?.arrival?.locationCode;\n }\n return locs;\n },\n { departure: undefined, arrival: undefined }\n );\n\n return locations.departure && locations.arrival ? `${locations.departure}-${locations.arrival}` : undefined;\n};\n\nconst getGtmPaxAmount = (paxAmount: PaxAmount): string => {\n const totalAmount = Object.entries(paxAmount)\n .map((entry: [keyof PaxAmount, number]) => entry[1])\n .reduce((cur, acc) => cur + acc, 0);\n return String(totalAmount);\n};\n\nexport const getGtmFlightSelectionDataForFareFamily = (\n bound: FinnairBoundItem | Bound,\n boundType: BoundType,\n itinerary: FinnairItineraryItem[] = [],\n fareFamilyName: string | undefined,\n price: string,\n points: string | undefined,\n fareInformation: FareInformation[] = [],\n currencyCode: string,\n paxAmount: PaxAmount,\n purchaseFlow: GtmPurchaseFlow\n): GtmFlightSelectionData => ({\n aircraft: getGtmAircraft(itinerary),\n flightNumber: getGtmFlightNumber(itinerary),\n fareFamilyName: fareFamilyName ?? 'unknown',\n price,\n points: points ?? NOT_SET,\n currencyCode,\n travelClass: getGtmTravelClass(fareInformation),\n boundType,\n route: getGtmRoute(bound),\n paxAmount: getGtmPaxAmount(paxAmount),\n purchaseFlow,\n});\n\nexport const getGtmMulticityOffertSelectionData = (\n offer: OffersPerBound,\n boundNumber: number,\n currencyCode: string,\n paxAmount: PaxAmount\n): GtmMulticityOfferSelectionData => ({\n aircraft: getGtmAircraft(offer.boundInfo.itinerary.filter(isFlight)),\n flightNumber: getGtmFlightNumber(offer.boundInfo.itinerary.filter(isFlight)),\n fareFamilyName: offer.fareFamily.brandName,\n price: offer.fareFamily.totalPrice,\n points: offer.fareFamily.points ?? NOT_SET,\n currencyCode,\n travelClass: offer.boundInfo.cabinClass,\n boundType: BoundType.multi,\n route: getGtmRoute(offer.boundInfo.bound),\n paxAmount: getGtmPaxAmount(paxAmount),\n purchaseFlow: GtmPurchaseFlow.BOOKING,\n boundNumber,\n stage: 'boundSelection',\n});\n\nexport const getGtmServiceProduct = (\n category: Category,\n currentCartData: CartOrOrder,\n service: ExtendedServiceSelectionItem,\n purchaseFlow: GtmPurchaseFlow\n): GtmEcommerceProduct => ({\n name: category === Category.BAGGAGE ? 'BAG' : service.variant,\n id: resolveGtmServiceId(category, currentCartData, service),\n price: service.unitPrice.amount,\n quantity: service.quantity,\n brand: FINNAIR, // Useless, could be used for something else in the future\n category: resolveGtmCategory(category)[1],\n [GtmCustomDimensions.PNR]: currentCartData.id,\n [GtmCustomDimensions.FLOW_TYPE]: purchaseFlow,\n});\n\nexport const getGtmServiceProductForSeat = (\n category: Category,\n currentCartData: CartOrOrder,\n service: ExtendedServiceSelectionItem,\n purchaseFlow: GtmPurchaseFlow\n): GtmEcommerceProduct => {\n const route = getGtmRouteFromFlightIds(service.flightIds, getAllFlights(currentCartData));\n const tripType = getTripTypeFromBounds(currentCartData.bounds);\n const cabin = getCabinFromSeatType(service.seatType);\n const name = getNameFromSeatType(service.seatType);\n return {\n name,\n id: getGtmProductSeatId(service.seatType, service.seatNumber, route, tripType),\n variant: cabin,\n price: service.unitPrice.amount,\n quantity: 1,\n brand: FINNAIR,\n category: `${resolveGtmCategory(category)[1]}/${cabin}/${name}`,\n [GtmCustomDimensions.PNR]: currentCartData.id,\n [GtmCustomDimensions.FLOW_TYPE]: purchaseFlow,\n };\n};\n\nexport const getNameFromSeatType = (seatType: SeatType): string => {\n const cabinAndName = seatType?.split('_').slice(1);\n const isExit = cabinAndName?.includes(SEAT_TYPE_EXIT);\n const name = cabinAndName?.filter((item) => !SeatTypeCabinClass[item]).join('_');\n return isExit ? SEAT_TYPE_EXIT : name ? name : UNSET;\n};\n\nexport const getCabinFromSeatType = (seatType: SeatType): SeatTypeCabinClass =>\n SeatTypeCabinClass[seatType?.split('_')[1]] ?? SeatTypeCabinClass.ECONOMY;\n\nexport const getGtmProductSeatId = (\n seatType: SeatType,\n seatNumber: string,\n route?: string,\n tripType?: string\n): GtmEcommerceProductSeatId =>\n `SEAT:${seatNumber} ${getAircraftFromSeatType(seatType) ?? 'undefined'}_${route ?? UNSET}_${\n tripType ?? UNSET\n }` as GtmEcommerceProductSeatId;\n\nconst getAircraftFromSeatType = (seatType: SeatType): string => seatType?.split('_')[0];\n\nexport const resolveGtmServiceId = (\n category: Category,\n currentCartData: CartOrOrder,\n service: ExtendedServiceSelectionItem\n): string => {\n const route =\n getGtmRouteFromFlightIds(service.flightIds, getAllFlights(currentCartData)) ??\n getGtmRoute(currentCartData.bounds[0]);\n const allFlights = currentCartData.bounds.reduce((all, bound) => all.concat(bound.itinerary.filter(isFlight)), []);\n const flightNumbers = getGtmFlightNumbersFromFlightIds(service.flightIds, allFlights);\n const tripType = getTripTypeFromBounds(currentCartData.bounds);\n if (category === Category.COVER) {\n return `INSURANCE:${service.variant}_${route}_${tripType}`;\n }\n return `${resolveGtmCategory(category)[0]}:${service.variant}_${route}_${flightNumbers}_${tripType}`;\n};\n\nexport const resolveGtmCategory = (category: Category): [string, string] => {\n const getPrefixedCategory = (service: string, cat?: string): [string, string] => [\n service,\n `Ancillaries/${cat ?? service}`,\n ];\n return getPrefixedCategory(getGtmCategoryName(category));\n};\n\nconst getGtmCategoryName = (category: Category): string => {\n switch (category) {\n case Category.BAGGAGE:\n return 'EXCESSBAG';\n case Category.MEAL:\n return 'MEAL';\n case Category.COVER:\n return 'INSURANCE';\n case Category.TRAVEL_COMFORT:\n return 'TRAVEL_COMFORT';\n case Category.WIFI:\n return 'WIFI';\n case Category.LOUNGE:\n return 'LOUNGE';\n case Category.SEAT:\n return 'SEAT';\n case Category.SPORT:\n return 'SPORT';\n case Category.PET:\n return 'PET';\n default:\n return 'NOT_DEFINED';\n }\n};\n\nexport const getGA4Category = (value: string): string => value.charAt(0).toUpperCase() + value.slice(1);\n\nexport const getGA4Product = (\n service: ExtendedServiceSelectionItem,\n purchaseFlow: GtmPurchaseFlow,\n bounds: FinnairBoundItem[]\n): GA4Product => {\n const category = getGA4Category(service.category);\n const id = category + '_' + (service.seatType || service.variant);\n return {\n item_id: id,\n item_name: id,\n price:\n service.category === Category.COVER\n ? parseFloat(service.totalPrice.amount) || 0\n : parseFloat(service.unitPrice.amount) || 0,\n quantity: service.quantity,\n currency: service.totalPrice?.currencyCode ?? NOT_SET,\n affiliation: getAffiliation(purchaseFlow),\n item_category: GA4Category.ANCILLARIES,\n item_category2: category,\n item_category3: service.cabins,\n item_variant: service.seatType ?? service.variant,\n item_haul_type: containsLongHaulFlight(bounds) ? 'long' : 'short',\n };\n};\n\nexport const getBoundsPerFragment = (cartOrOrder: CartOrOrder, serviceFragmentId: string): FinnairBoundItem[] =>\n serviceFragmentId === CustomServiceType.JOURNEY\n ? cartOrOrder.bounds\n : [cartOrOrder.bounds.find((bound) => bound.id.includes(serviceFragmentId))];\n\nexport const mapServicesToGA4ProductList = (\n cartOrOrder: CartOrOrder,\n categories: FinnairServiceItem[] = [],\n purchaseFlow: GtmPurchaseFlow\n): GA4Product[] => {\n const servicesPerSegment: ExtendedServiceSelectionItem[] = categories.flatMap((serviceCategory) =>\n serviceCategory.bounds.flatMap((bound) =>\n bound.segments.flatMap((segment) =>\n segment.passengers.flatMap((passenger) =>\n passenger.services.filter(isNotIncludedService).map((service): ExtendedServiceSelectionItem => {\n const flightIds = isBoundBasedCategory(serviceCategory.category)\n ? bound.segments.map((segment) => segment.id)\n : [segment.id];\n const cabins = cartOrOrder.bounds\n .flatMap((b) => b.itinerary)\n .filter(isFlight)\n .filter((i: FinnairItineraryItemFlight) => flightIds.includes(i.id))\n .map((i: FinnairItineraryItemFlight) => i.cabinClass)\n .filter(unique)\n .join('-');\n\n return {\n ...service,\n category: serviceCategory.category,\n flightIds,\n passengerId: passenger.id,\n fragmentId: segment.id,\n cabins,\n totalPrice: getPriceForSubCategory(passenger, service),\n } as ExtendedServiceSelectionItem;\n })\n )\n )\n )\n );\n return servicesPerSegment\n .reduce((acc: ExtendedServiceSelectionItem[], current) => {\n const hasBeenAddedInPreviousSegment = acc.find(\n (item) => item.id === current.id && item.passengerId === current.passengerId\n );\n return hasBeenAddedInPreviousSegment ? acc : acc.concat([current]);\n }, [])\n .map(\n (service): GA4Product =>\n getGA4Product(service, purchaseFlow, getBoundsPerFragment(cartOrOrder, service.fragmentId))\n );\n};\n\nexport const mapServicesToGtmProductList = (\n order: FinnairOrder,\n categories: FinnairServiceItem[] = [],\n purchaseFlow: GtmPurchaseFlow\n): GtmEcommerceProduct[] => {\n const servicesPerSegment: ExtendedServiceSelectionItem[] = categories.flatMap((serviceCategory) =>\n serviceCategory.bounds.flatMap((bound) =>\n bound.segments.flatMap((segment) =>\n segment.passengers.flatMap((passenger) =>\n passenger.services.filter(isNotIncludedService).map((service): ExtendedServiceSelectionItem => {\n const isPerBound = isBoundBasedCategory(serviceCategory.category);\n return {\n ...service,\n category: serviceCategory.category,\n flightIds: isPerBound ? bound.segments.map((segment) => segment.id) : [segment.id],\n passengerId: passenger.id,\n totalPrice: getPriceForSubCategory(passenger, service),\n };\n })\n )\n )\n )\n );\n return servicesPerSegment\n .reduce((acc: ExtendedServiceSelectionItem[], current) => {\n const hasBeenAddedInPreviousSegment = acc.find(\n (item) => item.id === current.id && item.passengerId === current.passengerId\n );\n return hasBeenAddedInPreviousSegment ? acc : acc.concat([current]);\n }, [])\n .map((service) => {\n if (service.category === Category.SEAT) {\n return getGtmServiceProductForSeat(service.category, order, service, purchaseFlow);\n }\n return getGtmServiceProduct(service.category, order, service, purchaseFlow);\n });\n};\n\nexport const getGtmFlightProductFromOrder = (\n order: FinnairOrder,\n totalPrices: FinnairTotalPricesSplit,\n purchaseFlow: GtmPurchaseFlow\n): Array => {\n const bounds = order.bounds;\n const totalAmount =\n purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE\n ? (totalPrices?.total.balance?.amount ?? '0')\n : totalPrices?.total.totalAmount.amount;\n const tripType = getProductTripTypeFromBounds(bounds);\n const paxAmountFromPrices =\n Object.keys(totalPrices?.totalPerPax ?? []).length > 0 ? Object.keys(totalPrices?.totalPerPax ?? []).length : 1;\n const price = Math.round((parseFloat(totalAmount) / paxAmountFromPrices) * 100) / 100;\n const originLocation = bounds[0].departure.locationCode;\n const destinationLocation = bounds[0].arrival.locationCode;\n const points = Math.round((parseFloat(totalPrices?.total.totalPoints?.amount) / paxAmountFromPrices) * 100) / 100;\n return [\n {\n name: getGtmFlightProductName(bounds, tripType, purchaseFlow),\n id: `${bounds.map((bound) => getGtmFlightNumber(bound.itinerary)).join('::')}_${tripType}${\n purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? '_Change' : ''\n }`,\n price: price.toFixed(2).toString(),\n quantity: paxAmountFromPrices,\n brand: getGtmFareTypes(bounds),\n category: `new-finnair/Flights${\n purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? 'Change' : ''\n }/${tripType}/${getGtmFareTypes(bounds)}`,\n [GtmCustomDimensions.PNR]: order.id,\n [GtmCustomDimensions.FLOW_TYPE]: purchaseFlow,\n [GtmCustomDimensions.FLOW_JOURNEY_LENGTH]: getGtmStayDuration(order.bounds),\n [GtmCustomDimensions.FLOW_DEPARTURE_COUNTRY]: order.locations[originLocation].countryCode,\n [GtmCustomDimensions.FLOW_ARRIVAL_COUNTRY]: order.locations[destinationLocation].countryCode,\n ...(points && { [GtmCustomMetrics.POINTS_SPENT]: points }),\n },\n ];\n};\n\nexport const getAffiliation = (purchaseFlow: GtmPurchaseFlow): GA4Affiliation =>\n [GtmPurchaseFlow.MANAGE_BOOKING, GtmPurchaseFlow.VOLUNTARY_CHANGE].includes(purchaseFlow)\n ? GA4Affiliation.MMB\n : GA4Affiliation.BOOKING;\n\nexport const getGA4FlightProductFromOrder = (\n cartOrOrder: CartOrOrder,\n totalPrices: FinnairTotalPricesSplit,\n purchaseFlow: GtmPurchaseFlow\n): Array => {\n const category = purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? GA4Category.FLIGHT_CHANGE : GA4Category.FLIGHTS;\n const totalAmount =\n purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE\n ? (totalPrices?.total.balance?.amount ?? '0')\n : totalPrices?.total.totalAmount.amount;\n const paxAmountFromPrices =\n Object.keys(totalPrices?.totalPerPax ?? []).length > 0 ? Object.keys(totalPrices?.totalPerPax ?? []).length : 1;\n const price = Math.round((parseFloat(totalAmount) / paxAmountFromPrices) * 100) / 100;\n const tripType = getProductTripTypeFromBoundsForGA4(cartOrOrder.bounds);\n const id = `${tripType}_${cartOrOrder.bounds\n .flatMap((b) => [b.departure.locationCode, b.arrival.locationCode])\n .filter(unique)\n .join('-')}`;\n\n return [\n {\n item_id: id,\n item_name: id,\n price,\n quantity: paxAmountFromPrices,\n currency: totalPrices?.total.totalAmount.currencyCode ?? NOT_SET,\n affiliation: getAffiliation(purchaseFlow),\n item_category: category,\n item_category2: tripType,\n item_category3: cartOrOrder.bounds.map((bound) => bound.cabinClass).join('-'),\n item_variant: cartOrOrder.bounds.map((bound) => bound.fareFamily.code).join('-'),\n item_haul_type: getHaulTypeFromBounds(cartOrOrder.bounds),\n },\n ];\n};\n\nexport const getHaulTypeFromBounds = (bounds: FinnairBoundItem[]): string => {\n enum HaulType {\n SHORT = 'short',\n LONG = 'long',\n }\n\n if (bounds.length > 2) {\n return bounds\n .reduce(\n (haulType: string, bound: FinnairBoundItem) =>\n bound.itinerary\n .filter((item) => item.type === FinnairItineraryItemType.FLIGHT)\n .every((flight: FinnairItineraryItemFlight) => flight.isShortHaul)\n ? `${haulType}_${HaulType.SHORT}`\n : `${haulType}_${HaulType.LONG}`,\n ''\n )\n .substring(1);\n }\n\n return containsLongHaulFlight(bounds) ? 'long' : 'short';\n};\n\nconst getGtmStayDurationCategory = (days: number): string => {\n switch (true) {\n case days < 4:\n return `${days} day(s)`;\n case days < 8:\n return '4 to 7 days';\n case days < 15:\n return '7 to 14 days';\n case days < 22:\n return '15 to 21 days';\n case days < 31:\n return '22 to 30 days';\n case days < 181:\n for (let i = 0; i <= 151; i = i + 30) {\n const j = i + 30;\n if (days > i && days <= j) {\n return `${i + 1} to ${j} days`;\n }\n }\n return '31 to 179 days';\n case days > 180:\n default:\n return 'more than 180 days';\n }\n};\n\nconst getGtmStayDuration = (bounds: FinnairBoundItem[]): string => {\n const departureDate = new TzDate(bounds[0].departure.dateTime);\n const arrivalDate =\n bounds.length > 1 ? new TzDate(bounds[bounds.length - 1].arrival.dateTime) : new TzDate(bounds[0].arrival.dateTime);\n return getGtmStayDurationCategory(diff(departureDate.toDate(), arrivalDate.toDate(), TimeUnit.day));\n};\n\nconst getGtmFlightProductName = (\n bounds: FinnairBoundItem[],\n tripType: GtmTripTypeLegacy,\n purchaseFlow: GtmPurchaseFlow\n): string => {\n const locationCodes = [bounds[0].departure.locationCode, bounds[0].arrival.locationCode];\n if (purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE) {\n const routeWithReturn = [\n ...locationCodes,\n ...(tripType === GtmTripTypeLegacy.RETURN ? [bounds[1].arrival.locationCode] : []),\n ].join('-');\n return [routeWithReturn, tripType, 'Change'].filter(Boolean).join('_');\n }\n return [locationCodes.join('-'), tripType].filter(Boolean).join('_');\n};\n\nexport const mapToGtmFareFamilyProduct = (\n bound: FinnairBoundItem,\n product: BoundFareFamily,\n boundType: BoundType,\n currencyCode: string,\n fareFamilyBenefitsMap: FareFamilyMap,\n paxAmount: number,\n purchaseFlow: GtmPurchaseFlow,\n list?: GtmEcommerceList\n): (GtmEcommerceImpressionProduct | GtmEcommerceProduct) & GtmFareFamilyProductCustomDefinitions => {\n const fareFamilyName = fareFamilyBenefitsMap[product.fareFamilyCode]?.brandName ?? UNSET;\n const price = purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? product.balancePrice : product.totalPrice;\n return {\n name: getGtmRoute(bound),\n id: getGtmFareFamilyProductId(bound, product, paxAmount, boundType, currencyCode, fareFamilyName, purchaseFlow),\n price: (parseFloat(price) / paxAmount).toFixed(2).toString(),\n quantity: paxAmount,\n brand: fareFamilyName,\n category: boundType,\n ...(product.points && { [GtmCustomMetrics.POINTS_SPENT]: parseFloat(product.points) }),\n ...(list && { list }),\n [GtmCustomDimensions.FLOW_TYPE]: purchaseFlow,\n };\n};\n\nconst getGtmFareFamilyProductId = (\n bound: FinnairBoundItem,\n product: BoundFareFamily,\n paxAmount: number,\n boundType: BoundType,\n currencyCode: string,\n fareFamilyName: string,\n purchaseFlow: GtmPurchaseFlow\n) =>\n [\n boundType,\n 'fare-family-select',\n `route-${getGtmRoute(bound)}`,\n `flight-${getGtmFlightNumber(bound.itinerary)}`,\n `aircraft-${getGtmAircraft(bound.itinerary)}`,\n `ffname-${fareFamilyName}`,\n `ffcode-${product.fareFamilyCode}`,\n `travelclass-${getGtmTravelClass(product.fareInformation)}`,\n `currency-${currencyCode}`,\n `totalprice-${product.totalPrice}`,\n ...(purchaseFlow === GtmPurchaseFlow.AWARD ? [`points-${product.points ?? UNSET}`] : []),\n ...(purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE\n ? [`balanceprice-${product.balancePrice}`, `penalty-${product.penaltyPrice}`]\n : []),\n `paxamount-${paxAmount.toString()}`,\n ].join('::');\n\nexport const containsLongHaulFlight = (bounds: FinnairBoundItem[]): boolean => {\n const isShortHaul = bounds\n .flatMap((bound) => bound.itinerary)\n .map((flight: FinnairItineraryItemFlight) => flight.isShortHaul);\n return isShortHaul.indexOf(false) > -1;\n};\n\nexport const getGtmActionFieldId = (order: FinnairOrder): string => {\n const endTime = order.bounds[1] ? order.bounds[1].arrival.dateTime.substring(0, 10) : 'oneway';\n return `${order.bounds[0].departure.locationCode}-${\n order.bounds[0].arrival.locationCode\n }_det:${order.bounds[0].departure.dateTime.substring(0, 10)}_ret:${endTime}${\n order.otherInformation.isGroupBooking ? '_group' : ''\n }_${order.id}`;\n};\n\nexport const getGtmFareTypes = (bounds: FinnairBoundItem[]): string =>\n bounds.map((bound) => bound.fareFamily.code).join(' - ');\n\nexport const getTripTypeFromBounds = (bounds: FinnairBoundItem[]): GtmTripType => {\n if (bounds.length === 1) {\n return GtmTripType.ONEWAY;\n }\n\n if (\n bounds.length === 2 &&\n bounds[0].departure.locationCode === bounds[1].arrival.locationCode &&\n bounds[0].arrival.locationCode === bounds[1].departure.locationCode\n ) {\n return GtmTripType.RETURN;\n }\n\n if (bounds.length === 2) {\n return GtmTripType.OPENJAW;\n }\n\n return GtmTripType.MULTICITY;\n};\n\nexport const getTripTypeForFlightSearchParams = (flights: FlightSegment[]): GtmTripType => {\n if (flights.length === 1) {\n return GtmTripType.ONEWAY;\n }\n\n if (\n flights.length === 2 &&\n flights[0]?.origin === flights[1]?.destination &&\n flights[0]?.destination === flights[1]?.origin\n ) {\n return GtmTripType.RETURN;\n }\n\n if (flights.length === 2) {\n return GtmTripType.OPENJAW;\n }\n\n return GtmTripType.MULTICITY;\n};\n\nexport const combineFlightDates = (data: GtmFlightInformation): CombinedDateString => {\n return getFlightInformationData(data).reduce((result, flight, index) => {\n if (index > 0) {\n result += '_';\n }\n\n result += flight.date;\n return result;\n }, '') as CombinedDateString;\n};\n\nexport const combineOriginDestination = (data: GtmFlightInformation): string => {\n return getFlightInformationData(data)\n .map((flight) => `${flight.origin}-${flight.destination}`)\n .join('_');\n};\n\nconst getFlightInformationData = (flightInformation: GtmFlightInformation): GtmFlightInformationData[] => {\n return flightInformation.map((item) => ({\n origin: item.origin || item.departure.locationCode,\n destination: item.destination || item.arrival.locationCode,\n date: item.departureDate || item.departure?.dateTime || item.departureDateTime,\n }));\n};\n\nexport const getProductTripTypeFromBounds = (bounds: FinnairBoundItem[]): GtmTripTypeLegacy => {\n const map = {\n [GtmTripType.ONEWAY]: GtmTripTypeLegacy.ONEWAY,\n [GtmTripType.RETURN]: GtmTripTypeLegacy.RETURN,\n [GtmTripType.OPENJAW]: GtmTripTypeLegacy.OPENJAW,\n [GtmTripType.MULTICITY]: GtmTripTypeLegacy.MULTICITY,\n };\n\n return map[getTripTypeFromBounds(bounds)];\n};\n\nexport const getProductTripTypeFromBoundsForGA4 = (bounds: FinnairBoundItem[]): GA4TripType => {\n const map = {\n [GtmTripType.ONEWAY]: GA4TripType.ONEWAY,\n [GtmTripType.RETURN]: GA4TripType.RETURN,\n [GtmTripType.OPENJAW]: GA4TripType.OPENJAW,\n [GtmTripType.MULTICITY]: GA4TripType.MULTICITY,\n };\n\n return map[getTripTypeFromBounds(bounds)];\n};\n\nconst getGtmTotalPaxAmountFromOrder = (order: FinnairOrder): number => {\n const paxAmount = getGtmPaxAmountFromOrder(order);\n return Object.entries(paxAmount)\n .map(([, value]) => value)\n .reduce((acc, val) => acc + val);\n};\n\nexport const getGtmPaxAmountFromOrder = (order: FinnairOrder): { main: number; children: number; infants: number } => {\n return {\n main: order.passengers.filter(isAdult).length,\n children: order.passengers.filter(\n (pax) => pax.passengerTypeCode === FinnairPassengerCode.CHD || pax.passengerTypeCode === FinnairPassengerCode.C_15\n ).length,\n infants: order.passengers.filter((pax) => pax.passengerTypeCode === FinnairPassengerCode.INF).length,\n };\n};\n\nexport const mapToGtmOrderData = (\n order: FinnairOrder,\n products: GtmEcommerceProduct[],\n paymentMethods: PaymentTransaction[],\n totalAmount: FinnairPrice,\n purchaseFlow: GtmPurchaseFlow\n): GtmEcommerceOrderData => {\n const originLocation = order.bounds[0].departure.locationCode;\n const destinationLocation = order.bounds[0].arrival.locationCode;\n const price =\n purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE\n ? (totalAmount?.balance?.amount ?? '0')\n : totalAmount?.totalAmount.amount;\n\n return {\n custom: {\n locationOrigin: originLocation,\n locationDestination: destinationLocation,\n locationOriginCountry: order.locations[originLocation].countryCode,\n locationDestinationCountry: order.locations[destinationLocation].countryCode,\n longOrShortHaul: containsLongHaulFlight(order.bounds) ? GtmHaulType.LONG_HAUL : GtmHaulType.SHORT_HAUL,\n PNRrecordLocator: order.id,\n fareTypes: getGtmFareTypes(order.bounds),\n tripType: getTripTypeFromBounds(order.bounds),\n totalPaxAmount: getGtmTotalPaxAmountFromOrder(order),\n totalPriceAmount: price || UNSET,\n totalPointsAmount: parseFloat(totalAmount?.totalPoints?.amount) || UNSET,\n paymentType: paymentMethods.map((p) => p.mopType ?? UNSET).join('-') || UNSET,\n paymentSubType: paymentMethods.map((p) => p.mopSubType ?? UNSET).join('-') || UNSET,\n currencyCode: totalAmount?.totalAmount?.currencyCode || UNSET,\n stayDurationCategory: getGtmStayDuration(order.bounds),\n purchaseFlow,\n },\n actionField: {\n id: getGtmActionFieldId(order),\n affiliation: FINNAIR,\n revenue: price,\n shipping: purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? '0' : totalAmount?.totalFees?.amount,\n tax: purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? '0' : totalAmount?.totalTax?.amount,\n },\n products,\n };\n};\n\nexport const getGA4Items = (\n cartOrOrder: CartOrOrder,\n purchaseFlow: GtmPurchaseFlow,\n isBeforePayment = false\n): GA4Product[] => {\n const prices = isBeforePayment ? cartOrOrder.prices?.unpaid : cartOrOrder.prices?.included;\n\n switch (purchaseFlow) {\n case GtmPurchaseFlow.VOLUNTARY_CHANGE:\n return getGA4FlightProductFromOrder(cartOrOrder, prices?.total, purchaseFlow);\n case GtmPurchaseFlow.MANAGE_BOOKING: {\n const services = isBeforePayment ? cartOrOrder.services.unpaid : getLastPaidServices(cartOrOrder as FinnairOrder);\n return mapServicesToGA4ProductList(cartOrOrder, services, purchaseFlow);\n }\n default: {\n const services = isBeforePayment ? cartOrOrder.services.unpaid : cartOrOrder.services.included;\n return [\n ...getGA4FlightProductFromOrder(cartOrOrder, prices?.flight, purchaseFlow),\n ...mapServicesToGA4ProductList(cartOrOrder, services, purchaseFlow),\n ];\n }\n }\n};\n\nexport const resolvePurchaseFlow = (profile: Profile | undefined, isAward: boolean): GtmPurchaseFlow => {\n if (profile?.tier === ProfileTier.CORPORATE) {\n return GtmPurchaseFlow.CORPORATE;\n } else if (isAward) {\n return GtmPurchaseFlow.AWARD;\n }\n\n return GtmPurchaseFlow.BOOKING;\n};\n\nexport const getGA4ProductsFromSmpProducts = (\n products: SmpProduct[],\n purchaseFlow: GtmPurchaseFlow,\n bounds: FinnairBoundItem[]\n): GA4Product[] => {\n const affiliationMap = {\n [GA4Affiliation.BOOKING]: 'booking',\n [GA4Affiliation.MMB]: 'mmb',\n };\n const affiliation = getAffiliation(purchaseFlow);\n\n return products.map((product) => {\n const notAvailable = snapshot(product.notAvailable$);\n const price = snapshot(product.price$);\n const list_id = `${affiliationMap[affiliation]}-ancillaries-${notAvailable ? 'inactive' : 'master'}`;\n const name = product.category.charAt(0).toUpperCase() + product.category.slice(1);\n\n return {\n item_id: name,\n item_name: name,\n price: 0,\n quantity: 1,\n currency: price?.currencyCode,\n affiliation: affiliation,\n item_category: GA4Category.ANCILLARIES,\n item_category2: name,\n item_category3: '',\n item_variant: undefined,\n item_list_id: list_id,\n item_list_name: list_id,\n item_haul_type: getHaulTypeFromBounds(bounds),\n };\n });\n};\n\nexport const mapToGA4FareFamilyProduct = (\n bound: FinnairBoundItem,\n product: BoundFareFamily,\n currencyCode: string,\n fareFamilyBenefitsMap: FareFamilyMap,\n paxAmount: number,\n purchaseFlow: GtmPurchaseFlow\n): GA4Product => {\n const category = purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? GA4Category.FLIGHT_CHANGE : GA4Category.FLIGHTS;\n const price = purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? product.balancePrice : product.totalPrice;\n const finalPrice = Math.round((parseFloat(price) / paxAmount) * 100) / 100;\n const fareFamilyName = fareFamilyBenefitsMap[product.fareFamilyCode]?.brandName ?? UNSET;\n const id = `${category}_${product.fareFamilyCode}`;\n\n return {\n item_id: id,\n item_name: id,\n price: finalPrice,\n quantity: paxAmount,\n currency: currencyCode,\n affiliation: getAffiliation(purchaseFlow),\n item_category: category,\n item_category2: fareFamilyName,\n item_category3: bound.cabinClass,\n item_variant: product.fareFamilyCode,\n };\n};\n\nexport const getPriceForSubCategory = (\n passenger: FinnairPassengerServiceItem,\n services: FinnairPassengerServiceSelectionItem\n): FinnairAmount => {\n return services.subCategory === SubCategory.COVER ? passenger.totalPrice : services.totalPrice;\n};\n","\n
\n
\n

\n {{ 'ticketSelection.reviewFlights' | finLocalization }}\n

\n \n
\n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n
\n","import { Component, OnInit } from '@angular/core';\n\nimport { BehaviorSubject, map, Observable } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { BookingAppState, SelectionPhase } from '@fcom/common/interfaces/booking';\nimport { BoundType } from '@fcom/dapi/interfaces';\nimport { ModalButtons, TabLayoutType } from '@fcom/ui-components';\nimport { BookingService } from '@fcom/booking/services';\nimport { FinnairBoundItem, FinnairCart } from '@fcom/dapi/api/models';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { GtmService } from '@fcom/common/gtm';\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { cartData } from '@fcom/booking/store/selectors/cart.selector';\nimport { ConfigService, NativeBridgeService } from '@fcom/core';\nimport { TripType } from '@fcom/core/interfaces';\nimport { LanguageSelectorContext } from '@fcom/common/components/language-selector/language-selector.component';\nimport { ExpanderStatus } from '@fcom/booking-widget/interfaces';\n\nimport { getTripTypeFromBounds } from '../../../utils/common-booking.utils';\n\ninterface TicketSummaryModalState {\n open: boolean;\n bound: FinnairBoundItem;\n boundType: BoundType;\n}\n\ninterface BoundSummary {\n bound: FinnairBoundItem;\n departureCity: string;\n arrivalCity: string;\n boundType: BoundType;\n}\n\n@Component({\n selector: 'fin-pax-flight-review-summary',\n templateUrl: './pax-flight-review-summary.component.html',\n})\nexport class PaxFlightReviewSummaryComponent implements OnInit {\n public readonly BoundType = BoundType;\n readonly SelectionPhase = SelectionPhase;\n readonly LANGUAGE_SELECTOR_CONTEXT = LanguageSelectorContext.BOOKING;\n\n readonly selectionPhase$: BehaviorSubject = new BehaviorSubject(\n SelectionPhase.OUTBOUND\n );\n\n ModalButtons = ModalButtons;\n TabLayoutType = TabLayoutType;\n\n currentOffer$: Observable;\n\n ticketSummaryModal: TicketSummaryModalState = {\n open: false,\n bound: null,\n boundType: null,\n };\n enableNewLanguageSelector: boolean;\n enableNewStepper: boolean;\n boundSummary$: Observable;\n\n constructor(\n private bookingService: BookingService,\n private store$: Store,\n private gtmService: GtmService,\n private nativeBridgeService: NativeBridgeService,\n private configService: ConfigService\n ) {}\n\n ngOnInit(): void {\n this.currentOffer$ = this.store$.pipe(cartData());\n\n this.enableNewLanguageSelector = !this.nativeBridgeService.isInsideNativeWebView;\n\n this.enableNewStepper = this.configService.cfg.enableNewStepper;\n\n this.boundSummary$ = this.currentOffer$.pipe(\n map((cart) => {\n const tripType = getTripTypeFromBounds(cart.bounds);\n\n return cart.bounds.map((bound, i) => {\n const departureCity = cart.locations[bound.departure.locationCode]?.cityName;\n const arrivalCity = cart.locations[bound.arrival.locationCode]?.cityName;\n\n return {\n bound,\n departureCity: departureCity || bound.departure.locationCode,\n arrivalCity: arrivalCity || bound.arrival.locationCode,\n boundType: this.getBoundTypeFromBound(tripType, i),\n };\n });\n })\n );\n }\n\n getBoundTypeFromBound(tripType: TripType, index: number): BoundType {\n if (tripType === TripType.ONEWAY) {\n return BoundType.outbound;\n }\n\n if (tripType === TripType.RETURN) {\n return index === 0 ? BoundType.outbound : BoundType.inbound;\n }\n\n return BoundType.multi;\n }\n\n showTicketSummaryModal(boundSummary: BoundSummary): void {\n this.ticketSummaryModal = {\n open: true,\n bound: boundSummary.bound,\n boundType: boundSummary.boundType,\n };\n\n this.gtmService.trackElement(\n 'pax-details-flight-review::view-flight-details',\n GaContext.PAX_DETAILS_FLIGHT_REVIEW,\n ElementTypes.LINK,\n undefined,\n ElementActions.CLICK\n );\n }\n\n closeModals(): void {\n this.ticketSummaryModal = {\n open: false,\n bound: null,\n boundType: null,\n };\n }\n\n activateSelectionPhase(selectionPhase: SelectionPhase, locale?: string): void {\n this.selectionPhase$.next(selectionPhase);\n this.returnToFlightSelection(locale);\n }\n\n returnToFlightSelection(locale?: string): void {\n this.bookingService.setStep({ step: BOOKING_STEPS.FLIGHT_SELECTION, locale });\n this.bookingService.setGlobalBookingWidgetExpanderStatus(ExpanderStatus.OPEN);\n }\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CheckInAcceptCancelRequest } from '../models/check-in-accept-cancel-request';\nimport { CheckInBoardingPassByEmailRequest } from '../models/check-in-boarding-pass-by-email-request';\nimport { CheckInBoardingPassByEmailResponse } from '../models/check-in-boarding-pass-by-email-response';\nimport { CheckInInitializeRequest } from '../models/check-in-initialize-request';\nimport { CheckInReassignExitSeatsRequest } from '../models/check-in-reassign-exit-seats-request';\nimport { FinnairBoardingPassDocumentType } from '../models/finnair-boarding-pass-document-type';\n\n\n/**\n * Check-in resources in use\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class CheckinService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation acceptCheckIn\n */\n static readonly AcceptCheckInPath = '/api/v2/checkin/{orderId}/accept';\n\n /**\n * acceptCheckIn.\n *\n * Performs check-in for a list of travelerIds and flightIds\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `acceptCheckIn()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n acceptCheckIn$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInAcceptCancelRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CheckinService.AcceptCheckInPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * acceptCheckIn.\n *\n * Performs check-in for a list of travelerIds and flightIds\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `acceptCheckIn$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n acceptCheckIn(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInAcceptCancelRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.acceptCheckIn$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation cancelCheckIn\n */\n static readonly CancelCheckInPath = '/api/v2/checkin/{orderId}/cancel';\n\n /**\n * cancelCheckIn.\n *\n * Performs cancellation of check-in for a list of travelerIds and flightIds\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `cancelCheckIn()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n cancelCheckIn$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInAcceptCancelRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CheckinService.CancelCheckInPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * cancelCheckIn.\n *\n * Performs cancellation of check-in for a list of travelerIds and flightIds\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `cancelCheckIn$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n cancelCheckIn(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInAcceptCancelRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.cancelCheckIn$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation initializeCheckIn\n */\n static readonly InitializeCheckInPath = '/api/v2/checkin/{orderId}/initialize';\n\n /**\n * initializeCheckIn.\n *\n * Tracks check-in starts in quicksight\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `initializeCheckIn()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n initializeCheckIn$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInInitializeRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CheckinService.InitializeCheckInPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * initializeCheckIn.\n *\n * Tracks check-in starts in quicksight\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `initializeCheckIn$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n initializeCheckIn(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInInitializeRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.initializeCheckIn$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation reassignExitSeats\n */\n static readonly ReassignExitSeatsPath = '/api/v2/checkin/{orderId}/reassign-exit-seats';\n\n /**\n * reassignExitSeats.\n *\n * Reassigns the exit seats with non-exit seats\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `reassignExitSeats()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n reassignExitSeats$Response(rootUrl: string, params: {\n orderId: string;\n hash: string;\n body: CheckInReassignExitSeatsRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CheckinService.ReassignExitSeatsPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * reassignExitSeats.\n *\n * Reassigns the exit seats with non-exit seats\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `reassignExitSeats$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n reassignExitSeats(rootUrl: string, params: {\n orderId: string;\n hash: string;\n body: CheckInReassignExitSeatsRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.reassignExitSeats$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n /**\n * Path part for operation sendBoardingPass\n */\n static readonly SendBoardingPassPath = '/api/v2/checkin/{orderId}/send-boarding-pass';\n\n /**\n * sendBoardingPass.\n *\n * Performs sending of a boarding pass for a list of travelerIds and flightIds\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `sendBoardingPass()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n sendBoardingPass$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInBoardingPassByEmailRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CheckinService.SendBoardingPassPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * sendBoardingPass.\n *\n * Performs sending of a boarding pass for a list of travelerIds and flightIds\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `sendBoardingPass$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n sendBoardingPass(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n body: CheckInBoardingPassByEmailRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.sendBoardingPass$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as CheckInBoardingPassByEmailResponse)\n );\n }\n\n /**\n * Path part for operation getBoardingPassLink\n */\n static readonly GetBoardingPassLinkPath = '/api/v2/checkin/{orderId}/{flightId}/{travelerId}/get-boarding-pass';\n\n /**\n * getBoardingPassLink.\n *\n * Performs getting of a boarding pass for a specific flightId and travelerId\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getBoardingPassLink()` instead.\n *\n * This method doesn't expect any request body.\n */\n getBoardingPassLink$Response(rootUrl: string, params: {\n orderId: string;\n flightId: string;\n travelerId: string;\n hash: string;\n type: FinnairBoardingPassDocumentType;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, CheckinService.GetBoardingPassLinkPath, 'get');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.path('flightId', params.flightId, {});\n rb.path('travelerId', params.travelerId, {});\n rb.query('hash', params.hash, {});\n rb.query('type', params.type, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return (r as HttpResponse).clone({ body: undefined }) as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getBoardingPassLink.\n *\n * Performs getting of a boarding pass for a specific flightId and travelerId\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getBoardingPassLink$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getBoardingPassLink(rootUrl: string, params: {\n orderId: string;\n flightId: string;\n travelerId: string;\n hash: string;\n type: FinnairBoardingPassDocumentType;\n },\n context?: HttpContext\n\n): Observable {\n return this.getBoardingPassLink$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as void)\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, combineLatest, Observable, of, ReplaySubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { ProfileTier } from '@fcom/core-api/login';\nimport { AppState } from '@fcom/core/interfaces';\nimport { profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { finShare } from '@fcom/rx';\nimport { NativeBridgeService } from '@fcom/core/services';\n\nimport { QualtricsSurvey, QualtricsSurveys } from '../../qualtrics/qualtrics.utils';\n\n/**\n * This service will manage the visibility and values of feedback widget.\n * If user is corporate user, the widget will be always visible and survey\n * will be corporate survey regardless of values set in components.\n */\n@Injectable()\nexport class FeedbackService {\n public readonly visibility$: Observable;\n public readonly feedbackSurvey$: Observable;\n\n private feedbackWidgetVisibility$: BehaviorSubject = new BehaviorSubject(false);\n private survey$ = new ReplaySubject(1);\n private isCorporateUser$: Observable;\n\n constructor(\n store$: Store,\n private nativeBridgeService: NativeBridgeService\n ) {\n this.isCorporateUser$ = store$.pipe(\n profileOrUndefinedIfNotLoggedIn(),\n map((profile) => profile?.tier === ProfileTier.CORPORATE)\n );\n this.visibility$ = this.nativeBridgeService.isInsideNativeWebView\n ? of(false)\n : combineLatest([this.feedbackWidgetVisibility$, this.isCorporateUser$]).pipe(\n map(([visible, isCorporateUser]) => visible || isCorporateUser)\n );\n this.feedbackSurvey$ = combineLatest([this.survey$, this.isCorporateUser$]).pipe(\n map(([survey, isCorporateUser]) => {\n if (isCorporateUser) {\n return QualtricsSurveys.CORPORATE_FEEDBACK;\n }\n return survey;\n }),\n finShare()\n );\n }\n\n setFeedbackWidgetVisibility(visibility: boolean): void {\n this.feedbackWidgetVisibility$.next(visibility);\n }\n\n setSurvey(survey: QualtricsSurvey): void {\n this.survey$.next(survey);\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\nimport {Version} from '@angular/core';\n\n/** Current version of Angular Material. */\nexport const VERSION = new Version('17.3.10');\n","\n@if (multiple) {\n \n}\n\n\n\n\n\n\n@if (!multiple && selected && !hideSingleSelectionIndicator) {\n \n}\n\n\n@if (group && group._inert) {\n ({{ group.label }})\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 */\n\nimport {HighContrastModeDetector} from '@angular/cdk/a11y';\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {inject, Inject, InjectionToken, NgModule, Optional} from '@angular/core';\nimport {VERSION as CDK_VERSION} from '@angular/cdk';\nimport {DOCUMENT} from '@angular/common';\nimport {Platform, _isTestEnvironment} from '@angular/cdk/platform';\nimport {VERSION} from '../version';\n\n/** @docs-private */\nexport function MATERIAL_SANITY_CHECKS_FACTORY(): SanityChecks {\n return true;\n}\n\n/** Injection token that configures whether the Material sanity checks are enabled. */\nexport const MATERIAL_SANITY_CHECKS = new InjectionToken('mat-sanity-checks', {\n providedIn: 'root',\n factory: MATERIAL_SANITY_CHECKS_FACTORY,\n});\n\n/**\n * Possible sanity checks that can be enabled. If set to\n * true/false, all checks will be enabled/disabled.\n */\nexport type SanityChecks = boolean | GranularSanityChecks;\n\n/** Object that can be used to configure the sanity checks granularly. */\nexport interface GranularSanityChecks {\n doctype: boolean;\n theme: boolean;\n version: boolean;\n}\n\n/**\n * Module that captures anything that should be loaded and/or run for *all* Angular Material\n * components. This includes Bidi, etc.\n *\n * This module should be imported to each top-level component module (e.g., MatTabsModule).\n */\n@NgModule({\n imports: [BidiModule],\n exports: [BidiModule],\n})\nexport class MatCommonModule {\n /** Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype). */\n private _hasDoneGlobalChecks = false;\n\n constructor(\n highContrastModeDetector: HighContrastModeDetector,\n @Optional() @Inject(MATERIAL_SANITY_CHECKS) private _sanityChecks: SanityChecks,\n @Inject(DOCUMENT) private _document: Document,\n ) {\n // While A11yModule also does this, we repeat it here to avoid importing A11yModule\n // in MatCommonModule.\n highContrastModeDetector._applyBodyHighContrastModeCssClasses();\n\n if (!this._hasDoneGlobalChecks) {\n this._hasDoneGlobalChecks = true;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Inject in here so the reference to `Platform` can be removed in production mode.\n const platform = inject(Platform, {optional: true});\n\n if (this._checkIsEnabled('doctype')) {\n _checkDoctypeIsDefined(this._document);\n }\n\n if (this._checkIsEnabled('theme')) {\n _checkThemeIsPresent(this._document, !!platform?.isBrowser);\n }\n\n if (this._checkIsEnabled('version')) {\n _checkCdkVersionMatch();\n }\n }\n }\n }\n\n /** Gets whether a specific sanity check is enabled. */\n private _checkIsEnabled(name: keyof GranularSanityChecks): boolean {\n if (_isTestEnvironment()) {\n return false;\n }\n\n if (typeof this._sanityChecks === 'boolean') {\n return this._sanityChecks;\n }\n\n return !!this._sanityChecks[name];\n }\n}\n\n/** Checks that the page has a doctype. */\nfunction _checkDoctypeIsDefined(doc: Document): void {\n if (!doc.doctype) {\n console.warn(\n 'Current document does not have a doctype. This may cause ' +\n 'some Angular Material components not to behave as expected.',\n );\n }\n}\n\n/** Checks that a theme has been included. */\nfunction _checkThemeIsPresent(doc: Document, isBrowser: boolean): void {\n // We need to assert that the `body` is defined, because these checks run very early\n // and the `body` won't be defined if the consumer put their scripts in the `head`.\n if (!doc.body || !isBrowser) {\n return;\n }\n\n const testElement = doc.createElement('div');\n testElement.classList.add('mat-theme-loaded-marker');\n doc.body.appendChild(testElement);\n\n const computedStyle = getComputedStyle(testElement);\n\n // In some situations the computed style of the test element can be null. For example in\n // Firefox, the computed style is null if an application is running inside of a hidden iframe.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n if (computedStyle && computedStyle.display !== 'none') {\n console.warn(\n 'Could not find Angular Material core theme. Most Material ' +\n 'components may not work as expected. For more info refer ' +\n 'to the theming guide: https://material.angular.io/guide/theming',\n );\n }\n\n testElement.remove();\n}\n\n/** Checks whether the Material version matches the CDK version. */\nfunction _checkCdkVersionMatch(): void {\n if (VERSION.full !== CDK_VERSION.full) {\n console.warn(\n 'The Angular Material version (' +\n VERSION.full +\n ') does not match ' +\n 'the Angular CDK version (' +\n CDK_VERSION.full +\n ').\\n' +\n 'Please ensure the versions of these two packages exactly match.',\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\nimport {inject, InjectionToken, LOCALE_ID} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\n/** InjectionToken for datepicker that can be used to override default locale code. */\nexport const MAT_DATE_LOCALE = new InjectionToken<{}>('MAT_DATE_LOCALE', {\n providedIn: 'root',\n factory: MAT_DATE_LOCALE_FACTORY,\n});\n\n/** @docs-private */\nexport function MAT_DATE_LOCALE_FACTORY(): {} {\n return inject(LOCALE_ID);\n}\n\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\nexport abstract class DateAdapter {\n /** The locale to use for all dates. */\n protected locale: L;\n protected readonly _localeChanges = new Subject();\n\n /** A stream that emits when the locale changes. */\n readonly localeChanges: Observable = this._localeChanges;\n\n /**\n * Gets the year component of the given date.\n * @param date The date to extract the year from.\n * @returns The year component.\n */\n abstract getYear(date: D): number;\n\n /**\n * Gets the month component of the given date.\n * @param date The date to extract the month from.\n * @returns The month component (0-indexed, 0 = January).\n */\n abstract getMonth(date: D): number;\n\n /**\n * Gets the date of the month component of the given date.\n * @param date The date to extract the date of the month from.\n * @returns The month component (1-indexed, 1 = first of month).\n */\n abstract getDate(date: D): number;\n\n /**\n * Gets the day of the week component of the given date.\n * @param date The date to extract the day of the week from.\n * @returns The month component (0-indexed, 0 = Sunday).\n */\n abstract getDayOfWeek(date: D): number;\n\n /**\n * Gets a list of names for the months.\n * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').\n * @returns An ordered list of all month names, starting with January.\n */\n abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets a list of names for the dates of the month.\n * @returns An ordered list of all date of the month names, starting with '1'.\n */\n abstract getDateNames(): string[];\n\n /**\n * Gets a list of names for the days of the week.\n * @param style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S').\n * @returns An ordered list of all weekday names, starting with Sunday.\n */\n abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets the name for the year of the given date.\n * @param date The date to get the year name for.\n * @returns The name of the given year (e.g. '2017').\n */\n abstract getYearName(date: D): string;\n\n /**\n * Gets the first day of the week.\n * @returns The first day of the week (0-indexed, 0 = Sunday).\n */\n abstract getFirstDayOfWeek(): number;\n\n /**\n * Gets the number of days in the month of the given date.\n * @param date The date whose month should be checked.\n * @returns The number of days in the month of the given date.\n */\n abstract getNumDaysInMonth(date: D): number;\n\n /**\n * Clones the given date.\n * @param date The date to clone\n * @returns A new date equal to the given date.\n */\n abstract clone(date: D): D;\n\n /**\n * Creates a date with the given year, month, and date. Does not allow over/under-flow of the\n * month and date.\n * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).\n * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.\n * @param date The date of month of the date. Must be an integer 1 - length of the given month.\n * @returns The new date, or null if invalid.\n */\n abstract createDate(year: number, month: number, date: number): D;\n\n /**\n * Gets today's date.\n * @returns Today's date.\n */\n abstract today(): D;\n\n /**\n * Parses a date from a user-provided value.\n * @param value The value to parse.\n * @param parseFormat The expected format of the value being parsed\n * (type is implementation-dependent).\n * @returns The parsed date.\n */\n abstract parse(value: any, parseFormat: any): D | null;\n\n /**\n * Formats a date as a string according to the given format.\n * @param date The value to format.\n * @param displayFormat The format to use to display the date as a string.\n * @returns The formatted date string.\n */\n abstract format(date: D, displayFormat: any): string;\n\n /**\n * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the\n * calendar for each year and then finding the closest date in the new month. For example when\n * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.\n * @param date The date to add years to.\n * @param years The number of years to add (may be negative).\n * @returns A new date equal to the given one with the specified number of years added.\n */\n abstract addCalendarYears(date: D, years: number): D;\n\n /**\n * Adds the given number of months to the date. Months are counted as if flipping a page on the\n * calendar for each month and then finding the closest date in the new month. For example when\n * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.\n * @param date The date to add months to.\n * @param months The number of months to add (may be negative).\n * @returns A new date equal to the given one with the specified number of months added.\n */\n abstract addCalendarMonths(date: D, months: number): D;\n\n /**\n * Adds the given number of days to the date. Days are counted as if moving one cell on the\n * calendar for each day.\n * @param date The date to add days to.\n * @param days The number of days to add (may be negative).\n * @returns A new date equal to the given one with the specified number of days added.\n */\n abstract addCalendarDays(date: D, days: number): D;\n\n /**\n * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.\n * This method is used to generate date strings that are compatible with native HTML attributes\n * such as the `min` or `max` attribute of an ``.\n * @param date The date to get the ISO date string for.\n * @returns The ISO date string date string.\n */\n abstract toIso8601(date: D): string;\n\n /**\n * Checks whether the given object is considered a date instance by this DateAdapter.\n * @param obj The object to check\n * @returns Whether the object is a date instance.\n */\n abstract isDateInstance(obj: any): boolean;\n\n /**\n * Checks whether the given date is valid.\n * @param date The date to check.\n * @returns Whether the date is valid.\n */\n abstract isValid(date: D): boolean;\n\n /**\n * Gets date instance that is not valid.\n * @returns An invalid date.\n */\n abstract invalid(): D;\n\n /**\n * Given a potential date object, returns that same date object if it is\n * a valid date, or `null` if it's not a valid date.\n * @param obj The object to check.\n * @returns A date or `null`.\n */\n getValidDateOrNull(obj: unknown): D | null {\n return this.isDateInstance(obj) && this.isValid(obj as D) ? (obj as D) : null;\n }\n\n /**\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n * string). The default implementation does not allow any deserialization, it simply checks that\n * the given value is already a valid date object or null. The `` will call this\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\n * support passing values from your backend directly to these properties by overriding this method\n * to also deserialize the format used by your backend.\n * @param value The value to be deserialized into a date object.\n * @returns The deserialized date object, either a valid date, null if the value can be\n * deserialized into a null date (e.g. the empty string), or an invalid date.\n */\n deserialize(value: any): D | null {\n if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\n return value;\n }\n return this.invalid();\n }\n\n /**\n * Sets the locale used for all dates.\n * @param locale The new locale.\n */\n setLocale(locale: L) {\n this.locale = locale;\n this._localeChanges.next();\n }\n\n /**\n * Compares two dates.\n * @param first The first date to compare.\n * @param second The second date to compare.\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\n * a number greater than 0 if the first date is later.\n */\n compareDate(first: D, second: D): number {\n return (\n this.getYear(first) - this.getYear(second) ||\n this.getMonth(first) - this.getMonth(second) ||\n this.getDate(first) - this.getDate(second)\n );\n }\n\n /**\n * Checks if two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameDate(first: D | null, second: D | null): boolean {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n\n /**\n * Clamp the given date between min and max dates.\n * @param date The date to clamp.\n * @param min The minimum value to allow. If null or omitted no min is enforced.\n * @param max The maximum value to allow. If null or omitted no max is enforced.\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\n * otherwise `date`.\n */\n clampDate(date: D, min?: D | null, max?: D | null): D {\n if (min && this.compareDate(date, min) < 0) {\n return min;\n }\n if (max && this.compareDate(date, max) > 0) {\n return max;\n }\n return date;\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\nimport {InjectionToken} from '@angular/core';\n\nexport type MatDateFormats = {\n parse: {\n dateInput: any;\n };\n display: {\n dateInput: any;\n monthLabel?: any;\n monthYearLabel: any;\n dateA11yLabel: any;\n monthYearA11yLabel: any;\n };\n};\n\nexport const MAT_DATE_FORMATS = new InjectionToken('mat-date-formats');\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\nimport {inject, Inject, Injectable, Optional} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from './date-adapter';\n\n/**\n * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings an with out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX =\n /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\n\n/** Creates an array and fills it with values. */\nfunction range(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\n@Injectable()\nexport class NativeDateAdapter extends DateAdapter {\n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\n useUtcForDisplay: boolean = false;\n\n /** The injected locale. */\n private readonly _matDateLocale = inject(MAT_DATE_LOCALE, {optional: true});\n\n constructor(\n /**\n * @deprecated Now injected via inject(), param to be removed.\n * @breaking-change 18.0.0\n */\n @Optional() @Inject(MAT_DATE_LOCALE) matDateLocale?: string,\n ) {\n super();\n if (matDateLocale !== undefined) {\n this._matDateLocale = matDateLocale;\n }\n super.setLocale(this._matDateLocale);\n }\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getDayOfWeek(date: Date): number {\n return date.getDay();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {month: style, timeZone: 'utc'});\n return range(12, i => this._format(dtf, new Date(2017, i, 1)));\n }\n\n getDateNames(): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {day: 'numeric', timeZone: 'utc'});\n return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {weekday: style, timeZone: 'utc'});\n return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n\n getYearName(date: Date): string {\n const dtf = new Intl.DateTimeFormat(this.locale, {year: 'numeric', timeZone: 'utc'});\n return this._format(dtf, date);\n }\n\n getFirstDayOfWeek(): number {\n // We can't tell using native JS Date what the first day of the week is, we default to Sunday.\n return 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return this.getDate(\n this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0),\n );\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n\n let result = this._createDateWithOverflow(year, month, date);\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat?: any): Date | null {\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\n // parameters.\n if (typeof value == 'number') {\n return new Date(value);\n }\n return value ? new Date(Date.parse(value)) : null;\n }\n\n format(date: Date, displayFormat: Object): string {\n if (!this.isValid(date)) {\n throw Error('NativeDateAdapter: Cannot format invalid date.');\n }\n\n const dtf = new Intl.DateTimeFormat(this.locale, {...displayFormat, timeZone: 'utc'});\n return this._format(dtf, date);\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return this.addCalendarMonths(date, years * 12);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n let newDate = this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + months,\n this.getDate(date),\n );\n\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\n }\n\n return newDate;\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date) + days,\n );\n }\n\n toIso8601(date: Date): string {\n return [\n date.getUTCFullYear(),\n this._2digit(date.getUTCMonth() + 1),\n this._2digit(date.getUTCDate()),\n ].join('-');\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any) {\n return obj instanceof Date;\n }\n\n isValid(date: Date) {\n return !isNaN(date.getTime());\n }\n\n invalid(): Date {\n return new Date(NaN);\n }\n\n /** Creates a date but allows the month and date to overflow. */\n private _createDateWithOverflow(year: number, month: number, date: number) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const d = new Date();\n d.setFullYear(year, month, date);\n d.setHours(0, 0, 0, 0);\n return d;\n }\n\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n private _2digit(n: number) {\n return ('00' + n).slice(-2);\n }\n\n /**\n * When converting Date object to string, javascript built-in functions may return wrong\n * results because it applies its internal DST rules. The DST rules around the world change\n * very frequently, and the current valid rule is not always valid in previous years though.\n * We work around this problem building a new Date object which has its internal UTC\n * representation with the local date and time.\n * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\n * timeZone set to 'utc' to work fine.\n * @param date Date from which we want to get the string representation according to dtf\n * @returns A Date object with its UTC representation based on the passed in date info\n */\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\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\nimport {MatDateFormats} from './date-formats';\n\nexport const MAT_NATIVE_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: null,\n },\n display: {\n dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},\n monthYearLabel: {year: 'numeric', month: 'short'},\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\n monthYearA11yLabel: {year: 'numeric', month: 'long'},\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\nimport {NgModule, Provider} from '@angular/core';\nimport {DateAdapter} from './date-adapter';\nimport {MAT_DATE_FORMATS, MatDateFormats} from './date-formats';\nimport {NativeDateAdapter} from './native-date-adapter';\nimport {MAT_NATIVE_DATE_FORMATS} from './native-date-formats';\n\nexport * from './date-adapter';\nexport * from './date-formats';\nexport * from './native-date-adapter';\nexport * from './native-date-formats';\n\n@NgModule({\n providers: [{provide: DateAdapter, useClass: NativeDateAdapter}],\n})\nexport class NativeDateModule {}\n\n@NgModule({\n providers: [provideNativeDateAdapter()],\n})\nexport class MatNativeDateModule {}\n\nexport function provideNativeDateAdapter(\n formats: MatDateFormats = MAT_NATIVE_DATE_FORMATS,\n): Provider[] {\n return [\n {provide: DateAdapter, useClass: NativeDateAdapter},\n {provide: MAT_DATE_FORMATS, useValue: formats},\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/** Possible states for a ripple element. */\nexport enum RippleState {\n FADING_IN,\n VISIBLE,\n FADING_OUT,\n HIDDEN,\n}\n\nexport type RippleConfig = {\n color?: string;\n centered?: boolean;\n radius?: number;\n persistent?: boolean;\n animation?: RippleAnimationConfig;\n terminateOnPointerUp?: boolean;\n};\n\n/**\n * Interface that describes the configuration for the animation of a ripple.\n * There are two animation phases with different durations for the ripples.\n */\nexport interface RippleAnimationConfig {\n /** Duration in milliseconds for the enter animation (expansion from point of contact). */\n enterDuration?: number;\n /** Duration in milliseconds for the exit animation (fade-out). */\n exitDuration?: number;\n}\n\n/**\n * Reference to a previously launched ripple element.\n */\nexport class RippleRef {\n /** Current state of the ripple. */\n state: RippleState = RippleState.HIDDEN;\n\n constructor(\n private _renderer: {fadeOutRipple(ref: RippleRef): void},\n /** Reference to the ripple HTML element. */\n public element: HTMLElement,\n /** Ripple configuration used for the ripple. */\n public config: RippleConfig,\n /* Whether animations are forcibly disabled for ripples through CSS. */\n public _animationForciblyDisabledThroughCss = false,\n ) {}\n\n /** Fades out the ripple element. */\n fadeOut() {\n this._renderer.fadeOutRipple(this);\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\nimport {normalizePassiveListenerOptions, _getEventTarget} from '@angular/cdk/platform';\nimport {NgZone} from '@angular/core';\n\n/** Options used to bind a passive capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n\n/** Manages events through delegation so that as few event handlers as possible are bound. */\nexport class RippleEventManager {\n private _events = new Map>>();\n\n /** Adds an event handler. */\n addHandler(ngZone: NgZone, name: string, element: HTMLElement, handler: EventListenerObject) {\n const handlersForEvent = this._events.get(name);\n\n if (handlersForEvent) {\n const handlersForElement = handlersForEvent.get(element);\n\n if (handlersForElement) {\n handlersForElement.add(handler);\n } else {\n handlersForEvent.set(element, new Set([handler]));\n }\n } else {\n this._events.set(name, new Map([[element, new Set([handler])]]));\n\n ngZone.runOutsideAngular(() => {\n document.addEventListener(name, this._delegateEventHandler, passiveCapturingEventOptions);\n });\n }\n }\n\n /** Removes an event handler. */\n removeHandler(name: string, element: HTMLElement, handler: EventListenerObject) {\n const handlersForEvent = this._events.get(name);\n\n if (!handlersForEvent) {\n return;\n }\n\n const handlersForElement = handlersForEvent.get(element);\n\n if (!handlersForElement) {\n return;\n }\n\n handlersForElement.delete(handler);\n\n if (handlersForElement.size === 0) {\n handlersForEvent.delete(element);\n }\n\n if (handlersForEvent.size === 0) {\n this._events.delete(name);\n document.removeEventListener(name, this._delegateEventHandler, passiveCapturingEventOptions);\n }\n }\n\n /** Event handler that is bound and which dispatches the events to the different targets. */\n private _delegateEventHandler = (event: Event) => {\n const target = _getEventTarget(event);\n\n if (target) {\n this._events.get(event.type)?.forEach((handlers, element) => {\n if (element === target || element.contains(target as Node)) {\n handlers.forEach(handler => handler.handleEvent(event));\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 */\nimport {ElementRef, NgZone} from '@angular/core';\nimport {Platform, normalizePassiveListenerOptions, _getEventTarget} from '@angular/cdk/platform';\nimport {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '@angular/cdk/a11y';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {RippleRef, RippleState, RippleConfig} from './ripple-ref';\nimport {RippleEventManager} from './ripple-event-manager';\n\n/**\n * Interface that describes the target for launching ripples.\n * It defines the ripple configuration and disabled state for interaction ripples.\n * @docs-private\n */\nexport interface RippleTarget {\n /** Configuration for ripples that are launched on pointer down. */\n rippleConfig: RippleConfig;\n /** Whether ripples on pointer down should be disabled. */\n rippleDisabled: boolean;\n}\n\n/** Interfaces the defines ripple element transition event listeners. */\ninterface RippleEventListeners {\n onTransitionEnd: EventListener;\n onTransitionCancel: EventListener;\n}\n\n/**\n * Default ripple animation configuration for ripples without an explicit\n * animation config specified.\n */\nexport const defaultRippleAnimationConfig = {\n enterDuration: 225,\n exitDuration: 150,\n};\n\n/**\n * Timeout for ignoring mouse events. Mouse events will be temporary ignored after touch\n * events to avoid synthetic mouse events.\n */\nconst ignoreMouseEventsTimeout = 800;\n\n/** Options used to bind a passive capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n\n/** Events that signal that the pointer is down. */\nconst pointerDownEvents = ['mousedown', 'touchstart'];\n\n/** Events that signal that the pointer is up. */\nconst pointerUpEvents = ['mouseup', 'mouseleave', 'touchend', 'touchcancel'];\n\n/**\n * Helper service that performs DOM manipulations. Not intended to be used outside this module.\n * The constructor takes a reference to the ripple directive's host element and a map of DOM\n * event handlers to be installed on the element that triggers ripple animations.\n * This will eventually become a custom renderer once Angular support exists.\n * @docs-private\n */\nexport class RippleRenderer implements EventListenerObject {\n /** Element where the ripples are being added to. */\n private _containerElement: HTMLElement;\n\n /** Element which triggers the ripple elements on mouse events. */\n private _triggerElement: HTMLElement | null;\n\n /** Whether the pointer is currently down or not. */\n private _isPointerDown = false;\n\n /**\n * Map of currently active ripple references.\n * The ripple reference is mapped to its element event listeners.\n * The reason why `| null` is used is that event listeners are added only\n * when the condition is truthy (see the `_startFadeOutTransition` method).\n */\n private _activeRipples = new Map();\n\n /** Latest non-persistent ripple that was triggered. */\n private _mostRecentTransientRipple: RippleRef | null;\n\n /** Time in milliseconds when the last touchstart event happened. */\n private _lastTouchStartEvent: number;\n\n /** Whether pointer-up event listeners have been registered. */\n private _pointerUpEventsRegistered = false;\n\n /**\n * Cached dimensions of the ripple container. Set when the first\n * ripple is shown and cleared once no more ripples are visible.\n */\n private _containerRect: DOMRect | null;\n\n private static _eventManager = new RippleEventManager();\n\n constructor(\n private _target: RippleTarget,\n private _ngZone: NgZone,\n elementOrElementRef: HTMLElement | ElementRef,\n private _platform: Platform,\n ) {\n // Only do anything if we're on the browser.\n if (_platform.isBrowser) {\n this._containerElement = coerceElement(elementOrElementRef);\n }\n }\n\n /**\n * Fades in a ripple at the given coordinates.\n * @param x Coordinate within the element, along the X axis at which to start the ripple.\n * @param y Coordinate within the element, along the Y axis at which to start the ripple.\n * @param config Extra ripple options.\n */\n fadeInRipple(x: number, y: number, config: RippleConfig = {}): RippleRef {\n const containerRect = (this._containerRect =\n this._containerRect || this._containerElement.getBoundingClientRect());\n const animationConfig = {...defaultRippleAnimationConfig, ...config.animation};\n\n if (config.centered) {\n x = containerRect.left + containerRect.width / 2;\n y = containerRect.top + containerRect.height / 2;\n }\n\n const radius = config.radius || distanceToFurthestCorner(x, y, containerRect);\n const offsetX = x - containerRect.left;\n const offsetY = y - containerRect.top;\n const enterDuration = animationConfig.enterDuration;\n\n const ripple = document.createElement('div');\n ripple.classList.add('mat-ripple-element');\n\n ripple.style.left = `${offsetX - radius}px`;\n ripple.style.top = `${offsetY - radius}px`;\n ripple.style.height = `${radius * 2}px`;\n ripple.style.width = `${radius * 2}px`;\n\n // If a custom color has been specified, set it as inline style. If no color is\n // set, the default color will be applied through the ripple theme styles.\n if (config.color != null) {\n ripple.style.backgroundColor = config.color;\n }\n\n ripple.style.transitionDuration = `${enterDuration}ms`;\n\n this._containerElement.appendChild(ripple);\n\n // By default the browser does not recalculate the styles of dynamically created\n // ripple elements. This is critical to ensure that the `scale` animates properly.\n // We enforce a style recalculation by calling `getComputedStyle` and *accessing* a property.\n // See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n const computedStyles = window.getComputedStyle(ripple);\n const userTransitionProperty = computedStyles.transitionProperty;\n const userTransitionDuration = computedStyles.transitionDuration;\n\n // Note: We detect whether animation is forcibly disabled through CSS (e.g. through\n // `transition: none` or `display: none`). This is technically unexpected since animations are\n // controlled through the animation config, but this exists for backwards compatibility. This\n // logic does not need to be super accurate since it covers some edge cases which can be easily\n // avoided by users.\n const animationForciblyDisabledThroughCss =\n userTransitionProperty === 'none' ||\n // Note: The canonical unit for serialized CSS `
(value: A, index: number, self: A[]): boolean => self.indexOf(value) === index;\n\n/**\n * Can be used to filter unique values by, e.g., a contained field\n *\n * Usage: ['a','b','c','foo','barbaz'].filter(uniqueBy(a => a.length)) => ['a','foo','barbaz']\n */\nexport const uniqueBy = (accessor: (a: A) => B): ((value: A, index: number, self: A[]) => boolean) => {\n let mapped: B[];\n return (value: A, index: number, self: A[]): boolean => {\n if (!mapped) {\n mapped = self.map(accessor);\n }\n return mapped.indexOf(accessor(value)) === index;\n };\n};\n\n/**\n * Returns values of object mapped from `Object.keys`. Similar to ES2017 Object.values\n * @param o\n * @return {[string,string,string,string,string]}\n */\nexport function valuesOf(o: Record = {}): T[] {\n return Object.keys(o).map((k) => o[k]);\n}\n\n/**\n * Returns values of string Enum as an array\n * @param o Enum\n * @return {['option1', 'option2']}\n */\nexport function enumValues, K extends keyof T>(o: T): T[K][] {\n return Object.keys(o).map((k) => o[k]);\n}\n\n/**\n * Returns entrySet of object mapped from `Object.keys`.\n * @param o\n * @return [{ key: string, value: any }, { key: string, value: any }]\n */\nexport function entrySet(o: Record = {}): { key: string; value: T }[] {\n return isPresent(o) ? Object.keys(o).map((k) => ({ key: k, value: o[k] })) : [];\n}\n\nexport function isIn(value: T, ...list: T[]): boolean {\n return isNotEmpty(list) && list.indexOf(value) >= 0;\n}\n\n/**\n * Checks if 2 given params are deeply equal\n * @param obj1\n * @param obj2\n * @returns true/false\n */\nexport function isDeepEqual(obj1: T, obj2: T): boolean {\n // check the object type: If both are null or undefined, return true\n if (obj1 === obj2) {\n return true;\n }\n\n // if either is not an object, return false since they would have been equal if both were the same primitive\n if (typeof obj1 !== 'object' || typeof obj2 !== 'object' || obj1 == null || obj2 == null) {\n return false;\n }\n\n if (Array.isArray(obj1) && Array.isArray(obj2)) {\n // check if arrays are same length\n if (obj1.length !== obj2.length) {\n return false;\n }\n\n // check each element in the array\n for (let i = 0; i < obj1.length; i++) {\n if (!isDeepEqual(obj1[i], obj2[i])) {\n return false;\n }\n }\n return true;\n } else if (Array.isArray(obj1) || Array.isArray(obj2)) {\n // one is an array, the other is not\n return false;\n }\n\n // if both are objects (not arrays), compare each key and value\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n\n // check if both have the same number of keys\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n // sort keys to ensure order doesn't affect the comparison\n keys1.sort((a, b) => a.localeCompare(b, 'en'));\n keys2.sort((a, b) => a.localeCompare(b, 'en'));\n\n // check if both objects have the same keys in the same order\n for (let i = 0; i < keys1.length; i++) {\n if (keys1[i] !== keys2[i]) {\n return false;\n }\n }\n\n // check each key value pair recursively\n for (const key of keys1) {\n if (!isDeepEqual((obj1 as unknown)[key], (obj2 as unknown)[key])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Returns concatanation of baseUrl and parameters object separated by the defined joinChar\n * @param baseUrl\n * @param parameters\n * @param joinChar\n * @return string\n */\nexport function buildUrl(baseUrl = '', parameters: object, joinChar = '&'): string {\n let urlParamSeparator = '';\n if (!isBlank(baseUrl)) {\n if (baseUrl.indexOf('?') === -1) {\n urlParamSeparator = '?';\n } else {\n urlParamSeparator = joinChar;\n }\n }\n return (\n baseUrl +\n urlParamSeparator +\n Object.keys(parameters)\n .map((key) => `${key}=${String(parameters[key])}`)\n .join(joinChar)\n );\n}\n\n/**\n * Transforms an object's values returning an object with the same keys as the original one.\n * @param {IN} o the object to map\n * @param {(obj: T, key: K) => MAPPED} mapper the transformer function for a single value\n * @return {OUT} the transformed object\n */\nexport const mapValues = <\n IN extends object,\n K extends keyof IN,\n T extends IN[K],\n MAPPED,\n OUT extends { [k in keyof IN]: MAPPED },\n>(\n o: IN,\n mapper: (obj: T, key: K) => MAPPED\n): OUT =>\n (Object.keys(o) as K[]).reduce((acc: OUT, cur: K) => {\n acc[cur] = mapper(o[cur] as T, cur) as OUT[K];\n return acc;\n }, {} as OUT);\n\n/**\n * Combines objects array values as one. Usable for objects that contain arrays mapped by id field (e.g. {[id: string]: T[]} ).\n * @param tsArray\n * @returns Combined array. Never undefined.\n */\nexport const combine = (tsArray: { [id: string]: T[] } = {}): T[] =>\n valuesOf(tsArray).reduce((reduced: T[], current: T[]) => [...reduced, ...current], []);\n\nexport const AVAILABLE_TAILS: string[] = [\n '3k',\n '9w',\n 'a3',\n 'aa',\n 'ab',\n 'af',\n 'ai',\n 'as',\n 'ay',\n 'az',\n 'b6',\n 'ba',\n 'br',\n 'bus',\n 'ca',\n 'cx',\n 'cz',\n 'ci',\n 'dx',\n 'ei',\n 'fi',\n 'fj',\n 'ga',\n 'hu',\n 'hx',\n 'ib',\n 'ig',\n 'jl',\n 'jj',\n 'jp',\n 'jq',\n 'ju',\n 'ka',\n 'ke',\n 'kl',\n 'km',\n 'la',\n 'lg',\n 'lo',\n 'mh',\n 'mi',\n 'mu',\n 'n7',\n 'nt',\n 'ok',\n 'ou',\n 'oz',\n 'pg',\n 'pr',\n 'ps',\n 'qf',\n 'qr',\n 'r6',\n 'rj',\n 's7',\n 'sb',\n 'sq',\n 'su',\n 'tf',\n 'tp',\n 'ul',\n 'uk',\n 'v3',\n 'vn',\n 'wf',\n 'xl',\n 'ax',\n 'yx',\n 'mq',\n 'oh',\n 'oo',\n 'pt',\n 'cp',\n 'yv',\n 'fv',\n 'a5',\n 'wx',\n 'wh',\n 'fb',\n 't3',\n 'tk',\n 'tn',\n 'lv',\n 'pv',\n 'zt',\n 'lm',\n 'cj',\n 'az',\n 'pm',\n 'i2',\n 'xm',\n '4m',\n '5m',\n 'lu',\n 're',\n 'qx',\n 'yw',\n 'lx',\n 'lh',\n 'sk',\n 'bt',\n 'os',\n 'sn',\n 'tg',\n 'nz',\n 'ek',\n 'f7',\n 'ho',\n 'wy',\n 'et',\n 'sv',\n 'at',\n '6i',\n 'gl',\n 'trn',\n];\n\nconst ALL_AIRLINES = [\n {\n code: 'AS',\n name: 'Alaska Airlines',\n isFFMember: true,\n isPartner: false,\n },\n {\n code: 'AA',\n name: 'American Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'TF',\n name: 'Braathens Regional Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'BA',\n name: 'British Airways',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'CX',\n name: 'Cathay Pacific',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'AY',\n name: 'Finnair',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'IB',\n name: 'Iberia',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'JL',\n name: 'Japan Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'HO',\n name: 'Juneyao Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'MH',\n name: 'Malaysian Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'QF',\n name: 'Qantas Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'QR',\n name: 'Qatar Airways',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'AT',\n name: 'Royal Air Maroc',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'RJ',\n name: 'Royal Jordanian',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'S7',\n name: 'S7 Airlines',\n isFFMember: true,\n isPartner: true,\n },\n {\n code: 'UL',\n name: 'Srilankan Airways',\n isFFMember: true,\n isPartner: true,\n },\n];\n\nexport const PARTNER_AIRLINES: Airline[] = ALL_AIRLINES.filter((airline) => airline.isPartner).map((airline) => {\n return {\n code: airline.code,\n name: `${airline.name} (${airline.code})`,\n };\n});\n\nexport const EXTENDED_PARTNER_AIRLINES: Airline[] = [\n { code: 'AS', name: 'Alaska Airlines (AS)' },\n { code: 'FJ', name: 'Fiji Airways (FJ)' },\n];\n\nexport const FREQUENT_FLIER_AIRLINES: Airline[] = ALL_AIRLINES.filter((airline) => airline.isFFMember).map(\n (airline) => {\n return {\n code: airline.code,\n name: airline.name,\n };\n }\n);\n\nexport const getAirlineNameByCode = (operatingAirlineCode: string): string => {\n return ALL_AIRLINES.find((airline) => airline.code === operatingAirlineCode)?.name || operatingAirlineCode;\n};\n\nexport const getPartnerAirlines = (): SelectOption[] =>\n [...PARTNER_AIRLINES, ...EXTENDED_PARTNER_AIRLINES]\n .map((airline: Airline): SelectOption => ({ name: airline.name, value: airline.code }))\n .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));\n\nexport const resolveTailName = (operatingAirlineCode: string): string | undefined => {\n if (isPresent(operatingAirlineCode)) {\n const code: string = operatingAirlineCode.toLowerCase();\n if (AVAILABLE_TAILS.indexOf(code) !== -1) {\n return `tail_${code}`;\n }\n }\n return undefined;\n};\n\nexport const resolveTailNames = (operatingAirlineCodes: string[]): string[] => {\n return operatingAirlineCodes\n ? operatingAirlineCodes.map((code: string) => resolveTailName(code) ?? '').filter(Boolean)\n : [];\n};\n\nexport const resolveUniqueTailNames = (operatingAirlineCodes: string[]): string[] => {\n return resolveTailNames(operatingAirlineCodes).filter(unique);\n};\n\nexport const EMAIL_PATTERN =\n '^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-\\\\+]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$';\nexport const EMAIL_REGEX =\n '^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-\\\\+]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9-]+)*(\\\\.[A-Za-z]{2,})$';\n\nexport const PHONE_PATTERN = '^[1-9]{1}[0-9]{0,14}';\nexport const PHONE_PREFIX_PATTERN = /^[A-Za-z]{2}\\|[0-9+]{1,5}/;\nexport const NAME_PATTERN = /^ {0}[a-z\\-\\sšœžÿ£¥ª¯³¹¿àáâãäåæçėèéêëìíîïñòóôõöøßùúûüýðþ'`´]{2,}$/i;\nexport const APIS_NAME_PATTERN = /^[a-z][a-z ]{0,38}$/i;\nexport const APIS_PASSPORT_NUMBER_PATTERN = /^[A-Za-z0-9]{2,12}$/; // Length 12 to support corner cases but 9 should be enough normally\n// eslint-disable-next-line no-useless-escape\nexport const APIS_ENTRY_DOCUMENT_NUMBER_PATTERN = /^[A-Za-z0-9\\-\\/\\s]{2,20}$/; // Extra chars and length 20 to support corner cases but 9 should be enough normally\nexport const LATIN_ADDRESS_PATTERN = /^[a-zàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçšž∂ð 0-9,.()/'-]+$/i;\nexport const LATIN_ALPHA_PATTERN = /^[a-zàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçšž∂ð ]+$/i;\nexport const TRUE_PATTERN = 'true';\nexport const WORLDTRACER_PATTERN = /^[A-z\\d]{10}$/;\nexport const PNR_PATTERN = /^[A-z2-9]{6}$/;\nexport const PNR_PATTERN_WITH_TRAILING_WHITESPACE = /^[A-z2-9]{6}\\s*$/;\nexport const ETICKET_PATTERN = /^[0-9]{13}$/;\nexport const ADDRESS_PATTERN = /^[a-zA-Z0-9 ]*$/;\nexport const ZIP_CODE_PATTERN = /^[a-zA-Z0-9 ]*$/;\nexport const CITY_PATTERN = /^[a-zA-Z -]*$/;\nexport const STATE_PATTERN = /^[a-zA-Z0-9 -]{1,35}$/;\nexport const DISCOUNT_CODE_PATTERN = /^[A-Z0-9\\-_]{2,15}$/;\nexport const GIFT_CARD_PATTERN = /^\\d{16}$/;\nexport const GIFT_CARD_ID_PATTERN = /^(?:\\d\\s?){16}$/;\nexport const GIFT_CARD_PIN_PATTERN = /^\\d{4}$/;\nexport const PASSWORD_PATTERN = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.* )(?=.*[^a-zA-Z0-9]).{8,32}$/;\nexport const CORPORATE_USERNAME_PATTERN = /^[a-zA-Z0-9]{7}[0-9]$/;\n\nexport const rangeFrom = (startWith: number, length: number): number[] =>\n Array.from({ length }).map((_v, idx) => idx + startWith);\n\nexport const rangeBetween = (startInclusive: number, endInclusive: number): number[] =>\n Array.from({ length: endInclusive - startInclusive + 1 }).map((_v, idx) => idx + startInclusive);\n\nexport const restrictToMinMax = (value: number, min: number, max: number): number => {\n if (max < min) {\n throw new Error(`max ${max} should be greater or equal to min ${min}`);\n }\n if (value > max) {\n return max;\n } else if (value < min) {\n return min;\n }\n return value;\n};\n\n/**\n * Logs given object and returns it\n * @param obj object to be logged and chained\n * @param message optional message\n * @returns {T} first parameter\n */\nexport const log = (obj: T, message?: string): T => {\n if (message) {\n console.log(message, obj);\n } else {\n console.log(obj);\n }\n return obj;\n};\n\n/**\n * Get the value given by `mapperFn` null-safely from the object `obj`.\n */\nexport function safeMap(obj: A, map1: (o: A) => B): B;\nexport function safeMap(obj: A, map1: (o: A) => B, map2: (o: B) => C): C;\nexport function safeMap(obj: A, map1: (o: A) => B, map2: (o: B) => C, map3: (o: C) => D): D;\nexport function safeMap(\n obj: A,\n map1: (o: A) => B,\n map2: (o: B) => C,\n map3: (o: C) => D,\n map4: (o: D) => E\n): E;\n\n// @ts-ignore\nexport function safeMap(obj: A, ...mapperFns: Function[]): B {\n return mapperFns.reduce((acc: unknown, cur: Function) => {\n return acc ? cur(acc) : undefined;\n }, obj);\n}\n\n/**\n * Type-safe utility for creating curried version of safeMap.\n * Useful in, e.g., selectors.\n */\nexport function safeMapFrom(map1: (o: A) => B): (o: A) => B;\nexport function safeMapFrom(map1: (o: A) => B, map2: (o: B) => C): (o: A) => C;\nexport function safeMapFrom(map1: (o: A) => B, map2: (o: B) => C, map3: (o: C) => D): (o: A) => D;\nexport function safeMapFrom(\n map1: (o: A) => B,\n map2: (o: B) => C,\n map3: (o: C) => D,\n map4: (o: D) => E\n): (o: A) => E;\nexport function safeMapFrom(...mapperFns: Function[]) {\n return (o: unknown): unknown => mapperFns.reduce((acc: unknown, cur: Function) => safeMap(acc, (a) => cur(a)), o);\n}\n\n// using String.prototype.match, the id is available in match[2]\nexport const YOUTUBE_ID_PATTERN = /^.*(youtu.be\\/|v\\/|vi\\/|e\\/|u\\/\\w+\\/|embed\\/|v=|vi=)([^#&?]*).*/;\nexport const YOUTUBE_URL_PATTERN = /\\/\\/(www\\.)?(youtube\\.com|youtu\\.be|youtube-nocookie\\.com)/;\n\nexport const youtubeIdFromUrl = (url: string): string | null => {\n const matches = url.match(YOUTUBE_ID_PATTERN);\n const isYoutube = url.match(YOUTUBE_URL_PATTERN);\n return isYoutube && matches ? matches[2] : null;\n};\n\nexport const capitalizeWord = (txt: string): string => txt && txt[0].toUpperCase() + txt.slice(1);\n\n/**\n * Convert StRiNGs to Capitalized Form.\n */\nexport const capitalize = (txt: string): string => txt?.toLowerCase()?.replace(/\\b\\S+\\b/g, capitalizeWord);\n\n// Finnair Plus cards always 9 digits and always and starts with 6\n// allow to start with AY and to use space or - delimeter\nconst FINNAIR_CARD_FORMAT = /^(AY[ -]?)?[6-9][0-9]{2}[ -]?[0-9]{3}[ -]?[0-9]{3}$/;\nconst luhnTimesTable = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9];\n\n/**\n * Validates the Finnair Plus Card number format\n *\n * @param cardNumber the Finnair Plus card number\n * @return True if valid, false if not valid\n */\nexport const isFinnairPlusCardNumber = (cardNumber: string): boolean => {\n if (!FINNAIR_CARD_FORMAT.test(cardNumber)) {\n return false;\n }\n\n const trimmedCardNumber: string = cardNumber.replace(/\\D/g, '');\n\n let length: number = trimmedCardNumber.length;\n let even = true;\n let sum = 0;\n let value: number;\n\n while (length > 0) {\n length--;\n value = parseInt(trimmedCardNumber.charAt(length), 10);\n sum += (even = !even) ? luhnTimesTable[value] : value; // eslint-disable-line\n }\n\n return sum % 10 === 0;\n};\n\nexport const formatFinnairPlusCardNumber = (cardNumber: string): string => {\n return cardNumber ? cardNumber.trim().toUpperCase() : '';\n};\n\nexport const isNonFinnairPlusCardNumber = (cardNumber: string): boolean => {\n const regex = /^[a-zA-Z0-9-:]{2,20}$/;\n return regex.test(cardNumber);\n};\n\nexport const isFrequentFlyerNumber = (airline: string, cardNumber: string): boolean => {\n if (airline === 'AY') {\n return isFinnairPlusCardNumber(cardNumber);\n }\n return isNonFinnairPlusCardNumber(cardNumber);\n};\n\n/**\n * Validates if flight is operated by finnair or norra, or is wet leased (\"British Airways for Finnair\")\n * @param operatingAirlineName\n * @param operatingAirlineCode\n * @returns {boolean}\n */\nexport const isFinnairNorraOrWetLease = (operatingAirlineName: string, operatingAirlineCode: string): boolean => {\n return (\n (isPresent(operatingAirlineName) && operatingAirlineName.toLocaleLowerCase().includes('for finnair')) ||\n ['AY', 'N7'].includes(operatingAirlineCode)\n );\n};\n\n/**\n * Validates PNR code\n * @param value\n * @returns {boolean}\n */\nexport const isPNRCode = (value: string): boolean => {\n return /^[A-Z0-9]{5,6}$/.test(value);\n};\n\n/**\n * Validates Amadeus PNR code\n * @param value\n * @returns {boolean}\n */\nexport const isAmadeusPNRCode = (value: string): boolean => {\n return /^[A-Z0-9]{6}$/.test(value);\n};\n\nconst regExp = (className: string): RegExp => new RegExp(`(^| )${className}( |$)`, 'g');\nconst getClassesFor = (element: Element): string => element.getAttribute('class') || '';\nexport const addClass = (element: Element, ...classNames: string[]): void => {\n element.classList\n ? element.classList.add(...classNames)\n : classNames\n .filter((className: string) => !containsClass(element, className))\n .forEach((className: string) =>\n element.setAttribute(\n 'class',\n getClassesFor(element).length > 0 ? `${getClassesFor(element)} ${className}` : className\n )\n );\n};\nexport const removeClass = (element: Element, ...classNames: string[]): void => {\n element.classList\n ? element.classList.remove(...classNames)\n : classNames.forEach((className: string) =>\n element.setAttribute('class', getClassesFor(element).replace(regExp(className), ' ').replace(/ +/g, ' ').trim())\n );\n};\nexport const containsClass = (element: Element, className: string): boolean => {\n return regExp(className).test(element.getAttribute('class') ?? '');\n};\n\nexport const isVisible = (element: HTMLElement): boolean => {\n return typeof jest !== 'undefined'\n ? true\n : !containsClass(element, 'is-hidden') &&\n !containsClass(element, 'is-vishidden') &&\n !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length);\n};\n\nexport const hyphenate = (camelCaseString: string): string =>\n camelCaseString?.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Returns a hash code for a string\n * @param {string} str\n * @return {string}\n */\nexport function stringHashCode(str: string): number {\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n const chr = str.charCodeAt(i);\n /* eslint-disable no-bitwise */\n hash = (hash << 5) - hash + chr;\n hash |= 0;\n /* eslint-enable no-bitwise */\n }\n return hash;\n}\n\nexport function deepCopy(obj: T): T {\n let copy: T;\n // Handle the 3 simple types, and null or undefined\n if (null === obj || 'object' !== typeof obj) {\n return obj;\n }\n // Handle Date\n if (obj instanceof Date) {\n // @ts-ignore\n copy = new Date();\n // @ts-ignore\n copy.setTime(obj.getTime());\n return copy;\n }\n // Handle Array\n if (obj instanceof Array) {\n // @ts-ignore\n copy = [];\n for (let i = 0, len = obj.length; i < len; i++) {\n // @ts-ignore\n copy[i] = deepCopy(obj[i]);\n }\n return copy;\n }\n // Handle Object\n if (obj instanceof Object) {\n // @ts-ignore\n copy = {};\n for (const attr in obj) {\n /* eslint-disable no-prototype-builtins */\n // @ts-ignore\n if (obj.hasOwnProperty(attr)) {\n // @ts-ignore\n copy[attr] = deepCopy(obj[attr]);\n }\n /* eslint-enable no-prototype-builtins */\n }\n return copy;\n }\n // eslint-disable-next-line quotes\n throw new Error(\"Unable to copy obj! Its type isn't supported.\");\n}\n\n/**\n * Validate IBAN as described here https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN\n * This validator doesn't do country specific length checking\n * @param str\n */\nexport const isValidIBAN = (str: string): boolean => {\n // Move the four initial characters to the end of the string\n const reordered = str.substring(4) + str.substring(0, 4);\n // Replace each letter in the string with two digits, thereby expanding the string, where A = 10, B = 11, ..., Z = 35\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n const replaced = reordered\n .split('')\n .map((char) => (alphabet.indexOf(char) !== -1 ? alphabet.indexOf(char) + 10 : char))\n .join('');\n // Interpret the string as an integer and compute the remainder of that number on division by 97\n return pieceWiseModulo(replaced, 97) === 1;\n};\n\n// Calculates modulo for string representations of big integers\nconst pieceWiseModulo = (num: string, divider: number): number =>\n +(num.match(/.{1,7}/g)?.reduce((prev: string, curr: string) => `${+(prev + curr) % divider}`, '') ?? '');\n\nexport const findScrollContainer = (element: HTMLElement): HTMLElement | null => {\n let currentElement = element.parentElement;\n while (currentElement && !currentElement.classList.contains(SCROLL_CONTAINER)) {\n currentElement = currentElement.parentElement;\n }\n\n return currentElement;\n};\n\nexport const serializeParams = (params: { [key: string]: string }): string => {\n return entrySet(params)\n .map(({ key, value }) => `${key}=${encodeURIComponent(value)}`)\n .join('&');\n};\n\nexport const isFinnairCustomerNumber = (value: string): boolean => {\n // Regex is from the old site\n return (\n value.length === 8 &&\n /^[a-zA-Z][1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]+[a-zA-Z]$/.test(value)\n );\n};\n\n/**\n * Returns a new object with the specified key removed.\n * @param {T} obj - The object to remove the key from.\n * @param {K} key - The key to remove from the object.\n * @returns A new object with the specified key removed.\n */\nexport const omitProperty = (obj: T, key: K): Omit => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [key]: _, ...rest } = obj;\n return rest;\n};\n\nexport const groupBy = (list: T[], getKey: (item: T) => K): Record =>\n list?.reduce(\n (previous, currentItem) => {\n const group = getKey(currentItem);\n if (!previous[group]) {\n previous[group] = [];\n }\n previous[group].push(currentItem);\n return previous;\n },\n {} as Record\n ) ?? ({} as Record);\n\nexport const toLookup = (arr: T[], getKey: (t: T) => K): Record => {\n if (!arr || !getKey) {\n return {} as Record;\n }\n return (\n getKey &&\n arr?.reduce(\n (lookup, item) => {\n const objKey = getKey(item);\n lookup[objKey] = item;\n return lookup;\n },\n {} as Record\n )\n );\n};\n\nexport function passengersNotCheckedInExist(\n flightTravelerEligibility: FinnairCheckInEligibility['flightTravelerEligibility']\n): boolean {\n return Object.values(flightTravelerEligibility ?? {}).some((eligibility) =>\n eligibility.some((e) => e.isAllowedToUseCheckIn && !e.isCheckedIn)\n );\n}\n","import {\n Directive,\n ElementRef,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n Inject,\n PLATFORM_ID,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { Router } from '@angular/router';\n\nimport { Observable, Subscription, fromEvent } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { unsubscribe, urlToPathname, symbolToLangPath } from '@fcom/core/utils';\n\n@Directive({\n selector: '[finLink]',\n})\nexport class LinkDirective implements OnChanges, OnInit, OnDestroy {\n @Input()\n finLink: Observable | string;\n @Input()\n external = false;\n @Input()\n openInNewTab = false;\n @Input()\n nofollow = false;\n\n @Output()\n afterNavigation: EventEmitter = new EventEmitter();\n @Output()\n beforeNavigation: EventEmitter = new EventEmitter();\n\n @HostBinding()\n href: string;\n\n private linkVal: string;\n private clicks: Subscription;\n private subscription: Subscription;\n\n constructor(\n private elementRef: ElementRef,\n private router: Router,\n private languageService: LanguageService,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n this.clicks = fromEvent(this.elementRef.nativeElement, 'click').subscribe((ev: KeyboardEvent) =>\n this.handleClick(ev)\n );\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['finLink']) {\n this.subscribeToLink(changes['finLink'].currentValue);\n }\n }\n\n legacySiteLinkLocale(url = ''): string {\n if (!url) {\n return url;\n }\n const ddsLocale = this.languageService.ddsLocaleValue;\n return symbolToLangPath(url, ddsLocale);\n }\n\n subscribeToLink(link: Observable | string): void {\n this.subscription = unsubscribe(this.subscription);\n if (link instanceof Observable) {\n this.subscription = link\n .pipe(map((d) => this.legacySiteLinkLocale(d)))\n .subscribe((link) => this.setLinkValue(link));\n } else {\n this.setLinkValue(this.legacySiteLinkLocale(link));\n }\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n this.clicks = unsubscribe(this.clicks);\n }\n\n handleClick(event: KeyboardEvent): void {\n this.beforeNavigation.emit(event);\n if (!(event.ctrlKey || event.metaKey) && !this.external && !event.defaultPrevented) {\n event.stopPropagation();\n event.preventDefault();\n if (this.linkVal) {\n this.router.navigateByUrl(this.linkVal);\n this.afterNavigation.emit(event);\n }\n }\n // Cmd/Ctrl + click, opens in new tab on most browsers, do nothing\n }\n\n private setLinkValue = (link: string) => {\n const l = this.toActualLink(link);\n this.linkVal = l;\n this.href = l;\n if (this.openInNewTab) {\n this.elementRef.nativeElement.target = '_blank';\n // Target _blank handles this in new browsers but for backward compatibility we set this too still\n this.elementRef.nativeElement.rel = 'noopener';\n if (this.nofollow) {\n this.elementRef.nativeElement.rel = 'noopener nofollow';\n }\n }\n\n if (!this.openInNewTab && this.nofollow) {\n this.elementRef.nativeElement.rel = 'nofollow';\n }\n };\n\n private toActualLink = (l: string): string => (this.external ? l : urlToPathname(l, { preserveQueryParams: true }));\n}\n","import { FinnairFrequentFlyerCardItem } from '@fcom/dapi/api/models';\nimport { capitalize, FREQUENT_FLIER_AIRLINES } from '@fcom/core/utils';\nimport { Airline } from '@fcom/common/interfaces/airlines';\n\nimport { getCMSTier } from './service.utils';\n\nexport const getFrequentFlyerLabelForNonAyCard = (card: FinnairFrequentFlyerCardItem): string | undefined => {\n if (card.companyCode !== Airline.FINNAIR) {\n const companyCode = card.companyCode.toLowerCase();\n const companyBaseLabel = 'purchase.review.frequentFlyer';\n if (FREQUENT_FLIER_AIRLINES.some(({ code }) => code.toLowerCase() === companyCode)) {\n return `${companyBaseLabel}.${companyCode}`;\n }\n return `${companyBaseLabel}.default`;\n }\n};\n\nexport const getTierName = (frequentFlyerCard: FinnairFrequentFlyerCardItem): string => {\n return capitalize(getCMSTier(frequentFlyerCard.tierLevel ?? '')?.toLowerCase() ?? '');\n};\n\nconst ONEWORLD_TIERS = {\n EMER: 'Emerald',\n SAPP: 'Sapphire',\n RUBY: 'Ruby',\n};\n\nexport const getOneWorldTierName = (frequentFlyerCard: FinnairFrequentFlyerCardItem): string => {\n return ONEWORLD_TIERS[frequentFlyerCard.allianceTierLevel] ?? '';\n};\n","\n \n
\n
\n \n

\n {{ article.title || article.teaserTitle }}\n

\n
\n \n
\n\n
\n \n
\n \n \n \n \n \n \n \n\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, NEVER, Observable, Subscription } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils/index';\nimport { CmsArticle, CmsImageData, CmsTarget } from '@fcom/core-api';\nimport { AspectRatioString } from '@fcom/common/interfaces/images.interface';\nimport { WindowRef } from '@fcom/core/providers';\n\nimport { ButtonTheme } from '../buttons';\nimport { PromoTheme } from './enum';\n\n@Component({\n selector: 'fcom-promo-card',\n templateUrl: './promo-card.component.html',\n styleUrls: ['./promo-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PromoCardComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly IconLibrary = IconLibrary;\n readonly PromoTheme = PromoTheme;\n\n @Input()\n theme: PromoTheme = PromoTheme.WHITE;\n\n @Input()\n data$: Observable = NEVER;\n\n @Input()\n imageData$: Observable = NEVER;\n\n @Input()\n ctaData$: Observable = NEVER;\n\n @Input()\n @HostBinding('class.special-grid-size-for-laptop')\n specialGridSizeForLaptop = false;\n\n @Input()\n aspectRatio: AspectRatioString = '21x9';\n\n @Input()\n isTextOnTop = false;\n\n @Input()\n fullWidth = false;\n\n @HostBinding('class.double') isDouble = false;\n\n @HostBinding('class.full-width') isFullWidth = false;\n\n ctaTrigger$: BehaviorSubject = new BehaviorSubject(false);\n\n private subscriptions: Subscription = new Subscription();\n\n constructor(\n private router: Router,\n private cdRef: ChangeDetectorRef,\n private windowRef: WindowRef\n ) {}\n\n ngOnInit(): void {\n this.subscriptions.add(\n combineLatest([this.data$, this.imageData$]).subscribe(() => {\n this.isDouble = true;\n this.isFullWidth = this.fullWidth;\n this.cdRef.markForCheck();\n })\n );\n this.subscriptions.add(\n combineLatest([this.ctaData$, this.ctaTrigger$.pipe(filter(Boolean))])\n .pipe(map(([cta, _]) => cta))\n .subscribe((cta) => this.navigateToUrl(cta))\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n navigateToUrl(cta: CmsTarget): void {\n if (cta?.url && !cta?.openInNewTab) {\n this.router.navigateByUrl(cta?.url);\n } else if (cta?.url && cta?.openInNewTab) {\n this.windowRef.nativeWindow.open(cta?.url, '_blank');\n }\n }\n}\n","
0\" class=\"grey-25-bg\" data-elastic-exclude>\n
\n \n
\n
\n {{ copyrightBanner$ | finMap: 'copyright' | async }} {{ year }}. \n {{\n copyrightBanner$ | finMap: 'legalDisclaimer' | async\n }}\n
\n \n
\n
\n
\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { CustomIcon, IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTaxonomyGeneral } from '@fcom/core-api';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { ElementTypes } from '../../interfaces';\nimport { NavigationMenuService } from '../../services';\n\nexport const LEGAL_DISCLAIMER_EXCLUDE_COUNTRIES = ['CN', 'AU', 'IL', 'IN', 'CH'];\n\n@Component({\n selector: 'fin-footer',\n styleUrls: ['./footer.component.scss'],\n templateUrl: './footer.component.html',\n})\nexport class FooterComponent implements OnInit {\n @Input()\n content$: Observable;\n\n readonly isVisible$: Observable;\n readonly CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n readonly CustomIcon = CustomIcon;\n readonly IconLibrary = IconLibrary;\n\n copyrightBanner$: Observable;\n showDisclaimer$ = of(true);\n year: number = new Date().getFullYear();\n readonly menuItems$: Observable;\n public readonly ElementTypes = ElementTypes;\n\n constructor(\n private languageService: LanguageService,\n public navigationMenuService: NavigationMenuService\n ) {\n this.menuItems$ = this.navigationMenuService.menuItems$.pipe(map((data) => data.bottom));\n this.isVisible$ = this.navigationMenuService.isFooterVisible$;\n }\n\n ngOnInit(): void {\n this.copyrightBanner$ = this.languageService.translate('copyrightBanner');\n this.showDisclaimer$ = this.languageService.countryCode.pipe(\n map((countryCode) => {\n return !LEGAL_DISCLAIMER_EXCLUDE_COUNTRIES.includes(countryCode);\n })\n );\n }\n}\n","import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","import { Injectable } from '@angular/core';\n\nimport { merge, Observable, Subject } from 'rxjs';\n\nimport { BreadcrumbItem } from '../../interfaces';\n\n@Injectable()\nexport class BreadcrumbService {\n public breadcrumb$: Observable;\n private breadcrumbItemsNormal$: Subject = new Subject(); // Populated from navigationPathList in CMS payload\n private breadcrumbItemsOverride$: Subject = new Subject(); // Populated by setBreadcrumb\n\n constructor() {\n this.constructBreadcrumbItemsNormal$();\n this.constructBreadcrumbItemsOverride$();\n this.constructBreadcrumbItems$();\n }\n\n public setBreadcrumbNormal(breadcrumbItems: BreadcrumbItem[]) {\n this.breadcrumbItemsNormal$.next(breadcrumbItems);\n }\n\n public setBreadcrumb(breadcrumbItems: BreadcrumbItem[]) {\n this.breadcrumbItemsOverride$.next(breadcrumbItems);\n }\n\n private constructBreadcrumbItems$() {\n this.breadcrumb$ = merge(this.breadcrumbItemsNormal$, this.breadcrumbItemsOverride$);\n }\n\n private constructBreadcrumbItemsNormal$() {\n this.breadcrumbItemsNormal$ = new Subject();\n }\n\n private constructBreadcrumbItemsOverride$() {\n this.breadcrumbItemsOverride$ = new Subject();\n }\n}\n","
\n \n \n 1\"\n >\n \n
  • \n \n
  • \n
    \n \n
    \n\n \n
    \n \n {{ 'booking.newFareFamilyLabel' | finLocalization }}\n
    \n {{ item.value }}\n
    \n \n\n \n \n \n {{ item?.label }}\n \n
    \n {{ item?.value }}\n
    \n \n \n \n
    \n {{ child.label }}\n
    \n
    \n {{ child.value }}\n
    \n \n
    \n
    \n\n \n \n\n
    \n
    \n \n \n {{ 'bookingSearch.boundSelection.ticketTypeBusNotification' | finLocalization }}\n \n \n
    \n

    \n {{ 'bookingSearch.boundSelection.informationAboutBenefits' | finLocalization }}\n

    \n \n
    \n
    \n \n
    \n \n
    \n
    \n\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n QueryList,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, EMPTY, Observable, Subscription } from 'rxjs';\nimport { filter, map, tap } from 'rxjs/operators';\n\nimport { TagTheme } from '@fcom/ui-components/components/tag';\nimport { ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { NotificationTheme } from '@fcom/ui-components';\nimport { FareFamily } from '@fcom/dapi/api/models/fare-family';\nimport {\n ClassOptions,\n HeaderItem,\n RowDataItem,\n TableComponent,\n} from '@fcom/ui-components/components/table/table.component';\nimport { FinnairCabinClass, TranslatedBenefitRow } from '@fcom/dapi/api/models';\nimport { unique, unsubscribe } from '@fcom/core/utils';\nimport { LocalizationPipe } from '@fcom/ui-translate';\nimport { ScrollHandleContainerComponent } from '@fcom/common/components/scroll-handle-container/scroll-handle-container.component';\nimport { effectiveCabinClass } from '@fcom/booking/modules/ticket-selection/utils/offer.utils';\nimport { ConfigService } from '@fcom/core/index';\nimport { TripType } from '@fcom/core/interfaces';\n\nimport { DimensionsAndDetails, ExtendedFareFamily } from '../../../interfaces';\nimport { isByBusOnly } from '../../../utils/common-booking.utils';\n\nenum DimensionsValues {\n SMALL = 'booking.baggageDimensions.smallBag',\n MEDIUM = 'booking.baggageDimensions.mediumBag',\n LARGE = 'booking.baggageDimensions.largeBag',\n}\n\ninterface TranslatedBenefitRowWithOptions extends TranslatedBenefitRow {\n options?: {\n class?: ClassOptions;\n };\n}\n\ninterface Benefit extends TranslatedBenefitRow {\n children?: TranslatedBenefitRowWithOptions[];\n}\n\nenum CheckedBaggage {\n WEIGHT_PLURAL = 'checkedBaggageWithAmountAndWeightPlural',\n WEIGHT_SINGULAR = 'checkedBaggageWithAmountAndWeightSingular',\n WITH_WEIGHT = 'checkedBaggageWithWeight',\n}\n\n@Component({\n selector: 'fin-fare-family-details-v2',\n templateUrl: './fare-family-details-v2.component.html',\n styleUrls: ['./fare-family-details-v2.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FareFamilyDetailsV2Component implements AfterViewInit, OnDestroy, OnInit {\n readonly ElementTypes = ElementTypes;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagTheme = TagTheme;\n\n readonly TRACKING_CONTEXT = GaContext.FLIGHT_SELECTION;\n\n @Input()\n dimensionsAndDetails$: Observable;\n\n @Input()\n showKoreaNotification: boolean;\n\n @Input()\n splitByClasses = true;\n\n @Input()\n tripType$: Observable = EMPTY;\n\n @ViewChild('itemTemplate', { read: TemplateRef }) itemTemplate: TemplateRef;\n @ViewChild('headerTemplate', { read: TemplateRef }) headerTemplate: TemplateRef;\n @ViewChild('tableComponent', { static: false }) tableComponentElementRef!: TableComponent;\n @ViewChild('scrollContainer', { static: false }) scrollContainer: ScrollHandleContainerComponent;\n\n fareFamiliesBenefits: FareFamily[];\n headers: HeaderItem[];\n rowData: RowDataItem[];\n headersList: QueryList;\n\n subscription = new Subscription();\n activeCabinClass$: BehaviorSubject = new BehaviorSubject(FinnairCabinClass.ECONOMY);\n availableClasses$: Observable;\n hasBusLeg$: Observable;\n enableBenefitChanges: boolean;\n\n constructor(\n private localization: LocalizationPipe,\n private cd: ChangeDetectorRef,\n private configService: ConfigService\n ) {}\n\n ngOnInit(): void {\n const extendedFareFamilies$ = this.dimensionsAndDetails$.pipe(\n filter(Boolean),\n map(({ extendedFareFamilies }: DimensionsAndDetails) => extendedFareFamilies)\n );\n\n this.availableClasses$ = extendedFareFamilies$.pipe(\n map((extendedFareFamilies) =>\n this.splitByClasses\n ? extendedFareFamilies?.reduce((acc, item) => {\n const cabinClass = effectiveCabinClass(item);\n\n if (!acc.includes(cabinClass)) {\n acc.push(cabinClass);\n }\n return acc;\n }, [] as string[])\n : []\n )\n );\n\n this.hasBusLeg$ = this.dimensionsAndDetails$?.pipe(\n filter(Boolean),\n map(({ itineraries }) =>\n itineraries?.some((itineraries) => {\n return itineraries.some((itinerary) => isByBusOnly(itinerary));\n })\n )\n );\n\n this.subscription.add(\n this.dimensionsAndDetails$\n ?.pipe(\n filter(Boolean),\n tap(({ cabinClass }) => {\n this.activeCabinClass$.next(cabinClass);\n })\n )\n .subscribe()\n );\n\n this.subscription.add(\n combineLatest([extendedFareFamilies$, this.activeCabinClass$])\n .pipe(\n map(([fareFamilies, cabinClass]) => this.filterByCabinClass(fareFamilies, cabinClass)),\n map((fareFamilies: ExtendedFareFamily[]) => this.getBenefitsTableData(fareFamilies))\n )\n .subscribe(([headers, rowData]) => {\n this.headers = headers;\n this.rowData = rowData;\n\n if (this.scrollContainer) {\n this.scrollContainer.updateScrollHandles();\n }\n })\n );\n\n this.headersList = this.tableComponentElementRef?.tableHeaders;\n\n this.enableBenefitChanges = this.configService.cfg.enableTicketTypeCardChanges;\n }\n\n ngAfterViewInit(): void {\n this.headersList = this.tableComponentElementRef?.tableHeaders;\n this.cd.detectChanges();\n }\n\n selectCabinClass(cabinClass: string): void {\n this.activeCabinClass$.next(cabinClass);\n }\n\n private getBenefitsTableData(fareFamilies: ExtendedFareFamily[] = []): [HeaderItem[], RowDataItem[]] {\n const benefits = fareFamilies.map((item) => item.benefits);\n\n const headers = benefits.map((fareFamily, index) => {\n return {\n key: fareFamily.fareFamilyCode,\n value: fareFamily.brandName,\n options: {\n class: {\n 'border-right': true,\n 'border-left': index === 0,\n 'rounded-top-left-large': index === 0,\n 'rounded-top-right-large': benefits.length === index + 1,\n 'border-top': true,\n },\n isMarked: false,\n },\n };\n });\n\n const translatedBenefitRows = this.getSortedTranslatedBenefits(benefits);\n\n const rowData = translatedBenefitRows.map((benefit, benefitIndex) => {\n const item = {} as RowDataItem;\n benefits.forEach((fareFamily, index) => {\n const isLastRow = benefitIndex + 1 === benefits[0]?.translatedBenefitRows.length;\n\n const classOption: ClassOptions = {\n 'border-right': true,\n 'border-left': index === 0,\n 'rounded-bottom-left-large': isLastRow && index === 0,\n 'rounded-bottom-right-large': isLastRow && index + 1 === benefits.length,\n };\n\n let fareFamilyBenefit = fareFamily?.translatedBenefitRows.find(\n (b) => b.key === benefit.key || b.key.includes(benefit.key) || benefit.key.includes(b.key)\n );\n\n if (!fareFamilyBenefit && benefit.key === CheckedBaggage.WITH_WEIGHT) {\n fareFamilyBenefit = fareFamily?.translatedBenefitRows.find((b) =>\n [CheckedBaggage.WEIGHT_PLURAL, CheckedBaggage.WEIGHT_SINGULAR].includes(b.key as CheckedBaggage)\n );\n }\n\n if (\n !fareFamilyBenefit &&\n (benefit.key === CheckedBaggage.WEIGHT_PLURAL || benefit.key === CheckedBaggage.WEIGHT_SINGULAR)\n ) {\n fareFamilyBenefit = fareFamily?.translatedBenefitRows.find((b) =>\n [CheckedBaggage.WITH_WEIGHT].includes(b.key as CheckedBaggage)\n );\n }\n\n if (fareFamilyBenefit) {\n if (fareFamilyBenefit.key === 'cabinBaggageWithWeight') {\n const dimensionValuesMap = {\n smallBag: DimensionsValues.SMALL,\n cabinBagWithAmount: DimensionsValues.MEDIUM,\n };\n\n fareFamilyBenefit.children = (fareFamilyBenefit.children as TranslatedBenefitRowWithOptions[]).map(\n (child) => {\n child.value = this.localization.transform(dimensionValuesMap[child.key] || '') || child.value;\n return child;\n }\n );\n }\n\n if (fareFamilyBenefit.key.startsWith('checkedBaggage')) {\n if (!fareFamilyBenefit.label) {\n fareFamilyBenefit.label = benefit.label;\n }\n\n fareFamilyBenefit.value = fareFamilyBenefit.isPositive\n ? this.localization.transform(DimensionsValues.LARGE)\n : fareFamilyBenefit.value;\n }\n }\n\n item[fareFamily.fareFamilyCode as string] = {\n data: fareFamilyBenefit ? fareFamilyBenefit : { value: null, key: null },\n options: {\n class: { ...classOption },\n },\n };\n });\n\n return item;\n });\n\n return [headers, rowData];\n }\n\n private getSortedTranslatedBenefits(benefits: FareFamily[]): TranslatedBenefitRow[] {\n const translatedBenefitRows = this.getFullListOfBenefits(benefits);\n const orderedBenefits = this.getOrderForBenefits(benefits, translatedBenefitRows);\n\n return [...translatedBenefitRows].sort((a, b) => orderedBenefits.indexOf(a.key) - orderedBenefits.indexOf(b.key));\n }\n\n /**\n * Get list of benefits correctly ordered\n *\n * @param benefits\n * @param translatedBenefitRows\n * @private\n */\n private getOrderForBenefits(benefits: FareFamily[], translatedBenefitRows: TranslatedBenefitRow[]): string[] {\n const fareFamily = benefits[0];\n const fareFamilyKeys = translatedBenefitRows.map((b) => b.key);\n return fareFamily?.highlightedBenefitKeys\n ? [...fareFamily.highlightedBenefitKeys, ...fareFamilyKeys].filter(unique)\n : fareFamilyKeys;\n }\n\n /**\n * Get the translatedBenefitsRows with the maximum amount of translated keys.\n *\n * @param benefits\n * @private\n */\n private getFullListOfBenefits(benefits: FareFamily[]): TranslatedBenefitRow[] {\n return (\n benefits.reduce(\n (acc, curr) => {\n const rowCount = curr.translatedBenefitRows.length;\n\n if (rowCount > acc.count) {\n return { item: curr, count: rowCount };\n }\n\n return acc;\n },\n { item: null, count: 0 }\n ).item?.translatedBenefitRows || []\n );\n }\n\n private filterByCabinClass(fareFamilies, activeCabinClass): ExtendedFareFamily[] {\n return this.splitByClasses\n ? fareFamilies.filter((fareFamily) => effectiveCabinClass(fareFamily) === activeCabinClass)\n : fareFamilies;\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n}\n","
    \n
    \n
    \n \n
    \n \n
    \n
    \n\n
    \n
    \n {{ title }}\n \n \n \n {{ pair[0] }}\n \n {{ pair[1] }}\n , \n \n \n \n
    \n
    \n {{ departureDate }}{{ arrivalDate ? ' - ' + arrivalDate : '' }}\n
    \n
    \n {{\n (passengerAmount === 1 ? 'tripCard.passenger' : 'tripCard.passengers') | finLocalization: { passengerAmount }\n }}\n
    \n
    \n {{\n 'tripCard.bookingRef' | finLocalization: { bookingRef }\n }}\n {{\n 'tripCard.tripType.' + journeyType | finLocalization\n }}\n
    \n \n {{\n 'tripCard.operatingAirlineMessage'\n | finLocalization: { airlineName: operatingAirlineId.airlineName, airlineId: operatingAirlineId.id }\n }}\n \n \n
    \n \n {{ 'award.points' | finLocalization: { pointsAmount: totalPoints || 0 } }} +\n \n \n {{ flightTotalPriceAmount }}\n \n
    \n \n
    \n\n
    \n \n {{ (expanded ? 'tripCard.hideFlights' : 'tripCard.showFlights') | finLocalization }}\n \n \n \n
    \n
    \n
    \n\n
    \n \n
    \n \n
    \n
    \n
    \n\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { v4 as uuid } from 'uuid';\n\nimport { equals } from '@fcom/core/utils/equals';\nimport { getCurrentBreakPoint } from '@fcom/common/utils/layout.utils';\nimport { Breakpoint } from '@fcom/common/interfaces/breakpoint.interface';\nimport { FinnairOperatingAirlineId } from '@fcom/dapi/api/models';\nimport { BUS_CONNECTION_LOCATION_CODES, RAIL_AND_FLY_LOCATION_CODES } from '@fcom/core/constants';\nimport { LocationUtil } from '@fcom/dapi';\n\nimport { ResponsiveImage } from '../../images/interfaces';\nimport { AspectRatios } from '../../images';\nimport { JourneyType } from '../interface';\nimport { IconPosition } from '../../icons';\nimport { ButtonTheme } from '../../buttons';\n@Component({\n selector: 'fcom-trip-card',\n templateUrl: './trip-card.component.html',\n styleUrls: ['./trip-card.component.scss'],\n})\nexport class TripCardComponent implements OnChanges, OnDestroy {\n readonly JourneyType = JourneyType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly IconPosition = IconPosition;\n readonly ButtonTheme = ButtonTheme;\n /**\n * A string representing the title of the trip card\n */\n @Input()\n title: string;\n\n /**\n * An object containing the image of the next destination and the alt text to use for\n * accessibility.\n *\n * If an image isn't provided then a background of grey-200 will be used\n */\n @Input()\n image: { alt: string } & ResponsiveImage;\n\n /**\n * An array of cities to display in the trip card. You should pass every city at the start and\n * end of a bound. For example Stockholm to Hong Kong should show only these cities are not\n * include Helsinki.\n *\n * Note -There is special logic using this input\n * 1. The journey type (one way, return, complex) is calculated from this input.\n * 2. For return journeys the final destination is not shown.\n */\n @Input()\n destinations: LocationUtil[] = [];\n\n /**\n * The departure date of the trip.\n * @type {string}\n */\n @Input()\n departureDate: string;\n\n /**\n * The arrival date of the trip.\n * @type {string}\n */\n @Input()\n arrivalDate: string;\n\n /**\n * The number of passengers (including infants and children).\n */\n @Input()\n passengerAmount: number;\n\n /**\n * The booking reference / PNR / record locator for the booking.\n */\n @Input()\n bookingRef: string;\n\n /**\n * The total price amount for the flight.\n * @type {string}\n */\n @Input()\n flightTotalPriceAmount: string;\n\n /**\n * Total points for the flight\n * @type {string}\n */\n @Input()\n totalPoints: string;\n\n /**\n * A flag indicating whether the expanded area is opened or closed.\n * @type {boolean}\n */\n @Input()\n expanded = false;\n\n /**\n * A flag indicating whether the start over button should be shown.\n * @type {boolean}\n */\n @Input()\n showStartOverButton = false;\n\n /**\n * A flag indicating whether the expand button should be shown.\n * @type {boolean}\n */\n @Input()\n showExpandButton = true;\n\n @Input()\n operatingAirlineIds: FinnairOperatingAirlineId[] = [];\n\n /**\n * Emits when the CTA element has been clicked\n * @type {EventEmitter}\n */\n @Output()\n ctaClick: EventEmitter = new EventEmitter();\n\n /**\n * Emits a boolean value indicating whether the component is expanded or not\n * @type {EventEmitter}\n */\n @Output()\n expandedChange = new EventEmitter();\n\n journeyType: JourneyType;\n journeyIcon: SvgLibraryIcon;\n destinationPairs: string[][];\n expandContainerId = uuid();\n expandButtonId = uuid();\n ngDestroyed$ = new Subject();\n imageRatio$: BehaviorSubject = new BehaviorSubject('16x9');\n\n @ViewChild('notifications') notifications: ElementRef;\n\n constructor(private cd: ChangeDetectorRef) {}\n\n ngOnChanges(): void {\n this.inferAdditionalBookingInfo();\n this.cd.markForCheck();\n this.updateAspectRatio();\n }\n\n @HostListener('window:resize', ['$event'])\n onResize(): void {\n this.updateAspectRatio();\n }\n\n private updateAspectRatio() {\n const checkAspectForMobile = getCurrentBreakPoint() === Breakpoint.MOBILE && this.notifications;\n if (\n checkAspectForMobile &&\n this.notifications.nativeElement.clientHeight / 9 > this.notifications.nativeElement.clientWidth / 16\n ) {\n this.imageRatio$.next('1x1');\n } else {\n this.imageRatio$.next('16x9');\n }\n }\n\n ngOnDestroy(): void {\n this.ngDestroyed$.next(true);\n }\n\n /**\n * Infer additional information from the inputs provided to the component\n */\n inferAdditionalBookingInfo(): void {\n const pairs: string[][] = [];\n this.destinations.forEach((destination: LocationUtil, index: number) => {\n if (index % 2 === 1 || !this.destinations[index + 1]) {\n return;\n }\n pairs.push([destination?.name, this.destinations[index + 1]?.name]);\n });\n this.destinationPairs = pairs.reduce((acc: string[][], pair) => {\n // Filter out matching return flight pairs, e.g.\n // [['Helsinki', 'London'], ['London', 'Helsinki]] => [['Helsinki', 'London']]\n if (acc.some((search) => equals(search, [pair[1], pair[0]]))) {\n return acc;\n }\n acc.push(pair);\n return acc;\n }, []);\n\n if (this.destinationPairs.length > 1) {\n this.journeyType = JourneyType.COMPLEX;\n } else if (\n this.destinations.length > 2 &&\n this.destinations[0].name === this.destinations[this.destinations.length - 1].name\n ) {\n this.journeyType = JourneyType.RETURN;\n } else {\n this.journeyType = JourneyType.ONEWAY;\n }\n\n this.journeyIcon = this.getDestinationPairIcon();\n }\n\n toggleExpand(event: MouseEvent): void {\n // The show details link is inside another event handler and triggers twice. Stop this event\n // from propagating.\n event.stopPropagation();\n\n this.expanded = !this.expanded;\n this.expandedChange.emit(this.expanded);\n }\n\n clickCta(event: Event): void {\n this.ctaClick.emit();\n event.preventDefault();\n }\n\n trackByFn(index: number): number {\n return index;\n }\n\n getDestinationPairIcon(): SvgLibraryIcon {\n const containsBusOrTrainDestination = this.destinations.some((destination) => {\n return (\n BUS_CONNECTION_LOCATION_CODES.includes(destination.code) ||\n RAIL_AND_FLY_LOCATION_CODES.includes(destination.code)\n );\n });\n\n if (containsBusOrTrainDestination) {\n return SvgLibraryIcon.MINUS;\n }\n\n if (this.journeyType === JourneyType.RETURN) {\n return SvgLibraryIcon.RETURN_TRIP;\n }\n\n return SvgLibraryIcon.AIRCRAFT_HORIZONTAL;\n }\n}\n","export function createObject(keys: string[], values: any[]) {\n return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {} as any);\n}\n","import { Injectable } from '@angular/core';\n\nimport { BehaviorSubject, Observable, delay, map } from 'rxjs';\n\nexport const CONTEXT = 'https://schema.org/';\nexport const BOARDING_POLICY = 'https://schema.org/GroupBoardingPolicy';\nexport const FINNAIR_LOGO =\n 'https://brand.finnair.com/resource/crblob/2280812/db35da1bac637e775363ca7efcd66da9/finnair-logo-data.svg';\nexport const FINNAIR_COMPANY = 'Finnair';\nexport const FINNAIR_COMPAN_ALT = 'Finnair Oyj';\nexport const FINNAIR_IATA = 'AY';\nexport const FINNAIR_URL = 'https://www.finnair.com/';\nexport const ABOUT_TEXT =\n 'Finnair is the flag carrier and largest airline of Finland, with its headquarters in Vantaa and its main hub at Helsinki Airport.';\nexport const IATA_CODE = 'AY';\n\nexport const ONEWORLD = 'Oneworld';\nexport const ONEWORLD_URL = 'https://www.oneworld.com';\n\nexport const FINNAIR_MEDIA_LINKS = [\n 'https://fi.wikipedia.org/wiki/Finnair',\n 'https://www.wikidata.org/wiki/Q201821',\n 'https://www.facebook.com/finnairsuomi/',\n 'https://twitter.com/FinnairSuomi',\n 'https://www.linkedin.com/company/finnair/',\n 'https://www.instagram.com/finnair/',\n 'https://www.tiktok.com/@finnair',\n];\n\nexport interface Schema {\n [key: string]: any;\n}\nexport interface SchemaItem {\n schemaType: SchemaTypes;\n schemaSource: Schema;\n}\n\ninterface ArticleSchemaParam {\n readonly id: string;\n readonly headline: string;\n readonly description: string;\n readonly datePublished: string;\n readonly dateModified: string;\n readonly image?: {\n readonly url: string;\n readonly width: string;\n readonly height: string;\n };\n}\n\ninterface FlightSchemaParam {\n departureAirportName: string;\n departureAirportIataCode: string;\n arrivalAirportName: string;\n arrivalAirportIataCode: string;\n}\n\nexport enum SchemaTypes {\n ARTICLE = 'Article',\n FLIGHT = 'Flight',\n ORGANIZATION = 'Organization',\n WEBPAGE = 'WebPage',\n AIRLINE = 'Airline',\n WEBSITE = 'WebSite',\n}\n\nexport enum LinkTypes {\n IMAGE_OBJECT = 'ImageObject',\n AIRLINE = 'Airline',\n AIRPORT = 'Airport',\n CONTACT_POINT = 'ContactPoint',\n SEARCH_ACTION = 'SearchAction',\n POST_ADDRESS = 'PostalAddress',\n}\n\nconst schemaDefaultParams = {\n '@context': CONTEXT,\n author: {\n '@type': SchemaTypes.ORGANIZATION,\n name: FINNAIR_COMPANY,\n },\n publisher: {\n '@type': SchemaTypes.ORGANIZATION,\n name: FINNAIR_COMPANY,\n logo: {\n '@type': LinkTypes.IMAGE_OBJECT,\n url: FINNAIR_LOGO,\n width: '533',\n height: '57',\n },\n },\n};\n\n@Injectable({ providedIn: 'root' })\nexport class SchemaService {\n private schemasBehaviorSubject$: BehaviorSubject = new BehaviorSubject([]);\n\n public schemas$: Observable;\n\n constructor() {\n this.schemas$ = this.schemasBehaviorSubject$.asObservable().pipe(\n delay(0),\n map((allSchemas) => allSchemas.map(({ schemaSource }) => schemaSource))\n );\n }\n\n public addArticleSchema({ id, headline, description, image, datePublished, dateModified }: ArticleSchemaParam): void {\n const schemaSource: Schema = {\n '@type': SchemaTypes.ARTICLE,\n ...schemaDefaultParams,\n mainEntityOfPage: {\n '@type': SchemaTypes.WEBPAGE,\n '@id': id,\n },\n headline,\n description,\n datePublished,\n dateModified,\n };\n if (image) {\n schemaSource.image = {\n '@type': LinkTypes.IMAGE_OBJECT,\n url: image.url,\n width: image.width,\n height: image.height,\n };\n }\n this.updateSchema({\n schemaType: SchemaTypes.ARTICLE,\n schemaSource,\n });\n }\n\n public addAirlineSchema(): void {\n this.updateSchema({\n schemaType: SchemaTypes.AIRLINE,\n schemaSource: {\n '@context': CONTEXT,\n '@type': SchemaTypes.AIRLINE,\n name: FINNAIR_COMPANY,\n url: FINNAIR_URL,\n logo: {\n '@type': LinkTypes.IMAGE_OBJECT,\n url: FINNAIR_LOGO,\n width: '533',\n height: '57',\n },\n alternateName: FINNAIR_COMPAN_ALT,\n sameAs: FINNAIR_MEDIA_LINKS,\n memberOf: {\n '@type': SchemaTypes.ORGANIZATION,\n name: ONEWORLD,\n url: ONEWORLD_URL,\n },\n iataCode: IATA_CODE,\n foundingDate: '1923-11-01',\n address: {\n '@type': LinkTypes.POST_ADDRESS,\n streetAddress: 'Tietotie 9',\n addressLocality: 'Vantaa',\n postalCode: '01530',\n addressCountry: 'FI',\n },\n },\n });\n }\n\n public addWebSiteSchema(): void {\n this.updateSchema({\n schemaType: SchemaTypes.WEBSITE,\n schemaSource: {\n '@context': CONTEXT,\n '@type': SchemaTypes.WEBSITE,\n url: FINNAIR_URL,\n name: FINNAIR_COMPANY,\n about: ABOUT_TEXT,\n publisher: {\n '@type': SchemaTypes.ORGANIZATION,\n name: FINNAIR_COMPANY,\n url: FINNAIR_URL,\n },\n potentialAction: {\n '@type': LinkTypes.SEARCH_ACTION,\n target: 'https://www.finnair.com/fi-fi/search?query={search_term_string}',\n 'query-input': 'required name=search_term_string',\n },\n },\n });\n }\n\n public addFlightSchema({\n departureAirportName,\n departureAirportIataCode,\n arrivalAirportName,\n arrivalAirportIataCode,\n }: FlightSchemaParam): void {\n this.updateSchema({\n schemaType: SchemaTypes.FLIGHT,\n schemaSource: {\n '@context': CONTEXT,\n '@type': SchemaTypes.FLIGHT,\n provider: {\n '@type': LinkTypes.AIRLINE,\n name: FINNAIR_COMPANY,\n iataCode: FINNAIR_IATA,\n boardingPolicy: BOARDING_POLICY,\n },\n seller: {\n '@type': LinkTypes.AIRLINE,\n name: FINNAIR_COMPANY,\n iataCode: FINNAIR_IATA,\n },\n departureAirport: {\n '@type': LinkTypes.AIRPORT,\n name: departureAirportName,\n iataCode: departureAirportIataCode,\n },\n arrivalAirport: {\n '@type': LinkTypes.AIRPORT,\n name: arrivalAirportName,\n iataCode: arrivalAirportIataCode,\n },\n },\n });\n }\n\n public clearSchemas(): void {\n this.schemasBehaviorSubject$.next([]);\n }\n\n private updateSchema(newSchema: SchemaItem) {\n const current: SchemaItem[] = this.schemasBehaviorSubject$.getValue();\n if (current.some(({ schemaType }) => schemaType === newSchema.schemaType)) {\n this.schemasBehaviorSubject$.next([\n ...current.filter(({ schemaType }) => schemaType !== newSchema.schemaType),\n newSchema,\n ]);\n } else {\n this.schemasBehaviorSubject$.next([...current, newSchema]);\n }\n }\n}\n","\n \n
    \n {{ totalTranslationKey$ | async | finLocalization }}:\n {{ total$ | async | finPrice: { absoluteValue: true } }}\n \n \n
    \n \n
    \n
    {{ titleTranslationKey | finLocalization }}
    \n \n
    \n \n \n
    \n \n
    \n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\n\nimport { FinnairAmount } from '@fcom/dapi/api/models';\nimport { AppState } from '@fcom/core/interfaces';\nimport { pseudoLocal } from '@fcom/core/selectors';\n\n@Component({\n selector: 'fin-total-expand',\n templateUrl: './total-expand.component.html',\n styleUrls: ['./total-expand.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TotalExpandComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n constructor(private store$: Store) {}\n\n @Input()\n expandId: string;\n\n @Input()\n total$: Observable;\n\n @Input()\n initiallyOpen = false;\n\n @Input()\n loading$: Observable;\n\n @Input()\n totalTranslationKey$: Observable;\n\n @Input()\n titleTranslationKey: string;\n\n @Input()\n expandButtonAriaLabelKey: string;\n\n isOpen$: Observable;\n\n ngOnInit(): void {\n // proxy the child state here for testability\n this.isOpen$ = this.store$.pipe(pseudoLocal(this.expandId), map(Boolean), distinctUntilChanged());\n }\n}\n","
    \n
    \n \n
    \n \n \n\n \n \n
    \n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { StepProgressState } from '../../enums';\nimport { StepProgress } from '../../interfaces/step-progress.interface';\n\nconst TOTAL_CIRCLE_STROKE_LENGTH = 100;\nconst INITIAL_OFFSET = 25;\n\n@Component({\n selector: 'fin-step-progress-circle',\n templateUrl: './step-progress-circle.component.html',\n styleUrls: ['./step-progress-circle.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class StepProgressCircleComponent implements OnInit {\n readonly StepProgressState = StepProgressState;\n @Input() steps: StepProgress[];\n\n segmentStrokeLength: number;\n segmentStrokeDasharray: string;\n totalStrokeLength: number;\n gapLength: number;\n initialOffset: number;\n\n ngOnInit(): void {\n if (this.steps.length > 1) {\n this.segmentStrokeLength = Math.trunc(TOTAL_CIRCLE_STROKE_LENGTH / this.steps.length) - 2;\n this.segmentStrokeDasharray = `${this.segmentStrokeLength} ${\n TOTAL_CIRCLE_STROKE_LENGTH - this.segmentStrokeLength\n }`;\n this.totalStrokeLength = this.segmentStrokeLength * this.steps.length;\n this.gapLength = +((TOTAL_CIRCLE_STROKE_LENGTH - this.totalStrokeLength) / this.steps.length).toFixed(2);\n this.initialOffset = +(INITIAL_OFFSET - this.gapLength / 2).toFixed(2);\n\n this.steps.forEach((step, index) => {\n if (index === 0) {\n step.strokeDashOffset = this.initialOffset;\n } else {\n step.strokeDashOffset = +(\n TOTAL_CIRCLE_STROKE_LENGTH -\n this.segmentStrokeLength * index +\n this.initialOffset -\n this.gapLength * index\n ).toFixed(2);\n }\n });\n }\n }\n}\n","
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n\n {{ labelKey | finLocalization }}\n {{ airport.dateTime }}\n \n {{ airport.city }}\n \n \n {{ airport.airport }} \n ({{ airport.airportCode }})\n \n\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { BUS_CONNECTION_LOCATION_CODES, RAIL_AND_FLY_LOCATION_CODES } from '@fcom/core/constants';\n\ninterface Airport {\n dateTime: string;\n city: string;\n airportCode: string;\n airport: string;\n}\n\n/**\n * @Unstable\n * Warning! This component is in active development and is not production ready.\n *\n * Documentation can be found in `storybook/stories/flights/timeline.stories.mdx`\n */\n@Component({\n selector: 'fcom-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimelineComponent implements OnInit {\n /**\n * Object containing the information for the Departure airport, including\n * - city name\n * - airport name\n * - airport code\n * - formatted dateTime of departure @example \"08:45 Thu\"\n *\n * Required\n */\n @Input({ required: true }) departure: Airport;\n\n /**\n * Object containing the information for the Arrival airport, including\n * - city name\n * - airport name\n * - airport code\n * - formatted dateTime of arrival @example \"08:45 Thu\"\n *\n * Required\n */\n @Input({ required: true }) arrival: Airport;\n\n @Input() isByBusOnly = false;\n @Input() isByTrainOnly = false;\n\n departureIcon: SvgLibraryIcon;\n arrivalIcon: SvgLibraryIcon;\n\n ngOnInit(): void {\n if (this.isByBusOnly) {\n this.departureIcon = SvgLibraryIcon.BUS;\n this.arrivalIcon = SvgLibraryIcon.BUS;\n\n return;\n }\n\n if (this.isByTrainOnly) {\n this.departureIcon = SvgLibraryIcon.TRAIN;\n this.arrivalIcon = SvgLibraryIcon.TRAIN;\n\n return;\n }\n\n this.departureIcon = this.getIcon(this.departure.airportCode, true);\n this.arrivalIcon = this.getIcon(this.arrival.airportCode, false);\n }\n\n private getIcon(airportCode: string, isDeparture: boolean): SvgLibraryIcon {\n if (BUS_CONNECTION_LOCATION_CODES.includes(airportCode.toUpperCase())) {\n return SvgLibraryIcon.BUS;\n }\n\n if (RAIL_AND_FLY_LOCATION_CODES.includes(airportCode.toUpperCase())) {\n return SvgLibraryIcon.TRAIN;\n }\n\n return isDeparture ? SvgLibraryIcon.DEPARTURE : SvgLibraryIcon.ARRIVAL;\n }\n}\n","
    \n

    {{ 'MMB.cancelBooking.involuntary.refund.subTitle' | finLocalization }}

    \n \n {{ 'MMB.refund.eligibleForRefund' | finLocalization }}\n \n
    \n\n\n \n
    \n \n \n \n
    \n \n
    \n\n\n \n \n \n
    1\">\n
    \n
    \n \n {{ 'purchase.priceBreakdown.detailedBreakdown' | finLocalization }}\n \n
    \n
    \n
    \n \n \n {{ flightTicketNotificationKey$ | async | finLocalization }}\n \n
    \n \n
    \n
    \n

    \n {{ 'MMB.cancelBooking.involuntary.refund.travelExtra.title' | finLocalization }}\n

    \n
    \n \n {{ travelExtrasNotificationKey$ | async | finLocalization }}\n
    \n
    \n
    \n \n\n\n

    \n {{ 'MMB.cancelBooking.involuntary.refund.totalRefund' | finLocalization }}\n

    \n {{\n (cancelRefund$ | async)?.refundAmount.total?.total?.totalAmount | finPrice: { useSymbol: true }\n }}\n\n\n 1\"\n [(open)]=\"summaryModalOpen\"\n [title]=\"'purchase.priceBreakdown.detailedBreakdownPassenger' | finLocalization\"\n [buttons]=\"ModalButtons.DONE\"\n (close)=\"closeSummaryModal()\"\n>\n \n
    \n
    \n
    \n

    \n \n {{ passenger?.title ? ('passenger.title.' + passenger?.title | lowercase | finLocalization) : '' }}\n {{ passenger?.firstName }} {{ passenger?.lastName }} ({{\n 'passenger.' + asPaxTypeKey(passenger.passengerTypeCode).toLowerCase() | finLocalization | titlecase\n }})\n \n

    \n
    \n
    \n
    \n \n \n\n \n \n \n \n \n \n \n \n\n 0\">\n \n \n \n \n \n \n \n \n \n \n \n
    \n {{\n 'purchase.priceBreakdown.detailedBreakdownPassenger' | finLocalization\n }}\n
    \n {{ 'purchase.priceBreakdown.flights' | finLocalization }}\n
    \n \n
    \n
    \n \n {{ 'purchase.review.taxTotal' | finLocalization }}\n \n
    \n
    \n {{\n pax.prices?.totalTax || { amount: '0', currencyCode: pax.prices?.baseFare.currencyCode }\n | finPrice\n }}\n \n \n \n \n
    \n
    \n
    \n
      \n
    • \n
      \n \n {{ 'TAX_CODES.' + tax.code.slice(0, 2) | finLocalization | finEmpty: tax.code.slice(0, 2) }}\n \n \n {{ tax | finPrice }}\n \n
      \n
    • \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n\n\n \n \n {{ label }}\n \n \n {{ originalValue }}{{ value }}\n \n \n\n\n\n \n \n\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { catchError, combineLatest, EMPTY, filter, map, Observable, of } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport {\n FinnairCancelFlowType,\n FinnairOrder,\n FinnairOrderCancelRefund,\n FinnairPassengerItem,\n FinnairServiceItem,\n FinnairTotalPricesDetails,\n ServiceFlow,\n} from '@fcom/dapi/api/models';\nimport { ButtonTheme, ModalButtons, NotificationLayout, NotificationTheme } from '@fcom/ui-components';\nimport { hasUnitPrices } from '@fcom/common/utils';\nimport { SentryLogger } from '@fcom/core/services';\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { BreakdownModel } from '@fcom/dapi/interfaces';\nimport { CmsArticle } from '@fcom/core-api';\nimport { finShare } from '@fcom/rx';\nimport { FragmentService } from '@fcom/common/services';\n\nimport { getPassengerServices, hasPassengers } from '../../utils/order.utils';\nimport { RefundDetailNotificationType } from '../../interfaces/refund.interface';\n\nconst FLOW_TYPE_NOTIFICATION_KEYS = {\n [FinnairCancelFlowType.AUTOMATIC_RULE_24_HOUR]: 'manualAndAutomaticRule24Hour',\n [FinnairCancelFlowType.AUTOMATIC_RULE_TICKET_SLIGHTCLASSIC]: 'manualAndAutomaticRuleSlightClassic',\n [FinnairCancelFlowType.AUTOMATIC_RULE_TICKET_FLEX]: 'manualAndAutomaticRuleTicketFlex',\n [FinnairCancelFlowType.AUTOMATIC_RULE_TICKET_OTHER]: 'manualAndAutomaticTicketOther',\n [FinnairCancelFlowType.MANUAL_RULE_24_HOUR]: 'manualAndAutomaticRule24Hour',\n [FinnairCancelFlowType.MANUAL_RULE_TICKET_OTHER]: 'manualAndAutomaticTicketOther',\n [FinnairCancelFlowType.MANUAL_RULE_TICKET_FLEX]: 'manualAndAutomaticRuleTicketFlex',\n [FinnairCancelFlowType.MANUAL_RULE_TICKET_SLIGHTCLASSIC]: 'manualAndAutomaticRuleSlightClassic',\n [FinnairCancelFlowType.MANUAL_RULE_TICKET_AWARD]: 'manualAndAutomaticRule24Hour',\n [FinnairCancelFlowType.RULE_CACR]: 'cacr',\n [FinnairCancelFlowType.MANUAL_INVOLUNTARY]: 'manualAndAutomaticInvoluntary',\n [FinnairCancelFlowType.AUTOMATIC_INVOLUNTARY]: 'manualAndAutomaticInvoluntary',\n [FinnairCancelFlowType.RULE_24_HOUR]: 'manualAndAutomaticInvoluntary',\n [FinnairCancelFlowType.MANUAL_REFUNDABLE]: 'manualAndAutomaticInvoluntary',\n};\n\nconst DEPRECATED_AND_INVOLUNTARY_RULES = [\n FinnairCancelFlowType.MANUAL_INVOLUNTARY,\n FinnairCancelFlowType.AUTOMATIC_INVOLUNTARY,\n FinnairCancelFlowType.RULE_24_HOUR,\n FinnairCancelFlowType.MANUAL_REFUNDABLE,\n];\n\nconst KOREA_COUNTRY_CODE = 'KR';\n\n@Component({\n selector: 'fin-refund-detail',\n templateUrl: './refund-detail.component.html',\n styleUrls: ['./refund-detail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RefundDetailComponent implements OnInit {\n readonly asPaxTypeKey = asPaxTypeKey;\n readonly ModalButtons = ModalButtons;\n readonly NotificationLayout = NotificationLayout;\n readonly NotificationTheme = NotificationTheme;\n readonly ServiceFlow = ServiceFlow;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly ButtonTheme = ButtonTheme;\n\n @Input({ required: true })\n cancelRefund$: Observable;\n\n @Input({ required: true })\n notificationType: RefundDetailNotificationType;\n\n @Input()\n services$: Observable;\n\n @Output()\n goToClaimForm: EventEmitter = new EventEmitter();\n\n mainNotificationContent$: Observable;\n flightTicketNotificationKey$: Observable;\n travelExtrasNotificationKey$: Observable;\n displayFlightTicketNotification$: Observable;\n displayRefundNotificationWithLink$: Observable;\n displayMainNotification$: Observable;\n displayGoToClaimFormButton$: Observable;\n displayRefundAmountBlock$: Observable;\n displayEligibleForRefundMessage$: Observable;\n isDeprecatedOrInvoluntaryRule$: Observable;\n showTravelExtrasBlock$: Observable;\n\n summaryModalOpen: boolean;\n summaryModalData: { prices: FinnairTotalPricesDetails };\n breakdowns$: Observable = of([]);\n constructor(\n private sentryLogger: SentryLogger,\n private fragmentService: FragmentService\n ) {}\n\n ngOnInit(): void {\n this.isDeprecatedOrInvoluntaryRule$ = this.cancelRefund$.pipe(\n map((cancelAndRefund) => DEPRECATED_AND_INVOLUNTARY_RULES.includes(cancelAndRefund.flowType)),\n finShare()\n );\n this.breakdowns$ = this.cancelRefund$.pipe(\n filter(\n (cancelRefund) => hasPassengers(cancelRefund.order.passengers) && hasUnitPrices(cancelRefund.refundAmount, true)\n ),\n map((cancelRefund) => {\n const refundAmount = cancelRefund.refundAmount;\n return cancelRefund.order.passengers\n .filter((passenger) => parseFloat(refundAmount.total.totalPerPax?.[passenger.id]?.totalAmount.amount) > 0)\n .map((passenger: FinnairPassengerItem) => ({\n ...passenger,\n prices:\n refundAmount.flight?.totalPerPax?.[passenger.id] || refundAmount.services?.totalPerPax?.[passenger.id],\n services: getPassengerServices(refundAmount.services?.totalPerCategory, passenger),\n total: refundAmount.total.totalPerPax?.[passenger.id]?.totalAmount,\n }));\n }),\n catchError((e: unknown) => {\n this.sentryLogger.error('Exception in handling prices of passengers', e);\n return EMPTY;\n })\n );\n this.displayGoToClaimFormButton$ = this.cancelRefund$.pipe(\n map(\n (cancelRefund) =>\n cancelRefund.flowType === FinnairCancelFlowType.RULE_CACR &&\n this.notificationType === RefundDetailNotificationType.CONFIRMATION\n )\n );\n this.mainNotificationContent$ = this.cancelRefund$.pipe(\n map((cancelRefund) => this.getMainNotificationKey(cancelRefund.flowType, cancelRefund.order)),\n switchMap((key) => this.fragmentService.getFragment(key)),\n finShare()\n );\n this.displayFlightTicketNotification$ = combineLatest([\n this.cancelRefund$,\n this.isDeprecatedOrInvoluntaryRule$,\n this.services$,\n ]).pipe(\n map(([cancelAndRefund, isDeprecatedOrInvoluntary, services]) => {\n return isDeprecatedOrInvoluntary\n ? this.notificationType === RefundDetailNotificationType.REVIEW || !!services?.length\n : cancelAndRefund.flowType !== FinnairCancelFlowType.MANUAL_RULE_24_HOUR &&\n cancelAndRefund.flowType !== FinnairCancelFlowType.AUTOMATIC_RULE_24_HOUR;\n })\n );\n this.flightTicketNotificationKey$ = this.displayFlightTicketNotification$.pipe(\n filter((displayNotification) => displayNotification),\n switchMap(() =>\n this.cancelRefund$.pipe(\n map((cancelRefund) => this.getFlightTicketNotificationKey(cancelRefund.flowType)),\n finShare()\n )\n )\n );\n this.displayRefundNotificationWithLink$ = combineLatest([\n this.displayFlightTicketNotification$,\n this.isDeprecatedOrInvoluntaryRule$,\n ]).pipe(\n map(\n ([displayFlightNotification, isDeprecatedOrInvoluntary]) =>\n !displayFlightNotification &&\n isDeprecatedOrInvoluntary &&\n this.notificationType === RefundDetailNotificationType.CONFIRMATION\n )\n );\n this.travelExtrasNotificationKey$ = this.cancelRefund$.pipe(\n map((cancelRefund) => this.getTravelExtrasNotificationKey(cancelRefund.flowType)),\n finShare()\n );\n this.displayMainNotification$ = combineLatest([this.isDeprecatedOrInvoluntaryRule$, this.services$]).pipe(\n map(\n ([isDeprecatedOrInvoluntary, services]) =>\n !isDeprecatedOrInvoluntary ||\n (services?.length && this.notificationType === RefundDetailNotificationType.CONFIRMATION)\n )\n );\n this.displayEligibleForRefundMessage$ = this.cancelRefund$.pipe(\n map((cancelAndRefund) => this.displayEligibleForRefundMessage(cancelAndRefund.flowType))\n );\n this.displayRefundAmountBlock$ = this.cancelRefund$.pipe(\n map(\n (cancelAndRefund) =>\n cancelAndRefund.flowType !== FinnairCancelFlowType.MANUAL_RULE_TICKET_AWARD && !!cancelAndRefund.order\n )\n );\n this.showTravelExtrasBlock$ = this.services$.pipe(map((services) => services?.length > 0));\n }\n\n openSummaryModal = (event: Event, prices: FinnairTotalPricesDetails): void => {\n event.stopPropagation();\n\n this.summaryModalOpen = true;\n this.summaryModalData = {\n prices,\n };\n };\n\n closeSummaryModal = (): void => {\n this.summaryModalData = null;\n };\n\n onGoToClaimForm(): void {\n this.goToClaimForm.emit();\n }\n\n private getMainNotificationKey(flow: FinnairCancelFlowType, order: FinnairOrder): string {\n if (this.is24HourKoreaRule(order, flow)) {\n return `MMB.refund.rules.koreaRule24Hour.mainNotification.${this.notificationType}.url`;\n }\n return `MMB.refund.rules.${FLOW_TYPE_NOTIFICATION_KEYS[flow]}.mainNotification.${this.notificationType}.url`;\n }\n\n private is24HourKoreaRule(order: FinnairOrder, flowType: FinnairCancelFlowType): boolean {\n const is24hRuleFlow =\n flowType === FinnairCancelFlowType.AUTOMATIC_RULE_24_HOUR ||\n flowType === FinnairCancelFlowType.MANUAL_RULE_24_HOUR;\n\n const departureLocationCode = order.bounds[0]?.departure?.locationCode;\n const locationData = order.locations?.[departureLocationCode];\n const isDepartureFromKorea = locationData?.countryCode === KOREA_COUNTRY_CODE;\n\n return is24hRuleFlow && isDepartureFromKorea;\n }\n\n private getFlightTicketNotificationKey(flow: FinnairCancelFlowType): string {\n return `MMB.refund.rules.${FLOW_TYPE_NOTIFICATION_KEYS[flow]}.flightTicketsNotification.${this.notificationType}`;\n }\n\n private getTravelExtrasNotificationKey(flow: FinnairCancelFlowType): string {\n return `MMB.refund.rules.${FLOW_TYPE_NOTIFICATION_KEYS[flow]}.travelExtrasNotification.${this.notificationType}`;\n }\n\n private displayEligibleForRefundMessage(flow: FinnairCancelFlowType): boolean {\n return flow === FinnairCancelFlowType.AUTOMATIC_RULE_24_HOUR || flow === FinnairCancelFlowType.MANUAL_RULE_24_HOUR;\n }\n}\n","import { HttpClient, HttpHeaders, type HttpResponse } from '@angular/common/http';\nimport { type ElementRef, Injectable } from '@angular/core';\nimport { FormBuilder, type FormGroup, Validators } from '@angular/forms';\nimport { ActivatedRoute, type UrlSegment } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { combineLatest, type Observable, of, switchMap, throwError } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport { CorporateUserRole, type Profile } from '@fcom/core-api/login';\nimport { type AppState } from '@fcom/core/interfaces';\nimport { loginToken, profile } from '@fcom/core/selectors';\nimport { ConfigService, SentryLogger } from '@fcom/core/services';\nimport { EMAIL_REGEX, LocalDate, PHONE_PATTERN } from '@fcom/core/utils';\nimport { retryWithBackoff } from '@fcom/rx';\nimport { type AttachmentResponse } from '@fcom/ui-components/components/forms/interfaces';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport {\n Company,\n CompanyUpdate,\n type CorporateContactUs,\n CorporateSalesForceUser,\n CorporateUser,\n CorporateUserForm,\n Data,\n DataRequest,\n DataResponse,\n EnrollCorporate,\n SelectOption,\n TripsRequest,\n TripsResponse,\n type VatReceiptContactDetails,\n type VatReceiptResult,\n type VatReceiptSearch,\n} from '../../interfaces';\nimport { ScrollService } from '../scroll/scroll.service';\nimport { finnairPlusNumberValidator } from '../../utils/form-validators';\nimport { fileToBase64 } from '../../utils/form-utils';\n\nexport const TERMS_AND_CONDITIONS_PREFIX = 'https://cdn.finnair.com/pdf/fcp/FCP_Terms_and_conditions_';\n\nexport const NAME_PATTERN = /^[a-z\\-àáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçšž∂ð ]+$/i;\nexport const ZIP_CODE_PATTERN = /^[a-zA-Z0-9 -]*$/;\n\n@Injectable()\nexport class CorporateService {\n apiUrl: string;\n\n constructor(\n private store$: Store,\n private configService: ConfigService,\n private languageService: LanguageService,\n private scrollService: ScrollService,\n private http: HttpClient,\n private sentryLogger: SentryLogger,\n private activatedRoute: ActivatedRoute,\n private fb: FormBuilder\n ) {\n this.apiUrl = this.configService.cfg.corporateApiUrl;\n }\n\n sendContactCaseToSalesForce(payload: CorporateContactUs, userProfile: Profile): Observable> {\n const url = userProfile?.corporate?.clientId\n ? `${this.apiUrl}/corporates/${userProfile.corporate.clientId}/contactUs`\n : `${this.apiUrl}/contactUs`;\n\n return this.getExtraHeaders(userProfile).pipe(\n switchMap((extraHeaders) => {\n return this.http\n .post>(url, payload, this.getCorporateApiHeaders('application/json', extraHeaders))\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to send contact case to corporate api', { error: err });\n return throwError(() => err);\n })\n );\n })\n );\n }\n\n postContactRequest(payload: CorporateContactUs): Observable> {\n return this.http\n .post>(`${this.apiUrl}/contactrequests`, payload, this.getCorporateApiHeaders())\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to post contact request to corporate api', { error: err });\n return throwError(() => err);\n })\n );\n }\n\n postFile(file: File): Observable {\n return fileToBase64(file).pipe(\n switchMap((base64File) => {\n return this.http\n .post(\n `${this.apiUrl}/attachment`,\n {\n fileName: file.name,\n fileData: base64File,\n },\n this.getCorporateApiHeaders()\n )\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to post file to corporate api', { error: err });\n return throwError(() => err);\n })\n );\n })\n );\n }\n\n enrollNewCorporate(payload: EnrollCorporate): Observable> {\n return this.http\n .post>(`${this.apiUrl}/corporates`, payload, this.getCorporateApiHeaders())\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to post new corporate to corporate api', { error: err });\n return throwError(() => err);\n })\n );\n }\n\n getCompanyDetails(): Observable {\n return combineLatest([this.store$.pipe(profile()), this.store$.pipe(loginToken())]).pipe(\n switchMap(([userProfile, token]: [Profile, string]) => {\n return this.http.get(\n `${this.apiUrl}/corporates/${userProfile.corporate?.clientId}`,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n hasActivatedSAF(): Observable {\n return of(false);\n }\n\n updateCompanyDetails(payload: CompanyUpdate): Observable> {\n return combineLatest([this.store$.pipe(profile()), this.store$.pipe(loginToken())]).pipe(\n switchMap(([userProfile, token]: [Profile, string]) => {\n return this.http.patch>(\n `${this.apiUrl}/corporates/${userProfile.corporate?.clientId}`,\n payload,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n getUsers(): Observable {\n return combineLatest([this.store$.pipe(profile()), this.store$.pipe(loginToken())]).pipe(\n switchMap(([userProfile, token]: [Profile, string]) => {\n return this.http.get(\n `${this.apiUrl}/corporates/${userProfile.corporate?.clientId}/users`,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n getUser(id: string): Observable {\n return this.store$.pipe(loginToken()).pipe(\n switchMap((token: string) => {\n return this.http.get(\n `${this.apiUrl}/users/${id}`,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n addUser(newUser: CorporateSalesForceUser): Observable {\n return combineLatest([this.store$.pipe(profile()), this.store$.pipe(loginToken())]).pipe(\n switchMap(([userProfile, token]: [Profile, string]) => {\n return this.http.post(\n `${this.apiUrl}/corporates/${userProfile.corporate?.clientId}/users`,\n newUser,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n updateUser(id: string, user: CorporateSalesForceUser): Observable {\n return this.store$.pipe(loginToken()).pipe(\n switchMap((token: string) => {\n return this.http.patch(\n `${this.apiUrl}/users/${id}`,\n user,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n deactivateUser(userDetails: { id: string; lastname: string }): Observable {\n return this.store$.pipe(loginToken()).pipe(\n switchMap((token: string) => {\n return this.http.delete(\n `${this.apiUrl}/users/${userDetails.id}?lastName=${userDetails.lastname}`,\n this.getCorporateApiHeaders('application/json', { oauth_token: token })\n );\n })\n );\n }\n\n getTrips(params: TripsRequest): Observable {\n return combineLatest([this.store$.pipe(profile()), this.store$.pipe(loginToken())]).pipe(\n switchMap(([userProfile, oauthToken]: [Profile, string]) => {\n return this.http\n .post(\n `${this.apiUrl}/corporates/${userProfile.corporate.clientId}/trips`,\n params,\n this.getCorporateApiHeaders('application/json', { oauth_token: oauthToken })\n )\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to get trips from corporate api', { error: err });\n return throwError(() => err);\n })\n );\n })\n );\n }\n\n getSpend(spendRequest: DataRequest): Observable {\n return combineLatest([this.store$.pipe(profile()), this.store$.pipe(loginToken())]).pipe(\n switchMap(([userProfile, oauthToken]: [Profile, string]) => {\n return this.http\n .post(\n `${this.apiUrl}/corporates/${userProfile.corporate.clientId}/reports`,\n spendRequest,\n this.getCorporateApiHeaders('application/json', { oauth_token: oauthToken })\n )\n .pipe(\n map((response: DataResponse) => ({ clientId: userProfile.corporate.clientId, response })),\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to get spend from corporate api', { error: err });\n return of({ clientId: userProfile.corporate.clientId, error: err } as Data);\n })\n );\n })\n );\n }\n\n getVatReceipt(search: VatReceiptSearch): Observable {\n const params = this.getVatSearchParams(search);\n const url = `${this.apiUrl}/corporates/999999/receipts?${params}`;\n return this.http.get(url, this.getCorporateApiHeaders()).pipe(\n retryWithBackoff(2),\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to get VAT receipt', { error: err });\n return throwError(() => err);\n })\n );\n }\n\n getReceiptUrl(search: VatReceiptSearch, contactDetails: VatReceiptContactDetails): Observable {\n const params = this.getVatSearchParams(search, 'PDF');\n\n const url = `${this.apiUrl}/corporates/999999/receipts?${params}`;\n return this.http.post<{ receiptId: string }>(url, contactDetails, this.getCorporateApiHeaders()).pipe(\n map((res) => `${this.apiUrl}/receipts/${res.receiptId}`),\n retryWithBackoff(2),\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to download the VAT receipt from corporate api', { error: err });\n return throwError(() => err);\n })\n );\n }\n\n getVatSearchParams(search: VatReceiptSearch, format = 'JSON'): URLSearchParams {\n const { lastName, pnr, ticketNumber } = search;\n const params = new URLSearchParams();\n params.append('format', format);\n params.append('lastName', lastName.toUpperCase());\n if (pnr) {\n params.append('pnr', pnr.toUpperCase());\n } else {\n params.append('ticketNumber', ticketNumber.replace(/\\s/g, '').slice(-10));\n }\n return params;\n }\n\n /*\n This will return the parent page link, so last segment of current url will be removed.\n E.g. /fi-en/finnair-business-travel/join-corporate-form -> /fi-en/finnair-business-travel\n */\n getReturnLink(): Observable {\n return this.activatedRoute.url.pipe(\n map((segments: UrlSegment[]) => {\n const paths = segments\n ?.slice(0, -1)\n .map((p) => p.path)\n .filter(Boolean)\n .join('/');\n return `${this.languageService.langValue}/${paths}`;\n })\n );\n }\n\n scrollToInvalidField(form: FormGroup | FormGroup[], elementRef: ElementRef): void {\n Array.isArray(form) ? form.forEach((f) => f.markAllAsTouched()) : form.markAllAsTouched();\n setTimeout(() => {\n this.scrollService.scrollToFirstInvalidInput(elementRef, 40);\n });\n }\n\n getCorporateUserForm(user?: CorporateUser, phoneNumber?: [string, string]): FormGroup {\n return this.fb.group({\n personalDetails: this.fb.group({\n salutation: [user?.title ?? '', Validators.required],\n firstName: [user?.firstname ?? '', [Validators.required, Validators.pattern(NAME_PATTERN)]],\n lastName: [user?.lastname ?? '', [Validators.required, Validators.pattern(NAME_PATTERN)]],\n email: [user?.email ?? '', [Validators.required, Validators.pattern(EMAIL_REGEX)]],\n phonePrefix: [phoneNumber?.[0] ?? '', Validators.required],\n phoneNumber: [phoneNumber?.[1] ?? '', [Validators.required, Validators.pattern(PHONE_PATTERN)]],\n dateOfBirth: [user?.birthdate ? new LocalDate(user.birthdate) : undefined],\n workTitle: [user?.jobTitle ?? ''],\n fPlusNumber: [user?.finnairPlus ?? '', finnairPlusNumberValidator()],\n }),\n passportDetails: this.fb.group({\n passportNumber: [user?.passportNumber ?? ''],\n issueDate: [user?.issued ? new LocalDate(user.issued) : undefined],\n expirationDate: [user?.expires ? new LocalDate(user.expires) : undefined],\n nationality: [user?.nationality ?? ''],\n }),\n userDetails: this.fb.group({\n role: [user?.role ?? CorporateUserRole.TRAVELLER, Validators.required],\n }),\n });\n }\n\n getCountryInputOptions(): Observable {\n return this.languageService.translate('countries').pipe(\n map((countries) =>\n Object.keys(countries)\n .map(\n (country) =>\n ({\n value: country.toUpperCase(),\n name: countries[country],\n }) as SelectOption\n )\n .sort((locationA, locationB) => {\n return locationA.name > locationB.name ? 1 : -1;\n })\n )\n );\n }\n\n getCountryListForTerms(): { [key: string]: string } {\n return {\n AT: 'AT_EN.pdf',\n BE: 'BE_EN.pdf',\n CN: 'CN_EN.pdf',\n CZ: 'CZ_EN.pdf',\n DK: 'DK_EN.pdf',\n EE: 'EE_EN.pdf',\n FI: 'FI_EN.pdf',\n FR: 'FR_EN.pdf',\n DE: 'DE_EN.pdf',\n HK: 'HK_EN.pdf',\n HU: 'HU_EN.pdf',\n IN: 'IN_EN.pdf',\n IE: 'IE_EN.pdf',\n IT: 'IT_EN.pdf',\n KR: 'KR_EN.pdf',\n LV: 'LV_EN.pdf',\n LT: 'LT_EN.pdf',\n NL: 'NL_EN.pdf',\n NO: 'NO_EN.pdf',\n PL: 'PL_EN.pdf',\n SG: 'SG_EN.pdf',\n ES: 'ES_EN.pdf',\n SE: 'SE_EN.pdf',\n CH: 'CH_EN.pdf',\n TH: 'TH_EN.pdf',\n GB: 'UK_EN.pdf',\n US: 'US_EN.pdf',\n };\n }\n\n private getExtraHeaders(userProfile: Profile | undefined): Observable<{ [key: string]: string }> {\n if (userProfile) {\n return this.store$.pipe(\n loginToken(),\n map((token) => ({ oauth_token: token }))\n );\n }\n return of({});\n }\n\n private getCorporateApiHeaders(\n contentType = 'application/json',\n extraHeaders?: { [key: string]: string }\n ): { headers: HttpHeaders } {\n return {\n headers: new HttpHeaders({\n 'X-Api-Key': this.configService.cfg.corporateApiKey,\n 'Content-Type': contentType,\n ...(extraHeaders || {}),\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 */\n\n/**\n * Type describing the allowed values for a boolean input.\n * @docs-private\n */\nexport type BooleanInput = string | boolean | null | undefined;\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray(value: T | T[]): T[];\nexport function coerceArray(value: T | readonly T[]): readonly T[];\nexport function coerceArray(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\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/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\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\nimport {ElementRef} from '@angular/core';\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nexport function coerceElement(elementOrRef: ElementRef | T): T {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\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 * Coerces a value to an array of trimmed non-empty strings.\n * Any input that is not an array, `null` or `undefined` will be turned into a string\n * via `toString()` and subsequently split with the given separator.\n * `null` and `undefined` will result in an empty array.\n * This results in the following outcomes:\n * - `null` -> `[]`\n * - `[null]` -> `[\"null\"]`\n * - `[\"a\", \"b \", \" \"]` -> `[\"a\", \"b\"]`\n * - `[1, [2, 3]]` -> `[\"1\", \"2,3\"]`\n * - `[{ a: 0 }]` -> `[\"[object Object]\"]`\n * - `{ a: 0 }` -> `[\"[object\", \"Object]\"]`\n *\n * Useful for defining CSS classes or table columns.\n * @param value the value to coerce into an array of strings\n * @param separator split-separator if value isn't an array\n */\nexport function coerceStringArray(value: any, separator: string | RegExp = /\\s+/): string[] {\n const result = [];\n\n if (value != null) {\n const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);\n for (const sourceValue of sourceValues) {\n const trimmedString = `${sourceValue}`.trim();\n if (trimmedString) {\n result.push(trimmedString);\n }\n }\n }\n\n return result;\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 */\nimport {Directionality} from '@angular/cdk/bidi';\nimport {Platform} from '@angular/cdk/platform';\nimport {\n AfterContentChecked,\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n ANIMATION_MODULE_TYPE,\n} from '@angular/core';\nimport {AbstractControlDirective} from '@angular/forms';\nimport {ThemePalette} from '@angular/material/core';\nimport {merge, Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {MAT_ERROR, MatError} from './directives/error';\nimport {\n FLOATING_LABEL_PARENT,\n FloatingLabelParent,\n MatFormFieldFloatingLabel,\n} from './directives/floating-label';\nimport {MatHint} from './directives/hint';\nimport {MatLabel} from './directives/label';\nimport {MatFormFieldLineRipple} from './directives/line-ripple';\nimport {MatFormFieldNotchedOutline} from './directives/notched-outline';\nimport {MAT_PREFIX, MatPrefix} from './directives/prefix';\nimport {MAT_SUFFIX, MatSuffix} from './directives/suffix';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {matFormFieldAnimations} from './form-field-animations';\nimport {MatFormFieldControl as _MatFormFieldControl} from './form-field-control';\nimport {\n getMatFormFieldDuplicatedHintError,\n getMatFormFieldMissingControlError,\n} from './form-field-errors';\nimport {DOCUMENT, NgTemplateOutlet} from '@angular/common';\n\n/** Type for the available floatLabel values. */\nexport type FloatLabelType = 'always' | 'auto';\n\n/** Possible appearance styles for the form field. */\nexport type MatFormFieldAppearance = 'fill' | 'outline';\n\n/** Behaviors for how the subscript height is set. */\nexport type SubscriptSizing = 'fixed' | 'dynamic';\n\n/**\n * Represents the default options for the form field that can be configured\n * using the `MAT_FORM_FIELD_DEFAULT_OPTIONS` injection token.\n */\nexport interface MatFormFieldDefaultOptions {\n /** Default form field appearance style. */\n appearance?: MatFormFieldAppearance;\n /** Default color of the form field. */\n color?: ThemePalette;\n /** Whether the required marker should be hidden by default. */\n hideRequiredMarker?: boolean;\n /**\n * Whether the label for form fields should by default float `always`,\n * `never`, or `auto` (only when necessary).\n */\n floatLabel?: FloatLabelType;\n /** Whether the form field should reserve space for one line by default. */\n subscriptSizing?: SubscriptSizing;\n}\n\n/**\n * Injection token that can be used to inject an instances of `MatFormField`. It serves\n * as alternative token to the actual `MatFormField` class which would cause unnecessary\n * retention of the `MatFormField` class and its component metadata.\n */\nexport const MAT_FORM_FIELD = new InjectionToken('MatFormField');\n\n/**\n * Injection token that can be used to configure the\n * default options for all form field within an app.\n */\nexport const MAT_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken(\n 'MAT_FORM_FIELD_DEFAULT_OPTIONS',\n);\n\nlet nextUniqueId = 0;\n\n/** Default appearance used by the form field. */\nconst DEFAULT_APPEARANCE: MatFormFieldAppearance = 'fill';\n\n/**\n * Whether the label for form fields should by default float `always`,\n * `never`, or `auto`.\n */\nconst DEFAULT_FLOAT_LABEL: FloatLabelType = 'auto';\n\n/** Default way that the subscript element height is set. */\nconst DEFAULT_SUBSCRIPT_SIZING: SubscriptSizing = 'fixed';\n\n/**\n * Default transform for docked floating labels in a MDC text-field. This value has been\n * extracted from the MDC text-field styles because we programmatically modify the docked\n * label transform, but do not want to accidentally discard the default label transform.\n */\nconst FLOATING_LABEL_DEFAULT_DOCKED_TRANSFORM = `translateY(-50%)`;\n\n/**\n * Despite `MatFormFieldControl` being an abstract class, most of our usages enforce its shape\n * using `implements` instead of `extends`. This appears to be problematic when Closure compiler\n * is configured to use type information to rename properties, because it can't figure out which\n * class properties are coming from. This interface seems to work around the issue while preserving\n * our type safety (alternative being using `any` everywhere).\n * @docs-private\n */\ninterface MatFormFieldControl extends _MatFormFieldControl {}\n\n/** Container for form controls that applies Material Design styling and behavior. */\n@Component({\n selector: 'mat-form-field',\n exportAs: 'matFormField',\n templateUrl: './form-field.html',\n styleUrl: './form-field.css',\n animations: [matFormFieldAnimations.transitionMessages],\n host: {\n 'class': 'mat-mdc-form-field',\n '[class.mat-mdc-form-field-label-always-float]': '_shouldAlwaysFloat()',\n '[class.mat-mdc-form-field-has-icon-prefix]': '_hasIconPrefix',\n '[class.mat-mdc-form-field-has-icon-suffix]': '_hasIconSuffix',\n // Note that these classes reuse the same names as the non-MDC version, because they can be\n // considered a public API since custom form controls may use them to style themselves.\n // See https://github.com/angular/components/pull/20502#discussion_r486124901.\n '[class.mat-form-field-invalid]': '_control.errorState',\n '[class.mat-form-field-disabled]': '_control.disabled',\n '[class.mat-form-field-autofilled]': '_control.autofilled',\n '[class.mat-form-field-no-animations]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-form-field-appearance-fill]': 'appearance == \"fill\"',\n '[class.mat-form-field-appearance-outline]': 'appearance == \"outline\"',\n '[class.mat-form-field-hide-placeholder]': '_hasFloatingLabel() && !_shouldLabelFloat()',\n '[class.mat-focused]': '_control.focused',\n '[class.mat-primary]': 'color !== \"accent\" && color !== \"warn\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n '[class.ng-untouched]': '_shouldForward(\"untouched\")',\n '[class.ng-touched]': '_shouldForward(\"touched\")',\n '[class.ng-pristine]': '_shouldForward(\"pristine\")',\n '[class.ng-dirty]': '_shouldForward(\"dirty\")',\n '[class.ng-valid]': '_shouldForward(\"valid\")',\n '[class.ng-invalid]': '_shouldForward(\"invalid\")',\n '[class.ng-pending]': '_shouldForward(\"pending\")',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {provide: MAT_FORM_FIELD, useExisting: MatFormField},\n {provide: FLOATING_LABEL_PARENT, useExisting: MatFormField},\n ],\n standalone: true,\n imports: [\n MatFormFieldFloatingLabel,\n MatFormFieldNotchedOutline,\n NgTemplateOutlet,\n MatFormFieldLineRipple,\n MatHint,\n ],\n})\nexport class MatFormField\n implements FloatingLabelParent, AfterContentInit, AfterContentChecked, AfterViewInit, OnDestroy\n{\n @ViewChild('textField') _textField: ElementRef;\n @ViewChild('iconPrefixContainer') _iconPrefixContainer: ElementRef;\n @ViewChild('textPrefixContainer') _textPrefixContainer: ElementRef;\n @ViewChild(MatFormFieldFloatingLabel) _floatingLabel: MatFormFieldFloatingLabel | undefined;\n @ViewChild(MatFormFieldNotchedOutline) _notchedOutline: MatFormFieldNotchedOutline | undefined;\n @ViewChild(MatFormFieldLineRipple) _lineRipple: MatFormFieldLineRipple | undefined;\n\n @ContentChild(MatLabel) _labelChildNonStatic: MatLabel | undefined;\n @ContentChild(MatLabel, {static: true}) _labelChildStatic: MatLabel | undefined;\n @ContentChild(_MatFormFieldControl) _formFieldControl: MatFormFieldControl;\n @ContentChildren(MAT_PREFIX, {descendants: true}) _prefixChildren: QueryList;\n @ContentChildren(MAT_SUFFIX, {descendants: true}) _suffixChildren: QueryList;\n @ContentChildren(MAT_ERROR, {descendants: true}) _errorChildren: QueryList;\n @ContentChildren(MatHint, {descendants: true}) _hintChildren: QueryList;\n\n /** Whether the required marker should be hidden. */\n @Input()\n get hideRequiredMarker(): boolean {\n return this._hideRequiredMarker;\n }\n set hideRequiredMarker(value: BooleanInput) {\n this._hideRequiredMarker = coerceBooleanProperty(value);\n }\n private _hideRequiredMarker = false;\n\n /** The color palette for the form field. */\n @Input() color: ThemePalette = 'primary';\n\n /** Whether the label should always float or float as the user types. */\n @Input()\n get floatLabel(): FloatLabelType {\n return this._floatLabel || this._defaults?.floatLabel || DEFAULT_FLOAT_LABEL;\n }\n set floatLabel(value: FloatLabelType) {\n if (value !== this._floatLabel) {\n this._floatLabel = value;\n // For backwards compatibility. Custom form field controls or directives might set\n // the \"floatLabel\" input and expect the form field view to be updated automatically.\n // e.g. autocomplete trigger. Ideally we'd get rid of this and the consumers would just\n // emit the \"stateChanges\" observable. TODO(devversion): consider removing.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _floatLabel: FloatLabelType;\n\n /** The form field appearance style. */\n @Input()\n get appearance(): MatFormFieldAppearance {\n return this._appearance;\n }\n set appearance(value: MatFormFieldAppearance) {\n const oldValue = this._appearance;\n const newAppearance = value || this._defaults?.appearance || DEFAULT_APPEARANCE;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (newAppearance !== 'fill' && newAppearance !== 'outline') {\n throw new Error(\n `MatFormField: Invalid appearance \"${newAppearance}\", valid values are \"fill\" or \"outline\".`,\n );\n }\n }\n this._appearance = newAppearance;\n if (this._appearance === 'outline' && this._appearance !== oldValue) {\n // If the appearance has been switched to `outline`, the label offset needs to be updated.\n // The update can happen once the view has been re-checked, but not immediately because\n // the view has not been updated and the notched-outline floating label is not present.\n this._needsOutlineLabelOffsetUpdateOnStable = true;\n }\n }\n private _appearance: MatFormFieldAppearance = DEFAULT_APPEARANCE;\n\n /**\n * Whether the form field should reserve space for one line of hint/error text (default)\n * or to have the spacing grow from 0px as needed based on the size of the hint/error content.\n * Note that when using dynamic sizing, layout shifts will occur when hint/error text changes.\n */\n @Input()\n get subscriptSizing(): SubscriptSizing {\n return this._subscriptSizing || this._defaults?.subscriptSizing || DEFAULT_SUBSCRIPT_SIZING;\n }\n set subscriptSizing(value: SubscriptSizing) {\n this._subscriptSizing = value || this._defaults?.subscriptSizing || DEFAULT_SUBSCRIPT_SIZING;\n }\n private _subscriptSizing: SubscriptSizing | null = null;\n\n /** Text for the form field hint. */\n @Input()\n get hintLabel(): string {\n return this._hintLabel;\n }\n set hintLabel(value: string) {\n this._hintLabel = value;\n this._processHints();\n }\n private _hintLabel = '';\n\n _hasIconPrefix = false;\n _hasTextPrefix = false;\n _hasIconSuffix = false;\n _hasTextSuffix = false;\n\n // Unique id for the internal form field label.\n readonly _labelId = `mat-mdc-form-field-label-${nextUniqueId++}`;\n\n // Unique id for the hint label.\n readonly _hintLabelId = `mat-mdc-hint-${nextUniqueId++}`;\n\n /** State of the mat-hint and mat-error animations. */\n _subscriptAnimationState = '';\n\n /** Gets the current form field control */\n get _control(): MatFormFieldControl {\n return this._explicitFormFieldControl || this._formFieldControl;\n }\n set _control(value) {\n this._explicitFormFieldControl = value;\n }\n\n private _destroyed = new Subject();\n private _isFocused: boolean | null = null;\n private _explicitFormFieldControl: MatFormFieldControl;\n private _needsOutlineLabelOffsetUpdateOnStable = false;\n\n constructor(\n public _elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef,\n private _ngZone: NgZone,\n private _dir: Directionality,\n private _platform: Platform,\n @Optional()\n @Inject(MAT_FORM_FIELD_DEFAULT_OPTIONS)\n private _defaults?: MatFormFieldDefaultOptions,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n /**\n * @deprecated not needed, to be removed.\n * @breaking-change 17.0.0 remove this param\n */\n @Inject(DOCUMENT) _unusedDocument?: any,\n ) {\n if (_defaults) {\n if (_defaults.appearance) {\n this.appearance = _defaults.appearance;\n }\n this._hideRequiredMarker = Boolean(_defaults?.hideRequiredMarker);\n if (_defaults.color) {\n this.color = _defaults.color;\n }\n }\n }\n\n ngAfterViewInit() {\n // Initial focus state sync. This happens rarely, but we want to account for\n // it in case the form field control has \"focused\" set to true on init.\n this._updateFocusState();\n // Enable animations now. This ensures we don't animate on initial render.\n this._subscriptAnimationState = 'enter';\n // Because the above changes a value used in the template after it was checked, we need\n // to trigger CD or the change might not be reflected if there is no other CD scheduled.\n this._changeDetectorRef.detectChanges();\n }\n\n ngAfterContentInit() {\n this._assertFormFieldControl();\n this._initializeControl();\n this._initializeSubscript();\n this._initializePrefixAndSuffix();\n this._initializeOutlineLabelOffsetSubscriptions();\n }\n\n ngAfterContentChecked() {\n this._assertFormFieldControl();\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Gets the id of the label element. If no label is present, returns `null`.\n */\n getLabelId(): string | null {\n return this._hasFloatingLabel() ? this._labelId : null;\n }\n\n /**\n * Gets an ElementRef for the element that a overlay attached to the form field\n * should be positioned relative to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this._textField || this._elementRef;\n }\n\n /** Animates the placeholder up and locks it in position. */\n _animateAndLockLabel(): void {\n // This is for backwards compatibility only. Consumers of the form field might use\n // this method. e.g. the autocomplete trigger. This method has been added to the non-MDC\n // form field because setting \"floatLabel\" to \"always\" caused the label to float without\n // animation. This is different in MDC where the label always animates, so this method\n // is no longer necessary. There doesn't seem any benefit in adding logic to allow changing\n // the floating label state without animations. The non-MDC implementation was inconsistent\n // because it always animates if \"floatLabel\" is set away from \"always\".\n // TODO(devversion): consider removing this method when releasing the MDC form field.\n if (this._hasFloatingLabel()) {\n this.floatLabel = 'always';\n }\n }\n\n /** Initializes the registered form field control. */\n private _initializeControl() {\n const control = this._control;\n\n if (control.controlType) {\n this._elementRef.nativeElement.classList.add(\n `mat-mdc-form-field-type-${control.controlType}`,\n );\n }\n\n // Subscribe to changes in the child control state in order to update the form field UI.\n control.stateChanges.subscribe(() => {\n this._updateFocusState();\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n\n // Run change detection if the value changes.\n if (control.ngControl && control.ngControl.valueChanges) {\n control.ngControl.valueChanges\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n }\n\n private _checkPrefixAndSuffixTypes() {\n this._hasIconPrefix = !!this._prefixChildren.find(p => !p._isText);\n this._hasTextPrefix = !!this._prefixChildren.find(p => p._isText);\n this._hasIconSuffix = !!this._suffixChildren.find(s => !s._isText);\n this._hasTextSuffix = !!this._suffixChildren.find(s => s._isText);\n }\n\n /** Initializes the prefix and suffix containers. */\n private _initializePrefixAndSuffix() {\n this._checkPrefixAndSuffixTypes();\n // Mark the form field as dirty whenever the prefix or suffix children change. This\n // is necessary because we conditionally display the prefix/suffix containers based\n // on whether there is projected content.\n merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {\n this._checkPrefixAndSuffixTypes();\n this._changeDetectorRef.markForCheck();\n });\n }\n\n /**\n * Initializes the subscript by validating hints and synchronizing \"aria-describedby\" ids\n * with the custom form field control. Also subscribes to hint and error changes in order\n * to be able to validate and synchronize ids on change.\n */\n private _initializeSubscript() {\n // Re-validate when the number of hints changes.\n this._hintChildren.changes.subscribe(() => {\n this._processHints();\n this._changeDetectorRef.markForCheck();\n });\n\n // Update the aria-described by when the number of errors changes.\n this._errorChildren.changes.subscribe(() => {\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n\n // Initial mat-hint validation and subscript describedByIds sync.\n this._validateHints();\n this._syncDescribedByIds();\n }\n\n /** Throws an error if the form field's control is missing. */\n private _assertFormFieldControl() {\n if (!this._control && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldMissingControlError();\n }\n }\n\n private _updateFocusState() {\n // Usually the MDC foundation would call \"activateFocus\" and \"deactivateFocus\" whenever\n // certain DOM events are emitted. This is not possible in our implementation of the\n // form field because we support abstract form field controls which are not necessarily\n // of type input, nor do we have a reference to a native form field control element. Instead\n // we handle the focus by checking if the abstract form field control focused state changes.\n if (this._control.focused && !this._isFocused) {\n this._isFocused = true;\n this._lineRipple?.activate();\n } else if (!this._control.focused && (this._isFocused || this._isFocused === null)) {\n this._isFocused = false;\n this._lineRipple?.deactivate();\n }\n\n this._textField?.nativeElement.classList.toggle(\n 'mdc-text-field--focused',\n this._control.focused,\n );\n }\n\n /**\n * The floating label in the docked state needs to account for prefixes. The horizontal offset\n * is calculated whenever the appearance changes to `outline`, the prefixes change, or when the\n * form field is added to the DOM. This method sets up all subscriptions which are needed to\n * trigger the label offset update. In general, we want to avoid performing measurements often,\n * so we rely on the `NgZone` as indicator when the offset should be recalculated, instead of\n * checking every change detection cycle.\n */\n private _initializeOutlineLabelOffsetSubscriptions() {\n // Whenever the prefix changes, schedule an update of the label offset.\n this._prefixChildren.changes.subscribe(\n () => (this._needsOutlineLabelOffsetUpdateOnStable = true),\n );\n\n // Note that we have to run outside of the `NgZone` explicitly, in order to avoid\n // throwing users into an infinite loop if `zone-patch-rxjs` is included.\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (this._needsOutlineLabelOffsetUpdateOnStable) {\n this._needsOutlineLabelOffsetUpdateOnStable = false;\n this._updateOutlineLabelOffset();\n }\n });\n });\n\n this._dir.change\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => (this._needsOutlineLabelOffsetUpdateOnStable = true));\n }\n\n /** Whether the floating label should always float or not. */\n _shouldAlwaysFloat() {\n return this.floatLabel === 'always';\n }\n\n _hasOutline() {\n return this.appearance === 'outline';\n }\n\n /**\n * Whether the label should display in the infix. Labels in the outline appearance are\n * displayed as part of the notched-outline and are horizontally offset to account for\n * form field prefix content. This won't work in server side rendering since we cannot\n * measure the width of the prefix container. To make the docked label appear as if the\n * right offset has been calculated, we forcibly render the label inside the infix. Since\n * the label is part of the infix, the label cannot overflow the prefix content.\n */\n _forceDisplayInfixLabel() {\n return !this._platform.isBrowser && this._prefixChildren.length && !this._shouldLabelFloat();\n }\n\n _hasFloatingLabel() {\n return !!this._labelChildNonStatic || !!this._labelChildStatic;\n }\n\n _shouldLabelFloat() {\n return this._control.shouldLabelFloat || this._shouldAlwaysFloat();\n }\n\n /**\n * Determines whether a class from the AbstractControlDirective\n * should be forwarded to the host element.\n */\n _shouldForward(prop: keyof AbstractControlDirective): boolean {\n const control = this._control ? this._control.ngControl : null;\n return control && control[prop];\n }\n\n /** Determines whether to display hints or errors. */\n _getDisplayedMessages(): 'error' | 'hint' {\n return this._errorChildren && this._errorChildren.length > 0 && this._control.errorState\n ? 'error'\n : 'hint';\n }\n\n /** Handle label resize events. */\n _handleLabelResized() {\n this._refreshOutlineNotchWidth();\n }\n\n /** Refreshes the width of the outline-notch, if present. */\n _refreshOutlineNotchWidth() {\n if (!this._hasOutline() || !this._floatingLabel || !this._shouldLabelFloat()) {\n this._notchedOutline?._setNotchWidth(0);\n } else {\n this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());\n }\n }\n\n /** Does any extra processing that is required when handling the hints. */\n private _processHints() {\n this._validateHints();\n this._syncDescribedByIds();\n }\n\n /**\n * Ensure that there is a maximum of one of each \"mat-hint\" alignment specified. The hint\n * label specified set through the input is being considered as \"start\" aligned.\n *\n * This method is a noop if Angular runs in production mode.\n */\n private _validateHints() {\n if (this._hintChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n let startHint: MatHint;\n let endHint: MatHint;\n this._hintChildren.forEach((hint: MatHint) => {\n if (hint.align === 'start') {\n if (startHint || this.hintLabel) {\n throw getMatFormFieldDuplicatedHintError('start');\n }\n startHint = hint;\n } else if (hint.align === 'end') {\n if (endHint) {\n throw getMatFormFieldDuplicatedHintError('end');\n }\n endHint = hint;\n }\n });\n }\n }\n\n /**\n * Sets the list of element IDs that describe the child control. This allows the control to update\n * its `aria-describedby` attribute accordingly.\n */\n private _syncDescribedByIds() {\n if (this._control) {\n let ids: string[] = [];\n\n // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\n if (\n this._control.userAriaDescribedBy &&\n typeof this._control.userAriaDescribedBy === 'string'\n ) {\n ids.push(...this._control.userAriaDescribedBy.split(' '));\n }\n\n if (this._getDisplayedMessages() === 'hint') {\n const startHint = this._hintChildren\n ? this._hintChildren.find(hint => hint.align === 'start')\n : null;\n const endHint = this._hintChildren\n ? this._hintChildren.find(hint => hint.align === 'end')\n : null;\n\n if (startHint) {\n ids.push(startHint.id);\n } else if (this._hintLabel) {\n ids.push(this._hintLabelId);\n }\n\n if (endHint) {\n ids.push(endHint.id);\n }\n } else if (this._errorChildren) {\n ids.push(...this._errorChildren.map(error => error.id));\n }\n\n this._control.setDescribedByIds(ids);\n }\n }\n\n /**\n * Updates the horizontal offset of the label in the outline appearance. In the outline\n * appearance, the notched-outline and label are not relative to the infix container because\n * the outline intends to surround prefixes, suffixes and the infix. This means that the\n * floating label by default overlaps prefixes in the docked state. To avoid this, we need to\n * horizontally offset the label by the width of the prefix container. The MDC text-field does\n * not need to do this because they use a fixed width for prefixes. Hence, they can simply\n * incorporate the horizontal offset into their default text-field styles.\n */\n private _updateOutlineLabelOffset() {\n if (!this._platform.isBrowser || !this._hasOutline() || !this._floatingLabel) {\n return;\n }\n const floatingLabel = this._floatingLabel.element;\n // If no prefix is displayed, reset the outline label offset from potential\n // previous label offset updates.\n if (!(this._iconPrefixContainer || this._textPrefixContainer)) {\n floatingLabel.style.transform = '';\n return;\n }\n // If the form field is not attached to the DOM yet (e.g. in a tab), we defer\n // the label offset update until the zone stabilizes.\n if (!this._isAttachedToDom()) {\n this._needsOutlineLabelOffsetUpdateOnStable = true;\n return;\n }\n const iconPrefixContainer = this._iconPrefixContainer?.nativeElement;\n const textPrefixContainer = this._textPrefixContainer?.nativeElement;\n const iconPrefixContainerWidth = iconPrefixContainer?.getBoundingClientRect().width ?? 0;\n const textPrefixContainerWidth = textPrefixContainer?.getBoundingClientRect().width ?? 0;\n // If the directionality is RTL, the x-axis transform needs to be inverted. This\n // is because `transformX` does not change based on the page directionality.\n const negate = this._dir.value === 'rtl' ? '-1' : '1';\n const prefixWidth = `${iconPrefixContainerWidth + textPrefixContainerWidth}px`;\n const labelOffset = `var(--mat-mdc-form-field-label-offset-x, 0px)`;\n const labelHorizontalOffset = `calc(${negate} * (${prefixWidth} + ${labelOffset}))`;\n\n // Update the translateX of the floating label to account for the prefix container,\n // but allow the CSS to override this setting via a CSS variable when the label is\n // floating.\n floatingLabel.style.transform = `var(\n --mat-mdc-form-field-label-transform,\n ${FLOATING_LABEL_DEFAULT_DOCKED_TRANSFORM} translateX(${labelHorizontalOffset})\n )`;\n }\n\n /** Checks whether the form field is attached to the DOM. */\n private _isAttachedToDom(): boolean {\n const element: HTMLElement = this._elementRef.nativeElement;\n if (element.getRootNode) {\n const rootNode = element.getRootNode();\n // If the element is inside the DOM the root node will be either the document\n // or the closest shadow root, otherwise it'll be the element itself.\n return rootNode && rootNode !== element;\n }\n // Otherwise fall back to checking if it's in the document. This doesn't account for\n // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n return document.documentElement!.contains(element);\n }\n}\n","export const TIMETABLE_FEATURE_KEY = 'timetable';\n","import { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\n\n/**\n * Returns an Observable that mirrors the source Observable, but will call a specified function when\n * the source terminates on complete or error.\n * The specified function will also be called when the subscriber explicitly unsubscribes.\n *\n * ## Examples\n *\n * Execute callback function when the observable completes\n *\n * ```ts\n * import { interval, take, finalize } from 'rxjs';\n *\n * // emit value in sequence every 1 second\n * const source = interval(1000);\n * const example = source.pipe(\n * take(5), //take only the first 5 values\n * finalize(() => console.log('Sequence complete')) // Execute when the observable completes\n * );\n * const subscribe = example.subscribe(val => console.log(val));\n *\n * // results:\n * // 0\n * // 1\n * // 2\n * // 3\n * // 4\n * // 'Sequence complete'\n * ```\n *\n * Execute callback function when the subscriber explicitly unsubscribes\n *\n * ```ts\n * import { interval, finalize, tap, noop, timer } from 'rxjs';\n *\n * const source = interval(100).pipe(\n * finalize(() => console.log('[finalize] Called')),\n * tap({\n * next: () => console.log('[next] Called'),\n * error: () => console.log('[error] Not called'),\n * complete: () => console.log('[tap complete] Not called')\n * })\n * );\n *\n * const sub = source.subscribe({\n * next: x => console.log(x),\n * error: noop,\n * complete: () => console.log('[complete] Not called')\n * });\n *\n * timer(150).subscribe(() => sub.unsubscribe());\n *\n * // results:\n * // '[next] Called'\n * // 0\n * // '[finalize] Called'\n * ```\n *\n * @param callback Function to be called when source terminates.\n * @return A function that returns an Observable that mirrors the source, but\n * will call the specified function on termination.\n */\nexport function finalize(callback: () => void): MonoTypeOperatorFunction {\n return operate((source, subscriber) => {\n // TODO: This try/finally was only added for `useDeprecatedSynchronousErrorHandling`.\n // REMOVE THIS WHEN THAT HOT GARBAGE IS REMOVED IN V8.\n try {\n source.subscribe(subscriber);\n } finally {\n subscriber.add(callback);\n }\n });\n}\n","/**\n * Todo: move this file to a more logical location. It is only imported in 2 locations in @fcom/common/components, so maybe move under @fcom/common\n * Similar with CountryState, CountryLanguage interfaces\n */\n\nimport { CountryState, CountryLanguage } from '../interfaces';\n\n// declare const DefinedConstants;\n// const ALLOWED_LOCALES = DefinedConstants.ALLOWED_LOCALES;\n// const SHOW_IN_LANGUAGE_SELECTION = DefinedConstants.SHOW_IN_LANGUAGE_SELECTION;\nconst ALLOWED_LOCALES = {\n 'master-en': 'en_GB',\n 'at-de': 'de_AT',\n 'at-en': 'en_AT',\n 'au-en': 'en_AU',\n 'be-en': 'en_BE',\n 'ca-en': 'en_CA',\n 'ca-fr': 'fr_CA',\n 'ch-de': 'de_CH',\n 'ch-en': 'en_CH',\n 'ch-fr': 'fr_CH',\n 'cn-en': 'en_CN',\n 'cn-zh': 'zh_CN',\n 'cz-en': 'en_CZ',\n 'de-de': 'de_DE',\n 'de-en': 'en_DE',\n 'dk-da': 'da_DK',\n 'dk-en': 'en_DK',\n 'ee-en': 'en_EE',\n 'ee-et': 'et_EE',\n en: 'en',\n 'es-en': 'en_ES',\n 'es-es': 'es_ES',\n 'fi-en': 'en_FI',\n 'fi-fi': 'fi_FI',\n 'fi-sv': 'sv_FI',\n 'fr-en': 'en_FR',\n 'fr-fr': 'fr_FR',\n 'gb-en': 'en_GB',\n 'hk-zh': 'zh_HK',\n 'hk-en': 'en_HK',\n 'hu-en': 'en_HU',\n 'is-en': 'en_IS',\n 'ie-en': 'en_IE',\n 'il-en': 'en_IL',\n 'in-en': 'en_IN',\n 'it-en': 'en_IT',\n 'it-it': 'it_IT',\n 'jp-en': 'en_JP',\n 'jp-ja': 'ja_JP',\n 'kr-en': 'en_KR',\n 'kr-ko': 'ko_KR',\n 'lt-en': 'en_LT',\n 'lv-en': 'en_LV',\n 'nl-en': 'en_NL',\n 'no-en': 'en_NO',\n 'no-no': 'no_NO',\n 'pl-en': 'en_PL',\n 'pl-pl': 'pl_PL',\n 'ru-en': 'en_RU',\n 'ru-ru': 'ru_RU',\n 'se-en': 'en_SE',\n 'se-sv': 'sv_SE',\n 'sg-en': 'en_SG',\n 'th-en': 'en_TH',\n 'us-en': 'en_US',\n};\nconst SHOW_IN_LANGUAGE_SELECTION = [\n 'au-en',\n 'at-de',\n 'at-en',\n 'be-en',\n 'ca-en',\n 'ca-fr',\n 'cn-zh',\n 'cn-en',\n 'cz-en',\n 'dk-da',\n 'dk-en',\n 'ee-et',\n 'ee-en',\n 'fi-fi',\n 'fi-sv',\n 'fi-en',\n 'fr-fr',\n 'fr-en',\n 'de-de',\n 'de-en',\n 'hk-zh',\n 'hk-en',\n 'hu-en',\n 'is-en',\n 'in-en',\n 'ie-en',\n 'il-en',\n 'it-it',\n 'it-en',\n 'jp-ja',\n 'jp-en',\n 'kr-ko',\n 'kr-en',\n 'lv-en',\n 'lt-en',\n 'no-no',\n 'no-en',\n 'pl-pl',\n 'pl-en',\n 'ru-ru',\n 'ru-en',\n 'sg-en',\n 'es-es',\n 'es-en',\n 'se-sv',\n 'se-en',\n 'ch-de',\n 'ch-fr',\n 'ch-en',\n 'th-en',\n 'nl-en',\n 'gb-en',\n 'us-en',\n 'en',\n];\n\nconst languageConfs: CountryState[] = [\n {\n name: 'Australia',\n code: 'AU',\n languages: [{ name: 'English', code: 'au-en' }],\n },\n {\n name: 'Austria',\n code: 'AT',\n languages: [\n { name: 'Deutsch', code: 'at-de' },\n { name: 'English', code: 'at-en' },\n ],\n },\n {\n name: 'Belgium',\n code: 'BE',\n languages: [{ name: 'English', code: 'be-en' }],\n },\n {\n name: 'Canada',\n code: 'CA',\n languages: [\n { name: 'English', code: 'ca-en' },\n { name: 'Français', code: 'ca-fr' },\n ],\n },\n {\n name: 'China',\n code: 'CN',\n languages: [\n { name: '简体中文', code: 'cn-zh', translation: 'Chinese' },\n { name: 'English', code: 'cn-en' },\n ],\n },\n {\n name: 'Czech Republic',\n code: 'CZ',\n languages: [{ name: 'English', code: 'cz-en' }],\n },\n {\n name: 'Denmark',\n code: 'DK',\n languages: [\n { name: 'Dansk', code: 'dk-da' },\n { name: 'English', code: 'dk-en' },\n ],\n },\n {\n name: 'Estonia',\n code: 'EE',\n languages: [\n { name: 'Eesti', code: 'ee-et' },\n { name: 'English', code: 'ee-en' },\n ],\n },\n {\n name: 'Finland',\n code: 'FI',\n languages: [\n { name: 'Suomeksi', code: 'fi-fi' },\n { name: 'Svenska', code: 'fi-sv' },\n { name: 'English', code: 'fi-en' },\n ],\n },\n {\n name: 'France',\n code: 'FR',\n languages: [\n { name: 'Français', code: 'fr-fr' },\n { name: 'English', code: 'fr-en' },\n ],\n },\n {\n name: 'Germany',\n code: 'DE',\n languages: [\n { name: 'Deutsch', code: 'de-de' },\n { name: 'English', code: 'de-en' },\n ],\n },\n {\n name: 'Hong Kong, China',\n code: 'HK',\n languages: [\n { name: '繁體中文', code: 'hk-zh' },\n { name: 'English', code: 'hk-en' },\n ],\n },\n {\n name: 'Hungary',\n code: 'HU',\n languages: [{ name: 'English', code: 'hu-en' }],\n },\n {\n name: 'Iceland',\n code: 'IS',\n languages: [{ name: 'English', code: 'is-en' }],\n },\n {\n name: 'India',\n code: 'IN',\n languages: [{ name: 'English', code: 'in-en' }],\n },\n {\n name: 'Ireland',\n code: 'IE',\n languages: [{ name: 'English', code: 'ie-en' }],\n },\n {\n name: 'Israel',\n code: 'IL',\n languages: [{ name: 'English', code: 'il-en' }],\n },\n {\n name: 'Italy',\n code: 'IT',\n languages: [\n { name: 'Italiano', code: 'it-it' },\n { name: 'English', code: 'it-en' },\n ],\n },\n {\n name: 'Japan',\n code: 'JP',\n languages: [\n { name: '日本語', code: 'jp-ja', translation: 'Japanese' },\n { name: 'English', code: 'jp-en' },\n ],\n },\n {\n name: 'Korea',\n code: 'KR',\n languages: [\n { name: '한국어', code: 'kr-ko', translation: 'Korean' },\n { name: 'English', code: 'kr-en' },\n ],\n },\n {\n name: 'Latvia',\n code: 'LV',\n languages: [{ name: 'English', code: 'lv-en' }],\n },\n {\n name: 'Lithuania',\n code: 'LT',\n languages: [{ name: 'English', code: 'lt-en' }],\n },\n {\n name: 'The Netherlands',\n code: 'NL',\n languages: [{ name: 'English', code: 'nl-en' }],\n },\n {\n name: 'Norway',\n code: 'NO',\n languages: [\n { name: 'Norsk', code: 'no-no' },\n { name: 'English', code: 'no-en' },\n ],\n },\n {\n name: 'Poland',\n code: 'PL',\n languages: [\n { name: 'Polski', code: 'pl-pl' },\n { name: 'English', code: 'pl-en' },\n ],\n },\n {\n name: 'Russia',\n code: 'RU',\n languages: [\n { name: 'Русский', code: 'ru-ru', translation: 'Russian' },\n { name: 'English', code: 'ru-en' },\n ],\n },\n {\n name: 'Singapore',\n code: 'SG',\n languages: [{ name: 'English', code: 'sg-en' }],\n },\n {\n name: 'Spain',\n code: 'ES',\n languages: [\n { name: 'Español', code: 'es-es' },\n { name: 'English', code: 'es-en' },\n ],\n },\n {\n name: 'Sweden',\n code: 'SE',\n languages: [\n { name: 'Svenska', code: 'se-sv' },\n { name: 'English', code: 'se-en' },\n ],\n },\n {\n name: 'Switzerland',\n code: 'CH',\n languages: [\n { name: 'Deutsch', code: 'ch-de' },\n { name: 'Français', code: 'ch-fr' },\n { name: 'English', code: 'ch-en' },\n ],\n },\n {\n name: 'Thailand',\n code: 'TH',\n languages: [{ name: 'English', code: 'th-en' }],\n },\n {\n name: 'United Kingdom',\n code: 'GB',\n languages: [{ name: 'English', code: 'gb-en' }],\n },\n {\n name: 'United States',\n code: 'US',\n languages: [{ name: 'English', code: 'us-en' }],\n },\n {\n name: 'International',\n code: 'INT',\n languages: [{ name: 'English', code: 'en' }],\n },\n {\n name: 'International Master',\n code: 'MASTER',\n languages: [{ name: 'English', code: 'master-en' }],\n },\n];\n\nconst filterLanguageConfs = (lconfs: CountryState[], filterFunc: (arg0: CountryLanguage) => boolean): CountryState[] =>\n lconfs\n .map((ls: CountryState) => ({\n ...ls,\n languages: ls.languages.filter(filterFunc),\n }))\n .filter((ls) => ls.languages.length > 0);\n\nconst allowedConfs: CountryState[] = filterLanguageConfs(languageConfs, (l) => l.code in ALLOWED_LOCALES);\nconst shownConfs: CountryState[] = filterLanguageConfs(\n languageConfs,\n (l) => SHOW_IN_LANGUAGE_SELECTION.indexOf(l.code) !== -1\n);\n\nexport { allowedConfs, shownConfs };\n","import { Injectable } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\n\nexport type TranslateOptions = {\n /** If errors should be triggered for keys that miss translations. Default is true. */\n logErrors?: boolean;\n};\n\nexport abstract class LanguageService {\n static TTL: number = 7 * 24 * 60 * 60 * 1000;\n static FALLBACK_LANGUAGE = 'en';\n allowableLangs: string[] = [];\n\n abstract verifyLangAllowed(lang: string): void;\n abstract setLang(lang: string): void;\n abstract get countryCode(): Observable;\n abstract get cookieValue(): string;\n abstract get lang(): Observable;\n abstract get langKey(): Observable;\n abstract get locale(): Observable;\n abstract get localeValue(): string; // ex. 'en_HK' for hk-en\n abstract get langValue(): string; // ex. 'hk-en' for hk-en\n abstract get langKeyValue(): string; // ex. 'EN' for hk-en\n abstract get ddsLocaleValue(): any; // ex. { countrySite: 'HK', language: 'GB' } for hk-en\n abstract get localizations(): Observable;\n abstract translate(key: string | string[], args?: any, options?: TranslateOptions): Observable;\n abstract translate(key: string | string[], args?: any, options?: TranslateOptions): Observable;\n abstract translateMultiple(keys: string[], args?: any, options?: TranslateOptions): Observable;\n abstract translateMultiple(keys: string[], args?: any, options?: TranslateOptions): Observable;\n}\n\n@Injectable()\nexport class MockLanguageService extends LanguageService {\n constructor() {\n super();\n }\n\n get countryCode(): Observable {\n return of('');\n }\n get cookieValue(): string {\n return '';\n }\n get lang(): Observable {\n return of('');\n }\n get langKey(): Observable {\n return of('');\n }\n get locale(): Observable {\n return of('');\n }\n get localeValue(): string {\n return '';\n }\n get langValue(): string {\n return '';\n }\n get langKeyValue(): string {\n return '';\n }\n get ddsLocaleValue(): any {\n return;\n }\n get localizations(): Observable {\n return of();\n }\n\n /* istanbul ignore next */\n verifyLangAllowed(_lang: string): void {}\n\n /* istanbul ignore next */\n setLang(_lang: string): void {}\n\n translate(key: string | string[], _args?: any, _options?: TranslateOptions): Observable {\n if (Array.isArray(key)) {\n return of(key[key.length - 1]);\n }\n return of(key);\n }\n\n translateMultiple(keys: string[], _args?: any, _options?: TranslateOptions): Observable {\n return of(keys);\n }\n}\n","import { MonoTypeOperatorFunction } from '../types';\nimport { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Emits only the first `count` values emitted by the source Observable.\n *\n * Takes the first `count` values from the source, then\n * completes.\n *\n * ![](take.png)\n *\n * `take` returns an Observable that emits only the first `count` values emitted\n * by the source Observable. If the source emits fewer than `count` values then\n * all of its values are emitted. After that, it completes, regardless if the\n * source completes.\n *\n * ## Example\n *\n * Take the first 5 seconds of an infinite 1-second interval Observable\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const intervalCount = interval(1000);\n * const takeFive = intervalCount.pipe(take(5));\n * takeFive.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 0\n * // 1\n * // 2\n * // 3\n * // 4\n * ```\n *\n * @see {@link takeLast}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @param count The maximum number of `next` values to emit.\n * @return A function that returns an Observable that emits only the first\n * `count` values emitted by the source Observable, or all of the values from\n * the source if the source emits fewer than `count` values.\n */\nexport function take(count: number): MonoTypeOperatorFunction {\n return count <= 0\n ? // If we are taking no values, that's empty.\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(\n createOperatorSubscriber(subscriber, (value) => {\n // Increment the number of values we have seen,\n // then check it against the allowed count to see\n // if we are still letting values through.\n if (++seen <= count) {\n subscriber.next(value);\n // If we have met or passed our allowed count,\n // we need to complete. We have to do <= here,\n // because re-entrant code will increment `seen` twice.\n if (count <= seen) {\n subscriber.complete();\n }\n }\n })\n );\n });\n}\n","export enum Aircraft {\n ATR = 'AT7',\n E90 = 'E90',\n A319 = '319',\n A320 = '320',\n A321 = '321',\n A32B = '32B', // A321 Sharklets\n A330 = '333',\n A350 = '359',\n}\n","import { FinnairAmount, SeatmapSvgAndControlData } from '@fcom/dapi/api/models';\nimport { SeatCharacteristics } from '@fcom/dapi/interfaces';\n\nimport { Aircraft } from './aircrafts';\n\nexport const SEAT_TYPE_EXIT = 'EXIT';\n\nexport enum SeatMapStatus {\n /**\n * No request for seat map has been placed.\n */\n INITIAL,\n\n /**\n * A request for fetching the seat map is ongoing.\n */\n PENDING,\n\n /**\n * The request for the seat map failed.\n */\n LOAD_ERROR,\n\n /**\n * The seat map request passed succesfully and should be in the state.\n */\n OK,\n\n /**\n * We don't have availability for current segment\n */\n OK_NO_AVAILABILITY,\n}\n\nexport const AIRCRAFT_TRANSLATION_MAP = {\n [Aircraft.ATR]: 'atr',\n [Aircraft.E90]: 'embraer',\n [Aircraft.A319]: 'a319',\n [Aircraft.A320]: 'a320',\n [Aircraft.A32B]: 'a321',\n [Aircraft.A321]: 'a321',\n [Aircraft.A330]: 'a330',\n [Aircraft.A350]: 'a350',\n};\n\nexport enum SeatTypeCabinClass {\n // Cabin class strings that can be found from SeatType like A350_ECONOMY_COMFORT\n ECONOMY = 'ECONOMY',\n BUSINESS = 'BUSINESS',\n PREMIUMECO = 'ECOPREMIUM',\n}\n\nexport interface SeatMapForFlight {\n flightId: string;\n seatMap: SeatmapSvgAndControlData;\n}\n\nexport interface SeatSelectionForFlight {\n seatNumber: string;\n seatType: string;\n characteristics: SeatCharacteristics[];\n paid?: boolean;\n ticketed?: boolean;\n modifiable?: boolean;\n travelerId: string;\n originalPricePerItem?: FinnairAmount;\n pricePerItem?: FinnairAmount;\n}\n\nexport interface FlightSeatSelections {\n [travelerId: string]: SeatSelectionForFlight;\n}\n\nexport interface SeatMapWithStatus {\n status: SeatMapStatus;\n seatMap?: SeatmapSvgAndControlData;\n selections?: FlightSeatSelections;\n}\n\nexport interface SeatMapState {\n [cartFlightId: string]: SeatMapWithStatus;\n}\n","import { Amount } from '@fcom/dapi/interfaces';\nimport {\n DateFormat,\n GlobalBookingTravelClass,\n isNull,\n isPresent,\n LocalDate,\n quantityOfMonths,\n rangeFrom,\n} from '@fcom/core';\nimport { LowestPriceOfPeriod, Price } from '@fcom/dapi/api/models';\n\nimport {\n BasePriceCalendarParams,\n CalendarPrices,\n DatePickerPrices,\n GlobalBookingTripDates,\n HistogramBar,\n PriceCalendarWithPricesParams,\n TripType,\n} from '../interfaces';\n\nexport const priceCalendarBaseParamsAreValid = ({\n origin,\n destination,\n tripType,\n}: Partial): boolean => isPresent(origin) && isPresent(destination) && isPresent(tripType);\n\nexport const priceCalendarPriceParamsAreValid = ({\n travelClass,\n paxAmount,\n origin,\n destination,\n tripType,\n}: Partial): boolean => {\n if (!travelClass || !paxAmount || !priceCalendarBaseParamsAreValid({ origin, destination, tripType })) {\n return false;\n }\n const travelClassIsValid = isPresent(travelClass);\n const totalPax = Object.values(paxAmount).reduce((totalPax, paxTypeAmount) => totalPax + paxTypeAmount, 0);\n const paxAmountIsValid = paxAmount.adults >= 1 && totalPax <= 9;\n return travelClassIsValid && paxAmountIsValid;\n};\n\nexport const isPriceCalendarWithPricesParams = (\n params: Partial\n): params is PriceCalendarWithPricesParams => priceCalendarPriceParamsAreValid(params);\n\nexport const getStartingFromPrice = (\n prices: DatePickerPrices,\n tripType: TripType,\n { departureDate, returnDate }: GlobalBookingTripDates\n): Amount => {\n return prices?.calendar?.[tripType === TripType.ONEWAY ? departureDate?.id : returnDate?.id]?.amount;\n};\n\nexport const createHistogramData = (\n priceResponse: LowestPriceOfPeriod,\n dates: string[],\n dateTranslations: Record\n): HistogramBar[] => {\n let histogramBarData = undefined;\n if (dates.length === 0) {\n return histogramBarData;\n }\n\n const lowestPriceForMonth = priceResponse?.lowestPriceForMonth;\n const now = LocalDate.now();\n\n histogramBarData = rangeFrom(\n 0,\n quantityOfMonths(new LocalDate(dates[0]), new LocalDate(dates[dates.length - 1]))\n ).map((_, currentIndex) => {\n const current = now.firstDayOfMonth.plusMonths(currentIndex);\n const date = current.id.substring(0, 7);\n\n return {\n amount: date in lowestPriceForMonth ? String(lowestPriceForMonth[date]?.price) : '0',\n currencyCode: priceResponse?.currency,\n text: new DateFormat(dateTranslations).format(current, DateFormat.MONTH_SHORT),\n noFlight: date in lowestPriceForMonth ? lowestPriceForMonth[date]?.noFlight : true,\n index: currentIndex,\n ...(now.lt(current) && current.localMonth === 1 && { spacer: { value: String(current.localYear) } }),\n };\n });\n\n return histogramBarData;\n};\n\nexport const mapInstantSearchPricesToCalendarPrices = (priceResponse: LowestPriceOfPeriod): CalendarPrices => {\n const lowestYearlyPrice =\n priceResponse?.prices?.length > 0\n ? Math.min(...priceResponse.prices.map(({ price }: Price) => price).filter((p) => !isNull(p)))\n : Infinity;\n\n return (\n priceResponse?.prices?.reduce(\n (allPrices: CalendarPrices, { date, price, noFlight }: Price) => ({\n ...allPrices,\n [date]: price\n ? {\n amount: {\n amount: price ? String(price) : null,\n currencyCode: priceResponse?.currency,\n },\n isLowestPrice: price === lowestYearlyPrice,\n noFlight,\n }\n : undefined,\n }),\n {}\n ) ?? {}\n );\n};\n\nexport const getBookingWidgetCabinClass = (\n travelClass: GlobalBookingTravelClass,\n isCorporate: boolean,\n corporateTravelClassLimitEnabled: boolean,\n isMulticity: boolean\n): GlobalBookingTravelClass => {\n if ((corporateTravelClassLimitEnabled && isCorporate) || isMulticity) {\n return travelClass;\n }\n return travelClass === GlobalBookingTravelClass.ECONOMY ? GlobalBookingTravelClass.MIXED : travelClass;\n};\n\nexport const calendarDatesToGlobalBookingTripDates = (\n calendarDates: [string] | [string, string]\n): GlobalBookingTripDates => {\n const [nextDep, nextRet] = calendarDates;\n return {\n departureDate: nextDep ? new LocalDate(nextDep) : undefined,\n returnDate: nextRet ? new LocalDate(nextRet) : undefined,\n };\n};\n\nexport const shouldUpdateCalendarDates = (prev: GlobalBookingTripDates, next: GlobalBookingTripDates): boolean =>\n !(prev.departureDate?.id === next.departureDate?.id && prev.returnDate?.id === next.returnDate?.id);\n","/* eslint-disable no-underscore-dangle */\nimport { createSelector, MemoizedSelector, select } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { Amount, BoundType, PaxAmount } from '@fcom/dapi/interfaces';\nimport { isPresent, LocalDate, mergeDeep } from '@fcom/core/utils';\nimport {\n Cabin,\n FareFamily,\n FinnairAirBoundsRequest,\n FinnairBoundFareFamily,\n FinnairCabinClass,\n FinnairItineraryItemFlight,\n FareInformation,\n} from '@fcom/dapi/api/models';\nimport { GtmFlightSelectionData, GtmPurchaseFlow, OfferListFetchParams } from '@fcom/common/interfaces';\nimport { getGtmFlightSelectionDataForFareFamily } from '@fcom/common/utils/gtm.utils';\nimport { SortBy } from '@fcom/common-booking';\nimport { shouldTimeBeKept } from '@fcom/common-booking/utils/date-utils';\nimport { FlightFilters, FlightTimeOption } from '@fcom/common-booking/interfaces/flight-filters.interface';\nimport { isFlight } from '@fcom/common-booking/utils/common-booking.utils';\nimport { FLIGHT_SELECTION_CACHE_EXPIRY } from '@fcom/common/config/booking-config';\nimport {\n AirBoundsState,\n AirOffersStatus,\n BookingAppState,\n BookingFeatureState,\n FareFamilyMap,\n} from '@fcom/common/interfaces/booking';\nimport { FinnairAirBounds, FinnairBoundGroupWithLocation } from '@fcom/common/interfaces/booking/offers.interface';\n\nimport { bookingFeatureState } from './booking-feature-state.selector';\nimport { TicketSelectionParams } from '../../modules/ticket-selection/services';\n\nconst _airBoundsState = createSelector(bookingFeatureState, (_bfs: BookingFeatureState) => _bfs?.bounds);\nconst _boundStatus = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.status);\nconst _boundRefundale = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters?.refundable);\nconst _boundDepartureTime = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters?.departureTime);\nconst _boundArrivalTime = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters?.arrivalTime);\nconst _boundStopsCount = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters?.stopsCount);\nconst _boundMaxStops = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters?.maxStops);\nconst _boundCabin = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters?.cabin);\n\nconst _boundRefundableNext = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.nextFilters?.refundable);\nconst _boundDepartureTimeNext = createSelector(\n _airBoundsState,\n (_abs: AirBoundsState) => _abs?.nextFilters?.departureTime\n);\nconst _boundArrivalTimeNext = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.nextFilters?.arrivalTime);\nconst _boundStopsCountNext = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.nextFilters?.stopsCount);\nconst _boundCabinNext = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.nextFilters?.cabin);\nconst _boundMaxStopsNext = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.nextFilters?.maxStops);\n\nexport const outboundsSelector = createSelector(\n _airBoundsState,\n (airBoundsState: AirBoundsState) => airBoundsState?.outbounds\n);\nexport const inboundsSelector = createSelector(\n _airBoundsState,\n (airBoundsState: AirBoundsState) => airBoundsState?.inbounds\n);\n/**\n * TODO: It would be safer to use the inbound hash (if existing) because it has newer timestamp than outbound.\n */\nconst _boundsHash = createSelector(outboundsSelector, (_b: FinnairAirBounds) => _b?.hash);\nconst _boundsCurrency = createSelector(outboundsSelector, (_b: FinnairAirBounds) => _b?.currency);\nconst _request = createSelector(outboundsSelector, (_b: FinnairAirBounds) => _b?.request);\nconst _inboundsFareFamiliesSorting = createSelector(\n inboundsSelector,\n (_b: FinnairAirBounds) => _b?.sorting?.fareFamilies\n);\nconst _outboundsFareFamiliesSorting = createSelector(\n outboundsSelector,\n (_b: FinnairAirBounds) => _b?.sorting?.fareFamilies\n);\n\nconst _outboundsSelectedCheapestOffer = createSelector(\n _airBoundsState,\n (_b: AirBoundsState) => _b?.isSelectedCheapestOffer\n);\n\nconst _oneWayBoundsSelector = createSelector(_request, (_r) => (_r ? _r.itineraries.length === 1 : undefined));\nconst _lastRequestParams = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.lastRequestParams);\nconst _serializedLastRequestParams = createSelector(_lastRequestParams, (lastRequestParams: OfferListFetchParams) =>\n JSON.stringify(lastRequestParams)\n);\nconst _departureDate = createSelector(\n _lastRequestParams,\n (lastRequestParams: OfferListFetchParams) => lastRequestParams?.flights?.[0]?.departureDate\n);\nconst _returnDate = createSelector(\n _lastRequestParams,\n (lastRequestParams: OfferListFetchParams) => lastRequestParams?.flights?.[1]?.departureDate\n);\nconst _outboundsBoundGroupsSelector = createSelector(outboundsSelector, (_obs: FinnairAirBounds) => _obs?.boundGroups);\nconst _inboundsBoundGroupsSelector = createSelector(inboundsSelector, (_obs: FinnairAirBounds) => _obs?.boundGroups);\nexport const selectedOutboundAirBoundIdSelector = createSelector(\n _airBoundsState,\n (_abs: AirBoundsState) => _abs?.selectedOutboundAirBoundId\n);\nexport const selectedInboundAirBoundIdSelector = createSelector(\n _airBoundsState,\n (_abs: AirBoundsState) => _abs?.selectedInboundAirBoundId\n);\nconst _selectedAirBoundIdsSelector = createSelector(\n _oneWayBoundsSelector,\n selectedOutboundAirBoundIdSelector,\n selectedInboundAirBoundIdSelector,\n (oneway: boolean, outboundAirBoundId: string, inboundAirBoundId: string): string[] => {\n if (oneway) {\n return [outboundAirBoundId];\n }\n return [outboundAirBoundId, inboundAirBoundId];\n }\n);\nconst _selectedOutboundBoundsSelector = createSelector(\n _outboundsBoundGroupsSelector,\n selectedOutboundAirBoundIdSelector,\n (\n _outboundBoundGroups: FinnairBoundGroupWithLocation[] = [],\n selectedOutBoundFareFamilyId: string\n ): FinnairBoundGroupWithLocation | undefined =>\n _outboundBoundGroups.find((b: FinnairBoundGroupWithLocation) =>\n b.fareFamilies.some((ff) => ff.id === selectedOutBoundFareFamilyId)\n )\n);\nconst _selectedInboundBoundsSelector = createSelector(\n _inboundsBoundGroupsSelector,\n selectedInboundAirBoundIdSelector,\n (\n inboundBoundGroups: FinnairBoundGroupWithLocation[] = [],\n selectedInBoundFareFamilyId: string\n ): FinnairBoundGroupWithLocation | undefined =>\n inboundBoundGroups.find((b: FinnairBoundGroupWithLocation) =>\n b.fareFamilies.some((ff) => ff.id === selectedInBoundFareFamilyId)\n )\n);\nconst _selectedOutBoundAirBoundSelector = createSelector(\n _selectedOutboundBoundsSelector,\n selectedOutboundAirBoundIdSelector,\n (_b: FinnairBoundGroupWithLocation, _ffId: string): FinnairBoundFareFamily =>\n isPresent(_b) ? _b.fareFamilies.find((ff) => ff.id === _ffId) : undefined\n);\nconst _selectedInBoundAirBoundSelector = createSelector(\n _selectedInboundBoundsSelector,\n selectedInboundAirBoundIdSelector,\n (_b: FinnairBoundGroupWithLocation, _ffId: string): FinnairBoundFareFamily =>\n isPresent(_b) ? _b.fareFamilies.find((ff) => ff.id === _ffId) : undefined\n);\nconst _selectedOutboundFareFamilyCodeBoundsSelector = createSelector(\n _selectedOutBoundAirBoundSelector,\n (_ff) => _ff?.fareFamilyCode\n);\nconst _selectedInboundFareFamilyCodeBoundsSelector = createSelector(\n _selectedInBoundAirBoundSelector,\n (_ff) => _ff?.fareFamilyCode\n);\nexport const selectedOutboundIdBoundsSelector = createSelector(\n _selectedOutboundBoundsSelector,\n (_b: FinnairBoundGroupWithLocation) => _b?.sortingId\n);\nexport const selectedInboundIdBoundsSelector = createSelector(\n _selectedInboundBoundsSelector,\n (_b: FinnairBoundGroupWithLocation) => _b?.sortingId\n);\nconst _outboundFareFamilies = createSelector(outboundsSelector, (_b: FinnairAirBounds) => _b?.fareFamilies);\nconst _inboundFareFamilies = createSelector(inboundsSelector, (_b: FinnairAirBounds) => _b?.fareFamilies);\nconst _selectedOutBoundFareFamilyBenefitsSelector = createSelector(\n _outboundFareFamilies,\n _selectedOutboundFareFamilyCodeBoundsSelector,\n (_ffMap: FareFamilyMap, _ffCode: string): FareFamily => _ffMap?.[_ffCode]\n);\nconst _selectedInBoundFareFamilyBenefitsSelector = createSelector(\n _inboundFareFamilies,\n _selectedInboundFareFamilyCodeBoundsSelector,\n (_ffMap: FareFamilyMap, _ffCode: string): FareFamily => _ffMap?.[_ffCode]\n);\nconst mapItinerary = (fareFamilyCode: string, bound: FinnairBoundGroupWithLocation | undefined) => {\n if (!bound) {\n return [];\n }\n\n const fareInformation = bound.fareFamilies.find((f) => f.fareFamilyCode === fareFamilyCode)?.fareInformation;\n\n return bound.details.itinerary.filter(isFlight).map((flight, index) => ({\n ...flight,\n bookingClass: fareInformation?.[index]?.bookingClass,\n cabinClass: fareInformation?.[index]?.cabinClass as FinnairCabinClass,\n }));\n};\nconst _selectedOutBoundItinerarySelector = createSelector(\n _selectedOutboundFareFamilyCodeBoundsSelector,\n _selectedOutboundBoundsSelector,\n (_ffCode, bound): FinnairItineraryItemFlight[] => mapItinerary(_ffCode, bound)\n);\nconst _selectedInBoundItinerarySelector = createSelector(\n _selectedInboundFareFamilyCodeBoundsSelector,\n _selectedInboundBoundsSelector,\n (_ffCode, bound): FinnairItineraryItemFlight[] => mapItinerary(_ffCode, bound)\n);\nconst _fareFamilies = createSelector(_outboundFareFamilies, _inboundFareFamilies, (outboundFFs, inboundFFs) =>\n mergeDeep(outboundFFs, inboundFFs)\n);\nconst _selectedAirBoundsSortBySelector = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.sortBy);\n\nconst _flightSelectionGtmDataForAirBound = (\n bound: FinnairBoundGroupWithLocation,\n boundType: BoundType,\n paxAmount: PaxAmount\n) =>\n createSelector(\n _boundsCurrency,\n _fareFamilies,\n _lastRequestParams,\n (currencyCode: string, fareFamilyBenefitsMap: FareFamilyMap, lastRequestParams): GtmFlightSelectionData[] =>\n isPresent(currencyCode) && isPresent(fareFamilyBenefitsMap) && isPresent(paxAmount)\n ? bound.fareFamilies.map((fareFamily) =>\n getGtmFlightSelectionDataForFareFamily(\n bound.details,\n boundType,\n bound.details.itinerary,\n fareFamilyBenefitsMap[fareFamily.fareFamilyCode]?.brandName,\n fareFamily.price,\n undefined,\n fareFamily.fareInformation,\n currencyCode,\n paxAmount,\n lastRequestParams.isAward ? GtmPurchaseFlow.AWARD : GtmPurchaseFlow.BOOKING\n )\n )\n : undefined\n );\n\nconst _boundSelectionGtmDataSelectorGenerator = (\n boundType: BoundType,\n boundSelector: MemoizedSelector,\n fareFamilySelector: MemoizedSelector,\n paxAmount: PaxAmount\n) =>\n createSelector(\n boundSelector,\n fareFamilySelector,\n _boundsCurrency,\n _fareFamilies,\n _lastRequestParams,\n (\n bound: FinnairBoundGroupWithLocation,\n fareFamily: FinnairBoundFareFamily,\n currencyCode: string,\n fareFamilyBenefitsMap: FareFamilyMap,\n lastRequestParams\n ): GtmFlightSelectionData => {\n return isPresent(bound) &&\n isPresent(fareFamily) &&\n isPresent(currencyCode) &&\n isPresent(fareFamilyBenefitsMap) &&\n isPresent(paxAmount)\n ? getGtmFlightSelectionDataForFareFamily(\n bound.details,\n boundType,\n bound.details.itinerary,\n fareFamilyBenefitsMap[fareFamily.fareFamilyCode]?.brandName,\n fareFamily.price,\n undefined,\n fareFamily.fareInformation,\n currencyCode,\n paxAmount,\n lastRequestParams.isAward ? GtmPurchaseFlow.AWARD : GtmPurchaseFlow.BOOKING\n )\n : undefined;\n }\n );\n\n/**\n * Selects true or false dependending whether the selected ticket types have no baggage.\n * Handles both one way and return travel types.\n * @param {BookingOffer} offer\n */\nconst _hasZeroBaggageOnEitherBound = createSelector(\n _fareFamilies,\n _oneWayBoundsSelector,\n _selectedOutboundFareFamilyCodeBoundsSelector,\n _selectedInboundFareFamilyCodeBoundsSelector,\n (fareFamilies: FareFamilyMap, isOneWay: boolean, outboundFareFamilyCode: string, inboundFareFamilyCode: string) => {\n if (!fareFamilies) {\n return undefined;\n }\n const outboundFareFamily: FareFamily = fareFamilies[outboundFareFamilyCode];\n const outboundBaggage = outboundFareFamily?.checkedBaggage || 0;\n if (isOneWay) {\n return outboundBaggage === 0;\n }\n const inboundFareFamily: FareFamily = fareFamilies[inboundFareFamilyCode];\n const inboundBaggage = inboundFareFamily?.checkedBaggage || 0;\n return outboundBaggage === 0 || inboundBaggage === 0;\n }\n);\n\n/**\n * Selects fare families brands.\n * Handles both one way and return travel types.\n */\nconst _getSelectedFareFamiliesBrands = createSelector(\n _fareFamilies,\n _oneWayBoundsSelector,\n _selectedOutboundFareFamilyCodeBoundsSelector,\n _selectedInboundFareFamilyCodeBoundsSelector,\n (fareFamilies: FareFamilyMap, isOneWay: boolean, outboundFareFamilyCode: string, inboundFareFamilyCode: string) => {\n if (!fareFamilies) {\n return undefined;\n }\n const outboundFareFamily: FareFamily = fareFamilies[outboundFareFamilyCode];\n if (isOneWay) {\n return [outboundFareFamily.brandName];\n }\n const inboundFareFamily: FareFamily = fareFamilies[inboundFareFamilyCode];\n return [outboundFareFamily.brandName, inboundFareFamily.brandName];\n }\n);\n\nconst _boundsTotalPrice = createSelector(\n _selectedOutBoundAirBoundSelector,\n _selectedInBoundAirBoundSelector,\n _boundsCurrency,\n (outboundFareFamily, inboundFareFamily, currencyCode): Amount => {\n const totalSum = inboundFareFamily?.totalPrice || outboundFareFamily?.totalPrice;\n const amount = totalSum === '0' ? undefined : totalSum;\n\n return { amount, currencyCode };\n }\n);\n\nconst _filteredOutbounds = createSelector(\n outboundsSelector,\n _fareFamilies,\n _boundRefundale,\n _boundDepartureTime,\n _boundArrivalTime,\n _boundStopsCount,\n _boundCabin,\n _boundMaxStops,\n filterBounds\n);\n\nconst _filteredInbounds = createSelector(\n inboundsSelector,\n _fareFamilies,\n _boundRefundale,\n _boundDepartureTime,\n _boundArrivalTime,\n _boundStopsCount,\n _boundCabin,\n _boundMaxStops,\n filterBounds\n);\n\nconst _nextFilteredOutbounds = createSelector(\n outboundsSelector,\n _fareFamilies,\n _boundRefundableNext,\n _boundDepartureTimeNext,\n _boundArrivalTimeNext,\n _boundStopsCountNext,\n _boundCabinNext,\n _boundMaxStopsNext,\n filterBounds\n);\n\nconst _nextFilteredInbounds = createSelector(\n inboundsSelector,\n _fareFamilies,\n _boundRefundableNext,\n _boundDepartureTimeNext,\n _boundArrivalTimeNext,\n _boundStopsCountNext,\n _boundCabinNext,\n _boundMaxStopsNext,\n filterBounds\n);\n\nexport const inboundsFareFamiliesSortingSelector = (): StateSelector =>\n select(_inboundsFareFamiliesSorting);\n\nexport const outboundsFareFamiliesSortingSelector = (): StateSelector =>\n select(_outboundsFareFamiliesSorting);\n\n/**\n * Selects the current status of the air bounds query\n */\nexport const boundsStatus = (): StateSelector => safeSelect(_boundStatus);\n\nexport const boundsRefundable = (): StateSelector => safeSelect(_boundRefundale);\n\nexport const boundsDepartureTime = (): StateSelector =>\n safeSelect(_boundDepartureTime);\n\nexport const boundsReturnTime = (): StateSelector =>\n safeSelect(_boundArrivalTime);\n\n/**\n * Selects the outbounds from the state. Will not emit if not present.\n */\nexport const outbounds = (): StateSelector => select(outboundsSelector);\n\n/**\n * Selects the inbounds from the state. Will not emit if not present.\n */\nexport const inbounds = (): StateSelector => select(inboundsSelector);\n\n/**\n * Selects the filtered outbounds if present\n */\nexport const filteredOutbounds = (): StateSelector => select(_filteredOutbounds);\n\n/**\n * Selects the filtered inbounds if present\n */\nexport const filteredInbounds = (): StateSelector => select(_filteredInbounds);\n\n/**\n * Selects the filtered (not applied) outbounds if present\n */\nexport const nextFilteredOutbounds = (): StateSelector =>\n select(_nextFilteredOutbounds);\n\n/**\n * Selects the filtered (not applied) inbounds if present\n */\nexport const nextFilteredInbounds = (): StateSelector =>\n select(_nextFilteredInbounds);\n\n/**\n * Gets the hash returned with the bounds\n */\nexport const boundsHash = (): StateSelector => safeSelect(_boundsHash);\n\n/**\n * Gets the currency code used with the bounds\n */\nexport const boundsCurrency = (): StateSelector => safeSelect(_boundsCurrency);\n\n/**\n * Selects all possible fare families\n */\nexport const fareFamiliesBounds = (): StateSelector =>\n select(_fareFamilies);\n\n/**\n * Selects whether the bounds query was for one way\n */\nexport const isOneWayBounds = (): StateSelector => safeSelect(_oneWayBoundsSelector);\n\n/**\n * Params of the last request\n */\nexport const lastRequestParams = (): StateSelector =>\n select(_lastRequestParams);\n\n/**\n * Serialized version of the params of the last request\n */\nexport const serializedLastRequestParams = (): StateSelector =>\n select(_serializedLastRequestParams);\n\nexport const airBoundsLastRequestDepartureDate = (): StateSelector =>\n select(_departureDate);\nexport const airBoundsLastRequestReturnDate = (): StateSelector => select(_returnDate);\nexport const selectedOutboundBound = (): StateSelector =>\n select(_selectedOutboundBoundsSelector);\nexport const selectedInboundBound = (): StateSelector =>\n select(_selectedInboundBoundsSelector);\nexport const selectedOutboundIdBounds = (): StateSelector =>\n select(selectedOutboundIdBoundsSelector);\nexport const selectedOutboundFareFamilyCodeBounds = (): StateSelector =>\n select(_selectedOutboundFareFamilyCodeBoundsSelector);\nexport const selectedInboundIdBounds = (): StateSelector =>\n select(selectedInboundIdBoundsSelector);\nexport const selectedInboundFareFamilyCodeBounds = (): StateSelector =>\n select(_selectedInboundFareFamilyCodeBoundsSelector);\nexport const selectedOutboundAirBoundId = (): StateSelector =>\n select(selectedOutboundAirBoundIdSelector);\nexport const selectedInboundAirBoundId = (): StateSelector =>\n select(selectedInboundAirBoundIdSelector);\nexport const selectedOutboundAirBound = (): StateSelector =>\n select(_selectedOutBoundAirBoundSelector);\nexport const selectedInboundAirBound = (): StateSelector =>\n select(_selectedInBoundAirBoundSelector);\nexport const selectedAirBoundIds = (): StateSelector =>\n select(_selectedAirBoundIdsSelector);\nexport const selectedOutboundFareFamilyBenefits = (): StateSelector =>\n select(_selectedOutBoundFareFamilyBenefitsSelector);\nexport const selectedInboundFareFamilyBenefits = (): StateSelector =>\n select(_selectedInBoundFareFamilyBenefitsSelector);\nexport const selectedOutboundItinerary = (): StateSelector =>\n select(_selectedOutBoundItinerarySelector);\nexport const selectedInboundItinerary = (): StateSelector =>\n select(_selectedInBoundItinerarySelector);\nexport const airBoundsRequest = (): StateSelector => select(_request);\n\nexport const selectedAirBoundsTicketSortBy = (): StateSelector =>\n select(_selectedAirBoundsSortBySelector);\n\nexport const hasZeroBaggageOnEitherBound = (): StateSelector =>\n safeSelect(_hasZeroBaggageOnEitherBound);\nexport const boundsTotalPrice = (): StateSelector => select(_boundsTotalPrice);\n\n// Analytics related selectors\nexport const outboundSelectionGtmData = (\n paxAmount: PaxAmount\n): StateSelector =>\n safeSelect(\n _boundSelectionGtmDataSelectorGenerator(\n BoundType.outbound,\n _selectedOutboundBoundsSelector,\n _selectedOutBoundAirBoundSelector,\n paxAmount\n )\n );\nexport const inboundSelectionGtmData = (\n paxAmount: PaxAmount\n): StateSelector =>\n safeSelect(\n _boundSelectionGtmDataSelectorGenerator(\n BoundType.inbound,\n _selectedInboundBoundsSelector,\n _selectedInBoundAirBoundSelector,\n paxAmount\n )\n );\nexport const flightSelectionGtmDataForAirBound = (\n bound: FinnairBoundGroupWithLocation,\n boundType: BoundType,\n paxAmount: PaxAmount\n): StateSelector =>\n safeSelect(_flightSelectionGtmDataForAirBound(bound, boundType, paxAmount));\n\nexport const selectedCheapestOffer = (): StateSelector =>\n select(_outboundsSelectedCheapestOffer);\n\nexport const selectFareFamiliesBrands = (): StateSelector =>\n select(_getSelectedFareFamiliesBrands);\n\nfunction filterBounds(\n bound: FinnairAirBounds,\n fareFamilies: FareFamilyMap,\n refundable: boolean,\n departureTimes: FlightTimeOption[],\n arrivalTimes: FlightTimeOption[],\n stopCount: number,\n cabin: Cabin,\n maxStops: number\n): FinnairAirBounds {\n let filteredItems = bound;\n if (!filteredItems) {\n return filteredItems;\n }\n\n if (departureTimes && departureTimes.length !== 3) {\n filteredItems = {\n ...filteredItems,\n boundGroups: filteredItems.boundGroups?.filter((b) => {\n const dateTime = b.details.departure.dateTime;\n\n return shouldTimeBeKept(departureTimes, dateTime);\n }),\n };\n }\n\n if (arrivalTimes && arrivalTimes.length !== 3) {\n filteredItems = {\n ...filteredItems,\n boundGroups: filteredItems.boundGroups?.filter((b) => {\n const dateTime = b.details.arrival.dateTime;\n\n return shouldTimeBeKept(arrivalTimes, dateTime);\n }),\n };\n }\n\n if (refundable) {\n filteredItems = {\n ...filteredItems,\n boundGroups: filteredItems.boundGroups?.map((b) => ({\n ...b,\n fareFamilies: b.fareFamilies.filter(\n (ff) => fareFamilies[ff.fareFamilyCode].translatedBenefitRows.find((b) => b.key === 'cancel')?.isPositive\n ),\n })),\n };\n }\n\n if (stopCount != null) {\n filteredItems = {\n ...filteredItems,\n boundGroups: filteredItems.boundGroups?.filter((boundGroup) =>\n stopCount === 0 ? boundGroup.details.stops === 0 : boundGroup.details.stops >= stopCount\n ),\n };\n }\n\n if (maxStops != null) {\n filteredItems = {\n ...filteredItems,\n boundGroups: filteredItems.boundGroups?.filter((boundGroup) =>\n maxStops === 0 ? boundGroup.details.stops === 0 : maxStops >= boundGroup.details.stops\n ),\n };\n }\n\n if (cabin && cabin !== Cabin.MIXED) {\n filteredItems = {\n ...filteredItems,\n boundGroups: filteredItems.boundGroups\n ?.map((b) => ({\n ...b,\n fareFamilies: b.fareFamilies.filter((fareFamily) => {\n const fareInformation = fareFamily.fareInformation.filter(\n ({ cabinClass }: FareInformation) => cabinClass === cabin\n );\n\n return fareInformation.length > 0;\n }),\n }))\n .filter((boundGroup) => boundGroup.fareFamilies.length > 0),\n };\n }\n\n return filteredItems;\n}\n\nconst _filters = createSelector(_airBoundsState, (_abs: AirBoundsState) => _abs?.filters);\nexport const filters = (): StateSelector => select(_filters);\n\nconst _outboundCache = (hash: string, currentTime: number) => {\n return createSelector(_airBoundsState, (_abs: AirBoundsState) => {\n const resultInCache = _abs?.outboundCache[hash];\n\n // Cache expires after 15 minutes\n if (resultInCache?.createdAt + FLIGHT_SELECTION_CACHE_EXPIRY > currentTime) {\n return resultInCache.results;\n }\n\n return null;\n });\n};\n\nexport const outboundCache = (\n hash: string,\n currentTime: number\n): StateSelector => select(_outboundCache(hash, currentTime));\n","\n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

    \n {{ content.teaserTitle }}\n

    \n
    \n \n
    \n \n
    \n
    \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n
    \n \n
    \n
    \n \n \n \n
    \n
    \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n
    \n \n \n\n \n \n \n \n \n \n
    \n
    \n \n
    \n
    \n\n \n \n \n \n\n\n\n\n \n
    \n

    \n {{ title$ | async }}\n

    \n
    \n \n \n \n \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n\n","import { DOCUMENT } from '@angular/common';\nimport { Component, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { Observable, of, EMPTY, Subscription, delay } from 'rxjs';\nimport { filter, map, pluck } from 'rxjs/operators';\n\nimport { SentryLogger } from '@fcom/core';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { CmsContentType, CmsFormType, CmsTemplate, CmsViewType, CmsContent, CmsCollection } from '@fcom/core-api';\nimport { ScrollService } from '@fcom/common';\n\nimport { findByType } from '../../../utils';\n\n@Component({\n selector: 'fin-cms-json-content',\n templateUrl: './cms-json-content.component.html',\n styleUrls: ['./cms-json-content.component.scss', './premium-economy-brand-overrides.scss'],\n})\nexport class CmsJsonContentComponent implements OnDestroy, OnInit {\n @Input()\n template$: Observable = EMPTY;\n @Input()\n pageViewType$: Observable;\n @Input()\n showSideTitle$: Observable = of(true);\n\n disruptions$: Observable;\n title$: Observable;\n\n private subscription: Subscription = new Subscription();\n\n public readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n public readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n public readonly FORMTYPE: typeof CmsFormType = CmsFormType;\n\n constructor(\n private route: ActivatedRoute,\n private scrollService: ScrollService,\n @Inject(DOCUMENT) private document: Document,\n private sentryLogger: SentryLogger\n ) {}\n\n ngOnInit(): void {\n this.disruptions$ = this.template$.pipe(\n map((template) =>\n template.main.reduce((acc, curr) => {\n if (curr.contentType === CmsContentType.CMPersonalized) {\n return [...acc, ...curr.items];\n }\n return [...acc, curr];\n }, [])\n ),\n findByType(CmsViewType.DISRUPTIONS)\n );\n this.title$ = this.template$.pipe(\n pluck('header', 0),\n map((item) => (item as CmsContent)?.teaserTitle || item?.title)\n );\n this.subscription.add(\n this.route.fragment.pipe(filter(Boolean), delay(0)).subscribe((fragment): void => {\n const offset: number = this.document.querySelector('header.sticky-nav')?.clientHeight || 0;\n const element: HTMLElement = this.document.getElementById(fragment);\n this.checkSegmentValidity(fragment);\n\n if (element) {\n this.scrollService.smoothScroll(element, { offsetY: offset });\n }\n })\n );\n }\n\n // Default segment when metadata URL segment not defined is contentId #\n // Check the fragment and log instances where fragment is only a string of #'s\n private checkSegmentValidity(segment: string): void {\n const isStringOfNumbers: boolean = Number.isInteger(Number(segment));\n\n if (isStringOfNumbers) {\n this.sentryLogger.warn('Page is deeplinking to content with numeric segment', {\n segment: segment,\n });\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n}\n","// This is a magic string replaced by rollup\ndeclare const __SENTRY_SDK_VERSION__: string;\n\nexport const SDK_VERSION = typeof __SENTRY_SDK_VERSION__ === 'string' ? __SENTRY_SDK_VERSION__ : '0.0.0-unknown.0';\n","/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Client, MetricsAggregator, Scope } from '../types-hoist';\n\nimport type { SdkSource } from './env';\nimport type { logger } from './logger';\nimport { SDK_VERSION } from './version';\n\ninterface SentryCarrier {\n acs?: any;\n stack?: any;\n\n globalScope?: Scope;\n defaultIsolationScope?: Scope;\n defaultCurrentScope?: Scope;\n globalMetricsAggregators?: WeakMap | undefined;\n logger?: typeof logger;\n\n /** Overwrites TextEncoder used in `@sentry/core`, need for `react-native@0.73` and older */\n encodePolyfill?: (input: string) => Uint8Array;\n /** Overwrites TextDecoder used in `@sentry/core`, need for `react-native@0.73` and older */\n decodePolyfill?: (input: Uint8Array) => string;\n}\n\n// TODO(v9): Clean up or remove this type\ntype BackwardsCompatibleSentryCarrier = SentryCarrier & {\n // pre-v7 hub (replaced by .stack)\n hub: any;\n integrations?: any[];\n logger: any;\n extensions?: {\n /** Extension methods for the hub, which are bound to the current Hub instance */\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n};\n\n/** Internal global with common properties and Sentry extensions */\nexport type InternalGlobal = {\n navigator?: { userAgent?: string; maxTouchPoints?: number };\n console: Console;\n PerformanceObserver?: any;\n Sentry?: any;\n onerror?: {\n (event: object | string, source?: string, lineno?: number, colno?: number, error?: Error): any;\n __SENTRY_INSTRUMENTED__?: true;\n };\n onunhandledrejection?: {\n (event: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n SENTRY_SDK_SOURCE?: SdkSource;\n /**\n * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n * file.\n */\n _sentryDebugIds?: Record;\n __SENTRY__: Record, SentryCarrier> & {\n version?: string;\n } & BackwardsCompatibleSentryCarrier;\n /**\n * Raw module metadata that is injected by bundler plugins.\n *\n * Keys are `error.stack` strings, values are the metadata.\n */\n _sentryModuleMetadata?: Record;\n _sentryEsmLoaderHookRegistered?: boolean;\n};\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ = globalThis as unknown as InternalGlobal;\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton(name: keyof SentryCarrier, creator: () => T, obj?: unknown): T {\n const gbl = (obj || GLOBAL_OBJ) as InternalGlobal;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const versionedCarrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n return versionedCarrier[name] || (versionedCarrier[name] = creator());\n}\n","import type { AsyncContextStack } from './asyncContext/stackStrategy';\nimport type { AsyncContextStrategy } from './asyncContext/types';\nimport type { Client, Integration, MetricsAggregator, Scope } from './types-hoist';\nimport { SDK_VERSION } from './utils-hoist/version';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: VersionedCarrier;\n}\n\ntype VersionedCarrier = {\n version?: string;\n} & Record, SentryCarrier>;\n\ninterface SentryCarrier {\n acs?: AsyncContextStrategy;\n stack?: AsyncContextStack;\n\n globalScope?: Scope;\n defaultIsolationScope?: Scope;\n defaultCurrentScope?: Scope;\n globalMetricsAggregators?: WeakMap | undefined;\n\n // TODO(v9): Remove these properties - they are no longer used and were left over in v8\n integrations?: Integration[];\n extensions?: {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: Function;\n };\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n // This ensures a Sentry carrier exists\n getSentryCarrier(GLOBAL_OBJ);\n return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nexport function getSentryCarrier(carrier: Carrier): SentryCarrier {\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n // For now: First SDK that sets the .version property wins\n __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n // Intentionally populating and returning the version of \"this\" SDK instance\n // rather than what's set in .version so that \"this\" SDK always gets its carrier\n return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { ParameterizedString, PolymorphicEvent, Primitive } from '../types-hoist';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat: unknown): wat is Error {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n case '[object WebAssembly.Exception]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat: unknown, className: string): boolean {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat: unknown): boolean {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat: unknown): boolean {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat: unknown): wat is string {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isParameterizedString(wat: unknown): wat is ParameterizedString {\n return (\n typeof wat === 'object' &&\n wat !== null &&\n '__sentry_template_string__' in wat &&\n '__sentry_template_values__' in wat\n );\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat: unknown): wat is Primitive {\n return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat: unknown): wat is Record {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat: unknown): wat is PolymorphicEvent {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat: unknown): boolean {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat: unknown): wat is RegExp {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat: any): wat is PromiseLike {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat: any, base: any): boolean {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\ninterface VueViewModel {\n // Vue3\n __isVue?: boolean;\n // Vue2\n _isVue?: boolean;\n}\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isVueViewModel(wat: unknown): boolean {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat as VueViewModel).__isVue || (wat as VueViewModel)._isVue));\n}\n","import { isString } from './is';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\ntype SimpleNode = {\n parentNode: SimpleNode;\n} | null;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(\n elem: unknown,\n options: string[] | { keyAttrs?: string[]; maxStringLength?: number } = {},\n): string {\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el: unknown, keyAttrs?: string[]): string {\n const elem = el as {\n tagName?: string;\n id?: string;\n className?: string;\n getAttribute(key: string): string;\n };\n\n const out = [];\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n // @ts-expect-error WINDOW has HTMLElement\n if (WINDOW.HTMLElement) {\n // If using the component name annotation plugin, this value may be available on the DOM node\n if (elem instanceof HTMLElement && elem.dataset) {\n if (elem.dataset['sentryComponent']) {\n return elem.dataset['sentryComponent'];\n }\n if (elem.dataset['sentryElement']) {\n return elem.dataset['sentryElement'];\n }\n }\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n const className = elem.className;\n if (className && isString(className)) {\n const classes = className.split(/\\s+/);\n for (const c of classes) {\n out.push(`.${c}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (const k of allowedAttrs) {\n const attr = elem.getAttribute(k);\n if (attr) {\n out.push(`[${k}=\"${attr}\"]`);\n }\n }\n\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nexport function getLocationHref(): string {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existence of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n *\n * @deprecated This method is deprecated and will be removed in the next major version.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getDomElement(selector: string): E | null {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) as unknown as E;\n }\n return null;\n}\n\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nexport function getComponentName(elem: unknown): string | null {\n // @ts-expect-error WINDOW has HTMLElement\n if (!WINDOW.HTMLElement) {\n return null;\n }\n\n let currentElem = elem as SimpleNode;\n const MAX_TRAVERSE_HEIGHT = 5;\n for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n if (!currentElem) {\n return null;\n }\n\n if (currentElem instanceof HTMLElement) {\n if (currentElem.dataset['sentryComponent']) {\n return currentElem.dataset['sentryComponent'];\n }\n if (currentElem.dataset['sentryElement']) {\n return currentElem.dataset['sentryElement'];\n }\n }\n\n currentElem = currentElem.parentNode;\n }\n\n return null;\n}\n","declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n","import type { ConsoleLevel } from '../types-hoist';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { GLOBAL_OBJ, getGlobalSingleton } from './worldwide';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nexport const CONSOLE_LEVELS: readonly ConsoleLevel[] = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] as const;\n\ntype LoggerMethod = (...args: unknown[]) => void;\ntype LoggerConsoleMethods = Record;\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: {\n [key in ConsoleLevel]?: (...args: unknown[]) => void;\n} = {};\n\n/** JSDoc */\nexport interface Logger extends LoggerConsoleMethods {\n disable(): void;\n enable(): void;\n isEnabled(): boolean;\n}\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console as Console;\n const wrappedFuncs: Partial = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] as LoggerMethod;\n wrappedFuncs[level] = console[level] as LoggerMethod | undefined;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] as LoggerMethod;\n });\n }\n}\n\nfunction makeLogger(): Logger {\n let enabled = false;\n const logger: Partial = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if (DEBUG_BUILD) {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = (...args: Parameters<(typeof GLOBAL_OBJ.console)[typeof name]>) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger as Logger;\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.\n */\nexport const logger = getGlobalSingleton('logger', makeLogger);\n","import { isRegExp, isString, isVueViewModel } from './is';\n\nexport { escapeStringForRegex } from './vendor/escapeStringForRegex';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nexport function truncate(str: string, max: number = 0): string {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line: string, colno: number): string {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input: unknown[], delimiter?: string): string {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nexport function isMatchingPattern(\n value: string,\n pattern: RegExp | string,\n requireExactStringMatch: boolean = false,\n): boolean {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nexport function stringMatchesSomePattern(\n testString: string,\n patterns: Array = [],\n requireExactStringMatch: boolean = false,\n): boolean {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { WrappedFunction } from '../types-hoist';\n\nimport { htmlTreeAsString } from './browser';\nimport { DEBUG_BUILD } from './debug-build';\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive } from './is';\nimport { logger } from './logger';\nimport { truncate } from './string';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nexport function fill(source: { [key: string]: any }, name: string, replacementFactory: (...args: any[]) => any): void {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] as () => any;\n const wrapped = replacementFactory(original) as WrappedFunction;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n try {\n source[name] = wrapped;\n } catch {\n DEBUG_BUILD && logger.log(`Failed to replace method \"${name}\" in object`, source);\n }\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nexport function addNonEnumerableProperty(obj: object, name: string, value: unknown): void {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nexport function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function getOriginalFunction(func: WrappedFunction): T | undefined {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n *\n * @deprecated This function is deprecated and will be removed in the next major version of the SDK.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function urlEncode(object: { [key: string]: any }): string {\n return Object.entries(object)\n .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argument itself, when value is neither an Event nor\n * an Error.\n */\nexport function convertToPlainObject(value: V):\n | {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n }\n | {\n [ownProps: string]: unknown;\n message: string;\n name: string;\n stack?: string;\n }\n | V {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj: {\n [ownProps: string]: unknown;\n type: string;\n target: string;\n currentTarget: string;\n detail?: unknown;\n } = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target: unknown): string {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj: unknown): { [key: string]: unknown } {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps: { [key: string]: unknown } = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj as Record)[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception: Record, maxLength: number = 40): string {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n const firstKey = keys[0];\n\n if (!firstKey) {\n return '[object has no keys]';\n }\n\n if (firstKey.length >= maxLength) {\n return truncate(firstKey, maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nexport function dropUndefinedKeys(inputValue: T): T {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue: T, memoizationMap: Map): T {\n if (isPojo(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: { [key: string]: unknown } = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.getOwnPropertyNames(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue as T;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal as T;\n }\n\n const returnValue: unknown[] = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item: unknown) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue as unknown as T;\n }\n\n return inputValue;\n}\n\nfunction isPojo(input: unknown): input is Record {\n if (!isPlainObject(input)) {\n return false;\n }\n\n try {\n const name = (Object.getPrototypeOf(input) as { constructor: { name: string } }).constructor.name;\n return !name || name === 'Object';\n } catch {\n return true;\n }\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nexport function objectify(wat: unknown): typeof Object {\n let objectified;\n switch (true) {\n // this will catch both undefined and null\n case wat == undefined:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat as any).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n","import { GLOBAL_OBJ } from './worldwide';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\ninterface Performance {\n /**\n * The millisecond timestamp at which measurement began, measured in Unix time.\n */\n timeOrigin: number;\n /**\n * Returns the current millisecond timestamp, where 0 represents the start of measurement.\n */\n now(): number;\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nexport function dateTimestampInSeconds(): number {\n return Date.now() / ONE_SECOND_IN_MS;\n}\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction createUnixTimestampInSecondsFunc(): () => number {\n const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & { performance?: Performance };\n if (!performance || !performance.now) {\n return dateTimestampInSeconds;\n }\n\n // Some browser and environments don't have a timeOrigin, so we fallback to\n // using Date.now() to compute the starting time.\n const approxStartingTimeOrigin = Date.now() - performance.now();\n const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n //\n // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n // correct for this.\n // See: https://github.com/getsentry/sentry-javascript/issues/2590\n // See: https://github.com/mdn/content/issues/4713\n // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n return () => {\n return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n };\n}\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nexport const timestampInSeconds = createUnixTimestampInSecondsFunc();\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n *\n * @deprecated This variable will be removed in the next major version.\n */\nexport let _browserPerformanceTimeOriginMode: string;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nexport const browserPerformanceTimeOrigin = ((): number | undefined => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n if (!performance || !performance.now) {\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n // eslint-disable-next-line deprecation/deprecation\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n","import type { Event, Exception, Mechanism, StackFrame } from '../types-hoist';\n\nimport { addNonEnumerableProperty } from './object';\nimport { snipLine } from './string';\nimport { GLOBAL_OBJ } from './worldwide';\n\ninterface CryptoInternal {\n getRandomValues(array: Uint8Array): Uint8Array;\n randomUUID?(): string;\n}\n\n/** An interface for common properties on global */\ninterface CryptoGlobal {\n msCrypto?: CryptoInternal;\n crypto?: CryptoInternal;\n}\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4(): string {\n const gbl = GLOBAL_OBJ as typeof GLOBAL_OBJ & CryptoGlobal;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = (): number => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => {\n // crypto.getRandomValues might return undefined instead of the typed array\n // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n // However, `typedArray` is still filled in-place.\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n const typedArray = new Uint8Array(1);\n crypto.getRandomValues(typedArray);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return typedArray[0]!;\n };\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] as unknown as string) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c as unknown as number) ^ ((getRandomByte() & 15) >> ((c as unknown as number) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event: Event): Exception | undefined {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event: Event): string {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event: Event, value?: string, type?: string): void {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nexport function addExceptionMechanism(event: Event, newMechanism?: Partial): void {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\ninterface SemVer {\n major?: number;\n minor?: number;\n patch?: number;\n prerelease?: string;\n buildmetadata?: string;\n}\n\nfunction _parseInt(input: string | undefined): number {\n return parseInt(input || '', 10);\n}\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input: string): SemVer {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = _parseInt(match[1]);\n const minor = _parseInt(match[2]);\n const patch = _parseInt(match[3]);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines: string[], frame: StackFrame, linesOfContext: number = 5): void {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line: string) => snipLine(line, 0));\n\n // We guard here to ensure this is not larger than the existing number of lines\n const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n frame.context_line = snipLine(lines[lineIndex]!, frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line: string) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nexport function checkOrSetAlreadyCaught(exception: unknown): boolean {\n if (isAlreadyCaptured(exception)) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception as { [key: string]: unknown }, '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\nfunction isAlreadyCaptured(exception: unknown): boolean | void {\n try {\n return (exception as { __sentry_captured__?: boolean }).__sentry_captured__;\n } catch {} // eslint-disable-line no-empty\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n *\n * @deprecated This function has been deprecated and will not be replaced.\n */\nexport function arrayify(maybeArray: T | T[]): T[] {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n","import type { SerializedSession, Session, SessionContext, SessionStatus } from './types-hoist';\nimport { dropUndefinedKeys, timestampInSeconds, uuid4 } from './utils-hoist';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit): Session {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session: Session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude): void {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n","import type { PropagationContext } from '../types-hoist';\nimport { uuid4 } from './misc';\n\n/**\n * Returns a new minimal propagation context.\n *\n * @deprecated Use `generateTraceId` and `generateSpanId` instead.\n */\nexport function generatePropagationContext(): PropagationContext {\n return {\n traceId: generateTraceId(),\n spanId: generateSpanId(),\n };\n}\n\n/**\n * Generate a random, valid trace ID.\n */\nexport function generateTraceId(): string {\n return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nexport function generateSpanId(): string {\n return uuid4().substring(16);\n}\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nexport function merge(initialObj: T, mergeObj: T, levels = 2): T {\n // If the merge value is not an object, or we have no merge levels left,\n // we just set the value to the merge value\n if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n return mergeObj;\n }\n\n // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n if (initialObj && mergeObj && Object.keys(mergeObj).length === 0) {\n return initialObj;\n }\n\n // Clone object\n const output = { ...initialObj };\n\n // Merge values into output, resursively\n for (const key in mergeObj) {\n if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n output[key] = merge(output[key], mergeObj[key], levels - 1);\n }\n }\n\n return output;\n}\n","import type { Scope, Span } from '../types-hoist';\nimport { addNonEnumerableProperty } from '../utils-hoist/object';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\ntype ScopeWithMaybeSpan = Scope & {\n [SCOPE_SPAN_FIELD]?: Span;\n};\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _setSpanForScope(scope: Scope, span: Span | undefined): void {\n if (span) {\n addNonEnumerableProperty(scope as ScopeWithMaybeSpan, SCOPE_SPAN_FIELD, span);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete (scope as ScopeWithMaybeSpan)[SCOPE_SPAN_FIELD];\n }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _getSpanForScope(scope: ScopeWithMaybeSpan): Span | undefined {\n return scope[SCOPE_SPAN_FIELD];\n}\n","/* eslint-disable max-lines */\nimport type {\n Attachment,\n Breadcrumb,\n CaptureContext,\n Client,\n Context,\n Contexts,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n Primitive,\n PropagationContext,\n RequestSession,\n Scope as ScopeInterface,\n ScopeContext,\n ScopeData,\n Session,\n SeverityLevel,\n User,\n} from './types-hoist';\n\nimport { updateSession } from './session';\nimport { isPlainObject } from './utils-hoist/is';\nimport { logger } from './utils-hoist/logger';\nimport { uuid4 } from './utils-hoist/misc';\nimport { generateSpanId, generateTraceId } from './utils-hoist/propagationContext';\nimport { dateTimestampInSeconds } from './utils-hoist/time';\nimport { merge } from './utils/merge';\nimport { _getSpanForScope, _setSpanForScope } from './utils/spanOnScope';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information.\n */\nclass ScopeClass implements ScopeInterface {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void>;\n\n /** Callback list that will be called during event processing. */\n protected _eventProcessors: EventProcessor[];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[];\n\n /** User */\n protected _user: User;\n\n /** Tags */\n protected _tags: { [key: string]: Primitive };\n\n /** Extra */\n protected _extra: Extras;\n\n /** Contexts */\n protected _contexts: Contexts;\n\n /** Attachments */\n protected _attachments: Attachment[];\n\n /** Propagation Context for distributed tracing */\n protected _propagationContext: PropagationContext;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata: { [key: string]: unknown };\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: SeverityLevel;\n\n /**\n * Transaction Name\n *\n * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n */\n protected _transactionName?: string;\n\n /** Session */\n protected _session?: Session;\n\n /** Request Mode Session Status */\n // eslint-disable-next-line deprecation/deprecation\n protected _requestSession?: RequestSession;\n\n /** The client on this scope */\n protected _client?: Client;\n\n /** Contains the last event id of a captured event. */\n protected _lastEventId?: string;\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n public constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n spanId: generateSpanId(),\n };\n }\n\n /**\n * @inheritDoc\n */\n public clone(): ScopeClass {\n const newScope = new ScopeClass();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n if (this._contexts.flags) {\n // We need to copy the `values` array so insertions on a cloned scope\n // won't affect the original array.\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values],\n };\n }\n\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n\n _setSpanForScope(newScope, _getSpanForScope(this));\n\n return newScope;\n }\n\n /**\n * @inheritDoc\n */\n public setClient(client: Client | undefined): void {\n this._client = client;\n }\n\n /**\n * @inheritDoc\n */\n public setLastEventId(lastEventId: string | undefined): void {\n this._lastEventId = lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public getClient(): C | undefined {\n return this._client as C | undefined;\n }\n\n /**\n * @inheritDoc\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n public getRequestSession(): RequestSession | undefined {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n public setRequestSession(requestSession?: RequestSession): this {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: Primitive): this {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setLevel(level: SeverityLevel): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n const [scopeInstance, requestSession] =\n scopeToMerge instanceof Scope\n ? // eslint-disable-next-line deprecation/deprecation\n [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()]\n : isPlainObject(scopeToMerge)\n ? [captureContext as ScopeContext, (captureContext as ScopeContext).requestSession]\n : [];\n\n const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};\n\n this._tags = { ...this._tags, ...tags };\n this._extra = { ...this._extra, ...extra };\n this._contexts = { ...this._contexts, ...contexts };\n\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n\n if (level) {\n this._level = level;\n }\n\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n\n if (requestSession) {\n this._requestSession = requestSession;\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clear(): this {\n // client is not cleared here on purpose!\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._session = undefined;\n _setSpanForScope(this, undefined);\n this._attachments = [];\n this.setPropagationContext({ traceId: generateTraceId() });\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n if (this._client) {\n this._client.recordDroppedEvent('buffer_overflow', 'log_item');\n }\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getLastBreadcrumb(): Breadcrumb | undefined {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public addAttachment(attachment: Attachment): this {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearAttachments(): this {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n public getScopeData(): ScopeData {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this),\n };\n }\n\n /**\n * @inheritDoc\n */\n public setSDKProcessingMetadata(newData: { [key: string]: unknown }): this {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public setPropagationContext(\n context: Omit & Partial>,\n ): this {\n this._propagationContext = {\n // eslint-disable-next-line deprecation/deprecation\n spanId: generateSpanId(),\n ...context,\n };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public getPropagationContext(): PropagationContext {\n return this._propagationContext;\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: unknown, hint?: EventHint): string {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Holds additional event information.\n */\nexport const Scope = ScopeClass;\n\n/**\n * Holds additional event information.\n */\nexport type Scope = ScopeInterface;\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes';\nimport { Scope } from '../scope';\nimport type { Client, Scope as ScopeInterface } from '../types-hoist';\nimport { isThenable } from '../utils-hoist/is';\nimport { getMainCarrier, getSentryCarrier } from './../carrier';\nimport type { AsyncContextStrategy } from './types';\n\ninterface Layer {\n client?: Client;\n scope: ScopeInterface;\n}\n\n/**\n * This is an object that holds a stack of scopes.\n */\nexport class AsyncContextStack {\n private readonly _stack: [Layer, ...Layer[]];\n private _isolationScope: ScopeInterface;\n\n public constructor(scope?: ScopeInterface, isolationScope?: ScopeInterface) {\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n } else {\n assignedScope = scope;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n // scope stack for domains or the process\n this._stack = [{ scope: assignedScope }];\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Fork a scope for the stack.\n */\n public withScope(callback: (scope: ScopeInterface) => T): T {\n const scope = this._pushScope();\n\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n this._popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n this._popScope();\n return res;\n },\n e => {\n this._popScope();\n throw e;\n },\n );\n }\n\n this._popScope();\n return maybePromiseResult;\n }\n\n /**\n * Get the client of the stack.\n */\n public getClient(): C | undefined {\n return this.getStackTop().client as C;\n }\n\n /**\n * Returns the scope of the top stack.\n */\n public getScope(): ScopeInterface {\n return this.getStackTop().scope;\n }\n\n /**\n * Get the isolation scope for the stack.\n */\n public getIsolationScope(): ScopeInterface {\n return this._isolationScope;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n */\n public getStackTop(): Layer {\n return this._stack[this._stack.length - 1] as Layer;\n }\n\n /**\n * Push a scope to the stack.\n */\n private _pushScope(): ScopeInterface {\n // We want to clone the content of prev scope\n const scope = this.getScope().clone();\n this._stack.push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * Pop a scope from the stack.\n */\n private _popScope(): boolean {\n if (this._stack.length <= 1) return false;\n return !!this._stack.pop();\n }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack(): AsyncContextStack {\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n\n return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope(callback: (scope: ScopeInterface) => T): T {\n return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope(scope: ScopeInterface, callback: (scope: ScopeInterface) => T): T {\n const stack = getAsyncContextStack() as AsyncContextStack;\n return stack.withScope(() => {\n stack.getStackTop().scope = scope;\n return callback(scope);\n });\n}\n\nfunction withIsolationScope(callback: (isolationScope: ScopeInterface) => T): T {\n return getAsyncContextStack().withScope(() => {\n return callback(getAsyncContextStack().getIsolationScope());\n });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nexport function getStackAsyncContextStrategy(): AsyncContextStrategy {\n return {\n withIsolationScope,\n withScope,\n withSetScope,\n withSetIsolationScope: (_isolationScope: ScopeInterface, callback: (isolationScope: ScopeInterface) => T) => {\n return withIsolationScope(callback);\n },\n getCurrentScope: () => getAsyncContextStack().getScope(),\n getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n };\n}\n","import { Scope as ScopeClass } from './scope';\nimport type { Scope } from './types-hoist';\nimport { getGlobalSingleton } from './utils-hoist/worldwide';\n\n/** Get the default current scope. */\nexport function getDefaultCurrentScope(): Scope {\n return getGlobalSingleton('defaultCurrentScope', () => new ScopeClass());\n}\n\n/** Get the default isolation scope. */\nexport function getDefaultIsolationScope(): Scope {\n return getGlobalSingleton('defaultIsolationScope', () => new ScopeClass());\n}\n","import type { Carrier } from './../carrier';\nimport { getMainCarrier, getSentryCarrier } from './../carrier';\nimport { getStackAsyncContextStrategy } from './stackStrategy';\nimport type { AsyncContextStrategy } from './types';\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nexport function setAsyncContextStrategy(strategy: AsyncContextStrategy | undefined): void {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n const sentry = getSentryCarrier(registry);\n sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nexport function getAsyncContextStrategy(carrier: Carrier): AsyncContextStrategy {\n const sentry = getSentryCarrier(carrier);\n\n if (sentry.acs) {\n return sentry.acs;\n }\n\n // Otherwise, use the default one (stack)\n return getStackAsyncContextStrategy();\n}\n","import { getAsyncContextStrategy } from './asyncContext';\nimport { getMainCarrier } from './carrier';\nimport { Scope as ScopeClass } from './scope';\nimport type { Client, Scope, TraceContext } from './types-hoist';\nimport { dropUndefinedKeys } from './utils-hoist/object';\nimport { getGlobalSingleton } from './utils-hoist/worldwide';\n\n/**\n * Get the currently active scope.\n */\nexport function getCurrentScope(): Scope {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nexport function getIsolationScope(): Scope {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nexport function getGlobalScope(): Scope {\n return getGlobalSingleton('globalScope', () => new ScopeClass());\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n */\nexport function withScope(callback: (scope: Scope) => T): T;\n/**\n * Set the given scope as the active scope in the callback.\n */\nexport function withScope(scope: Scope | undefined, callback: (scope: Scope) => T): T;\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nexport function withScope(\n ...rest: [callback: (scope: Scope) => T] | [scope: Scope | undefined, callback: (scope: Scope) => T]\n): T {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [scope, callback] = rest;\n\n if (!scope) {\n return acs.withScope(callback);\n }\n\n return acs.withSetScope(scope, callback);\n }\n\n return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\nexport function withIsolationScope(callback: (isolationScope: Scope) => T): T;\n/**\n * Set the provided isolation scope as active in the given callback. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n *\n * If you pass in `undefined` as a scope, it will fork a new isolation scope, the same as if no scope is passed.\n */\nexport function withIsolationScope(isolationScope: Scope | undefined, callback: (isolationScope: Scope) => T): T;\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nexport function withIsolationScope(\n ...rest:\n | [callback: (isolationScope: Scope) => T]\n | [isolationScope: Scope | undefined, callback: (isolationScope: Scope) => T]\n): T {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n\n // If a scope is defined, we want to make this the active scope instead of the default one\n if (rest.length === 2) {\n const [isolationScope, callback] = rest;\n\n if (!isolationScope) {\n return acs.withIsolationScope(callback);\n }\n\n return acs.withSetIsolationScope(isolationScope, callback);\n }\n\n return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nexport function getClient(): C | undefined {\n return getCurrentScope().getClient();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nexport function getTraceContextFromScope(scope: Scope): TraceContext {\n const propagationContext = scope.getPropagationContext();\n\n // TODO(v9): Use generateSpanId() instead of spanId\n // eslint-disable-next-line deprecation/deprecation\n const { traceId, spanId, parentSpanId } = propagationContext;\n\n const traceContext: TraceContext = dropUndefinedKeys({\n trace_id: traceId,\n span_id: spanId,\n parent_span_id: parentSpanId,\n });\n\n return traceContext;\n}\n","export const DEFAULT_ENVIRONMENT = 'production';\n","declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n\n/** SyncPromise internal states */\nconst enum States {\n /** Pending */\n PENDING = 0,\n /** Resolved / OK */\n RESOLVED = 1,\n /** Rejected / Error */\n REJECTED = 2,\n}\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\nexport function resolvedSyncPromise(): PromiseLike;\nexport function resolvedSyncPromise(value: T | PromiseLike): PromiseLike;\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nexport function resolvedSyncPromise(value?: T | PromiseLike): PromiseLike {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nexport function rejectedSyncPromise(reason?: any): PromiseLike {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise implements PromiseLike {\n private _state: States;\n private _handlers: Array<[boolean, (value: T) => void, (reason: any) => any]>;\n private _value: any;\n\n public constructor(\n executor: (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void,\n ) {\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n public then(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike) | null,\n ): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result as any);\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n public catch(\n onrejected?: ((reason: any) => TResult | PromiseLike) | null,\n ): PromiseLike {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n public finally(onfinally?: (() => void) | null): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let val: TResult | any;\n let isRejected: boolean;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val as unknown as any);\n });\n });\n }\n\n /** JSDoc */\n private readonly _resolve = (value?: T | PromiseLike | null) => {\n this._setResult(States.RESOLVED, value);\n };\n\n /** JSDoc */\n private readonly _reject = (reason?: any) => {\n this._setResult(States.REJECTED, reason);\n };\n\n /** JSDoc */\n private readonly _setResult = (state: States, value?: T | PromiseLike | any) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value as PromiseLike).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };\n\n /** JSDoc */\n private readonly _executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n handler[1](this._value as unknown as any);\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };\n}\n\nexport { SyncPromise };\n","import { DEBUG_BUILD } from './debug-build';\nimport type { Event, EventHint, EventProcessor } from './types-hoist';\nimport { isThenable } from './utils-hoist/is';\nimport { logger } from './utils-hoist/logger';\nimport { SyncPromise } from './utils-hoist/syncpromise';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nexport function notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint: EventHint,\n index: number = 0,\n): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) as Event | null;\n\n DEBUG_BUILD && processor.id && result === null && logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n","import type { DebugImage, StackParser } from '../types-hoist';\nimport { GLOBAL_OBJ } from './worldwide';\n\ntype StackString = string;\ntype CachedResult = [string, string];\n\nlet parsedStackResults: Record | undefined;\nlet lastKeysCount: number | undefined;\nlet cachedFilenameDebugIds: Record | undefined;\n\n/**\n * Returns a map of filenames to debug identifiers.\n */\nexport function getFilenameToDebugIdMap(stackParser: StackParser): Record {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n if (!debugIdMap) {\n return {};\n }\n\n const debugIdKeys = Object.keys(debugIdMap);\n\n // If the count of registered globals hasn't changed since the last call, we\n // can just return the cached result.\n if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {\n return cachedFilenameDebugIds;\n }\n\n lastKeysCount = debugIdKeys.length;\n\n // Build a map of filename -> debug_id.\n cachedFilenameDebugIds = debugIdKeys.reduce>((acc, stackKey) => {\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n\n const result = parsedStackResults[stackKey];\n\n if (result) {\n acc[result[0]] = result[1];\n } else {\n const parsedStack = stackParser(stackKey);\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame && stackFrame.filename;\n const debugId = debugIdMap[stackKey];\n\n if (filename && debugId) {\n acc[filename] = debugId;\n parsedStackResults[stackKey] = [filename, debugId];\n break;\n }\n }\n }\n\n return acc;\n }, {});\n\n return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nexport function getDebugImagesForResources(\n stackParser: StackParser,\n resource_paths: ReadonlyArray,\n): DebugImage[] {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n if (!filenameDebugIdMap) {\n return [];\n }\n\n const images: DebugImage[] = [];\n for (const path of resource_paths) {\n if (path && filenameDebugIdMap[path]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[path] as string,\n });\n }\n }\n\n return images;\n}\n","import type { Event, StackFrame, StackLineParser, StackParser } from '../types-hoist';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\nexport const UNKNOWN_FUNCTION = '?';\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nexport function createStackParser(...parsers: StackLineParser[]): StackParser {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack: string, skipFirstLines: number = 0, framesToPop: number = 0): StackFrame[] => {\n const frames: StackFrame[] = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirstLines; i < lines.length; i++) {\n const line = lines[i] as string;\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames.slice(framesToPop));\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nexport function stackParserFromStackParserOptions(stackParser: StackParser | StackLineParser[]): StackParser {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nexport function stripSentryFramesAndReverse(stack: ReadonlyArray): StackFrame[] {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || getLastStackFrame(localStack).filename,\n function: frame.function || UNKNOWN_FUNCTION,\n }));\n}\n\nfunction getLastStackFrame(arr: StackFrame[]): StackFrame {\n return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn: unknown): string {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Get's stack frames from an event without needing to check for undefined properties.\n */\nexport function getFramesFromEvent(event: Event): StackFrame[] | undefined {\n const exception = event.exception;\n\n if (exception) {\n const frames: StackFrame[] = [];\n try {\n // @ts-expect-error Object could be undefined\n exception.values.forEach(value => {\n // @ts-expect-error Value could be undefined\n if (value.stacktrace.frames) {\n // @ts-expect-error Value could be undefined\n frames.push(...value.stacktrace.frames);\n }\n });\n return frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n","import type { Primitive } from '../types-hoist';\n\nimport { isSyntheticEvent, isVueViewModel } from './is';\nimport type { MemoFunc } from './memo';\nimport { memoBuilder } from './memo';\nimport { convertToPlainObject } from './object';\nimport { getFunctionName } from './stacktrace';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n// This is a hack to placate TS, relying on the fact that technically, arrays are objects with integer keys. Normally we\n// think of those keys as actual numbers, but `arr['0']` turns out to work just as well as `arr[0]`, and doing it this\n// way lets us use a single type in the places where behave as if we are only dealing with objects, even if some of them\n// might be arrays.\ntype ObjOrArray = { [key: string]: T };\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normalized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function normalize(input: unknown, depth: number = 100, maxProperties: number = +Infinity): any {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nexport function normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object: { [key: string]: any },\n // Default Node.js REPL depth\n depth: number = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize: number = 100 * 1024,\n): T {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized as T;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key: string,\n value: unknown,\n depth: number = +Infinity,\n maxProperties: number = +Infinity,\n // eslint-disable-next-line deprecation/deprecation\n memo: MemoFunc = memoBuilder(),\n): Primitive | ObjOrArray {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n ['boolean', 'string'].includes(typeof value) ||\n (typeof value === 'number' && Number.isFinite(value))\n ) {\n return value as Primitive;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value as ObjOrArray)['__sentry_skip_normalization__']) {\n return value as ObjOrArray;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value as ObjOrArray)['__sentry_override_normalization_depth__'] === 'number'\n ? ((value as ObjOrArray)['__sentry_override_normalization_depth__'] as number)\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value as unknown & { toJSON?: () => unknown };\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) as ObjOrArray;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value as ObjOrArray);\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key: unknown,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value: Exclude,\n): string {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value as { _events: unknown })._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && !Number.isFinite(value)) {\n return `[${value}]`;\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value: unknown): string {\n const prototype: Prototype | null = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value: string): number {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value: any): number {\n return utf8Length(JSON.stringify(value));\n}\n\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nexport function normalizeUrlToBase(url: string, basePath: string): string {\n const escapedBase = basePath\n // Backslash to forward\n .replace(/\\\\/g, '/')\n // Escape RegExp special characters\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n let newUrl = url;\n try {\n newUrl = decodeURI(url);\n } catch (_Oo) {\n // Sometime this breaks\n }\n return (\n newUrl\n .replace(/\\\\/g, '/')\n .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n );\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport type MemoFunc = [\n // memoize\n (obj: any) => boolean,\n // unmemoize\n (obj: any) => void,\n];\n\n/**\n * Helper to decycle json objects\n *\n * @deprecated This function is deprecated and will be removed in the next major version.\n */\n// TODO(v9): Move this function into normalize() directly\nexport function memoBuilder(): MemoFunc {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner: any = hasWeakSet ? new WeakSet() : [];\n function memoize(obj: any): boolean {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj: any): void {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nexport const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nexport const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nexport const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nexport const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n","import type { DynamicSamplingContext } from '../types-hoist';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { isString } from './is';\nimport { logger } from './logger';\n\n/**\n * @deprecated Use a `\"baggage\"` string directly\n */\nexport const BAGGAGE_HEADER_NAME = 'baggage';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nexport const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nexport const MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nexport function baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader: string | string[] | number | null | undefined | boolean,\n): Partial | undefined {\n const baggageObject = parseBaggageHeader(baggageHeader);\n\n if (!baggageObject) {\n return undefined;\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce>((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext as Partial;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nexport function dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext?: Partial,\n): string | undefined {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce>(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Take a baggage header and parse it into an object.\n */\nexport function parseBaggageHeader(\n baggageHeader: string | string[] | number | null | undefined | boolean,\n): Record | undefined {\n if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n return undefined;\n }\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n return baggageHeader.reduce>((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n Object.entries(currBaggageObject).forEach(([key, value]) => {\n acc[key] = value;\n });\n return acc;\n }, {});\n }\n\n return baggageHeaderToObject(baggageHeader);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader: string): Record {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce>((acc, [key, value]) => {\n if (key && value) {\n acc[key] = value;\n }\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object: Record): string | undefined {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n","import type { MeasurementUnit, Span } from '../types-hoist';\nimport type { MetricSummary } from '../types-hoist';\nimport type { Primitive } from '../types-hoist';\nimport { dropUndefinedKeys } from '../utils-hoist/object';\nimport type { MetricType } from './types';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\ntype MetricSummaryStorage = Map;\n\nconst METRICS_SPAN_FIELD = '_sentryMetrics';\n\ntype SpanWithPotentialMetrics = Span & {\n [METRICS_SPAN_FIELD]?: MetricSummaryStorage;\n};\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nexport function getMetricSummaryJsonForSpan(span: Span): Record> | undefined {\n const storage = (span as SpanWithPotentialMetrics)[METRICS_SPAN_FIELD];\n\n if (!storage) {\n return undefined;\n }\n const output: Record> = {};\n\n for (const [, [exportKey, summary]] of storage) {\n const arr = output[exportKey] || (output[exportKey] = []);\n arr.push(dropUndefinedKeys(summary));\n }\n\n return output;\n}\n\n/**\n * Updates the metric summary on a span.\n */\nexport function updateMetricSummaryOnSpan(\n span: Span,\n metricType: MetricType,\n sanitizedName: string,\n value: number,\n unit: MeasurementUnit,\n tags: Record,\n bucketKey: string,\n): void {\n const existingStorage = (span as SpanWithPotentialMetrics)[METRICS_SPAN_FIELD];\n const storage =\n existingStorage ||\n ((span as SpanWithPotentialMetrics)[METRICS_SPAN_FIELD] = new Map());\n\n const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n const bucketItem = storage.get(bucketKey);\n\n if (bucketItem) {\n const [, summary] = bucketItem;\n storage.set(bucketKey, [\n exportKey,\n {\n min: Math.min(summary.min, value),\n max: Math.max(summary.max, value),\n count: (summary.count += 1),\n sum: (summary.sum += value),\n tags: summary.tags,\n },\n ]);\n } else {\n storage.set(bucketKey, [\n exportKey,\n {\n min: value,\n max: value,\n count: 1,\n sum: value,\n tags,\n },\n ]);\n }\n}\n","import type { Span, SpanStatus } from '../types-hoist';\n\nexport const SPAN_STATUS_UNSET = 0;\nexport const SPAN_STATUS_OK = 1;\nexport const SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nexport function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus {\n if (httpStatus < 400 && httpStatus >= 100) {\n return { code: SPAN_STATUS_OK };\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n case 403:\n return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n case 404:\n return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n case 409:\n return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n case 413:\n return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n case 429:\n return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n case 499:\n return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n case 503:\n return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n case 504:\n return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n default:\n return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n }\n }\n\n return { code: SPAN_STATUS_ERROR, message: 'unknown_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nexport function setHttpStatus(span: Span, httpStatus: number): void {\n span.setAttribute('http.response.status_code', httpStatus);\n\n const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n if (spanStatus.message !== 'unknown_error') {\n span.setStatus(spanStatus);\n }\n}\n","import { getAsyncContextStrategy } from '../asyncContext';\nimport { getMainCarrier } from '../carrier';\nimport { getCurrentScope } from '../currentScopes';\nimport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan } from '../metrics/metric-summary';\nimport type { MetricType } from '../metrics/types';\nimport {\n SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '../semanticAttributes';\nimport type { SentrySpan } from '../tracing/sentrySpan';\nimport { SPAN_STATUS_OK, SPAN_STATUS_UNSET } from '../tracing/spanstatus';\nimport type {\n MeasurementUnit,\n Primitive,\n Span,\n SpanAttributes,\n SpanJSON,\n SpanOrigin,\n SpanStatus,\n SpanTimeInput,\n TraceContext,\n} from '../types-hoist';\nimport { consoleSandbox } from '../utils-hoist/logger';\nimport { addNonEnumerableProperty, dropUndefinedKeys } from '../utils-hoist/object';\nimport { generateSpanId } from '../utils-hoist/propagationContext';\nimport { timestampInSeconds } from '../utils-hoist/time';\nimport { generateSentryTraceHeader } from '../utils-hoist/tracing';\nimport { _getSpanForScope } from './spanOnScope';\n\n// These are aligned with OpenTelemetry trace flags\nexport const TRACE_FLAG_NONE = 0x0;\nexport const TRACE_FLAG_SAMPLED = 0x1;\n\n// todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nexport function spanToTransactionTraceContext(span: Span): TraceContext {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n const { data, op, parent_span_id, status, origin } = spanToJSON(span);\n\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n data,\n op,\n status,\n origin,\n });\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nexport function spanToTraceContext(span: Span): TraceContext {\n const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n // If the span is remote, we use a random/virtual span as span_id to the trace context,\n // and the remote span as parent_span_id\n const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n const span_id = isRemote ? generateSpanId() : spanId;\n\n return dropUndefinedKeys({\n parent_span_id,\n span_id,\n trace_id,\n });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nexport function spanToTraceHeader(span: Span): string {\n const { traceId, spanId } = span.spanContext();\n const sampled = spanIsSampled(span);\n return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nexport function spanTimeInputToSeconds(input: SpanTimeInput | undefined): number {\n if (typeof input === 'number') {\n return ensureTimestampInSeconds(input);\n }\n\n if (Array.isArray(input)) {\n // See {@link HrTime} for the array-based time format\n return input[0] + input[1] / 1e9;\n }\n\n if (input instanceof Date) {\n return ensureTimestampInSeconds(input.getTime());\n }\n\n return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp: number): number {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nexport function spanToJSON(span: Span): Partial {\n if (spanIsSentrySpan(span)) {\n return span.getSpanJSON();\n }\n\n try {\n const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n const { attributes, startTime, name, endTime, parentSpanId, status } = span;\n\n return dropUndefinedKeys({\n span_id,\n trace_id,\n data: attributes,\n description: name,\n parent_span_id: parentSpanId,\n start_timestamp: spanTimeInputToSeconds(startTime),\n // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n timestamp: spanTimeInputToSeconds(endTime) || undefined,\n status: getStatusMessage(status),\n op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,\n _metrics_summary: getMetricSummaryJsonForSpan(span),\n });\n }\n\n // Finally, at least we have `spanContext()`....\n return {\n span_id,\n trace_id,\n };\n } catch {\n return {};\n }\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span: Span): span is OpenTelemetrySdkTraceBaseSpan {\n const castSpan = span as OpenTelemetrySdkTraceBaseSpan;\n return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\nexport interface OpenTelemetrySdkTraceBaseSpan extends Span {\n attributes: SpanAttributes;\n startTime: SpanTimeInput;\n name: string;\n status: SpanStatus;\n endTime: SpanTimeInput;\n parentSpanId?: string;\n}\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span: Span): span is SentrySpan {\n return typeof (span as SentrySpan).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nexport function spanIsSampled(span: Span): boolean {\n // We align our trace flags with the ones OpenTelemetry use\n // So we also check for sampled the same way they do.\n const { traceFlags } = span.spanContext();\n return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nexport function getStatusMessage(status: SpanStatus | undefined): string | undefined {\n if (!status || status.code === SPAN_STATUS_UNSET) {\n return undefined;\n }\n\n if (status.code === SPAN_STATUS_OK) {\n return 'ok';\n }\n\n return status.message || 'unknown_error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\ntype SpanWithPotentialChildren = Span & {\n [CHILD_SPANS_FIELD]?: Set;\n [ROOT_SPAN_FIELD]?: Span;\n};\n\n/**\n * Adds an opaque child span reference to a span.\n */\nexport function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n // We store the root span reference on the child span\n // We need this for `getRootSpan()` to work\n const rootSpan = span[ROOT_SPAN_FIELD] || span;\n addNonEnumerableProperty(childSpan as SpanWithPotentialChildren, ROOT_SPAN_FIELD, rootSpan);\n\n // We store a list of child spans on the parent span\n // We need this for `getSpanDescendants()` to work\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].add(childSpan);\n } else {\n addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n }\n}\n\n/** This is only used internally by Idle Spans. */\nexport function removeChildSpanFromSpan(span: SpanWithPotentialChildren, childSpan: Span): void {\n if (span[CHILD_SPANS_FIELD]) {\n span[CHILD_SPANS_FIELD].delete(childSpan);\n }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nexport function getSpanDescendants(span: SpanWithPotentialChildren): Span[] {\n const resultSet = new Set();\n\n function addSpanChildren(span: SpanWithPotentialChildren): void {\n // This exit condition is required to not infinitely loop in case of a circular dependency.\n if (resultSet.has(span)) {\n return;\n // We want to ignore unsampled spans (e.g. non recording spans)\n } else if (spanIsSampled(span)) {\n resultSet.add(span);\n const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n for (const childSpan of childSpans) {\n addSpanChildren(childSpan);\n }\n }\n }\n\n addSpanChildren(span);\n\n return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nexport function getRootSpan(span: SpanWithPotentialChildren): Span {\n return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nexport function getActiveSpan(): Span | undefined {\n const carrier = getMainCarrier();\n const acs = getAsyncContextStrategy(carrier);\n if (acs.getActiveSpan) {\n return acs.getActiveSpan();\n }\n\n return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nexport function updateMetricSummaryOnActiveSpan(\n metricType: MetricType,\n sanitizedName: string,\n value: number,\n unit: MeasurementUnit,\n tags: Record,\n bucketKey: string,\n): void {\n const span = getActiveSpan();\n if (span) {\n updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey);\n }\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n *\n * todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`.\n */\nexport function showSpanDropWarning(): void {\n if (!hasShownSpanDropWarning) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.',\n );\n });\n hasShownSpanDropWarning = true;\n }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nexport function updateSpanName(span: Span, name: string): void {\n span.updateName(name);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n });\n}\n","import type { Client, DynamicSamplingContext, Scope, Span } from '../types-hoist';\n\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { getClient } from '../currentScopes';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes';\nimport {\n baggageHeaderToDynamicSamplingContext,\n dynamicSamplingContextToSentryBaggageHeader,\n} from '../utils-hoist/baggage';\nimport { addNonEnumerableProperty, dropUndefinedKeys } from '../utils-hoist/object';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled';\nimport { getRootSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\ntype SpanWithMaybeDsc = Span & {\n [FROZEN_DSC_FIELD]?: Partial | undefined;\n};\n\n/**\n * Freeze the given DSC on the given span.\n */\nexport function freezeDscOnSpan(span: Span, dsc: Partial): void {\n const spanWithMaybeDsc = span as SpanWithMaybeDsc;\n addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nexport function getDynamicSamplingContextFromClient(trace_id: string, client: Client): DynamicSamplingContext {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n public_key,\n trace_id,\n }) as DynamicSamplingContext;\n\n client.emit('createDsc', dsc);\n\n return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nexport function getDynamicSamplingContextFromScope(client: Client, scope: Scope): Partial {\n const propagationContext = scope.getPropagationContext();\n return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nexport function getDynamicSamplingContextFromSpan(span: Span): Readonly> {\n const client = getClient();\n if (!client) {\n return {};\n }\n\n const rootSpan = getRootSpan(span);\n\n // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n const frozenDsc = (rootSpan as SpanWithMaybeDsc)[FROZEN_DSC_FIELD];\n if (frozenDsc) {\n return frozenDsc;\n }\n\n // For OpenTelemetry, we freeze the DSC on the trace state\n const traceState = rootSpan.spanContext().traceState;\n const traceStateDsc = traceState && traceState.get('sentry.dsc');\n\n // If the span has a DSC, we want it to take precedence\n const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n if (dscOnTraceState) {\n return dscOnTraceState;\n }\n\n // Else, we generate it from the span\n const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n const jsonSpan = spanToJSON(rootSpan);\n const attributes = jsonSpan.data || {};\n const maybeSampleRate = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];\n\n if (maybeSampleRate != null) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n // after JSON conversion, txn.name becomes jsonSpan.description\n const name = jsonSpan.description;\n if (source !== 'url' && name) {\n dsc.transaction = name;\n }\n\n // How can we even land here with hasTracingEnabled() returning false?\n // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n // So we end up with an active span that is not sampled (neither positively nor negatively)\n if (hasTracingEnabled()) {\n dsc.sampled = String(spanIsSampled(rootSpan));\n }\n\n client.emit('createDsc', dsc, rootSpan);\n\n return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nexport function spanToBaggageHeader(span: Span): string | undefined {\n const dsc = getDynamicSamplingContextFromSpan(span);\n return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n","import { getClient } from '../currentScopes';\nimport type { Options } from '../types-hoist';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean | undefined;\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(\n maybeOptions?: Pick | undefined,\n): boolean {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getClient();\n const options = maybeOptions || (client && client.getOptions());\n // eslint-disable-next-line deprecation/deprecation\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n","import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext';\nimport type { Breadcrumb, Event, ScopeData, Span } from '../types-hoist';\nimport { dropUndefinedKeys } from '../utils-hoist/object';\nimport { merge } from './merge';\nimport { getRootSpan, spanToJSON, spanToTraceContext } from './spanUtils';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nexport function applyScopeDataToEvent(event: Event, data: ScopeData): void {\n const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n // Apply general data\n applyDataToEvent(event, data);\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (span) {\n applySpanToEvent(event, span);\n }\n\n applyFingerprintToEvent(event, fingerprint);\n applyBreadcrumbsToEvent(event, breadcrumbs);\n applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nexport function mergeScopeData(data: ScopeData, mergeData: ScopeData): void {\n const {\n extra,\n tags,\n user,\n contexts,\n level,\n sdkProcessingMetadata,\n breadcrumbs,\n fingerprint,\n eventProcessors,\n attachments,\n propagationContext,\n transactionName,\n span,\n } = mergeData;\n\n mergeAndOverwriteScopeData(data, 'extra', extra);\n mergeAndOverwriteScopeData(data, 'tags', tags);\n mergeAndOverwriteScopeData(data, 'user', user);\n mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n if (level) {\n data.level = level;\n }\n\n if (transactionName) {\n data.transactionName = transactionName;\n }\n\n if (span) {\n data.span = span;\n }\n\n if (breadcrumbs.length) {\n data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n }\n\n if (fingerprint.length) {\n data.fingerprint = [...data.fingerprint, ...fingerprint];\n }\n\n if (eventProcessors.length) {\n data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n }\n\n if (attachments.length) {\n data.attachments = [...data.attachments, ...attachments];\n }\n\n data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nexport function mergeAndOverwriteScopeData<\n Prop extends 'extra' | 'tags' | 'user' | 'contexts' | 'sdkProcessingMetadata',\n Data extends ScopeData,\n>(data: Data, prop: Prop, mergeVal: Data[Prop]): void {\n data[prop] = merge(data[prop], mergeVal, 1);\n}\n\n/** Exported only for tests */\nexport function mergeArray(\n event: Event,\n prop: Prop,\n mergeVal: ScopeData[Prop],\n): void {\n const prevVal = event[prop];\n // If we are not merging any new values,\n // we only need to proceed if there was an empty array before (as we want to replace it with undefined)\n if (!mergeVal.length && (!prevVal || prevVal.length)) {\n return;\n }\n\n const merged = [...(prevVal || []), ...mergeVal] as ScopeData[Prop];\n event[prop] = merged.length ? merged : undefined;\n}\n\nfunction applyDataToEvent(event: Event, data: ScopeData): void {\n const { extra, tags, user, contexts, level, transactionName } = data;\n\n const cleanedExtra = dropUndefinedKeys(extra);\n if (cleanedExtra && Object.keys(cleanedExtra).length) {\n event.extra = { ...cleanedExtra, ...event.extra };\n }\n\n const cleanedTags = dropUndefinedKeys(tags);\n if (cleanedTags && Object.keys(cleanedTags).length) {\n event.tags = { ...cleanedTags, ...event.tags };\n }\n\n const cleanedUser = dropUndefinedKeys(user);\n if (cleanedUser && Object.keys(cleanedUser).length) {\n event.user = { ...cleanedUser, ...event.user };\n }\n\n const cleanedContexts = dropUndefinedKeys(contexts);\n if (cleanedContexts && Object.keys(cleanedContexts).length) {\n event.contexts = { ...cleanedContexts, ...event.contexts };\n }\n\n if (level) {\n event.level = level;\n }\n\n // transaction events get their `transaction` from the root span name\n if (transactionName && event.type !== 'transaction') {\n event.transaction = transactionName;\n }\n}\n\nfunction applyBreadcrumbsToEvent(event: Event, breadcrumbs: Breadcrumb[]): void {\n const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event: Event, sdkProcessingMetadata: ScopeData['sdkProcessingMetadata']): void {\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...sdkProcessingMetadata,\n };\n}\n\nfunction applySpanToEvent(event: Event, span: Span): void {\n event.contexts = {\n trace: spanToTraceContext(span),\n ...event.contexts,\n };\n\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n ...event.sdkProcessingMetadata,\n };\n\n const rootSpan = getRootSpan(span);\n const transactionName = spanToJSON(rootSpan).description;\n if (transactionName && !event.transaction && event.type === 'transaction') {\n event.transaction = transactionName;\n }\n}\n\n/**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\nfunction applyFingerprintToEvent(event: Event, fingerprint: ScopeData['fingerprint'] | undefined): void {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n\n // If we have something on the scope, then merge it with event\n if (fingerprint) {\n event.fingerprint = event.fingerprint.concat(fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n}\n","import type {\n CaptureContext,\n Client,\n ClientOptions,\n Event,\n EventHint,\n Scope as ScopeInterface,\n ScopeContext,\n StackParser,\n} from '../types-hoist';\n\nimport { DEFAULT_ENVIRONMENT } from '../constants';\nimport { getGlobalScope } from '../currentScopes';\nimport { notifyEventProcessors } from '../eventProcessors';\nimport { Scope } from '../scope';\nimport { getFilenameToDebugIdMap } from '../utils-hoist/debug-ids';\nimport { addExceptionMechanism, uuid4 } from '../utils-hoist/misc';\nimport { normalize } from '../utils-hoist/normalize';\nimport { truncate } from '../utils-hoist/string';\nimport { dateTimestampInSeconds } from '../utils-hoist/time';\nimport { applyScopeDataToEvent, mergeScopeData } from './applyScopeDataToEvent';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\nexport type ExclusiveEventHintOrCaptureContext =\n | (CaptureContext & Partial<{ [key in keyof EventHint]: never }>)\n | (EventHint & Partial<{ [key in keyof ScopeContext]: never }>);\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nexport function prepareEvent(\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n scope?: ScopeInterface,\n client?: Client,\n isolationScope?: ScopeInterface,\n): PromiseLike {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1_000 } = options;\n const prepared: Event = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n if (client) {\n client.emit('applyFrameMetadata', event);\n }\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n const finalScope = getFinalScope(scope, hint.captureContext);\n\n if (hint.mechanism) {\n addExceptionMechanism(prepared, hint.mechanism);\n }\n\n const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Scope.addEventProcessor} gets the finished prepared event.\n // Merge scope data together\n const data = getGlobalScope().getScopeData();\n\n if (isolationScope) {\n const isolationData = isolationScope.getScopeData();\n mergeScopeData(data, isolationData);\n }\n\n if (finalScope) {\n const finalScopeData = finalScope.getScopeData();\n mergeScopeData(data, finalScopeData);\n }\n\n const attachments = [...(hint.attachments || []), ...data.attachments];\n if (attachments.length) {\n hint.attachments = attachments;\n }\n\n applyScopeDataToEvent(prepared, data);\n\n const eventProcessors = [\n ...clientEventProcessors,\n // Run scope event processors _after_ all other processors\n ...data.eventProcessors,\n ];\n\n const result = notifyEventProcessors(eventProcessors, prepared, hint);\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nexport function applyClientOptions(event: Event, options: ClientOptions): void {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n // empty strings do not make sense for environment, release, and dist\n // so we handle them the same as if they were not provided\n event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n if (!event.release && release) {\n event.release = release;\n }\n\n if (!event.dist && dist) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nexport function applyDebugIds(event: Event, stackParser: StackParser): void {\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event!.exception!.values!.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace!.frames!.forEach(frame => {\n if (filenameDebugIdMap && frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nexport function applyDebugMeta(event: Event): void {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap: Record = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception!.values!.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace!.frames!.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id,\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event: Event, integrationNames: string[]): void {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event: Event | null, depth: number, maxBreadth: number): Event | null {\n if (!event) {\n return null;\n }\n\n const normalized: Event = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n return {\n ...span,\n ...(span.data && {\n data: normalize(span.data, depth, maxBreadth),\n }),\n };\n });\n }\n\n // event.contexts.flags (FeatureFlagContext) stores context for our feature\n // flag integrations. It has a greater nesting depth than our other typed\n // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n // to skip this in case of conflicting, user-provided context.\n if (event.contexts && event.contexts.flags && normalized.contexts) {\n normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n }\n\n return normalized;\n}\n\nfunction getFinalScope(\n scope: ScopeInterface | undefined,\n captureContext: CaptureContext | undefined,\n): ScopeInterface | undefined {\n if (!captureContext) {\n return scope;\n }\n\n const finalScope = scope ? scope.clone() : new Scope();\n finalScope.update(captureContext);\n return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nexport function parseEventHintOrCaptureContext(\n hint: ExclusiveEventHintOrCaptureContext | undefined,\n): EventHint | undefined {\n if (!hint) {\n return undefined;\n }\n\n // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n if (hintIsScopeOrFunction(hint)) {\n return { captureContext: hint };\n }\n\n if (hintIsScopeContext(hint)) {\n return {\n captureContext: hint,\n };\n }\n\n return hint;\n}\n\nfunction hintIsScopeOrFunction(\n hint: CaptureContext | EventHint,\n): hint is ScopeInterface | ((scope: ScopeInterface) => ScopeInterface) {\n return hint instanceof Scope || typeof hint === 'function';\n}\n\ntype ScopeContextProperty = keyof ScopeContext;\nconst captureContextKeys: readonly ScopeContextProperty[] = [\n 'user',\n 'level',\n 'extra',\n 'contexts',\n 'tags',\n 'fingerprint',\n 'requestSession',\n 'propagationContext',\n] as const;\n\nfunction hintIsScopeContext(hint: Partial | EventHint): hint is Partial {\n return Object.keys(hint).some(key => captureContextKeys.includes(key as ScopeContextProperty));\n}\n","import type {\n CaptureContext,\n CheckIn,\n Event,\n EventHint,\n EventProcessor,\n Extra,\n Extras,\n FinishedCheckIn,\n MonitorConfig,\n Primitive,\n Session,\n SessionContext,\n SeverityLevel,\n User,\n} from './types-hoist';\n\nimport { DEFAULT_ENVIRONMENT } from './constants';\nimport { getClient, getCurrentScope, getIsolationScope, withIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport { closeSession, makeSession, updateSession } from './session';\nimport { isThenable } from './utils-hoist/is';\nimport { logger } from './utils-hoist/logger';\nimport { uuid4 } from './utils-hoist/misc';\nimport { timestampInSeconds } from './utils-hoist/time';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide';\nimport type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nexport function captureException(exception: unknown, hint?: ExclusiveEventHintOrCaptureContext): string {\n return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nexport function captureMessage(message: string, captureContext?: CaptureContext | SeverityLevel): string {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentScope().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nexport function captureEvent(event: Event, hint?: EventHint): string {\n return getCurrentScope().captureEvent(event, hint);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nexport function setContext(name: string, context: { [key: string]: unknown } | null): void {\n getIsolationScope().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras: Extras): void {\n getIsolationScope().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key: string, extra: Extra): void {\n getIsolationScope().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags: { [key: string]: Primitive }): void {\n getIsolationScope().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nexport function setTag(key: string, value: Primitive): void {\n getIsolationScope().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user: User | null): void {\n getIsolationScope().setUser(user);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped in `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nexport function lastEventId(): string | undefined {\n return getIsolationScope().lastEventId();\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string {\n const scope = getCurrentScope();\n const client = getClient();\n if (!client) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nexport function withMonitor(\n monitorSlug: CheckIn['monitorSlug'],\n callback: () => T,\n upsertMonitorConfig?: MonitorConfig,\n): T {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status: FinishedCheckIn['status']): void {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n return withIsolationScope(() => {\n let maybePromiseResult: T;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n e => {\n finishCheckIn('error');\n throw e;\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n });\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function flush(timeout?: number): Promise {\n const client = getClient();\n if (client) {\n return client.flush(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport async function close(timeout?: number): Promise {\n const client = getClient();\n if (client) {\n return client.close(timeout);\n }\n DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nexport function isInitialized(): boolean {\n return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nexport function isEnabled(): boolean {\n const client = getClient();\n return !!client && client.getOptions().enabled !== false && !!client.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nexport function addEventProcessor(callback: EventProcessor): void {\n getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nexport function startSession(context?: SessionContext): Session {\n const client = getClient();\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: currentScope.getUser() || isolationScope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = isolationScope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n\n endSession();\n\n // Afterwards we set the new session on the scope\n isolationScope.setSession(session);\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession(session);\n\n return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nexport function endSession(): void {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session) {\n closeSession(session);\n }\n _sendSessionUpdate();\n\n // the session is over; take it off of the scope\n isolationScope.setSession();\n\n // TODO (v8): Remove this and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate(): void {\n const isolationScope = getIsolationScope();\n const currentScope = getCurrentScope();\n const client = getClient();\n // TODO (v8): Remove currentScope and only use the isolation scope(?).\n // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n const session = currentScope.getSession() || isolationScope.getSession();\n if (session && client) {\n client.captureSession(session);\n }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n * Defaults to `false`.\n */\nexport function captureSession(end: boolean = false): void {\n // both send the update and pull the session from the scope\n if (end) {\n endSession();\n return;\n }\n\n // only send the update\n _sendSessionUpdate();\n}\n","import { getClient } from './currentScopes';\nimport type { Client, Event, EventHint, Integration, IntegrationFn, Options } from './types-hoist';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { logger } from './utils-hoist/logger';\n\nexport const installedIntegrations: string[] = [];\n\n/** Map of integrations assigned to a client */\nexport type IntegrationIndex = {\n [key: string]: Integration;\n};\n\ntype IntegrationWithDefaultInstance = Integration & { isDefaultInstance?: true };\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preserve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations: Integration[]): Integration[] {\n const integrationsByName: { [key: string]: Integration } = {};\n\n integrations.forEach((currentInstance: IntegrationWithDefaultInstance) => {\n const { name } = currentInstance;\n\n const existingInstance: IntegrationWithDefaultInstance | undefined = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}\n\n/** Gets integrations to install */\nexport function getIntegrationsToSetup(options: Pick): Integration[] {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach((integration: IntegrationWithDefaultInstance) => {\n integration.isDefaultInstance = true;\n });\n\n let integrations: Integration[];\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex > -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1) as [Integration];\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex {\n const integrationIndex: IntegrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nexport function afterSetupIntegrations(client: Client, integrations: Integration[]): void {\n for (const integration of integrations) {\n // guard against empty provided integrations\n if (integration && integration.afterAllSetup) {\n integration.afterAllSetup(client);\n }\n }\n}\n\n/** Setup a single integration. */\nexport function setupIntegration(client: Client, integration: Integration, integrationIndex: IntegrationIndex): void {\n if (integrationIndex[integration.name]) {\n DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n return;\n }\n integrationIndex[integration.name] = integration;\n\n // `setupOnce` is only called the first time\n if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n integration.setupOnce();\n installedIntegrations.push(integration.name);\n }\n\n // `setup` is run for each client\n if (integration.setup && typeof integration.setup === 'function') {\n integration.setup(client);\n }\n\n if (typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) as typeof integration.preprocessEvent;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) as typeof integration.processEvent;\n\n const processor = Object.assign((event: Event, hint: EventHint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nexport function addIntegration(integration: Integration): void {\n const client = getClient();\n\n if (!client) {\n DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nexport function defineIntegration(fn: Fn): (...args: Parameters) => Integration {\n return fn;\n}\n","import type { Event, IntegrationFn, StackFrame } from '../types-hoist';\n\nimport { DEBUG_BUILD } from '../debug-build';\nimport { defineIntegration } from '../integration';\nimport { logger } from '../utils-hoist/logger';\nimport { getEventDescription } from '../utils-hoist/misc';\nimport { stringMatchesSomePattern } from '../utils-hoist/string';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [\n /^Script error\\.?$/,\n /^Javascript error: Script error\\.? on line 0$/,\n /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n \"undefined is not an object (evaluating 'a.L')\", // Random error that happens but not actionable or noticeable to end-users.\n 'can\\'t redefine non-configurable property \"solana\"', // Probably a browser extension or custom browser (Brave) throwing this error\n \"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\", // Error thrown by GTM, seemingly not affecting end-users\n \"Can't find variable: _AutofillCallbackHandler\", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n];\n\n/** Options for the InboundFilters integration */\nexport interface InboundFiltersOptions {\n allowUrls: Array;\n denyUrls: Array;\n ignoreErrors: Array;\n ignoreTransactions: Array;\n ignoreInternal: boolean;\n disableErrorDefaults: boolean;\n}\n\nconst INTEGRATION_NAME = 'InboundFilters';\nconst _inboundFiltersIntegration = ((options: Partial = {}) => {\n return {\n name: INTEGRATION_NAME,\n processEvent(event, _hint, client) {\n const clientOptions = client.getOptions();\n const mergedOptions = _mergeOptions(options, clientOptions);\n return _shouldDropEvent(event, mergedOptions) ? null : event;\n },\n };\n}) satisfies IntegrationFn;\n\nexport const inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration);\n\nfunction _mergeOptions(\n internalOptions: Partial = {},\n clientOptions: Partial = {},\n): Partial {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\nfunction _shouldDropEvent(event: Event, options: Partial): boolean {\n if (options.ignoreInternal && _isSentryError(event)) {\n DEBUG_BUILD &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isUselessError(event)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n event,\n )}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n DEBUG_BUILD &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event: Event, ignoreErrors?: Array): boolean {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event: Event, ignoreTransactions?: Array): boolean {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event: Event, denyUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event: Event, allowUrls?: Array): boolean {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event: Event): string[] {\n const possibleMessages: string[] = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event: Event): boolean {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames: StackFrame[] = []): string | null {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event: Event): string | null {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nfunction _isUselessError(event: Event): boolean {\n if (event.type) {\n // event is not an error\n return false;\n }\n\n // We only want to consider events for dropping that actually have recorded exception values.\n if (!event.exception || !event.exception.values || event.exception.values.length === 0) {\n return false;\n }\n\n return (\n // No top-level message\n !event.message &&\n // There are no exception values that have a stacktrace, a non-generic-Error type or value\n !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n );\n}\n","import { getClient } from '../currentScopes';\nimport { defineIntegration } from '../integration';\nimport type { Client, IntegrationFn, WrappedFunction } from '../types-hoist';\nimport { getOriginalFunction } from '../utils-hoist/object';\n\nlet originalFunctionToString: () => void;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n Function.prototype.toString = function (this: WrappedFunction, ...args: unknown[]): string {\n const originalFunction = getOriginalFunction(this);\n const context =\n SETUP_CLIENTS.has(getClient() as Client) && originalFunction !== undefined ? originalFunction : this;\n return originalFunctionToString.apply(context, args);\n };\n } catch {\n // ignore errors here, just don't patch this\n }\n },\n setup(client) {\n SETUP_CLIENTS.set(client, true);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n * integrations: [\n * functionToStringIntegration(),\n * ],\n * });\n * ```\n */\nexport const functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n","import { defineIntegration } from '../integration';\nimport type { Event, Exception, IntegrationFn, StackFrame } from '../types-hoist';\n\nimport { DEBUG_BUILD } from '../debug-build';\nimport { logger } from '../utils-hoist/logger';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace';\n\nconst INTEGRATION_NAME = 'Dedupe';\n\nconst _dedupeIntegration = (() => {\n let previousEvent: Event | undefined;\n\n return {\n name: INTEGRATION_NAME,\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, previousEvent)) {\n DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (previousEvent = currentEvent);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Deduplication filter.\n */\nexport const dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nexport function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\nfunction _isSameMessageEvent(currentEvent: Event, previousEvent: Event): boolean {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boolean {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\nfunction _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean {\n let currentFrames = getFramesFromEvent(currentEvent);\n let previousFrames = getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames as StackFrame[];\n previousFrames = previousFrames as StackFrame[];\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameA = previousFrames[i]!;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const frameB = currentFrames[i]!;\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint as string[];\n previousFingerprint = previousFingerprint as string[];\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\nfunction _getExceptionFromEvent(event: Event): Exception | undefined {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n","import { DEBUG_BUILD } from './debug-build';\nimport { logger } from './logger';\nimport { GLOBAL_OBJ } from './worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\ndeclare const EdgeRuntime: string | undefined;\n\nexport { supportsHistory } from './vendor/supportsHistory';\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent(): boolean {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError(): boolean {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException(): boolean {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch(): boolean {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isNativeFunction(func: Function): boolean {\n return func && /^function\\s+\\w+\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch(): boolean {\n if (typeof EdgeRuntime === 'string') {\n return true;\n }\n\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFunction(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement as unknown) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFunction(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver(): boolean {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy(): boolean {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' as ReferrerPolicy,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n","import type { DsnComponents, DsnLike, DsnProtocol } from '../types-hoist';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { consoleSandbox, logger } from './logger';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n","import type {\n Attachment,\n AttachmentItem,\n BaseEnvelopeHeaders,\n BaseEnvelopeItemHeaders,\n DataCategory,\n DsnComponents,\n Envelope,\n EnvelopeItemType,\n Event,\n EventEnvelopeHeaders,\n SdkInfo,\n SdkMetadata,\n SpanItem,\n SpanJSON,\n} from '../types-hoist';\n\nimport { dsnToString } from './dsn';\nimport { normalize } from './normalize';\nimport { dropUndefinedKeys } from './object';\nimport { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function createEnvelope(headers: E[0], items: E[1] = []): E {\n return [headers, items] as E;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nexport function addItemToEnvelope(envelope: E, newItem: E[1][number]): E {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] as unknown as E;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nexport function forEachEnvelopeItem(\n envelope: Envelope,\n callback: (envelopeItem: E[1][number], envelopeItemType: E[1][number][0]['type']) => boolean | void,\n): boolean {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nexport function envelopeContainsItemType(envelope: Envelope, types: EnvelopeItemType[]): boolean {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8 array.\n */\nfunction encodeUTF8(input: string): Uint8Array {\n return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.encodePolyfill\n ? GLOBAL_OBJ.__SENTRY__.encodePolyfill(input)\n : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input: Uint8Array): string {\n return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.decodePolyfill\n ? GLOBAL_OBJ.__SENTRY__.decodePolyfill(input)\n : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nexport function serializeEnvelope(envelope: Envelope): string | Uint8Array {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts: string | Uint8Array[] = JSON.stringify(envHeaders);\n\n function append(next: string | Uint8Array): void {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload: string;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.stringify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers: Uint8Array[]): Uint8Array {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nexport function parseEnvelope(env: string | Uint8Array): Envelope {\n let buffer = typeof env === 'string' ? encodeUTF8(env) : env;\n\n function readBinary(length: number): Uint8Array {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson(): T {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(decodeUTF8(readBinary(i))) as T;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items: [any, any][] = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates envelope item for a single span\n */\nexport function createSpanEnvelopeItem(spanJson: Partial): SpanItem {\n const spanHeaders: SpanItem[0] = {\n type: 'span',\n };\n\n return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nexport function createAttachmentEnvelopeItem(attachment: Attachment): AttachmentItem {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP: Record = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n profile_chunk: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n feedback: 'feedback',\n span: 'span',\n statsd: 'metric_bucket',\n raw_security: 'security',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nexport function envelopeItemTypeToDataCategory(type: EnvelopeItemType): DataCategory {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from the metadata or an events */\nexport function getSdkMetadataForEnvelopeHeader(metadataOrEvent?: SdkMetadata | Event): SdkInfo | undefined {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nexport function createEventEnvelopeHeaders(\n event: Event,\n sdkInfo: SdkInfo | undefined,\n tunnel: string | undefined,\n dsn?: DsnComponents,\n): EventEnvelopeHeaders {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id as string,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n","import type { ConsoleLevel } from '../types-hoist';\n\n/** An error emitted by Sentry SDKs and related utilities. */\nexport class SentryError extends Error {\n public logLevel: ConsoleLevel;\n\n public constructor(\n public message: string,\n logLevel: ConsoleLevel = 'warn',\n ) {\n super(message);\n\n this.logLevel = logLevel;\n }\n}\n","/* eslint-disable max-lines */\nimport type {\n Breadcrumb,\n BreadcrumbHint,\n Client,\n ClientOptions,\n DataCategory,\n DsnComponents,\n DynamicSamplingContext,\n Envelope,\n ErrorEvent,\n Event,\n EventDropReason,\n EventHint,\n EventProcessor,\n FeedbackEvent,\n Integration,\n Outcome,\n ParameterizedString,\n SdkMetadata,\n Session,\n SessionAggregates,\n SeverityLevel,\n Span,\n SpanAttributes,\n SpanContextData,\n SpanJSON,\n StartSpanOptions,\n TransactionEvent,\n Transport,\n TransportMakeRequestResponse,\n} from './types-hoist';\n\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api';\nimport { getCurrentScope, getIsolationScope, getTraceContextFromScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope';\nimport type { IntegrationIndex } from './integration';\nimport { afterSetupIntegrations } from './integration';\nimport { setupIntegration, setupIntegrations } from './integration';\nimport type { Scope } from './scope';\nimport { updateSession } from './session';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport';\nimport { dsnToString, makeDsn } from './utils-hoist/dsn';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope';\nimport { SentryError } from './utils-hoist/error';\nimport { isParameterizedString, isPlainObject, isPrimitive, isThenable } from './utils-hoist/is';\nimport { consoleSandbox, logger } from './utils-hoist/logger';\nimport { checkOrSetAlreadyCaught, uuid4 } from './utils-hoist/misc';\nimport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './utils-hoist/syncpromise';\nimport { parseSampleRate } from './utils/parseSampleRate';\nimport { prepareEvent } from './utils/prepareEvent';\nimport { showSpanDropWarning } from './utils/spanUtils';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nexport abstract class BaseClient implements Client {\n /** Options passed to the SDK. */\n protected readonly _options: O;\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n protected readonly _dsn?: DsnComponents;\n\n protected readonly _transport?: Transport;\n\n /** Array of set up integrations. */\n protected _integrations: IntegrationIndex;\n\n /** Number of calls being processed */\n protected _numProcessing: number;\n\n protected _eventProcessors: EventProcessor[];\n\n /** Holds flushable */\n private _outcomes: { [key: string]: number };\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n private _hooks: Record;\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n protected constructor(options: O) {\n this._options = options;\n this._integrations = {};\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(\n this._dsn,\n options.tunnel,\n options._metadata ? options._metadata.sdk : undefined,\n );\n this._transport = options.transport({\n tunnel: this._options.tunnel,\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n\n // TODO(v9): Remove this deprecation warning\n const tracingOptions = ['enableTracing', 'tracesSampleRate', 'tracesSampler'] as const;\n const undefinedOption = tracingOptions.find(option => option in options && options[option] == undefined);\n if (undefinedOption) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n `[Sentry] Deprecation warning: \\`${undefinedOption}\\` is set to undefined, which leads to tracing being enabled. In v9, a value of \\`undefined\\` will result in tracing being disabled.`,\n );\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: unknown, hint?: EventHint, scope?: Scope): string {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n this._process(\n this.eventFromException(exception, hintWithEventId).then(event =>\n this._captureEvent(event, hintWithEventId, scope),\n ),\n );\n\n return hintWithEventId.event_id;\n }\n\n /**\n * @inheritDoc\n */\n public captureMessage(\n message: ParameterizedString,\n level?: SeverityLevel,\n hint?: EventHint,\n currentScope?: Scope,\n ): string {\n const hintWithEventId = {\n event_id: uuid4(),\n ...hint,\n };\n\n const eventMessage = isParameterizedString(message) ? message : String(message);\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n : this.eventFromException(message, hintWithEventId);\n\n this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n\n return hintWithEventId.event_id;\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, currentScope?: Scope): string {\n const eventId = uuid4();\n\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return eventId;\n }\n\n const hintWithEventId = {\n event_id: eventId,\n ...hint,\n };\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanScope: Scope | undefined = sdkProcessingMetadata.capturedSpanScope;\n\n this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope));\n\n return hintWithEventId.event_id;\n }\n\n /**\n * @inheritDoc\n */\n public captureSession(session: Session): void {\n if (!(typeof session.release === 'string')) {\n DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n public getDsn(): DsnComponents | undefined {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n public getOptions(): O {\n return this._options;\n }\n\n /**\n * @see SdkMetadata\n *\n * @return The metadata of the SDK\n */\n public getSdkMetadata(): SdkMetadata | undefined {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n public getTransport(): Transport | undefined {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n public flush(timeout?: number): PromiseLike {\n const transport = this._transport;\n if (transport) {\n this.emit('flush');\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n public close(timeout?: number): PromiseLike {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n this.emit('close');\n return result;\n });\n }\n\n /** Get all installed event processors. */\n public getEventProcessors(): EventProcessor[] {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n public addEventProcessor(eventProcessor: EventProcessor): void {\n this._eventProcessors.push(eventProcessor);\n }\n\n /** @inheritdoc */\n public init(): void {\n if (\n this._isEnabled() ||\n // Force integrations to be setup even if no DSN was set when we have\n // Spotlight enabled. This is particularly important for browser as we\n // don't support the `spotlight` option there and rely on the users\n // adding the `spotlightBrowserIntegration()` to their integrations which\n // wouldn't get initialized with the check below when there's no DSN set.\n this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n ) {\n this._setupIntegrations();\n }\n }\n\n /**\n * Gets an installed integration by its name.\n *\n * @returns The installed integration or `undefined` if no integration with that `name` was installed.\n */\n public getIntegrationByName(integrationName: string): T | undefined {\n return this._integrations[integrationName] as T | undefined;\n }\n\n /**\n * @inheritDoc\n */\n public addIntegration(integration: Integration): void {\n const isAlreadyInstalled = this._integrations[integration.name];\n\n // This hook takes care of only installing if not already installed\n setupIntegration(this, integration, this._integrations);\n // Here we need to check manually to make sure to not run this multiple times\n if (!isAlreadyInstalled) {\n afterSetupIntegrations(this, [integration]);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendEvent(event: Event, hint: EventHint = {}): void {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment));\n }\n\n const promise = this.sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n public sendSession(session: Session | SessionAggregates): void {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n public recordDroppedEvent(reason: EventDropReason, category: DataCategory, eventOrCount?: Event | number): void {\n if (this._options.sendClientReports) {\n // TODO v9: We do not need the `event` passed as third argument anymore, and can possibly remove this overload\n // If event is passed as third argument, we assume this is a count of 1\n const count = typeof eventOrCount === 'number' ? eventOrCount : 1;\n\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n this._outcomes[key] = (this._outcomes[key] || 0) + count;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n public on(hook: 'spanStart', callback: (span: Span) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: 'spanEnd', callback: (span: Span) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: 'idleSpanEnableAutoFinish', callback: (span: Span) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint) => void): () => void;\n\n /** @inheritdoc */\n public on(\n hook: 'afterSendEvent',\n callback: (event: Event, sendResponse: TransportMakeRequestResponse) => void,\n ): () => void;\n\n /** @inheritdoc */\n public on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext, rootSpan?: Span) => void): () => void;\n\n /** @inheritdoc */\n public on(\n hook: 'beforeSendFeedback',\n callback: (feedback: FeedbackEvent, options?: { includeReplay: boolean }) => void,\n ): () => void;\n\n /** @inheritdoc */\n public on(\n hook: 'beforeSampling',\n callback: (\n samplingData: {\n spanAttributes: SpanAttributes;\n spanName: string;\n parentSampled?: boolean;\n parentContext?: SpanContextData;\n },\n samplingDecision: { decision: boolean },\n ) => void,\n ): void;\n\n /** @inheritdoc */\n public on(\n hook: 'startPageLoadSpan',\n callback: (\n options: StartSpanOptions,\n traceOptions?: { sentryTrace?: string | undefined; baggage?: string | undefined },\n ) => void,\n ): () => void;\n\n /** @inheritdoc */\n public on(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): () => void;\n\n public on(hook: 'flush', callback: () => void): () => void;\n\n public on(hook: 'close', callback: () => void): () => void;\n\n public on(hook: 'applyFrameMetadata', callback: (event: Event) => void): () => void;\n\n /** @inheritdoc */\n public on(hook: string, callback: unknown): () => void {\n const hooks = (this._hooks[hook] = this._hooks[hook] || []);\n\n // @ts-expect-error We assume the types are correct\n hooks.push(callback);\n\n // This function returns a callback execution handler that, when invoked,\n // deregisters a callback. This is crucial for managing instances where callbacks\n // need to be unregistered to prevent self-referencing in callback closures,\n // ensuring proper garbage collection.\n return () => {\n // @ts-expect-error We assume the types are correct\n const cbIndex = hooks.indexOf(callback);\n if (cbIndex > -1) {\n hooks.splice(cbIndex, 1);\n }\n };\n }\n\n /** @inheritdoc */\n public emit(\n hook: 'beforeSampling',\n samplingData: {\n spanAttributes: SpanAttributes;\n spanName: string;\n parentSampled?: boolean;\n parentContext?: SpanContextData;\n },\n samplingDecision: { decision: boolean },\n ): void;\n\n /** @inheritdoc */\n public emit(hook: 'spanStart', span: Span): void;\n\n /** @inheritdoc */\n public emit(hook: 'spanEnd', span: Span): void;\n\n /** @inheritdoc */\n public emit(hook: 'idleSpanEnableAutoFinish', span: Span): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeEnvelope', envelope: Envelope): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n\n /** @inheritdoc */\n public emit(hook: 'createDsc', dsc: DynamicSamplingContext, rootSpan?: Span): void;\n\n /** @inheritdoc */\n public emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: { includeReplay: boolean }): void;\n\n /** @inheritdoc */\n public emit(\n hook: 'startPageLoadSpan',\n options: StartSpanOptions,\n traceOptions?: { sentryTrace?: string | undefined; baggage?: string | undefined },\n ): void;\n\n /** @inheritdoc */\n public emit(hook: 'startNavigationSpan', options: StartSpanOptions): void;\n\n /** @inheritdoc */\n public emit(hook: 'flush'): void;\n\n /** @inheritdoc */\n public emit(hook: 'close'): void;\n\n /** @inheritdoc */\n public emit(hook: 'applyFrameMetadata', event: Event): void;\n\n /** @inheritdoc */\n public emit(hook: string, ...rest: unknown[]): void {\n const callbacks = this._hooks[hook];\n if (callbacks) {\n callbacks.forEach(callback => callback(...rest));\n }\n }\n\n /**\n * @inheritdoc\n */\n public sendEnvelope(envelope: Envelope): PromiseLike {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n return reason;\n });\n }\n\n DEBUG_BUILD && logger.error('Transport disabled');\n\n return resolvedSyncPromise({});\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Setup integrations for this client. */\n protected _setupIntegrations(): void {\n const { integrations } = this._options;\n this._integrations = setupIntegrations(this, integrations);\n afterSetupIntegrations(this, integrations);\n }\n\n /** Updates existing session based on the provided event */\n protected _updateSessionFromEvent(session: Session, event: Event): void {\n let crashed = event.level === 'fatal';\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n protected _isClientDoneProcessing(timeout?: number): PromiseLike {\n return new SyncPromise(resolve => {\n let ticked: number = 0;\n const tick: number = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n protected _isEnabled(): boolean {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A new event with more information.\n */\n protected _prepareEvent(\n event: Event,\n hint: EventHint,\n currentScope = getCurrentScope(),\n isolationScope = getIsolationScope(),\n ): PromiseLike {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n if (!event.type) {\n isolationScope.setLastEventId(event.event_id || hint.event_id);\n }\n\n return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n evt.contexts = {\n trace: getTraceContextFromScope(currentScope),\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n protected _captureEvent(event: Event, hint: EventHint = {}, scope?: Scope): PromiseLike {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if (DEBUG_BUILD) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n if (reason instanceof SentryError && reason.logLevel === 'log') {\n logger.log(reason.message);\n } else {\n logger.warn(reason);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param currentScope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n protected _processEvent(event: Event, hint: EventHint, currentScope?: Scope): PromiseLike {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory: DataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n const capturedSpanIsolationScope: Scope | undefined = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data as { __sentry__: boolean }).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(this, options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n if (isTransaction) {\n const spans = event.spans || [];\n // the transaction itself counts as one span, plus all the child spans that are added\n const spanCount = 1 + spans.length;\n this.recordDroppedEvent('before_send', 'span', spanCount);\n }\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = currentScope && currentScope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n if (isTransaction) {\n const spanCountBefore =\n (processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing) ||\n 0;\n const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n const droppedSpanCount = spanCountBefore - spanCountAfter;\n if (droppedSpanCount > 0) {\n this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n }\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n protected _process(promise: PromiseLike): void {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n protected _clearOutcomes(): Outcome[] {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.entries(outcomes).map(([key, quantity]) => {\n const [reason, category] = key.split(':') as [EventDropReason, DataCategory];\n return {\n reason,\n category,\n quantity,\n };\n });\n }\n\n /**\n * Sends client reports as an envelope.\n */\n protected _flushOutcomes(): void {\n DEBUG_BUILD && logger.log('Flushing outcomes...');\n\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n DEBUG_BUILD && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n public abstract eventFromException(_exception: unknown, _hint?: EventHint): PromiseLike;\n\n /**\n * @inheritDoc\n */\n public abstract eventFromMessage(\n _message: ParameterizedString,\n _level?: SeverityLevel,\n _hint?: EventHint,\n ): PromiseLike;\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult: PromiseLike | Event | null,\n beforeSendLabel: string,\n): PromiseLike | Event | null {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n client: Client,\n options: ClientOptions,\n event: Event,\n hint: EventHint,\n): PromiseLike | Event | null {\n const { beforeSend, beforeSendTransaction, beforeSendSpan } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event)) {\n if (event.spans && beforeSendSpan) {\n const processedSpans: SpanJSON[] = [];\n for (const span of event.spans) {\n const processedSpan = beforeSendSpan(span);\n if (processedSpan) {\n processedSpans.push(processedSpan);\n } else {\n showSpanDropWarning();\n client.recordDroppedEvent('before_send', 'span');\n }\n }\n event.spans = processedSpans;\n }\n\n if (beforeSendTransaction) {\n if (event.spans) {\n // We store the # of spans before processing in SDK metadata,\n // so we can compare it afterwards to determine how many spans were dropped\n const spanCountBefore = event.spans.length;\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n spanCountBeforeProcessing: spanCountBefore,\n };\n }\n return beforeSendTransaction(event, hint);\n }\n }\n\n return event;\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === 'transaction';\n}\n","import type { DsnComponents, DsnLike, SdkInfo } from './types-hoist';\nimport { dsnToString, makeDsn } from './utils-hoist/dsn';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn: DsnComponents): string {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn: DsnComponents): string {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn: DsnComponents, sdkInfo: SdkInfo | undefined): string {\n const params: Record = {\n sentry_version: SENTRY_API_VERSION,\n };\n\n if (dsn.publicKey) {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n params.sentry_key = dsn.publicKey;\n }\n\n if (sdkInfo) {\n params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n }\n\n return new URLSearchParams(params).toString();\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn: DsnComponents, tunnel?: string, sdkInfo?: SdkInfo): string {\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nexport function getReportDialogEndpoint(\n dsnLike: DsnLike,\n dialogOptions: {\n // TODO(v9): Change this to [key: string]: unknown;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n user?: { name?: string; email?: string };\n },\n): string {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'onClose') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] as string)}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext';\nimport type { SentrySpan } from './tracing/sentrySpan';\nimport type {\n Client,\n DsnComponents,\n DynamicSamplingContext,\n Event,\n EventEnvelope,\n EventItem,\n LegacyCSPReport,\n RawSecurityEnvelope,\n RawSecurityItem,\n SdkInfo,\n SdkMetadata,\n Session,\n SessionAggregates,\n SessionEnvelope,\n SessionItem,\n SpanEnvelope,\n SpanItem,\n SpanJSON,\n} from './types-hoist';\nimport { dsnToString } from './utils-hoist/dsn';\nimport {\n createEnvelope,\n createEventEnvelopeHeaders,\n createSpanEnvelopeItem,\n getSdkMetadataForEnvelopeHeader,\n} from './utils-hoist/envelope';\nimport { uuid4 } from './utils-hoist/misc';\nimport { showSpanDropWarning, spanToJSON } from './utils/spanUtils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event: Event, sdkInfo?: SdkInfo): Event {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(\n session: Session | SessionAggregates,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): SessionEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem: SessionItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nexport function createEventEnvelope(\n event: Event,\n dsn?: DsnComponents,\n metadata?: SdkMetadata,\n tunnel?: string,\n): EventEnvelope {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjust a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem: EventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nexport function createSpanEnvelope(spans: [SentrySpan, ...SentrySpan[]], client?: Client): SpanEnvelope {\n function dscHasRequiredProps(dsc: Partial): dsc is DynamicSamplingContext {\n return !!dsc.trace_id && !!dsc.public_key;\n }\n\n // For the moment we'll obtain the DSC from the first span in the array\n // This might need to be changed if we permit sending multiple spans from\n // different segments in one envelope\n const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n\n const headers: SpanEnvelope[0] = {\n sent_at: new Date().toISOString(),\n ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const beforeSendSpan = client && client.getOptions().beforeSendSpan;\n const convertToSpanJSON = beforeSendSpan\n ? (span: SentrySpan) => {\n const spanJson = beforeSendSpan(spanToJSON(span) as SpanJSON);\n if (!spanJson) {\n showSpanDropWarning();\n }\n return spanJson;\n }\n : (span: SentrySpan) => spanToJSON(span);\n\n const items: SpanItem[] = [];\n for (const span of spans) {\n const spanJson = convertToSpanJSON(span);\n if (spanJson) {\n items.push(createSpanEnvelopeItem(spanJson));\n }\n }\n\n return createEnvelope(headers, items);\n}\n\n/**\n * Create an Envelope from a CSP report.\n */\nexport function createRawSecurityEnvelope(\n report: LegacyCSPReport,\n dsn: DsnComponents,\n tunnel?: string,\n release?: string,\n environment?: string,\n): RawSecurityEnvelope {\n const envelopeHeaders = {\n event_id: uuid4(),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const eventItem: RawSecurityItem = [\n { type: 'raw_security', sentry_release: release, sentry_environment: environment },\n report,\n ];\n\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { logger } from '../utils-hoist/logger';\n\n/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nexport function parseSampleRate(sampleRate: unknown): number | undefined {\n if (typeof sampleRate === 'boolean') {\n return Number(sampleRate);\n }\n\n const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n DEBUG_BUILD &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n sampleRate,\n )} of type ${JSON.stringify(typeof sampleRate)}.`,\n );\n return undefined;\n }\n\n return rate;\n}\n","import type { ClientReport, ClientReportEnvelope, ClientReportItem } from '../types-hoist';\n\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n discarded_events: ClientReport['discarded_events'],\n dsn?: string,\n timestamp?: number,\n): ClientReportEnvelope {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n","declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n","import type {\n Event,\n EventHint,\n Exception,\n ParameterizedString,\n SeverityLevel,\n StackFrame,\n StackParser,\n} from '@sentry/core';\nimport {\n addExceptionMechanism,\n addExceptionTypeValue,\n extractExceptionKeysForMessage,\n getClient,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isParameterizedString,\n isPlainObject,\n normalizeToSize,\n resolvedSyncPromise,\n} from '@sentry/core';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception: Exception = {\n type: extractType(ex),\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\nfunction eventFromPlainObject(\n stackParser: StackParser,\n exception: Record,\n syntheticException?: Error,\n isUnhandledRejection?: boolean,\n): Event {\n const client = getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n };\n\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)],\n },\n extra,\n };\n }\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n } as Exception,\n ],\n },\n extra,\n } satisfies Event;\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0]!.stacktrace = { frames };\n }\n }\n\n return event;\n}\n\nfunction eventFromError(stackParser: StackParser, ex: Error): Event {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser: StackParser,\n ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex: Error): number {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex: Error & { framesToPop?: unknown }): number {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception: unknown): exception is WebAssembly.Exception {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nexport function extractType(ex: Error & { message: { error?: Error } }): string | undefined {\n const name = ex && ex.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n\n return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nexport function extractMessage(ex: Error & { message: { error?: Error } }): string {\n const message = ex && ex.message;\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: ParameterizedString,\n level: SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n stackParser: StackParser,\n exception: unknown,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n isUnhandledRejection?: boolean,\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n return eventFromError(stackParser, errorEvent.error as Error);\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromError(stackParser, exception as Error);\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception as Record;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\nfunction eventFromString(\n stackParser: StackParser,\n message: ParameterizedString,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {};\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }],\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception: Record,\n { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n try {\n const prototype: Prototype | null = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record): Error | undefined {\n for (const prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n const value = obj[prop];\n if (value instanceof Error) {\n return value;\n }\n }\n }\n\n return undefined;\n}\n","import type { Mechanism, WrappedFunction } from '@sentry/core';\nimport {\n GLOBAL_OBJ,\n addExceptionMechanism,\n addExceptionTypeValue,\n addNonEnumerableProperty,\n captureException,\n getOriginalFunction,\n markFunctionWrapped,\n withScope,\n} from '@sentry/core';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window;\n\nlet ignoreOnError: number = 0;\n\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError(): boolean {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nexport function ignoreNextOnError(): void {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype WrappableFunction = Function;\n\nexport function wrap(\n fn: T,\n options?: {\n mechanism?: Mechanism;\n },\n): WrappedFunction;\nexport function wrap(\n fn: NonFunction,\n options?: {\n mechanism?: Mechanism;\n },\n): NonFunction;\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(\n fn: T | NonFunction,\n options: {\n mechanism?: Mechanism;\n } = {},\n): NonFunction | WrappedFunction {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n function isFunction(fn: T | NonFunction): fn is T {\n return typeof fn === 'function';\n }\n\n if (!isFunction(fn)) {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = (fn as WrappedFunction).__sentry_wrapped__;\n if (wrapper) {\n if (typeof wrapper === 'function') {\n return wrapper;\n } else {\n // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n // that something messed with it. In that case we want to return the originally passed function.\n return fn;\n }\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n // Wrap the function itself\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function (this: unknown, ...args: unknown[]): unknown {\n try {\n // Also wrap arguments that are themselves functions\n const wrappedArguments = args.map(arg => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope(scope => {\n scope.addEventProcessor(event => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n } as unknown as WrappedFunction;\n\n // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property as keyof T] = fn[property as keyof T];\n }\n }\n } catch {\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n }\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name')!;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get(): string {\n return fn.name;\n },\n });\n }\n } catch {\n // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n // to save some bytes we simply try-catch this\n }\n\n return sentryWrapped;\n}\n","import type {\n BrowserClientProfilingOptions,\n BrowserClientReplayOptions,\n ClientOptions,\n Event,\n EventHint,\n Options,\n ParameterizedString,\n Scope,\n SeverityLevel,\n UserFeedback,\n} from '@sentry/core';\nimport { BaseClient, applySdkMetadata, getSDKSource, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { WINDOW } from './helpers';\nimport type { BrowserTransportOptions } from './transports/types';\nimport { createUserFeedbackEnvelope } from './userfeedback';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/core Options for more information.\n */\nexport type BrowserOptions = Options &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions & {\n /**\n * Important: Only set this option if you know what you are doing!\n *\n * By default, the SDK will check if `Sentry.init` is called in a browser extension.\n * In case it is, it will stop initialization and log a warning\n * because browser extensions require a different Sentry initialization process:\n * https://docs.sentry.io/platforms/javascript/best-practices/shared-environments/\n *\n * Setting up the SDK in a browser extension with global error monitoring is not recommended\n * and will likely flood you with errors from other web sites or extensions. This can heavily\n * impact your quota and cause interference with your and other Sentry SDKs in shared environments.\n *\n * If this check wrongfully flags your setup as a browser extension, you can set this\n * option to `true` to skip the check.\n *\n * @default false\n */\n skipBrowserExtensionCheck?: boolean;\n };\n\n/**\n * Configuration options for the Sentry Browser SDK Client class\n * @see BrowserClient for more information.\n */\nexport type BrowserClientOptions = ClientOptions &\n BrowserClientReplayOptions &\n BrowserClientProfilingOptions & {\n /** If configured, this URL will be used as base URL for lazy loading integration. */\n cdnBaseUrl?: string;\n };\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n public constructor(options: BrowserClientOptions) {\n const opts = {\n // We default this to true, as it is the safer scenario\n parentSpanIsAlwaysRootSpan: true,\n ...options,\n };\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n super(opts);\n\n if (opts.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: ParameterizedString,\n level: SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n if (!this._isEnabled()) {\n DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n}\n","import type { Options } from '../types-hoist';\nimport { SDK_VERSION } from '../utils-hoist/version';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nexport function applySdkMetadata(options: Options, name: string, names = [name], source = 'npm'): void {\n const metadata = options._metadata || {};\n\n if (!metadata.sdk) {\n metadata.sdk = {\n name: `sentry.javascript.${name}`,\n packages: names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n };\n }\n\n options._metadata = metadata;\n}\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n /* __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n","import { createEnvelope, dsnToString } from '@sentry/core';\nimport type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/core';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n feedback: UserFeedback,\n {\n metadata,\n tunnel,\n dsn,\n }: {\n metadata: SdkMetadata | undefined;\n tunnel: string | undefined;\n dsn: DsnComponents | undefined;\n },\n): EventEnvelope {\n const headers: EventEnvelope[0] = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n const feedbackHeaders: UserFeedbackItem[0] = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n","import { DEBUG_BUILD } from '../debug-build';\nimport { logger } from '../logger';\nimport { getFunctionName } from '../stacktrace';\n\nexport type InstrumentHandlerType =\n | 'console'\n | 'dom'\n | 'fetch'\n | 'fetch-body-resolved'\n | 'history'\n | 'xhr'\n | 'error'\n | 'unhandledrejection';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type InstrumentHandlerCallback = (data: any) => void;\n\n// We keep the handlers globally\nconst handlers: { [key in InstrumentHandlerType]?: InstrumentHandlerCallback[] } = {};\nconst instrumented: { [key in InstrumentHandlerType]?: boolean } = {};\n\n/** Add a handler function. */\nexport function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void {\n handlers[type] = handlers[type] || [];\n (handlers[type] as InstrumentHandlerCallback[]).push(handler);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nexport function resetInstrumentationHandlers(): void {\n Object.keys(handlers).forEach(key => {\n handlers[key as InstrumentHandlerType] = undefined;\n });\n}\n\n/** Maybe run an instrumentation function, unless it was already called. */\nexport function maybeInstrument(type: InstrumentHandlerType, instrumentFn: () => void): void {\n if (!instrumented[type]) {\n instrumented[type] = true;\n try {\n instrumentFn();\n } catch (e) {\n DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n }\n }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nexport function triggerHandlers(type: InstrumentHandlerType, data: unknown): void {\n const typeHandlers = type && handlers[type];\n if (!typeHandlers) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n DEBUG_BUILD &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nexport const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ &\n // document is not available in all browser environments (webworkers). We make it optional so you have to explicitly check for it\n Omit &\n Partial>;\n","import type { HandlerDataDom } from '@sentry/core';\nimport { addHandler, addNonEnumerableProperty, fill, maybeInstrument, triggerHandlers, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types';\n\ntype SentryWrappedTarget = HTMLElement & { _sentryId?: string };\n\ntype AddEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n) => void;\ntype RemoveEventListener = (\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n) => void;\n\ntype InstrumentedElement = Element & {\n __sentry_instrumentation_handlers__?: {\n [key in 'click' | 'keypress']?: {\n handler?: unknown;\n /** The number of custom listeners attached to this element */\n refCount: number;\n };\n };\n};\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID: number | undefined;\nlet lastCapturedEventType: string | undefined;\nlet lastCapturedEventTargetId: string | undefined;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addClickKeypressInstrumentationHandler(handler: (data: HandlerDataDom) => void): void {\n const type = 'dom';\n addHandler(type, handler);\n maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\nexport function instrumentDOM(): void {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target: string) => {\n const globalObject = WINDOW as unknown as Record;\n const targetObj = globalObject[target];\n const proto = targetObj && targetObj.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener: AddEventListener): AddEventListener {\n return function (this: InstrumentedElement, type, listener, options): AddEventListener {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = (this.__sentry_instrumentation_handlers__ =\n this.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener: RemoveEventListener): RemoveEventListener {\n return function (this: InstrumentedElement, type, listener, options): () => void {\n if (type === 'click' || type == 'keypress') {\n try {\n const handlers = this.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete this.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event: Event): boolean {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target as SentryWrappedTarget)._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType: string, target: SentryWrappedTarget | null): boolean {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n handler: (data: HandlerDataDom) => void,\n globalListener: boolean = false,\n): (event: Event) => void {\n return (event: Event & { _sentryCaptured?: true }): void => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n const handlerData: HandlerDataDom = { event, name, global: globalListener };\n handler(handlerData);\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\nfunction getEventTarget(event: Event): SentryWrappedTarget | null {\n try {\n return event.target as SentryWrappedTarget | null;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n","import type { HandlerDataXhr, SentryWrappedXMLHttpRequest } from '@sentry/core';\nimport { addHandler, isString, maybeInstrument, timestampInSeconds, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types';\n\nexport const SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\ntype WindowWithXhr = Window & { XMLHttpRequest?: typeof XMLHttpRequest };\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addXhrInstrumentationHandler(handler: (data: HandlerDataXhr) => void): void {\n const type = 'xhr';\n addHandler(type, handler);\n maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nexport function instrumentXHR(): void {\n if (!(WINDOW as WindowWithXhr).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.open = new Proxy(xhrproto.open, {\n apply(originalOpen, xhrOpenThisArg: XMLHttpRequest & SentryWrappedXMLHttpRequest, xhrOpenArgArray) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your XHR call did not\n // have a stack trace. If you are using HttpClient integration,\n // this is the expected behavior, as we are using this virtual error to capture\n // the location of your XHR call, and group your HttpClient events accordingly.\n const virtualError = new Error();\n\n const startTimestamp = timestampInSeconds() * 1000;\n\n // open() should always be called with two or more arguments\n // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n const url = parseUrl(xhrOpenArgArray[1]);\n\n if (!method || !url) {\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n }\n\n xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n method,\n url,\n request_headers: {},\n };\n\n // if Sentry key appears in URL, don't capture it as a request\n if (method === 'POST' && url.match(/sentry_key/)) {\n xhrOpenThisArg.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler: () => void = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (xhrOpenThisArg.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = xhrOpenThisArg.status;\n } catch (e) {\n /* do nothing */\n }\n\n const handlerData: HandlerDataXhr = {\n endTimestamp: timestampInSeconds() * 1000,\n startTimestamp,\n xhr: xhrOpenThisArg,\n virtualError,\n };\n triggerHandlers('xhr', handlerData);\n }\n };\n\n if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray: unknown[]) {\n onreadystatechangeHandler();\n return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n },\n });\n } else {\n xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n apply(\n originalSetRequestHeader,\n setRequestHeaderThisArg: SentryWrappedXMLHttpRequest,\n setRequestHeaderArgArray: unknown[],\n ) {\n const [header, value] = setRequestHeaderArgArray;\n\n const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo && isString(header) && isString(value)) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n },\n });\n\n return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n },\n });\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n xhrproto.send = new Proxy(xhrproto.send, {\n apply(originalSend, sendThisArg: XMLHttpRequest & SentryWrappedXMLHttpRequest, sendArgArray: unknown[]) {\n const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n if (!sentryXhrData) {\n return originalSend.apply(sendThisArg, sendArgArray);\n }\n\n if (sendArgArray[0] !== undefined) {\n sentryXhrData.body = sendArgArray[0];\n }\n\n const handlerData: HandlerDataXhr = {\n startTimestamp: timestampInSeconds() * 1000,\n xhr: sendThisArg,\n };\n triggerHandlers('xhr', handlerData);\n\n return originalSend.apply(sendThisArg, sendArgArray);\n },\n });\n}\n\nfunction parseUrl(url: string | unknown): string | undefined {\n if (isString(url)) {\n return url;\n }\n\n try {\n // url can be a string or URL\n // but since URL is not available in IE11, we do not check for it,\n // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n // If that fails, we just return undefined\n return (url as URL).toString();\n } catch {} // eslint-disable-line no-empty\n\n return undefined;\n}\n","// Based on https://github.com/angular/angular.js/pull/13945/files\n// The MIT License\n\n// Copyright (c) 2010-2016 Google, Inc. http://angularjs.org\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { GLOBAL_OBJ } from '../worldwide';\n\nconst WINDOW = GLOBAL_OBJ as unknown as Window;\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory(): boolean {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n // TODO(v9): Remove this custom check, it is pretty old and likely not needed anymore\n const chromeVar = (WINDOW as { chrome?: { app?: { runtime?: unknown } } }).chrome;\n const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime;\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n","import { addHandler, fill, maybeInstrument, supportsHistory, triggerHandlers } from '@sentry/core';\nimport type { HandlerDataHistory } from '@sentry/core';\nimport { WINDOW } from '../types';\n\nlet lastHref: string | undefined;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addHistoryInstrumentationHandler(handler: (data: HandlerDataHistory) => void): void {\n const type = 'history';\n addHandler(type, handler);\n maybeInstrument(type, instrumentHistory);\n}\n\nfunction instrumentHistory(): void {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function (this: WindowEventHandlers, ...args: unknown[]) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n const handlerData: HandlerDataHistory = { from, to };\n triggerHandlers('history', handlerData);\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n function historyReplacementFunction(originalHistoryFunction: () => void): () => void {\n return function (this: History, ...args: unknown[]): void {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n const handlerData: HandlerDataHistory = { from, to };\n triggerHandlers('history', handlerData);\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\nimport type { ConsoleLevel, HandlerDataConsole } from '../../types-hoist';\n\nimport { CONSOLE_LEVELS, originalConsoleMethods } from '../logger';\nimport { fill } from '../object';\nimport { GLOBAL_OBJ } from '../worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): void {\n const type = 'console';\n addHandler(type, handler);\n maybeInstrument(type, instrumentConsole);\n}\n\nfunction instrumentConsole(): void {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level: ConsoleLevel): void {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod: () => any): Function {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args: any[]): void {\n const handlerData: HandlerDataConsole = { args, level };\n triggerHandlers('console', handlerData);\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { HandlerDataFetch } from '../../types-hoist';\n\nimport { isError } from '../is';\nimport { addNonEnumerableProperty, fill } from '../object';\nimport { supportsNativeFetch } from '../supports';\nimport { timestampInSeconds } from '../time';\nimport { GLOBAL_OBJ } from '../worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\ntype FetchResource = string | { toString(): string } | { url: string };\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addFetchInstrumentationHandler(\n handler: (data: HandlerDataFetch) => void,\n skipNativeFetchCheck?: boolean,\n): void {\n const type = 'fetch';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nexport function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): void {\n const type = 'fetch-body-resolved';\n addHandler(type, handler);\n maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\n\nfunction instrumentFetch(onFetchResolved?: (response: Response) => void, skipNativeFetchCheck: boolean = false): void {\n if (skipNativeFetchCheck && !supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch: () => void): () => void {\n return function (...args: any[]): void {\n // We capture the error right here and not in the Promise error callback because Safari (and probably other\n // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n const virtualError = new Error();\n\n const { method, url } = parseFetchArgs(args);\n const handlerData: HandlerDataFetch = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: timestampInSeconds() * 1000,\n // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n virtualError,\n };\n\n // if there is no callback, fetch is instrumented directly\n if (!onFetchResolved) {\n triggerHandlers('fetch', {\n ...handlerData,\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n async (response: Response) => {\n if (onFetchResolved) {\n onFetchResolved(response);\n } else {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n }\n\n return response;\n },\n (error: Error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: timestampInSeconds() * 1000,\n error,\n });\n\n if (isError(error) && error.stack === undefined) {\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the error, that was caused by your fetch call did not\n // have a stack trace, so the SDK backfilled the stack trace so\n // you can see which fetch call failed.\n error.stack = virtualError.stack;\n addNonEnumerableProperty(error, 'framesToPop', 1);\n }\n\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nasync function resolveResponse(res: Response | undefined, onFinishedResolving: () => void): Promise {\n if (res && res.body) {\n const body = res.body;\n const responseReader = body.getReader();\n\n // Define a maximum duration after which we just cancel\n const maxFetchDurationTimeout = setTimeout(\n () => {\n body.cancel().then(null, () => {\n // noop\n });\n },\n 90 * 1000, // 90s\n );\n\n let readingActive = true;\n while (readingActive) {\n let chunkTimeout;\n try {\n // abort reading if read op takes more than 5s\n chunkTimeout = setTimeout(() => {\n body.cancel().then(null, () => {\n // noop on error\n });\n }, 5000);\n\n // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n const { done } = await responseReader.read();\n\n clearTimeout(chunkTimeout);\n\n if (done) {\n onFinishedResolving();\n readingActive = false;\n }\n } catch (error) {\n readingActive = false;\n } finally {\n clearTimeout(chunkTimeout);\n }\n }\n\n clearTimeout(maxFetchDurationTimeout);\n\n responseReader.releaseLock();\n body.cancel().then(null, () => {\n // noop on error\n });\n }\n}\n\nfunction streamHandler(response: Response): void {\n // clone response for awaiting stream\n let clonedResponseForResolving: Response;\n try {\n clonedResponseForResolving = response.clone();\n } catch {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n resolveResponse(clonedResponseForResolving, () => {\n triggerHandlers('fetch-body-resolved', {\n endTimestamp: timestampInSeconds() * 1000,\n response,\n });\n });\n}\n\nfunction hasProp(obj: unknown, prop: T): obj is Record {\n return !!obj && typeof obj === 'object' && !!(obj as Record)[prop];\n}\n\nfunction getUrlFromResource(resource: FetchResource): string {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request.\n * Exported for tests only.\n */\nexport function parseFetchArgs(fetchArgs: unknown[]): { method: string; url: string } {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs as [FetchResource, object];\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg as FetchResource),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n","import { getClient, getIsolationScope } from './currentScopes';\nimport type { Breadcrumb, BreadcrumbHint } from './types-hoist';\nimport { consoleSandbox } from './utils-hoist/logger';\nimport { dateTimestampInSeconds } from './utils-hoist/time';\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n */\nexport function addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void {\n const client = getClient();\n const isolationScope = getIsolationScope();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions();\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) as Breadcrumb | null)\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n","import type { SeverityLevel } from '../types-hoist';\n\n/**\n * @deprecated This variable has been deprecated and will be removed in the next major version.\n */\nexport const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nexport function severityLevelFromString(level: SeverityLevel | string): SeverityLevel {\n return (\n level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n ) as SeverityLevel;\n}\n","import type { SeverityLevel } from '../types-hoist';\n\n/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nexport function getBreadcrumbLogLevelFromHttpStatusCode(statusCode: number | undefined): SeverityLevel | undefined {\n // NOTE: undefined defaults to 'info' in Sentry\n if (statusCode === undefined) {\n return undefined;\n } else if (statusCode >= 400 && statusCode < 500) {\n return 'warning';\n } else if (statusCode >= 500) {\n return 'error';\n } else {\n return undefined;\n }\n}\n","type PartialURL = {\n host?: string;\n path?: string;\n protocol?: string;\n relative?: string;\n search?: string;\n hash?: string;\n};\n\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url: string): PartialURL {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nexport function stripUrlQueryAndFragment(urlPath: string): string {\n return (urlPath.split(/[?#]/, 1) as [string, ...string[]])[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n *\n * @deprecated This function will be removed in the next major version.\n */\n// TODO(v9): Hoist this function into the places where we use it. (as it stands only react router v6 instrumentation)\nexport function getNumberOfUrlSegments(url: string): number {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span name\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nexport function getSanitizedUrlString(url: PartialURL): string {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n // TODO: Use new URL global if it exists\n .replace(/(:80)$/, '')\n .replace(/(:443)$/, '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n","/* eslint-disable max-lines */\n\nimport {\n SENTRY_XHR_DATA_KEY,\n addClickKeypressInstrumentationHandler,\n addHistoryInstrumentationHandler,\n addXhrInstrumentationHandler,\n} from '@sentry-internal/browser-utils';\nimport type {\n Breadcrumb,\n Client,\n Event as SentryEvent,\n FetchBreadcrumbData,\n FetchBreadcrumbHint,\n HandlerDataConsole,\n HandlerDataDom,\n HandlerDataFetch,\n HandlerDataHistory,\n HandlerDataXhr,\n IntegrationFn,\n XhrBreadcrumbData,\n XhrBreadcrumbHint,\n} from '@sentry/core';\nimport {\n addBreadcrumb,\n addConsoleInstrumentationHandler,\n addFetchInstrumentationHandler,\n defineIntegration,\n getBreadcrumbLogLevelFromHttpStatusCode,\n getClient,\n getComponentName,\n getEventDescription,\n htmlTreeAsString,\n logger,\n parseUrl,\n safeJoin,\n severityLevelFromString,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\ninterface BreadcrumbsOptions {\n console: boolean;\n dom:\n | boolean\n | {\n serializeAttribute?: string | string[];\n maxStringLength?: number;\n };\n fetch: boolean;\n history: boolean;\n sentry: boolean;\n xhr: boolean;\n}\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs';\n\nconst _breadcrumbsIntegration = ((options: Partial = {}) => {\n const _options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (_options.console) {\n addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n }\n if (_options.dom) {\n addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n }\n if (_options.xhr) {\n addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n }\n if (_options.fetch) {\n addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n }\n if (_options.history) {\n addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n }\n if (_options.sentry) {\n client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n }\n },\n };\n}) satisfies IntegrationFn;\n\nexport const breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client: Client): (event: SentryEvent) => void {\n return function addSentryBreadcrumb(event: SentryEvent): void {\n if (getClient() !== client) {\n return;\n }\n\n addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n };\n}\n\n/**\n * A HOC that creates a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _getDomBreadcrumbHandler(\n client: Client,\n dom: BreadcrumbsOptions['dom'],\n): (handlerData: HandlerDataDom) => void {\n return function _innerDomBreadcrumb(handlerData: HandlerDataDom): void {\n if (getClient() !== client) {\n return;\n }\n\n let target;\n let componentName;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n DEBUG_BUILD &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event as Event | Node;\n const element = _isEvent(event) ? event.target : event;\n\n target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n componentName = getComponentName(element);\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n const breadcrumb: Breadcrumb = {\n category: `ui.${handlerData.name}`,\n message: target,\n };\n\n if (componentName) {\n breadcrumb.data = { 'ui.component_name': componentName };\n }\n\n addBreadcrumb(breadcrumb, {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client: Client): (handlerData: HandlerDataConsole) => void {\n return function _consoleBreadcrumb(handlerData: HandlerDataConsole): void {\n if (getClient() !== client) {\n return;\n }\n\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client: Client): (handlerData: HandlerDataXhr) => void {\n return function _xhrBreadcrumb(handlerData: HandlerDataXhr): void {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data: XhrBreadcrumbData = {\n method,\n url,\n status_code,\n };\n\n const hint: XhrBreadcrumbHint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n const level = getBreadcrumbLogLevelFromHttpStatusCode(status_code);\n\n addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n level,\n },\n hint,\n );\n };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client: Client): (handlerData: HandlerDataFetch) => void {\n return function _fetchBreadcrumb(handlerData: HandlerDataFetch): void {\n if (getClient() !== client) {\n return;\n }\n\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data: FetchBreadcrumbData = handlerData.fetchData;\n const hint: FetchBreadcrumbHint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const response = handlerData.response as Response | undefined;\n const data: FetchBreadcrumbData = {\n ...handlerData.fetchData,\n status_code: response && response.status,\n };\n const hint: FetchBreadcrumbHint = {\n input: handlerData.args,\n response,\n startTimestamp,\n endTimestamp,\n };\n const level = getBreadcrumbLogLevelFromHttpStatusCode(data.status_code);\n\n addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n level,\n },\n hint,\n );\n }\n };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client: Client): (handlerData: HandlerDataHistory) => void {\n return function _historyBreadcrumb(handlerData: HandlerDataHistory): void {\n if (getClient() !== client) {\n return;\n }\n\n let from: string | undefined = handlerData.from;\n let to: string | undefined = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = from ? parseUrl(from) : undefined;\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom || !parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n };\n}\n\nfunction _isEvent(event: unknown): event is Event {\n return !!event && !!(event as Record).target;\n}\n","import type { IntegrationFn, WrappedFunction } from '@sentry/core';\nimport { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\n\nimport { WINDOW, wrap } from '../helpers';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\nconst INTEGRATION_NAME = 'BrowserApiErrors';\n\ntype XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';\n\ninterface BrowserApiErrorsOptions {\n setTimeout: boolean;\n setInterval: boolean;\n requestAnimationFrame: boolean;\n XMLHttpRequest: boolean;\n eventTarget: boolean | string[];\n}\n\nconst _browserApiErrorsIntegration = ((options: Partial = {}) => {\n const _options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n // TODO: This currently only works for the first client this is setup\n // We may want to adjust this to check for client etc.\n setupOnce() {\n if (_options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (_options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (_options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = _options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nexport const browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original: () => void): () => number {\n return function (this: unknown, ...args: unknown[]): number {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\nfunction _wrapRAF(original: () => void): (callback: () => void) => unknown {\n return function (this: unknown, callback: () => void): () => void {\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\nfunction _wrapXHR(originalSend: () => void): () => void {\n return function (this: XMLHttpRequest, ...args: unknown[]): void {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps: XMLHttpRequestProp[] = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before BrowserApiErrors, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\nfunction _wrapEventTarget(target: string): void {\n const globalObject = WINDOW as unknown as Record;\n const targetObj = globalObject[target];\n const proto = targetObj && targetObj.prototype;\n\n // eslint-disable-next-line no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original: VoidFunction): (\n ...args: Parameters\n ) => ReturnType {\n return function (this: unknown, eventName, fn, options): VoidFunction {\n try {\n if (isEventListenerObject(fn)) {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(proto, 'removeEventListener', function (originalRemoveEventListener: VoidFunction): (\n this: unknown,\n ...args: Parameters\n ) => ReturnType {\n return function (this: unknown, eventName, fn, options): VoidFunction {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n try {\n const originalEventHandler = (fn as WrappedFunction).__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, fn, options);\n };\n });\n}\n\nfunction isEventListenerObject(obj: unknown): obj is EventListenerObject {\n return typeof (obj as EventListenerObject).handleEvent === 'function';\n}\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { captureSession, defineIntegration, logger, startSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nexport const browserSessionIntegration = defineIntegration(() => {\n return {\n name: 'BrowserSession',\n setupOnce() {\n if (typeof WINDOW.document === 'undefined') {\n DEBUG_BUILD &&\n logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSession({ ignoreDuration: true });\n captureSession();\n\n // We want to create a session for every navigation as well\n addHistoryInstrumentationHandler(({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (from !== undefined && from !== to) {\n startSession({ ignoreDuration: true });\n captureSession();\n }\n });\n },\n };\n});\n","import type { HandlerDataError } from '../../types-hoist';\n\nimport { GLOBAL_OBJ } from '../worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnErrorHandler: (typeof GLOBAL_OBJ)['onerror'] | null = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalErrorInstrumentationHandler(handler: (data: HandlerDataError) => void): void {\n const type = 'error';\n addHandler(type, handler);\n maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError(): void {\n _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n GLOBAL_OBJ.onerror = function (\n msg: string | object,\n url?: string,\n line?: number,\n column?: number,\n error?: Error,\n ): boolean {\n const handlerData: HandlerDataError = {\n column,\n error,\n line,\n msg,\n url,\n };\n triggerHandlers('error', handlerData);\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n","import type { HandlerDataUnhandledRejection } from '../../types-hoist';\nimport { GLOBAL_OBJ } from '../worldwide';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers';\n\nlet _oldOnUnhandledRejectionHandler: (typeof GLOBAL_OBJ)['onunhandledrejection'] | null = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addGlobalUnhandledRejectionInstrumentationHandler(\n handler: (data: HandlerDataUnhandledRejection) => void,\n): void {\n const type = 'unhandledrejection';\n addHandler(type, handler);\n maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection(): void {\n _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n GLOBAL_OBJ.onunhandledrejection = function (e: unknown): boolean {\n const handlerData: HandlerDataUnhandledRejection = e;\n triggerHandlers('unhandledrejection', handlerData);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n","import type { Client, Event, IntegrationFn, Primitive, StackParser } from '@sentry/core';\nimport {\n UNKNOWN_FUNCTION,\n addGlobalErrorInstrumentationHandler,\n addGlobalUnhandledRejectionInstrumentationHandler,\n captureEvent,\n defineIntegration,\n getClient,\n getLocationHref,\n isPrimitive,\n isString,\n logger,\n} from '@sentry/core';\n\nimport type { BrowserClient } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n\ntype GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';\n\ntype GlobalHandlersIntegrations = Record;\n\nconst INTEGRATION_NAME = 'GlobalHandlers';\n\nconst _globalHandlersIntegration = ((options: Partial = {}) => {\n const _options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n Error.stackTraceLimit = 50;\n },\n setup(client) {\n if (_options.onerror) {\n _installGlobalOnErrorHandler(client);\n globalHandlerLog('onerror');\n }\n if (_options.onunhandledrejection) {\n _installGlobalOnUnhandledRejectionHandler(client);\n globalHandlerLog('onunhandledrejection');\n }\n },\n };\n}) satisfies IntegrationFn;\n\nexport const globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client: Client): void {\n addGlobalErrorInstrumentationHandler(data => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const { msg, url, line, column, error } = data;\n\n const event = _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onerror',\n },\n });\n });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client: Client): void {\n addGlobalUnhandledRejectionInstrumentationHandler(e => {\n const { stackParser, attachStacktrace } = getOptions();\n\n if (getClient() !== client || shouldIgnoreOnError()) {\n return;\n }\n\n const error = _getUnhandledRejectionError(e as unknown);\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n captureEvent(event, {\n originalException: error,\n mechanism: {\n handled: false,\n type: 'onunhandledrejection',\n },\n });\n });\n}\n\nfunction _getUnhandledRejectionError(error: unknown): unknown {\n if (isPrimitive(error)) {\n return error;\n }\n\n // dig the object of the rejection out of known event types\n try {\n type ErrorWithReason = { reason: unknown };\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in (error as ErrorWithReason)) {\n return (error as ErrorWithReason).reason;\n }\n\n type CustomEventWithDetail = { detail: { reason: unknown } };\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n if ('detail' in (error as CustomEventWithDetail) && 'reason' in (error as CustomEventWithDetail).detail) {\n return (error as CustomEventWithDetail).detail.reason;\n }\n } catch {} // eslint-disable-line no-empty\n\n return error;\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason: Primitive): Event {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\nfunction _enhanceEventWithInitialFrame(\n event: Event,\n url: string | undefined,\n line: number | undefined,\n column: number | undefined,\n): Event {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = column;\n const lineno = line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: UNKNOWN_FUNCTION,\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type: string): void {\n DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions(): { stackParser: StackParser; attachStacktrace?: boolean } {\n const client = getClient();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return options;\n}\n","import { defineIntegration } from '@sentry/core';\nimport { WINDOW } from '../helpers';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nexport const httpContextIntegration = defineIntegration(() => {\n return {\n name: 'HttpContext',\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n },\n };\n});\n","import type { Event, EventHint, Exception, ExtendedError, StackParser } from '../types-hoist';\n\nimport { isInstanceOf } from './is';\nimport { truncate } from './string';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nexport function applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n parser: StackParser,\n maxValueLimit: number = 250,\n key: string,\n limit: number,\n event: Event,\n hint?: EventHint,\n): void {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException: Exception | undefined =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException as ExtendedError,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation: (stackParser: StackParser, ex: Error) => Exception,\n parser: StackParser,\n limit: number,\n error: ExtendedError,\n key: string,\n prevExceptions: Exception[],\n exception: Exception,\n exceptionId: number,\n): Exception[] {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n // Recursively call this function in order to walk down a chain of errors\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception: Exception, exceptionId: number): void {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n ...(exception.type === 'AggregateError' && { is_exception_group: true }),\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception: Exception,\n source: string,\n exceptionId: number,\n parentId: number | undefined,\n): void {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions: Exception[], maxValueLength: number): Exception[] {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n","import type { IntegrationFn } from '@sentry/core';\nimport { applyAggregateErrorsToEvent, defineIntegration } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder';\n\ninterface LinkedErrorsOptions {\n key?: string;\n limit?: number;\n}\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options: LinkedErrorsOptions = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n key,\n limit,\n event,\n hint,\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Aggregrate linked errors in an event.\n */\nexport const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n","// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, distribute, sublicense, and / or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport { UNKNOWN_FUNCTION, createStackParser } from '@sentry/core';\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@sentry/core';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n const frame: StackFrame = {\n filename,\n function: func === '' ? UNKNOWN_FUNCTION : func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn: StackLineParserFn = line => {\n // If the stack line has no function name, we need to parse it differently\n const noFnParts = chromeRegexNoFnName.exec(line) as null | [string, string, string, string];\n\n if (noFnParts) {\n const [, filename, line, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n }\n\n const parts = chromeRegex.exec(line) as null | [string, string, string, string, string];\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]) as null | [string, string, string, string];\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n const parts = geckoREgex.exec(line) as null | [string, string, string, string, string, string];\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]) as null | [string, string, string];\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n const parts = winjsRegex.exec(line) as null | [string, string, string, string, string];\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n const parts = opera10Regex.exec(line) as null | [string, string, string, string];\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n const parts = opera11Regex.exec(line) as null | [string, string, string, string, string, string];\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? (func.split('@')[0] as string) : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n","declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './types';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\ninterface CacheableImplementations {\n setTimeout: typeof WINDOW.setTimeout;\n fetch: typeof WINDOW.fetch;\n}\n\nconst cachedImplementations: Partial = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nexport function getNativeImplementation(\n name: T,\n): CacheableImplementations[T] {\n const cached = cachedImplementations[name];\n if (cached) {\n return cached;\n }\n\n let impl = WINDOW[name] as CacheableImplementations[T];\n\n // Fast path to avoid DOM I/O\n if (isNativeFunction(impl)) {\n return (cachedImplementations[name] = impl.bind(WINDOW) as CacheableImplementations[T]);\n }\n\n const document = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow[name]) {\n impl = contentWindow[name] as CacheableImplementations[T];\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n // Could not create sandbox iframe, just use window.xxx\n DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n }\n }\n\n // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n if (!impl) {\n return impl;\n }\n\n return (cachedImplementations[name] = impl.bind(WINDOW) as CacheableImplementations[T]);\n}\n\n/** Clear a cached implementation. */\nexport function clearCachedImplementation(name: keyof CacheableImplementations): void {\n cachedImplementations[name] = undefined;\n}\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function fetch(...rest: Parameters): ReturnType {\n return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nexport function setTimeout(...rest: Parameters): ReturnType {\n return getNativeImplementation('setTimeout')(...rest);\n}\n","import type { DataCategory, TransportMakeRequestResponse } from '../types-hoist';\n\n// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\nexport type RateLimits = Record;\n\nexport const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nexport function parseRetryAfterHeader(header: string, now: number = Date.now()): number {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nexport function disabledUntil(limits: RateLimits, dataCategory: DataCategory): number {\n return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nexport function isRateLimited(limits: RateLimits, dataCategory: DataCategory, now: number = Date.now()): boolean {\n return disabledUntil(limits, dataCategory) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nexport function updateRateLimits(\n limits: RateLimits,\n { statusCode, headers }: TransportMakeRequestResponse,\n now: number = Date.now(),\n): RateLimits {\n const updatedRateLimits: RateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
    ,
    ,..\n * where each
    is of the form\n * : : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n * Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n * Only present if rate limit applies to the metric_bucket data category.\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories, , , namespaces] = limit.split(':', 5) as [string, ...string[]];\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n if (category === 'metric_bucket') {\n // namespaces will be present when category === 'metric_bucket'\n if (!namespaces || namespaces.split(';').includes('custom')) {\n updatedRateLimits[category] = now + delay;\n }\n } else {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n","import type {\n Envelope,\n EnvelopeItem,\n EnvelopeItemType,\n Event,\n EventDropReason,\n EventItem,\n InternalBaseTransportOptions,\n Transport,\n TransportMakeRequestResponse,\n TransportRequestExecutor,\n} from '../types-hoist';\n\nimport { DEBUG_BUILD } from '../debug-build';\nimport {\n createEnvelope,\n envelopeItemTypeToDataCategory,\n forEachEnvelopeItem,\n serializeEnvelope,\n} from '../utils-hoist/envelope';\nimport { SentryError } from '../utils-hoist/error';\nimport { logger } from '../utils-hoist/logger';\nimport { type PromiseBuffer, makePromiseBuffer } from '../utils-hoist/promisebuffer';\nimport { type RateLimits, isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise';\n\nexport const DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(\n options: InternalBaseTransportOptions,\n makeRequest: TransportRequestExecutor,\n buffer: PromiseBuffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n): Transport {\n let rateLimits: RateLimits = {};\n const flush = (timeout?: number): PromiseLike => buffer.drain(timeout);\n\n function send(envelope: Envelope): PromiseLike {\n const filteredEnvelopeItems: EnvelopeItem[] = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const dataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, dataCategory)) {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', dataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise({});\n }\n\n const filteredEnvelope: Envelope = createEnvelope(envelope[0], filteredEnvelopeItems as (typeof envelope)[1]);\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason: EventDropReason): void => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event: Event | undefined = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = (): PromiseLike =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise({});\n } else {\n throw error;\n }\n },\n );\n }\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item: Envelope[1][number], type: EnvelopeItemType): Event | undefined {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item as EventItem)[1] : undefined;\n}\n","import { SentryError } from './error';\nimport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './syncpromise';\n\nexport interface PromiseBuffer {\n // exposes the internal array so tests can assert on the state of it.\n // XXX: this really should not be public api.\n $: Array>;\n add(taskProducer: () => PromiseLike): PromiseLike;\n drain(timeout?: number): PromiseLike;\n}\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nexport function makePromiseBuffer(limit?: number): PromiseBuffer {\n const buffer: Array> = [];\n\n function isReady(): boolean {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task: PromiseLike): PromiseLike {\n return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer: () => PromiseLike): PromiseLike {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout?: number): PromiseLike {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n","import { clearCachedImplementation, getNativeImplementation } from '@sentry-internal/browser-utils';\nimport type { Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/core';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\nimport type { WINDOW } from '../helpers';\nimport type { BrowserTransportOptions } from './types';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeFetchTransport(\n options: BrowserTransportOptions,\n nativeFetch: typeof WINDOW.fetch | undefined = getNativeImplementation('fetch'),\n): Transport {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request: TransportRequest): PromiseLike {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions: RequestInit = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60_000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n if (!nativeFetch) {\n clearCachedImplementation('fetch');\n return rejectedSyncPromise('No fetch implementation available');\n }\n\n try {\n // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedImplementation('fetch');\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n","import {\n consoleSandbox,\n dedupeIntegration,\n functionToStringIntegration,\n getClient,\n getCurrentScope,\n getIntegrationsToSetup,\n getReportDialogEndpoint,\n inboundFiltersIntegration,\n initAndBind,\n lastEventId,\n logger,\n stackParserFromStackParserOptions,\n supportsFetch,\n} from '@sentry/core';\nimport type { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core';\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { WINDOW } from './helpers';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors';\nimport { browserSessionIntegration } from './integrations/browsersession';\nimport { globalHandlersIntegration } from './integrations/globalhandlers';\nimport { httpContextIntegration } from './integrations/httpcontext';\nimport { linkedErrorsIntegration } from './integrations/linkederrors';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport } from './transports/fetch';\n\n/** Get the default integrations for the browser SDK. */\nexport function getDefaultIntegrations(options: Options): Integration[] {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n const integrations = [\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n ];\n\n // eslint-disable-next-line deprecation/deprecation\n if (options.autoSessionTracking !== false) {\n integrations.push(browserSessionIntegration());\n }\n\n return integrations;\n}\n\nfunction applyDefaultOptions(optionsArg: BrowserOptions = {}): BrowserOptions {\n const defaultOptions: BrowserOptions = {\n defaultIntegrations: getDefaultIntegrations(optionsArg),\n release:\n typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n ? __SENTRY_RELEASE__\n : WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id // This supports the variable that sentry-webpack-plugin injects\n ? WINDOW.SENTRY_RELEASE.id\n : undefined,\n autoSessionTracking: true,\n sendClientReports: true,\n };\n\n // TODO: Instead of dropping just `defaultIntegrations`, we should simply\n // call `dropUndefinedKeys` on the entire `optionsArg`.\n // However, for this to work we need to adjust the `hasTracingEnabled()` logic\n // first as it differentiates between `undefined` and the key not being in the object.\n if (optionsArg.defaultIntegrations == null) {\n delete optionsArg.defaultIntegrations;\n }\n\n return { ...defaultOptions, ...optionsArg };\n}\n\ntype ExtensionProperties = {\n chrome?: Runtime;\n browser?: Runtime;\n nw?: unknown;\n};\ntype Runtime = {\n runtime?: {\n id?: string;\n };\n};\n\nfunction shouldShowBrowserExtensionError(): boolean {\n const windowWithMaybeExtension =\n typeof WINDOW.window !== 'undefined' && (WINDOW as typeof WINDOW & ExtensionProperties);\n if (!windowWithMaybeExtension) {\n // No need to show the error if we're not in a browser window environment (e.g. service workers)\n return false;\n }\n\n const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n const extensionObject = windowWithMaybeExtension[extensionKey];\n\n const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id;\n const href = (WINDOW.location && WINDOW.location.href) || '';\n\n const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n const isDedicatedExtensionPage =\n !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n // see: https://github.com/getsentry/sentry-javascript/issues/12668\n const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\n}\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\ndeclare const __SENTRY_RELEASE__: string | undefined;\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(browserOptions: BrowserOptions = {}): Client | undefined {\n const options = applyDefaultOptions(browserOptions);\n\n if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(\n '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n );\n });\n return;\n }\n\n if (DEBUG_BUILD) {\n if (!supportsFetch()) {\n logger.warn(\n 'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n );\n }\n }\n const clientOptions: BrowserClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeFetchTransport,\n };\n\n return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * All properties the report dialog supports\n */\nexport interface ReportDialogOptions {\n // TODO(v9): Change this to [key: string]: unknkown;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n eventId?: string;\n dsn?: DsnLike;\n user?: {\n email?: string;\n name?: string;\n };\n lang?: string;\n title?: string;\n subtitle?: string;\n subtitle2?: string;\n labelName?: string;\n labelEmail?: string;\n labelComments?: string;\n labelClose?: string;\n labelSubmit?: string;\n errorGeneric?: string;\n errorFormEntry?: string;\n successMessage?: string;\n /** Callback after reportDialog showed up */\n onLoad?(this: void): void;\n /** Callback after reportDialog closed */\n onClose?(this: void): void;\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options: ReportDialogOptions = {}): void {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const scope = getCurrentScope();\n const client = scope.getClient();\n const dsn = client && client.getDsn();\n\n if (!dsn) {\n DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n const eventId = lastEventId();\n if (eventId) {\n options.eventId = eventId;\n }\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const { onClose } = options;\n if (onClose) {\n const reportDialogClosedMessageHandler = (event: MessageEvent): void => {\n if (event.data === '__sentry_reportdialog_closed__') {\n try {\n onClose();\n } finally {\n WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n }\n }\n };\n WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\nexport function captureUserFeedback(feedback: UserFeedback): void {\n const client = getClient();\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n client.captureUserFeedback(feedback);\n }\n}\n","import { getCurrentScope } from './currentScopes';\nimport type { Client, ClientOptions } from './types-hoist';\n\nimport { DEBUG_BUILD } from './debug-build';\nimport { consoleSandbox, logger } from './utils-hoist/logger';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(\n clientClass: ClientClass,\n options: O,\n): Client {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nexport function setCurrentClient(client: Client): void {\n getCurrentScope().setClient(client);\n}\n","export class CustomError extends Error {\n [key: string]: unknown;\n\n constructor(value: unknown) {\n let message = 'Non-error captured';\n\n if (typeof value === 'object' && value !== null) {\n if ('message' in value) {\n message = String(value['message']);\n }\n } else {\n message = String(value);\n }\n\n super(message);\n\n Object.entries(value)\n .filter(([key]) => key !== 'message' && key !== 'name')\n .forEach(([key, val]) => {\n this[key] = val;\n });\n\n this.name = value['name'] ?? 'CustomError';\n }\n}\n","import { ErrorHandler, Injectable, NgModule } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\n\nimport * as Sentry from '@sentry/browser';\n\nimport { SentryOptions } from '../../interfaces';\nimport { jsConfig } from '../config/jsConfig';\nimport { CAPTURE_MESSAGE, SentryLogger } from './sentry.logger';\nimport { CustomError } from '../../utils/custom-error';\n\nconst SENTRY_ENABLED = !!jsConfig.sentryDsn && typeof window !== 'undefined';\nconst CHUNKLOADERROR = /Loading chunk [\\da-z\\-_]+ failed/;\nconst CHUNKLOADERROR_NAME = 'ChunkLoadError_ForceReload';\nconst ONEHOUR = 1000 * 60 * 60; // One hour in ms\n\nconst DEFAULT_ERROR_FIELDS = new Set(['name', 'message', 'stack']);\n\nexport const captureException: any = (error: Error) => {\n if (!(error instanceof Error)) {\n error = normalizeError(error);\n }\n\n if (CHUNKLOADERROR.test(error.message) && !hasCurrentlyForceReloaded()) {\n console.error(error);\n // Handles ChunkLoadError by forcing reload, but only once per hour to avoid reload loop\n setReloadTimestamp();\n window.location.reload();\n } else if (SENTRY_ENABLED) {\n Sentry.withScope((scope) => {\n const extras = Object.entries(error)\n .filter(([key]) => !DEFAULT_ERROR_FIELDS.has(key))\n .reduce(\n (acc, [key, val]) => {\n acc[key] = val;\n return acc;\n },\n {} as Record\n );\n scope.setExtras(extras);\n Sentry.captureException(error);\n });\n } else {\n console.error(error);\n }\n};\n\nexport function normalizeError(error: unknown): Error {\n if (error instanceof Error) {\n return error;\n }\n\n return new CustomError(error);\n}\n\nexport function captureMessage(message: string, options: SentryOptions): void {\n if (SENTRY_ENABLED) {\n Sentry.withScope((scope) => {\n scope.setExtras(options.extra || {});\n Sentry.captureMessage(message, options.level);\n });\n } else {\n // eslint-disable-next-line no-console\n (console[options.level] || console.log)(message, options);\n }\n}\n\nexport function shouldIncludeUserAgent(userAgent: string): boolean {\n const isOldIe = /MSIE [5678]\\./.test(userAgent);\n const isOldAndroid = /Android [234]\\.]/.test(userAgent) && !/Chrome/.test(userAgent);\n return !(isOldIe || isOldAndroid);\n}\n\n/**\n * Matches the errors caught by Sentry from Angular's internals.\n * Splits the response in four groups:\n *
    \n [\n   \"Http failure response for https://api-test.finnair.com/a/ancillary/api/services?cartId=002MJD4OTOEIC204&hash=cmVzb3VyY2VJZDowMDJNSkQ0T1RPRUlDMjA0JnRpbWVzdGFtcDoxNTIzNTk5MjY0NDkwJm9mZmljZUlkOkhFTEFZMDhNTyZsb2NhbGU6ZW5fRkkmaGFzaDpJU3p3Q1VPSnRpbXg2Vi93T05rcVdkYngrTEVJZU9GbmExM2o3NkV1enpzPSZ0cmF2ZWxlcklkczpBRFVMVDF8U0tILTktRVhUasd: 403 OK\"\n   \"Http failure response for https://api-test.finnair.com/a/ancillary/api/services\"\n   \"?cartId=002MJD4OTOEIC204&hash=cmVzb3VyY2VJZDowMDJNSkQ0T1RPRUlDMjA0JnRpbWVzdGFtcDoxNTIzNTk5MjY0NDkwJm9mZmljZUlkOkhFTEFZMDhNTyZsb2NhbGU6ZW5fRkkmaGFzaDpJU3p3Q1VPSnRpbXg2Vi93T05rcVdkYngrTEVJZU9GbmExM2o3NkV1enpzPSZ0cmF2ZWxlcklkczpBRFVMVDF8U0tILTktRVhUasd\"\n   \": 403 OK\"\n ]\n 
    \n * In essence: [FULL_MSG, BASE_MSG, QUERYSTRING, REST]. Rest will be empty string if not matched\n * @type {RegExp}\n */\nconst HTTP_RESPONSE_SPLIT_REGEX = /((?:Http failure response for https?:\\/\\/)(?:[^?]*))([^:]*)(.*)/;\nconst splitMessageForHttpFailures = (msg: string): [string, { [key: string]: string }] => {\n const groups = HTTP_RESPONSE_SPLIT_REGEX.exec(msg);\n if (!groups || groups.length !== 4) {\n return [msg, {}];\n }\n const [, baseMsg, queryString, rest] = groups;\n return [baseMsg + rest, { queryString }];\n};\n\nconst sanitizeData = (value) => {\n if (typeof value === 'string') {\n return value.replace(/(hash|cartId|orderId)=(\\w+(==)?)/g, '$1=********');\n } else if (Array.isArray(value)) {\n return value.map(sanitizeData);\n } else if (typeof value === 'object' && value !== null) {\n return sanitizeObject(value);\n } else {\n return value;\n }\n};\n\nconst sanitizeKeys = ['hash', 'cartId', 'orderId'];\n\nconst sanitizeObject = (input: { [key: string]: any }): { [key: string]: any } => {\n return Object.keys(input).reduce((all, key) => {\n all[key] = sanitizeKeys.indexOf(key) !== -1 ? '********' : sanitizeData(input[key]);\n return all;\n }, {});\n};\n\n/**\n * Set session storage item with unix timestamp of time that force reload was performed\n */\nconst setReloadTimestamp = () => {\n sessionStorage.setItem(CHUNKLOADERROR_NAME, new Date().getTime().toString());\n};\n\nconst getReloadTimestamp = () => {\n return sessionStorage.getItem(CHUNKLOADERROR_NAME) ? parseInt(sessionStorage.getItem(CHUNKLOADERROR_NAME), 10) : null;\n};\n\nconst hasCurrentlyForceReloaded = () => {\n const nowMinusHour = new Date().getTime() - ONEHOUR;\n return getReloadTimestamp() && new Date(getReloadTimestamp()).getTime() > nowMinusHour;\n};\n\n// This code should be executed in main.ts to ensure Sentry is set up before the application bootstrap\nexport const initSentry = (): void => {\n if (SENTRY_ENABLED) {\n Sentry.init({\n dsn: jsConfig.sentryDsn,\n release: `${jsConfig.sentryPrefix}${jsConfig.buildEnv}-${jsConfig.versionInfo.releaseGitCommitHash}`,\n environment: jsConfig.sentryEnv,\n allowUrls: [\n // To get sentry working locally\n /webpack-internal/,\n // MATCH Content-Security-Policy here\n /\\.finnair\\.com/,\n /\\.googletagmanager\\.com/,\n /\\.google-analytics\\.com/,\n ],\n normalizeDepth: 4,\n ignoreErrors: [\n '[object Object]',\n 'Navigator.geolocation fetch failed',\n \"Failed to execute 'sendBeacon' on 'Navigator': Refused to send beacon\",\n /(?=.*QuotaExceededError)(?=.*snapinsPage_).*/, // Caused by Fluido/Salesforce chat and flooding from bots\n ],\n beforeSend: (event): Sentry.ErrorEvent => {\n if (loggingIsAllowedForEvent(event)) {\n const fixedRequest = { ...event.request, url: event.request.url.split('#')[0] };\n const [message, additional] = splitMessageForHttpFailures(event.message);\n return sanitizeObject({\n ...event,\n message,\n request: fixedRequest,\n extra: {\n ...event.extra,\n ...additional,\n },\n }) as Sentry.ErrorEvent;\n }\n return null;\n },\n });\n }\n};\n\nexport function loggingIsAllowedForEvent(event: Sentry.Event): boolean {\n if (!SENTRY_ENABLED) {\n return false;\n }\n\n if (!shouldIncludeUserAgent(window.navigator.userAgent)) {\n return false;\n }\n\n if (!isSentryAllowedForDomain(event.request.url)) {\n return false;\n }\n\n // Filter out http 0 errors\n if ((event?.extra?.error as HttpErrorResponse)?.status === 0) {\n return false;\n }\n\n return true;\n}\n\nexport const isSentryAllowedForDomain = (url: string): boolean =>\n /^http(s)?:\\/\\/www(-(dev|master|preprod|staging))?\\.finnair\\.com/.test(url);\n\n@Injectable()\nexport class SentryErrorHandler implements ErrorHandler {\n handleError(error: any): void {\n if (error instanceof HttpErrorResponse) {\n return;\n }\n captureException(error.originalError || error);\n }\n}\n\n@NgModule({\n providers: [{ provide: CAPTURE_MESSAGE, useValue: captureMessage }, SentryLogger],\n})\nexport class SentryModule {}\n","import { SpinnerType } from '@fcom/common-booking/interfaces';\nimport { ElementTypes, Breakpoint } from '@fcom/common/interfaces';\nimport { FinnairBoundNote, FinnairItineraryNote, FinnairPassengerCode } from '@fcom/dapi/api/models';\nimport { BoundType } from '@fcom/dapi';\n\nexport class AppConstants {\n public static readonly FinnairPassengerCode = FinnairPassengerCode;\n public static readonly BoundType = BoundType;\n public static readonly SpinnerType = SpinnerType;\n public static readonly ElementTypes = ElementTypes;\n public static readonly FinnairBoundNote = FinnairBoundNote;\n public static readonly FinnairItineraryNote = FinnairItineraryNote;\n public static readonly Breakpoint = Breakpoint;\n}\n","\n \n \n\n\n\n \n
    \n \n \n \n \n \n
    \n \n {{ labelText ? labelText : ((label ? label : translationPrefix + '.' + value) | finLocalization) }}\n \n
    \n
    {{ descriptionText | finLocalization }}
    \n
    \n
    \n
    \n
    \n \n
    \n\n\n \n
    \n \n \n \n
    \n \n \n {{ labelText ? labelText : ((label ? label : translationPrefix + '.' + value) | finLocalization) }}\n \n
    \n
    \n \n
    \n\n\n \n \n \n \n \n \n
    \n
    \n
    {{ descriptionTitle }}
    \n
    \n
    \n
    \n \n {{ translationPrefix + '.' + radioKey | finLocalization }}\n \n
    \n \n\n","import { Component, Input, OnInit } from '@angular/core';\nimport { UntypedFormGroup, AbstractControl } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\n\nimport { RadioButtonTheme } from '../enums';\n\n@Component({\n selector: 'fcom-radio-item',\n templateUrl: './radio-item.component.html',\n styleUrls: ['./radio-item.component.scss'],\n})\nexport class RadioItemComponent implements OnInit {\n readonly RadioButtonTheme = RadioButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n id: string;\n\n @Input() parentForm: UntypedFormGroup;\n\n @Input() controlName: string;\n\n @Input() translationPrefix: string;\n\n /**\n * @deprecated\n */\n @Input() radioKey: string;\n\n @Input() isSensitive = false;\n\n /**\n * @deprecated\n */\n @Input() displayContainerStyles = true;\n\n @Input() label: string;\n\n @Input() labelText?: string;\n\n @Input() value: string;\n\n @Input() theme = RadioButtonTheme.ROUND;\n\n @Input() first = false;\n\n @Input() last = false;\n\n @Input() renewedComponent = false;\n\n /**\n * @deprecated\n */\n @Input() description = false;\n\n @Input() isHorizontal = false;\n\n /**\n * @deprecated\n */\n @Input() descriptionTitle?: string;\n\n @Input() descriptionText?: string;\n\n @Input() name?: string;\n\n @Input() disabled? = false;\n\n control: AbstractControl;\n\n ngOnInit(): void {\n this.control = this.parentForm.get(this.controlName);\n this.id = uuid();\n }\n}\n","import { DeepLinkSource } from '@fcom/common/interfaces';\nimport { LocalDate } from '@fcom/core/utils';\nimport { FinnairAlternativeOffers, FinnairOrder, FinnairSelfReacConfirmationResponse } from '@fcom/dapi/api/models';\n\nimport { BookingInfo, Stage } from './';\n\nexport enum OrderSummaryStatus {\n INITIAL,\n PENDING,\n LOAD_ERROR,\n OK,\n}\n\nexport enum AlternativeOffersStateStatus {\n /** There are no offers to show and no request has been fired. */\n INITIAL,\n\n /** A request for loading the air offers has been initiated, but not yet completed */\n PENDING,\n\n /** The request for air offers was successful. */\n OK,\n\n /** The request for air offers resulted in error */\n ERROR,\n\n /** The request for air offers resulted with no flight found */\n NO_FLIGHT_FOUND,\n}\n\nexport interface AlternativeOffersState {\n /**\n * Current alternative offers\n */\n alternativeOffers: Record;\n\n /**\n * The current status of the air offers data.\n */\n status: AlternativeOffersStateStatus;\n\n /**\n * Ids of the offer selected per boundIndex\n */\n selectedOffers: Record;\n\n /**\n * Id of the disrupted bound that should be reaccomodated during this flow.\n * The self reaccommodation flow manages only one bound\n * per flow (in case of multiple bounds, user needs to do multiple flows).\n */\n disruptedBoundIndex: number;\n\n /**\n * The selected date for the bounds.\n * Undefined if not selected.\n */\n selectedDates?: Record;\n\n /**\n * The current stage in the flow\n */\n currentStage: Stage;\n\n /**\n * Deeplink source parameter to indicate from which endpoint user has entered\n */\n deeplinkSource?: DeepLinkSource;\n\n /*\n * Response received after the confirmation of the alternative offers.\n */\n confirmationResponse: FinnairSelfReacConfirmationResponse;\n\n /*\n * Whether the confimartion summary event has been already sent to GA, used to prevent sending it multiple times\n */\n analyticsSent: boolean;\n\n /*\n * Used to determine if session is expired and user is forced to refresh flow with fresh offers\n */\n sessionExpired: boolean;\n\n /*\n * Value in milliseconds of when user has started the session\n */\n sessionStartedMs: number;\n\n /*\n * Booking infromation of the pnr\n */\n booking: BookingInfo;\n\n /*\n * To check if GA event has to be send when user has landed on the page by refreshing expired session\n */\n sendRefreshOffersEvent: boolean;\n\n /*\n * Set in ticket selection phase if acknowledge wanted instead of new offer\n */\n acknowledgeFlow: boolean;\n\n alternativeConfirmStatusUrl: string;\n\n orderSummary: {\n orderSummaryData: FinnairOrder;\n orderStatus: OrderSummaryStatus;\n };\n\n reviewConfirmed: boolean;\n\n showAlternativeOffers: boolean;\n}\n","import { AppState } from '@fcom/core/interfaces/app-state.interface';\n\nimport { AlternativeOffersState } from './alternative-offers-state.interface';\n\nexport const ALTERNATIVE_OFFERS_STATE_FEATURE_NAME = 're-accommodation';\n\nexport interface ReaccommodationFeatureState extends AppState {\n [ALTERNATIVE_OFFERS_STATE_FEATURE_NAME]: AlternativeOffersState;\n}\n","export enum BoundReaccommodationStatus {\n NEW = 'new',\n CANCELLED = 'cancelled',\n REBOOKED = 'rebooked',\n DEFAULT = 'default',\n}\n\nexport enum BoundReaccommodationType {\n INBOUND = 'return',\n OUTBOUND = 'departure',\n COMPLEX = 'complex',\n}\n","\n","import { Component, Input, OnInit } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n/**\n * @deprecated Use the new `RadioItemGroupComponent` for simple radio lists.\n * For nested elements, use the old `RadioListComponent`, which uses this\n * component to generate the radio options.\n */\n@Component({\n selector: 'fin-form-input-radio',\n styleUrls: ['./form-input-radio.component.scss'],\n templateUrl: 'form-input-radio.component.html',\n})\nexport class FormInputRadioComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n radioKey: string;\n\n @Input()\n isSensitive = false;\n\n @Input()\n description = false;\n\n @Input()\n descriptionTitle: string;\n\n @Input()\n descriptionText: string;\n\n @Input()\n displayContainerStyles = true;\n\n control: AbstractControl;\n\n ngOnInit(): void {\n this.control = this.parentForm.get(this.controlName);\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.dev/license\n */\n\nlet _DOM: DomAdapter = null!;\n\nexport function getDOM(): DomAdapter {\n return _DOM;\n}\n\nexport function setRootDomAdapter(adapter: DomAdapter) {\n _DOM ??= adapter;\n}\n\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport abstract class DomAdapter {\n // Needs Domino-friendly test utility\n abstract dispatchEvent(el: any, evt: any): any;\n abstract readonly supportsDOMEvents: boolean;\n\n // Used by Meta\n abstract remove(el: any): void;\n abstract createElement(tagName: any, doc?: any): HTMLElement;\n abstract createHtmlDocument(): Document;\n abstract getDefaultDocument(): Document;\n\n // Used by By.css\n abstract isElementNode(node: any): boolean;\n\n // Used by Testability\n abstract isShadowRoot(node: any): boolean;\n\n // Used by KeyEventsPlugin\n abstract onAndCancel(el: any, evt: any, listener: any): Function;\n\n // Used by PlatformLocation and ServerEventManagerPlugin\n abstract getGlobalEventTarget(doc: Document, target: string): any;\n\n // Used by PlatformLocation\n abstract getBaseHref(doc: Document): string | null;\n abstract resetBaseElement(): void;\n\n // TODO: remove dependency in DefaultValueAccessor\n abstract getUserAgent(): string;\n\n // Used in the legacy @angular/http package which has some usage in g3.\n abstract getCookie(name: string): string | null;\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.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * A DI Token representing the main rendering context.\n * In a browser and SSR this is the DOM Document.\n * When using SSR, that document is created by [Domino](https://github.com/angular/domino).\n *\n * @publicApi\n */\nexport const DOCUMENT = new InjectionToken(ngDevMode ? 'DocumentToken' : '');\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.dev/license\n */\n\nimport {inject, Injectable, InjectionToken} from '@angular/core';\n\nimport {getDOM} from '../dom_adapter';\nimport {DOCUMENT} from '../dom_tokens';\n\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation)})\nexport abstract class PlatformLocation {\n abstract getBaseHrefFromDOM(): string;\n abstract getState(): unknown;\n /**\n * Returns a function that, when executed, removes the `popstate` event handler.\n */\n abstract onPopState(fn: LocationChangeListener): VoidFunction;\n /**\n * Returns a function that, when executed, removes the `hashchange` event handler.\n */\n abstract onHashChange(fn: LocationChangeListener): VoidFunction;\n\n abstract get href(): string;\n abstract get protocol(): string;\n abstract get hostname(): string;\n abstract get port(): string;\n abstract get pathname(): string;\n abstract get search(): string;\n abstract get hash(): string;\n\n abstract replaceState(state: any, title: string, url: string): void;\n\n abstract pushState(state: any, title: string, url: string): void;\n\n abstract forward(): void;\n\n abstract back(): void;\n\n historyGo?(relativePosition: number): void {\n throw new Error(ngDevMode ? 'Not implemented' : '');\n }\n}\n\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nexport const LOCATION_INITIALIZED = new InjectionToken>(\n ngDevMode ? 'Location Initialized' : '',\n);\n\n/**\n * @description\n * A serializable version of the event from `onPopState` or `onHashChange`\n *\n * @publicApi\n */\nexport interface LocationChangeEvent {\n type: string;\n state: any;\n}\n\n/**\n * @publicApi\n */\nexport interface LocationChangeListener {\n (event: LocationChangeEvent): any;\n}\n\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * @publicApi\n */\n@Injectable({\n providedIn: 'platform',\n useFactory: () => new BrowserPlatformLocation(),\n})\nexport class BrowserPlatformLocation extends PlatformLocation {\n private _location: Location;\n private _history: History;\n private _doc = inject(DOCUMENT);\n\n constructor() {\n super();\n this._location = window.location;\n this._history = window.history;\n }\n\n override getBaseHrefFromDOM(): string {\n return getDOM().getBaseHref(this._doc)!;\n }\n\n override onPopState(fn: LocationChangeListener): VoidFunction {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('popstate', fn, false);\n return () => window.removeEventListener('popstate', fn);\n }\n\n override onHashChange(fn: LocationChangeListener): VoidFunction {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('hashchange', fn, false);\n return () => window.removeEventListener('hashchange', fn);\n }\n\n override get href(): string {\n return this._location.href;\n }\n override get protocol(): string {\n return this._location.protocol;\n }\n override get hostname(): string {\n return this._location.hostname;\n }\n override get port(): string {\n return this._location.port;\n }\n override get pathname(): string {\n return this._location.pathname;\n }\n override get search(): string {\n return this._location.search;\n }\n override get hash(): string {\n return this._location.hash;\n }\n override set pathname(newPath: string) {\n this._location.pathname = newPath;\n }\n\n override pushState(state: any, title: string, url: string): void {\n this._history.pushState(state, title, url);\n }\n\n override replaceState(state: any, title: string, url: string): void {\n this._history.replaceState(state, title, url);\n }\n\n override forward(): void {\n this._history.forward();\n }\n\n override back(): void {\n this._history.back();\n }\n\n override historyGo(relativePosition: number = 0): void {\n this._history.go(relativePosition);\n }\n\n override getState(): unknown {\n return this._history.state;\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.dev/license\n */\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nexport function joinWithSlash(start: string, end: string): string {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n let slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nexport function stripTrailingSlash(url: string): string {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = (match && match.index) || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nexport function normalizeQueryParams(params: string): string {\n return params && params[0] !== '?' ? '?' + params : params;\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.dev/license\n */\n\nimport {Inject, inject, Injectable, InjectionToken, OnDestroy, Optional} from '@angular/core';\n\nimport {DOCUMENT} from '../dom_tokens';\n\nimport {LocationChangeListener, PlatformLocation} from './platform_location';\nimport {joinWithSlash, normalizeQueryParams} from './util';\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * http://example.com/#/foo,\n * and `PathLocationStrategy` produces\n * http://example.com/foo as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: () => inject(PathLocationStrategy)})\nexport abstract class LocationStrategy {\n abstract path(includeHash?: boolean): string;\n abstract prepareExternalUrl(internal: string): string;\n abstract getState(): unknown;\n abstract pushState(state: any, title: string, url: string, queryParams: string): void;\n abstract replaceState(state: any, title: string, url: string, queryParams: string): void;\n abstract forward(): void;\n abstract back(): void;\n historyGo?(relativePosition: number): void {\n throw new Error(ngDevMode ? 'Not implemented' : '');\n }\n abstract onPopState(fn: LocationChangeListener): void;\n abstract getBaseHref(): string;\n}\n\n/**\n * A predefined DI token for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport const APP_BASE_HREF = new InjectionToken(ngDevMode ? 'appBaseHref' : '');\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}\n * or add a `` element to the document to override the default.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,\n * the `` and/or `APP_BASE_HREF` should end with a `/`.\n *\n * Similarly, if you add `` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class PathLocationStrategy extends LocationStrategy implements OnDestroy {\n private _baseHref: string;\n private _removeListenerFns: (() => void)[] = [];\n\n constructor(\n private _platformLocation: PlatformLocation,\n @Optional() @Inject(APP_BASE_HREF) href?: string,\n ) {\n super();\n\n this._baseHref =\n href ??\n this._platformLocation.getBaseHrefFromDOM() ??\n inject(DOCUMENT).location?.origin ??\n '';\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n while (this._removeListenerFns.length) {\n this._removeListenerFns.pop()!();\n }\n }\n\n override onPopState(fn: LocationChangeListener): void {\n this._removeListenerFns.push(\n this._platformLocation.onPopState(fn),\n this._platformLocation.onHashChange(fn),\n );\n }\n\n override getBaseHref(): string {\n return this._baseHref;\n }\n\n override prepareExternalUrl(internal: string): string {\n return joinWithSlash(this._baseHref, internal);\n }\n\n override path(includeHash: boolean = false): string {\n const pathname =\n this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n const hash = this._platformLocation.hash;\n return hash && includeHash ? `${pathname}${hash}` : pathname;\n }\n\n override pushState(state: any, title: string, url: string, queryParams: string) {\n const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.pushState(state, title, externalUrl);\n }\n\n override replaceState(state: any, title: string, url: string, queryParams: string) {\n const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.replaceState(state, title, externalUrl);\n }\n\n override forward(): void {\n this._platformLocation.forward();\n }\n\n override back(): void {\n this._platformLocation.back();\n }\n\n override getState(): unknown {\n return this._platformLocation.getState();\n }\n\n override historyGo(relativePosition: number = 0): void {\n this._platformLocation.historyGo?.(relativePosition);\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.dev/license\n */\n\nimport {Inject, Injectable, OnDestroy, Optional} from '@angular/core';\n\nimport {APP_BASE_HREF, LocationStrategy} from './location_strategy';\nimport {LocationChangeListener, PlatformLocation} from './platform_location';\nimport {joinWithSlash, normalizeQueryParams} from './util';\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\n@Injectable()\nexport class HashLocationStrategy extends LocationStrategy implements OnDestroy {\n private _baseHref: string = '';\n private _removeListenerFns: (() => void)[] = [];\n\n constructor(\n private _platformLocation: PlatformLocation,\n @Optional() @Inject(APP_BASE_HREF) _baseHref?: string,\n ) {\n super();\n if (_baseHref != null) {\n this._baseHref = _baseHref;\n }\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n while (this._removeListenerFns.length) {\n this._removeListenerFns.pop()!();\n }\n }\n\n override onPopState(fn: LocationChangeListener): void {\n this._removeListenerFns.push(\n this._platformLocation.onPopState(fn),\n this._platformLocation.onHashChange(fn),\n );\n }\n\n override getBaseHref(): string {\n return this._baseHref;\n }\n\n override path(includeHash: boolean = false): string {\n // the hash value is always prefixed with a `#`\n // and if it is empty then it will stay empty\n const path = this._platformLocation.hash ?? '#';\n\n return path.length > 0 ? path.substring(1) : path;\n }\n\n override prepareExternalUrl(internal: string): string {\n const url = joinWithSlash(this._baseHref, internal);\n return url.length > 0 ? '#' + url : url;\n }\n\n override pushState(state: any, title: string, path: string, queryParams: string) {\n let url: string | null = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.pushState(state, title, url);\n }\n\n override replaceState(state: any, title: string, path: string, queryParams: string) {\n let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.replaceState(state, title, url);\n }\n\n override forward(): void {\n this._platformLocation.forward();\n }\n\n override back(): void {\n this._platformLocation.back();\n }\n\n override getState(): unknown {\n return this._platformLocation.getState();\n }\n\n override historyGo(relativePosition: number = 0): void {\n this._platformLocation.historyGo?.(relativePosition);\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.dev/license\n */\n\nimport {EventEmitter, Injectable, OnDestroy, ɵɵinject} from '@angular/core';\nimport {SubscriptionLike} from 'rxjs';\n\nimport {LocationStrategy} from './location_strategy';\nimport {joinWithSlash, normalizeQueryParams, stripTrailingSlash} from './util';\n\n/** @publicApi */\nexport interface PopStateEvent {\n pop?: boolean;\n state?: any;\n type?: string;\n url?: string;\n}\n\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router.navigate()` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * \n *\n * @publicApi\n */\n@Injectable({\n providedIn: 'root',\n // See #23917\n useFactory: createLocation,\n})\nexport class Location implements OnDestroy {\n /** @internal */\n _subject: EventEmitter = new EventEmitter();\n /** @internal */\n _basePath: string;\n /** @internal */\n _locationStrategy: LocationStrategy;\n /** @internal */\n _urlChangeListeners: ((url: string, state: unknown) => void)[] = [];\n /** @internal */\n _urlChangeSubscription: SubscriptionLike | null = null;\n\n constructor(locationStrategy: LocationStrategy) {\n this._locationStrategy = locationStrategy;\n const baseHref = this._locationStrategy.getBaseHref();\n // Note: This class's interaction with base HREF does not fully follow the rules\n // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm.\n // Instead of trying to fix individual bugs with more and more code, we should\n // investigate using the URL constructor and providing the base as a second\n // argument.\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters\n this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref)));\n this._locationStrategy.onPopState((ev) => {\n this._subject.emit({\n 'url': this.path(true),\n 'pop': true,\n 'state': ev.state,\n 'type': ev.type,\n });\n });\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n\n /**\n * Normalizes the URL path for this location.\n *\n * @param includeHash True to include an anchor fragment in the path.\n *\n * @returns The normalized URL path.\n */\n // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n // removed.\n path(includeHash: boolean = false): string {\n return this.normalize(this._locationStrategy.path(includeHash));\n }\n\n /**\n * Reports the current state of the location history.\n * @returns The current value of the `history.state` object.\n */\n getState(): unknown {\n return this._locationStrategy.getState();\n }\n\n /**\n * Normalizes the given path and compares to the current normalized path.\n *\n * @param path The given URL path.\n * @param query Query parameters.\n *\n * @returns True if the given URL path is equal to the current normalized path, false\n * otherwise.\n */\n isCurrentPathEqualTo(path: string, query: string = ''): boolean {\n return this.path() == this.normalize(path + normalizeQueryParams(query));\n }\n\n /**\n * Normalizes a URL path by stripping any trailing slashes.\n *\n * @param url String representing a URL.\n *\n * @returns The normalized URL string.\n */\n normalize(url: string): string {\n return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));\n }\n\n /**\n * Normalizes an external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n * before normalizing. Adds a hash if `HashLocationStrategy` is\n * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n *\n * @param url String representing a URL.\n *\n * @returns A normalized platform-specific URL.\n */\n prepareExternalUrl(url: string): string {\n if (url && url[0] !== '/') {\n url = '/' + url;\n }\n return this._locationStrategy.prepareExternalUrl(url);\n }\n\n // TODO: rename this method to pushState\n /**\n * Changes the browser's URL to a normalized version of a given URL, and pushes a\n * new item onto the platform's history.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n *\n */\n go(path: string, query: string = '', state: any = null): void {\n this._locationStrategy.pushState(state, '', path, query);\n this._notifyUrlChangeListeners(\n this.prepareExternalUrl(path + normalizeQueryParams(query)),\n state,\n );\n }\n\n /**\n * Changes the browser's URL to a normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n */\n replaceState(path: string, query: string = '', state: any = null): void {\n this._locationStrategy.replaceState(state, '', path, query);\n this._notifyUrlChangeListeners(\n this.prepareExternalUrl(path + normalizeQueryParams(query)),\n state,\n );\n }\n\n /**\n * Navigates forward in the platform's history.\n */\n forward(): void {\n this._locationStrategy.forward();\n }\n\n /**\n * Navigates back in the platform's history.\n */\n back(): void {\n this._locationStrategy.back();\n }\n\n /**\n * Navigate to a specific page from session history, identified by its relative position to the\n * current page.\n *\n * @param relativePosition Position of the target page in the history relative to the current\n * page.\n * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`\n * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go\n * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs\n * when `relativePosition` equals 0.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history\n */\n historyGo(relativePosition: number = 0): void {\n this._locationStrategy.historyGo?.(relativePosition);\n }\n\n /**\n * Registers a URL change listener. Use to catch updates performed by the Angular\n * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n *\n * @param fn The change handler function, which take a URL and a location history state.\n * @returns A function that, when executed, unregisters a URL change listener.\n */\n onUrlChange(fn: (url: string, state: unknown) => void): VoidFunction {\n this._urlChangeListeners.push(fn);\n\n this._urlChangeSubscription ??= this.subscribe((v) => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n\n /** @internal */\n _notifyUrlChangeListeners(url: string = '', state: unknown) {\n this._urlChangeListeners.forEach((fn) => fn(url, state));\n }\n\n /**\n * Subscribes to the platform's `popState` events.\n *\n * Note: `Location.go()` does not trigger the `popState` event in the browser. Use\n * `Location.onUrlChange()` to subscribe to URL changes instead.\n *\n * @param value Event that is triggered when the state history changes.\n * @param exception The exception to throw.\n *\n * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)\n *\n * @returns Subscribed events.\n */\n subscribe(\n onNext: (value: PopStateEvent) => void,\n onThrow?: ((exception: any) => void) | null,\n onReturn?: (() => void) | null,\n ): SubscriptionLike {\n return this._subject.subscribe({next: onNext, error: onThrow, complete: onReturn});\n }\n\n /**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\n public static normalizeQueryParams: (params: string) => string = normalizeQueryParams;\n\n /**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\n public static joinWithSlash: (start: string, end: string) => string = joinWithSlash;\n\n /**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\n public static stripTrailingSlash: (url: string) => string = stripTrailingSlash;\n}\n\nexport function createLocation() {\n return new Location(ɵɵinject(LocationStrategy as any));\n}\n\nfunction _stripBasePath(basePath: string, url: string): string {\n if (!basePath || !url.startsWith(basePath)) {\n return url;\n }\n const strippedUrl = url.substring(basePath.length);\n if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) {\n return strippedUrl;\n }\n return url;\n}\n\nfunction _stripIndexHtml(url: string): string {\n return url.replace(/\\/index.html$/, '');\n}\n\nfunction _stripOrigin(baseHref: string): string {\n // DO NOT REFACTOR! Previously, this check looked like this:\n // `/^(https?:)?\\/\\//.test(baseHref)`, but that resulted in\n // syntactically incorrect code after Closure Compiler minification.\n // This was likely caused by a bug in Closure Compiler, but\n // for now, the check is rewritten to use `new RegExp` instead.\n const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref);\n if (isAbsoluteUrl) {\n const [, pathname] = baseHref.split(/\\/\\/[^\\/]+/);\n return pathname;\n }\n return baseHref;\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.dev/license\n */\n\nimport {\n ɵCurrencyIndex,\n ɵExtraLocaleDataIndex,\n ɵfindLocaleData,\n ɵgetLocaleCurrencyCode,\n ɵgetLocalePluralCase,\n ɵLocaleDataIndex,\n} from '@angular/core';\n\nimport {CURRENCIES_EN, CurrenciesSymbols} from './currencies';\n\n/**\n * Format styles that can be used to represent numbers.\n * @see {@link getLocaleNumberFormat}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated `getLocaleNumberFormat` is deprecated\n */\nexport enum NumberFormatStyle {\n Decimal,\n Percent,\n Currency,\n Scientific,\n}\n\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see {@link NgPlural}\n * @see {@link NgPluralCase}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated `getLocalePluralCase` is deprecated\n */\nexport enum Plural {\n Zero = 0,\n One = 1,\n Two = 2,\n Few = 3,\n Many = 4,\n Other = 5,\n}\n\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated locale data getters are deprecated\n */\nexport enum FormStyle {\n Format,\n Standalone,\n}\n\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n *\n * @deprecated locale data getters are deprecated\n */\nexport enum TranslationWidth {\n /** 1 character for `en-US`. For example: 'S' */\n Narrow,\n /** 3 characters for `en-US`. For example: 'Sun' */\n Abbreviated,\n /** Full length for `en-US`. For example: \"Sunday\" */\n Wide,\n /** 2 characters for `en-US`, For example: \"Su\" */\n Short,\n}\n\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see {@link getLocaleDateFormat}\n * @see {@link getLocaleTimeFormat}\n * @see {@link getLocaleDateTimeFormat}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n * @publicApi\n *\n * @deprecated Date locale data getters are deprecated\n */\nexport enum FormatWidth {\n /**\n * For `en-US`, `'M/d/yy, h:mm a'`\n * (Example: `6/15/15, 9:03 AM`)\n */\n Short,\n /**\n * For `en-US`, `'MMM d, y, h:mm:ss a'`\n * (Example: `Jun 15, 2015, 9:03:01 AM`)\n */\n Medium,\n /**\n * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n */\n Long,\n /**\n * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n */\n Full,\n}\n\n// This needs to be an object literal, rather than an enum, because TypeScript 5.4+\n// doesn't allow numeric keys and we have `Infinity` and `NaN`.\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see {@link getLocaleNumberSymbol}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated `getLocaleNumberSymbol` is deprecated\n *\n * @object-literal-as-enum\n */\nexport const NumberSymbol = {\n /**\n * Decimal separator.\n * For `en-US`, the dot character.\n * Example: 2,345`.`67\n */\n Decimal: 0,\n /**\n * Grouping separator, typically for thousands.\n * For `en-US`, the comma character.\n * Example: 2`,`345.67\n */\n Group: 1,\n /**\n * List-item separator.\n * Example: \"one, two, and three\"\n */\n List: 2,\n /**\n * Sign for percentage (out of 100).\n * Example: 23.4%\n */\n PercentSign: 3,\n /**\n * Sign for positive numbers.\n * Example: +23\n */\n PlusSign: 4,\n /**\n * Sign for negative numbers.\n * Example: -23\n */\n MinusSign: 5,\n /**\n * Computer notation for exponential value (n times a power of 10).\n * Example: 1.2E3\n */\n Exponential: 6,\n /**\n * Human-readable format of exponential.\n * Example: 1.2x103\n */\n SuperscriptingExponent: 7,\n /**\n * Sign for permille (out of 1000).\n * Example: 23.4‰\n */\n PerMille: 8,\n /**\n * Infinity, can be used with plus and minus.\n * Example: ∞, +∞, -∞\n */\n Infinity: 9,\n /**\n * Not a number.\n * Example: NaN\n */\n NaN: 10,\n /**\n * Symbol used between time units.\n * Example: 10:52\n */\n TimeSeparator: 11,\n /**\n * Decimal separator for currency values (fallback to `Decimal`).\n * Example: $2,345.67\n */\n CurrencyDecimal: 12,\n /**\n * Group separator for currency values (fallback to `Group`).\n * Example: $2,345.67\n */\n CurrencyGroup: 13,\n} as const;\n\nexport type NumberSymbol = (typeof NumberSymbol)[keyof typeof NumberSymbol];\n\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n *\n * @deprecated Week locale getters are deprecated\n */\nexport enum WeekDay {\n Sunday = 0,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday,\n}\n\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * This function serves no purpose when relying on the `Intl` API.\n */\nexport function getLocaleId(locale: string): string {\n return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleDayPeriods(\n locale: string,\n formStyle: FormStyle,\n width: TranslationWidth,\n): Readonly<[string, string]> {\n const data = ɵfindLocaleData(locale);\n const amPmData = <[string, string][][]>[\n data[ɵLocaleDataIndex.DayPeriodsFormat],\n data[ɵLocaleDataIndex.DayPeriodsStandalone],\n ];\n const amPm = getLastDefinedValue(amPmData, formStyle);\n return getLastDefinedValue(amPm, width);\n}\n\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleDayNames(\n locale: string,\n formStyle: FormStyle,\n width: TranslationWidth,\n): ReadonlyArray {\n const data = ɵfindLocaleData(locale);\n const daysData = [\n data[ɵLocaleDataIndex.DaysFormat],\n data[ɵLocaleDataIndex.DaysStandalone],\n ];\n const days = getLastDefinedValue(daysData, formStyle);\n return getLastDefinedValue(days, width);\n}\n\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example, `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleMonthNames(\n locale: string,\n formStyle: FormStyle,\n width: TranslationWidth,\n): ReadonlyArray {\n const data = ɵfindLocaleData(locale);\n const monthsData = [\n data[ɵLocaleDataIndex.MonthsFormat],\n data[ɵLocaleDataIndex.MonthsStandalone],\n ];\n const months = getLastDefinedValue(monthsData, formStyle);\n return getLastDefinedValue(months, width);\n}\n\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleEraNames(\n locale: string,\n width: TranslationWidth,\n): Readonly<[string, string]> {\n const data = ɵfindLocaleData(locale);\n const erasData = <[string, string][]>data[ɵLocaleDataIndex.Eras];\n return getLastDefinedValue(erasData, width);\n}\n\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).\n * You may want to rely on the following alternatives:\n * - Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (monday) if `getWeekInfo` is not supported.\n * - Other librairies like [`date-fns`](https://date-fns.org/), [`day.js`](https://day.js.org/en/) or [`weekstart`](https://www.npmjs.com/package/weekstart) library provide their own locale based data for the first day of the week.\n */\nexport function getLocaleFirstDayOfWeek(locale: string): WeekDay {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).\n * Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (Saturday+Sunday) if `getWeekInfo` is not supported .\n */\nexport function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay] {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.WeekendRange];\n}\n\n/**\n * Retrieves a localized date-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see {@link FormatWidth}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleDateFormat(locale: string, width: FormatWidth): string {\n const data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see {@link FormatWidth}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n\n * @publicApi\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleTimeFormat(locale: string, width: FormatWidth): string {\n const data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see {@link FormatWidth}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nexport function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string {\n const data = ɵfindLocaleData(locale);\n const dateTimeFormatData = data[ɵLocaleDataIndex.DateTimeFormat];\n return getLastDefinedValue(dateTimeFormatData, width);\n}\n\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize. Must be one of `NumberSymbol`.\n * @returns The character for the localized symbol.\n * @see {@link NumberSymbol}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.NumberFormat` to format numbers instead.\n */\nexport function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string {\n const data = ɵfindLocaleData(locale);\n const res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n if (typeof res === 'undefined') {\n if (symbol === NumberSymbol.CurrencyDecimal) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n } else if (symbol === NumberSymbol.CurrencyGroup) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n }\n }\n return res;\n}\n\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * Important: The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see {@link NumberFormatStyle}\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Let `Intl.NumberFormat` determine the number format instead\n */\nexport function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Use the `Intl` API to format a currency with from currency code\n */\nexport function getLocaleCurrencySymbol(locale: string): string | null {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Use the `Intl` API to format a currency with from currency code\n */\nexport function getLocaleCurrencyName(locale: string): string | null {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n *\n * @deprecated We recommend you create a map of locale to ISO 4217 currency codes.\n * Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html\n */\nexport function getLocaleCurrencyCode(locale: string): string | null {\n return ɵgetLocaleCurrencyCode(locale);\n}\n\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n */\nfunction getLocaleCurrencies(locale: string): {[code: string]: CurrenciesSymbols} {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Currencies];\n}\n\n/**\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.PluralRules` instead\n */\nexport const getLocalePluralCase: (locale: string) => (value: number) => Plural =\n ɵgetLocalePluralCase;\n\nfunction checkFullData(data: any) {\n if (!data[ɵLocaleDataIndex.ExtraData]) {\n throw new Error(\n `Missing extra locale data for the locale \"${\n data[ɵLocaleDataIndex.LocaleId]\n }\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`,\n );\n }\n}\n\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n/format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see {@link getLocaleExtraDayPeriods}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Let `Intl.DateTimeFormat` determine the day period instead.\n */\nexport function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[] {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const rules = data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodsRules] || [];\n return rules.map((rule: string | [string, string]) => {\n if (typeof rule === 'string') {\n return extractTime(rule);\n }\n return [extractTime(rule[0]), extractTime(rule[1])];\n });\n}\n\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n/format-data-locale).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see {@link getLocaleExtraDayPeriodRules}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * To extract a day period use `Intl.DateTimeFormat` with the `dayPeriod` option instead.\n */\nexport function getLocaleExtraDayPeriods(\n locale: string,\n formStyle: FormStyle,\n width: TranslationWidth,\n): string[] {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const dayPeriodsData = [\n data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodFormats],\n data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone],\n ];\n const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n return getLastDefinedValue(dayPeriods, width) || [];\n}\n\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * For dates and numbers, let `Intl.DateTimeFormat()` and `Intl.NumberFormat()` determine the writing direction.\n * The `Intl` alternative [`getTextInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo).\n * has only partial support (Chromium M99 & Safari 17).\n * 3rd party alternatives like [`rtl-detect`](https://www.npmjs.com/package/rtl-detect) can work around this issue.\n */\nexport function getLocaleDirection(locale: string): 'ltr' | 'rtl' {\n const data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Directionality];\n}\n\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n */\nfunction getLastDefinedValue(data: T[], index: number): T {\n for (let i = index; i > -1; i--) {\n if (typeof data[i] !== 'undefined') {\n return data[i];\n }\n }\n throw new Error('Locale data API: locale data undefined');\n}\n\n/**\n * Represents a time value with hours and minutes.\n *\n * @publicApi\n *\n * @deprecated Locale date getters are deprecated\n */\nexport type Time = {\n hours: number;\n minutes: number;\n};\n\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time: string): Time {\n const [h, m] = time.split(':');\n return {hours: +h, minutes: +m};\n}\n\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * You can use `Intl.NumberFormat().formatToParts()` to extract the currency symbol.\n * For example: `Intl.NumberFormat('en', {style:'currency', currency: 'USD'}).formatToParts().find(part => part.type === 'currency').value`\n * returns `$` for USD currency code in the `en` locale.\n * Note: `US$` is a currency symbol for the `en-ca` locale but not the `en-us` locale.\n */\nexport function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale = 'en'): string {\n const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n const symbolNarrow = currency[ɵCurrencyIndex.SymbolNarrow];\n\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n return symbolNarrow;\n }\n\n return currency[ɵCurrencyIndex.Symbol] || code;\n}\n\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * This function should not be used anymore. Let `Intl.NumberFormat` determine the number of digits to display for the currency\n */\nexport function getNumberOfCurrencyDigits(code: string): number {\n let digits;\n const currency = CURRENCIES_EN[code];\n if (currency) {\n digits = currency[ɵCurrencyIndex.NbOfDigits];\n }\n return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\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.dev/license\n */\n\nimport {\n FormatWidth,\n FormStyle,\n getLocaleDateFormat,\n getLocaleDateTimeFormat,\n getLocaleDayNames,\n getLocaleDayPeriods,\n getLocaleEraNames,\n getLocaleExtraDayPeriodRules,\n getLocaleExtraDayPeriods,\n getLocaleId,\n getLocaleMonthNames,\n getLocaleNumberSymbol,\n getLocaleTimeFormat,\n NumberSymbol,\n Time,\n TranslationWidth,\n} from './locale_data_api';\n\nexport const ISO8601_DATE_REGEX =\n /^(\\d{4,})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n// 1 2 3 4 5 6 7 8 9 10 11\nconst NAMED_FORMATS: {[localeId: string]: {[format: string]: string}} = {};\nconst DATE_FORMATS_SPLIT =\n /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\n\nenum ZoneWidth {\n Short,\n ShortGMT,\n Long,\n Extended,\n}\n\nenum DateType {\n FullYear,\n Month,\n Date,\n Hours,\n Minutes,\n Seconds,\n FractionalSeconds,\n Day,\n}\n\nenum TranslationType {\n DayPeriods,\n Days,\n Months,\n Eras,\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`).\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see {@link DatePipe}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n */\nexport function formatDate(\n value: string | number | Date,\n format: string,\n locale: string,\n timezone?: string,\n): string {\n let date = toDate(value);\n const namedFormat = getNamedFormat(locale, format);\n format = namedFormat || format;\n\n let parts: string[] = [];\n let match;\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = parts.concat(match.slice(1));\n const part = parts.pop();\n if (!part) {\n break;\n }\n format = part;\n } else {\n parts.push(format);\n break;\n }\n }\n\n let dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n\n let text = '';\n parts.forEach((value) => {\n const dateFormatter = getDateFormatter(value);\n text += dateFormatter\n ? dateFormatter(date, locale, dateTimezoneOffset)\n : value === \"''\"\n ? \"'\"\n : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n });\n\n return text;\n}\n\n/**\n * Create a new Date object with the given date value, and the time set to midnight.\n *\n * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.\n * See: https://github.com/angular/angular/issues/40377\n *\n * Note that this function returns a Date object whose time is midnight in the current locale's\n * timezone. In the future we might want to change this to be midnight in UTC, but this would be a\n * considerable breaking change.\n */\nfunction createDate(year: number, month: number, date: number): Date {\n // The `newDate` is set to midnight (UTC) on January 1st 1970.\n // - In PST this will be December 31st 1969 at 4pm.\n // - In GMT this will be January 1st 1970 at 1am.\n // Note that they even have different years, dates and months!\n const newDate = new Date(0);\n\n // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n // change the internal time of the date.\n // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n // - In PST this will now be September 20, 2019 at 4pm\n // - In GMT this will now be September 20, 2019 at 1am\n\n newDate.setFullYear(year, month, date);\n // We want the final date to be at local midnight, so we reset the time.\n // - In PST this will now be September 20, 2019 at 12am\n // - In GMT this will now be September 20, 2019 at 12am\n newDate.setHours(0, 0, 0);\n\n return newDate;\n}\n\nfunction getNamedFormat(locale: string, format: string): string {\n const localeId = getLocaleId(locale);\n NAMED_FORMATS[localeId] ??= {};\n\n if (NAMED_FORMATS[localeId][format]) {\n return NAMED_FORMATS[localeId][format];\n }\n\n let formatValue = '';\n switch (format) {\n case 'shortDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n break;\n case 'mediumDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n break;\n case 'longDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n break;\n case 'fullDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n break;\n case 'shortTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n break;\n case 'mediumTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n break;\n case 'longTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n break;\n case 'fullTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n break;\n case 'short':\n const shortTime = getNamedFormat(locale, 'shortTime');\n const shortDate = getNamedFormat(locale, 'shortDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [\n shortTime,\n shortDate,\n ]);\n break;\n case 'medium':\n const mediumTime = getNamedFormat(locale, 'mediumTime');\n const mediumDate = getNamedFormat(locale, 'mediumDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [\n mediumTime,\n mediumDate,\n ]);\n break;\n case 'long':\n const longTime = getNamedFormat(locale, 'longTime');\n const longDate = getNamedFormat(locale, 'longDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [\n longTime,\n longDate,\n ]);\n break;\n case 'full':\n const fullTime = getNamedFormat(locale, 'fullTime');\n const fullDate = getNamedFormat(locale, 'fullDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [\n fullTime,\n fullDate,\n ]);\n break;\n }\n if (formatValue) {\n NAMED_FORMATS[localeId][format] = formatValue;\n }\n return formatValue;\n}\n\nfunction formatDateTime(str: string, opt_values: string[]) {\n if (opt_values) {\n str = str.replace(/\\{([^}]+)}/g, function (match, key) {\n return opt_values != null && key in opt_values ? opt_values[key] : match;\n });\n }\n return str;\n}\n\nfunction padNumber(\n num: number,\n digits: number,\n minusSign = '-',\n trim?: boolean,\n negWrap?: boolean,\n): string {\n let neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n } else {\n num = -num;\n neg = minusSign;\n }\n }\n let strNum = String(num);\n while (strNum.length < digits) {\n strNum = '0' + strNum;\n }\n if (trim) {\n strNum = strNum.slice(strNum.length - digits);\n }\n return neg + strNum;\n}\n\nfunction formatFractionalSeconds(milliseconds: number, digits: number): string {\n const strMs = padNumber(milliseconds, 3);\n return strMs.substring(0, digits);\n}\n\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(\n name: DateType,\n size: number,\n offset: number = 0,\n trim = false,\n negWrap = false,\n): DateFormatter {\n return function (date: Date, locale: string): string {\n let part = getDatePart(name, date);\n if (offset > 0 || part > -offset) {\n part += offset;\n }\n\n if (name === DateType.Hours) {\n if (part === 0 && offset === -12) {\n part = 12;\n }\n } else if (name === DateType.FractionalSeconds) {\n return formatFractionalSeconds(part, size);\n }\n\n const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n return padNumber(part, size, localeMinus, trim, negWrap);\n };\n}\n\nfunction getDatePart(part: DateType, date: Date): number {\n switch (part) {\n case DateType.FullYear:\n return date.getFullYear();\n case DateType.Month:\n return date.getMonth();\n case DateType.Date:\n return date.getDate();\n case DateType.Hours:\n return date.getHours();\n case DateType.Minutes:\n return date.getMinutes();\n case DateType.Seconds:\n return date.getSeconds();\n case DateType.FractionalSeconds:\n return date.getMilliseconds();\n case DateType.Day:\n return date.getDay();\n default:\n throw new Error(`Unknown DateType value \"${part}\".`);\n }\n}\n\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(\n name: TranslationType,\n width: TranslationWidth,\n form: FormStyle = FormStyle.Format,\n extended = false,\n): DateFormatter {\n return function (date: Date, locale: string): string {\n return getDateTranslation(date, locale, name, width, form, extended);\n };\n}\n\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(\n date: Date,\n locale: string,\n name: TranslationType,\n width: TranslationWidth,\n form: FormStyle,\n extended: boolean,\n) {\n switch (name) {\n case TranslationType.Months:\n return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n case TranslationType.Days:\n return getLocaleDayNames(locale, form, width)[date.getDay()];\n case TranslationType.DayPeriods:\n const currentHours = date.getHours();\n const currentMinutes = date.getMinutes();\n if (extended) {\n const rules = getLocaleExtraDayPeriodRules(locale);\n const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n const index = rules.findIndex((rule) => {\n if (Array.isArray(rule)) {\n // morning, afternoon, evening, night\n const [from, to] = rule;\n const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n const beforeTo =\n currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes);\n // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n // 10pm - 5am) where `from` is greater (later!) than `to`.\n //\n // In the first case the current time must be BOTH after `from` AND before `to`\n // (e.g. 8am is after 6am AND before 10am).\n //\n // In the second case the current time must be EITHER after `from` OR before `to`\n // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n // after 10pm).\n if (from.hours < to.hours) {\n if (afterFrom && beforeTo) {\n return true;\n }\n } else if (afterFrom || beforeTo) {\n return true;\n }\n } else {\n // noon or midnight\n if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n return true;\n }\n }\n return false;\n });\n if (index !== -1) {\n return dayPeriods[index];\n }\n }\n // if no rules for the day periods, we use am/pm by default\n return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1];\n case TranslationType.Eras:\n return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];\n default:\n // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n // However Closure Compiler does not understand that and reports an error in typed mode.\n // The `throw new Error` below works around the problem, and the unexpected: never variable\n // makes sure tsc still checks this code is unreachable.\n const unexpected: never = name;\n throw new Error(`unexpected translation type ${unexpected}`);\n }\n}\n\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width: ZoneWidth): DateFormatter {\n return function (date: Date, locale: string, offset: number) {\n const zone = -1 * offset;\n const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n switch (width) {\n case ZoneWidth.Short:\n return (\n (zone >= 0 ? '+' : '') +\n padNumber(hours, 2, minusSign) +\n padNumber(Math.abs(zone % 60), 2, minusSign)\n );\n case ZoneWidth.ShortGMT:\n return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);\n case ZoneWidth.Long:\n return (\n 'GMT' +\n (zone >= 0 ? '+' : '') +\n padNumber(hours, 2, minusSign) +\n ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign)\n );\n case ZoneWidth.Extended:\n if (offset === 0) {\n return 'Z';\n } else {\n return (\n (zone >= 0 ? '+' : '') +\n padNumber(hours, 2, minusSign) +\n ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign)\n );\n }\n default:\n throw new Error(`Unknown zone width \"${width}\"`);\n }\n };\n}\n\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year: number) {\n const firstDayOfYear = createDate(year, JANUARY, 1).getDay();\n return createDate(\n year,\n 0,\n 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear,\n );\n}\n\n/**\n * ISO Week starts on day 1 (Monday) and ends with day 0 (Sunday)\n */\nexport function getThursdayThisIsoWeek(datetime: Date) {\n // getDay returns 0-6 range with sunday as 0.\n const currentDay = datetime.getDay();\n\n // On a Sunday, read the previous Thursday since ISO weeks start on Monday.\n const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay;\n\n return createDate(\n datetime.getFullYear(),\n datetime.getMonth(),\n datetime.getDate() + deltaToThursday,\n );\n}\n\nfunction weekGetter(size: number, monthBased = false): DateFormatter {\n return function (date: Date, locale: string) {\n let result;\n if (monthBased) {\n const nbDaysBefore1stDayOfMonth =\n new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n const today = date.getDate();\n result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n } else {\n const thisThurs = getThursdayThisIsoWeek(date);\n // Some days of a year are part of next year according to ISO 8601.\n // Compute the firstThurs from the year of this week's Thursday\n const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n const diff = thisThurs.getTime() - firstThurs.getTime();\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n }\n\n return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n };\n}\n\n/**\n * Returns a date formatter that provides the week-numbering year for the input date.\n */\nfunction weekNumberingYearGetter(size: number, trim = false): DateFormatter {\n return function (date: Date, locale: string) {\n const thisThurs = getThursdayThisIsoWeek(date);\n const weekNumberingYear = thisThurs.getFullYear();\n return padNumber(\n weekNumberingYear,\n size,\n getLocaleNumberSymbol(locale, NumberSymbol.MinusSign),\n trim,\n );\n };\n}\n\ntype DateFormatter = (date: Date, locale: string, offset: number) => string;\n\nconst DATE_FORMATS: {[format: string]: DateFormatter} = {};\n\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format: string): DateFormatter | null {\n if (DATE_FORMATS[format]) {\n return DATE_FORMATS[format];\n }\n let formatter;\n switch (format) {\n // Era name (AD/BC)\n case 'G':\n case 'GG':\n case 'GGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n break;\n case 'GGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n break;\n case 'GGGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n break;\n\n // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'y':\n formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n break;\n // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yy':\n formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n break;\n // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yyy':\n formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n break;\n // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'yyyy':\n formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n break;\n\n // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'Y':\n formatter = weekNumberingYearGetter(1);\n break;\n // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD\n // 2010 => 10)\n case 'YY':\n formatter = weekNumberingYearGetter(2, true);\n break;\n // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD\n // 2010 => 2010)\n case 'YYY':\n formatter = weekNumberingYearGetter(3);\n break;\n // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'YYYY':\n formatter = weekNumberingYearGetter(4);\n break;\n\n // Month of the year (1-12), numeric\n case 'M':\n case 'L':\n formatter = dateGetter(DateType.Month, 1, 1);\n break;\n case 'MM':\n case 'LL':\n formatter = dateGetter(DateType.Month, 2, 1);\n break;\n\n // Month of the year (January, ...), string, format\n case 'MMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n break;\n case 'MMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n break;\n case 'MMMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n break;\n\n // Month of the year (January, ...), string, standalone\n case 'LLL':\n formatter = dateStrGetter(\n TranslationType.Months,\n TranslationWidth.Abbreviated,\n FormStyle.Standalone,\n );\n break;\n case 'LLLL':\n formatter = dateStrGetter(\n TranslationType.Months,\n TranslationWidth.Wide,\n FormStyle.Standalone,\n );\n break;\n case 'LLLLL':\n formatter = dateStrGetter(\n TranslationType.Months,\n TranslationWidth.Narrow,\n FormStyle.Standalone,\n );\n break;\n\n // Week of the year (1, ... 52)\n case 'w':\n formatter = weekGetter(1);\n break;\n case 'ww':\n formatter = weekGetter(2);\n break;\n\n // Week of the month (1, ...)\n case 'W':\n formatter = weekGetter(1, true);\n break;\n\n // Day of the month (1-31)\n case 'd':\n formatter = dateGetter(DateType.Date, 1);\n break;\n case 'dd':\n formatter = dateGetter(DateType.Date, 2);\n break;\n\n // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo)\n case 'c':\n case 'cc':\n formatter = dateGetter(DateType.Day, 1);\n break;\n case 'ccc':\n formatter = dateStrGetter(\n TranslationType.Days,\n TranslationWidth.Abbreviated,\n FormStyle.Standalone,\n );\n break;\n case 'cccc':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);\n break;\n case 'ccccc':\n formatter = dateStrGetter(\n TranslationType.Days,\n TranslationWidth.Narrow,\n FormStyle.Standalone,\n );\n break;\n case 'cccccc':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);\n break;\n\n // Day of the Week\n case 'E':\n case 'EE':\n case 'EEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n break;\n case 'EEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n break;\n case 'EEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n break;\n case 'EEEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n break;\n\n // Generic period of the day (am-pm)\n case 'a':\n case 'aa':\n case 'aaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n break;\n case 'aaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n break;\n case 'aaaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n break;\n\n // Extended period of the day (midnight, at night, ...), standalone\n case 'b':\n case 'bb':\n case 'bbb':\n formatter = dateStrGetter(\n TranslationType.DayPeriods,\n TranslationWidth.Abbreviated,\n FormStyle.Standalone,\n true,\n );\n break;\n case 'bbbb':\n formatter = dateStrGetter(\n TranslationType.DayPeriods,\n TranslationWidth.Wide,\n FormStyle.Standalone,\n true,\n );\n break;\n case 'bbbbb':\n formatter = dateStrGetter(\n TranslationType.DayPeriods,\n TranslationWidth.Narrow,\n FormStyle.Standalone,\n true,\n );\n break;\n\n // Extended period of the day (midnight, night, ...), standalone\n case 'B':\n case 'BB':\n case 'BBB':\n formatter = dateStrGetter(\n TranslationType.DayPeriods,\n TranslationWidth.Abbreviated,\n FormStyle.Format,\n true,\n );\n break;\n case 'BBBB':\n formatter = dateStrGetter(\n TranslationType.DayPeriods,\n TranslationWidth.Wide,\n FormStyle.Format,\n true,\n );\n break;\n case 'BBBBB':\n formatter = dateStrGetter(\n TranslationType.DayPeriods,\n TranslationWidth.Narrow,\n FormStyle.Format,\n true,\n );\n break;\n\n // Hour in AM/PM, (1-12)\n case 'h':\n formatter = dateGetter(DateType.Hours, 1, -12);\n break;\n case 'hh':\n formatter = dateGetter(DateType.Hours, 2, -12);\n break;\n\n // Hour of the day (0-23)\n case 'H':\n formatter = dateGetter(DateType.Hours, 1);\n break;\n // Hour in day, padded (00-23)\n case 'HH':\n formatter = dateGetter(DateType.Hours, 2);\n break;\n\n // Minute of the hour (0-59)\n case 'm':\n formatter = dateGetter(DateType.Minutes, 1);\n break;\n case 'mm':\n formatter = dateGetter(DateType.Minutes, 2);\n break;\n\n // Second of the minute (0-59)\n case 's':\n formatter = dateGetter(DateType.Seconds, 1);\n break;\n case 'ss':\n formatter = dateGetter(DateType.Seconds, 2);\n break;\n\n // Fractional second\n case 'S':\n formatter = dateGetter(DateType.FractionalSeconds, 1);\n break;\n case 'SS':\n formatter = dateGetter(DateType.FractionalSeconds, 2);\n break;\n case 'SSS':\n formatter = dateGetter(DateType.FractionalSeconds, 3);\n break;\n\n // Timezone ISO8601 short format (-0430)\n case 'Z':\n case 'ZZ':\n case 'ZZZ':\n formatter = timeZoneGetter(ZoneWidth.Short);\n break;\n // Timezone ISO8601 extended format (-04:30)\n case 'ZZZZZ':\n formatter = timeZoneGetter(ZoneWidth.Extended);\n break;\n\n // Timezone GMT short format (GMT+4)\n case 'O':\n case 'OO':\n case 'OOO':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'z':\n case 'zz':\n case 'zzz':\n formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n break;\n // Timezone GMT long format (GMT+0430)\n case 'OOOO':\n case 'ZZZZ':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'zzzz':\n formatter = timeZoneGetter(ZoneWidth.Long);\n break;\n default:\n return null;\n }\n DATE_FORMATS[format] = formatter;\n return formatter;\n}\n\nfunction timezoneToOffset(timezone: string, fallback: number): number {\n // Support: IE 11 only, Edge 13-15+\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(/:/g, '');\n const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\n\nfunction addDateMinutes(date: Date, minutes: number) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\n\nfunction convertTimezoneToLocal(date: Date, timezone: string, reverse: boolean): Date {\n const reverseValue = reverse ? -1 : 1;\n const dateTimezoneOffset = date.getTimezoneOffset();\n const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n * Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nexport function toDate(value: string | number | Date): Date {\n if (isDate(value)) {\n return value;\n }\n\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n\n if (typeof value === 'string') {\n value = value.trim();\n\n if (/^(\\d{4}(-\\d{1,2}(-\\d{1,2})?)?)$/.test(value)) {\n /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */\n const [y, m = 1, d = 1] = value.split('-').map((val: string) => +val);\n return createDate(y, m - 1, d);\n }\n\n const parsedNb = parseFloat(value);\n\n // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n if (!isNaN((value as any) - parsedNb)) {\n return new Date(parsedNb);\n }\n\n let match: RegExpMatchArray | null;\n if ((match = value.match(ISO8601_DATE_REGEX))) {\n return isoStringToDate(match);\n }\n }\n\n const date = new Date(value as any);\n if (!isDate(date)) {\n throw new Error(`Unable to convert \"${value}\" into a date`);\n }\n return date;\n}\n\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nexport function isoStringToDate(match: RegExpMatchArray): Date {\n const date = new Date(0);\n let tzHour = 0;\n let tzMin = 0;\n\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n const h = Number(match[4] || 0) - tzHour;\n const m = Number(match[5] || 0) - tzMin;\n const s = Number(match[6] || 0);\n // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n // becomes `999ms`.\n const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}\n\nexport function isDate(value: any): value is Date {\n return value instanceof Date && !isNaN(value.valueOf());\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.dev/license\n */\n\nimport {\n getLocaleNumberFormat,\n getLocaleNumberSymbol,\n getNumberOfCurrencyDigits,\n NumberFormatStyle,\n NumberSymbol,\n} from './locale_data_api';\n\nexport const NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst PERCENT_CHAR = '%';\n\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(\n value: number,\n pattern: ParsedNumberFormat,\n locale: string,\n groupSymbol: NumberSymbol,\n decimalSymbol: NumberSymbol,\n digitsInfo?: string,\n isPercent = false,\n): string {\n let formattedText = '';\n let isZero = false;\n\n if (!isFinite(value)) {\n formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n } else {\n let parsedNumber = parseNumber(value);\n\n if (isPercent) {\n parsedNumber = toPercent(parsedNumber);\n }\n\n let minInt = pattern.minInt;\n let minFraction = pattern.minFrac;\n let maxFraction = pattern.maxFrac;\n\n if (digitsInfo) {\n const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n if (parts === null) {\n throw new Error(`${digitsInfo} is not a valid digit info`);\n }\n const minIntPart = parts[1];\n const minFractionPart = parts[3];\n const maxFractionPart = parts[5];\n if (minIntPart != null) {\n minInt = parseIntAutoRadix(minIntPart);\n }\n if (minFractionPart != null) {\n minFraction = parseIntAutoRadix(minFractionPart);\n }\n if (maxFractionPart != null) {\n maxFraction = parseIntAutoRadix(maxFractionPart);\n } else if (minFractionPart != null && minFraction > maxFraction) {\n maxFraction = minFraction;\n }\n }\n\n roundNumber(parsedNumber, minFraction, maxFraction);\n\n let digits = parsedNumber.digits;\n let integerLen = parsedNumber.integerLen;\n const exponent = parsedNumber.exponent;\n let decimals = [];\n isZero = digits.every((d) => !d);\n\n // pad zeros for small numbers\n for (; integerLen < minInt; integerLen++) {\n digits.unshift(0);\n }\n\n // pad zeros for small numbers\n for (; integerLen < 0; integerLen++) {\n digits.unshift(0);\n }\n\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n } else {\n decimals = digits;\n digits = [0];\n }\n\n // format the integer digits with grouping separators\n const groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n\n formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n\n // append the decimal digits\n if (decimals.length) {\n formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n }\n\n if (exponent) {\n formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n }\n }\n\n if (value < 0 && !isZero) {\n formattedText = pattern.negPre + formattedText + pattern.negSuf;\n } else {\n formattedText = pattern.posPre + formattedText + pattern.posSuf;\n }\n\n return formattedText;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see {@link formatNumber}\n * @see {@link DecimalPipe}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n */\nexport function formatCurrency(\n value: number,\n locale: string,\n currency: string,\n currencyCode?: string,\n digitsInfo?: string,\n): string {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n\n pattern.minFrac = getNumberOfCurrencyDigits(currencyCode!);\n pattern.maxFrac = pattern.minFrac;\n\n const res = formatNumberToLocaleString(\n value,\n pattern,\n locale,\n NumberSymbol.CurrencyGroup,\n NumberSymbol.CurrencyDecimal,\n digitsInfo,\n );\n return (\n res\n .replace(CURRENCY_CHAR, currency)\n // if we have 2 time the currency character, the second one is ignored\n .replace(CURRENCY_CHAR, '')\n // If there is a spacing between currency character and the value and\n // the currency character is suppressed by passing an empty string, the\n // spacing character would remain as part of the string. Then we\n // should remove it.\n .trim()\n );\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see {@link formatNumber}\n * @see {@link DecimalPipe}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n * @publicApi\n *\n */\nexport function formatPercent(value: number, locale: string, digitsInfo?: string): string {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n const res = formatNumberToLocaleString(\n value,\n pattern,\n locale,\n NumberSymbol.Group,\n NumberSymbol.Decimal,\n digitsInfo,\n true,\n );\n return res.replace(\n new RegExp(PERCENT_CHAR, 'g'),\n getLocaleNumberSymbol(locale, NumberSymbol.PercentSign),\n );\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitsInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n */\nexport function formatNumber(value: number, locale: string, digitsInfo?: string): string {\n const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n return formatNumberToLocaleString(\n value,\n pattern,\n locale,\n NumberSymbol.Group,\n NumberSymbol.Decimal,\n digitsInfo,\n );\n}\n\ninterface ParsedNumberFormat {\n minInt: number;\n // the minimum number of digits required in the fraction part of the number\n minFrac: number;\n // the maximum number of digits required in the fraction part of the number\n maxFrac: number;\n // the prefix for a positive number\n posPre: string;\n // the suffix for a positive number\n posSuf: string;\n // the prefix for a negative number (e.g. `-` or `(`))\n negPre: string;\n // the suffix for a negative number (e.g. `)`)\n negSuf: string;\n // number of digits in each group of separated digits\n gSize: number;\n // number of digits in the last group of digits before the decimal separator\n lgSize: number;\n}\n\nfunction parseNumberFormat(format: string, minusSign = '-'): ParsedNumberFormat {\n const p = {\n minInt: 1,\n minFrac: 0,\n maxFrac: 0,\n posPre: '',\n posSuf: '',\n negPre: '',\n negSuf: '',\n gSize: 0,\n lgSize: 0,\n };\n\n const patternParts = format.split(PATTERN_SEP);\n const positive = patternParts[0];\n const negative = patternParts[1];\n\n const positiveParts =\n positive.indexOf(DECIMAL_SEP) !== -1\n ? positive.split(DECIMAL_SEP)\n : [\n positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1),\n ],\n integer = positiveParts[0],\n fraction = positiveParts[1] || '';\n\n p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));\n\n for (let i = 0; i < fraction.length; i++) {\n const ch = fraction.charAt(i);\n if (ch === ZERO_CHAR) {\n p.minFrac = p.maxFrac = i + 1;\n } else if (ch === DIGIT_CHAR) {\n p.maxFrac = i + 1;\n } else {\n p.posSuf += ch;\n }\n }\n\n const groups = integer.split(GROUP_SEP);\n p.gSize = groups[1] ? groups[1].length : 0;\n p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;\n\n if (negative) {\n const trunkLen = positive.length - p.posPre.length - p.posSuf.length,\n pos = negative.indexOf(DIGIT_CHAR);\n\n p.negPre = negative.substring(0, pos).replace(/'/g, '');\n p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, '');\n } else {\n p.negPre = minusSign + p.posPre;\n p.negSuf = p.posSuf;\n }\n\n return p;\n}\n\ninterface ParsedNumber {\n // an array of digits containing leading zeros as necessary\n digits: number[];\n // the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n exponent: number;\n // the number of the digits in `d` that are to the left of the decimal point\n integerLen: number;\n}\n\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber: ParsedNumber): ParsedNumber {\n // if the number is 0, don't do anything\n if (parsedNumber.digits[0] === 0) {\n return parsedNumber;\n }\n\n // Getting the current number of decimals\n const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n if (parsedNumber.exponent) {\n parsedNumber.exponent += 2;\n } else {\n if (fractionLen === 0) {\n parsedNumber.digits.push(0, 0);\n } else if (fractionLen === 1) {\n parsedNumber.digits.push(0);\n }\n parsedNumber.integerLen += 2;\n }\n\n return parsedNumber;\n}\n\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num: number): ParsedNumber {\n let numStr = Math.abs(num) + '';\n let exponent = 0,\n digits,\n integerLen;\n let i, j, zeros;\n\n // Decimal point?\n if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (integerLen < 0) integerLen = i;\n integerLen += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n } else if (integerLen < 0) {\n // There was no decimal point or exponent so it is an integer.\n integerLen = numStr.length;\n }\n\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {\n /* empty */\n }\n\n if (i === (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n integerLen = 1;\n } else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;\n\n // Trailing zeros are insignificant so ignore them\n integerLen -= i;\n digits = [];\n // Convert string to array of digits without leading/trailing zeros.\n for (j = 0; i <= zeros; i++, j++) {\n digits[j] = Number(numStr.charAt(i));\n }\n }\n\n // If the number overflows the maximum allowed digits then use an exponent.\n if (integerLen > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = integerLen - 1;\n integerLen = 1;\n }\n\n return {digits, exponent, integerLen};\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber: ParsedNumber, minFrac: number, maxFrac: number) {\n if (minFrac > maxFrac) {\n throw new Error(\n `The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`,\n );\n }\n\n let digits = parsedNumber.digits;\n let fractionLen = digits.length - parsedNumber.integerLen;\n const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n\n // The index of the digit to where rounding is to occur\n let roundAt = fractionSize + parsedNumber.integerLen;\n let digit = digits[roundAt];\n\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n\n // Set non-fractional digits beyond `roundAt` to 0\n for (let j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\n } else {\n // We rounded to zero so reset the parsedNumber\n fractionLen = Math.max(0, fractionLen);\n parsedNumber.integerLen = 1;\n digits.length = Math.max(1, (roundAt = fractionSize + 1));\n digits[0] = 0;\n for (let i = 1; i < roundAt; i++) digits[i] = 0;\n }\n\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (let k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.integerLen++;\n }\n digits.unshift(1);\n parsedNumber.integerLen++;\n } else {\n digits[roundAt - 1]++;\n }\n }\n\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n\n let dropTrailingZeros = fractionSize !== 0;\n // Minimal length = nb of decimals required + current nb of integers\n // Any number besides that is optional and can be removed if it's a trailing 0\n const minLen = minFrac + parsedNumber.integerLen;\n // Do any carrying, e.g. a digit was rounded up to 10\n const carry = digits.reduceRight(function (carry, d, i, digits) {\n d = d + carry;\n digits[i] = d < 10 ? d : d - 10; // d % 10\n if (dropTrailingZeros) {\n // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n if (digits[i] === 0 && i >= minLen) {\n digits.pop();\n } else {\n dropTrailingZeros = false;\n }\n }\n return d >= 10 ? 1 : 0; // Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.integerLen++;\n }\n}\n\nexport function parseIntAutoRadix(text: string): number {\n const result: number = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\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.dev/license\n */\n\nexport function parseCookieValue(cookieStr: string, name: string): string | null {\n name = encodeURIComponent(name);\n for (const cookie of cookieStr.split(';')) {\n const eqIndex = cookie.indexOf('=');\n const [cookieName, cookieValue]: string[] =\n eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n if (cookieName.trim() === name) {\n return decodeURIComponent(cookieValue);\n }\n }\n return null;\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.dev/license\n */\nimport {\n Directive,\n DoCheck,\n ElementRef,\n Input,\n IterableDiffers,\n KeyValueDiffers,\n Renderer2,\n ɵstringify as stringify,\n} from '@angular/core';\n\ntype NgClassSupportedTypes = string[] | Set | {[klass: string]: any} | null | undefined;\n\nconst WS_REGEXP = /\\s+/;\n\nconst EMPTY_ARRAY: string[] = [];\n\n/**\n * Represents internal object used to track state of each CSS class. There are 3 different (boolean)\n * flags that, combined together, indicate state of a given CSS class:\n * - enabled: indicates if a class should be present in the DOM (true) or not (false);\n * - changed: tracks if a class was toggled (added or removed) during the custom dirty-checking\n * process; changed classes must be synchronized with the DOM;\n * - touched: tracks if a class is present in the current object bound to the class / ngClass input;\n * classes that are not present any more can be removed from the internal data structures;\n */\ninterface CssClassState {\n // PERF: could use a bit mask to represent state as all fields are boolean flags\n enabled: boolean;\n changed: boolean;\n touched: boolean;\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * ...\n *\n * ...\n *\n * ...\n *\n * ...\n *\n * ...\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n * evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\n@Directive({\n selector: '[ngClass]',\n standalone: true,\n})\nexport class NgClass implements DoCheck {\n private initialClasses = EMPTY_ARRAY;\n private rawClass: NgClassSupportedTypes;\n\n private stateMap = new Map();\n\n constructor(\n private _ngEl: ElementRef,\n private _renderer: Renderer2,\n ) {}\n\n @Input('class')\n set klass(value: string) {\n this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY;\n }\n\n @Input('ngClass')\n set ngClass(value: string | string[] | Set | {[klass: string]: any} | null | undefined) {\n this.rawClass = typeof value === 'string' ? value.trim().split(WS_REGEXP) : value;\n }\n\n /*\n The NgClass directive uses the custom change detection algorithm for its inputs. The custom\n algorithm is necessary since inputs are represented as complex object or arrays that need to be\n deeply-compared.\n\n This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance\n might negatively impact runtime performance of the entire change detection cycle. The design of\n this algorithm is making sure that:\n - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when\n needed), even if references to bound objects change;\n - there is no memory allocation if nothing changes (even relatively modest memory allocation\n during the change detection cycle can result in GC pauses for some of the CD cycles).\n\n The algorithm works by iterating over the set of bound classes, staring with [class] binding and\n then going over [ngClass] binding. For each CSS class name:\n - check if it was seen before (this information is tracked in the state map) and if its value\n changed;\n - mark it as \"touched\" - names that are not marked are not present in the latest set of binding\n and we can remove such class name from the internal data structures;\n\n After iteration over all the CSS class names we've got data structure with all the information\n necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush\n changes to the DOM and reset internal data structures so those are ready for the next change\n detection cycle.\n */\n ngDoCheck(): void {\n // classes from the [class] binding\n for (const klass of this.initialClasses) {\n this._updateState(klass, true);\n }\n\n // classes from the [ngClass] binding\n const rawClass = this.rawClass;\n if (Array.isArray(rawClass) || rawClass instanceof Set) {\n for (const klass of rawClass) {\n this._updateState(klass, true);\n }\n } else if (rawClass != null) {\n for (const klass of Object.keys(rawClass)) {\n this._updateState(klass, Boolean(rawClass[klass]));\n }\n }\n\n this._applyStateDiff();\n }\n\n private _updateState(klass: string, nextEnabled: boolean) {\n const state = this.stateMap.get(klass);\n if (state !== undefined) {\n if (state.enabled !== nextEnabled) {\n state.changed = true;\n state.enabled = nextEnabled;\n }\n state.touched = true;\n } else {\n this.stateMap.set(klass, {enabled: nextEnabled, changed: true, touched: true});\n }\n }\n\n private _applyStateDiff() {\n for (const stateEntry of this.stateMap) {\n const klass = stateEntry[0];\n const state = stateEntry[1];\n\n if (state.changed) {\n this._toggleClass(klass, state.enabled);\n state.changed = false;\n } else if (!state.touched) {\n // A class that was previously active got removed from the new collection of classes -\n // remove from the DOM as well.\n if (state.enabled) {\n this._toggleClass(klass, false);\n }\n this.stateMap.delete(klass);\n }\n\n state.touched = false;\n }\n }\n\n private _toggleClass(klass: string, enabled: boolean): void {\n if (ngDevMode) {\n if (typeof klass !== 'string') {\n throw new Error(\n `NgClass can only toggle CSS classes expressed as strings, got ${stringify(klass)}`,\n );\n }\n }\n klass = klass.trim();\n if (klass.length > 0) {\n klass.split(WS_REGEXP).forEach((klass) => {\n if (enabled) {\n this._renderer.addClass(this._ngEl.nativeElement, klass);\n } else {\n this._renderer.removeClass(this._ngEl.nativeElement, klass);\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.dev/license\n */\n\nimport {\n Directive,\n DoCheck,\n EmbeddedViewRef,\n Input,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n NgIterable,\n TemplateRef,\n TrackByFunction,\n ViewContainerRef,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\n/**\n * @publicApi\n */\nexport class NgForOfContext = NgIterable> {\n constructor(\n /** Reference to the current item from the collection. */\n public $implicit: T,\n\n /**\n * The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe\n * (`userStreams | async`).\n */\n public ngForOf: U,\n\n /** Returns an index of the current item in the collection. */\n public index: number,\n\n /** Returns total amount of items in the collection. */\n public count: number,\n ) {}\n\n // Indicates whether this is the first item in the collection.\n get first(): boolean {\n return this.index === 0;\n }\n\n // Indicates whether this is the last item in the collection.\n get last(): boolean {\n return this.index === this.count - 1;\n }\n\n // Indicates whether an index of this item in the collection is even.\n get even(): boolean {\n return this.index % 2 === 0;\n }\n\n // Indicates whether an index of this item in the collection is odd.\n get odd(): boolean {\n return !this.even;\n }\n}\n\n/**\n * A [structural directive](guide/directives/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/directives/structural-directives#asterisk) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `
  • ` element.\n *\n * ```\n *
  • ...
  • \n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `` element.\n * The content of the `` element is the `
  • ` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * \n *
  • ...
  • \n *
    \n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/directives/structural-directives#one-per-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For further discussion, see\n * [Structural Directives](guide/directives/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n * ```\n *
  • \n * {{i}}/{{users.length}}. {{user}} default\n *
  • \n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/animations/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/directives/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\n@Directive({\n selector: '[ngFor][ngForOf]',\n standalone: true,\n})\nexport class NgForOf = NgIterable> implements DoCheck {\n /**\n * The value of the iterable expression, which can be used as a\n * [template input variable](guide/directives/structural-directives#shorthand).\n */\n @Input()\n set ngForOf(ngForOf: (U & NgIterable) | undefined | null) {\n this._ngForOf = ngForOf;\n this._ngForOfDirty = true;\n }\n /**\n * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.\n *\n * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object\n * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n * as the key.\n *\n * `NgForOf` uses the computed key to associate items in an iterable with DOM elements\n * it produces for these items.\n *\n * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an\n * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a\n * primary key), and this iterable could be updated with new object instances that still\n * represent the same underlying entity (for example, when data is re-fetched from the server,\n * and the iterable is recreated and re-rendered, but most of the data is still the same).\n *\n * @see {@link TrackByFunction}\n */\n @Input()\n set ngForTrackBy(fn: TrackByFunction) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n console.warn(\n `trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n `See https://angular.io/api/common/NgForOf#change-propagation for more information.`,\n );\n }\n this._trackByFn = fn;\n }\n\n get ngForTrackBy(): TrackByFunction {\n return this._trackByFn;\n }\n\n private _ngForOf: U | undefined | null = null;\n private _ngForOfDirty: boolean = true;\n private _differ: IterableDiffer | null = null;\n // TODO(issue/24571): remove '!'\n // waiting for microsoft/typescript#43662 to allow the return type `TrackByFunction|undefined` for\n // the getter\n private _trackByFn!: TrackByFunction;\n\n constructor(\n private _viewContainer: ViewContainerRef,\n private _template: TemplateRef>,\n private _differs: IterableDiffers,\n ) {}\n\n /**\n * A reference to the template that is stamped out for each item in the iterable.\n * @see [template reference variable](guide/templates/variables#template-reference-variables)\n */\n @Input()\n set ngForTemplate(value: TemplateRef>) {\n // TODO(TS2.1): make TemplateRef>> once we move to TS v2.1\n // The current type is too restrictive; a template that just uses index, for example,\n // should be acceptable.\n if (value) {\n this._template = value;\n }\n }\n\n /**\n * Applies the changes when needed.\n * @nodoc\n */\n ngDoCheck(): void {\n if (this._ngForOfDirty) {\n this._ngForOfDirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n const value = this._ngForOf;\n if (!this._differ && value) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n try {\n // CAUTION: this logic is duplicated for production mode below, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n } catch {\n let errorMessage =\n `Cannot find a differ supporting object '${value}' of type '` +\n `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;\n if (typeof value === 'object') {\n errorMessage += ' Did you mean to use the keyvalue pipe?';\n }\n throw new RuntimeError(RuntimeErrorCode.NG_FOR_MISSING_DIFFER, errorMessage);\n }\n } else {\n // CAUTION: this logic is duplicated for development mode above, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n }\n }\n if (this._differ) {\n const changes = this._differ.diff(this._ngForOf);\n if (changes) this._applyChanges(changes);\n }\n }\n\n private _applyChanges(changes: IterableChanges) {\n const viewContainer = this._viewContainer;\n changes.forEachOperation(\n (\n item: IterableChangeRecord,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null,\n ) => {\n if (item.previousIndex == null) {\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n viewContainer.createEmbeddedView(\n this._template,\n new NgForOfContext(item.item, this._ngForOf!, -1, -1),\n currentIndex === null ? undefined : currentIndex,\n );\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n } else if (adjustedPreviousIndex !== null) {\n const view = viewContainer.get(adjustedPreviousIndex)!;\n viewContainer.move(view, currentIndex);\n applyViewChange(view as EmbeddedViewRef>, item);\n }\n },\n );\n\n for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n const viewRef = >>viewContainer.get(i);\n const context = viewRef.context;\n context.index = i;\n context.count = ilen;\n context.ngForOf = this._ngForOf!;\n }\n\n changes.forEachIdentityChange((record: any) => {\n const viewRef = >>viewContainer.get(record.currentIndex);\n applyViewChange(viewRef, record);\n });\n }\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard>(\n dir: NgForOf,\n ctx: any,\n ): ctx is NgForOfContext {\n return true;\n }\n}\n\n// Also export the `NgForOf` class as `NgFor` to improve the DX for\n// cases when the directive is used as standalone, so the class name\n// matches the CSS selector (*ngFor).\nexport {NgForOf as NgFor};\n\nfunction applyViewChange(\n view: EmbeddedViewRef>,\n record: IterableChangeRecord,\n) {\n view.context.$implicit = record.item;\n}\n\nfunction getTypeName(type: any): string {\n return type['name'] || typeof type;\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.dev/license\n */\n\nimport {\n Directive,\n EmbeddedViewRef,\n Input,\n TemplateRef,\n ViewContainerRef,\n ɵstringify as stringify,\n} from '@angular/core';\n\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/directives/structural-directives#asterisk) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n *
    Content to render when condition is true.
    \n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n *
    Content to render when condition is\n * true.
    \n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n *
    Content to render when condition is true.
    \n * Content to render when condition is false.\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n *
    \n * Content to render when condition is true.\n * Content to render when condition is false.\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n *
    {{value}}
    \n * Content to render when value is null.\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `` element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * safe-navigation-operator (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n *
    \n * ...\n *
    \n *\n * \n *
    Loading...
    \n *
    \n * ```\n *\n * You can see that the \"else\" clause references the ``\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `` tag.\n *\n * ```\n * \n *
    \n * ...\n *
    \n *
    \n *\n * \n *
    Loading...
    \n *
    \n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](guide/directives/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Directive({\n selector: '[ngIf]',\n standalone: true,\n})\nexport class NgIf {\n private _context: NgIfContext = new NgIfContext();\n private _thenTemplateRef: TemplateRef> | null = null;\n private _elseTemplateRef: TemplateRef> | null = null;\n private _thenViewRef: EmbeddedViewRef> | null = null;\n private _elseViewRef: EmbeddedViewRef> | null = null;\n\n constructor(\n private _viewContainer: ViewContainerRef,\n templateRef: TemplateRef>,\n ) {\n this._thenTemplateRef = templateRef;\n }\n\n /**\n * The Boolean expression to evaluate as the condition for showing a template.\n */\n @Input()\n set ngIf(condition: T) {\n this._context.$implicit = this._context.ngIf = condition;\n this._updateView();\n }\n\n /**\n * A template to show if the condition expression evaluates to true.\n */\n @Input()\n set ngIfThen(templateRef: TemplateRef> | null) {\n assertTemplate('ngIfThen', templateRef);\n this._thenTemplateRef = templateRef;\n this._thenViewRef = null; // clear previous view if any.\n this._updateView();\n }\n\n /**\n * A template to show if the condition expression evaluates to false.\n */\n @Input()\n set ngIfElse(templateRef: TemplateRef> | null) {\n assertTemplate('ngIfElse', templateRef);\n this._elseTemplateRef = templateRef;\n this._elseViewRef = null; // clear previous view if any.\n this._updateView();\n }\n\n private _updateView() {\n if (this._context.$implicit) {\n if (!this._thenViewRef) {\n this._viewContainer.clear();\n this._elseViewRef = null;\n if (this._thenTemplateRef) {\n this._thenViewRef = this._viewContainer.createEmbeddedView(\n this._thenTemplateRef,\n this._context,\n );\n }\n }\n } else {\n if (!this._elseViewRef) {\n this._viewContainer.clear();\n this._thenViewRef = null;\n if (this._elseTemplateRef) {\n this._elseViewRef = this._viewContainer.createEmbeddedView(\n this._elseTemplateRef,\n this._context,\n );\n }\n }\n }\n }\n\n /** @internal */\n public static ngIfUseIfTypeGuard: void;\n\n /**\n * Assert the correct type of the expression bound to the `ngIf` input within the template.\n *\n * The presence of this static field is a signal to the Ivy template type check compiler that\n * when the `NgIf` structural directive renders its template, the type of the expression bound\n * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to\n * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.\n */\n static ngTemplateGuard_ngIf: 'binding';\n\n /**\n * Asserts the correct type of the context for the template that `NgIf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgIf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(\n dir: NgIf,\n ctx: any,\n ): ctx is NgIfContext> {\n return true;\n }\n}\n\n/**\n * @publicApi\n */\nexport class NgIfContext {\n public $implicit: T = null!;\n public ngIf: T = null!;\n}\n\nfunction assertTemplate(property: string, templateRef: TemplateRef | null): void {\n const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n if (!isTemplateRefOrNull) {\n throw new Error(`${property} must be a TemplateRef, but received '${stringify(templateRef)}'.`);\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.dev/license\n */\n\nimport {\n Directive,\n DoCheck,\n Host,\n Input,\n Optional,\n TemplateRef,\n ViewContainerRef,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport class SwitchView {\n private _created = false;\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private _templateRef: TemplateRef,\n ) {}\n\n create(): void {\n this._created = true;\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n }\n\n destroy(): void {\n this._created = false;\n this._viewContainerRef.clear();\n }\n\n enforceState(created: boolean) {\n if (created && !this._created) {\n this.create();\n } else if (!created && this._created) {\n this.destroy();\n }\n }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * \n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * \n * \n * ...\n * ...\n * ...\n * \n * ...\n * \n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * \n * ...\n * ...\n * ...\n * \n * \n * \n * \n * \n * ...\n * \n * ```\n *\n * @publicApi\n * @see {@link NgSwitchCase}\n * @see {@link NgSwitchDefault}\n * @see [Structural Directives](guide/directives/structural-directives)\n *\n */\n@Directive({\n selector: '[ngSwitch]',\n standalone: true,\n})\nexport class NgSwitch {\n private _defaultViews: SwitchView[] = [];\n private _defaultUsed = false;\n private _caseCount = 0;\n private _lastCaseCheckIndex = 0;\n private _lastCasesMatched = false;\n private _ngSwitch: any;\n\n @Input()\n set ngSwitch(newValue: any) {\n this._ngSwitch = newValue;\n if (this._caseCount === 0) {\n this._updateDefaultCases(true);\n }\n }\n\n /** @internal */\n _addCase(): number {\n return this._caseCount++;\n }\n\n /** @internal */\n _addDefault(view: SwitchView) {\n this._defaultViews.push(view);\n }\n\n /** @internal */\n _matchCase(value: any): boolean {\n const matched = value === this._ngSwitch;\n this._lastCasesMatched ||= matched;\n this._lastCaseCheckIndex++;\n if (this._lastCaseCheckIndex === this._caseCount) {\n this._updateDefaultCases(!this._lastCasesMatched);\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n return matched;\n }\n\n private _updateDefaultCases(useDefault: boolean) {\n if (this._defaultViews.length > 0 && useDefault !== this._defaultUsed) {\n this._defaultUsed = useDefault;\n for (const defaultView of this._defaultViews) {\n defaultView.enforceState(useDefault);\n }\n }\n }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of\n * loose equality (`==`) to match different cases.\n *\n * @publicApi\n * @see {@link NgSwitch}\n * @see {@link NgSwitchDefault}\n *\n */\n@Directive({\n selector: '[ngSwitchCase]',\n standalone: true,\n})\nexport class NgSwitchCase implements DoCheck {\n private _view: SwitchView;\n /**\n * Stores the HTML template to be selected on match.\n */\n @Input() ngSwitchCase: any;\n\n constructor(\n viewContainer: ViewContainerRef,\n templateRef: TemplateRef,\n @Optional() @Host() private ngSwitch: NgSwitch,\n ) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');\n }\n\n ngSwitch._addCase();\n this._view = new SwitchView(viewContainer, templateRef);\n }\n\n /**\n * Performs case matching. For internal use only.\n * @nodoc\n */\n ngDoCheck() {\n this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see {@link NgSwitch}\n * @see {@link NgSwitchCase}\n *\n */\n@Directive({\n selector: '[ngSwitchDefault]',\n standalone: true,\n})\nexport class NgSwitchDefault {\n constructor(\n viewContainer: ViewContainerRef,\n templateRef: TemplateRef,\n @Optional() @Host() ngSwitch: NgSwitch,\n ) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');\n }\n\n ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n }\n}\n\nfunction throwNgSwitchProviderNotFoundError(attrName: string, directiveName: string): never {\n throw new RuntimeError(\n RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND,\n `An element with the \"${attrName}\" attribute ` +\n `(matching the \"${directiveName}\" directive) must be located inside an element with the \"ngSwitch\" attribute ` +\n `(matching \"NgSwitch\" directive)`,\n );\n}\n\nfunction stringifyValue(value: unknown): string {\n return typeof value === 'string' ? `'${value}'` : String(value);\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.dev/license\n */\nimport {\n Directive,\n DoCheck,\n ElementRef,\n Input,\n KeyValueChanges,\n KeyValueDiffer,\n KeyValueDiffers,\n Renderer2,\n RendererStyleFlags2,\n} from '@angular/core';\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * ...\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * ...\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * ...\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\n@Directive({\n selector: '[ngStyle]',\n standalone: true,\n})\nexport class NgStyle implements DoCheck {\n private _ngStyle: {[key: string]: string} | null | undefined = null;\n private _differ: KeyValueDiffer | null = null;\n\n constructor(\n private _ngEl: ElementRef,\n private _differs: KeyValueDiffers,\n private _renderer: Renderer2,\n ) {}\n\n @Input('ngStyle')\n set ngStyle(values: {[klass: string]: any} | null | undefined) {\n this._ngStyle = values;\n if (!this._differ && values) {\n this._differ = this._differs.find(values).create();\n }\n }\n\n ngDoCheck() {\n if (this._differ) {\n const changes = this._differ.diff(this._ngStyle!);\n if (changes) {\n this._applyChanges(changes);\n }\n }\n }\n\n private _setStyle(nameAndUnit: string, value: string | number | null | undefined): void {\n const [name, unit] = nameAndUnit.split('.');\n const flags = name.indexOf('-') === -1 ? undefined : (RendererStyleFlags2.DashCase as number);\n\n if (value != null) {\n this._renderer.setStyle(\n this._ngEl.nativeElement,\n name,\n unit ? `${value}${unit}` : value,\n flags,\n );\n } else {\n this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);\n }\n }\n\n private _applyChanges(changes: KeyValueChanges): void {\n changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\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.dev/license\n */\n\nimport {\n Directive,\n EmbeddedViewRef,\n Injector,\n Input,\n OnChanges,\n SimpleChange,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * \n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\n@Directive({\n selector: '[ngTemplateOutlet]',\n standalone: true,\n})\nexport class NgTemplateOutlet implements OnChanges {\n private _viewRef: EmbeddedViewRef | null = null;\n\n /**\n * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n * object, the object's keys will be available for binding by the local template `let`\n * declarations.\n * Using the key `$implicit` in the context object will set its value as default.\n */\n @Input() public ngTemplateOutletContext: C | null = null;\n\n /**\n * A string defining the template reference and optionally the context object for the template.\n */\n @Input() public ngTemplateOutlet: TemplateRef | null = null;\n\n /** Injector to be used within the embedded view. */\n @Input() public ngTemplateOutletInjector: Injector | null = null;\n\n constructor(private _viewContainerRef: ViewContainerRef) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (this._shouldRecreateView(changes)) {\n const viewContainerRef = this._viewContainerRef;\n\n if (this._viewRef) {\n viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n }\n\n // If there is no outlet, clear the destroyed view ref.\n if (!this.ngTemplateOutlet) {\n this._viewRef = null;\n return;\n }\n\n // Create a context forward `Proxy` that will always bind to the user-specified context,\n // without having to destroy and re-create views whenever the context changes.\n const viewContext = this._createContextForwardProxy();\n this._viewRef = viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, viewContext, {\n injector: this.ngTemplateOutletInjector ?? undefined,\n });\n }\n }\n\n /**\n * We need to re-create existing embedded view if either is true:\n * - the outlet changed.\n * - the injector changed.\n */\n private _shouldRecreateView(changes: SimpleChanges): boolean {\n return !!changes['ngTemplateOutlet'] || !!changes['ngTemplateOutletInjector'];\n }\n\n /**\n * For a given outlet instance, we create a proxy object that delegates\n * to the user-specified context. This allows changing, or swapping out\n * the context object completely without having to destroy/re-create the view.\n */\n private _createContextForwardProxy(): C {\n return new Proxy(\n {},\n {\n set: (_target, prop, newValue) => {\n if (!this.ngTemplateOutletContext) {\n return false;\n }\n return Reflect.set(this.ngTemplateOutletContext, prop, newValue);\n },\n get: (_target, prop, receiver) => {\n if (!this.ngTemplateOutletContext) {\n return undefined;\n }\n return Reflect.get(this.ngTemplateOutletContext, prop, receiver);\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.dev/license\n */\n\nimport {Type, ɵRuntimeError as RuntimeError, ɵstringify as stringify} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport function invalidPipeArgumentError(type: Type, value: Object) {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PIPE_ARGUMENT,\n ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${stringify(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.dev/license\n */\n\nimport {\n ChangeDetectorRef,\n EventEmitter,\n OnDestroy,\n Pipe,\n PipeTransform,\n untracked,\n ɵisPromise,\n ɵisSubscribable,\n} from '@angular/core';\nimport {Observable, Subscribable, Unsubscribable} from 'rxjs';\n\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\ninterface SubscriptionStrategy {\n createSubscription(\n async: Subscribable | Promise,\n updateLatestValue: any,\n ): Unsubscribable | Promise;\n dispose(subscription: Unsubscribable | Promise): void;\n}\n\nclass SubscribableStrategy implements SubscriptionStrategy {\n createSubscription(async: Subscribable, updateLatestValue: any): Unsubscribable {\n // Subscription can be side-effectful, and we don't want any signal reads which happen in the\n // side effect of the subscription to be tracked by a component's template when that\n // subscription is triggered via the async pipe. So we wrap the subscription in `untracked` to\n // decouple from the current reactive context.\n //\n // `untracked` also prevents signal _writes_ which happen in the subscription side effect from\n // being treated as signal writes during the template evaluation (which throws errors).\n return untracked(() =>\n async.subscribe({\n next: updateLatestValue,\n error: (e: any) => {\n throw e;\n },\n }),\n );\n }\n\n dispose(subscription: Unsubscribable): void {\n // See the comment in `createSubscription` above on the use of `untracked`.\n untracked(() => subscription.unsubscribe());\n }\n}\n\nclass PromiseStrategy implements SubscriptionStrategy {\n createSubscription(async: Promise, updateLatestValue: (v: any) => any): Promise {\n return async.then(updateLatestValue, (e) => {\n throw e;\n });\n }\n\n dispose(subscription: Promise): void {}\n}\n\nconst _promiseStrategy = new PromiseStrategy();\nconst _subscribableStrategy = new SubscribableStrategy();\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks. When the reference of the expression changes, the `async` pipe\n * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\n@Pipe({\n name: 'async',\n pure: false,\n standalone: true,\n})\nexport class AsyncPipe implements OnDestroy, PipeTransform {\n private _ref: ChangeDetectorRef | null;\n private _latestValue: any = null;\n private markForCheckOnValueUpdate = true;\n\n private _subscription: Unsubscribable | Promise | null = null;\n private _obj: Subscribable | Promise | EventEmitter | null = null;\n private _strategy: SubscriptionStrategy | null = null;\n\n constructor(ref: ChangeDetectorRef) {\n // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor\n // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.\n this._ref = ref;\n }\n\n ngOnDestroy(): void {\n if (this._subscription) {\n this._dispose();\n }\n // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate\n // potential memory leaks in Observables that could otherwise cause the view data to\n // be retained.\n // https://github.com/angular/angular/issues/17624\n this._ref = null;\n }\n\n // NOTE(@benlesh): Because Observable has deprecated a few call patterns for `subscribe`,\n // TypeScript has a hard time matching Observable to Subscribable, for more information\n // see https://github.com/microsoft/TypeScript/issues/43643\n\n transform(obj: Observable | Subscribable | Promise): T | null;\n transform(obj: null | undefined): null;\n transform(obj: Observable | Subscribable | Promise | null | undefined): T | null;\n transform(obj: Observable | Subscribable | Promise | null | undefined): T | null {\n if (!this._obj) {\n if (obj) {\n try {\n // Only call `markForCheck` if the value is updated asynchronously.\n // Synchronous updates _during_ subscription should not wastefully mark for check -\n // this value is already going to be returned from the transform function.\n this.markForCheckOnValueUpdate = false;\n this._subscribe(obj);\n } finally {\n this.markForCheckOnValueUpdate = true;\n }\n }\n return this._latestValue;\n }\n\n if (obj !== this._obj) {\n this._dispose();\n return this.transform(obj);\n }\n\n return this._latestValue;\n }\n\n private _subscribe(obj: Subscribable | Promise | EventEmitter): void {\n this._obj = obj;\n this._strategy = this._selectStrategy(obj);\n this._subscription = this._strategy.createSubscription(obj, (value: Object) =>\n this._updateLatestValue(obj, value),\n );\n }\n\n private _selectStrategy(\n obj: Subscribable | Promise | EventEmitter,\n ): SubscriptionStrategy {\n if (ɵisPromise(obj)) {\n return _promiseStrategy;\n }\n\n if (ɵisSubscribable(obj)) {\n return _subscribableStrategy;\n }\n\n throw invalidPipeArgumentError(AsyncPipe, obj);\n }\n\n private _dispose(): void {\n // Note: `dispose` is only called if a subscription has been initialized before, indicating\n // that `this._strategy` is also available.\n this._strategy!.dispose(this._subscription!);\n this._latestValue = null;\n this._subscription = null;\n this._obj = null;\n }\n\n private _updateLatestValue(async: any, value: Object): void {\n if (async === this._obj) {\n this._latestValue = value;\n if (this.markForCheckOnValueUpdate) {\n this._ref?.markForCheck();\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.dev/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\n\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * Transforms text to all lower case.\n *\n * @see {@link UpperCasePipe}\n * @see {@link TitleCasePipe}\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * \n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({\n name: 'lowercase',\n standalone: true,\n})\nexport class LowerCasePipe implements PipeTransform {\n /**\n * @param value The string to transform to lower case.\n */\n transform(value: string): string;\n transform(value: null | undefined): null;\n transform(value: string | null | undefined): string | null;\n transform(value: string | null | undefined): string | null {\n if (value == null) return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(LowerCasePipe, value);\n }\n return value.toLowerCase();\n }\n}\n\n//\n// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result\n// can be achieved by using /[0-9\\p{L}]\\S*/gu and also known as Unicode Property Escapes\n// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1\n//\n\nconst unicodeWordMatch =\n /(?:[0-9A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\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B2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\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\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-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DE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF38\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])\\S*/g;\n\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see {@link LowerCasePipe}\n * @see {@link UpperCasePipe}\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * \n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({\n name: 'titlecase',\n standalone: true,\n})\nexport class TitleCasePipe implements PipeTransform {\n /**\n * @param value The string to transform to title case.\n */\n transform(value: string): string;\n transform(value: null | undefined): null;\n transform(value: string | null | undefined): string | null;\n transform(value: string | null | undefined): string | null {\n if (value == null) return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(TitleCasePipe, value);\n }\n\n return value.replace(\n unicodeWordMatch,\n (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase(),\n );\n }\n}\n\n/**\n * Transforms text to all upper case.\n * @see {@link LowerCasePipe}\n * @see {@link TitleCasePipe}\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({\n name: 'uppercase',\n standalone: true,\n})\nexport class UpperCasePipe implements PipeTransform {\n /**\n * @param value The string to transform to upper case.\n */\n transform(value: string): string;\n transform(value: null | undefined): null;\n transform(value: string | null | undefined): string | null;\n transform(value: string | null | undefined): string | null {\n if (value == null) return null;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(UpperCasePipe, value);\n }\n return value.toUpperCase();\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.dev/license\n */\n\nimport {\n KeyValueChangeRecord,\n KeyValueChanges,\n KeyValueDiffer,\n KeyValueDiffers,\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\nfunction makeKeyValuePair(key: K, value: V): KeyValue {\n return {key: key, value: value};\n}\n\n/**\n * A key value pair.\n * Usually used to represent the key value pairs from a Map or Object.\n *\n * @publicApi\n */\nexport interface KeyValue {\n key: K;\n value: V;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\n@Pipe({\n name: 'keyvalue',\n pure: false,\n standalone: true,\n})\nexport class KeyValuePipe implements PipeTransform {\n constructor(private readonly differs: KeyValueDiffers) {}\n\n private differ!: KeyValueDiffer;\n private keyValues: Array> = [];\n private compareFn: (a: KeyValue, b: KeyValue) => number = defaultComparator;\n\n /*\n * NOTE: when the `input` value is a simple Record object, the keys are extracted with\n * Object.keys(). This means that even if the `input` type is Record the keys are\n * compared/returned as `string`s.\n */\n transform(\n input: ReadonlyMap,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): Array>;\n transform(\n input: Record,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): Array>;\n transform(\n input: Record | ReadonlyMap,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): Array>;\n transform(\n input: null | undefined,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): null;\n transform(\n input: ReadonlyMap | null | undefined,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): Array> | null;\n transform(\n input: Record | null | undefined,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): Array> | null;\n transform(\n input: Record | ReadonlyMap | null | undefined,\n compareFn?: (a: KeyValue, b: KeyValue) => number,\n ): Array> | null;\n transform(\n input: undefined | null | {[key: string]: V; [key: number]: V} | ReadonlyMap,\n compareFn: (a: KeyValue, b: KeyValue) => number = defaultComparator,\n ): Array> | null {\n if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n return null;\n }\n\n // make a differ for whatever type we've been passed in\n this.differ ??= this.differs.find(input).create();\n\n const differChanges: KeyValueChanges | null = this.differ.diff(input as any);\n const compareFnChanged = compareFn !== this.compareFn;\n\n if (differChanges) {\n this.keyValues = [];\n differChanges.forEachItem((r: KeyValueChangeRecord) => {\n this.keyValues.push(makeKeyValuePair(r.key, r.currentValue!));\n });\n }\n if (differChanges || compareFnChanged) {\n this.keyValues.sort(compareFn);\n this.compareFn = compareFn;\n }\n return this.keyValues;\n }\n}\n\nexport function defaultComparator(\n keyValueA: KeyValue,\n keyValueB: KeyValue,\n): number {\n const a = keyValueA.key;\n const b = keyValueB.key;\n // if same exit with 0;\n if (a === b) return 0;\n // make sure that undefined are at the end of the sort.\n if (a === undefined) return 1;\n if (b === undefined) return -1;\n // make sure that nulls are at the end of the sort.\n if (a === null) return 1;\n if (b === null) return -1;\n if (typeof a == 'string' && typeof b == 'string') {\n return a < b ? -1 : 1;\n }\n if (typeof a == 'number' && typeof b == 'number') {\n return a - b;\n }\n if (typeof a == 'boolean' && typeof b == 'boolean') {\n return a < b ? -1 : 1;\n }\n // `a` and `b` are of different types. Compare their string values.\n const aString = String(a);\n const bString = String(b);\n return aString == bString ? 0 : aString < bString ? -1 : 1;\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.dev/license\n */\n\nimport {DEFAULT_CURRENCY_CODE, Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\n\nimport {formatCurrency, formatNumber, formatPercent} from '../i18n/format_number';\nimport {getCurrencySymbol} from '../i18n/locale_data_api';\n\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a value according to digit options and locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * @see {@link formatNumber}\n *\n * @usageNotes\n *\n * ### digitsInfo\n *\n * The value's decimal representation is specified by the `digitsInfo`\n * parameter, written in the following format:
    \n *\n * ```\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}\n * ```\n *\n * - `minIntegerDigits`:\n * The minimum number of integer digits before the decimal point.\n * Default is 1.\n *\n * - `minFractionDigits`:\n * The minimum number of digits after the decimal point.\n * Default is 0.\n *\n * - `maxFractionDigits`:\n * The maximum number of digits after the decimal point.\n * Default is 3.\n *\n * If the formatted value is truncated it will be rounded using the \"to-nearest\" method:\n *\n * ```\n * {{3.6 | number: '1.0-0'}}\n * \n *\n * {{-3.6 | number:'1.0-0'}}\n * \n * ```\n *\n * ### locale\n *\n * `locale` will format a value according to locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n *\n * See [Setting your app locale](guide/i18n/locale-id).\n *\n * ### Example\n *\n * The following code shows how the pipe transforms values\n * according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * \n *\n * @publicApi\n */\n@Pipe({\n name: 'number',\n standalone: true,\n})\nexport class DecimalPipe implements PipeTransform {\n constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n /**\n * @param value The value to be formatted.\n * @param digitsInfo Sets digit and decimal representation.\n * [See more](#digitsinfo).\n * @param locale Specifies what locale format rules to use.\n * [See more](#locale).\n */\n transform(value: number | string, digitsInfo?: string, locale?: string): string | null;\n transform(value: null | undefined, digitsInfo?: string, locale?: string): null;\n transform(\n value: number | string | null | undefined,\n digitsInfo?: string,\n locale?: string,\n ): string | null;\n transform(\n value: number | string | null | undefined,\n digitsInfo?: string,\n locale?: string,\n ): string | null {\n if (!isValue(value)) return null;\n\n locale ||= this._locale;\n\n try {\n const num = strToNumber(value);\n return formatNumber(num, locale, digitsInfo);\n } catch (error) {\n throw invalidPipeArgumentError(DecimalPipe, (error as Error).message);\n }\n }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see {@link formatPercent}\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * \n *\n * @publicApi\n */\n@Pipe({\n name: 'percent',\n standalone: true,\n})\nexport class PercentPipe implements PipeTransform {\n constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n transform(value: number | string, digitsInfo?: string, locale?: string): string | null;\n transform(value: null | undefined, digitsInfo?: string, locale?: string): null;\n transform(\n value: number | string | null | undefined,\n digitsInfo?: string,\n locale?: string,\n ): string | null;\n /**\n *\n * @param value The number to be formatted as a percentage.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:
    \n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `0`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n/locale-id).\n */\n transform(\n value: number | string | null | undefined,\n digitsInfo?: string,\n locale?: string,\n ): string | null {\n if (!isValue(value)) return null;\n locale ||= this._locale;\n try {\n const num = strToNumber(value);\n return formatPercent(num, locale, digitsInfo);\n } catch (error) {\n throw invalidPipeArgumentError(PercentPipe, (error as Error).message);\n }\n }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n *\n * @see {@link getCurrencySymbol}\n * @see {@link formatCurrency}\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * \n *\n * @publicApi\n */\n@Pipe({\n name: 'currency',\n standalone: true,\n})\nexport class CurrencyPipe implements PipeTransform {\n constructor(\n @Inject(LOCALE_ID) private _locale: string,\n @Inject(DEFAULT_CURRENCY_CODE) private _defaultCurrencyCode: string = 'USD',\n ) {}\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:
    \n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n/locale-id).\n */\n transform(\n value: number | string,\n currencyCode?: string,\n display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean,\n digitsInfo?: string,\n locale?: string,\n ): string | null;\n transform(\n value: null | undefined,\n currencyCode?: string,\n display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean,\n digitsInfo?: string,\n locale?: string,\n ): null;\n transform(\n value: number | string | null | undefined,\n currencyCode?: string,\n display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean,\n digitsInfo?: string,\n locale?: string,\n ): string | null;\n transform(\n value: number | string | null | undefined,\n currencyCode: string = this._defaultCurrencyCode,\n display: 'code' | 'symbol' | 'symbol-narrow' | string | boolean = 'symbol',\n digitsInfo?: string,\n locale?: string,\n ): string | null {\n if (!isValue(value)) return null;\n\n locale ||= this._locale;\n\n if (typeof display === 'boolean') {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n console.warn(\n `Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`,\n );\n }\n display = display ? 'symbol' : 'code';\n }\n\n let currency: string = currencyCode || this._defaultCurrencyCode;\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n } else {\n currency = display;\n }\n }\n\n try {\n const num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n } catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe, (error as Error).message);\n }\n }\n}\n\nfunction isValue(value: number | string | null | undefined): value is number | string {\n return !(value == null || value === '' || value !== value);\n}\n\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value: number | string): number {\n // Convert strings to numbers\n if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n return Number(value);\n }\n if (typeof value !== 'number') {\n throw new Error(`${value} is not a number`);\n }\n return value;\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.dev/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\n\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n *
  • b
  • \n *
  • c
  • \n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\n@Pipe({\n name: 'slice',\n pure: false,\n standalone: true,\n})\nexport class SlicePipe implements PipeTransform {\n /**\n * @param value a list or a string to be sliced.\n * @param start the starting index of the subset to return:\n * - **a positive integer**: return the item at `start` index and all items after\n * in the list or string expression.\n * - **a negative integer**: return the item at `start` index from the end and all items after\n * in the list or string expression.\n * - **if positive and greater than the size of the expression**: return an empty list or\n * string.\n * - **if negative and greater than the size of the expression**: return entire list or string.\n * @param end the ending index of the subset to return:\n * - **omitted**: return all items until the end.\n * - **if positive**: return all items before `end` index of the list or string.\n * - **if negative**: return all items before `end` index from the end of the list or string.\n */\n transform(value: ReadonlyArray, start: number, end?: number): Array;\n transform(value: null | undefined, start: number, end?: number): null;\n transform(\n value: ReadonlyArray | null | undefined,\n start: number,\n end?: number,\n ): Array | null;\n transform(value: string, start: number, end?: number): string;\n transform(value: string | null | undefined, start: number, end?: number): string | null;\n transform(\n value: ReadonlyArray | string | null | undefined,\n start: number,\n end?: number,\n ): Array | string | null {\n if (value == null) return null;\n\n if (!this.supports(value)) {\n throw invalidPipeArgumentError(SlicePipe, value);\n }\n\n return value.slice(start, end);\n }\n\n private supports(obj: any): boolean {\n return typeof obj === 'string' || Array.isArray(obj);\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {COMMON_DIRECTIVES} from './directives/index';\nimport {COMMON_PIPES} from './pipes/index';\n\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n@NgModule({\n imports: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n})\nexport class CommonModule {}\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.dev/license\n */\n\nexport const PLATFORM_BROWSER_ID = 'browser';\nexport const PLATFORM_SERVER_ID = 'server';\n\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nexport function isPlatformBrowser(platformId: Object): boolean {\n return platformId === PLATFORM_BROWSER_ID;\n}\n\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nexport function isPlatformServer(platformId: Object): boolean {\n return platformId === PLATFORM_SERVER_ID;\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.dev/license\n */\n\nimport {inject, PLATFORM_ID, ɵɵdefineInjectable} from '@angular/core';\n\nimport {DOCUMENT} from './dom_tokens';\nimport {isPlatformBrowser} from './platform_id';\n\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nexport abstract class ViewportScroller {\n // De-sugared tree-shakable injection\n // See #23917\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: ViewportScroller,\n providedIn: 'root',\n factory: () =>\n isPlatformBrowser(inject(PLATFORM_ID))\n ? new BrowserViewportScroller(inject(DOCUMENT), window)\n : new NullViewportScroller(),\n });\n\n /**\n * Configures the top offset used when scrolling to an anchor.\n * @param offset A position in screen coordinates (a tuple with x and y values)\n * or a function that returns the top offset position.\n *\n */\n abstract setOffset(offset: [number, number] | (() => [number, number])): void;\n\n /**\n * Retrieves the current scroll position.\n * @returns A position in screen coordinates (a tuple with x and y values).\n */\n abstract getScrollPosition(): [number, number];\n\n /**\n * Scrolls to a specified position.\n * @param position A position in screen coordinates (a tuple with x and y values).\n */\n abstract scrollToPosition(position: [number, number]): void;\n\n /**\n * Scrolls to an anchor element.\n * @param anchor The ID of the anchor element.\n */\n abstract scrollToAnchor(anchor: string): void;\n\n /**\n * Disables automatic scroll restoration provided by the browser.\n * See also [window.history.scrollRestoration\n * info](https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration).\n */\n abstract setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void;\n}\n\n/**\n * Manages the scroll position for a browser window.\n */\nexport class BrowserViewportScroller implements ViewportScroller {\n private offset: () => [number, number] = () => [0, 0];\n\n constructor(\n private document: Document,\n private window: Window,\n ) {}\n\n /**\n * Configures the top offset used when scrolling to an anchor.\n * @param offset A position in screen coordinates (a tuple with x and y values)\n * or a function that returns the top offset position.\n *\n */\n setOffset(offset: [number, number] | (() => [number, number])): void {\n if (Array.isArray(offset)) {\n this.offset = () => offset;\n } else {\n this.offset = offset;\n }\n }\n\n /**\n * Retrieves the current scroll position.\n * @returns The position in screen coordinates.\n */\n getScrollPosition(): [number, number] {\n return [this.window.scrollX, this.window.scrollY];\n }\n\n /**\n * Sets the scroll position.\n * @param position The new position in screen coordinates.\n */\n scrollToPosition(position: [number, number]): void {\n this.window.scrollTo(position[0], position[1]);\n }\n\n /**\n * Scrolls to an element and attempts to focus the element.\n *\n * Note that the function name here is misleading in that the target string may be an ID for a\n * non-anchor element.\n *\n * @param target The ID of an element or name of the anchor.\n *\n * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document\n * @see https://html.spec.whatwg.org/#scroll-to-fragid\n */\n scrollToAnchor(target: string): void {\n const elSelected = findAnchorFromDocument(this.document, target);\n\n if (elSelected) {\n this.scrollToElement(elSelected);\n // After scrolling to the element, the spec dictates that we follow the focus steps for the\n // target. Rather than following the robust steps, simply attempt focus.\n //\n // @see https://html.spec.whatwg.org/#get-the-focusable-area\n // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus\n // @see https://html.spec.whatwg.org/#focusable-area\n elSelected.focus();\n }\n }\n\n /**\n * Disables automatic scroll restoration provided by the browser.\n */\n setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void {\n this.window.history.scrollRestoration = scrollRestoration;\n }\n\n /**\n * Scrolls to an element using the native offset and the specified offset set on this scroller.\n *\n * The offset can be used when we know that there is a floating header and scrolling naively to an\n * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.\n */\n private scrollToElement(el: HTMLElement): void {\n const rect = el.getBoundingClientRect();\n const left = rect.left + this.window.pageXOffset;\n const top = rect.top + this.window.pageYOffset;\n const offset = this.offset();\n this.window.scrollTo(left - offset[0], top - offset[1]);\n }\n}\n\nfunction findAnchorFromDocument(document: Document, target: string): HTMLElement | null {\n const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];\n\n if (documentResult) {\n return documentResult;\n }\n\n // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we\n // have to traverse the DOM manually and do the lookup through the shadow roots.\n if (\n typeof document.createTreeWalker === 'function' &&\n document.body &&\n typeof document.body.attachShadow === 'function'\n ) {\n const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);\n let currentNode = treeWalker.currentNode as HTMLElement | null;\n\n while (currentNode) {\n const shadowRoot = currentNode.shadowRoot;\n\n if (shadowRoot) {\n // Note that `ShadowRoot` doesn't support `getElementsByName`\n // so we have to fall back to `querySelector`.\n const result =\n shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name=\"${target}\"]`);\n if (result) {\n return result;\n }\n }\n\n currentNode = treeWalker.nextNode() as HTMLElement | null;\n }\n }\n\n return null;\n}\n\n/**\n * Provides an empty implementation of the viewport scroller.\n */\nexport class NullViewportScroller implements ViewportScroller {\n /**\n * Empty implementation\n */\n setOffset(offset: [number, number] | (() => [number, number])): void {}\n\n /**\n * Empty implementation\n */\n getScrollPosition(): [number, number] {\n return [0, 0];\n }\n\n /**\n * Empty implementation\n */\n scrollToPosition(position: [number, number]): void {}\n\n /**\n * Empty implementation\n */\n scrollToAnchor(anchor: string): void {}\n\n /**\n * Empty implementation\n */\n setHistoryScrollRestoration(scrollRestoration: 'auto' | 'manual'): void {}\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.dev/license\n */\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nexport abstract class XhrFactory {\n abstract build(): XMLHttpRequest;\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.dev/license\n */\n\n/**\n * Represents a set of CSS styles for use in an animation style as a generic.\n */\nexport interface ɵStyleData {\n [key: string]: string | number;\n}\n\n/**\n * Represents a set of CSS styles for use in an animation style as a Map.\n */\nexport type ɵStyleDataMap = Map;\n\n/**\n * Represents animation-step timing parameters for an animation step.\n * @see {@link animate}\n *\n * @publicApi\n */\nexport declare type AnimateTimings = {\n /**\n * The full duration of an animation step. A number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n */\n duration: number;\n /**\n * The delay in applying an animation step. A number and optional time unit.\n * The default unit is milliseconds.\n */\n delay: number;\n /**\n * An easing style that controls how an animations step accelerates\n * and decelerates during its run time. An easing function such as `cubic-bezier()`,\n * or one of the following constants:\n * - `ease-in`\n * - `ease-out`\n * - `ease-in-and-out`\n */\n easing: string | null;\n};\n\n/**\n * @description Options that control animation styling and timing.\n *\n * The following animation functions accept `AnimationOptions` data:\n *\n * - `transition()`\n * - `sequence()`\n * - `{@link animations/group group()}`\n * - `query()`\n * - `animation()`\n * - `useAnimation()`\n * - `animateChild()`\n *\n * Programmatic animations built using the `AnimationBuilder` service also\n * make use of `AnimationOptions`.\n *\n * @publicApi\n */\nexport declare interface AnimationOptions {\n /**\n * Sets a time-delay for initiating an animation action.\n * A number and optional time unit, such as \"1s\" or \"10ms\" for one second\n * and 10 milliseconds, respectively.The default unit is milliseconds.\n * Default value is 0, meaning no delay.\n */\n delay?: number | string;\n /**\n * A set of developer-defined parameters that modify styling and timing\n * when an animation action starts. An array of key-value pairs, where the provided value\n * is used as a default.\n */\n params?: {[name: string]: any};\n}\n\n/**\n * Adds duration options to control animation styling and timing for a child animation.\n *\n * @see {@link animateChild}\n *\n * @publicApi\n */\nexport declare interface AnimateChildOptions extends AnimationOptions {\n duration?: number | string;\n}\n\n/**\n * @description Constants for the categories of parameters that can be defined for animations.\n *\n * A corresponding function defines a set of parameters for each category, and\n * collects them into a corresponding `AnimationMetadata` object.\n *\n * @publicApi\n */\nexport enum AnimationMetadataType {\n /**\n * Associates a named animation state with a set of CSS styles.\n * See [`state()`](api/animations/state)\n */\n State = 0,\n /**\n * Data for a transition from one animation state to another.\n * See `transition()`\n */\n Transition = 1,\n /**\n * Contains a set of animation steps.\n * See `sequence()`\n */\n Sequence = 2,\n /**\n * Contains a set of animation steps.\n * See `{@link animations/group group()}`\n */\n Group = 3,\n /**\n * Contains an animation step.\n * See `animate()`\n */\n Animate = 4,\n /**\n * Contains a set of animation steps.\n * See `keyframes()`\n */\n Keyframes = 5,\n /**\n * Contains a set of CSS property-value pairs into a named style.\n * See `style()`\n */\n Style = 6,\n /**\n * Associates an animation with an entry trigger that can be attached to an element.\n * See `trigger()`\n */\n Trigger = 7,\n /**\n * Contains a re-usable animation.\n * See `animation()`\n */\n Reference = 8,\n /**\n * Contains data to use in executing child animations returned by a query.\n * See `animateChild()`\n */\n AnimateChild = 9,\n /**\n * Contains animation parameters for a re-usable animation.\n * See `useAnimation()`\n */\n AnimateRef = 10,\n /**\n * Contains child-animation query data.\n * See `query()`\n */\n Query = 11,\n /**\n * Contains data for staggering an animation sequence.\n * See `stagger()`\n */\n Stagger = 12,\n}\n\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nexport const AUTO_STYLE = '*';\n\n/**\n * Base for animation data structures.\n *\n * @publicApi\n */\nexport interface AnimationMetadata {\n type: AnimationMetadataType;\n}\n\n/**\n * Contains an animation trigger. Instantiated and returned by the\n * `trigger()` function.\n *\n * @publicApi\n */\nexport interface AnimationTriggerMetadata extends AnimationMetadata {\n /**\n * The trigger name, used to associate it with an element. Unique within the component.\n */\n name: string;\n /**\n * An animation definition object, containing an array of state and transition declarations.\n */\n definitions: AnimationMetadata[];\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: {params?: {[name: string]: any}} | null;\n}\n\n/**\n * Encapsulates an animation state by associating a state name with a set of CSS styles.\n * Instantiated and returned by the [`state()`](api/animations/state) function.\n *\n * @publicApi\n */\nexport interface AnimationStateMetadata extends AnimationMetadata {\n /**\n * The state name, unique within the component.\n */\n name: string;\n /**\n * The CSS styles associated with this state.\n */\n styles: AnimationStyleMetadata;\n /**\n * An options object containing\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n */\n options?: {params: {[name: string]: any}};\n}\n\n/**\n * Encapsulates an animation transition. Instantiated and returned by the\n * `transition()` function.\n *\n * @publicApi\n */\nexport interface AnimationTransitionMetadata extends AnimationMetadata {\n /**\n * An expression that describes a state change.\n */\n expr:\n | string\n | ((\n fromState: string,\n toState: string,\n element?: any,\n params?: {[key: string]: any},\n ) => boolean);\n /**\n * One or more animation objects to which this transition applies.\n */\n animation: AnimationMetadata | AnimationMetadata[];\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: AnimationOptions | null;\n}\n\n/**\n * Encapsulates a reusable animation, which is a collection of individual animation steps.\n * Instantiated and returned by the `animation()` function, and\n * passed to the `useAnimation()` function.\n *\n * @publicApi\n */\nexport interface AnimationReferenceMetadata extends AnimationMetadata {\n /**\n * One or more animation step objects.\n */\n animation: AnimationMetadata | AnimationMetadata[];\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: AnimationOptions | null;\n}\n\n/**\n * Encapsulates an animation query. Instantiated and returned by\n * the `query()` function.\n *\n * @publicApi\n */\nexport interface AnimationQueryMetadata extends AnimationMetadata {\n /**\n * The CSS selector for this query.\n */\n selector: string;\n /**\n * One or more animation step objects.\n */\n animation: AnimationMetadata | AnimationMetadata[];\n /**\n * A query options object.\n */\n options: AnimationQueryOptions | null;\n}\n\n/**\n * Encapsulates a keyframes sequence. Instantiated and returned by\n * the `keyframes()` function.\n *\n * @publicApi\n */\nexport interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {\n /**\n * An array of animation styles.\n */\n steps: AnimationStyleMetadata[];\n}\n\n/**\n * Encapsulates an animation style. Instantiated and returned by\n * the `style()` function.\n *\n * @publicApi\n */\nexport interface AnimationStyleMetadata extends AnimationMetadata {\n /**\n * A set of CSS style properties.\n */\n styles: '*' | {[key: string]: string | number} | Array<{[key: string]: string | number} | '*'>;\n /**\n * A percentage of the total animate time at which the style is to be applied.\n */\n offset: number | null;\n}\n\n/**\n * Encapsulates an animation step. Instantiated and returned by\n * the `animate()` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateMetadata extends AnimationMetadata {\n /**\n * The timing data for the step.\n */\n timings: string | number | AnimateTimings;\n /**\n * A set of styles used in the step.\n */\n styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null;\n}\n\n/**\n * Encapsulates a child animation, that can be run explicitly when the parent is run.\n * Instantiated and returned by the `animateChild` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateChildMetadata extends AnimationMetadata {\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: AnimationOptions | null;\n}\n\n/**\n * Encapsulates a reusable animation.\n * Instantiated and returned by the `useAnimation()` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateRefMetadata extends AnimationMetadata {\n /**\n * An animation reference object.\n */\n animation: AnimationReferenceMetadata;\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: AnimationOptions | null;\n}\n\n/**\n * Encapsulates an animation sequence.\n * Instantiated and returned by the `sequence()` function.\n *\n * @publicApi\n */\nexport interface AnimationSequenceMetadata extends AnimationMetadata {\n /**\n * An array of animation step objects.\n */\n steps: AnimationMetadata[];\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: AnimationOptions | null;\n}\n\n/**\n * Encapsulates an animation group.\n * Instantiated and returned by the `{@link animations/group group()}` function.\n *\n * @publicApi\n */\nexport interface AnimationGroupMetadata extends AnimationMetadata {\n /**\n * One or more animation or style steps that form this group.\n */\n steps: AnimationMetadata[];\n /**\n * An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation. Default delay is 0.\n */\n options: AnimationOptions | null;\n}\n\n/**\n * Encapsulates animation query options.\n * Passed to the `query()` function.\n *\n * @publicApi\n */\nexport declare interface AnimationQueryOptions extends AnimationOptions {\n /**\n * True if this query is optional, false if it is required. Default is false.\n * A required query throws an error if no elements are retrieved when\n * the query is executed. An optional query does not.\n *\n */\n optional?: boolean;\n /**\n * A maximum total number of results to return from the query.\n * If negative, results are limited from the end of the query list towards the beginning.\n * By default, results are not limited.\n */\n limit?: number;\n}\n\n/**\n * Encapsulates parameters for staggering the start times of a set of animation steps.\n * Instantiated and returned by the `stagger()` function.\n *\n * @publicApi\n **/\nexport interface AnimationStaggerMetadata extends AnimationMetadata {\n /**\n * The timing data for the steps.\n */\n timings: string | number;\n /**\n * One or more animation steps.\n */\n animation: AnimationMetadata | AnimationMetadata[];\n}\n\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * \n *
    ...
    \n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n *
    \n *
    \n *
    \n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nexport function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata {\n return {type: AnimationMetadataType.Trigger, name, definitions, options: {}};\n}\n\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" }),\n * style({ background: \"red\" })\n * ])\n * ```\n *\n * @publicApi\n */\nexport function animate(\n timings: string | number,\n styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata | null = null,\n): AnimationAnimateMetadata {\n return {type: AnimationMetadataType.Animate, styles, timings};\n}\n\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nexport function group(\n steps: AnimationMetadata[],\n options: AnimationOptions | null = null,\n): AnimationGroupMetadata {\n return {type: AnimationMetadataType.Group, steps, options};\n}\n\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nexport function sequence(\n steps: AnimationMetadata[],\n options: AnimationOptions | null = null,\n): AnimationSequenceMetadata {\n return {type: AnimationMetadataType.Sequence, steps, options};\n}\n\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow an element to animate from\n * a height of 0 up to its full height:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nexport function style(\n tokens: '*' | {[key: string]: string | number} | Array<'*' | {[key: string]: string | number}>,\n): AnimationStyleMetadata {\n return {type: AnimationMetadataType.Style, styles: tokens, offset: null};\n}\n\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nexport function state(\n name: string,\n styles: AnimationStyleMetadata,\n options?: {params: {[name: string]: any}},\n): AnimationStateMetadata {\n return {type: AnimationMetadataType.State, name, styles, options};\n}\n\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nexport function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata {\n return {type: AnimationMetadataType.Keyframes, steps};\n}\n\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n * - a string with a specific syntax\n * - or a function that compares the previous and current state (value of the expression bound to\n * the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n * - `fromState => toState`, which indicates that the transition's animations should occur then the\n * expression bound to the trigger's element goes from `fromState` to `toState`\n *\n * _Example:_\n * ```typescript\n * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n * ```\n *\n * - `fromState <=> toState`, which indicates that the transition's animations should occur then\n * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n * _Example:_\n * ```typescript\n * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n * ```\n *\n * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n * element enters or exists the DOM\n *\n * _Example:_\n * ```typescript\n * transition(':enter', [\n * style({ opacity: 0 }),\n * animate('500ms', style({ opacity: 1 }))\n * ])\n * ```\n *\n * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n * the numerical expression bound to the trigger's element has increased in value or decreased\n *\n * _Example:_\n * ```typescript\n * transition(':increment', query('@counter', animateChild()))\n * ```\n *\n * - a sequence of any of the above divided by commas, which indicates that transition's animations\n * should occur whenever one of the state change expressions matches\n *\n * _Example:_\n * ```typescript\n * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n * style({ transform: 'scale(1)', offset: 0}),\n * style({ transform: 'scale(1.1)', offset: 0.7}),\n * style({ transform: 'scale(1)', offset: 1})\n * ]))),\n * ```\n *\n * Also note that in such context:\n * - `void` can be used to indicate the absence of the element\n * - asterisks can be used as wildcards that match any state\n * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n * equivalent to `:leave`)\n * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n * _truthy_ and _falsy_ values)\n *\n *
    \n *\n * Be careful about entering end leaving elements as their transitions present a common\n * pitfall for developers.\n *\n * Note that when an element with a trigger enters the DOM its `:enter` transition always\n * gets executed, but its `:leave` transition will not be executed if the element is removed\n * alongside its parent (as it will be removed \"without warning\" before its transition has\n * a chance to be executed, the only way that such transition can occur is if the element\n * is exiting the DOM on its own).\n *\n *\n *
    \n *\n * ### Animating to a Final State\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no `style` data, that step is automatically considered the final animation arc,\n * for the element to reach the final state, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n * - Transition animations applied based on\n * the trigger's expression value\n *\n * ```html\n *
    \n * ...\n *
    \n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\"on => off, open => closed\", animate(500)),\n * transition(\"* <=> error\", query('.indicator', animateChild()))\n * ])\n * ```\n *\n * - Transition animations applied based on custom logic dependent\n * on the trigger's expression value and provided parameters\n *\n * ```html\n *
    \n * ...\n *
    \n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\n * (fromState, toState, _element, params) =>\n * ['firststep', 'laststep'].includes(fromState.toLowerCase())\n * && toState === params?.['target'],\n * animate('1s')\n * )\n * ])\n * ```\n *\n * @publicApi\n **/\nexport function transition(\n stateChangeExpr:\n | string\n | ((\n fromState: string,\n toState: string,\n element?: any,\n params?: {[key: string]: any},\n ) => boolean),\n steps: AnimationMetadata | AnimationMetadata[],\n options: AnimationOptions | null = null,\n): AnimationTransitionMetadata {\n return {type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, options};\n}\n\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nexport function animation(\n steps: AnimationMetadata | AnimationMetadata[],\n options: AnimationOptions | null = null,\n): AnimationReferenceMetadata {\n return {type: AnimationMetadataType.Reference, animation: steps, options};\n}\n\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nexport function animateChild(\n options: AnimateChildOptions | null = null,\n): AnimationAnimateChildMetadata {\n return {type: AnimationMetadataType.AnimateChild, options};\n}\n\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nexport function useAnimation(\n animation: AnimationReferenceMetadata,\n options: AnimationOptions | null = null,\n): AnimationAnimateRefMetadata {\n return {type: AnimationMetadataType.AnimateRef, animation, options};\n}\n\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements (not\n * all elements can be queried via these tokens, see\n * [Entering and Leaving Elements](#entering-and-leaving-elements))\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n * - Those inserted dynamically (via `ViewContainerRef`)\n * - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n *
    \n *\n * Note that elements will be successfully queried via `:enter`/`:leave` even if their\n * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n * directive (e.g. they enter/exit alongside their parent).\n *\n *
    \n *\n *
    \n *\n * There is an exception to what previously mentioned, besides elements entering/leaving based on\n * their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n *
    \n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n *
    \n *

    Title

    \n *
    \n * Blah blah blah\n *
    \n *
    \n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport function query(\n selector: string,\n animation: AnimationMetadata | AnimationMetadata[],\n options: AnimationQueryOptions | null = null,\n): AnimationQueryMetadata {\n return {type: AnimationMetadataType.Query, selector, animation, options};\n}\n\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * \n * \n *
    \n *
    \n *
    \n * {{ item }}\n *
    \n *
    \n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nexport function stagger(\n timings: string | number,\n animation: AnimationMetadata | AnimationMetadata[],\n): AnimationStaggerMetadata {\n return {type: AnimationMetadataType.Stagger, timings, animation};\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.dev/license\n */\n\n/**\n * Provides programmatic control of a reusable animation sequence,\n * built using the [AnimationBuilder.build](api/animations/AnimationBuilder#build)()\n * method which returns an `AnimationFactory`, whose\n * [create](api/animations/AnimationFactory#create)() method instantiates and\n * initializes this interface.\n *\n * @see {@link AnimationBuilder}\n * @see {@link AnimationFactory}\n * @see {@link animate}\n *\n * @publicApi\n */\nexport interface AnimationPlayer {\n /**\n * Provides a callback to invoke when the animation finishes.\n * @param fn The callback function.\n * @see {@link #finish}\n */\n onDone(fn: () => void): void;\n /**\n * Provides a callback to invoke when the animation starts.\n * @param fn The callback function.\n * @see {@link #play}\n */\n onStart(fn: () => void): void;\n /**\n * Provides a callback to invoke after the animation is destroyed.\n * @param fn The callback function.\n * @see {@link #destroy}\n * @see {@link #beforeDestroy}\n */\n onDestroy(fn: () => void): void;\n /**\n * Initializes the animation.\n */\n init(): void;\n /**\n * Reports whether the animation has started.\n * @returns True if the animation has started, false otherwise.\n */\n hasStarted(): boolean;\n /**\n * Runs the animation, invoking the `onStart()` callback.\n */\n play(): void;\n /**\n * Pauses the animation.\n */\n pause(): void;\n /**\n * Restarts the paused animation.\n */\n restart(): void;\n /**\n * Ends the animation, invoking the `onDone()` callback.\n */\n finish(): void;\n /**\n * Destroys the animation, after invoking the `beforeDestroy()` callback.\n * Calls the `onDestroy()` callback when destruction is completed.\n */\n destroy(): void;\n /**\n * Resets the animation to its initial state.\n */\n reset(): void;\n /**\n * Sets the position of the animation.\n * @param position A 0-based offset into the duration, in milliseconds.\n */\n setPosition(position: number): void;\n /**\n * Reports the current position of the animation.\n * @returns A 0-based offset into the duration, in milliseconds.\n */\n getPosition(): number;\n /**\n * The parent of this player, if any.\n */\n parentPlayer: AnimationPlayer | null;\n /**\n * The total run time of the animation, in milliseconds.\n */\n readonly totalTime: number;\n /**\n * Provides a callback to invoke before the animation is destroyed.\n */\n beforeDestroy?: () => any;\n /**\n * @internal\n * Internal\n */\n triggerCallback?: (phaseName: string) => void;\n /**\n * @internal\n * Internal\n */\n disabled?: boolean;\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see {@link animate}\n * @see {@link AnimationPlayer}\n *\n * @publicApi\n */\nexport class NoopAnimationPlayer implements AnimationPlayer {\n private _onDoneFns: Function[] = [];\n private _onStartFns: Function[] = [];\n private _onDestroyFns: Function[] = [];\n private _originalOnDoneFns: Function[] = [];\n private _originalOnStartFns: Function[] = [];\n private _started = false;\n private _destroyed = false;\n private _finished = false;\n private _position = 0;\n public parentPlayer: AnimationPlayer | null = null;\n public readonly totalTime: number;\n constructor(duration: number = 0, delay: number = 0) {\n this.totalTime = duration + delay;\n }\n private _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach((fn) => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn: () => void): void {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn: () => void): void {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn: () => void): void {\n this._onDestroyFns.push(fn);\n }\n hasStarted(): boolean {\n return this._started;\n }\n init(): void {}\n play(): void {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n\n /** @internal */\n triggerMicrotask() {\n queueMicrotask(() => this._onFinish());\n }\n\n private _onStart() {\n this._onStartFns.forEach((fn) => fn());\n this._onStartFns = [];\n }\n\n pause(): void {}\n restart(): void {}\n finish(): void {\n this._onFinish();\n }\n destroy(): void {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach((fn) => fn());\n this._onDestroyFns = [];\n }\n }\n reset(): void {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position: number): void {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition(): number {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n\n /** @internal */\n triggerCallback(phaseName: string): void {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach((fn) => fn());\n methods.length = 0;\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.dev/license\n */\n\nimport {AnimationPlayer} from './animation_player';\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see {@link AnimationPlayer}\n * @see {@link animations/group group}\n *\n */\nexport class AnimationGroupPlayer implements AnimationPlayer {\n private _onDoneFns: Function[] = [];\n private _onStartFns: Function[] = [];\n private _finished = false;\n private _started = false;\n private _destroyed = false;\n private _onDestroyFns: Function[] = [];\n\n public parentPlayer: AnimationPlayer | null = null;\n public totalTime: number = 0;\n public readonly players: AnimationPlayer[];\n\n constructor(_players: AnimationPlayer[]) {\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n\n if (total == 0) {\n queueMicrotask(() => this._onFinish());\n } else {\n this.players.forEach((player) => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n\n private _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach((fn) => fn());\n this._onDoneFns = [];\n }\n }\n\n init(): void {\n this.players.forEach((player) => player.init());\n }\n\n onStart(fn: () => void): void {\n this._onStartFns.push(fn);\n }\n\n private _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach((fn) => fn());\n this._onStartFns = [];\n }\n }\n\n onDone(fn: () => void): void {\n this._onDoneFns.push(fn);\n }\n\n onDestroy(fn: () => void): void {\n this._onDestroyFns.push(fn);\n }\n\n hasStarted() {\n return this._started;\n }\n\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach((player) => player.play());\n }\n\n pause(): void {\n this.players.forEach((player) => player.pause());\n }\n\n restart(): void {\n this.players.forEach((player) => player.restart());\n }\n\n finish(): void {\n this._onFinish();\n this.players.forEach((player) => player.finish());\n }\n\n destroy(): void {\n this._onDestroy();\n }\n\n private _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach((player) => player.destroy());\n this._onDestroyFns.forEach((fn) => fn());\n this._onDestroyFns = [];\n }\n }\n\n reset(): void {\n this.players.forEach((player) => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n\n setPosition(p: number): void {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach((player) => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n\n getPosition(): number {\n const longestPlayer = this.players.reduce(\n (longestSoFar: AnimationPlayer | null, player: AnimationPlayer) => {\n const newPlayerIsLongest =\n longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n },\n null,\n );\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n\n beforeDestroy(): void {\n this.players.forEach((player) => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n\n /** @internal */\n triggerCallback(phaseName: string): void {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach((fn) => fn());\n methods.length = 0;\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.dev/license\n */\nexport {BrowserAnimationBuilder as ɵBrowserAnimationBuilder} from './animation_builder';\nexport {RuntimeErrorCode as ɵRuntimeErrorCode} from './errors';\nexport {AnimationGroupPlayer as ɵAnimationGroupPlayer} from './players/animation_group_player';\n\nexport const ɵPRE_STYLE = '!';\n","import { NO_VARIANTS, ServiceCatalog, ServiceCatalogService, ServiceSelections, TravelerService } from '@fcom/dapi';\nimport {\n Category,\n FinnairPassengerItem,\n FinnairPassengerServiceItem,\n FinnairPassengerServiceSelectionItem,\n FinnairServiceCategoryPriceItem,\n FinnairTotalPricesSplit,\n} from '@fcom/dapi/api/models';\nimport { asCartId, getIconForServiceCategory } from '@fcom/dapi/utils';\nimport { entrySet, isEmptyObjectOrHasEmptyValues, isPresent, mapValues } from '@fcom/core/utils';\nimport { ServiceCatalogServiceWithSelection } from '@fcom/booking/modules/pax-details/interfaces/pax-ancillaries.interface';\n\nimport { BookingSummaryAncillaryKey, serviceMapping } from '../../modules/ancillaries/utils';\nimport { BookingSummaryService } from '../../interfaces';\n\n/**\n * @param service\n * @returns\n */\nexport const loadBoundSelection = (service: FinnairPassengerServiceItem): TravelerService[] => {\n return service.services\n .map((service) => asTravelerService(service))\n .reduce((totalTravelerServices, travelerService) => {\n const existingService = totalTravelerServices.find(\n (s) => s.category === travelerService.category && s.variant === travelerService.variant\n );\n if (existingService) {\n existingService.quantity += travelerService.quantity;\n } else {\n totalTravelerServices.push(travelerService);\n }\n\n return totalTravelerServices;\n }, [] as TravelerService[]);\n};\n\nconst isServiceCatalogService = (\n service: FinnairPassengerServiceSelectionItem | ServiceCatalogService\n): service is ServiceCatalogService => isPresent((service as ServiceCatalogService).isService);\n\nexport const asTravelerService = (\n service: FinnairPassengerServiceSelectionItem | ServiceCatalogService,\n quantity = 1\n): TravelerService => {\n if (isServiceCatalogService(service)) {\n return {\n category: service.subCategory,\n variant: service.variant,\n quantity,\n displayName: service.translations?.title,\n pricePerItem: service.totalPrice,\n includedInTicketType: false,\n includedInTierBenefit: false,\n };\n }\n\n return {\n category: service.subCategory,\n variant: service.variant,\n displayName: service.displayName,\n quantity: service.quantity,\n pricePerItem: service.unitPrice,\n includedInTicketType: service.includedInTicketType === true,\n includedInTierBenefit: service.includedInTierBenefit === true,\n };\n};\n\nconst mapPassengersToAncillaries = (\n service: FinnairServiceCategoryPriceItem,\n passengers: Array,\n bookingSummaryAncillaryKey: BookingSummaryAncillaryKey\n) => {\n return entrySet(service.totalPerPax).map((passenger) => {\n const pax = passengers.find((p) => p.id === passenger.key);\n const associatedInfant = passengers.find((p) => p.accompanyingTravelerId === pax.id);\n return {\n firstName: pax.firstName,\n lastName: pax.lastName,\n associatedInfantName: associatedInfant ? `${associatedInfant.firstName} ${associatedInfant.lastName}` : undefined,\n key: bookingSummaryAncillaryKey,\n quantity: passenger.value.quantity,\n price: passenger.value.price.totalAmount,\n };\n });\n};\n\nexport const mapServicesToBookingSummary = (\n services: FinnairTotalPricesSplit,\n passengers: Array\n): BookingSummaryService[] => {\n return (\n services?.totalPerCategory.map((service) => {\n const mapping = serviceMapping.find((s) => s.category === service.category) ?? {\n category: service.category,\n icon: getIconForServiceCategory(service.category),\n bookingSummaryKey: `purchase.payment.${service.category}Count` as BookingSummaryAncillaryKey,\n };\n return {\n icon: mapping.icon,\n code: service.category !== Category.BAGGAGE ? asCartId(service.category) : 'bags',\n isGroupService: service.category === Category.COVER,\n passengers: mapPassengersToAncillaries(service, passengers, mapping.bookingSummaryKey),\n };\n }) ?? []\n );\n};\n\nconst mapSelectionStatusToService = (\n service: ServiceCatalogService,\n selection: TravelerService | Record\n): ServiceCatalogServiceWithSelection => {\n if (!isPresent(selection) || isEmptyObjectOrHasEmptyValues(selection)) {\n const isNoVariant = NO_VARIANTS.includes(service.variant);\n return { ...service, selected: isNoVariant, selectedQuantity: isNoVariant ? 1 : 0 };\n }\n\n return {\n ...service,\n selected: service.variant === selection.variant,\n selectedQuantity: service.variant === selection.variant ? selection.quantity : 0,\n };\n};\n\nexport const mapSelectionStatusToServices = (\n services: ServiceCatalogService[],\n selection: TravelerService | TravelerService[] | Record\n): ServiceCatalogServiceWithSelection[] =>\n services?.map((service) => {\n const userSelection = Array.isArray(selection) ? selection?.find((s) => s.variant === service.variant) : selection;\n return mapSelectionStatusToService(service, userSelection);\n });\n\nconst mapServicePriceToSelection = (\n services: ServiceCatalogService[] = [],\n selection: TravelerService\n): TravelerService => {\n if (!isPresent(selection)) {\n return selection;\n }\n\n const matchingService = services.find((s: ServiceCatalogService) => s.variant === selection.variant);\n\n return {\n ...selection,\n pricePerItem: matchingService?.totalPrice ?? selection.pricePerItem,\n };\n};\n\n/**\n * Updates all selections prices to match given serviceCatalog service prices\n * This can be used for example when we set the serviceCatalog and want to update the current selection state as well\n * in case of a mismatch e.g. prices are different in new catalog\n * @param selections - selections to match\n * @param serviceCatalog - service catalog to use for mapping\n * @returns new service selections mapped with given serviceCatalog data\n */\nexport const updateSelectionPricesFromServiceCatalog = (\n selections: ServiceSelections,\n serviceCatalog: ServiceCatalog\n): ServiceSelections => {\n return mapValues(selections, (selectionsForCategory, categoryName: Category) => {\n const servicesForCategory = serviceCatalog?.categories?.find((c) => c.category === categoryName)?.services;\n return mapValues(selectionsForCategory, (selectionsForFragment, fragmentId: string) => {\n return mapValues(selectionsForFragment, (selectionsForTraveler, travelerId: string) => {\n const servicesForTraveler = servicesForCategory?.[fragmentId]?.[travelerId];\n\n if (Array.isArray(selectionsForTraveler)) {\n return selectionsForTraveler.map((selection) => mapServicePriceToSelection(servicesForTraveler, selection));\n }\n\n return mapServicePriceToSelection(servicesForTraveler, selectionsForTraveler);\n });\n });\n });\n};\n","
    \n \n\n \n
    \n \n \n \n
    \n
    \n\n \n \n \n \n \n\n","import {\n Component,\n forwardRef,\n ChangeDetectionStrategy,\n Injector,\n ChangeDetectorRef,\n Directive,\n Attribute,\n HostBinding,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { AbstractCheckboxComponent } from '../abstracts/abstract-checkbox.component';\n\n@Component({\n selector: 'fcom-block-selection',\n templateUrl: './block-selection.component.html',\n styleUrls: ['./block-selection.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BlockSelectionComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockSelectionComponent extends AbstractCheckboxComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @HostBinding('attr.tabindex')\n hostTabindex = null;\n\n @HostBinding('class.block-selection-selected')\n get checkedState(): boolean {\n return this.checked;\n }\n\n @HostBinding('class.block-selection-focused')\n get focusedState(): boolean {\n return this.focused;\n }\n\n @HostBinding('class.block-selection-disabled')\n get disabledState(): boolean {\n return this.disabled;\n }\n\n tabIndex: number;\n\n constructor(cdRef: ChangeDetectorRef, injector: Injector, @Attribute('tabindex') tabIndex: string) {\n super(cdRef, injector);\n this.tabIndex = parseInt(tabIndex, 10) || 0;\n }\n}\n\n/**\n * Validator for checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `fcom-block-selection`.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `fcom-block-selection[required][formControlName],\n fcom-block-selection[required][formControl], fcom-block-selection[required][ngModel]`,\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => BlockSelectionRequiredValidator),\n multi: true,\n },\n ],\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: { '[attr.required]': 'required ? \"\" : null' },\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class BlockSelectionRequiredValidator extends CheckboxRequiredValidator {}\n","\n

    {{ title }}

    \n

    {{ subtitle }}

    \n

    {{ extraText }}

    \n\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-booking-plain-header-area',\n templateUrl: './booking-plain-header-area.component.html',\n})\nexport class BookingPlainHeaderAreaComponent {\n @Input()\n title: string;\n @Input()\n subtitle: string;\n @Input()\n extraText?: string;\n @Input()\n headingClass = 'nordic-blue-900-text';\n @Input()\n enableBottomPadding = true;\n @Input()\n enableTopPadding = true;\n}\n","import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';\n\nimport { IconsService } from '../services/icons.service';\n\n@Component({\n selector: 'fcom-generic-icon',\n template: `\n \n \n \n `,\n styleUrls: ['./generic-icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GenericIconComponent implements OnChanges {\n private _iconRef: string;\n @Input()\n set iconRef(ref: string) {\n this._iconRef = ref;\n }\n get iconRef(): string {\n return this._iconRef || this.url;\n }\n\n @Input() url: string;\n\n constructor(private readonly iconService: IconsService) {}\n\n ngOnChanges(): void {\n this.addIcon();\n }\n\n private async addIcon(): Promise {\n if (this.url) {\n await this.iconService.addIcon(this.iconRef, this.url);\n }\n }\n}\n","const { isArray } = Array;\n\n/**\n * Used in operators and functions that accept either a list of arguments, or an array of arguments\n * as a single argument.\n */\nexport function argsOrArgArray(args: (T | T[])[]): T[] {\n return args.length === 1 && isArray(args[0]) ? args[0] : (args as T[]);\n}\n","module.exports.version = \"25.4.1\";\n\nmodule.exports.baseUrl = \"https://cdn.finnair.com/fcom-ui-styles/prod/\";\n\nmodule.exports.icons = {\n \"custom\": {\n \"apple-wallet-en\": \"icons/custom/apple-wallet-en.a7916.svg\",\n \"apple-wallet-fi\": \"icons/custom/apple-wallet-fi.dc98f.svg\",\n \"avios-keyline-navy\": \"icons/custom/avios-keyline-navy.3ffdd.svg\",\n \"avios-keyline-white\": \"icons/custom/avios-keyline-white.2cf70.svg\",\n \"avios-small-use-navy\": \"icons/custom/avios-small-use-navy.a209f.svg\",\n \"avios-small-use-white\": \"icons/custom/avios-small-use-white.c0ba7.svg\",\n \"baec-emblem\": \"icons/custom/baec-emblem.1bd35.svg\",\n \"baec-logo\": \"icons/custom/baec-logo.f5da0.svg\",\n \"business-bassinet-seat\": \"icons/custom/business-bassinet-seat.9846b.svg\",\n \"cartrawler-logo\": \"icons/custom/cartrawler-logo.c78a9.svg\",\n \"comfort-seat\": \"icons/custom/comfort-seat.180bd.svg\",\n \"economy-bassinet-seat\": \"icons/custom/economy-bassinet-seat.9846b.svg\",\n \"exit-row-seat\": \"icons/custom/exit-row-seat.8b03b.svg\",\n \"extra-legroom-seat\": \"icons/custom/extra-legroom-seat.30c41.svg\",\n \"finnair-emblem\": \"icons/custom/finnair-emblem.7e5f3.svg\",\n \"finnair-logo-100\": \"icons/custom/finnair-logo-100.d4d97.svg\",\n \"finnair-logo-plus\": \"icons/custom/finnair-logo-plus.5ccaa.svg\",\n \"finnair-logo\": \"icons/custom/finnair-logo.f8e3e.svg\",\n \"front-row-seat\": \"icons/custom/front-row-seat.fc12b.svg\",\n \"plus-card-basic-bg\": \"icons/custom/plus-card-basic-bg.b9b10.svg\",\n \"plus-card-basic\": \"icons/custom/plus-card-basic.2dec6.svg\",\n \"plus-card-gold-bg\": \"icons/custom/plus-card-gold-bg.412b7.svg\",\n \"plus-card-gold\": \"icons/custom/plus-card-gold.e84b8.svg\",\n \"plus-card-junior-bg\": \"icons/custom/plus-card-junior-bg.fc53b.svg\",\n \"plus-card-junior\": \"icons/custom/plus-card-junior.9a0fe.svg\",\n \"plus-card-lumo-bg\": \"icons/custom/plus-card-lumo-bg.fa394.svg\",\n \"plus-card-lumo\": \"icons/custom/plus-card-lumo.57d9c.svg\",\n \"plus-card-platinum-bg\": \"icons/custom/plus-card-platinum-bg.9a14d.svg\",\n \"plus-card-platinum\": \"icons/custom/plus-card-platinum.1011b.svg\",\n \"plus-card-silver-bg\": \"icons/custom/plus-card-silver-bg.c19a4.svg\",\n \"plus-card-silver\": \"icons/custom/plus-card-silver.f91ed.svg\",\n \"plus-icon-basic\": \"icons/custom/plus-icon-basic.ff694.svg\",\n \"plus-icon-gold\": \"icons/custom/plus-icon-gold.d8ea3.svg\",\n \"plus-icon-lumo\": \"icons/custom/plus-icon-lumo.636b5.svg\",\n \"plus-icon-platinum\": \"icons/custom/plus-icon-platinum.cb14e.svg\",\n \"plus-icon-silver\": \"icons/custom/plus-icon-silver.11cd5.svg\",\n \"preferred-seat\": \"icons/custom/preferred-seat.2f5b4.svg\",\n \"premium-bassinet-seat\": \"icons/custom/premium-bassinet-seat.1fcd5.svg\",\n \"premium-seat\": \"icons/custom/premium-seat.01f29.svg\",\n \"regular-seat\": \"icons/custom/regular-seat.78361.svg\",\n \"selected-seat\": \"icons/custom/selected-seat.846f5.svg\",\n \"unavailable-seat\": \"icons/custom/unavailable-seat.096cb.svg\"\n },\n \"payments\": {\n \"adyenpaymentcard\": \"icons/payments/adyenpaymentcard.d9e78.svg\",\n \"aktia\": \"icons/payments/aktia.33b18.svg\",\n \"alandsbanken\": \"icons/payments/alandsbanken.3378d.svg\",\n \"alipay\": \"icons/payments/alipay.b293f.svg\",\n \"amex\": \"icons/payments/amex.48faa.svg\",\n \"applepay\": \"icons/payments/applepay.c73a9.svg\",\n \"arbejdernes\": \"icons/payments/arbejdernes.921f4.svg\",\n \"barclays\": \"icons/payments/barclays.0295f.svg\",\n \"citadele\": \"icons/payments/citadele.751cc.svg\",\n \"cooppank\": \"icons/payments/cooppank.35962.svg\",\n \"danskebank\": \"icons/payments/danskebank.79118.svg\",\n \"dinersclub\": \"icons/payments/dinersclub.0f38b.svg\",\n \"dnb\": \"icons/payments/dnb.2cda1.svg\",\n \"giropay\": \"icons/payments/giropay.87fc4.svg\",\n \"handelsbanken\": \"icons/payments/handelsbanken.aa726.svg\",\n \"hsbcuk\": \"icons/payments/hsbcuk.07776.svg\",\n \"ideal\": \"icons/payments/ideal.77d9a.svg\",\n \"indianetbanking\": \"icons/payments/indianetbanking.fc790.svg\",\n \"indiawallet\": \"icons/payments/indiawallet.1549b.svg\",\n \"jcb\": \"icons/payments/jcb.13e0d.svg\",\n \"jyskebank\": \"icons/payments/jyskebank.5b0fe.svg\",\n \"klarna\": \"icons/payments/klarna.49b4f.svg\",\n \"lansforsakringar\": \"icons/payments/lansforsakringar.de660.svg\",\n \"lhvpank\": \"icons/payments/lhvpank.37e67.svg\",\n \"lloydsbank\": \"icons/payments/lloydsbank.6b387.svg\",\n \"luminor\": \"icons/payments/luminor.5221e.svg\",\n \"lunarbank\": \"icons/payments/lunarbank.47a23.svg\",\n \"mastercard\": \"icons/payments/mastercard.d9582.svg\",\n \"mobilepay\": \"icons/payments/mobilepay.f2b9f.svg\",\n \"natwest\": \"icons/payments/natwest.2d8cd.svg\",\n \"nordea\": \"icons/payments/nordea.6fd27.svg\",\n \"nykreditbank\": \"icons/payments/nykreditbank.0d286.svg\",\n \"omasp\": \"icons/payments/omasp.8a216.svg\",\n \"op\": \"icons/payments/op.acd4d.svg\",\n \"paypal\": \"icons/payments/paypal.65909.svg\",\n \"poppankki\": \"icons/payments/poppankki.bb4cc.svg\",\n \"revolut\": \"icons/payments/revolut.abf4f.svg\",\n \"rupay\": \"icons/payments/rupay.77a27.svg\",\n \"saastopankki\": \"icons/payments/saastopankki.8299c.svg\",\n \"santanderuk\": \"icons/payments/santanderuk.68004.svg\",\n \"sbanken\": \"icons/payments/sbanken.3737c.svg\",\n \"seb\": \"icons/payments/seb.562f6.svg\",\n \"sofort\": \"icons/payments/sofort.bab59.svg\",\n \"spankki\": \"icons/payments/spankki.4e4b1.svg\",\n \"sparebank1no\": \"icons/payments/sparebank1no.11b06.svg\",\n \"sparebank1sm\": \"icons/payments/sparebank1sm.8de66.svg\",\n \"sparebankost\": \"icons/payments/sparebankost.b2477.svg\",\n \"swedbank\": \"icons/payments/swedbank.f3cad.svg\",\n \"swish\": \"icons/payments/swish.74e27.svg\",\n \"trustly\": \"icons/payments/trustly.da22a.svg\",\n \"uatp\": \"icons/payments/uatp.5d789.svg\",\n \"unionpay\": \"icons/payments/unionpay.a9761.svg\",\n \"upi\": \"icons/payments/upi.9a483.svg\",\n \"vipps\": \"icons/payments/vipps.96768.svg\",\n \"visa\": \"icons/payments/visa.12919.svg\",\n \"wechatpay\": \"icons/payments/wechatpay.c65ca.svg\"\n },\n \"svg-library\": {\n \"adult-infant-block\": \"icons/svg-library/adult-infant-block.cae3a.svg\",\n \"adult-infant-outline\": \"icons/svg-library/adult-infant-outline.01326.svg\",\n \"adult-infant\": \"icons/svg-library/adult-infant.fa382.svg\",\n \"aircraft-horizontal-block\": \"icons/svg-library/aircraft-horizontal-block.874df.svg\",\n \"aircraft-horizontal-outline\": \"icons/svg-library/aircraft-horizontal-outline.936c7.svg\",\n \"aircraft-horizontal\": \"icons/svg-library/aircraft-horizontal.ab59c.svg\",\n \"aircraft-tilted-block\": \"icons/svg-library/aircraft-tilted-block.8735f.svg\",\n \"aircraft-tilted-outline\": \"icons/svg-library/aircraft-tilted-outline.5bc02.svg\",\n \"aircraft-tilted\": \"icons/svg-library/aircraft-tilted.e0a92.svg\",\n \"aircraft-vertical-block\": \"icons/svg-library/aircraft-vertical-block.b552c.svg\",\n \"aircraft-vertical-outline\": \"icons/svg-library/aircraft-vertical-outline.d812f.svg\",\n \"aircraft-vertical\": \"icons/svg-library/aircraft-vertical.b4073.svg\",\n \"airport-block\": \"icons/svg-library/airport-block.13f23.svg\",\n \"airport-outline\": \"icons/svg-library/airport-outline.95368.svg\",\n \"airport\": \"icons/svg-library/airport.ceafa.svg\",\n \"alert-block\": \"icons/svg-library/alert-block.fdf4e.svg\",\n \"alert-outline\": \"icons/svg-library/alert-outline.d47dc.svg\",\n \"alert-triangle\": \"icons/svg-library/alert-triangle.07703.svg\",\n \"alert\": \"icons/svg-library/alert.dead5.svg\",\n \"am-logo\": \"icons/svg-library/am-logo.cfc32.svg\",\n \"area-map-block\": \"icons/svg-library/area-map-block.d2c19.svg\",\n \"area-map-outline\": \"icons/svg-library/area-map-outline.c837a.svg\",\n \"area-map\": \"icons/svg-library/area-map.02b82.svg\",\n \"arrival-block\": \"icons/svg-library/arrival-block.8e340.svg\",\n \"arrival-outline\": \"icons/svg-library/arrival-outline.a339e.svg\",\n \"arrival\": \"icons/svg-library/arrival.0c52d.svg\",\n \"arrow-back-block\": \"icons/svg-library/arrow-back-block.1960e.svg\",\n \"arrow-back-outline\": \"icons/svg-library/arrow-back-outline.51f5b.svg\",\n \"arrow-back\": \"icons/svg-library/arrow-back.507fd.svg\",\n \"arrow-down-block\": \"icons/svg-library/arrow-down-block.7b710.svg\",\n \"arrow-down-outline\": \"icons/svg-library/arrow-down-outline.56f99.svg\",\n \"arrow-down\": \"icons/svg-library/arrow-down.5f223.svg\",\n \"arrow-left-block\": \"icons/svg-library/arrow-left-block.b6331.svg\",\n \"arrow-left-outline\": \"icons/svg-library/arrow-left-outline.8118f.svg\",\n \"arrow-left\": \"icons/svg-library/arrow-left.b376c.svg\",\n \"arrow-right-block\": \"icons/svg-library/arrow-right-block.c411c.svg\",\n \"arrow-right-outline\": \"icons/svg-library/arrow-right-outline.2565b.svg\",\n \"arrow-right\": \"icons/svg-library/arrow-right.80bc0.svg\",\n \"arrow-up-block\": \"icons/svg-library/arrow-up-block.dcdaf.svg\",\n \"arrow-up-outline\": \"icons/svg-library/arrow-up-outline.80263.svg\",\n \"arrow-up\": \"icons/svg-library/arrow-up.79e25.svg\",\n \"attachment-block\": \"icons/svg-library/attachment-block.c9112.svg\",\n \"attachment-outline\": \"icons/svg-library/attachment-outline.62dc1.svg\",\n \"attachment\": \"icons/svg-library/attachment.c19a0.svg\",\n \"avios-currency\": \"icons/svg-library/avios-currency.946ab.svg\",\n \"avios-gift-card-block\": \"icons/svg-library/avios-gift-card-block.4de65.svg\",\n \"avios-gift-card-outline\": \"icons/svg-library/avios-gift-card-outline.51672.svg\",\n \"avios-gift-card\": \"icons/svg-library/avios-gift-card.55766.svg\",\n \"avios-mono\": \"icons/svg-library/avios-mono.397f5.svg\",\n \"avios-plectrum\": \"icons/svg-library/avios-plectrum.4daeb.svg\",\n \"b2b-block\": \"icons/svg-library/b2b-block.f36a8.svg\",\n \"b2b-outline\": \"icons/svg-library/b2b-outline.c729f.svg\",\n \"b2b\": \"icons/svg-library/b2b.33525.svg\",\n \"baby-bassinet-block\": \"icons/svg-library/baby-bassinet-block.28b6a.svg\",\n \"baby-bassinet-outline\": \"icons/svg-library/baby-bassinet-outline.17f87.svg\",\n \"baby-bassinet\": \"icons/svg-library/baby-bassinet.b59f2.svg\",\n \"backpack-block\": \"icons/svg-library/backpack-block.5bf39.svg\",\n \"backpack-outline\": \"icons/svg-library/backpack-outline.2ccf3.svg\",\n \"backpack\": \"icons/svg-library/backpack.d564e.svg\",\n \"baggage-checked-in-block\": \"icons/svg-library/baggage-checked-in-block.892ff.svg\",\n \"baggage-checked-in-outline\": \"icons/svg-library/baggage-checked-in-outline.954e6.svg\",\n \"baggage-checked-in\": \"icons/svg-library/baggage-checked-in.772a5.svg\",\n \"baggage-claim-block\": \"icons/svg-library/baggage-claim-block.7d748.svg\",\n \"baggage-claim-outline\": \"icons/svg-library/baggage-claim-outline.8d984.svg\",\n \"baggage-claim\": \"icons/svg-library/baggage-claim.60653.svg\",\n \"baggage-weight-block\": \"icons/svg-library/baggage-weight-block.baaa6.svg\",\n \"baggage-weight-outline\": \"icons/svg-library/baggage-weight-outline.0ea2a.svg\",\n \"baggage-weight\": \"icons/svg-library/baggage-weight.5034d.svg\",\n \"baggage-with-tag-block\": \"icons/svg-library/baggage-with-tag-block.88b40.svg\",\n \"baggage-with-tag-outline\": \"icons/svg-library/baggage-with-tag-outline.5a4ff.svg\",\n \"baggage-with-tag\": \"icons/svg-library/baggage-with-tag.68b0c.svg\",\n \"beer-block\": \"icons/svg-library/beer-block.197d1.svg\",\n \"beer-outline\": \"icons/svg-library/beer-outline.315d0.svg\",\n \"beer\": \"icons/svg-library/beer.d8c66.svg\",\n \"bike-block\": \"icons/svg-library/bike-block.d2a13.svg\",\n \"bike-outline\": \"icons/svg-library/bike-outline.bc20f.svg\",\n \"bike\": \"icons/svg-library/bike.783c9.svg\",\n \"blog-block\": \"icons/svg-library/blog-block.f94b2.svg\",\n \"blog-outline\": \"icons/svg-library/blog-outline.544a6.svg\",\n \"blog\": \"icons/svg-library/blog.e8f42.svg\",\n \"blueberry-juice-block\": \"icons/svg-library/blueberry-juice-block.ffeb4.svg\",\n \"blueberry-juice-outline\": \"icons/svg-library/blueberry-juice-outline.7195e.svg\",\n \"blueberry-juice\": \"icons/svg-library/blueberry-juice.ede8b.svg\",\n \"book-flight-block\": \"icons/svg-library/book-flight-block.c2fe7.svg\",\n \"book-flight-outline\": \"icons/svg-library/book-flight-outline.bb927.svg\",\n \"book-flight\": \"icons/svg-library/book-flight.aee45.svg\",\n \"breakfast-block\": \"icons/svg-library/breakfast-block.20641.svg\",\n \"breakfast-outline\": \"icons/svg-library/breakfast-outline.5c5c2.svg\",\n \"breakfast\": \"icons/svg-library/breakfast.312d6.svg\",\n \"brightness-block\": \"icons/svg-library/brightness-block.aa99b.svg\",\n \"brightness-low-block\": \"icons/svg-library/brightness-low-block.05e54.svg\",\n \"brightness-low-outline\": \"icons/svg-library/brightness-low-outline.3862e.svg\",\n \"brightness-low\": \"icons/svg-library/brightness-low.b5ec7.svg\",\n \"brightness-medium-block\": \"icons/svg-library/brightness-medium-block.50687.svg\",\n \"brightness-medium-outline\": \"icons/svg-library/brightness-medium-outline.a6aed.svg\",\n \"brightness-medium\": \"icons/svg-library/brightness-medium.86cf2.svg\",\n \"brightness-outline\": \"icons/svg-library/brightness-outline.4120e.svg\",\n \"brightness\": \"icons/svg-library/brightness.ee13f.svg\",\n \"bus-block\": \"icons/svg-library/bus-block.9bff2.svg\",\n \"bus-outline\": \"icons/svg-library/bus-outline.ad268.svg\",\n \"bus\": \"icons/svg-library/bus.297d0.svg\",\n \"business-class-block\": \"icons/svg-library/business-class-block.4cedc.svg\",\n \"business-class-outline\": \"icons/svg-library/business-class-outline.e40e2.svg\",\n \"business-class\": \"icons/svg-library/business-class.b38f9.svg\",\n \"calendar-block\": \"icons/svg-library/calendar-block.99f65.svg\",\n \"calendar-outline\": \"icons/svg-library/calendar-outline.5d1e7.svg\",\n \"calendar\": \"icons/svg-library/calendar.c324e.svg\",\n \"camera-block\": \"icons/svg-library/camera-block.5352a.svg\",\n \"camera-outline\": \"icons/svg-library/camera-outline.cac68.svg\",\n \"camera\": \"icons/svg-library/camera.8f2ba.svg\",\n \"car-block\": \"icons/svg-library/car-block.2dd7d.svg\",\n \"car-outline\": \"icons/svg-library/car-outline.ba120.svg\",\n \"car\": \"icons/svg-library/car.6d228.svg\",\n \"cargo\": \"icons/svg-library/cargo.ad5da.svg\",\n \"carry-on-bag-block\": \"icons/svg-library/carry-on-bag-block.0da81.svg\",\n \"carry-on-bag-outline\": \"icons/svg-library/carry-on-bag-outline.00a3d.svg\",\n \"carry-on-bag-trolley-block\": \"icons/svg-library/carry-on-bag-trolley-block.c4b9b.svg\",\n \"carry-on-bag-trolley-outline\": \"icons/svg-library/carry-on-bag-trolley-outline.62eb8.svg\",\n \"carry-on-bag-trolley\": \"icons/svg-library/carry-on-bag-trolley.cdc37.svg\",\n \"carry-on-bag\": \"icons/svg-library/carry-on-bag.a7566.svg\",\n \"carry-on-baggage-block\": \"icons/svg-library/carry-on-baggage-block.2bb18.svg\",\n \"carry-on-baggage-outline\": \"icons/svg-library/carry-on-baggage-outline.9752c.svg\",\n \"carry-on-baggage\": \"icons/svg-library/carry-on-baggage.b36e4.svg\",\n \"carry-on-prohibited\": \"icons/svg-library/carry-on-prohibited.b888c.svg\",\n \"chat-block\": \"icons/svg-library/chat-block.b95e0.svg\",\n \"chat-outline\": \"icons/svg-library/chat-outline.fea7b.svg\",\n \"chat\": \"icons/svg-library/chat.243b1.svg\",\n \"check-in-block\": \"icons/svg-library/check-in-block.6cde0.svg\",\n \"check-in-outline\": \"icons/svg-library/check-in-outline.41783.svg\",\n \"check-in\": \"icons/svg-library/check-in.13621.svg\",\n \"checkbox-selected-inverted\": \"icons/svg-library/checkbox-selected-inverted.137aa.svg\",\n \"checkbox-selected\": \"icons/svg-library/checkbox-selected.d8c03.svg\",\n \"checkbox-unselected-inverted\": \"icons/svg-library/checkbox-unselected-inverted.6bbaf.svg\",\n \"checkbox-unselected\": \"icons/svg-library/checkbox-unselected.8f5e4.svg\",\n \"checked-bag-prohibited\": \"icons/svg-library/checked-bag-prohibited.e28f9.svg\",\n \"checked-baggage-block\": \"icons/svg-library/checked-baggage-block.3d3e5.svg\",\n \"checked-baggage-outline\": \"icons/svg-library/checked-baggage-outline.4f48b.svg\",\n \"checked-baggage\": \"icons/svg-library/checked-baggage.1b55d.svg\",\n \"checked-in-baggage-block\": \"icons/svg-library/checked-in-baggage-block.77962.svg\",\n \"checked-in-baggage-none-block\": \"icons/svg-library/checked-in-baggage-none-block.5483b.svg\",\n \"checked-in-baggage-none-outline\": \"icons/svg-library/checked-in-baggage-none-outline.a90b9.svg\",\n \"checked-in-baggage-none\": \"icons/svg-library/checked-in-baggage-none.b6ce2.svg\",\n \"checked-in-baggage-outline\": \"icons/svg-library/checked-in-baggage-outline.954e6.svg\",\n \"checked-in-baggage\": \"icons/svg-library/checked-in-baggage.2a67f.svg\",\n \"checklist-block\": \"icons/svg-library/checklist-block.b548d.svg\",\n \"checklist-outline\": \"icons/svg-library/checklist-outline.f8ebc.svg\",\n \"checklist\": \"icons/svg-library/checklist.49817.svg\",\n \"checkmark-block\": \"icons/svg-library/checkmark-block.5aa44.svg\",\n \"checkmark-button-selected\": \"icons/svg-library/checkmark-button-selected.b3a54.svg\",\n \"checkmark-button-unselected\": \"icons/svg-library/checkmark-button-unselected.016f9.svg\",\n \"checkmark-outline\": \"icons/svg-library/checkmark-outline.af396.svg\",\n \"checkmark\": \"icons/svg-library/checkmark.4bd04.svg\",\n \"chevron-down-block\": \"icons/svg-library/chevron-down-block.dbdee.svg\",\n \"chevron-down-outline\": \"icons/svg-library/chevron-down-outline.f2e83.svg\",\n \"chevron-down\": \"icons/svg-library/chevron-down.8ea56.svg\",\n \"chevron-left-block\": \"icons/svg-library/chevron-left-block.cde08.svg\",\n \"chevron-left-outline\": \"icons/svg-library/chevron-left-outline.fb5d8.svg\",\n \"chevron-left\": \"icons/svg-library/chevron-left.eb870.svg\",\n \"chevron-right-block\": \"icons/svg-library/chevron-right-block.0697d.svg\",\n \"chevron-right-outline\": \"icons/svg-library/chevron-right-outline.83752.svg\",\n \"chevron-right\": \"icons/svg-library/chevron-right.724ea.svg\",\n \"chevron-up-block\": \"icons/svg-library/chevron-up-block.1d5f0.svg\",\n \"chevron-up-outline\": \"icons/svg-library/chevron-up-outline.86ac5.svg\",\n \"chevron-up\": \"icons/svg-library/chevron-up.10188.svg\",\n \"child-block\": \"icons/svg-library/child-block.43d21.svg\",\n \"child-outline\": \"icons/svg-library/child-outline.d94c5.svg\",\n \"child\": \"icons/svg-library/child.c3f68.svg\",\n \"clock\": \"icons/svg-library/clock.05f9c.svg\",\n \"close-delete-block\": \"icons/svg-library/close-delete-block.93e0f.svg\",\n \"close-delete-outline\": \"icons/svg-library/close-delete-outline.29aa4.svg\",\n \"close-delete\": \"icons/svg-library/close-delete.d9435.svg\",\n \"co2-block\": \"icons/svg-library/co2-block.544e6.svg\",\n \"co2-outline\": \"icons/svg-library/co2-outline.083a0.svg\",\n \"co2\": \"icons/svg-library/co2.c6e85.svg\",\n \"coffee-block\": \"icons/svg-library/coffee-block.61152.svg\",\n \"coffee-outline\": \"icons/svg-library/coffee-outline.77f3b.svg\",\n \"coffee\": \"icons/svg-library/coffee.02c35.svg\",\n \"connecting-flight-block\": \"icons/svg-library/connecting-flight-block.79b49.svg\",\n \"connecting-flight-outline\": \"icons/svg-library/connecting-flight-outline.d4efd.svg\",\n \"connecting-flight\": \"icons/svg-library/connecting-flight.cb727.svg\",\n \"copy-block\": \"icons/svg-library/copy-block.ebce6.svg\",\n \"copy-outline\": \"icons/svg-library/copy-outline.22417.svg\",\n \"copy\": \"icons/svg-library/copy.6d2b4.svg\",\n \"corporate-booking-block\": \"icons/svg-library/corporate-booking-block.cc8bb.svg\",\n \"corporate-booking-outline\": \"icons/svg-library/corporate-booking-outline.6b07a.svg\",\n \"corporate-booking\": \"icons/svg-library/corporate-booking.175b8.svg\",\n \"corrosives-prohibited\": \"icons/svg-library/corrosives-prohibited.2128b.svg\",\n \"corrosives\": \"icons/svg-library/corrosives.8f6e0.svg\",\n \"couple-block\": \"icons/svg-library/couple-block.c95f6.svg\",\n \"couple-outline\": \"icons/svg-library/couple-outline.0af92.svg\",\n \"couple\": \"icons/svg-library/couple.a30ec.svg\",\n \"credit-or-debit-card-block\": \"icons/svg-library/credit-or-debit-card-block.b23dd.svg\",\n \"credit-or-debit-card-outline\": \"icons/svg-library/credit-or-debit-card-outline.20284.svg\",\n \"credit-or-debit-card\": \"icons/svg-library/credit-or-debit-card.897cc.svg\",\n \"crew-called-block\": \"icons/svg-library/crew-called-block.4e57c.svg\",\n \"crew-called-outline\": \"icons/svg-library/crew-called-outline.87039.svg\",\n \"crew-called\": \"icons/svg-library/crew-called.640bf.svg\",\n \"currency-block\": \"icons/svg-library/currency-block.43622.svg\",\n \"currency-outline\": \"icons/svg-library/currency-outline.9afee.svg\",\n \"currency\": \"icons/svg-library/currency.61ae6.svg\",\n \"customer-service-block\": \"icons/svg-library/customer-service-block.54812.svg\",\n \"customer-service-outline\": \"icons/svg-library/customer-service-outline.47bf4.svg\",\n \"customer-service\": \"icons/svg-library/customer-service.08d84.svg\",\n \"day-block\": \"icons/svg-library/day-block.d96ec.svg\",\n \"day-outline\": \"icons/svg-library/day-outline.785ee.svg\",\n \"day\": \"icons/svg-library/day.4ca54.svg\",\n \"departure-block\": \"icons/svg-library/departure-block.f8781.svg\",\n \"departure-gate-block\": \"icons/svg-library/departure-gate-block.fb8ac.svg\",\n \"departure-gate-outline\": \"icons/svg-library/departure-gate-outline.5a925.svg\",\n \"departure-gate\": \"icons/svg-library/departure-gate.37651.svg\",\n \"departure-outline\": \"icons/svg-library/departure-outline.e4402.svg\",\n \"departure\": \"icons/svg-library/departure.fe2fd.svg\",\n \"destination-block\": \"icons/svg-library/destination-block.03cb3.svg\",\n \"destination-outline\": \"icons/svg-library/destination-outline.07edc.svg\",\n \"destination\": \"icons/svg-library/destination.9bb02.svg\",\n \"discount\": \"icons/svg-library/discount.a0333.svg\",\n \"discounted-price-block\": \"icons/svg-library/discounted-price-block.d5452.svg\",\n \"discounted-price-outline\": \"icons/svg-library/discounted-price-outline.6e499.svg\",\n \"discounted-price\": \"icons/svg-library/discounted-price.d37c2.svg\",\n \"dog-block\": \"icons/svg-library/dog-block.a7a4c.svg\",\n \"dog-outline\": \"icons/svg-library/dog-outline.9f091.svg\",\n \"dog\": \"icons/svg-library/dog.7a6a9.svg\",\n \"donation-block\": \"icons/svg-library/donation-block.75089.svg\",\n \"donation-outline\": \"icons/svg-library/donation-outline.2379f.svg\",\n \"donation\": \"icons/svg-library/donation.5ad92.svg\",\n \"download-block\": \"icons/svg-library/download-block.ed254.svg\",\n \"download-outline\": \"icons/svg-library/download-outline.c1ad1.svg\",\n \"download\": \"icons/svg-library/download.8877a.svg\",\n \"drink-soda-block\": \"icons/svg-library/drink-soda-block.0b043.svg\",\n \"drink-soda-outline\": \"icons/svg-library/drink-soda-outline.99f0f.svg\",\n \"drink-soda\": \"icons/svg-library/drink-soda.2733d.svg\",\n \"e-cigarette-prohibited\": \"icons/svg-library/e-cigarette-prohibited.a11f4.svg\",\n \"e-cigarette\": \"icons/svg-library/e-cigarette.a43d4.svg\",\n \"edit-block\": \"icons/svg-library/edit-block.17eb8.svg\",\n \"edit-outline\": \"icons/svg-library/edit-outline.9c112.svg\",\n \"edit\": \"icons/svg-library/edit.d7648.svg\",\n \"eight-block\": \"icons/svg-library/eight-block.e3ce0.svg\",\n \"eight-outline\": \"icons/svg-library/eight-outline.7464a.svg\",\n \"eight\": \"icons/svg-library/eight.7eb14.svg\",\n \"electric-socket-block\": \"icons/svg-library/electric-socket-block.eb327.svg\",\n \"electric-socket-outline\": \"icons/svg-library/electric-socket-outline.62e15.svg\",\n \"electric-socket\": \"icons/svg-library/electric-socket.d813e.svg\",\n \"email-block\": \"icons/svg-library/email-block.18b77.svg\",\n \"email-outline\": \"icons/svg-library/email-outline.d90f8.svg\",\n \"email\": \"icons/svg-library/email.3aeee.svg\",\n \"empty\": \"icons/svg-library/empty.6f72f.svg\",\n \"expand-block\": \"icons/svg-library/expand-block.a6d73.svg\",\n \"expand-outline\": \"icons/svg-library/expand-outline.9850f.svg\",\n \"expand\": \"icons/svg-library/expand.ac7be.svg\",\n \"explosives-prohibited\": \"icons/svg-library/explosives-prohibited.94df1.svg\",\n \"explosives\": \"icons/svg-library/explosives.ba37a.svg\",\n \"external-tab-block\": \"icons/svg-library/external-tab-block.4f2c2.svg\",\n \"external-tab-outline\": \"icons/svg-library/external-tab-outline.154f2.svg\",\n \"external-tab\": \"icons/svg-library/external-tab.c4d59.svg\",\n \"extra-carry-on-bag-block\": \"icons/svg-library/extra-carry-on-bag-block.a65f1.svg\",\n \"extra-carry-on-bag-outline\": \"icons/svg-library/extra-carry-on-bag-outline.4f282.svg\",\n \"extra-carry-on-bag\": \"icons/svg-library/extra-carry-on-bag.98e07.svg\",\n \"extra-check-in-baggage-block\": \"icons/svg-library/extra-check-in-baggage-block.7ddbd.svg\",\n \"extra-check-in-baggage-outline\": \"icons/svg-library/extra-check-in-baggage-outline.b57be.svg\",\n \"extra-check-in-baggage\": \"icons/svg-library/extra-check-in-baggage.d31ec.svg\",\n \"extra-leg-room-block\": \"icons/svg-library/extra-leg-room-block.63be5.svg\",\n \"extra-leg-room-outline\": \"icons/svg-library/extra-leg-room-outline.df9d6.svg\",\n \"extra-leg-room\": \"icons/svg-library/extra-leg-room.a7f8b.svg\",\n \"facebook-block\": \"icons/svg-library/facebook-block.5484c.svg\",\n \"facebook-outline\": \"icons/svg-library/facebook-outline.acc7b.svg\",\n \"facebook\": \"icons/svg-library/facebook.2627d.svg\",\n \"facemask-block\": \"icons/svg-library/facemask-block.d8c47.svg\",\n \"facemask-outline\": \"icons/svg-library/facemask-outline.1fb24.svg\",\n \"facemask\": \"icons/svg-library/facemask.31cfb.svg\",\n \"family-block\": \"icons/svg-library/family-block.d56a6.svg\",\n \"family-outline\": \"icons/svg-library/family-outline.6699a.svg\",\n \"family\": \"icons/svg-library/family.f4a60.svg\",\n \"favourite-entertainment-block\": \"icons/svg-library/favourite-entertainment-block.fe5d6.svg\",\n \"favourite-entertainment-outline\": \"icons/svg-library/favourite-entertainment-outline.82cb4.svg\",\n \"favourite-entertainment\": \"icons/svg-library/favourite-entertainment.ea5b6.svg\",\n \"filter-options-block\": \"icons/svg-library/filter-options-block.3d87c.svg\",\n \"filter-options-outline\": \"icons/svg-library/filter-options-outline.3d8be.svg\",\n \"filter-options\": \"icons/svg-library/filter-options.3c7bd.svg\",\n \"finland-block\": \"icons/svg-library/finland-block.c1edf.svg\",\n \"finland-outline\": \"icons/svg-library/finland-outline.6e5b8.svg\",\n \"finland\": \"icons/svg-library/finland.95aea.svg\",\n \"finnair-emblem-block\": \"icons/svg-library/finnair-emblem-block.45bfe.svg\",\n \"finnair-emblem-outline\": \"icons/svg-library/finnair-emblem-outline.47b99.svg\",\n \"finnair-emblem\": \"icons/svg-library/finnair-emblem.fbc09.svg\",\n \"finnair-plus-block\": \"icons/svg-library/finnair-plus-block.89d2b.svg\",\n \"finnair-plus-card-block\": \"icons/svg-library/finnair-plus-card-block.4de82.svg\",\n \"finnair-plus-card-outline\": \"icons/svg-library/finnair-plus-card-outline.73403.svg\",\n \"finnair-plus-card\": \"icons/svg-library/finnair-plus-card.b665d.svg\",\n \"finnair-plus-outline\": \"icons/svg-library/finnair-plus-outline.741d5.svg\",\n \"finnair-plus\": \"icons/svg-library/finnair-plus.06769.svg\",\n \"fire-arms-prohibited\": \"icons/svg-library/fire-arms-prohibited.91c7f.svg\",\n \"fire-arms\": \"icons/svg-library/fire-arms.3082e.svg\",\n \"five-block\": \"icons/svg-library/five-block.8509e.svg\",\n \"five-outline\": \"icons/svg-library/five-outline.ef975.svg\",\n \"five\": \"icons/svg-library/five.e67e0.svg\",\n \"flammable-gases-prohibited\": \"icons/svg-library/flammable-gases-prohibited.9b0b9.svg\",\n \"flammable-gases\": \"icons/svg-library/flammable-gases.34b15.svg\",\n \"flammable-liquids-prohibited\": \"icons/svg-library/flammable-liquids-prohibited.344c0.svg\",\n \"flammable-liquids\": \"icons/svg-library/flammable-liquids.773fc.svg\",\n \"flammable-solids-prohibited\": \"icons/svg-library/flammable-solids-prohibited.dec4f.svg\",\n \"flammable-solids\": \"icons/svg-library/flammable-solids.9c2c3.svg\",\n \"flight-camera-block\": \"icons/svg-library/flight-camera-block.f9df1.svg\",\n \"flight-camera-outline\": \"icons/svg-library/flight-camera-outline.ffc6b.svg\",\n \"flight-camera\": \"icons/svg-library/flight-camera.50bb4.svg\",\n \"flight-hotel\": \"icons/svg-library/flight-hotel.21c4f.svg\",\n \"flight-map-block\": \"icons/svg-library/flight-map-block.fa856.svg\",\n \"flight-map-outline\": \"icons/svg-library/flight-map-outline.8d7af.svg\",\n \"flight-map\": \"icons/svg-library/flight-map.f1fc4.svg\",\n \"flight-offer-block\": \"icons/svg-library/flight-offer-block.bbf3f.svg\",\n \"flight-offer-outline\": \"icons/svg-library/flight-offer-outline.a3bb2.svg\",\n \"flight-offer\": \"icons/svg-library/flight-offer.3b3f2.svg\",\n \"flight-status\": \"icons/svg-library/flight-status.4f1a6.svg\",\n \"flights-unavailable-block\": \"icons/svg-library/flights-unavailable-block.4dc24.svg\",\n \"flights-unavailable-outline\": \"icons/svg-library/flights-unavailable-outline.62eed.svg\",\n \"flights-unavailable\": \"icons/svg-library/flights-unavailable.d1dab.svg\",\n \"food-block\": \"icons/svg-library/food-block.a2181.svg\",\n \"food-outline\": \"icons/svg-library/food-outline.7b0d4.svg\",\n \"food\": \"icons/svg-library/food.0d5ec.svg\",\n \"four-block\": \"icons/svg-library/four-block.e0ab6.svg\",\n \"four-outline\": \"icons/svg-library/four-outline.230b4.svg\",\n \"four\": \"icons/svg-library/four.47edf.svg\",\n \"games-block\": \"icons/svg-library/games-block.1ecd7.svg\",\n \"games-outline\": \"icons/svg-library/games-outline.21cd7.svg\",\n \"games\": \"icons/svg-library/games.47596.svg\",\n \"gift-card-block\": \"icons/svg-library/gift-card-block.81b24.svg\",\n \"gift-card-outline\": \"icons/svg-library/gift-card-outline.79007.svg\",\n \"gift-card\": \"icons/svg-library/gift-card.637d9.svg\",\n \"golf-block\": \"icons/svg-library/golf-block.a8bb5.svg\",\n \"golf-outline\": \"icons/svg-library/golf-outline.a0a44.svg\",\n \"golf-skis-block\": \"icons/svg-library/golf-skis-block.a9f62.svg\",\n \"golf-skis-outline\": \"icons/svg-library/golf-skis-outline.bfaec.svg\",\n \"golf-skis\": \"icons/svg-library/golf-skis.fe3d9.svg\",\n \"golf\": \"icons/svg-library/golf.b5548.svg\",\n \"gps-location-block\": \"icons/svg-library/gps-location-block.f13eb.svg\",\n \"gps-location-outline\": \"icons/svg-library/gps-location-outline.fcfe1.svg\",\n \"gps-location\": \"icons/svg-library/gps-location.400db.svg\",\n \"group-block\": \"icons/svg-library/group-block.244b2.svg\",\n \"group-outline\": \"icons/svg-library/group-outline.3eddf.svg\",\n \"group\": \"icons/svg-library/group.28343.svg\",\n \"headphones-block\": \"icons/svg-library/headphones-block.79599.svg\",\n \"headphones-outline\": \"icons/svg-library/headphones-outline.7b985.svg\",\n \"headphones\": \"icons/svg-library/headphones.457c9.svg\",\n \"help-block\": \"icons/svg-library/help-block.f51e7.svg\",\n \"help-outline\": \"icons/svg-library/help-outline.63170.svg\",\n \"help\": \"icons/svg-library/help.fb9a6.svg\",\n \"hold-my-booking-block\": \"icons/svg-library/hold-my-booking-block.44cee.svg\",\n \"hold-my-booking-outline\": \"icons/svg-library/hold-my-booking-outline.bfba3.svg\",\n \"hold-my-booking\": \"icons/svg-library/hold-my-booking.540f8.svg\",\n \"home-block\": \"icons/svg-library/home-block.85217.svg\",\n \"home-outline\": \"icons/svg-library/home-outline.359b2.svg\",\n \"home\": \"icons/svg-library/home.f7ea7.svg\",\n \"hotel-block\": \"icons/svg-library/hotel-block.2b184.svg\",\n \"hotel-outline\": \"icons/svg-library/hotel-outline.9e94a.svg\",\n \"hotel\": \"icons/svg-library/hotel.78a8d.svg\",\n \"in-coming-call-block\": \"icons/svg-library/in-coming-call-block.f97a7.svg\",\n \"in-coming-call-outline\": \"icons/svg-library/in-coming-call-outline.0c9e0.svg\",\n \"in-coming-call\": \"icons/svg-library/in-coming-call.7d862.svg\",\n \"infant-block\": \"icons/svg-library/infant-block.f526c.svg\",\n \"infant-outline\": \"icons/svg-library/infant-outline.a22ba.svg\",\n \"infant\": \"icons/svg-library/infant.541fe.svg\",\n \"info-block\": \"icons/svg-library/info-block.78151.svg\",\n \"info-outline\": \"icons/svg-library/info-outline.51434.svg\",\n \"info\": \"icons/svg-library/info.f1043.svg\",\n \"instagram\": \"icons/svg-library/instagram.512e7.svg\",\n \"insurance-block\": \"icons/svg-library/insurance-block.6b2c6.svg\",\n \"insurance-outline\": \"icons/svg-library/insurance-outline.e59fe.svg\",\n \"insurance\": \"icons/svg-library/insurance.6a46d.svg\",\n \"internet-disruption\": \"icons/svg-library/internet-disruption.7faa6.svg\",\n \"keyboard-block\": \"icons/svg-library/keyboard-block.f8ce9.svg\",\n \"keyboard-outline\": \"icons/svg-library/keyboard-outline.ca75d.svg\",\n \"keyboard\": \"icons/svg-library/keyboard.2b185.svg\",\n \"language-block\": \"icons/svg-library/language-block.15705.svg\",\n \"language-outline\": \"icons/svg-library/language-outline.6229a.svg\",\n \"language\": \"icons/svg-library/language.76f50.svg\",\n \"laptop-block\": \"icons/svg-library/laptop-block.182ba.svg\",\n \"laptop-outline\": \"icons/svg-library/laptop-outline.cf337.svg\",\n \"laptop\": \"icons/svg-library/laptop.2cd7b.svg\",\n \"lavatory-block\": \"icons/svg-library/lavatory-block.828e7.svg\",\n \"lavatory-men-block\": \"icons/svg-library/lavatory-men-block.b7e1f.svg\",\n \"lavatory-men-outline\": \"icons/svg-library/lavatory-men-outline.068da.svg\",\n \"lavatory-men\": \"icons/svg-library/lavatory-men.53855.svg\",\n \"lavatory-outline\": \"icons/svg-library/lavatory-outline.43568.svg\",\n \"lavatory-women-block\": \"icons/svg-library/lavatory-women-block.05535.svg\",\n \"lavatory-women-outline\": \"icons/svg-library/lavatory-women-outline.cc479.svg\",\n \"lavatory-women\": \"icons/svg-library/lavatory-women.5a58d.svg\",\n \"lavatory\": \"icons/svg-library/lavatory.32e89.svg\",\n \"legislation-block\": \"icons/svg-library/legislation-block.6ee77.svg\",\n \"legislation-outline\": \"icons/svg-library/legislation-outline.9f975.svg\",\n \"legislation\": \"icons/svg-library/legislation.33dff.svg\",\n \"lighters-matches-prohibited\": \"icons/svg-library/lighters-matches-prohibited.76667.svg\",\n \"lighters-matches\": \"icons/svg-library/lighters-matches.a1c1a.svg\",\n \"lighters-prohibited\": \"icons/svg-library/lighters-prohibited.3d796.svg\",\n \"lighters\": \"icons/svg-library/lighters.571a0.svg\",\n \"lights-off-block\": \"icons/svg-library/lights-off-block.cd71a.svg\",\n \"lights-off-outline\": \"icons/svg-library/lights-off-outline.4a68d.svg\",\n \"lights-off\": \"icons/svg-library/lights-off.a0c37.svg\",\n \"lights-on-block\": \"icons/svg-library/lights-on-block.37777.svg\",\n \"lights-on-outline\": \"icons/svg-library/lights-on-outline.da13d.svg\",\n \"lights-on\": \"icons/svg-library/lights-on.a3256.svg\",\n \"link-block\": \"icons/svg-library/link-block.a3ee8.svg\",\n \"link-outline\": \"icons/svg-library/link-outline.f10c4.svg\",\n \"link\": \"icons/svg-library/link.4a034.svg\",\n \"linkedin-block\": \"icons/svg-library/linkedin-block.c4d6c.svg\",\n \"linkedin-outline\": \"icons/svg-library/linkedin-outline.49e70.svg\",\n \"linkedin\": \"icons/svg-library/linkedin.3c451.svg\",\n \"liquid-container\": \"icons/svg-library/liquid-container.2cd2a.svg\",\n \"lock-active-block\": \"icons/svg-library/lock-active-block.027a3.svg\",\n \"lock-active-outline\": \"icons/svg-library/lock-active-outline.450f7.svg\",\n \"lock-active\": \"icons/svg-library/lock-active.aa2bb.svg\",\n \"lock-closed-block\": \"icons/svg-library/lock-closed-block.8dad5.svg\",\n \"lock-closed-outline\": \"icons/svg-library/lock-closed-outline.daaa9.svg\",\n \"lock-closed\": \"icons/svg-library/lock-closed.760f5.svg\",\n \"lock-open-block\": \"icons/svg-library/lock-open-block.492e8.svg\",\n \"lock-open-outline\": \"icons/svg-library/lock-open-outline.5bcdd.svg\",\n \"lock-open\": \"icons/svg-library/lock-open.add62.svg\",\n \"locker-block\": \"icons/svg-library/locker-block.84702.svg\",\n \"locker-outline\": \"icons/svg-library/locker-outline.5d68d.svg\",\n \"locker\": \"icons/svg-library/locker.94a75.svg\",\n \"logged-in-block\": \"icons/svg-library/logged-in-block.50510.svg\",\n \"logged-in-outline\": \"icons/svg-library/logged-in-outline.4a0cf.svg\",\n \"logged-in\": \"icons/svg-library/logged-in.ee1ec.svg\",\n \"logout-block\": \"icons/svg-library/logout-block.43956.svg\",\n \"logout-outline\": \"icons/svg-library/logout-outline.2051b.svg\",\n \"logout\": \"icons/svg-library/logout.743d7.svg\",\n \"lost-baggage\": \"icons/svg-library/lost-baggage.7d7b5.svg\",\n \"lost-card\": \"icons/svg-library/lost-card.027b9.svg\",\n \"lounge-block\": \"icons/svg-library/lounge-block.c859c.svg\",\n \"lounge-outline\": \"icons/svg-library/lounge-outline.e497a.svg\",\n \"lounge\": \"icons/svg-library/lounge.f1785.svg\",\n \"magazines-block\": \"icons/svg-library/magazines-block.3464c.svg\",\n \"magazines-outline\": \"icons/svg-library/magazines-outline.6f449.svg\",\n \"magazines\": \"icons/svg-library/magazines.37a00.svg\",\n \"map-layers-block\": \"icons/svg-library/map-layers-block.d84c3.svg\",\n \"map-layers-outline\": \"icons/svg-library/map-layers-outline.8e272.svg\",\n \"map-layers\": \"icons/svg-library/map-layers.5df34.svg\",\n \"meal-block\": \"icons/svg-library/meal-block.6148a.svg\",\n \"meal-outline\": \"icons/svg-library/meal-outline.70c0a.svg\",\n \"meal\": \"icons/svg-library/meal.1a8c1.svg\",\n \"medical-assistance-block\": \"icons/svg-library/medical-assistance-block.176c4.svg\",\n \"medical-assistance-outline\": \"icons/svg-library/medical-assistance-outline.7ec39.svg\",\n \"medical-assistance\": \"icons/svg-library/medical-assistance.46f2d.svg\",\n \"menu-grid-block\": \"icons/svg-library/menu-grid-block.ed000.svg\",\n \"menu-grid-outline\": \"icons/svg-library/menu-grid-outline.becdd.svg\",\n \"menu-grid\": \"icons/svg-library/menu-grid.53b4e.svg\",\n \"menu-list-block\": \"icons/svg-library/menu-list-block.e7478.svg\",\n \"menu-list-outline\": \"icons/svg-library/menu-list-outline.fb533.svg\",\n \"menu-list-view-block\": \"icons/svg-library/menu-list-view-block.0d8be.svg\",\n \"menu-list-view-outline\": \"icons/svg-library/menu-list-view-outline.592c7.svg\",\n \"menu-list-view\": \"icons/svg-library/menu-list-view.e926b.svg\",\n \"menu-list\": \"icons/svg-library/menu-list.f4529.svg\",\n \"milestone-block\": \"icons/svg-library/milestone-block.f81e5.svg\",\n \"milestone-outline\": \"icons/svg-library/milestone-outline.ad3ba.svg\",\n \"milestone\": \"icons/svg-library/milestone.17bb5.svg\",\n \"minimise-block\": \"icons/svg-library/minimise-block.e4524.svg\",\n \"minimise-chat\": \"icons/svg-library/minimise-chat.6f5db.svg\",\n \"minimise-outline\": \"icons/svg-library/minimise-outline.9b152.svg\",\n \"minimise\": \"icons/svg-library/minimise.17832.svg\",\n \"minus-block\": \"icons/svg-library/minus-block.5d150.svg\",\n \"minus-outline\": \"icons/svg-library/minus-outline.36be9.svg\",\n \"minus\": \"icons/svg-library/minus.55ece.svg\",\n \"mmb-ticket-changes-block\": \"icons/svg-library/mmb-ticket-changes-block.9fd3b.svg\",\n \"mmb-ticket-changes-outline\": \"icons/svg-library/mmb-ticket-changes-outline.b2401.svg\",\n \"mmb-ticket-changes\": \"icons/svg-library/mmb-ticket-changes.6a4b4.svg\",\n \"mobile-phone-block\": \"icons/svg-library/mobile-phone-block.1ed1a.svg\",\n \"mobile-phone-outline\": \"icons/svg-library/mobile-phone-outline.bcf7a.svg\",\n \"mobile-phone\": \"icons/svg-library/mobile-phone.0631c.svg\",\n \"more-block\": \"icons/svg-library/more-block.e8d11.svg\",\n \"more-outline\": \"icons/svg-library/more-outline.efbdd.svg\",\n \"more\": \"icons/svg-library/more.2c919.svg\",\n \"movies-block\": \"icons/svg-library/movies-block.2a496.svg\",\n \"movies-outline\": \"icons/svg-library/movies-outline.7a437.svg\",\n \"movies\": \"icons/svg-library/movies.ce4af.svg\",\n \"multi-pax-block\": \"icons/svg-library/multi-pax-block.2ba22.svg\",\n \"multi-pax-outline\": \"icons/svg-library/multi-pax-outline.ceaa3.svg\",\n \"multi-pax\": \"icons/svg-library/multi-pax.b6d8f.svg\",\n \"multistop-block\": \"icons/svg-library/multistop-block.9d8a6.svg\",\n \"multistop-outline\": \"icons/svg-library/multistop-outline.7be30.svg\",\n \"multistop\": \"icons/svg-library/multistop.2de6c.svg\",\n \"music-block\": \"icons/svg-library/music-block.da933.svg\",\n \"music-outline\": \"icons/svg-library/music-outline.7a6ad.svg\",\n \"music\": \"icons/svg-library/music.6c288.svg\",\n \"night-block\": \"icons/svg-library/night-block.f028c.svg\",\n \"night-outline\": \"icons/svg-library/night-outline.fc26b.svg\",\n \"night\": \"icons/svg-library/night.f675b.svg\",\n \"nine-block\": \"icons/svg-library/nine-block.00f61.svg\",\n \"nine-outline\": \"icons/svg-library/nine-outline.da09a.svg\",\n \"nine\": \"icons/svg-library/nine.f69a1.svg\",\n \"nordic-product-block\": \"icons/svg-library/nordic-product-block.ffe2f.svg\",\n \"nordic-product-outline\": \"icons/svg-library/nordic-product-outline.3fff4.svg\",\n \"nordic-product\": \"icons/svg-library/nordic-product.acaaa.svg\",\n \"not-visible-block\": \"icons/svg-library/not-visible-block.5f2b9.svg\",\n \"not-visible-outline\": \"icons/svg-library/not-visible-outline.3e442.svg\",\n \"not-visible\": \"icons/svg-library/not-visible.1b706.svg\",\n \"onboard-safety-block\": \"icons/svg-library/onboard-safety-block.a3bb0.svg\",\n \"onboard-safety-outline\": \"icons/svg-library/onboard-safety-outline.27de3.svg\",\n \"onboard-safety\": \"icons/svg-library/onboard-safety.a02ee.svg\",\n \"onboard-service-block\": \"icons/svg-library/onboard-service-block.47173.svg\",\n \"onboard-service-outline\": \"icons/svg-library/onboard-service-outline.5a499.svg\",\n \"onboard-service\": \"icons/svg-library/onboard-service.d7ac1.svg\",\n \"one-block\": \"icons/svg-library/one-block.0a133.svg\",\n \"one-outline\": \"icons/svg-library/one-outline.807ac.svg\",\n \"one\": \"icons/svg-library/one.9ba68.svg\",\n \"oneworld-logo\": \"icons/svg-library/oneworld-logo.1471e.svg\",\n \"online-checked-block\": \"icons/svg-library/online-checked-block.adddd.svg\",\n \"online-checked-outline\": \"icons/svg-library/online-checked-outline.12db1.svg\",\n \"online-checked\": \"icons/svg-library/online-checked.0d964.svg\",\n \"parking\": \"icons/svg-library/parking.2e0b7.svg\",\n \"pause-block\": \"icons/svg-library/pause-block.94e06.svg\",\n \"pause-outline\": \"icons/svg-library/pause-outline.f1b3f.svg\",\n \"pause\": \"icons/svg-library/pause.cd61b.svg\",\n \"payment-methods-block\": \"icons/svg-library/payment-methods-block.5e6ed.svg\",\n \"payment-methods-outline\": \"icons/svg-library/payment-methods-outline.db46b.svg\",\n \"payment-methods\": \"icons/svg-library/payment-methods.234ac.svg\",\n \"person-block\": \"icons/svg-library/person-block.98abc.svg\",\n \"person-outline\": \"icons/svg-library/person-outline.7dad4.svg\",\n \"person-special-assist-block\": \"icons/svg-library/person-special-assist-block.14b1c.svg\",\n \"person-special-assist-outline\": \"icons/svg-library/person-special-assist-outline.91cb8.svg\",\n \"person-special-assist\": \"icons/svg-library/person-special-assist.5723c.svg\",\n \"person-walking-block\": \"icons/svg-library/person-walking-block.cb637.svg\",\n \"person-walking-outline\": \"icons/svg-library/person-walking-outline.41665.svg\",\n \"person-walking\": \"icons/svg-library/person-walking.4f824.svg\",\n \"person-wheelchair-block\": \"icons/svg-library/person-wheelchair-block.d9928.svg\",\n \"person-wheelchair-outline\": \"icons/svg-library/person-wheelchair-outline.6c247.svg\",\n \"person-wheelchair\": \"icons/svg-library/person-wheelchair.6d23f.svg\",\n \"person\": \"icons/svg-library/person.0587b.svg\",\n \"pet-in-bag-block\": \"icons/svg-library/pet-in-bag-block.c2737.svg\",\n \"pet-in-bag-outline\": \"icons/svg-library/pet-in-bag-outline.d19b6.svg\",\n \"pet-in-bag\": \"icons/svg-library/pet-in-bag.76eda.svg\",\n \"pet\": \"icons/svg-library/pet.71c4d.svg\",\n \"phone-block\": \"icons/svg-library/phone-block.a8738.svg\",\n \"phone-outline\": \"icons/svg-library/phone-outline.1aea3.svg\",\n \"phone\": \"icons/svg-library/phone.4decf.svg\",\n \"picture-block\": \"icons/svg-library/picture-block.b89fc.svg\",\n \"picture-outline\": \"icons/svg-library/picture-outline.2d3cd.svg\",\n \"picture\": \"icons/svg-library/picture.b576a.svg\",\n \"play-block\": \"icons/svg-library/play-block.92dc4.svg\",\n \"play-next-block\": \"icons/svg-library/play-next-block.82555.svg\",\n \"play-next-outline\": \"icons/svg-library/play-next-outline.1941d.svg\",\n \"play-next\": \"icons/svg-library/play-next.4053b.svg\",\n \"play-outline\": \"icons/svg-library/play-outline.2a926.svg\",\n \"play-previous-block\": \"icons/svg-library/play-previous-block.55d9f.svg\",\n \"play-previous-outline\": \"icons/svg-library/play-previous-outline.e94bb.svg\",\n \"play-previous\": \"icons/svg-library/play-previous.46823.svg\",\n \"play\": \"icons/svg-library/play.5df91.svg\",\n \"plus-block\": \"icons/svg-library/plus-block.c1388.svg\",\n \"plus-outline\": \"icons/svg-library/plus-outline.f1601.svg\",\n \"plus\": \"icons/svg-library/plus.79da3.svg\",\n \"points-of-interest-block\": \"icons/svg-library/points-of-interest-block.69574.svg\",\n \"points-of-interest-outline\": \"icons/svg-library/points-of-interest-outline.71e94.svg\",\n \"points-of-interest\": \"icons/svg-library/points-of-interest.e15dc.svg\",\n \"poison-prohibited\": \"icons/svg-library/poison-prohibited.ecb63.svg\",\n \"poison\": \"icons/svg-library/poison.a6967.svg\",\n \"power-bank-block\": \"icons/svg-library/power-bank-block.03b2e.svg\",\n \"power-bank-outline\": \"icons/svg-library/power-bank-outline.db33b.svg\",\n \"power-bank-prohibited\": \"icons/svg-library/power-bank-prohibited.4c94a.svg\",\n \"power-bank\": \"icons/svg-library/power-bank.fb73a.svg\",\n \"power-block\": \"icons/svg-library/power-block.260a6.svg\",\n \"power-outline\": \"icons/svg-library/power-outline.2dfe1.svg\",\n \"power\": \"icons/svg-library/power.a6fb2.svg\",\n \"pre-order-block\": \"icons/svg-library/pre-order-block.bddf4.svg\",\n \"pre-order-outline\": \"icons/svg-library/pre-order-outline.0d2c9.svg\",\n \"pre-order\": \"icons/svg-library/pre-order.979de.svg\",\n \"premium-economy-block\": \"icons/svg-library/premium-economy-block.84eae.svg\",\n \"premium-economy-outline\": \"icons/svg-library/premium-economy-outline.929c9.svg\",\n \"premium-economy\": \"icons/svg-library/premium-economy.848ac.svg\",\n \"price-block\": \"icons/svg-library/price-block.33df7.svg\",\n \"price-outline\": \"icons/svg-library/price-outline.b4066.svg\",\n \"price\": \"icons/svg-library/price.f4385.svg\",\n \"print-bag-tag-block\": \"icons/svg-library/print-bag-tag-block.f6060.svg\",\n \"print-bag-tag-outline\": \"icons/svg-library/print-bag-tag-outline.b5525.svg\",\n \"print-bag-tag\": \"icons/svg-library/print-bag-tag.55f00.svg\",\n \"priority-check-in-block\": \"icons/svg-library/priority-check-in-block.05f73.svg\",\n \"priority-check-in-outline\": \"icons/svg-library/priority-check-in-outline.f537d.svg\",\n \"priority-check-in\": \"icons/svg-library/priority-check-in.8bc64.svg\",\n \"priority-security-block\": \"icons/svg-library/priority-security-block.b3aa2.svg\",\n \"priority-security-outline\": \"icons/svg-library/priority-security-outline.29e83.svg\",\n \"priority-security\": \"icons/svg-library/priority-security.e58ae.svg\",\n \"qrcode-block\": \"icons/svg-library/qrcode-block.961ec.svg\",\n \"qrcode-outline\": \"icons/svg-library/qrcode-outline.d16a5.svg\",\n \"qrcode\": \"icons/svg-library/qrcode.3ccf9.svg\",\n \"radioactive-prohibited\": \"icons/svg-library/radioactive-prohibited.b563d.svg\",\n \"radioactive\": \"icons/svg-library/radioactive.afab8.svg\",\n \"radiobutton-inverted-filled\": \"icons/svg-library/radiobutton-inverted-filled.fefcc.svg\",\n \"radiobutton-selected\": \"icons/svg-library/radiobutton-selected.8469f.svg\",\n \"radiobutton-unselected\": \"icons/svg-library/radiobutton-unselected.da4ec.svg\",\n \"re-focus-block\": \"icons/svg-library/re-focus-block.43473.svg\",\n \"re-focus-outline\": \"icons/svg-library/re-focus-outline.67f07.svg\",\n \"re-focus\": \"icons/svg-library/re-focus.61948.svg\",\n \"rental-car-block\": \"icons/svg-library/rental-car-block.7592f.svg\",\n \"rental-car-outline\": \"icons/svg-library/rental-car-outline.2f1e8.svg\",\n \"rental-car\": \"icons/svg-library/rental-car.b898c.svg\",\n \"reservation-block\": \"icons/svg-library/reservation-block.19dfd.svg\",\n \"reservation-outline\": \"icons/svg-library/reservation-outline.b764a.svg\",\n \"reservation\": \"icons/svg-library/reservation.d7b73.svg\",\n \"rest-block\": \"icons/svg-library/rest-block.f42b3.svg\",\n \"rest-outline\": \"icons/svg-library/rest-outline.b9370.svg\",\n \"rest\": \"icons/svg-library/rest.f5c48.svg\",\n \"return-trip-block\": \"icons/svg-library/return-trip-block.c4050.svg\",\n \"return-trip-outline\": \"icons/svg-library/return-trip-outline.199c5.svg\",\n \"return-trip\": \"icons/svg-library/return-trip.f13a5.svg\",\n \"ride-share-block\": \"icons/svg-library/ride-share-block.56144.svg\",\n \"ride-share-outline\": \"icons/svg-library/ride-share-outline.4ee2c.svg\",\n \"ride-share\": \"icons/svg-library/ride-share.aefb0.svg\",\n \"saf-block\": \"icons/svg-library/saf-block.b73e5.svg\",\n \"saf-outline\": \"icons/svg-library/saf-outline.73c6d.svg\",\n \"saf\": \"icons/svg-library/saf.4e769.svg\",\n \"save-time\": \"icons/svg-library/save-time.9ad71.svg\",\n \"scooter-prohibited\": \"icons/svg-library/scooter-prohibited.f23e4.svg\",\n \"scooter\": \"icons/svg-library/scooter.6e962.svg\",\n \"seafood-block\": \"icons/svg-library/seafood-block.a60b5.svg\",\n \"seafood-outline\": \"icons/svg-library/seafood-outline.b2aa4.svg\",\n \"seafood\": \"icons/svg-library/seafood.6bbe4.svg\",\n \"search-block\": \"icons/svg-library/search-block.61545.svg\",\n \"search-outline\": \"icons/svg-library/search-outline.86bd7.svg\",\n \"search\": \"icons/svg-library/search.a8775.svg\",\n \"seat-or-economy-block\": \"icons/svg-library/seat-or-economy-block.69adb.svg\",\n \"seat-or-economy-outline\": \"icons/svg-library/seat-or-economy-outline.fae33.svg\",\n \"seat-or-economy\": \"icons/svg-library/seat-or-economy.8f54d.svg\",\n \"seatbelts-off-block\": \"icons/svg-library/seatbelts-off-block.16bbe.svg\",\n \"seatbelts-off-outline\": \"icons/svg-library/seatbelts-off-outline.aa6e0.svg\",\n \"seatbelts-off\": \"icons/svg-library/seatbelts-off.3178e.svg\",\n \"seatbelts-on-block\": \"icons/svg-library/seatbelts-on-block.fe9ee.svg\",\n \"seatbelts-on-outline\": \"icons/svg-library/seatbelts-on-outline.7d801.svg\",\n \"seatbelts-on\": \"icons/svg-library/seatbelts-on.6b1e9.svg\",\n \"secure-payment-block\": \"icons/svg-library/secure-payment-block.4f09a.svg\",\n \"secure-payment-outline\": \"icons/svg-library/secure-payment-outline.7e236.svg\",\n \"secure-payment\": \"icons/svg-library/secure-payment.61844.svg\",\n \"security-block\": \"icons/svg-library/security-block.d602e.svg\",\n \"security-outline\": \"icons/svg-library/security-outline.cf78c.svg\",\n \"security\": \"icons/svg-library/security.9c782.svg\",\n \"service-desk-block\": \"icons/svg-library/service-desk-block.286ea.svg\",\n \"service-desk-outline\": \"icons/svg-library/service-desk-outline.040a1.svg\",\n \"service-desk\": \"icons/svg-library/service-desk.6ce89.svg\",\n \"settings-block\": \"icons/svg-library/settings-block.8c7d0.svg\",\n \"settings-outline\": \"icons/svg-library/settings-outline.f77bb.svg\",\n \"settings\": \"icons/svg-library/settings.38e47.svg\",\n \"seven-block\": \"icons/svg-library/seven-block.303a0.svg\",\n \"seven-outline\": \"icons/svg-library/seven-outline.2c199.svg\",\n \"seven\": \"icons/svg-library/seven.d19c2.svg\",\n \"share-android-block\": \"icons/svg-library/share-android-block.bbe04.svg\",\n \"share-android-outline\": \"icons/svg-library/share-android-outline.8706f.svg\",\n \"share-android\": \"icons/svg-library/share-android.d175c.svg\",\n \"sharp-objects-prohibited\": \"icons/svg-library/sharp-objects-prohibited.6b016.svg\",\n \"sharp-objects\": \"icons/svg-library/sharp-objects.7761e.svg\",\n \"shopping-cart-active\": \"icons/svg-library/shopping-cart-active.3e94e.svg\",\n \"shopping-cart-block\": \"icons/svg-library/shopping-cart-block.792af.svg\",\n \"shopping-cart-outline\": \"icons/svg-library/shopping-cart-outline.e94d7.svg\",\n \"shopping-cart\": \"icons/svg-library/shopping-cart.ae8cc.svg\",\n \"shower-block\": \"icons/svg-library/shower-block.0bb37.svg\",\n \"shower-outline\": \"icons/svg-library/shower-outline.93e23.svg\",\n \"shower\": \"icons/svg-library/shower.73201.svg\",\n \"single-pax-block\": \"icons/svg-library/single-pax-block.86a11.svg\",\n \"single-pax-outline\": \"icons/svg-library/single-pax-outline.8cabb.svg\",\n \"single-pax\": \"icons/svg-library/single-pax.16c9f.svg\",\n \"six-block\": \"icons/svg-library/six-block.c2083.svg\",\n \"six-outline\": \"icons/svg-library/six-outline.ea398.svg\",\n \"six\": \"icons/svg-library/six.411dd.svg\",\n \"skip-15s-back-block\": \"icons/svg-library/skip-15s-back-block.7326f.svg\",\n \"skip-15s-back-outline\": \"icons/svg-library/skip-15s-back-outline.6cf55.svg\",\n \"skip-15s-back\": \"icons/svg-library/skip-15s-back.b02ca.svg\",\n \"skip-15s-forward-block\": \"icons/svg-library/skip-15s-forward-block.baaba.svg\",\n \"skip-15s-forward-outline\": \"icons/svg-library/skip-15s-forward-outline.57859.svg\",\n \"skip-15s-forward\": \"icons/svg-library/skip-15s-forward.c7e35.svg\",\n \"skis-block\": \"icons/svg-library/skis-block.d4bba.svg\",\n \"skis-outline\": \"icons/svg-library/skis-outline.04c20.svg\",\n \"skis\": \"icons/svg-library/skis.ed350.svg\",\n \"smoking-block\": \"icons/svg-library/smoking-block.29f07.svg\",\n \"smoking-outline\": \"icons/svg-library/smoking-outline.871cf.svg\",\n \"smoking-prohibited\": \"icons/svg-library/smoking-prohibited.eef3c.svg\",\n \"smoking\": \"icons/svg-library/smoking.4ec9c.svg\",\n \"snacks-block\": \"icons/svg-library/snacks-block.b5a58.svg\",\n \"snacks-outline\": \"icons/svg-library/snacks-outline.ab277.svg\",\n \"snacks\": \"icons/svg-library/snacks.ed8de.svg\",\n \"sort-ascending-block\": \"icons/svg-library/sort-ascending-block.ebfa7.svg\",\n \"sort-ascending-outline\": \"icons/svg-library/sort-ascending-outline.248f7.svg\",\n \"sort-ascending\": \"icons/svg-library/sort-ascending.6589c.svg\",\n \"sort-block\": \"icons/svg-library/sort-block.bc931.svg\",\n \"sort-descending-block\": \"icons/svg-library/sort-descending-block.6dd4a.svg\",\n \"sort-descending-outline\": \"icons/svg-library/sort-descending-outline.73837.svg\",\n \"sort-descending\": \"icons/svg-library/sort-descending.add9b.svg\",\n \"sort-outline\": \"icons/svg-library/sort-outline.0fec4.svg\",\n \"sort\": \"icons/svg-library/sort.7e3d0.svg\",\n \"spare-lithium-batteries\": \"icons/svg-library/spare-lithium-batteries.36c51.svg\",\n \"sparkling-wine-block\": \"icons/svg-library/sparkling-wine-block.576cc.svg\",\n \"sparkling-wine-glass-block\": \"icons/svg-library/sparkling-wine-glass-block.33275.svg\",\n \"sparkling-wine-glass-outline\": \"icons/svg-library/sparkling-wine-glass-outline.a5e88.svg\",\n \"sparkling-wine-glass\": \"icons/svg-library/sparkling-wine-glass.e6452.svg\",\n \"sparkling-wine-outline\": \"icons/svg-library/sparkling-wine-outline.ae5b8.svg\",\n \"sparkling-wine\": \"icons/svg-library/sparkling-wine.02cc8.svg\",\n \"sports-equipment-block\": \"icons/svg-library/sports-equipment-block.f7949.svg\",\n \"sports-equipment-outline\": \"icons/svg-library/sports-equipment-outline.6fe06.svg\",\n \"sports-equipment\": \"icons/svg-library/sports-equipment.4e9f4.svg\",\n \"star-block\": \"icons/svg-library/star-block.d5e29.svg\",\n \"star-outline\": \"icons/svg-library/star-outline.df967.svg\",\n \"star\": \"icons/svg-library/star.f4c22.svg\",\n \"stopover-block\": \"icons/svg-library/stopover-block.94f27.svg\",\n \"stopover-outline\": \"icons/svg-library/stopover-outline.b9a0b.svg\",\n \"stopover\": \"icons/svg-library/stopover.ec881.svg\",\n \"subtitles-block\": \"icons/svg-library/subtitles-block.d920c.svg\",\n \"subtitles-outline\": \"icons/svg-library/subtitles-outline.52790.svg\",\n \"subtitles\": \"icons/svg-library/subtitles.e2538.svg\",\n \"surfboard-block\": \"icons/svg-library/surfboard-block.9af15.svg\",\n \"surfboard-outline\": \"icons/svg-library/surfboard-outline.5cb48.svg\",\n \"surfboard\": \"icons/svg-library/surfboard.5c577.svg\",\n \"sustainability-block\": \"icons/svg-library/sustainability-block.d3d1e.svg\",\n \"sustainability-outline\": \"icons/svg-library/sustainability-outline.e1c60.svg\",\n \"sustainability\": \"icons/svg-library/sustainability.61253.svg\",\n \"switch-flights-block\": \"icons/svg-library/switch-flights-block.c23b8.svg\",\n \"switch-flights-outline\": \"icons/svg-library/switch-flights-outline.27c46.svg\",\n \"switch-flights\": \"icons/svg-library/switch-flights.6a142.svg\",\n \"tablet-block\": \"icons/svg-library/tablet-block.524d4.svg\",\n \"tablet-outline\": \"icons/svg-library/tablet-outline.f8264.svg\",\n \"tablet\": \"icons/svg-library/tablet.d3056.svg\",\n \"tail-block\": \"icons/svg-library/tail-block.bf2e0.svg\",\n \"tail-outline\": \"icons/svg-library/tail-outline.3e1ab.svg\",\n \"tail\": \"icons/svg-library/tail.43aa2.svg\",\n \"taxi-block\": \"icons/svg-library/taxi-block.6df52.svg\",\n \"taxi-outline\": \"icons/svg-library/taxi-outline.150f4.svg\",\n \"taxi\": \"icons/svg-library/taxi.42f82.svg\",\n \"tazer-prohibited\": \"icons/svg-library/tazer-prohibited.41608.svg\",\n \"tazer\": \"icons/svg-library/tazer.6dd2d.svg\",\n \"tea-block\": \"icons/svg-library/tea-block.ff327.svg\",\n \"tea-outline\": \"icons/svg-library/tea-outline.e3d87.svg\",\n \"tea\": \"icons/svg-library/tea.abf73.svg\",\n \"three-block\": \"icons/svg-library/three-block.e2544.svg\",\n \"three-outline\": \"icons/svg-library/three-outline.8b12f.svg\",\n \"three\": \"icons/svg-library/three.10926.svg\",\n \"ticket-refund-block\": \"icons/svg-library/ticket-refund-block.f63a4.svg\",\n \"ticket-refund-outline\": \"icons/svg-library/ticket-refund-outline.934e1.svg\",\n \"ticket-refund\": \"icons/svg-library/ticket-refund.59c81.svg\",\n \"tier-points-block\": \"icons/svg-library/tier-points-block.133b2.svg\",\n \"tier-points-outline\": \"icons/svg-library/tier-points-outline.61e5b.svg\",\n \"tier-points\": \"icons/svg-library/tier-points.386f6.svg\",\n \"tier-progress-block\": \"icons/svg-library/tier-progress-block.a7a87.svg\",\n \"tier-progress-outline\": \"icons/svg-library/tier-progress-outline.590b8.svg\",\n \"tier-progress\": \"icons/svg-library/tier-progress.b42a9.svg\",\n \"tiktok-block\": \"icons/svg-library/tiktok-block.0986d.svg\",\n \"tiktok-outline\": \"icons/svg-library/tiktok-outline.7d069.svg\",\n \"tiktok\": \"icons/svg-library/tiktok.8bdf6.svg\",\n \"time-zone-block\": \"icons/svg-library/time-zone-block.6c067.svg\",\n \"time-zone-outline\": \"icons/svg-library/time-zone-outline.06849.svg\",\n \"time-zone\": \"icons/svg-library/time-zone.ec90c.svg\",\n \"timetable\": \"icons/svg-library/timetable.1978d.svg\",\n \"tools-and-blunt-instruments-prohibited\": \"icons/svg-library/tools-and-blunt-instruments-prohibited.ce756.svg\",\n \"tools-and-blunt-instruments\": \"icons/svg-library/tools-and-blunt-instruments.770c2.svg\",\n \"track-playing-block\": \"icons/svg-library/track-playing-block.58dfc.svg\",\n \"track-playing-outline\": \"icons/svg-library/track-playing-outline.b6f1f.svg\",\n \"track-playing\": \"icons/svg-library/track-playing.4036d.svg\",\n \"train-block\": \"icons/svg-library/train-block.482a5.svg\",\n \"train-outline\": \"icons/svg-library/train-outline.4ab0b.svg\",\n \"train\": \"icons/svg-library/train.cdb44.svg\",\n \"transfer-loader-block\": \"icons/svg-library/transfer-loader-block.ce557.svg\",\n \"transfer-loader-outline\": \"icons/svg-library/transfer-loader-outline.57c9a.svg\",\n \"transfer-loader\": \"icons/svg-library/transfer-loader.59b95.svg\",\n \"trash-block\": \"icons/svg-library/trash-block.110c2.svg\",\n \"trash-outline\": \"icons/svg-library/trash-outline.9cc52.svg\",\n \"trash\": \"icons/svg-library/trash.62e69.svg\",\n \"travel-documents-block\": \"icons/svg-library/travel-documents-block.f7abf.svg\",\n \"travel-documents-outline\": \"icons/svg-library/travel-documents-outline.3fc38.svg\",\n \"travel-documents\": \"icons/svg-library/travel-documents.071d1.svg\",\n \"travel-insurance-block\": \"icons/svg-library/travel-insurance-block.a8f17.svg\",\n \"travel-insurance-outline\": \"icons/svg-library/travel-insurance-outline.e98f0.svg\",\n \"travel-insurance\": \"icons/svg-library/travel-insurance.8121e.svg\",\n \"treats-block\": \"icons/svg-library/treats-block.b1f19.svg\",\n \"treats-outline\": \"icons/svg-library/treats-outline.ede72.svg\",\n \"treats\": \"icons/svg-library/treats.866fd.svg\",\n \"trending-arrow-up\": \"icons/svg-library/trending-arrow-up.4521d.svg\",\n \"twitter\": \"icons/svg-library/twitter.13171.svg\",\n \"two-block\": \"icons/svg-library/two-block.adc67.svg\",\n \"two-outline\": \"icons/svg-library/two-outline.1aab9.svg\",\n \"two\": \"icons/svg-library/two.519cf.svg\",\n \"update-block\": \"icons/svg-library/update-block.7e224.svg\",\n \"update-cart-block\": \"icons/svg-library/update-cart-block.385ea.svg\",\n \"update-cart-outline\": \"icons/svg-library/update-cart-outline.1c14b.svg\",\n \"update-cart\": \"icons/svg-library/update-cart.eeb72.svg\",\n \"update-outline\": \"icons/svg-library/update-outline.e9229.svg\",\n \"update\": \"icons/svg-library/update.59408.svg\",\n \"upgrade-block\": \"icons/svg-library/upgrade-block.d7d46.svg\",\n \"upgrade-outline\": \"icons/svg-library/upgrade-outline.996ae.svg\",\n \"upgrade\": \"icons/svg-library/upgrade.b24ac.svg\",\n \"upload-block\": \"icons/svg-library/upload-block.975ff.svg\",\n \"upload-outline\": \"icons/svg-library/upload-outline.8d6b3.svg\",\n \"upload\": \"icons/svg-library/upload.6c435.svg\",\n \"vat-receipt-download-block\": \"icons/svg-library/vat-receipt-download-block.3be38.svg\",\n \"vat-receipt-download-outline\": \"icons/svg-library/vat-receipt-download-outline.12813.svg\",\n \"vat-receipt-download\": \"icons/svg-library/vat-receipt-download.745c6.svg\",\n \"video-series-block\": \"icons/svg-library/video-series-block.c9232.svg\",\n \"video-series-outline\": \"icons/svg-library/video-series-outline.62ff6.svg\",\n \"video-series\": \"icons/svg-library/video-series.651d7.svg\",\n \"visible-block\": \"icons/svg-library/visible-block.d7914.svg\",\n \"visible-outline\": \"icons/svg-library/visible-outline.5a34e.svg\",\n \"visible\": \"icons/svg-library/visible.818ab.svg\",\n \"volume-block\": \"icons/svg-library/volume-block.47658.svg\",\n \"volume-low-block\": \"icons/svg-library/volume-low-block.1904b.svg\",\n \"volume-low-outline\": \"icons/svg-library/volume-low-outline.49702.svg\",\n \"volume-low\": \"icons/svg-library/volume-low.e4fae.svg\",\n \"volume-medium-block\": \"icons/svg-library/volume-medium-block.b9b4b.svg\",\n \"volume-medium-outline\": \"icons/svg-library/volume-medium-outline.b16cf.svg\",\n \"volume-medium\": \"icons/svg-library/volume-medium.f73cf.svg\",\n \"volume-mute-block\": \"icons/svg-library/volume-mute-block.f6303.svg\",\n \"volume-mute-outline\": \"icons/svg-library/volume-mute-outline.7c624.svg\",\n \"volume-mute\": \"icons/svg-library/volume-mute.22677.svg\",\n \"volume-outline\": \"icons/svg-library/volume-outline.e7b8a.svg\",\n \"volume\": \"icons/svg-library/volume.ed378.svg\",\n \"voucher-block\": \"icons/svg-library/voucher-block.58d7c.svg\",\n \"voucher-outline\": \"icons/svg-library/voucher-outline.6d79c.svg\",\n \"voucher\": \"icons/svg-library/voucher.d3fdd.svg\",\n \"wallet-closed-block\": \"icons/svg-library/wallet-closed-block.ecb56.svg\",\n \"wallet-closed-outline\": \"icons/svg-library/wallet-closed-outline.7d1e1.svg\",\n \"wallet-closed\": \"icons/svg-library/wallet-closed.43526.svg\",\n \"wallet-open-block\": \"icons/svg-library/wallet-open-block.1b7ad.svg\",\n \"wallet-open-outline\": \"icons/svg-library/wallet-open-outline.630fd.svg\",\n \"wallet-open\": \"icons/svg-library/wallet-open.24f7c.svg\",\n \"water-block\": \"icons/svg-library/water-block.a973b.svg\",\n \"water-outline\": \"icons/svg-library/water-outline.5da88.svg\",\n \"water\": \"icons/svg-library/water.01de8.svg\",\n \"wechat\": \"icons/svg-library/wechat.c2a97.svg\",\n \"weibo\": \"icons/svg-library/weibo.d89a9.svg\",\n \"wellbeing-block\": \"icons/svg-library/wellbeing-block.3aec2.svg\",\n \"wellbeing-outline\": \"icons/svg-library/wellbeing-outline.07a9c.svg\",\n \"wellbeing\": \"icons/svg-library/wellbeing.80c50.svg\",\n \"whatsapp-block\": \"icons/svg-library/whatsapp-block.88fe8.svg\",\n \"whatsapp-outline\": \"icons/svg-library/whatsapp-outline.b4923.svg\",\n \"whatsapp\": \"icons/svg-library/whatsapp.56a46.svg\",\n \"wifi-aircraft\": \"icons/svg-library/wifi-aircraft.62b42.svg\",\n \"wifi-block\": \"icons/svg-library/wifi-block.c74bb.svg\",\n \"wifi-low-block\": \"icons/svg-library/wifi-low-block.c5304.svg\",\n \"wifi-low-outline\": \"icons/svg-library/wifi-low-outline.f2f73.svg\",\n \"wifi-low\": \"icons/svg-library/wifi-low.eb494.svg\",\n \"wifi-medium-block\": \"icons/svg-library/wifi-medium-block.85fa6.svg\",\n \"wifi-medium-outline\": \"icons/svg-library/wifi-medium-outline.afad4.svg\",\n \"wifi-medium\": \"icons/svg-library/wifi-medium.cf041.svg\",\n \"wifi-offline-block\": \"icons/svg-library/wifi-offline-block.4aaae.svg\",\n \"wifi-offline-outline\": \"icons/svg-library/wifi-offline-outline.29d45.svg\",\n \"wifi-offline\": \"icons/svg-library/wifi-offline.ad9c9.svg\",\n \"wifi-outline\": \"icons/svg-library/wifi-outline.d6e55.svg\",\n \"wifi\": \"icons/svg-library/wifi.11b96.svg\",\n \"wine-block\": \"icons/svg-library/wine-block.8d8f9.svg\",\n \"wine-glass-block\": \"icons/svg-library/wine-glass-block.87b1f.svg\",\n \"wine-glass-outline\": \"icons/svg-library/wine-glass-outline.d4bc0.svg\",\n \"wine-glass\": \"icons/svg-library/wine-glass.08b8d.svg\",\n \"wine-outline\": \"icons/svg-library/wine-outline.ffb0e.svg\",\n \"wine\": \"icons/svg-library/wine.c196e.svg\",\n \"world-map-block\": \"icons/svg-library/world-map-block.81d19.svg\",\n \"world-map-outline\": \"icons/svg-library/world-map-outline.5242c.svg\",\n \"world-map\": \"icons/svg-library/world-map.26b40.svg\",\n \"x-block\": \"icons/svg-library/x-block.9030e.svg\",\n \"x-outline\": \"icons/svg-library/x-outline.133c4.svg\",\n \"x\": \"icons/svg-library/x.81102.svg\",\n \"youku\": \"icons/svg-library/youku.b307a.svg\",\n \"youtube\": \"icons/svg-library/youtube.765e8.svg\",\n \"zero-block\": \"icons/svg-library/zero-block.a97a6.svg\",\n \"zero-outline\": \"icons/svg-library/zero-outline.da712.svg\",\n \"zero\": \"icons/svg-library/zero.d00d2.svg\"\n },\n \"tails\": {\n \"tail_3k\": \"icons/tails/tail_3k.ec4b0.svg\",\n \"tail_6i\": \"icons/tails/tail_6i.47f81.svg\",\n \"tail_9w\": \"icons/tails/tail_9w.a57eb.svg\",\n \"tail_a3\": \"icons/tails/tail_a3.85854.svg\",\n \"tail_aa\": \"icons/tails/tail_aa.aa5da.svg\",\n \"tail_ab\": \"icons/tails/tail_ab.c7ead.svg\",\n \"tail_af\": \"icons/tails/tail_af.b8d23.svg\",\n \"tail_ai\": \"icons/tails/tail_ai.10f58.svg\",\n \"tail_as\": \"icons/tails/tail_as.fedd7.svg\",\n \"tail_at\": \"icons/tails/tail_at.5ebac.svg\",\n \"tail_ay\": \"icons/tails/tail_ay.e60e3.svg\",\n \"tail_az\": \"icons/tails/tail_az.fdd06.svg\",\n \"tail_b6\": \"icons/tails/tail_b6.502d4.svg\",\n \"tail_ba\": \"icons/tails/tail_ba.d4ed8.svg\",\n \"tail_br\": \"icons/tails/tail_br.24bc5.svg\",\n \"tail_bt\": \"icons/tails/tail_bt.16bd6.svg\",\n \"tail_bus\": \"icons/tails/tail_bus.6f3d3.svg\",\n \"tail_ca\": \"icons/tails/tail_ca.d3036.svg\",\n \"tail_ci\": \"icons/tails/tail_ci.d1a9b.svg\",\n \"tail_cx\": \"icons/tails/tail_cx.587bd.svg\",\n \"tail_cz\": \"icons/tails/tail_cz.bbc0b.svg\",\n \"tail_dx\": \"icons/tails/tail_dx.9b24d.svg\",\n \"tail_ei\": \"icons/tails/tail_ei.0522f.svg\",\n \"tail_ek\": \"icons/tails/tail_ek.86a9e.svg\",\n \"tail_et\": \"icons/tails/tail_et.ed1ea.svg\",\n \"tail_fi\": \"icons/tails/tail_fi.f3401.svg\",\n \"tail_fj\": \"icons/tails/tail_fj.dfd5b.svg\",\n \"tail_ga\": \"icons/tails/tail_ga.36ec4.svg\",\n \"tail_gl\": \"icons/tails/tail_gl.95cfc.svg\",\n \"tail_ho\": \"icons/tails/tail_ho.f23d3.svg\",\n \"tail_hu\": \"icons/tails/tail_hu.fbfb3.svg\",\n \"tail_ib\": \"icons/tails/tail_ib.8f7cb.svg\",\n \"tail_ig\": \"icons/tails/tail_ig.324f0.svg\",\n \"tail_jl\": \"icons/tails/tail_jl.721aa.svg\",\n \"tail_jp\": \"icons/tails/tail_jp.d8c68.svg\",\n \"tail_jq\": \"icons/tails/tail_jq.111e4.svg\",\n \"tail_ju\": \"icons/tails/tail_ju.6f1dd.svg\",\n \"tail_ka\": \"icons/tails/tail_ka.6f241.svg\",\n \"tail_ke\": \"icons/tails/tail_ke.3ca81.svg\",\n \"tail_kl\": \"icons/tails/tail_kl.1c77c.svg\",\n \"tail_km\": \"icons/tails/tail_km.2d3d6.svg\",\n \"tail_la\": \"icons/tails/tail_la.714a1.svg\",\n \"tail_lg\": \"icons/tails/tail_lg.628c2.svg\",\n \"tail_lh\": \"icons/tails/tail_lh.7bed4.svg\",\n \"tail_lm\": \"icons/tails/tail_lm.cddbe.svg\",\n \"tail_lo\": \"icons/tails/tail_lo.e384a.svg\",\n \"tail_lx\": \"icons/tails/tail_lx.8cbdc.svg\",\n \"tail_mh\": \"icons/tails/tail_mh.03a1b.svg\",\n \"tail_mi\": \"icons/tails/tail_mi.d9604.svg\",\n \"tail_mu\": \"icons/tails/tail_mu.65e0b.svg\",\n \"tail_nt\": \"icons/tails/tail_nt.108eb.svg\",\n \"tail_nz\": \"icons/tails/tail_nz.a38c8.svg\",\n \"tail_ok\": \"icons/tails/tail_ok.d5b5b.svg\",\n \"tail_oo\": \"icons/tails/tail_oo.0dad8.svg\",\n \"tail_os\": \"icons/tails/tail_os.babff.svg\",\n \"tail_ou\": \"icons/tails/tail_ou.ac83f.svg\",\n \"tail_oz\": \"icons/tails/tail_oz.30d6f.svg\",\n \"tail_pg\": \"icons/tails/tail_pg.63874.svg\",\n \"tail_pr\": \"icons/tails/tail_pr.bb616.svg\",\n \"tail_ps\": \"icons/tails/tail_ps.5e65d.svg\",\n \"tail_qf\": \"icons/tails/tail_qf.2f861.svg\",\n \"tail_qr\": \"icons/tails/tail_qr.33c7c.svg\",\n \"tail_rj\": \"icons/tails/tail_rj.bd40f.svg\",\n \"tail_s7\": \"icons/tails/tail_s7.15d85.svg\",\n \"tail_sb\": \"icons/tails/tail_sb.5e4ce.svg\",\n \"tail_sk\": \"icons/tails/tail_sk.a0b42.svg\",\n \"tail_sn\": \"icons/tails/tail_sn.927b1.svg\",\n \"tail_sq\": \"icons/tails/tail_sq.f6267.svg\",\n \"tail_su\": \"icons/tails/tail_su.52319.svg\",\n \"tail_sv\": \"icons/tails/tail_sv.46133.svg\",\n \"tail_tf\": \"icons/tails/tail_tf.2955b.svg\",\n \"tail_tg\": \"icons/tails/tail_tg.d67db.svg\",\n \"tail_tk\": \"icons/tails/tail_tk.f158a.svg\",\n \"tail_tn\": \"icons/tails/tail_tn.498ba.svg\",\n \"tail_tp\": \"icons/tails/tail_tp.c01ed.svg\",\n \"tail_trn\": \"icons/tails/tail_trn.f0fcc.svg\",\n \"tail_uk\": \"icons/tails/tail_uk.04e83.svg\",\n \"tail_ul\": \"icons/tails/tail_ul.45c98.svg\",\n \"tail_vn\": \"icons/tails/tail_vn.ad68f.svg\",\n \"tail_wf\": \"icons/tails/tail_wf.119c7.svg\",\n \"tail_wy\": \"icons/tails/tail_wy.244cc.svg\"\n }\n};\n\nmodule.exports.styles = {\n \"index\": \"styles/index.4adab.css\"\n};\n\nmodule.exports.fonts = {\n \"FinnairSans\": {\n \"ttf\": [\n \"fonts/FinnairSans/FinnairSans-Black.ttf\",\n \"fonts/FinnairSans/FinnairSans-BlackItalic.ttf\",\n \"fonts/FinnairSans/FinnairSans-Bold.ttf\",\n \"fonts/FinnairSans/FinnairSans-BoldItalic.ttf\",\n \"fonts/FinnairSans/FinnairSans-Italic.ttf\",\n \"fonts/FinnairSans/FinnairSans-Light.ttf\",\n \"fonts/FinnairSans/FinnairSans-LightItalic.ttf\",\n \"fonts/FinnairSans/FinnairSans-Medium.ttf\",\n \"fonts/FinnairSans/FinnairSans-MediumItalic.ttf\",\n \"fonts/FinnairSans/FinnairSans-Regular.ttf\"\n ],\n \"woff\": [\n \"fonts/FinnairSans/FinnairSans-Black.woff\",\n \"fonts/FinnairSans/FinnairSans-BlackItalic.woff\",\n \"fonts/FinnairSans/FinnairSans-Bold.woff\",\n \"fonts/FinnairSans/FinnairSans-BoldItalic.woff\",\n \"fonts/FinnairSans/FinnairSans-Italic.woff\",\n \"fonts/FinnairSans/FinnairSans-Light.woff\",\n \"fonts/FinnairSans/FinnairSans-LightItalic.woff\",\n \"fonts/FinnairSans/FinnairSans-Medium.woff\",\n \"fonts/FinnairSans/FinnairSans-MediumItalic.woff\",\n \"fonts/FinnairSans/FinnairSans-Regular.woff\"\n ],\n \"woff2\": [\n \"fonts/FinnairSans/FinnairSans-Black.woff2\",\n \"fonts/FinnairSans/FinnairSans-BlackItalic.woff2\",\n \"fonts/FinnairSans/FinnairSans-Bold.woff2\",\n \"fonts/FinnairSans/FinnairSans-BoldItalic.woff2\",\n \"fonts/FinnairSans/FinnairSans-Italic.woff2\",\n \"fonts/FinnairSans/FinnairSans-Light.woff2\",\n \"fonts/FinnairSans/FinnairSans-LightItalic.woff2\",\n \"fonts/FinnairSans/FinnairSans-Medium.woff2\",\n \"fonts/FinnairSans/FinnairSans-MediumItalic.woff2\",\n \"fonts/FinnairSans/FinnairSans-Regular.woff2\"\n ]\n }\n};\n\nmodule.exports.breakpoints = {\n \"mobile\": \"320px\",\n \"tablet\": \"600px\",\n \"laptop\": \"1024px\",\n \"desktop\": \"1600px\"\n};","import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","import { Selector, select } from '@ngrx/store';\nimport { Observable, pipe } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { isPresent } from '@fcom/core/utils';\n\nexport type StateSelector = Selector, Observable>;\n\nexport function safeSelect(mapFn: (state: T) => K): (source$: Observable) => Observable {\n return pipe(select(mapFn), filter(isPresent));\n}\n","\n \n
    \n \n \n \n \n
    \n
    \n {{\n 'navigation.login' | finLocalization\n }}\n {{\n 'loginWidget.loginText' | finLocalization\n }}\n \n
    \n
    \n {{\n 'loginWidget.joinTitle' | finLocalization\n }}\n {{\n 'loginWidget.joinText' | finLocalization\n }}\n \n \n
    \n
    \n
    \n \n\n","import { Component, ElementRef, HostListener, Inject, Input, OnInit } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, filter, Observable, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { ButtonTheme, PopoverService } from '@fcom/ui-components';\nimport { LoginStatus, LoginStep, Profile, ProfileTier } from '@fcom/core-api/login';\nimport { loginStatus, profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { AppState, ConfigService } from '@fcom/core';\nimport { addClass, removeClass } from '@fcom/core/utils';\nimport { finShare, keepState } from '@fcom/rx';\nimport { LoginActions } from '@fcom/core/actions';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport { JoinService, LoginService } from '../../services';\nimport { ElementActions, ElementTypes, GaContext, onOpenGtmEvent } from '../../../interfaces';\n\nconst STEP_CHANGE_TRANSITION_DURATION_MS = 500;\n\nexport enum LoginWidgetContext {\n PORTAL = 'portal',\n BOOKING = 'booking',\n MMB = 'mmb',\n}\n\n@Component({\n selector: 'fin-login-widget',\n templateUrl: './login-widget.component.html',\n styleUrls: ['./login-widget.component.scss'],\n})\nexport class LoginWidgetComponent implements OnInit {\n readonly LoginStatus = LoginStatus;\n readonly ButtonTheme = ButtonTheme;\n readonly loginStatus$: Observable;\n readonly LoginWidgetContext = LoginWidgetContext;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly darkBackgroundTiers = [\n ProfileTier.SILVER,\n ProfileTier.GOLD,\n ProfileTier.PLATINUM,\n ProfileTier.LUMO,\n ProfileTier.CORPORATE,\n ];\n\n @Input()\n context: LoginWidgetContext = LoginWidgetContext.PORTAL;\n\n profile$: Observable;\n isOpen$: BehaviorSubject = new BehaviorSubject(false);\n widgetInDom$: Observable;\n subscription = new Subscription();\n darkBg$: Observable;\n\n constructor(\n private store$: Store,\n private elementRef: ElementRef,\n private loginService: LoginService,\n private joinService: JoinService,\n private configService: ConfigService,\n private popoverService: PopoverService,\n private gtmService: GtmService,\n @Inject(DOCUMENT) private document: Document\n ) {\n this.loginStatus$ = this.store$.pipe(loginStatus(), finShare());\n this.widgetInDom$ = this.isOpen$.pipe(keepState(STEP_CHANGE_TRANSITION_DURATION_MS));\n }\n\n ngOnInit(): void {\n this.profile$ = this.store$.pipe(profileOrUndefinedIfNotLoggedIn(), finShare());\n this.darkBg$ = this.profile$.pipe(map((userProfile) => this.darkBackgroundTiers.includes(userProfile?.tier)));\n this.subscription.add(\n this.popoverService.popoverOpen$.pipe(filter(Boolean)).subscribe(() => {\n this.close();\n })\n );\n }\n\n open(): void {\n this.popoverService.close();\n this.isOpen$.next(true);\n addClass(this.document.body, 'overflow-hidden-tablet-down');\n }\n\n close(): void {\n this.isOpen$.next(false);\n removeClass(this.document.body, 'overflow-hidden-tablet-down');\n }\n\n redirectToLogin(): void {\n if (this.configService.cfg.enableLoginDialog) {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n this.close();\n } else {\n this.loginService.redirectToLogin();\n }\n }\n\n redirectToJoin(): void {\n if (this.configService.cfg.enableJoinDialog) {\n this.gtmService.trackElement(\n `join-form-open-${onOpenGtmEvent}`,\n GaContext.FINNAIR_PLUS,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n\n this.joinService.joinDialogOpen$.next(true);\n this.close();\n } else {\n this.loginService.redirectToJoin();\n }\n }\n\n @HostListener('document:click', ['$event'])\n clickout(event: Event): void {\n if (!this.elementRef.nativeElement.contains(event.target)) {\n this.close();\n }\n }\n}\n","import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/* tslint:disable:max-line-length */\nexport function exhaustMap>(\n project: (value: T, index: number) => O\n): OperatorFunction>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function exhaustMap>(\n project: (value: T, index: number) => O,\n resultSelector: undefined\n): OperatorFunction>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function exhaustMap(\n project: (value: T, index: number) => ObservableInput,\n resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R\n): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable only if the previous projected Observable has completed.\n *\n * Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link exhaustAll}.\n *\n * ![](exhaustMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. When it projects a source value to\n * an Observable, the output Observable begins emitting the items emitted by\n * that projected Observable. However, `exhaustMap` ignores every new projected\n * Observable if the previous projected Observable has not yet completed. Once\n * that one completes, it will accept and flatten the next projected Observable\n * and repeat this process.\n *\n * ## Example\n *\n * Run a finite timer for each click, only if there is no currently active timer\n *\n * ```ts\n * import { fromEvent, exhaustMap, interval, take } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(\n * exhaustMap(() => interval(1000).pipe(take(5)))\n * );\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMap}\n * @see {@link exhaust}\n * @see {@link mergeMap}\n * @see {@link switchMap}\n *\n * @param project A function that, when applied to an item emitted by the source\n * Observable, returns an Observable.\n * @return A function that returns an Observable containing projected\n * Observables of each item of the source, ignoring projected Observables that\n * start before their preceding Observable has completed.\n */\nexport function exhaustMap>(\n project: (value: T, index: number) => O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R\n): OperatorFunction | R> {\n if (resultSelector) {\n // DEPRECATED PATH\n return (source: Observable) =>\n source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b: any, ii: any) => resultSelector(a, b, i, ii)))));\n }\n return operate((source, subscriber) => {\n let index = 0;\n let innerSub: Subscriber | null = null;\n let isComplete = false;\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (outerValue) => {\n if (!innerSub) {\n innerSub = createOperatorSubscriber(subscriber, undefined, () => {\n innerSub = null;\n isComplete && subscriber.complete();\n });\n innerFrom(project(outerValue, index++)).subscribe(innerSub);\n }\n },\n () => {\n isComplete = true;\n !innerSub && subscriber.complete();\n }\n )\n );\n });\n}\n","\n \n

    \n {{ 'towardsSustainability.mainHeader' | finLocalization }}\n

    \n\n
    \n
    \n \n {{ title }}\n \n

    \n {{ 'towardsSustainability.readMore' | finLocalization }}\n
    \n
    \n
    \n {{ 'towardsSustainability.infographic.text' | finLocalization }}\n\n {{\n 'towardsSustainability.infographic.percentage' | finLocalization\n }}\n\n
    \n {{ 'towardsSustainability.infographic.details' | finLocalization }}\n \n \n \n
    \n
    \n
    \n
    \n\n \n

    {{ 'towardsSustainability.tooltip.title' | finLocalization }}

    \n

    \n {{ 'towardsSustainability.tooltip.text' | finLocalization }}\n

    \n
    \n
    \n
    \n","import { OnInit, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { GtmService } from '@fcom/common/gtm';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { FragmentService } from '@fcom/common/services';\nimport { CmsArticle } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-sustainability-review-card',\n templateUrl: 'sustainability-review-card.component.html',\n styleUrls: ['sustainability-review-card.component.scss'],\n})\nexport class SustainabilityReviewCardComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n towardsSustainabilityMessage$: Observable;\n\n @Input()\n headerClass = 'font-heading-3';\n\n @Input()\n showHeader = true;\n\n @Input()\n isLinkExternal = false;\n\n constructor(\n private fragmentService: FragmentService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.towardsSustainabilityMessage$ = this.fragmentService.getFragment(\n 'fragments.towardsSustainability.url'\n );\n }\n\n trackReadAboutSustainability(): void {\n this.gtmService.trackElement(\n 'booking-confirmed-read-more-about-sustainability',\n GaContext.BOOKING_FLOW,\n ElementTypes.LINK,\n undefined,\n ElementActions.CLICK\n );\n }\n}\n","import { Observable } from '../Observable';\nimport { ObservedValueOf, ObservableInput } from '../types';\nimport { innerFrom } from './innerFrom';\n\n/**\n * Creates an Observable that, on subscribe, calls an Observable factory to\n * make an Observable for each new Observer.\n *\n * Creates the Observable lazily, that is, only when it\n * is subscribed.\n * \n *\n * ![](defer.png)\n *\n * `defer` allows you to create an Observable only when the Observer\n * subscribes. It waits until an Observer subscribes to it, calls the given\n * factory function to get an Observable -- where a factory function typically\n * generates a new Observable -- and subscribes the Observer to this Observable.\n * In case the factory function returns a falsy value, then EMPTY is used as\n * Observable instead. Last but not least, an exception during the factory\n * function call is transferred to the Observer by calling `error`.\n *\n * ## Example\n *\n * Subscribe to either an Observable of clicks or an Observable of interval, at random\n *\n * ```ts\n * import { defer, fromEvent, interval } from 'rxjs';\n *\n * const clicksOrInterval = defer(() => {\n * return Math.random() > 0.5\n * ? fromEvent(document, 'click')\n * : interval(1000);\n * });\n * clicksOrInterval.subscribe(x => console.log(x));\n *\n * // Results in the following behavior:\n * // If the result of Math.random() is greater than 0.5 it will listen\n * // for clicks anywhere on the \"document\"; when document is clicked it\n * // will log a MouseEvent object to the console. If the result is less\n * // than 0.5 it will emit ascending numbers, one every second(1000ms).\n * ```\n *\n * @see {@link Observable}\n *\n * @param observableFactory The Observable factory function to invoke for each\n * Observer that subscribes to the output Observable. May also return any\n * `ObservableInput`, which will be converted on the fly to an Observable.\n * @return An Observable whose Observers' subscriptions trigger an invocation of the\n * given Observable factory function.\n */\nexport function defer>(observableFactory: () => R): Observable> {\n return new Observable>((subscriber) => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","import { Directive, HostListener, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Subject, Subscription } from 'rxjs';\nimport { throttleTime } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { ElementTypes, ElementActions, GaContext } from '../../interfaces';\nimport { GtmService } from '../services/gtm.service';\n\n@Directive({\n selector: '[finElemTracker]',\n})\nexport class ElementTrackerDirective implements OnInit, OnDestroy {\n @Input()\n finElemTracker: string;\n @Input()\n finElemContext: string;\n @Input()\n finElemType: ElementTypes;\n @Input()\n finElemIndex: number;\n @Input()\n finElemState: string;\n\n subscriptions: Subscription = new Subscription();\n\n private eventSubject = new Subject();\n private eventObservable = this.eventSubject.asObservable().pipe(throttleTime(2000));\n\n constructor(private gtmService: GtmService) {}\n\n @HostListener('click', ['$event'])\n onClick(event): void {\n if (this.finElemType && this.finElemTracker && this.finElemType !== ElementTypes.INPUT) {\n this.eventSubject.next(event);\n }\n }\n\n @HostListener('blur', ['$event'])\n onBlur(event): void {\n // If tracked element is a fin-input-field (text input) we want to track the blur\n // instead of click meaning the inputting has finished and user moves on\n if (this.finElemType && this.finElemTracker && this.finElemType === ElementTypes.INPUT) {\n this.eventSubject.next(event);\n }\n }\n\n ngOnInit(): void {\n this.subscriptions.add(this.eventObservable.subscribe((event) => this.handleEvent(event)));\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n handleEvent(_event: unknown): void {\n this.gtmService.trackElement(\n this.finElemTracker,\n this.finElemContext ?? GaContext.NO_CONTEXT,\n this.finElemType,\n this.finElemState,\n ElementActions.CLICK\n );\n }\n}\n","export enum TextInputType {\n INPUT = 'input',\n TEXTAREA = 'textarea',\n}\n\nexport enum InputType {\n TEXT = 'text',\n PASSWORD = 'password',\n NUMBER = 'number',\n}\n\nexport enum CheckBoxTheme {\n SQUARE = 'square',\n ROUNDED = 'rounded',\n}\n\nexport enum RadioButtonTheme {\n BOX = 'box',\n ROUND = 'round',\n}\n\nexport enum CursorType {\n POINTER = 'pointer',\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { IconComponent } from './icon/icon.component';\nimport { GenericIconComponent } from './generic-icon/generic-icon.component';\nimport { IconsConfig } from './icons.config';\n\n@NgModule({\n declarations: [GenericIconComponent, IconComponent],\n imports: [CommonModule, UiTranslateModule],\n exports: [GenericIconComponent, IconComponent],\n})\nexport class IconsModule {\n static forRoot(config?: IconsConfig): ModuleWithProviders {\n return {\n ngModule: IconsModule,\n providers: [{ provide: IconsConfig, useValue: config }],\n };\n }\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairAirBoundsChangeRequest } from '../models/finnair-air-bounds-change-request';\nimport { FinnairAirBoundsChangeResponse } from '../models/finnair-air-bounds-change-response';\nimport { FinnairAirCalendarChangeListResponse } from '../models/finnair-air-calendar-change-list-response';\nimport { FinnairCalendarChangeRequest } from '../models/finnair-calendar-change-request';\n\n\n/**\n * Offer change api resource\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class OffersChangesService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation findAirBoundsChange\n */\n static readonly FindAirBoundsChangePath = '/api/change/{orderId}/airBounds';\n\n /**\n * findAirBoundChange.\n *\n * Returns the offers for the PNR and requested bound given\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findAirBoundsChange()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirBoundsChange$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairAirBoundsChangeRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersChangesService.FindAirBoundsChangePath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findAirBoundChange.\n *\n * Returns the offers for the PNR and requested bound given\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findAirBoundsChange$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirBoundsChange(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairAirBoundsChangeRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.findAirBoundsChange$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairAirBoundsChangeResponse)\n );\n }\n\n /**\n * Path part for operation findAirCalendarChange\n */\n static readonly FindAirCalendarChangePath = '/api/change/{orderId}/calendar';\n\n /**\n * findAirCalendarChange.\n *\n * Returns the calendar matrix for the PNR and request given\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findAirCalendarChange()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirCalendarChange$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairCalendarChangeRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersChangesService.FindAirCalendarChangePath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findAirCalendarChange.\n *\n * Returns the calendar matrix for the PNR and request given\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findAirCalendarChange$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirCalendarChange(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairCalendarChangeRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.findAirCalendarChange$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairAirCalendarChangeListResponse)\n );\n }\n\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairSearchMoreFlightsParameters } from '../models/finnair-search-more-flights-parameters';\nimport { FinnairSearchParameters } from '../models/finnair-search-parameters';\nimport { MultiOfferList } from '../models/multi-offer-list';\n\n\n/**\n * Multicity offer api resource\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class OffersMultiService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation findMoreFlights\n */\n static readonly FindMoreFlightsPath = '/api/multi/moreFlights';\n\n /**\n * findMoreFlights.\n *\n * Find more flight offers for given offer id and bound\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findMoreFlights()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findMoreFlights$Response(rootUrl: string, params: {\n hash: string;\n body: FinnairSearchMoreFlightsParameters\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersMultiService.FindMoreFlightsPath, 'post');\n\n if (params) {\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findMoreFlights.\n *\n * Find more flight offers for given offer id and bound\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findMoreFlights$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findMoreFlights(rootUrl: string, params: {\n hash: string;\n body: FinnairSearchMoreFlightsParameters\n },\n context?: HttpContext\n\n): Observable {\n return this.findMoreFlights$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as MultiOfferList)\n );\n }\n\n /**\n * Path part for operation findMultiOfferList\n */\n static readonly FindMultiOfferListPath = '/api/multi/offerList';\n\n /**\n * findMultiOfferList.\n *\n * Find flight offers for multi city trip given origins, destinations, dates and travelers\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findMultiOfferList()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findMultiOfferList$Response(rootUrl: string, params: {\n body: FinnairSearchParameters\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersMultiService.FindMultiOfferListPath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findMultiOfferList.\n *\n * Find flight offers for multi city trip given origins, destinations, dates and travelers\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findMultiOfferList$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findMultiOfferList(rootUrl: string, params: {\n body: FinnairSearchParameters\n },\n context?: HttpContext\n\n): Observable {\n return this.findMultiOfferList$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as MultiOfferList)\n );\n }\n\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairAlternativeOffers } from '../models/finnair-alternative-offers';\n\n\n/**\n * Offer self reac api resource\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class OffersSelfReaccService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation disruptionAlternativeOffers\n */\n static readonly DisruptionAlternativeOffersPath = '/api/offer/{orderId}/disruption-rebooking/alternatives';\n\n /**\n * disruptionAlternativeOffers.\n *\n * Fetch alternative offers for a disrupted Order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `disruptionAlternativeOffers()` instead.\n *\n * This method doesn't expect any request body.\n */\n disruptionAlternativeOffers$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n boundSearchDate?: string;\n secondBoundSearchDate?: string;\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersSelfReaccService.DisruptionAlternativeOffersPath, 'get');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.query('boundSearchDate', params.boundSearchDate, {});\n rb.query('secondBoundSearchDate', params.secondBoundSearchDate, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse<{\n [key: string]: FinnairAlternativeOffers;\n }>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * disruptionAlternativeOffers.\n *\n * Fetch alternative offers for a disrupted Order\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `disruptionAlternativeOffers$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n disruptionAlternativeOffers(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n boundSearchDate?: string;\n secondBoundSearchDate?: string;\n },\n context?: HttpContext\n\n): Observable<{\n[key: string]: FinnairAlternativeOffers;\n}> {\n return this.disruptionAlternativeOffers$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<{\n[key: string]: FinnairAlternativeOffers;\n}>) => r.body as {\n[key: string]: FinnairAlternativeOffers;\n})\n );\n }\n\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { AirCalendarList } from '../models/air-calendar-list';\nimport { FinnairAirBoundsRequest } from '../models/finnair-air-bounds-request';\nimport { FinnairAirBoundsResponse } from '../models/finnair-air-bounds-response';\nimport { FinnairSearchParameters } from '../models/finnair-search-parameters';\nimport { OfferList } from '../models/offer-list';\n\n\n/**\n * Offer api resource\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class OffersService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation findAirBounds\n */\n static readonly FindAirBoundsPath = '/api/airBounds';\n\n /**\n * findAirBounds.\n *\n * Finds air bounds with given search parameters\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findAirBounds()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirBounds$Response(rootUrl: string, params: {\n body: FinnairAirBoundsRequest\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersService.FindAirBoundsPath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findAirBounds.\n *\n * Finds air bounds with given search parameters\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findAirBounds$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirBounds(rootUrl: string, params: {\n body: FinnairAirBoundsRequest\n },\n context?: HttpContext\n\n): Observable {\n return this.findAirBounds$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as FinnairAirBoundsResponse)\n );\n }\n\n /**\n * Path part for operation findAirCalendar\n */\n static readonly FindAirCalendarPath = '/api/airCalendar';\n\n /**\n * findAirCalendar.\n *\n * Find flight offers for given origin, destination, dates and travelers\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findAirCalendar()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirCalendar$Response(rootUrl: string, params: {\n body: FinnairSearchParameters\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersService.FindAirCalendarPath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findAirCalendar.\n *\n * Find flight offers for given origin, destination, dates and travelers\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findAirCalendar$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findAirCalendar(rootUrl: string, params: {\n body: FinnairSearchParameters\n },\n context?: HttpContext\n\n): Observable {\n return this.findAirCalendar$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as AirCalendarList)\n );\n }\n\n /**\n * Path part for operation findOfferList\n */\n static readonly FindOfferListPath = '/api/offerList';\n\n /**\n * findOfferList.\n *\n * Find flight offers for given origin, destination, dates and travelers\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `findOfferList()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findOfferList$Response(rootUrl: string, params: {\n body: FinnairSearchParameters\n },\n context?: HttpContext\n\n): Observable> {\n const rb = new DapiRequestBuilder(rootUrl, OffersService.FindOfferListPath, 'post');\n\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse) => {\n return r as DapiHttpResponse;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * findOfferList.\n *\n * Find flight offers for given origin, destination, dates and travelers\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `findOfferList$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n findOfferList(rootUrl: string, params: {\n body: FinnairSearchParameters\n },\n context?: HttpContext\n\n): Observable {\n return this.findOfferList$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse) => r.body as OfferList)\n );\n }\n\n}\n","export const REGISTERED_ACTION_TYPES: { [actionType: string]: number } = {};\n\nexport function resetRegisteredActionTypes() {\n for (const key of Object.keys(REGISTERED_ACTION_TYPES)) {\n delete REGISTERED_ACTION_TYPES[key];\n }\n}\n","import {\n Creator,\n ActionCreator,\n TypedAction,\n FunctionWithParametersType,\n NotAllowedCheck,\n ActionCreatorProps,\n NotAllowedInPropsCheck,\n} from './models';\nimport { REGISTERED_ACTION_TYPES } from './globals';\n\n// Action creators taken from ts-action library and modified a bit to better\n// fit current NgRx usage. Thank you Nicholas Jamieson (@cartant).\n\nexport function createAction(\n type: T\n): ActionCreator TypedAction>;\nexport function createAction(\n type: T,\n config: ActionCreatorProps

    & NotAllowedCheck

    \n): ActionCreator) => P & TypedAction>;\nexport function createAction<\n T extends string,\n P extends any[],\n R extends object\n>(\n type: T,\n creator: Creator>\n): FunctionWithParametersType> & TypedAction;\n/**\n * @description\n * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.\n *\n * Action creators reduce the explicitness of class-based action creators.\n *\n * @param type Describes the action that will be dispatched\n * @param config Additional metadata needed for the handling of the action. See {@link createAction#usage-notes Usage Notes}.\n *\n * @usageNotes\n *\n * **Declaring an action creator**\n *\n * Without additional metadata:\n * ```ts\n * export const increment = createAction('[Counter] Increment');\n * ```\n * With additional metadata:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * props<{ user: User }>()\n * );\n * ```\n * With a function:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * (response: Response) => response.user\n * );\n * ```\n *\n * **Dispatching an action**\n *\n * Without additional metadata:\n * ```ts\n * store.dispatch(increment());\n * ```\n * With additional metadata:\n * ```ts\n * store.dispatch(loginSuccess({ user: newUser }));\n * ```\n *\n * **Referencing an action in a reducer**\n *\n * Using a switch statement:\n * ```ts\n * switch (action.type) {\n * // ...\n * case AuthApiActions.loginSuccess.type: {\n * return {\n * ...state,\n * user: action.user\n * };\n * }\n * }\n * ```\n * Using a reducer creator:\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n *\n * **Referencing an action in an effect**\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(AuthApiActions.loginSuccess),\n * // ...\n * )\n * );\n * ```\n */\nexport function createAction(\n type: T,\n config?: { _as: 'props' } | C\n): ActionCreator {\n REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;\n\n if (typeof config === 'function') {\n return defineType(type, (...args: any[]) => ({\n ...config(...args),\n type,\n }));\n }\n const as = config ? config._as : 'empty';\n switch (as) {\n case 'empty':\n return defineType(type, () => ({ type }));\n case 'props':\n return defineType(type, (props: object) => ({\n ...props,\n type,\n }));\n default:\n throw new Error('Unexpected config.');\n }\n}\n\nexport function props<\n P extends SafeProps,\n SafeProps = NotAllowedInPropsCheck

    \n>(): ActionCreatorProps

    {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return { _as: 'props', _p: undefined! };\n}\n\nexport function union<\n C extends { [key: string]: ActionCreator }\n>(creators: C): ReturnType {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return undefined!;\n}\n\nfunction defineType(\n type: T,\n creator: Creator\n): ActionCreator {\n return Object.defineProperty(creator, 'type', {\n value: type,\n writable: false,\n }) as ActionCreator;\n}\n","import { createAction, props } from './action_creator';\nimport {\n ActionCreator,\n ActionCreatorProps,\n Creator,\n FunctionWithParametersType,\n NotAllowedCheck,\n TypedAction,\n} from './models';\nimport { capitalize, uncapitalize } from './helpers';\n\ntype Join<\n Str extends string,\n Separator extends string = ' '\n> = Str extends `${infer First}${Separator}${infer Rest}`\n ? Join<`${First}${Rest}`, Separator>\n : Str;\n\ntype CapitalizeWords =\n Str extends `${infer First} ${infer Rest}`\n ? `${Capitalize} ${CapitalizeWords}`\n : Capitalize;\n\ntype StringLiteralCheck<\n Str extends string,\n Name extends string\n> = string extends Str ? `${Name} must be a string literal type` : unknown;\n\ntype UniqueEventNameCheck<\n EventNames extends string,\n EventName extends string\n> = ActionName extends ActionName>\n ? `${ActionName} action is already defined`\n : unknown;\n\ntype NotAllowedEventPropsCheck<\n PropsCreator extends ActionCreatorProps | Creator\n> = PropsCreator extends ActionCreatorProps\n ? Props extends void\n ? unknown\n : NotAllowedCheck\n : PropsCreator extends Creator\n ? NotAllowedCheck\n : unknown;\n\ntype EventCreator<\n PropsCreator extends ActionCreatorProps | Creator,\n Type extends string\n> = PropsCreator extends ActionCreatorProps\n ? void extends Props\n ? ActionCreator TypedAction>\n : ActionCreator<\n Type,\n (\n props: Props & NotAllowedCheck\n ) => Props & TypedAction\n >\n : PropsCreator extends Creator\n ? FunctionWithParametersType<\n Props,\n Result & NotAllowedCheck & TypedAction\n > &\n TypedAction\n : never;\n\ntype ActionName = Uncapitalize<\n Join>\n>;\n\ninterface ActionGroupConfig<\n Source extends string,\n Events extends Record | Creator>\n> {\n source: Source & StringLiteralCheck;\n events: Events & {\n [EventName in keyof Events]: StringLiteralCheck<\n EventName & string,\n 'event name'\n > &\n UniqueEventNameCheck &\n NotAllowedEventPropsCheck;\n };\n}\n\ntype ActionGroup<\n Source extends string,\n Events extends Record | Creator>\n> = {\n [EventName in keyof Events as ActionName]: EventCreator<\n Events[EventName],\n `[${Source}] ${EventName & string}`\n >;\n};\n\n/**\n * @description\n * A function that creates a group of action creators with the same source.\n *\n * @param config An object that contains a source and dictionary of events.\n * An event is a key-value pair of an event name and event props.\n * @returns A dictionary of action creators.\n * The name of each action creator is created by camel casing the event name.\n * The type of each action is created using the \"[Source] Event Name\" pattern.\n *\n * @usageNotes\n *\n * ```ts\n * const authApiActions = createActionGroup({\n * source: 'Auth API',\n * events: {\n * // defining events with payload using the `props` function\n * 'Login Success': props<{ userId: number; token: string }>(),\n * 'Login Failure': props<{ error: string }>(),\n *\n * // defining an event without payload using the `emptyProps` function\n * 'Logout Success': emptyProps(),\n *\n * // defining an event with payload using the props factory\n * 'Logout Failure': (error: Error) => ({ error }),\n * },\n * });\n *\n * // action type: \"[Auth API] Login Success\"\n * authApiActions.loginSuccess({ userId: 10, token: 'ngrx' });\n *\n * // action type: \"[Auth API] Login Failure\"\n * authApiActions.loginFailure({ error: 'Login Failure!' });\n *\n * // action type: \"[Auth API] Logout Success\"\n * authApiActions.logoutSuccess();\n *\n * // action type: \"[Auth API] Logout Failure\";\n * authApiActions.logoutFailure(new Error('Logout Failure!'));\n * ```\n */\nexport function createActionGroup<\n Source extends string,\n Events extends Record | Creator>\n>(config: ActionGroupConfig): ActionGroup {\n const { source, events } = config;\n\n return Object.keys(events).reduce(\n (actionGroup, eventName) => ({\n ...actionGroup,\n [toActionName(eventName)]: createAction(\n toActionType(source, eventName),\n events[eventName]\n ),\n }),\n {} as ActionGroup\n );\n}\n\nexport function emptyProps(): ActionCreatorProps {\n return props();\n}\n\nfunction toActionName(\n eventName: EventName\n): ActionName {\n return eventName\n .trim()\n .split(' ')\n .map((word, i) => (i === 0 ? uncapitalize(word) : capitalize(word)))\n .join('') as ActionName;\n}\n\nfunction toActionType(\n source: Source,\n eventName: EventName\n): `[${Source}] ${EventName}` {\n return `[${source}] ${eventName}`;\n}\n","export function capitalize(text: T): Capitalize {\n return (text.charAt(0).toUpperCase() + text.substring(1)) as Capitalize;\n}\n\nexport function uncapitalize(text: T): Uncapitalize {\n return (text.charAt(0).toLowerCase() + text.substring(1)) as Uncapitalize;\n}\n","import { Injectable, OnDestroy, Provider } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { Action } from './models';\n\nexport const INIT = '@ngrx/store/init' as const;\n\n@Injectable()\nexport class ActionsSubject\n extends BehaviorSubject\n implements OnDestroy\n{\n constructor() {\n super({ type: INIT });\n }\n\n override next(action: Action): void {\n if (typeof action === 'function') {\n throw new TypeError(`\n Dispatch expected an object, instead it received a function.\n If you're using the createAction function, make sure to invoke the function\n before dispatching the action. For example, someAction should be someAction().`);\n } else if (typeof action === 'undefined') {\n throw new TypeError(`Actions must be objects`);\n } else if (typeof action.type === 'undefined') {\n throw new TypeError(`Actions must have a type property`);\n }\n super.next(action);\n }\n\n override complete() {\n /* noop */\n }\n\n ngOnDestroy() {\n super.complete();\n }\n}\n\nexport const ACTIONS_SUBJECT_PROVIDERS: Provider[] = [ActionsSubject];\n","import { InjectionToken } from '@angular/core';\nimport { RuntimeChecks, MetaReducer } from './models';\n\nexport const _ROOT_STORE_GUARD = new InjectionToken(\n '@ngrx/store Internal Root Guard'\n);\nexport const _INITIAL_STATE = new InjectionToken(\n '@ngrx/store Internal Initial State'\n);\nexport const INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');\nexport const REDUCER_FACTORY = new InjectionToken(\n '@ngrx/store Reducer Factory'\n);\nexport const _REDUCER_FACTORY = new InjectionToken(\n '@ngrx/store Internal Reducer Factory Provider'\n);\nexport const INITIAL_REDUCERS = new InjectionToken(\n '@ngrx/store Initial Reducers'\n);\nexport const _INITIAL_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Initial Reducers'\n);\nexport const STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');\nexport const _STORE_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Store Reducers'\n);\nexport const _FEATURE_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Feature Reducers'\n);\n\nexport const _FEATURE_CONFIGS = new InjectionToken(\n '@ngrx/store Internal Feature Configs'\n);\n\nexport const _STORE_FEATURES = new InjectionToken(\n '@ngrx/store Internal Store Features'\n);\n\nexport const _FEATURE_REDUCERS_TOKEN = new InjectionToken(\n '@ngrx/store Internal Feature Reducers Token'\n);\nexport const FEATURE_REDUCERS = new InjectionToken(\n '@ngrx/store Feature Reducers'\n);\n\n/**\n * User-defined meta reducers from StoreModule.forRoot()\n */\nexport const USER_PROVIDED_META_REDUCERS = new InjectionToken(\n '@ngrx/store User Provided Meta Reducers'\n);\n\n/**\n * Meta reducers defined either internally by @ngrx/store or by library authors\n */\nexport const META_REDUCERS = new InjectionToken(\n '@ngrx/store Meta Reducers'\n);\n\n/**\n * Concats the user provided meta reducers and the meta reducers provided on the multi\n * injection token\n */\nexport const _RESOLVED_META_REDUCERS = new InjectionToken(\n '@ngrx/store Internal Resolved Meta Reducers'\n);\n\n/**\n * Runtime checks defined by the user via an InjectionToken\n * Defaults to `_USER_RUNTIME_CHECKS`\n */\nexport const USER_RUNTIME_CHECKS = new InjectionToken(\n '@ngrx/store User Runtime Checks Config'\n);\n\n/**\n * Runtime checks defined by the user via forRoot()\n */\nexport const _USER_RUNTIME_CHECKS = new InjectionToken(\n '@ngrx/store Internal User Runtime Checks Config'\n);\n\n/**\n * Runtime checks currently in use\n */\nexport const ACTIVE_RUNTIME_CHECKS = new InjectionToken(\n '@ngrx/store Internal Runtime Checks'\n);\n\nexport const _ACTION_TYPE_UNIQUENESS_CHECK = new InjectionToken(\n '@ngrx/store Check if Action types are unique'\n);\n\n/**\n * InjectionToken that registers the global Store.\n * Mainly used to provide a hook that can be injected\n * to ensure the root state is loaded before something\n * that depends on it.\n */\nexport const ROOT_STORE_PROVIDER = new InjectionToken(\n '@ngrx/store Root Store Provider'\n);\n\n/**\n * InjectionToken that registers feature states.\n * Mainly used to provide a hook that can be injected\n * to ensure feature state is loaded before something\n * that depends on it.\n */\nexport const FEATURE_STATE_PROVIDER = new InjectionToken(\n '@ngrx/store Feature State Provider'\n);\n","import {\n Action,\n ActionReducer,\n ActionReducerFactory,\n ActionReducerMap,\n MetaReducer,\n InitialState,\n} from './models';\n\nexport function combineReducers(\n reducers: ActionReducerMap,\n initialState?: Partial\n): ActionReducer;\n/**\n * @description\n * Combines reducers for individual features into a single reducer.\n *\n * You can use this function to delegate handling of state transitions to multiple reducers, each acting on their\n * own sub-state within the root state.\n *\n * @param reducers An object mapping keys of the root state to their corresponding feature reducer.\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * **Example combining two feature reducers into one \"root\" reducer**\n *\n * ```ts\n * export const reducer = combineReducers({\n * featureA: featureAReducer,\n * featureB: featureBReducer\n * });\n * ```\n *\n * You can also override the initial states of the sub-features:\n * ```ts\n * export const reducer = combineReducers({\n * featureA: featureAReducer,\n * featureB: featureBReducer\n * }, {\n * featureA: { counterA: 13 },\n * featureB: { counterB: 37 }\n * });\n * ```\n */\nexport function combineReducers(\n reducers: any,\n initialState: any = {}\n): ActionReducer {\n const reducerKeys = Object.keys(reducers);\n const finalReducers: any = {};\n\n for (let i = 0; i < reducerKeys.length; i++) {\n const key = reducerKeys[i];\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n const finalReducerKeys = Object.keys(finalReducers);\n\n return function combination(state, action) {\n state = state === undefined ? initialState : state;\n let hasChanged = false;\n const nextState: any = {};\n for (let i = 0; i < finalReducerKeys.length; i++) {\n const key = finalReducerKeys[i];\n const reducer: any = finalReducers[key];\n const previousStateForKey = state[key];\n const nextStateForKey = reducer(previousStateForKey, action);\n\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\nexport function omit(\n object: T,\n keyToRemove: keyof T\n): Partial {\n return Object.keys(object)\n .filter((key) => key !== keyToRemove)\n .reduce((result, key) => Object.assign(result, { [key]: object[key] }), {});\n}\n\nexport function compose(): (i: A) => A;\nexport function compose(b: (i: A) => B): (i: A) => B;\nexport function compose(c: (i: B) => C, b: (i: A) => B): (i: A) => C;\nexport function compose(\n d: (i: C) => D,\n c: (i: B) => C,\n b: (i: A) => B\n): (i: A) => D;\nexport function compose(\n e: (i: D) => E,\n d: (i: C) => D,\n c: (i: B) => C,\n b: (i: A) => B\n): (i: A) => E;\nexport function compose(\n f: (i: E) => F,\n e: (i: D) => E,\n d: (i: C) => D,\n c: (i: B) => C,\n b: (i: A) => B\n): (i: A) => F;\nexport function compose(...functions: any[]): (i: A) => F;\nexport function compose(...functions: any[]) {\n return function (arg: any) {\n if (functions.length === 0) {\n return arg;\n }\n\n const last = functions[functions.length - 1];\n const rest = functions.slice(0, -1);\n\n return rest.reduceRight((composed, fn) => fn(composed), last(arg));\n };\n}\n\nexport function createReducerFactory(\n reducerFactory: ActionReducerFactory,\n metaReducers?: MetaReducer[]\n): ActionReducerFactory {\n if (Array.isArray(metaReducers) && metaReducers.length > 0) {\n (reducerFactory as any) = compose.apply(null, [\n ...metaReducers,\n reducerFactory,\n ]);\n }\n\n return (reducers: ActionReducerMap, initialState?: InitialState) => {\n const reducer = reducerFactory(reducers);\n return (state: T | undefined, action: V) => {\n state = state === undefined ? (initialState as T) : state;\n return reducer(state, action);\n };\n };\n}\n\nexport function createFeatureReducerFactory(\n metaReducers?: MetaReducer[]\n): (reducer: ActionReducer, initialState?: T) => ActionReducer {\n const reducerFactory =\n Array.isArray(metaReducers) && metaReducers.length > 0\n ? compose>(...metaReducers)\n : (r: ActionReducer) => r;\n\n return (reducer: ActionReducer, initialState?: T) => {\n reducer = reducerFactory(reducer);\n\n return (state: T | undefined, action: V) => {\n state = state === undefined ? initialState : state;\n return reducer(state, action);\n };\n };\n}\n","import { Inject, Injectable, OnDestroy, Provider } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { ActionsSubject } from './actions_subject';\nimport {\n Action,\n ActionReducer,\n ActionReducerFactory,\n ActionReducerMap,\n StoreFeature,\n} from './models';\nimport { INITIAL_REDUCERS, INITIAL_STATE, REDUCER_FACTORY } from './tokens';\nimport {\n createFeatureReducerFactory,\n createReducerFactory,\n omit,\n} from './utils';\n\nexport abstract class ReducerObservable extends Observable<\n ActionReducer\n> {}\nexport abstract class ReducerManagerDispatcher extends ActionsSubject {}\nexport const UPDATE = '@ngrx/store/update-reducers' as const;\n\n@Injectable()\nexport class ReducerManager\n extends BehaviorSubject>\n implements OnDestroy\n{\n get currentReducers(): ActionReducerMap {\n return this.reducers;\n }\n\n constructor(\n private dispatcher: ReducerManagerDispatcher,\n @Inject(INITIAL_STATE) private initialState: any,\n @Inject(INITIAL_REDUCERS) private reducers: ActionReducerMap,\n @Inject(REDUCER_FACTORY)\n private reducerFactory: ActionReducerFactory\n ) {\n super(reducerFactory(reducers, initialState));\n }\n\n addFeature(feature: StoreFeature) {\n this.addFeatures([feature]);\n }\n\n addFeatures(features: StoreFeature[]) {\n const reducers = features.reduce(\n (\n reducerDict,\n { reducers, reducerFactory, metaReducers, initialState, key }\n ) => {\n const reducer =\n typeof reducers === 'function'\n ? createFeatureReducerFactory(metaReducers)(reducers, initialState)\n : createReducerFactory(reducerFactory, metaReducers)(\n reducers,\n initialState\n );\n\n reducerDict[key] = reducer;\n return reducerDict;\n },\n {} as { [key: string]: ActionReducer }\n );\n\n this.addReducers(reducers);\n }\n\n removeFeature(feature: StoreFeature) {\n this.removeFeatures([feature]);\n }\n\n removeFeatures(features: StoreFeature[]) {\n this.removeReducers(features.map((p) => p.key));\n }\n\n addReducer(key: string, reducer: ActionReducer) {\n this.addReducers({ [key]: reducer });\n }\n\n addReducers(reducers: { [key: string]: ActionReducer }) {\n this.reducers = { ...this.reducers, ...reducers };\n this.updateReducers(Object.keys(reducers));\n }\n\n removeReducer(featureKey: string) {\n this.removeReducers([featureKey]);\n }\n\n removeReducers(featureKeys: string[]) {\n featureKeys.forEach((key) => {\n this.reducers = omit(this.reducers, key) /*TODO(#823)*/ as any;\n });\n this.updateReducers(featureKeys);\n }\n\n private updateReducers(featureKeys: string[]) {\n this.next(this.reducerFactory(this.reducers, this.initialState));\n this.dispatcher.next({\n type: UPDATE,\n features: featureKeys,\n });\n }\n\n ngOnDestroy() {\n this.complete();\n }\n}\n\nexport const REDUCER_MANAGER_PROVIDERS: Provider[] = [\n ReducerManager,\n { provide: ReducerObservable, useExisting: ReducerManager },\n { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },\n];\n","import { Injectable, OnDestroy, Provider } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { Action } from './models';\n\n@Injectable()\nexport class ScannedActionsSubject\n extends Subject\n implements OnDestroy\n{\n ngOnDestroy() {\n this.complete();\n }\n}\n\nexport const SCANNED_ACTIONS_SUBJECT_PROVIDERS: Provider[] = [\n ScannedActionsSubject,\n];\n","import { Inject, Injectable, OnDestroy, Provider, Signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n BehaviorSubject,\n Observable,\n queueScheduler,\n Subscription,\n} from 'rxjs';\nimport { observeOn, scan, withLatestFrom } from 'rxjs/operators';\n\nimport { ActionsSubject, INIT } from './actions_subject';\nimport { Action, ActionReducer } from './models';\nimport { ReducerObservable } from './reducer_manager';\nimport { ScannedActionsSubject } from './scanned_actions_subject';\nimport { INITIAL_STATE } from './tokens';\n\nexport abstract class StateObservable extends Observable {\n /**\n * @internal\n */\n abstract readonly state: Signal;\n}\n\n@Injectable()\nexport class State extends BehaviorSubject implements OnDestroy {\n static readonly INIT = INIT;\n\n private stateSubscription: Subscription;\n\n /**\n * @internal\n */\n public state: Signal;\n\n constructor(\n actions$: ActionsSubject,\n reducer$: ReducerObservable,\n scannedActions: ScannedActionsSubject,\n @Inject(INITIAL_STATE) initialState: any\n ) {\n super(initialState);\n\n const actionsOnQueue$: Observable = actions$.pipe(\n observeOn(queueScheduler)\n );\n const withLatestReducer$: Observable<[Action, ActionReducer]> =\n actionsOnQueue$.pipe(withLatestFrom(reducer$));\n\n const seed: StateActionPair = { state: initialState };\n const stateAndAction$: Observable<{\n state: any;\n action?: Action;\n }> = withLatestReducer$.pipe(\n scan<[Action, ActionReducer], StateActionPair>(\n reduceState,\n seed\n )\n );\n\n this.stateSubscription = stateAndAction$.subscribe(({ state, action }) => {\n this.next(state);\n scannedActions.next(action as Action);\n });\n\n this.state = toSignal(this, { manualCleanup: true, requireSync: true });\n }\n\n ngOnDestroy() {\n this.stateSubscription.unsubscribe();\n this.complete();\n }\n}\n\nexport type StateActionPair = {\n state: T | undefined;\n action?: V;\n};\nexport function reduceState(\n stateActionPair: StateActionPair = { state: undefined },\n [action, reducer]: [V, ActionReducer]\n): StateActionPair {\n const { state } = stateActionPair;\n return { state: reducer(state, action), action };\n}\n\nexport const STATE_PROVIDERS: Provider[] = [\n State,\n { provide: StateObservable, useExisting: State },\n];\n","// disabled because we have lowercase generics for `select`\nimport { computed, Injectable, Provider, Signal } from '@angular/core';\nimport { Observable, Observer, Operator } from 'rxjs';\nimport { distinctUntilChanged, map, pluck } from 'rxjs/operators';\n\nimport { ActionsSubject } from './actions_subject';\nimport {\n Action,\n ActionReducer,\n SelectSignalOptions,\n FunctionIsNotAllowed,\n} from './models';\nimport { ReducerManager } from './reducer_manager';\nimport { StateObservable } from './state';\n\n@Injectable()\nexport class Store\n extends Observable\n implements Observer\n{\n /**\n * @internal\n */\n readonly state: Signal;\n\n constructor(\n state$: StateObservable,\n private actionsObserver: ActionsSubject,\n private reducerManager: ReducerManager\n ) {\n super();\n\n this.source = state$;\n this.state = state$.state;\n }\n\n select(mapFn: (state: T) => K): Observable;\n /**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\n select(\n mapFn: (state: T, props: Props) => K,\n props: Props\n ): Observable;\n select(key: a): Observable;\n select(\n key1: a,\n key2: b\n ): Observable;\n select(\n key1: a,\n key2: b,\n key3: c\n ): Observable;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c]\n >(key1: a, key2: b, key3: c, key4: d): Observable;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d]\n >(key1: a, key2: b, key3: c, key4: d, key5: e): Observable;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e]\n >(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f\n ): Observable;\n select<\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e],\n K = any\n >(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f,\n ...paths: string[]\n ): Observable;\n select(\n pathOrMapFn: ((state: T, props?: Props) => K) | string,\n ...paths: string[]\n ): Observable {\n return (select as any).call(null, pathOrMapFn, ...paths)(this);\n }\n\n /**\n * Returns a signal of the provided selector.\n *\n * @param selector selector function\n * @param options select signal options\n */\n selectSignal(\n selector: (state: T) => K,\n options?: SelectSignalOptions\n ): Signal {\n return computed(() => selector(this.state()), options);\n }\n\n override lift(operator: Operator): Store {\n const store = new Store(this, this.actionsObserver, this.reducerManager);\n store.operator = operator;\n\n return store;\n }\n\n dispatch(\n action: V &\n FunctionIsNotAllowed<\n V,\n 'Functions are not allowed to be dispatched. Did you forget to call the action creator function?'\n >\n ) {\n this.actionsObserver.next(action);\n }\n\n next(action: Action) {\n this.actionsObserver.next(action);\n }\n\n error(err: any) {\n this.actionsObserver.error(err);\n }\n\n complete() {\n this.actionsObserver.complete();\n }\n\n addReducer(\n key: string,\n reducer: ActionReducer\n ) {\n this.reducerManager.addReducer(key, reducer);\n }\n\n removeReducer>(key: Key) {\n this.reducerManager.removeReducer(key);\n }\n}\n\nexport const STORE_PROVIDERS: Provider[] = [Store];\n\nexport function select(\n mapFn: (state: T) => K\n): (source$: Observable) => Observable;\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function select(\n mapFn: (state: T, props: Props) => K,\n props: Props\n): (source$: Observable) => Observable;\nexport function select(\n key: a\n): (source$: Observable) => Observable;\nexport function select(\n key1: a,\n key2: b\n): (source$: Observable) => Observable;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b]\n>(\n key1: a,\n key2: b,\n key3: c\n): (source$: Observable) => Observable;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c]\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d\n): (source$: Observable) => Observable;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d]\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e\n): (source$: Observable) => Observable;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e]\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f\n): (source$: Observable) => Observable;\nexport function select<\n T,\n a extends keyof T,\n b extends keyof T[a],\n c extends keyof T[a][b],\n d extends keyof T[a][b][c],\n e extends keyof T[a][b][c][d],\n f extends keyof T[a][b][c][d][e],\n K = any\n>(\n key1: a,\n key2: b,\n key3: c,\n key4: d,\n key5: e,\n key6: f,\n ...paths: string[]\n): (source$: Observable) => Observable;\nexport function select(\n pathOrMapFn: ((state: T, props?: Props) => any) | string,\n propsOrPath?: Props | string,\n ...paths: string[]\n) {\n return function selectOperator(source$: Observable): Observable {\n let mapped$: Observable;\n\n if (typeof pathOrMapFn === 'string') {\n const pathSlices = [propsOrPath, ...paths].filter(Boolean);\n mapped$ = source$.pipe(pluck(pathOrMapFn, ...pathSlices));\n } else if (typeof pathOrMapFn === 'function') {\n mapped$ = source$.pipe(\n map((source) => pathOrMapFn(source, propsOrPath))\n );\n } else {\n throw new TypeError(\n `Unexpected type '${typeof pathOrMapFn}' in select operator,` +\n ` expected 'string' or 'function'`\n );\n }\n\n return mapped$.pipe(distinctUntilChanged());\n };\n}\n","export const RUNTIME_CHECK_URL =\n 'https://ngrx.io/guide/store/configuration/runtime-checks';\n\nexport function isUndefined(target: any): target is undefined {\n return target === undefined;\n}\n\nexport function isNull(target: any): target is null {\n return target === null;\n}\n\nexport function isArray(target: any): target is Array {\n return Array.isArray(target);\n}\n\nexport function isString(target: any): target is string {\n return typeof target === 'string';\n}\n\nexport function isBoolean(target: any): target is boolean {\n return typeof target === 'boolean';\n}\n\nexport function isNumber(target: any): target is number {\n return typeof target === 'number';\n}\n\nexport function isObjectLike(target: any): target is object {\n return typeof target === 'object' && target !== null;\n}\n\nexport function isObject(target: any): target is object {\n return isObjectLike(target) && !isArray(target);\n}\n\nexport function isPlainObject(target: any): target is object {\n if (!isObject(target)) {\n return false;\n }\n\n const targetPrototype = Object.getPrototypeOf(target);\n return targetPrototype === Object.prototype || targetPrototype === null;\n}\n\nexport function isFunction(target: any): target is () => void {\n return typeof target === 'function';\n}\n\nexport function isComponent(target: any) {\n return isFunction(target) && target.hasOwnProperty('ɵcmp');\n}\n\nexport function hasOwnProperty(target: object, propertyName: string): boolean {\n return Object.prototype.hasOwnProperty.call(target, propertyName);\n}\n","let _ngrxMockEnvironment = false;\nexport function setNgrxMockEnvironment(value: boolean): void {\n _ngrxMockEnvironment = value;\n}\nexport function isNgrxMockEnvironment(): boolean {\n return _ngrxMockEnvironment;\n}\n","import { Selector, SelectorWithProps } from './models';\nimport { isDevMode } from '@angular/core';\nimport { isNgrxMockEnvironment } from './flags';\n\nexport type AnyFn = (...args: any[]) => any;\n\nexport type MemoizedProjection = {\n memoized: AnyFn;\n reset: () => void;\n setResult: (result?: any) => void;\n clearResult: () => void;\n};\n\nexport type MemoizeFn = (t: AnyFn) => MemoizedProjection;\n\nexport type ComparatorFn = (a: any, b: any) => boolean;\n\nexport type DefaultProjectorFn = (...args: any[]) => T;\n\nexport interface MemoizedSelector<\n State,\n Result,\n ProjectorFn = DefaultProjectorFn\n> extends Selector {\n release(): void;\n projector: ProjectorFn;\n setResult: (result?: Result) => void;\n clearResult: () => void;\n}\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see the {@link https://ngrx.io/guide/migration/v12#ngrxstore migration guide}\n */\nexport interface MemoizedSelectorWithProps<\n State,\n Props,\n Result,\n ProjectorFn = DefaultProjectorFn\n> extends SelectorWithProps {\n release(): void;\n projector: ProjectorFn;\n setResult: (result?: Result) => void;\n clearResult: () => void;\n}\n\nexport function isEqualCheck(a: any, b: any): boolean {\n return a === b;\n}\n\nfunction isArgumentsChanged(\n args: IArguments,\n lastArguments: IArguments,\n comparator: ComparatorFn\n) {\n for (let i = 0; i < args.length; i++) {\n if (!comparator(args[i], lastArguments[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport function resultMemoize(\n projectionFn: AnyFn,\n isResultEqual: ComparatorFn\n) {\n return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);\n}\n\nexport function defaultMemoize(\n projectionFn: AnyFn,\n isArgumentsEqual = isEqualCheck,\n isResultEqual = isEqualCheck\n): MemoizedProjection {\n let lastArguments: null | IArguments = null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, , , , ,\n let lastResult: any = null;\n let overrideResult: any;\n\n function reset() {\n lastArguments = null;\n lastResult = null;\n }\n\n function setResult(result: any = undefined) {\n overrideResult = { result };\n }\n\n function clearResult() {\n overrideResult = undefined;\n }\n\n /* eslint-disable prefer-rest-params, prefer-spread */\n\n // disabled because of the use of `arguments`\n function memoized(): any {\n if (overrideResult !== undefined) {\n return overrideResult.result;\n }\n\n if (!lastArguments) {\n lastResult = projectionFn.apply(null, arguments as any);\n lastArguments = arguments;\n return lastResult;\n }\n\n if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {\n return lastResult;\n }\n\n const newResult = projectionFn.apply(null, arguments as any);\n lastArguments = arguments;\n\n if (isResultEqual(lastResult, newResult)) {\n return lastResult;\n }\n\n lastResult = newResult;\n\n return newResult;\n }\n\n return { memoized, reset, setResult, clearResult };\n}\n\nexport function createSelector(\n s1: Selector,\n projector: (s1: S1) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n projector: (s1: S1, s2: S2) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n s3: Selector,\n projector: (s1: S1, s2: S2, s3: S3) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n s3: Selector,\n s4: Selector,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n s3: Selector,\n s4: Selector,\n s5: Selector,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n s3: Selector,\n s4: Selector,\n s5: Selector,\n s6: Selector,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n s3: Selector,\n s4: Selector,\n s5: Selector,\n s6: Selector,\n s7: Selector,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, s6: S6, s7: S7) => Result\n): MemoizedSelector;\nexport function createSelector(\n s1: Selector,\n s2: Selector,\n s3: Selector,\n s4: Selector,\n s5: Selector,\n s6: Selector,\n s7: Selector,\n s8: Selector,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n s8: S8\n ) => Result\n): MemoizedSelector;\n\nexport function createSelector<\n Selectors extends Record>,\n State = Selectors extends Record>\n ? S\n : never,\n Result extends Record = {\n [Key in keyof Selectors]: Selectors[Key] extends Selector\n ? R\n : never;\n }\n>(selectors: Selectors): MemoizedSelector;\n\nexport function createSelector(\n ...args: [...slices: Selector[], projector: unknown] &\n [\n ...slices: { [i in keyof Slices]: Selector },\n projector: (...s: Slices) => Result\n ]\n): MemoizedSelector Result>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n s1: SelectorWithProps,\n projector: (s1: S1, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n projector: (s1: S1, s2: S2, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n s3: SelectorWithProps,\n projector: (s1: S1, s2: S2, s3: S3, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n s3: SelectorWithProps,\n s4: SelectorWithProps,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n s3: SelectorWithProps,\n s4: SelectorWithProps,\n s5: SelectorWithProps,\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n s3: SelectorWithProps,\n s4: SelectorWithProps,\n s5: SelectorWithProps,\n s6: SelectorWithProps,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<\n State,\n Props,\n S1,\n S2,\n S3,\n S4,\n S5,\n S6,\n S7,\n Result\n>(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n s3: SelectorWithProps,\n s4: SelectorWithProps,\n s5: SelectorWithProps,\n s6: SelectorWithProps,\n s7: SelectorWithProps,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<\n State,\n Props,\n S1,\n S2,\n S3,\n S4,\n S5,\n S6,\n S7,\n S8,\n Result\n>(\n s1: SelectorWithProps,\n s2: SelectorWithProps,\n s3: SelectorWithProps,\n s4: SelectorWithProps,\n s5: SelectorWithProps,\n s6: SelectorWithProps,\n s7: SelectorWithProps,\n s8: SelectorWithProps,\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n s8: S8,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps;\n\nexport function createSelector(\n selectors: Selector[] &\n [...{ [i in keyof Slices]: Selector }],\n projector: (...s: Slices) => Result\n): MemoizedSelector Result>;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n selectors: [SelectorWithProps],\n projector: (s1: S1, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n selectors: [\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (s1: S1, s2: S2, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n selectors: [\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (s1: S1, s2: S2, s3: S3, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n selectors: [\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n selectors: [\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (s1: S1, s2: S2, s3: S3, s4: S4, s5: S5, props: Props) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector(\n selectors: [\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<\n State,\n Props,\n S1,\n S2,\n S3,\n S4,\n S5,\n S6,\n S7,\n Result\n>(\n selectors: [\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps;\n\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelector<\n State,\n Props,\n S1,\n S2,\n S3,\n S4,\n S5,\n S6,\n S7,\n S8,\n Result\n>(\n selectors: [\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps,\n SelectorWithProps\n ],\n projector: (\n s1: S1,\n s2: S2,\n s3: S3,\n s4: S4,\n s5: S5,\n s6: S6,\n s7: S7,\n s8: S8,\n props: Props\n ) => Result\n): MemoizedSelectorWithProps;\n\nexport function createSelector(\n ...input: any[]\n): MemoizedSelector | MemoizedSelectorWithProps {\n return createSelectorFactory(defaultMemoize)(...input);\n}\n\nexport function defaultStateFn(\n state: any,\n selectors: Selector[] | SelectorWithProps[],\n props: any,\n memoizedProjector: MemoizedProjection\n): any {\n if (props === undefined) {\n const args = ([]>selectors).map((fn) => fn(state));\n return memoizedProjector.memoized.apply(null, args);\n }\n\n const args = ([]>selectors).map((fn) =>\n fn(state, props)\n );\n return memoizedProjector.memoized.apply(null, [...args, props]);\n}\n\nexport type SelectorFactoryConfig = {\n stateFn: (\n state: T,\n selectors: Selector[],\n props: any,\n memoizedProjector: MemoizedProjection\n ) => V;\n};\n\nexport function createSelectorFactory(\n memoize: MemoizeFn\n): (...input: any[]) => MemoizedSelector;\nexport function createSelectorFactory(\n memoize: MemoizeFn,\n options: SelectorFactoryConfig\n): (...input: any[]) => MemoizedSelector;\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelectorFactory(\n memoize: MemoizeFn\n): (...input: any[]) => MemoizedSelectorWithProps;\n/**\n * @deprecated Selectors with props are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/2980 Github Issue}\n */\nexport function createSelectorFactory(\n memoize: MemoizeFn,\n options: SelectorFactoryConfig\n): (...input: any[]) => MemoizedSelectorWithProps;\n/**\n *\n * @param memoize The function used to memoize selectors\n * @param options Config Object that may include a `stateFn` function defining how to return the selector's value, given the entire `Store`'s state, parent `Selector`s, `Props`, and a `MemoizedProjection`\n *\n * @usageNotes\n *\n * **Creating a Selector Factory Where Array Order Does Not Matter**\n *\n * ```ts\n * function removeMatch(arr: string[], target: string): string[] {\n * const matchIndex = arr.indexOf(target);\n * return [...arr.slice(0, matchIndex), ...arr.slice(matchIndex + 1)];\n * }\n *\n * function orderDoesNotMatterComparer(a: any, b: any): boolean {\n * if (!Array.isArray(a) || !Array.isArray(b)) {\n * return a === b;\n * }\n * if (a.length !== b.length) {\n * return false;\n * }\n * let tempB = [...b];\n * function reduceToDetermineIfArraysContainSameContents(\n * previousCallResult: boolean,\n * arrayMember: any\n * ): boolean {\n * if (previousCallResult === false) {\n * return false;\n * }\n * if (tempB.includes(arrayMember)) {\n * tempB = removeMatch(tempB, arrayMember);\n * return true;\n * }\n * return false;\n * }\n * return a.reduce(reduceToDetermineIfArraysContainSameContents, true);\n * }\n *\n * export const createOrderDoesNotMatterSelector = createSelectorFactory(\n * (projectionFun) => defaultMemoize(\n * projectionFun,\n * orderDoesNotMatterComparer,\n * orderDoesNotMatterComparer\n * )\n * );\n * ```\n *\n * **Creating an Alternative Memoization Strategy**\n *\n * ```ts\n * function serialize(x: any): string {\n * return JSON.stringify(x);\n * }\n *\n * export const createFullHistorySelector = createSelectorFactory(\n * (projectionFunction) => {\n * const cache = {};\n *\n * function memoized() {\n * const serializedArguments = serialize(...arguments);\n * if (cache[serializedArguments] != null) {\n * cache[serializedArguments] = projectionFunction.apply(null, arguments);\n * }\n * return cache[serializedArguments];\n * }\n * return {\n * memoized,\n * reset: () => {},\n * setResult: () => {},\n * clearResult: () => {},\n * };\n * }\n * );\n * ```\n */\nexport function createSelectorFactory(\n memoize: MemoizeFn,\n options: SelectorFactoryConfig = {\n stateFn: defaultStateFn,\n }\n) {\n return function (\n ...input: any[]\n ): MemoizedSelector | MemoizedSelectorWithProps {\n let args = input;\n if (Array.isArray(args[0])) {\n const [head, ...tail] = args;\n args = [...head, ...tail];\n } else if (args.length === 1 && isSelectorsDictionary(args[0])) {\n args = extractArgsFromSelectorsDictionary(args[0]);\n }\n\n const selectors = args.slice(0, args.length - 1);\n const projector = args[args.length - 1];\n const memoizedSelectors = selectors.filter(\n (selector: any) =>\n selector.release && typeof selector.release === 'function'\n );\n\n const memoizedProjector = memoize(function (...selectors: any[]) {\n return projector.apply(null, selectors);\n });\n\n const memoizedState = defaultMemoize(function (state: any, props: any) {\n return options.stateFn.apply(null, [\n state,\n selectors,\n props,\n memoizedProjector,\n ]);\n });\n\n function release() {\n memoizedState.reset();\n memoizedProjector.reset();\n\n memoizedSelectors.forEach((selector) => selector.release());\n }\n\n return Object.assign(memoizedState.memoized, {\n release,\n projector: memoizedProjector.memoized,\n setResult: memoizedState.setResult,\n clearResult: memoizedState.clearResult,\n });\n };\n}\n\nexport function createFeatureSelector(\n featureName: string\n): MemoizedSelector;\n/**\n * @deprecated Feature selectors with a root state are deprecated, for more info see {@link https://github.com/ngrx/platform/issues/3179 Github Issue}\n */\nexport function createFeatureSelector(\n featureName: keyof T\n): MemoizedSelector;\nexport function createFeatureSelector(\n featureName: any\n): MemoizedSelector {\n return createSelector(\n (state: any) => {\n const featureState = state[featureName];\n if (!isNgrxMockEnvironment() && isDevMode() && !(featureName in state)) {\n console.warn(\n `@ngrx/store: The feature name \"${featureName}\" does ` +\n 'not exist in the state, therefore createFeatureSelector ' +\n 'cannot access it. Be sure it is imported in a loaded module ' +\n `using StoreModule.forRoot('${featureName}', ...) or ` +\n `StoreModule.forFeature('${featureName}', ...). If the default ` +\n 'state is intended to be undefined, as is the case with router ' +\n 'state, this development-only warning message can be ignored.'\n );\n }\n return featureState;\n },\n (featureState: any) => featureState\n );\n}\n\nfunction isSelectorsDictionary(\n selectors: unknown\n): selectors is Record> {\n return (\n !!selectors &&\n typeof selectors === 'object' &&\n Object.values(selectors).every((selector) => typeof selector === 'function')\n );\n}\n\nfunction extractArgsFromSelectorsDictionary(\n selectorsDictionary: Record>\n): [\n ...selectors: Selector[],\n projector: (...selectorResults: unknown[]) => unknown\n] {\n const selectors = Object.values(selectorsDictionary);\n const resultKeys = Object.keys(selectorsDictionary);\n const projector = (...selectorResults: unknown[]) =>\n resultKeys.reduce(\n (result, key, index) => ({\n ...result,\n [key]: selectorResults[index],\n }),\n {}\n );\n\n return [...selectors, projector];\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport {\n Action,\n ActionReducer,\n ActionReducerMap,\n ActionReducerFactory,\n StoreFeature,\n InitialState,\n MetaReducer,\n RuntimeChecks,\n} from './models';\nimport { combineReducers } from './utils';\nimport { Store } from './store';\n\nexport interface StoreConfig {\n initialState?: InitialState;\n reducerFactory?: ActionReducerFactory;\n metaReducers?: MetaReducer<{ [P in keyof T]: T[P] }, V>[];\n}\n\nexport interface RootStoreConfig\n extends StoreConfig {\n runtimeChecks?: Partial;\n}\n\n/**\n * An object with the name and the reducer for the feature.\n */\nexport interface FeatureSlice {\n name: string;\n reducer: ActionReducer;\n}\n\nexport function _createStoreReducers(\n reducers: ActionReducerMap | InjectionToken>\n): ActionReducerMap {\n return reducers instanceof InjectionToken ? inject(reducers) : reducers;\n}\n\nexport function _createFeatureStore(\n configs: StoreConfig[] | InjectionToken>[],\n featureStores: StoreFeature[]\n) {\n return featureStores.map((feat, index) => {\n if (configs[index] instanceof InjectionToken) {\n const conf = inject(configs[index] as InjectionToken>);\n return {\n key: feat.key,\n reducerFactory: conf.reducerFactory\n ? conf.reducerFactory\n : combineReducers,\n metaReducers: conf.metaReducers ? conf.metaReducers : [],\n initialState: conf.initialState,\n };\n }\n return feat;\n });\n}\n\nexport function _createFeatureReducers(\n reducerCollection: Array<\n ActionReducerMap | InjectionToken>\n >\n): ActionReducerMap[] {\n return reducerCollection.map((reducer) => {\n return reducer instanceof InjectionToken ? inject(reducer) : reducer;\n });\n}\n\nexport function _initialStateFactory(initialState: any): any {\n if (typeof initialState === 'function') {\n return initialState();\n }\n\n return initialState;\n}\n\nexport function _concatMetaReducers(\n metaReducers: MetaReducer[],\n userProvidedMetaReducers: MetaReducer[]\n): MetaReducer[] {\n return metaReducers.concat(userProvidedMetaReducers);\n}\n\nexport function _provideForRootGuard(): unknown {\n const store = inject(Store, { optional: true, skipSelf: true });\n if (store) {\n throw new TypeError(\n `The root Store has been provided more than once. Feature modules should provide feature states instead.`\n );\n }\n return 'guarded';\n}\n","import { ActionReducer, Action } from '../models';\nimport { isFunction, hasOwnProperty, isObjectLike } from './utils';\n\nexport function immutabilityCheckMetaReducer(\n reducer: ActionReducer,\n checks: { action: (action: Action) => boolean; state: () => boolean }\n): ActionReducer {\n return function (state, action) {\n const act = checks.action(action) ? freeze(action) : action;\n\n const nextState = reducer(state, act);\n\n return checks.state() ? freeze(nextState) : nextState;\n };\n}\n\nfunction freeze(target: any) {\n Object.freeze(target);\n\n const targetIsFunction = isFunction(target);\n\n Object.getOwnPropertyNames(target).forEach((prop) => {\n // Ignore Ivy properties, ref: https://github.com/ngrx/platform/issues/2109#issuecomment-582689060\n if (prop.startsWith('ɵ')) {\n return;\n }\n\n if (\n hasOwnProperty(target, prop) &&\n (targetIsFunction\n ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'\n : true)\n ) {\n const propValue = target[prop];\n\n if (\n (isObjectLike(propValue) || isFunction(propValue)) &&\n !Object.isFrozen(propValue)\n ) {\n freeze(propValue);\n }\n }\n });\n\n return target;\n}\n","import { ActionReducer, Action } from '../models';\nimport {\n isPlainObject,\n isUndefined,\n isNull,\n isNumber,\n isBoolean,\n isString,\n isArray,\n RUNTIME_CHECK_URL,\n isComponent,\n} from './utils';\n\nexport function serializationCheckMetaReducer(\n reducer: ActionReducer,\n checks: { action: (action: Action) => boolean; state: () => boolean }\n): ActionReducer {\n return function (state, action) {\n if (checks.action(action)) {\n const unserializableAction = getUnserializable(action);\n throwIfUnserializable(unserializableAction, 'action');\n }\n\n const nextState = reducer(state, action);\n\n if (checks.state()) {\n const unserializableState = getUnserializable(nextState);\n throwIfUnserializable(unserializableState, 'state');\n }\n\n return nextState;\n };\n}\n\nfunction getUnserializable(\n target?: any,\n path: string[] = []\n): false | { path: string[]; value: any } {\n // Guard against undefined and null, e.g. a reducer that returns undefined\n if ((isUndefined(target) || isNull(target)) && path.length === 0) {\n return {\n path: ['root'],\n value: target,\n };\n }\n\n const keys = Object.keys(target);\n return keys.reduce((result, key) => {\n if (result) {\n return result;\n }\n\n const value = (target as any)[key];\n\n // Ignore Ivy components\n if (isComponent(value)) {\n return result;\n }\n\n if (\n isUndefined(value) ||\n isNull(value) ||\n isNumber(value) ||\n isBoolean(value) ||\n isString(value) ||\n isArray(value)\n ) {\n return false;\n }\n\n if (isPlainObject(value)) {\n return getUnserializable(value, [...path, key]);\n }\n\n return {\n path: [...path, key],\n value,\n };\n }, false);\n}\n\nfunction throwIfUnserializable(\n unserializable: false | { path: string[]; value: any },\n context: 'state' | 'action'\n) {\n if (unserializable === false) {\n return;\n }\n\n const unserializablePath = unserializable.path.join('.');\n const error: any = new Error(\n `Detected unserializable ${context} at \"${unserializablePath}\". ${RUNTIME_CHECK_URL}#strict${context}serializability`\n );\n error.value = unserializable.value;\n error.unserializablePath = unserializablePath;\n throw error;\n}\n","import { isDevMode, Provider } from '@angular/core';\nimport {\n serializationCheckMetaReducer,\n immutabilityCheckMetaReducer,\n inNgZoneAssertMetaReducer,\n} from './meta-reducers';\nimport { RuntimeChecks, MetaReducer, Action } from './models';\nimport {\n _USER_RUNTIME_CHECKS,\n ACTIVE_RUNTIME_CHECKS,\n META_REDUCERS,\n USER_RUNTIME_CHECKS,\n _ACTION_TYPE_UNIQUENESS_CHECK,\n} from './tokens';\nimport { REGISTERED_ACTION_TYPES } from './globals';\nimport { RUNTIME_CHECK_URL } from './meta-reducers/utils';\n\nexport function createActiveRuntimeChecks(\n runtimeChecks?: Partial\n): RuntimeChecks {\n if (isDevMode()) {\n return {\n strictStateSerializability: false,\n strictActionSerializability: false,\n strictStateImmutability: true,\n strictActionImmutability: true,\n strictActionWithinNgZone: false,\n strictActionTypeUniqueness: false,\n ...runtimeChecks,\n };\n }\n\n return {\n strictStateSerializability: false,\n strictActionSerializability: false,\n strictStateImmutability: false,\n strictActionImmutability: false,\n strictActionWithinNgZone: false,\n strictActionTypeUniqueness: false,\n };\n}\n\nexport function createSerializationCheckMetaReducer({\n strictActionSerializability,\n strictStateSerializability,\n}: RuntimeChecks): MetaReducer {\n return (reducer) =>\n strictActionSerializability || strictStateSerializability\n ? serializationCheckMetaReducer(reducer, {\n action: (action) =>\n strictActionSerializability && !ignoreNgrxAction(action),\n state: () => strictStateSerializability,\n })\n : reducer;\n}\n\nexport function createImmutabilityCheckMetaReducer({\n strictActionImmutability,\n strictStateImmutability,\n}: RuntimeChecks): MetaReducer {\n return (reducer) =>\n strictActionImmutability || strictStateImmutability\n ? immutabilityCheckMetaReducer(reducer, {\n action: (action) =>\n strictActionImmutability && !ignoreNgrxAction(action),\n state: () => strictStateImmutability,\n })\n : reducer;\n}\n\nfunction ignoreNgrxAction(action: Action) {\n return action.type.startsWith('@ngrx');\n}\n\nexport function createInNgZoneCheckMetaReducer({\n strictActionWithinNgZone,\n}: RuntimeChecks): MetaReducer {\n return (reducer) =>\n strictActionWithinNgZone\n ? inNgZoneAssertMetaReducer(reducer, {\n action: (action) =>\n strictActionWithinNgZone && !ignoreNgrxAction(action),\n })\n : reducer;\n}\n\nexport function provideRuntimeChecks(\n runtimeChecks?: Partial\n): Provider[] {\n return [\n {\n provide: _USER_RUNTIME_CHECKS,\n useValue: runtimeChecks,\n },\n {\n provide: USER_RUNTIME_CHECKS,\n useFactory: _runtimeChecksFactory,\n deps: [_USER_RUNTIME_CHECKS],\n },\n {\n provide: ACTIVE_RUNTIME_CHECKS,\n deps: [USER_RUNTIME_CHECKS],\n useFactory: createActiveRuntimeChecks,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: createImmutabilityCheckMetaReducer,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: createSerializationCheckMetaReducer,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: createInNgZoneCheckMetaReducer,\n },\n ];\n}\n\nexport function checkForActionTypeUniqueness(): Provider[] {\n return [\n {\n provide: _ACTION_TYPE_UNIQUENESS_CHECK,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: _actionTypeUniquenessCheck,\n },\n ];\n}\n\nexport function _runtimeChecksFactory(\n runtimeChecks: RuntimeChecks\n): RuntimeChecks {\n return runtimeChecks;\n}\n\nexport function _actionTypeUniquenessCheck(config: RuntimeChecks): void {\n if (!config.strictActionTypeUniqueness) {\n return;\n }\n\n const duplicates = Object.entries(REGISTERED_ACTION_TYPES)\n .filter(([, registrations]) => registrations > 1)\n .map(([type]) => type);\n\n if (duplicates.length) {\n throw new Error(\n `Action types are registered more than once, ${duplicates\n .map((type) => `\"${type}\"`)\n .join(', ')}. ${RUNTIME_CHECK_URL}#strictactiontypeuniqueness`\n );\n }\n}\n","import * as ngCore from '@angular/core';\nimport { Action, ActionReducer } from '../models';\nimport { RUNTIME_CHECK_URL } from './utils';\n\nexport function inNgZoneAssertMetaReducer(\n reducer: ActionReducer,\n checks: { action: (action: Action) => boolean }\n) {\n return function (state: any, action: Action) {\n if (checks.action(action) && !ngCore.NgZone.isInAngularZone()) {\n throw new Error(\n `Action '${action.type}' running outside NgZone. ${RUNTIME_CHECK_URL}#strictactionwithinngzone`\n );\n }\n return reducer(state, action);\n };\n}\n","import {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n Inject,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Provider,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n ActionReducerMap,\n StoreFeature,\n} from './models';\nimport { combineReducers, createReducerFactory } from './utils';\nimport {\n _ACTION_TYPE_UNIQUENESS_CHECK,\n _FEATURE_CONFIGS,\n _FEATURE_REDUCERS,\n _FEATURE_REDUCERS_TOKEN,\n _INITIAL_REDUCERS,\n _INITIAL_STATE,\n _REDUCER_FACTORY,\n _RESOLVED_META_REDUCERS,\n _ROOT_STORE_GUARD,\n _STORE_FEATURES,\n _STORE_REDUCERS,\n FEATURE_REDUCERS,\n FEATURE_STATE_PROVIDER,\n INITIAL_REDUCERS,\n INITIAL_STATE,\n META_REDUCERS,\n REDUCER_FACTORY,\n ROOT_STORE_PROVIDER,\n STORE_FEATURES,\n USER_PROVIDED_META_REDUCERS,\n} from './tokens';\nimport { ACTIONS_SUBJECT_PROVIDERS, ActionsSubject } from './actions_subject';\nimport {\n REDUCER_MANAGER_PROVIDERS,\n ReducerManager,\n ReducerObservable,\n} from './reducer_manager';\nimport {\n SCANNED_ACTIONS_SUBJECT_PROVIDERS,\n ScannedActionsSubject,\n} from './scanned_actions_subject';\nimport { STATE_PROVIDERS } from './state';\nimport { Store, STORE_PROVIDERS } from './store';\nimport {\n checkForActionTypeUniqueness,\n provideRuntimeChecks,\n} from './runtime_checks';\nimport {\n _concatMetaReducers,\n _createFeatureReducers,\n _createFeatureStore,\n _createStoreReducers,\n _initialStateFactory,\n _provideForRootGuard,\n FeatureSlice,\n RootStoreConfig,\n StoreConfig,\n} from './store_config';\n\nexport function provideState(\n featureName: string,\n reducers: ActionReducerMap | InjectionToken>,\n config?: StoreConfig | InjectionToken>\n): EnvironmentProviders;\nexport function provideState(\n featureName: string,\n reducer: ActionReducer | InjectionToken>,\n config?: StoreConfig | InjectionToken>\n): EnvironmentProviders;\nexport function provideState(\n slice: FeatureSlice\n): EnvironmentProviders;\n/**\n * Provides additional slices of state in the Store.\n * These providers cannot be used at the component level.\n *\n * @usageNotes\n *\n * ### Providing Store Features\n *\n * ```ts\n * const booksRoutes: Route[] = [\n * {\n * path: '',\n * providers: [provideState('books', booksReducer)],\n * children: [\n * { path: '', component: BookListComponent },\n * { path: ':id', component: BookDetailsComponent },\n * ],\n * },\n * ];\n * ```\n */\nexport function provideState(\n featureNameOrSlice: string | FeatureSlice,\n reducers?:\n | ActionReducerMap\n | InjectionToken>\n | ActionReducer\n | InjectionToken>,\n config: StoreConfig | InjectionToken> = {}\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n ..._provideState(featureNameOrSlice, reducers, config),\n ENVIRONMENT_STATE_PROVIDER,\n ]);\n}\n\nexport function _provideStore(\n reducers:\n | ActionReducerMap\n | InjectionToken>\n | Record = {},\n config: RootStoreConfig = {}\n): Provider[] {\n return [\n {\n provide: _ROOT_STORE_GUARD,\n useFactory: _provideForRootGuard,\n },\n { provide: _INITIAL_STATE, useValue: config.initialState },\n {\n provide: INITIAL_STATE,\n useFactory: _initialStateFactory,\n deps: [_INITIAL_STATE],\n },\n { provide: _INITIAL_REDUCERS, useValue: reducers },\n {\n provide: _STORE_REDUCERS,\n useExisting:\n reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS,\n },\n {\n provide: INITIAL_REDUCERS,\n deps: [_INITIAL_REDUCERS, [new Inject(_STORE_REDUCERS)]],\n useFactory: _createStoreReducers,\n },\n {\n provide: USER_PROVIDED_META_REDUCERS,\n useValue: config.metaReducers ? config.metaReducers : [],\n },\n {\n provide: _RESOLVED_META_REDUCERS,\n deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],\n useFactory: _concatMetaReducers,\n },\n {\n provide: _REDUCER_FACTORY,\n useValue: config.reducerFactory ? config.reducerFactory : combineReducers,\n },\n {\n provide: REDUCER_FACTORY,\n deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],\n useFactory: createReducerFactory,\n },\n ACTIONS_SUBJECT_PROVIDERS,\n REDUCER_MANAGER_PROVIDERS,\n SCANNED_ACTIONS_SUBJECT_PROVIDERS,\n STATE_PROVIDERS,\n STORE_PROVIDERS,\n provideRuntimeChecks(config.runtimeChecks),\n checkForActionTypeUniqueness(),\n ];\n}\n\nfunction rootStoreProviderFactory(): void {\n inject(ActionsSubject);\n inject(ReducerObservable);\n inject(ScannedActionsSubject);\n inject(Store);\n inject(_ROOT_STORE_GUARD, { optional: true });\n inject(_ACTION_TYPE_UNIQUENESS_CHECK, { optional: true });\n}\n\n/**\n * Environment Initializer used in the root\n * providers to initialize the Store\n */\nconst ENVIRONMENT_STORE_PROVIDER: Provider[] = [\n { provide: ROOT_STORE_PROVIDER, useFactory: rootStoreProviderFactory },\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => inject(ROOT_STORE_PROVIDER);\n },\n },\n];\n\n/**\n * Provides the global Store providers and initializes\n * the Store.\n * These providers cannot be used at the component level.\n *\n * @usageNotes\n *\n * ### Providing the Global Store\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideStore()],\n * });\n * ```\n */\nexport function provideStore(\n reducers?: ActionReducerMap | InjectionToken>,\n config?: RootStoreConfig\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n ..._provideStore(reducers, config),\n ENVIRONMENT_STORE_PROVIDER,\n ]);\n}\n\nfunction featureStateProviderFactory(): void {\n inject(ROOT_STORE_PROVIDER);\n const features = inject[]>(_STORE_FEATURES);\n const featureReducers = inject[]>(FEATURE_REDUCERS);\n const reducerManager = inject(ReducerManager);\n inject(_ACTION_TYPE_UNIQUENESS_CHECK, { optional: true });\n\n const feats = features.map((feature, index) => {\n const featureReducerCollection = featureReducers.shift();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const reducers = featureReducerCollection! /*TODO(#823)*/[index];\n\n return {\n ...feature,\n reducers,\n initialState: _initialStateFactory(feature.initialState),\n };\n });\n\n reducerManager.addFeatures(feats);\n}\n\n/**\n * Environment Initializer used in the feature\n * providers to register state features\n */\nconst ENVIRONMENT_STATE_PROVIDER: Provider[] = [\n {\n provide: FEATURE_STATE_PROVIDER,\n useFactory: featureStateProviderFactory,\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => inject(FEATURE_STATE_PROVIDER);\n },\n },\n];\n\nexport function _provideState(\n featureNameOrSlice: string | FeatureSlice,\n reducers?:\n | ActionReducerMap\n | InjectionToken>\n | ActionReducer\n | InjectionToken>,\n config: StoreConfig | InjectionToken> = {}\n): Provider[] {\n return [\n {\n provide: _FEATURE_CONFIGS,\n multi: true,\n useValue: featureNameOrSlice instanceof Object ? {} : config,\n },\n {\n provide: STORE_FEATURES,\n multi: true,\n useValue: {\n key:\n featureNameOrSlice instanceof Object\n ? featureNameOrSlice.name\n : featureNameOrSlice,\n reducerFactory:\n !(config instanceof InjectionToken) && config.reducerFactory\n ? config.reducerFactory\n : combineReducers,\n metaReducers:\n !(config instanceof InjectionToken) && config.metaReducers\n ? config.metaReducers\n : [],\n initialState:\n !(config instanceof InjectionToken) && config.initialState\n ? config.initialState\n : undefined,\n },\n },\n {\n provide: _STORE_FEATURES,\n deps: [_FEATURE_CONFIGS, STORE_FEATURES],\n useFactory: _createFeatureStore,\n },\n {\n provide: _FEATURE_REDUCERS,\n multi: true,\n useValue:\n featureNameOrSlice instanceof Object\n ? featureNameOrSlice.reducer\n : reducers,\n },\n {\n provide: _FEATURE_REDUCERS_TOKEN,\n multi: true,\n useExisting:\n reducers instanceof InjectionToken ? reducers : _FEATURE_REDUCERS,\n },\n {\n provide: FEATURE_REDUCERS,\n multi: true,\n deps: [_FEATURE_REDUCERS, [new Inject(_FEATURE_REDUCERS_TOKEN)]],\n useFactory: _createFeatureReducers,\n },\n checkForActionTypeUniqueness(),\n ];\n}\n","import {\n Inject,\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n OnDestroy,\n Optional,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n ActionReducerMap,\n StoreFeature,\n} from './models';\nimport {\n _ACTION_TYPE_UNIQUENESS_CHECK,\n _ROOT_STORE_GUARD,\n _STORE_FEATURES,\n FEATURE_REDUCERS,\n} from './tokens';\nimport { ActionsSubject } from './actions_subject';\nimport { ReducerManager, ReducerObservable } from './reducer_manager';\nimport { ScannedActionsSubject } from './scanned_actions_subject';\nimport { Store } from './store';\nimport {\n _initialStateFactory,\n FeatureSlice,\n RootStoreConfig,\n StoreConfig,\n} from './store_config';\nimport { _provideState, _provideStore } from './provide_store';\n\n@NgModule({})\nexport class StoreRootModule {\n constructor(\n actions$: ActionsSubject,\n reducer$: ReducerObservable,\n scannedActions$: ScannedActionsSubject,\n store: Store,\n @Optional()\n @Inject(_ROOT_STORE_GUARD)\n guard: any,\n @Optional()\n @Inject(_ACTION_TYPE_UNIQUENESS_CHECK)\n actionCheck: any\n ) {}\n}\n\n@NgModule({})\nexport class StoreFeatureModule implements OnDestroy {\n constructor(\n @Inject(_STORE_FEATURES) private features: StoreFeature[],\n @Inject(FEATURE_REDUCERS) private featureReducers: ActionReducerMap[],\n private reducerManager: ReducerManager,\n root: StoreRootModule,\n @Optional()\n @Inject(_ACTION_TYPE_UNIQUENESS_CHECK)\n actionCheck: any\n ) {\n const feats = features.map((feature, index) => {\n const featureReducerCollection = featureReducers.shift();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const reducers = featureReducerCollection! /*TODO(#823)*/[index];\n\n return {\n ...feature,\n reducers,\n initialState: _initialStateFactory(feature.initialState),\n };\n });\n\n reducerManager.addFeatures(feats);\n }\n\n // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n ngOnDestroy() {\n this.reducerManager.removeFeatures(this.features);\n }\n}\n\n@NgModule({})\nexport class StoreModule {\n static forRoot(\n reducers?: ActionReducerMap | InjectionToken>,\n config?: RootStoreConfig\n ): ModuleWithProviders {\n return {\n ngModule: StoreRootModule,\n providers: [..._provideStore(reducers, config)],\n };\n }\n\n static forFeature(\n featureName: string,\n reducers: ActionReducerMap | InjectionToken>,\n config?: StoreConfig | InjectionToken>\n ): ModuleWithProviders;\n static forFeature(\n featureName: string,\n reducer: ActionReducer | InjectionToken>,\n config?: StoreConfig | InjectionToken>\n ): ModuleWithProviders;\n static forFeature(\n slice: FeatureSlice\n ): ModuleWithProviders;\n static forFeature(\n featureNameOrSlice: string | FeatureSlice,\n reducers?:\n | ActionReducerMap\n | InjectionToken>\n | ActionReducer\n | InjectionToken>,\n config: StoreConfig | InjectionToken> = {}\n ): ModuleWithProviders {\n return {\n ngModule: StoreFeatureModule,\n providers: [..._provideState(featureNameOrSlice, reducers, config)],\n };\n }\n}\n","import { ActionCreator, ActionReducer, ActionType, Action } from './models';\n\n// Goes over the array of ActionCreators, pulls the action type out of each one\n// and returns the array of these action types.\ntype ExtractActionTypes = {\n [Key in keyof Creators]: Creators[Key] extends ActionCreator\n ? T\n : never;\n};\n\n/**\n * Return type of the `on` fn.\n * Contains the action reducer coupled to one or more action types.\n */\nexport interface ReducerTypes<\n State,\n Creators extends readonly ActionCreator[]\n> {\n reducer: OnReducer;\n types: ExtractActionTypes;\n}\n\n/**\n * Specialized Reducer that is aware of the Action type it needs to handle\n */\nexport interface OnReducer<\n // State type that is being passed from consumer of `on` fn, e.g. from `createReducer` factory\n State,\n Creators extends readonly ActionCreator[],\n // Inferred type from within OnReducer function if `State` is unknown\n InferredState = State,\n // Resulting state would be either a State or if State is unknown then the inferred state from the function itself\n ResultState = unknown extends State ? InferredState : State\n> {\n (\n // if State is unknown then set the InferredState type\n state: unknown extends State ? InferredState : State,\n action: ActionType\n ): ResultState;\n}\n\n/**\n * @description\n * Associates actions with a given state change function.\n * A state change function must be provided as the last parameter.\n *\n * @param args `ActionCreator`'s followed by a state change function.\n *\n * @returns an association of action types with a state change function.\n *\n * @usageNotes\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n */\nexport function on<\n // State type that is being passed from `createReducer` when created within that factory function\n State,\n // Action creators\n Creators extends readonly ActionCreator[],\n // Inferred type from within OnReducer function if `State` is unknown. This is typically the case when `on` function\n // is created outside of `createReducer` and state type is either explicitly set OR inferred by return type.\n // For example: `const onFn = on(action, (state: State, {prop}) => ({ ...state, name: prop }));`\n InferredState = State\n>(\n ...args: [\n ...creators: Creators,\n reducer: OnReducer<\n State extends infer S ? S : never,\n Creators,\n InferredState\n >\n ]\n): ReducerTypes {\n const reducer = args.pop() as unknown as OnReducer<\n unknown extends State ? InferredState : State,\n Creators\n >;\n const types = (args as unknown as Creators).map(\n (creator) => creator.type\n ) as unknown as ExtractActionTypes;\n return { reducer, types };\n}\n\n/**\n * @description\n * Creates a reducer function to handle state transitions.\n *\n * Reducer creators reduce the explicitness of reducer functions with switch statements.\n *\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @param ons Associations between actions and state changes.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators.\n * - The returned `ActionReducer` does not require being wrapped with another function.\n *\n * **Declaring a reducer creator**\n *\n * ```ts\n * export const reducer = createReducer(\n * initialState,\n * on(\n * featureActions.actionOne,\n * featureActions.actionTwo,\n * (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n * ),\n * on(featureActions.actionThree, () => initialState);\n * );\n * ```\n */\nexport function createReducer<\n S,\n A extends Action = Action,\n // Additional generic for the return type is introduced to enable correct\n // type inference when `createReducer` is used within `createFeature`.\n // For more info see: https://github.com/microsoft/TypeScript/issues/52114\n R extends ActionReducer = ActionReducer\n>(initialState: S, ...ons: ReducerTypes[]): R {\n const map = new Map>();\n for (const on of ons) {\n for (const type of on.types) {\n const existingReducer = map.get(type);\n if (existingReducer) {\n const newReducer: typeof existingReducer = (state, action) =>\n on.reducer(existingReducer(state, action), action);\n map.set(type, newReducer);\n } else {\n map.set(type, on.reducer);\n }\n }\n }\n\n return function (state: S = initialState, action: A): S {\n const reducer = map.get(action.type);\n return reducer ? reducer(state, action) : state;\n } as R;\n}\n","import { ChangeDetectorRef, Input, Component } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\n\nimport { v4 as uuid } from 'uuid';\n\nimport { coerceBooleanProperty } from '../../../utils/utils';\n\n@Component({ template: '' })\nexport class AbstractNgModelComponent implements ControlValueAccessor {\n @Input()\n cid: string = uuid();\n\n @Input()\n get disabled(): boolean {\n return this.pDisabled;\n }\n set disabled(dis) {\n this.pDisabled = coerceBooleanProperty(dis);\n this.cdRef.markForCheck();\n }\n protected pDisabled = false;\n\n @Input()\n set value(value: T) {\n this.pValue = value;\n this.notifyValueChange();\n }\n\n get value(): T {\n return this.pValue;\n }\n\n onChange: (value: T) => unknown;\n onTouched: () => unknown;\n\n protected pValue: T;\n\n constructor(protected cdRef: ChangeDetectorRef) {}\n\n notifyValueChange(): void {\n if (this.onChange) {\n this.onChange(this.value);\n }\n }\n\n writeValue(value: T): void {\n this.pValue = value;\n this.cdRef.markForCheck();\n }\n\n registerOnChange(fn: (value: T) => unknown): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => unknown): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}\n","import { Component, EventEmitter, Input, Output, ChangeDetectorRef, OnInit, Injector, DoCheck } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nimport { AbstractNgModelComponent } from './abstract-ng-model.component';\nimport { coerceBooleanProperty } from '../../../utils/utils';\n\n@Component({ template: '' })\nexport class AbstractInputComponent extends AbstractNgModelComponent implements OnInit, DoCheck {\n @Input()\n get readonly(): boolean {\n return this.pReadOnly;\n }\n set readonly(req) {\n this.pReadOnly = coerceBooleanProperty(req);\n this.cdRef.markForCheck();\n }\n public pReadOnly = false;\n\n @Input()\n get required(): boolean {\n return this.pRequired;\n }\n set required(req) {\n this.pRequired = coerceBooleanProperty(req);\n this.cdRef.markForCheck();\n }\n public pRequired = false;\n\n @Input()\n placeholder = '';\n\n @Input()\n get type(): string {\n return this.pType;\n }\n set type(type: string) {\n this.pType = type;\n }\n private pType = 'text';\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output()\n blur = new EventEmitter();\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output()\n focus = new EventEmitter();\n\n ngControl: NgControl;\n errorState = false;\n focused = false;\n\n constructor(\n cdRef: ChangeDetectorRef,\n private injector: Injector\n ) {\n super(cdRef);\n }\n\n ngOnInit(): void {\n this.ngControl = this.injector.get(NgControl, null);\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n this.errorState = this.ngControl.invalid && this.ngControl.touched;\n }\n }\n\n blurEvent(): void {\n this.focused = false;\n this.blur.next();\n if (this.onTouched) {\n this.onTouched();\n }\n this.cdRef.markForCheck();\n }\n\n focusEvent(): void {\n this.focused = true;\n this.focus.next();\n this.cdRef.markForCheck();\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsOffer } from '@fcom/core-api';\n\nimport { BlockOfferData } from '../../interfaces';\nimport { toPromoBlock } from '../../services';\n\n@Component({\n selector: 'cms-category',\n templateUrl: './cms-category.component.html',\n styleUrls: ['./cms-category.component.scss'],\n})\nexport class CmsCategoryComponent implements OnInit {\n @Input()\n content$: Observable;\n offerData$: Observable;\n\n ngOnInit(): void {\n this.offerData$ = this.content$.pipe(map((c: CmsOffer) => toPromoBlock(c)));\n }\n}\n"," \n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n OnDestroy,\n Output,\n Input,\n Optional,\n Inject,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { Subject, fromEvent, merge } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith, takeUntil, withLatestFrom } from 'rxjs/operators';\n\n/**\n * This directive fires an event when click outside of the element where it is attached to is detected.\n * Used for example to close modals when user clicks outside of the modal content.\n *\n * @example\n * \n *

    \n *    
    \n * Some content\n *
    \n *
    \n * \n */\n@Directive({\n selector: '[fcomClickOutside]',\n})\nexport class ClickOutsideDirective implements AfterViewInit, OnDestroy {\n /**\n * Tag name that you want to exclude from firing the output event\n */\n @Input() clickOutsideException = '';\n\n @Output()\n fcomClickOutside: EventEmitter = new EventEmitter();\n\n private ngDestroyed$ = new Subject();\n\n constructor(\n private elementRef: ElementRef,\n @Optional() @Inject(DOCUMENT) private document: Document\n ) {}\n\n ngAfterViewInit(): void {\n if (!this.document) {\n return;\n }\n // setTimeout needed for the event not to occur when click inserts this directive in DOM\n setTimeout(() => {\n const click$ = fromEvent(this.document, 'click');\n\n const focusState$ = merge(\n fromEvent(this.elementRef.nativeElement, 'focusin').pipe(map(() => true)),\n fromEvent(this.elementRef.nativeElement, 'focusout').pipe(map(() => false))\n ).pipe(startWith(false), distinctUntilChanged());\n\n click$\n .pipe(\n withLatestFrom(focusState$),\n filter(([event, isFocused]) => {\n if (!(event.target instanceof Element) || isFocused) {\n return false;\n }\n return (\n !(this.elementRef.nativeElement as HTMLElement).contains(event.target) && !this.exceptionInPath(event)\n );\n }),\n takeUntil(this.ngDestroyed$)\n )\n .subscribe(([event]) => this.fcomClickOutside.emit(event));\n });\n }\n\n ngOnDestroy(): void {\n this.ngDestroyed$.next(true);\n }\n\n private exceptionInPath(event: Event): boolean {\n if (this.clickOutsideException === '') {\n return false; // dont even check if input is not given\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (!event.composedPath) {\n return true; // native clicks have this but test suite clicks dont\n }\n return !!event.composedPath().find((pathElem: Element) => pathElem.localName === this.clickOutsideException);\n }\n}\n","export enum JourneyType {\n RETURN = 'return',\n ONEWAY = 'oneway',\n COMPLEX = 'complex',\n}\n","import { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\n\nexport function scan(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction;\nexport function scan(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction;\nexport function scan(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction;\n\n// TODO: link to a \"redux pattern\" section in the guide (location TBD)\n\n/**\n * Useful for encapsulating and managing state. Applies an accumulator (or \"reducer function\")\n * to each value from the source after an initial state is established -- either via\n * a `seed` value (second argument), or from the first value from the source.\n *\n * It's like {@link reduce}, but emits the current\n * accumulation state after each update\n *\n * ![](scan.png)\n *\n * This operator maintains an internal state and emits it after processing each value as follows:\n *\n * 1. First value arrives\n * - If a `seed` value was supplied (as the second argument to `scan`), let `state = seed` and `value = firstValue`.\n * - If NO `seed` value was supplied (no second argument), let `state = firstValue` and go to 3.\n * 2. Let `state = accumulator(state, value)`.\n * - If an error is thrown by `accumulator`, notify the consumer of an error. The process ends.\n * 3. Emit `state`.\n * 4. Next value arrives, let `value = nextValue`, go to 2.\n *\n * ## Examples\n *\n * An average of previous numbers. This example shows how\n * not providing a `seed` can prime the stream with the\n * first value from the source.\n *\n * ```ts\n * import { of, scan, map } from 'rxjs';\n *\n * const numbers$ = of(1, 2, 3);\n *\n * numbers$\n * .pipe(\n * // Get the sum of the numbers coming in.\n * scan((total, n) => total + n),\n * // Get the average by dividing the sum by the total number\n * // received so far (which is 1 more than the zero-based index).\n * map((sum, index) => sum / (index + 1))\n * )\n * .subscribe(console.log);\n * ```\n *\n * The Fibonacci sequence. This example shows how you can use\n * a seed to prime accumulation process. Also... you know... Fibonacci.\n * So important to like, computers and stuff that its whiteboarded\n * in job interviews. Now you can show them the Rx version! (Please don't, haha)\n *\n * ```ts\n * import { interval, scan, map, startWith } from 'rxjs';\n *\n * const firstTwoFibs = [0, 1];\n * // An endless stream of Fibonacci numbers.\n * const fibonacci$ = interval(1000).pipe(\n * // Scan to get the fibonacci numbers (after 0, 1)\n * scan(([a, b]) => [b, a + b], firstTwoFibs),\n * // Get the second number in the tuple, it's the one you calculated\n * map(([, n]) => n),\n * // Start with our first two digits :)\n * startWith(...firstTwoFibs)\n * );\n *\n * fibonacci$.subscribe(console.log);\n * ```\n *\n * @see {@link expand}\n * @see {@link mergeScan}\n * @see {@link reduce}\n * @see {@link switchScan}\n *\n * @param accumulator A \"reducer function\". This will be called for each value after an initial state is\n * acquired.\n * @param seed The initial state. If this is not provided, the first value from the source will\n * be used as the initial state, and emitted without going through the accumulator. All subsequent values\n * will be processed by the accumulator function. If this is provided, all values will go through\n * the accumulator function.\n * @return A function that returns an Observable of the accumulated values.\n */\nexport function scan(accumulator: (acc: V | A | S, value: V, index: number) => A, seed?: S): OperatorFunction {\n // providing a seed of `undefined` *should* be valid and trigger\n // hasSeed! so don't use `seed !== undefined` checks!\n // For this reason, we have to check it here at the original call site\n // otherwise inside Operator/Subscriber we won't know if `undefined`\n // means they didn't provide anything or if they literally provided `undefined`\n return operate(scanInternals(accumulator, seed as S, arguments.length >= 2, true));\n}\n","
    \n \n \n \n {{ videoTitle$ | async }}\n \n \n \n \n\n \n \n \n
    \n","import { ChangeDetectionStrategy, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { youtubeIdFromUrl } from '@fcom/core/utils';\nimport { finShare, safeMap } from '@fcom/rx';\nimport { StaticPicture } from '@fcom/core-api';\nimport { ModalButtons } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-video',\n templateUrl: './video.component.html',\n styleUrls: ['./video.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VideoComponent implements OnInit {\n readonly ModalButtons = ModalButtons;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n videoUrl$: Observable;\n @Input()\n videoTitle$?: Observable;\n @Input()\n showPopup = false;\n @Input()\n noMargin = false;\n @ViewChild('videoIframe', { static: false })\n iframe: ElementRef;\n @ViewChild('videoWrapper', { static: false })\n videoWrapper: ElementRef;\n\n videoId$: Observable;\n videoFinalUrl$: Observable;\n youtubePreviewPicture$: Observable;\n previewVisible$: Observable;\n iframeVisible$: BehaviorSubject = new BehaviorSubject(false);\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnInit(): void {\n this.previewVisible$ = this.iframeVisible$.pipe(map((visible) => !visible));\n this.videoId$ = this.videoUrl$.pipe(safeMap(youtubeIdFromUrl), finShare());\n this.videoFinalUrl$ = this.videoId$.pipe(\n safeMap(\n (videoId) =>\n `https://www.youtube.com/embed/${videoId}` +\n '?modestbranding=1' + // Show as little YouTube branding as possible\n '&rel=0' + // Show related videos out of same channel only\n '&autoplay=1' // Autoplay when loaded (as only loaded on click interaction)\n ),\n map((url) => this.sanitizer.bypassSecurityTrustResourceUrl(url)),\n finShare()\n );\n this.youtubePreviewPicture$ = this.videoId$.pipe(\n safeMap((videoId: string): StaticPicture => {\n return {\n thumbnailSrc: `//i.ytimg.com/vi/${videoId}/default.jpg`,\n fullSizeUrl: `//i.ytimg.com/vi/${videoId}/hqdefault.jpg`,\n };\n }),\n finShare()\n );\n }\n\n playVideo(): void {\n this.iframeVisible$.next(true);\n }\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fin-form-error',\n styleUrls: ['./form-error.component.scss'],\n templateUrl: './form-error.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormErrorComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n errorText: string;\n}\n","
    \n
    \n
    \n \n
    \n \n {{ errorText }}\n \n
    \n
    \n","import { Inject, Injectable, Renderer2 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { Title, Meta } from '@angular/platform-browser';\nimport { Router } from '@angular/router';\n\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { startWith, delay, distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { ConfigService } from '@fcom/core/services';\nimport { isPresent } from '@fcom/core/utils';\nimport { urlWithoutQueryString } from '@fcom/core/utils/app-url-utils';\n\nconst PROTOCOL_AND_HOST_REGEX = /^(https?:)?\\/\\/([^/]*)/;\n\nexport interface CmsPageComponentMetaData {\n tagName: string;\n attributes: { [key: string]: string };\n}\n\n/**\n * Cross-platform get documentElement from the document object\n * @param doc\n */\nconst getDocumentElement = (doc: Document): any => {\n if (doc.documentElement) {\n return doc.documentElement;\n }\n return Array.from(doc.children).filter((e: any) => (e.nodeName || e.name || '').toLowerCase() === 'html')[0];\n};\n\n// Not really, but for now\nconst ISO_639_1_LANG_REGEX = /^(\\w{2}-)?(\\w{2})$/;\nconst getLangCode = (langValue: string) => {\n const lang = ISO_639_1_LANG_REGEX.exec(langValue);\n return lang?.[2];\n};\n\nexport interface Links {\n [lang: string]: string;\n}\n\nexport interface UrlToLinks {\n url: string;\n links: Links;\n}\n\n@Injectable()\nexport class PageMetaService {\n private linksReplaySubject$: ReplaySubject = new ReplaySubject(1);\n private linksForUrlReplaySubject$: ReplaySubject = new ReplaySubject(1);\n private pageTitle$: ReplaySubject = new ReplaySubject(1);\n private pageDescription$: ReplaySubject = new ReplaySubject(1);\n private pageDefaultOriginLocationCode$: ReplaySubject = new ReplaySubject(1);\n private allowableLocales: string[];\n private baseUrl: string;\n\n prevPageUrl$: ReplaySubject = new ReplaySubject(1);\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private titleService: Title,\n private metaService: Meta,\n private configService: ConfigService,\n private router: Router\n ) {\n this.allowableLocales = Object.keys(this.configService.cfg.allowedLocales).map((key) =>\n this.configService.cfg.allowedLocales[key].replace('_', '-')\n );\n this.baseUrl = this.configService.cfg.baseUrl;\n }\n\n /**\n * Set the content of the tag in HTML.\n *\n * @param title the title to set\n */\n setTitle(title: string): void {\n this.titleService.setTitle(title);\n this.metaService.updateTag({ name: 'og:title', content: title });\n this.metaService.updateTag({ class: 'elastic', name: 'elastic_title', content: title });\n this.pageTitle$.next(title);\n }\n\n setDescription(description: string): void {\n this.pageDescription$.next(description);\n this.metaService.updateTag({ name: 'description', content: description });\n this.metaService.updateTag({ name: 'og:description', content: description });\n }\n\n setHref(href: string, hreflang: string): void {\n this.metaService.updateTag({ cmspage: '', rel: 'alternate', hreflang: hreflang, href: href });\n }\n\n removeExistingMetaTags(): void {\n this.metaService.removeTag('name=\"description\"');\n this.metaService.removeTag('name=\"og:description\"');\n this.metaService.removeTag('name=\"og:title\"');\n }\n\n setDefaultOriginLocationCode(defaultOriginLocationCode: string): void {\n this.pageDefaultOriginLocationCode$.next(defaultOriginLocationCode);\n }\n\n setMetaTags(tags: CmsPageComponentMetaData[], renderer: Renderer2): void {\n this.removePreviousCmsPageTagsFromHeader(renderer);\n this.removeExistingMetaTags();\n\n tags.forEach((e: CmsPageComponentMetaData) => {\n const element = renderer.createElement(e.tagName);\n const attributes = e.attributes;\n if (attributes.property === 'og:title') {\n this.metaService.updateTag({ class: 'elastic', name: 'elastic_title', content: attributes.content });\n }\n\n if (attributes.property === 'og:url') {\n attributes.content = this.replaceHostnameAndProtocol(attributes.content);\n }\n\n renderer.setAttribute(element, 'cmspage', '');\n Object.keys(attributes).forEach((key) => {\n const value = key === 'href' ? this.replaceHostnameAndProtocol(attributes[key]) : attributes[key];\n renderer.setAttribute(element, key, value);\n });\n\n renderer.appendChild(this.document.head, element);\n });\n }\n\n get title$(): Observable<string> {\n return this.pageTitle$.asObservable().pipe(delay(0));\n }\n\n get description(): Observable<string> {\n return this.pageDescription$.asObservable();\n }\n\n get links(): Observable<Links> {\n return this.linksReplaySubject$.asObservable().pipe(startWith({}));\n }\n\n get defaultOriginLocationCode$(): Observable<string> {\n return this.pageDefaultOriginLocationCode$.asObservable().pipe(distinctUntilChanged());\n }\n\n /**\n * Returns Links for give page url\n * @param url current page url\n * @returns Links for the current page url\n */\n linksForUrl(url: string): Observable<Links> {\n return this.linksForUrlReplaySubject$.asObservable().pipe(\n filter((item) => item.url === url),\n map((item) => item.links)\n );\n }\n\n /**\n * Create tags from all objects under metaData list\n *\n * Removes host name and protocol from the target url\n *\n * @param elements\n * @param renderer\n */\n moveMetaAndLinksToHead(elements: CmsPageComponentMetaData[], renderer: Renderer2): void {\n const elems: CmsPageComponentMetaData[] = this.removeNotAllowedHreflangs(elements);\n this.linksReplaySubject$.next(this.getLinksFromMetadata(elems));\n this.linksForUrlReplaySubject$.next({\n url: urlWithoutQueryString(this.router.url),\n links: this.getLinksFromMetadata(elems),\n });\n\n this.setMetaTags(elems, renderer);\n }\n\n movePreloadImageLinksToHead(renderer: Renderer2, href: string, width?: number): void {\n const existingLink = this.document.head.querySelector(`link[href=\"${href}\"]`);\n if (existingLink) {\n return;\n }\n const link: HTMLLinkElement = renderer.createElement('link');\n renderer.setAttribute(link, 'href', href);\n renderer.setAttribute(link, 'rel', 'preload');\n renderer.setAttribute(link, 'as', 'image');\n if (width) {\n renderer.setAttribute(link, 'media', `(min-width: ${width}px)`);\n }\n renderer.appendChild(this.document.head, link);\n }\n\n removePreloadImageLinksFromHead(renderer: Renderer2, href: string): void {\n const link = this.document.head.querySelector(`link[href=\"${href}\"]`);\n if (link) {\n renderer.removeChild(this.document.head, link);\n }\n }\n\n setDocumentLanguage(lang: string, renderer: Renderer2): void {\n const doc = getDocumentElement(this.document);\n renderer.setProperty(doc, 'lang', getLangCode(lang));\n renderer.setAttribute(doc, 'xml:lang', getLangCode(lang));\n }\n\n private removePreviousCmsPageTagsFromHeader(renderer: Renderer2) {\n // Parse5 elements on server contains only attribs object and it does not have NamedNodeMap like real DOM\n const onlyCmsPageNodes = (n: HTMLElement) => n.attributes && isPresent(n.attributes.getNamedItem('cmspage'));\n Array.from(this.document.head.children)\n .filter(onlyCmsPageNodes)\n .forEach((tag) => {\n renderer.removeChild(this.document.head, tag);\n });\n }\n\n private removeNotAllowedHreflangs(meta: CmsPageComponentMetaData[]): CmsPageComponentMetaData[] {\n return meta.filter((tag) => {\n const hreflang = tag.attributes['hreflang'];\n const allowedLanguage = hreflang && this.verifyHreflang(hreflang);\n return !hreflang || allowedLanguage;\n });\n }\n\n private verifyHreflang(hreflang: string): boolean {\n return this.allowableLocales.indexOf(hreflang) > -1 || hreflang === 'x-default';\n }\n\n private langFromHrefLang(hreflang: string): string {\n return hreflang === 'x-default' ? 'en' : hreflang.split('-').reverse().join('-').toLowerCase();\n }\n\n private getLinksFromMetadata(meta: CmsPageComponentMetaData[]): Links {\n return meta\n .filter((tag) => isPresent(tag.attributes['hreflang']))\n .reduce((acc, tag) => {\n const lang: string = this.langFromHrefLang(tag.attributes['hreflang']);\n if (lang) {\n acc[lang] = this.replaceHostnameAndProtocol(tag.attributes['href']);\n }\n\n return acc;\n }, {});\n }\n\n private replaceHostnameAndProtocol(str: string): string {\n let returnString = str;\n // Remove the CMS protocol and host if needed\n if (PROTOCOL_AND_HOST_REGEX.test(str)) {\n returnString = str.replace(PROTOCOL_AND_HOST_REGEX, '');\n }\n return this.baseUrl + returnString;\n }\n}\n","<div class=\"notification block\" [ngClass]=\"notificationStyle\">\n <div\n *ngIf=\"layout === NotificationLayout.EDGE_TO_EDGE && !excludeColumns; else wrappedContentTpl\"\n class=\"grid-max-width grid-col-12\"\n >\n <div class=\"col-1-12\">\n <ng-container *ngTemplateOutlet=\"wrappedContentTpl\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #wrappedContentTpl>\n <div\n class=\"flex flex--start\"\n [ngClass]=\"{\n 'ps-medium': !this.compact && !removePadding,\n 'ps-xsmall': this.compact && !removePadding,\n 'flex--middle': this.compact,\n }\"\n >\n <fcom-icon\n *ngIf=\"displayedIcon\"\n class=\"message-type ms-xsmall-r flex--nogrow\"\n [ngClass]=\"{ 'icon-small': compact, 'icon-medium': !compact }\"\n [category]=\"iconCategory\"\n [name]=\"displayedIcon\"\n ></fcom-icon>\n\n <div\n class=\"flex flex-1\"\n [ngClass]=\"{\n 'flex--column row-gap': !horizontal,\n 'font-body-1': !compact,\n 'font-body-2': compact,\n }\"\n >\n <div class=\"ps-xsmall-r flex--self-start\">\n <span *ngIf=\"title\" class=\"bold-type block ms-xsmall-b\">{{ title }}</span>\n <ng-content></ng-content>\n </div>\n <ng-container *ngIf=\"linkText\">\n <div *ngIf=\"linkUrl\">\n <fcom-link\n class=\"ms-xsmall-r flex--self-start\"\n [href]=\"linkUrl\"\n [openInNewTab]=\"linkOpenInNewWindow\"\n [external]=\"linkOpenInNewWindow\"\n (beforeNavigation)=\"linkClick.emit($event)\"\n >{{ linkText }}</fcom-link\n >\n\n <fcom-link\n *ngIf=\"secondaryLinkUrl && secondaryLinkText\"\n class=\"ms-xsmall-r flex--self-start\"\n [href]=\"secondaryLinkUrl\"\n [openInNewTab]=\"secondaryLinkOpenInNewWindow\"\n [external]=\"secondaryLinkOpenInNewWindow\"\n (beforeNavigation)=\"secondaryLinkClick.emit($event)\"\n >{{ secondaryLinkText }}</fcom-link\n >\n </div>\n\n <div *ngIf=\"!linkUrl\" [ngClass]=\"{ 'flex--self-end': buttonStyle !== NotificationButtonStyle.LINK }\">\n <ng-container\n *ngTemplateOutlet=\"buttonStyle === NotificationButtonStyle.LINK ? linkButtons : ctaButtons\"\n ></ng-container>\n </div>\n </ng-container>\n </div>\n <fcom-loader [loaderType]=\"LoaderTheme.INLINE_TEXT\" *ngIf=\"isLoading\"></fcom-loader>\n <div class=\"close-button-wrapper\" *ngIf=\"isClosable && !isLoading\">\n <fcom-icon-button\n [icon]=\"closeIcon\"\n [aria]=\"{ label: i18n.closeAriaLabel | finLocalization }\"\n [size]=\"IconButtonSize.SMALL\"\n [theme]=\"\n theme === NotificationTheme.CAMPAIGN\n ? IconButtonTheme.DARK_TERTIARY_GHOST\n : IconButtonTheme.LIGHT_TERTIARY_GHOST\n \"\n (clickBtn)=\"closeClick.emit($event)\"\n data-testid=\"close-button\"\n ></fcom-icon-button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #ctaButtons>\n <fcom-button\n *ngIf=\"secondaryLinkText && !secondaryLinkUrl\"\n [text]=\"secondaryLinkText\"\n [theme]=\"theme === NotificationTheme.CAMPAIGN ? ButtonTheme.DARK_TERTIARY_GHOST : ButtonTheme.LIGHT_TERTIARY_GHOST\"\n (click)=\"secondaryLinkClick.emit($event)\"\n >\n </fcom-button>\n <fcom-button\n class=\"ms-small-l\"\n [text]=\"linkText\"\n [theme]=\"\n theme === NotificationTheme.CAMPAIGN\n ? ButtonTheme.DARK_PRIMARY_NORDIC_BLUE\n : ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\n \"\n (click)=\"linkClick.emit($event)\"\n >\n </fcom-button>\n</ng-template>\n\n<ng-template #linkButtons>\n <fcom-link\n class=\"ms-xsmall-r flex--self-start\"\n *ngIf=\"secondaryLinkText\"\n (afterNavigation)=\"secondaryLinkClick.emit($event)\"\n >\n {{ secondaryLinkText }}\n </fcom-link>\n <fcom-link class=\"ms-xsmall-r flex--self-start\" (afterNavigation)=\"linkClick.emit($event)\">\n {{ linkText }}\n </fcom-link>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { ButtonSize, ButtonTheme, IconButtonSize, IconButtonTheme } from '../../buttons';\nimport { type IconName, type IconSet } from '../../icons';\nimport { LoaderTheme } from '../../loader';\n\nexport enum NotificationTheme {\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n ALERT = 'alert',\n SUSTAINABILITY = 'sustainability',\n CAMPAIGN = 'campaign',\n TRANSPARENT = 'transparent',\n}\n\nexport enum NotificationLayout {\n BLOCK = 'block',\n EDGE_TO_EDGE = 'edge_to_edge',\n OVERLAY = 'overlay',\n}\n\nexport enum NotificationButtonStyle {\n BUTTON = 'button',\n LINK = 'link',\n}\n\nexport interface NotificationI18n {\n closeAriaLabel: string;\n}\n\n/**\n * A component to display varied forms of notifications.\n *\n * Zeplin designs are available [here](https://zpl.io/adG00Wl)\n *\n * There is many options available, but in many cases you won't need most of these.\n *\n * @example\n * <fcom-notification\n * [theme]=\"theme\"\n * [layout]=\"layout\"\n * [isClosable]=\"isClosable\"\n * [linkText]=\"linkText\"\n * [linkUrl]=\"linkUrl\"\n * [iconName]=\"SvgLibraryIcon.INFO_BLOCK\"\n * [contentSpaceClass]=\"ContentSpaceClass.PX_SMALL_Y\"\n * (linkClick)=\"linkClick($event)\"\n * (closeClick)=\"closeClick($event)\">\n * {{text}}\n * </fcom-notification>\n */\n@Component({\n selector: 'fcom-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NotificationComponent implements OnInit, OnChanges {\n readonly NotificationButtonStyle = NotificationButtonStyle;\n readonly NotificationLayout = NotificationLayout;\n readonly NotificationTheme = NotificationTheme;\n\n readonly ButtonSize = ButtonSize;\n readonly ButtonTheme = ButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly LoaderTheme = LoaderTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @HostBinding('class') hostClass = 'block';\n\n /**\n * What color scheme to use for the component\n */\n @Input()\n theme: NotificationTheme = NotificationTheme.INFO;\n\n /**\n * Whether the component should be block, full width or toast\n */\n @Input()\n layout: NotificationLayout = NotificationLayout.BLOCK;\n\n /**\n * Determines the style of buttons in the notification component,\n * allowing links to be shown instead of traditional buttons.\n */\n @Input()\n buttonStyle: NotificationButtonStyle;\n\n /**\n * Override the close icon\n */\n @Input()\n closeIcon: IconSet = {\n category: IconLibrary.SVG_LIBRARY,\n name: SvgLibraryIcon.CLOSE_DELETE,\n };\n\n /**\n * Displays a loading animation.\n */\n @Input()\n isLoading = false;\n\n /**\n * Whether to show the close icon or not\n */\n @Input()\n isClosable = false;\n\n @Input()\n title: string;\n\n /**\n * Whether to display link text wrapped (on the same line) or not (on a new line).\n */\n @Input()\n horizontal = false;\n\n /**\n * In case of EDGE_TO_EDGE layout is used without the need of wrapping the content in columns,\n * then this flag should be set to true\n */\n @Input()\n excludeColumns = false;\n\n /**\n * Reduces paddings, font size and icon size\n */\n @Input()\n compact = false;\n\n /**\n * The text to use for a link. If no URL is passed it will be rendered as a button. Otherwise, it\n * will be an A tag.\n */\n @Input()\n linkText: string;\n\n /**\n * The url to go to. If you wish to handle this behavior yourself you can listen to the linkClick\n * event and `event.preventDefault` to stop the browser changing the page.\n */\n @Input()\n linkUrl: string;\n\n /**\n * Whether the link should open in a new window or not. Only applicable when linkText + linkUrl\n * is provided.\n */\n @Input()\n linkOpenInNewWindow = false;\n\n /**\n * The text to use for a secondary link. If no URL is passed it will be rendered as a button. Otherwise, it\n * will be an A tag.\n */\n @Input()\n secondaryLinkText: string;\n\n /**\n * The url to go with secondary link. If you wish to handle this behavior yourself you can listen to the linkClick\n * event and `event.preventDefault` to stop the browser changing the page.\n */\n @Input()\n secondaryLinkUrl: string;\n\n /**\n * Whether the link should open in a new window or not. Only applicable when linkText + linkUrl\n * is provided.\n */\n @Input()\n secondaryLinkOpenInNewWindow = false;\n\n /**\n * An icon to override the default icon used. Note that each NotificationTheme has a different\n * default icon\n */\n @Input()\n iconName: IconName;\n\n @Input()\n iconCategory: IconLibrary = IconLibrary.SVG_LIBRARY;\n\n /**\n * Any i18n labels used by the component. In most cases you can use the default for the component\n */\n @Input()\n i18n: NotificationI18n = {\n closeAriaLabel: 'actions.close',\n };\n\n @Input()\n removePadding = false;\n\n /**\n * When the button/a tag is clicked the parent component can listen and handle the event. Note\n * that the event is sent so that you can stopPropagation/preventDefault if needed.\n */\n @Output()\n linkClick = new EventEmitter<Event>();\n\n /**\n * When the secondary button/a tag is clicked the parent component can listen and handle the event. Note\n * that the event is sent so that you can stopPropagation/preventDefault if needed.\n */\n @Output()\n secondaryLinkClick = new EventEmitter<Event>();\n\n /**\n * The close button was clicked and the notification should be closed. The parent component\n * should either remove the notification from the dom or hide it in some way.\n */\n @Output()\n closeClick = new EventEmitter<Event>();\n\n displayedIcon: IconName;\n\n ngOnInit(): void {\n this.displayedIcon = this.iconName ?? this.getDefaultIconForTheme();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ((changes.theme && !this.iconName) || (changes.iconName && !changes.iconName.currentValue)) {\n this.displayedIcon = this.getDefaultIconForTheme();\n }\n\n if (changes.iconName && changes.iconName.currentValue) {\n this.displayedIcon = changes.iconName.currentValue;\n }\n }\n\n get notificationStyle(): Record<string, boolean> {\n return {\n 'nordic-blue-50-bg': this.theme === NotificationTheme.INFO,\n 'success-50-bg': this.theme === NotificationTheme.SUCCESS,\n 'alert-50-bg': this.theme === NotificationTheme.WARNING,\n 'error-50-bg': this.theme === NotificationTheme.ALERT,\n 'birch-50-bg': this.theme === NotificationTheme.SUSTAINABILITY,\n 'heather-700-bg': this.theme === NotificationTheme.CAMPAIGN,\n 'nordic-blue-900-text': [\n NotificationTheme.INFO,\n NotificationTheme.SUCCESS,\n NotificationTheme.WARNING,\n NotificationTheme.ALERT,\n NotificationTheme.SUSTAINABILITY,\n ].includes(this.theme),\n 'white-text': this.theme === NotificationTheme.CAMPAIGN,\n 'rounded-large': [NotificationLayout.BLOCK, NotificationLayout.OVERLAY].includes(this.layout),\n shadow: this.layout === NotificationLayout.OVERLAY,\n };\n }\n\n private getDefaultIconForTheme(): SvgLibraryIcon {\n switch (this.theme) {\n case NotificationTheme.SUCCESS:\n return SvgLibraryIcon.CHECKMARK_BLOCK;\n case NotificationTheme.WARNING:\n case NotificationTheme.ALERT:\n return SvgLibraryIcon.ALERT_TRIANGLE;\n case NotificationTheme.SUSTAINABILITY:\n return SvgLibraryIcon.SUSTAINABILITY;\n case NotificationTheme.CAMPAIGN:\n return SvgLibraryIcon.DISCOUNT;\n case NotificationTheme.INFO:\n case NotificationTheme.TRANSPARENT:\n default:\n return SvgLibraryIcon.INFO_BLOCK;\n }\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { combineLatest, Observable, of, ReplaySubject, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsDataService } from '@fcom/core';\nimport { MenuItem, MenuItemWithChildren, MenuJson } from '@fcom/common';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { ProfileType } from '@fcom/core-api/login';\nimport { finShare } from '@fcom/rx';\n\nimport { LoyaltyRoutesPath } from '../interfaces';\n\nconst EMPTY_MENU: MenuJson = { top: [], main: [], bottom: [], template: '' };\n\n@Injectable()\nexport class LoyaltyNavigationService implements OnDestroy {\n private currentRoute$: ReplaySubject<string> = new ReplaySubject(1);\n private subscriptions = new Subscription();\n\n constructor(\n private cmsDataService: CmsDataService,\n private languageService: LanguageService,\n private router: Router\n ) {\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter((routerEvent) => routerEvent instanceof NavigationEnd),\n distinctUntilChanged(),\n map(({ url }: NavigationEnd) => url),\n startWith(this.router.url)\n )\n .subscribe(this.currentRoute$)\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n getMenuItemsForProfileType(profile: ProfileType): Observable<MenuItemWithChildren[]> {\n const url = profile === ProfileType.FPLUS ? 'fragments.plusNavigation.url' : 'fragments.accountNavigation.url';\n return this.fetchMenu(url);\n }\n\n getActiveMenuItemTitle(menuItems$: Observable<MenuItemWithChildren[]>): Observable<string> {\n if (menuItems$) {\n return menuItems$.pipe(\n map((data) => ((data || []).find((item) => item.active) || ({} as MenuItem)).teaserTitle || '')\n );\n }\n }\n\n private fetchMenu(fragmentUrl: string): Observable<MenuItemWithChildren[]> {\n return combineLatest([\n this.languageService\n .translate(fragmentUrl)\n .pipe(switchMap((url) => (!url ? of(EMPTY_MENU) : this.cmsDataService.getFragmentJson(url)))),\n this.currentRoute$,\n ]).pipe(\n map(([menuJson, currentRoute]: [MenuJson, string]) => {\n menuJson.top.forEach((item) => {\n item.active = item.link === currentRoute.replace(/\\?.*|(#.*)$/, '');\n });\n return menuJson.top.filter(({ link }) => !link.includes(LoyaltyRoutesPath.TIER_PROGRESS_AND_BENEFITS));\n }),\n distinctUntilChanged(),\n finShare()\n );\n }\n}\n","import { createSelector, select } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { HistogramBar } from '@fcom/common';\nimport { AirCalendarList } from '@fcom/dapi/api/models';\n\nimport { BookingWidgetState, CalendarPrices, InstantSearchMonitoring, Warnings, WidgetTab } from '../../interfaces';\nimport { BookingWidgetAppState, bookingWidgetFeatureState } from './booking-widget-feature-state.selector';\n\nconst _bookingWidgetState = createSelector(\n bookingWidgetFeatureState,\n (_bs: BookingWidgetAppState) => _bs?.bookingWidget\n);\n\nexport const _instantSearchMonitoringSelector = createSelector(\n _bookingWidgetState,\n (_bw: BookingWidgetState) => _bw?.instantSearchMonitoring\n);\n\nconst _fullYearPrices = createSelector(_bookingWidgetState, (bw: BookingWidgetState) => bw?.prices?.fullYear ?? {});\nconst _followingMonthPrices = createSelector(\n _bookingWidgetState,\n (bw: BookingWidgetState) => bw?.prices?.followingMonth ?? {}\n);\nconst _histogramPrices = createSelector(_bookingWidgetState, (bw: BookingWidgetState) => bw?.prices?.histogram ?? []);\nconst _airCalendarPrices = createSelector(_bookingWidgetState, (bw: BookingWidgetState) => bw?.prices?.airCalendar);\n\nconst _warningSelector = createSelector(_bookingWidgetState, (bw: BookingWidgetState) => bw?.warnings ?? {});\n\nconst _activeTabSelector = createSelector(\n _bookingWidgetState,\n (bw: BookingWidgetState) => bw?.activeTab ?? WidgetTab.FLIGHT\n);\n\nexport const instantSearchMonitoring = (): StateSelector<BookingWidgetAppState, InstantSearchMonitoring> =>\n safeSelect(_instantSearchMonitoringSelector);\n\nexport const fullYearPrices = (): StateSelector<BookingWidgetAppState, CalendarPrices> => select(_fullYearPrices);\nexport const followingMonthPrices = (): StateSelector<BookingWidgetAppState, CalendarPrices> =>\n select(_followingMonthPrices);\nexport const histogramPrices = (): StateSelector<BookingWidgetAppState, HistogramBar[]> => select(_histogramPrices);\nexport const airCalendarPrices = (): StateSelector<BookingWidgetAppState, AirCalendarList> =>\n select(_airCalendarPrices);\nexport const notificationWarnings = (): StateSelector<BookingWidgetAppState, Warnings> => select(_warningSelector);\nexport const activeTab = (): StateSelector<BookingWidgetAppState, WidgetTab> => select(_activeTabSelector);\n","/**\n * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`.\n * @param input The object that was passed.\n */\nexport function createInvalidObservableTypeError(input: any) {\n // TODO: We should create error codes that can be looked up, so this can be less verbose.\n return new TypeError(\n `You provided ${\n input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`\n } where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`\n );\n}\n","import { Directive, PLATFORM_ID, Inject, ViewContainerRef, TemplateRef, OnInit, Input } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/**\n * A structural directive that conditionally includes a template based on if it\n * is being rendered server-side or client-side.\n *\n * @example\n * <span *finClientOnly ></span>\n */\n@Directive({ selector: '[finClientOnly]' })\nexport class ClientOnlyDirective<T = unknown> implements OnInit {\n private clientOnly = true;\n\n /**\n * The Boolean expression indicating if the directive should be applied.\n * If false the content will always be rendered.\n */\n @Input()\n set finClientOnly(condition: boolean) {\n if (!(condition === null || condition === undefined)) {\n this.clientOnly = condition;\n }\n this.updateView();\n }\n\n constructor(\n private viewContainer: ViewContainerRef,\n private templateRef: TemplateRef<T>,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n this.updateView();\n }\n\n updateView() {\n this.viewContainer.clear();\n\n if (!this.clientOnly || isPlatformBrowser(this.platform)) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { Duration } from '@fcom/dapi';\n// todo: remove OrderSummaryDuration after updating type in booking service\nimport { Duration as OrderSummaryDuration } from '@fcom/dapi/api/models';\nimport { finShare } from '@fcom/rx';\n\n/**\n * Transforms the duration object to a human readable format based on translations\n */\n@Pipe({\n name: 'finDuration',\n})\nexport class DurationPipe implements PipeTransform {\n constructor(private languageService: LanguageService) {}\n transform(dur: Duration | OrderSummaryDuration): Observable<string> {\n if (!dur) {\n return of(undefined);\n }\n const { hours, minutes } = dur;\n return this.languageService.translate('bookingSearch.duration', [hours, minutes]).pipe(finShare());\n }\n}\n","<div class=\"nordic-blue-50-bg\">\n <ul class=\"ribbon-list flex flex--space-around no-list-style md-col-3-10 ms-medium-y\" role=\"list\">\n <li *ngFor=\"let link of links; let i = index\" role=\"listitem\">\n <a\n [finLink]=\"link\"\n class=\"block no-underline nordic-blue-900-text font-body-2 ps-xsmall-y footer-link inline-block\"\n ><span class=\"valign-middle\">{{ 'ondMarketing.ribbon.' + linkTranslationKeys[i] | finLocalization }}</span></a\n >\n </li>\n </ul>\n</div>\n","import { Component, OnInit } from '@angular/core';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { RootPaths } from '@fcom/core/constants';\n\nimport { OndMarketingRoutesPath } from '../interfaces';\n\n@Component({\n selector: 'fin-ond-marketing-ribbon',\n templateUrl: './ond-marketing-ribbon.component.html',\n styleUrls: ['./ond-marketing-ribbon.component.scss'],\n})\nexport class OndMarketingRibbonComponent implements OnInit {\n links: string[] = [];\n linkTranslationKeys: string[] = ['from', 'fromCountry', 'cityToCity', 'countryToCountry'];\n constructor(private languageService: LanguageService) {}\n\n ngOnInit(): void {\n const lang = `/${this.languageService.langValue}/`;\n\n this.links = Object.values(OndMarketingRoutesPath).map(\n (item) => `${lang}${RootPaths.OND_MARKETING_LANDING_ROOT}/${item}`\n );\n }\n}\n","export enum LinkSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n}\n\nexport enum LinkTheme {\n LIGHT = 'light',\n DARK = 'dark',\n}\n","import {\n Category,\n FinnairOrder,\n FinnairPassengerItem,\n FinnairPassengerServiceSelectionItem,\n FinnairServiceCategoryPriceItem,\n FinnairServiceItem,\n FinnairTotalPricesDetails,\n} from '@fcom/dapi/api/models';\nimport { isPresent } from '@fcom/core/utils';\nimport { PriceService } from '@fcom/dapi/interfaces';\n\nimport { combineServices, filterServices } from '../modules/ancillaries/utils/ancillary.utils';\n\nexport const getLastPaidServices = (order: FinnairOrder): FinnairServiceItem[] => {\n const purchasedTSMS =\n order.checkouts?.sort((a, b) => +a.timestamp - +b.timestamp)[0]?.items.map((item) => item.id) ?? [];\n\n return purchasedTSMS.length > 0\n ? filterServices(\n combineServices([order.services.included, order.services.pending]),\n (service: FinnairPassengerServiceSelectionItem) => purchasedTSMS.includes(service.id)\n )\n : order.services.pending;\n};\n\nexport const getLastPaidPrices = (order: FinnairOrder): FinnairTotalPricesDetails | undefined => {\n const lastCheckoutId = order.checkouts?.[0]?.id;\n return order.prices.checkouts?.find((checkout) => checkout.id === lastCheckoutId)?.prices ?? order.prices.pending;\n};\n\nexport const hasPassengers = (passengers: FinnairPassengerItem[]): boolean =>\n isPresent(passengers) && passengers.length > 0;\n\nexport const getPassengerServices = (\n pricesForCategory: FinnairServiceCategoryPriceItem[] = [],\n passenger: FinnairPassengerItem\n): PriceService[] => {\n const sortOrder: string[] = ['seat', 'baggage', 'meal', 'wifi', 'travelComfort', 'lounge', 'cover'].reverse();\n return pricesForCategory\n .map((c) => {\n const name = `${c.category}Count`;\n const count = c.totalPerPax[passenger.id]?.quantity ?? 0;\n const totalAmount = c.totalPerPax[passenger.id]?.price?.totalAmount;\n const originalTotalAmount = c.totalPerPax[passenger.id]?.price?.originalTotalAmount;\n return {\n id: c.category,\n total: totalAmount ?? null,\n originalTotal: originalTotalAmount ?? null,\n count,\n key: `purchase.payment.${name}`,\n [name]: count,\n };\n })\n .filter((service) => service.count > 0)\n .sort((a, b) => sortOrder.indexOf(b.id) - sortOrder.indexOf(a.id));\n};\n\nexport const getCategoryServices = (\n pricesForCategory: FinnairServiceCategoryPriceItem[] = [],\n ancillaryCategory: Category\n): FinnairServiceCategoryPriceItem => {\n return pricesForCategory.find((categories) => categories.category === ancillaryCategory);\n};\n\nexport const showTravelExtrasTitle = (pricesForCategory: FinnairServiceCategoryPriceItem[] = []): boolean => {\n const hasSaf = pricesForCategory.some((item) => item.category === Category.SAF);\n const hasOtherAncillaries = pricesForCategory.some((item) => item.category !== Category.SAF);\n\n return !hasSaf || hasOtherAncillaries;\n};\n\nexport const passengerHasSaf = (\n pricesForCategory: FinnairServiceCategoryPriceItem[] = [],\n passenger: FinnairPassengerItem\n): boolean => {\n return (\n pricesForCategory.length &&\n pricesForCategory.some((service) => service.category === Category.SAF && service.totalPerPax[passenger.id])\n );\n};\n\nexport const passengerHasOtherServices = (\n pricesForCategory: FinnairServiceCategoryPriceItem[] = [],\n passenger: FinnairPassengerItem\n): boolean => {\n return (\n pricesForCategory.length &&\n pricesForCategory.reduce((acc, service) => {\n return acc || Boolean(service.category !== Category.SAF && service.totalPerPax[passenger.id]);\n }, false)\n );\n};\n","import { UntypedFormGroup } from '@angular/forms';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { isAmadeusPNRCode } from '@fcom/core/utils';\nimport { GtmService } from '@fcom/common/gtm';\nimport { ElementActions, ElementTypes, GaContext, SelectOption } from '@fcom/common/interfaces';\nimport { LocationMatchData } from '@fcom/core-api/interfaces';\n\nexport const trackFormState = (formName: string, state: string, gtmService: GtmService): void => {\n let action: ElementActions = ElementActions.SUBMIT;\n\n // Start is a click event, others are related to form submit status\n if (state === 'start') {\n action = ElementActions.CLICK;\n }\n\n gtmService.trackElement(`${formName}-${state}`, GaContext.SERVICE_FORMS, ElementTypes.FORM, state, action);\n};\n\nexport const disableConditionalFields = (fieldSet: string[], form: UntypedFormGroup): void => {\n fieldSet.forEach((field) => {\n const inputField = form.get(field);\n if (inputField) {\n inputField.reset();\n inputField.disable();\n }\n });\n};\n\nexport const enableConditionalFields = (fieldSet: string[], form: UntypedFormGroup): void => {\n fieldSet.forEach((field) => {\n const inputField = form.get(field);\n if (inputField) {\n inputField.enable();\n }\n });\n};\n\nexport const isPnrCode = (value: string): boolean => {\n return isAmadeusPNRCode(value) && !value.includes('0') && !value.includes('1');\n};\n\nexport const createQueryString = <T>(query: T): string => {\n return Object.keys(query)\n .filter((key) => {\n return query[key];\n })\n .map((key) => {\n return `${key}=${query[key]}`;\n })\n .reduce((rest, curr) => {\n return `${rest}&${curr}`;\n });\n};\n\nexport const orderLocationsByTitle = (matchedLocations: LocationMatchData): LocationMatchData => {\n matchedLocations.items.sort((locationA, locationB) => {\n return locationA.title > locationB.title ? 1 : -1;\n });\n return matchedLocations;\n};\n\nexport const AUTOCOMPLETE_DEBOUNCE_TIME = 500;\n\nexport const getCountryOptions = (\n languageService: LanguageService,\n defaultOption?: SelectOption\n): Observable<SelectOption[]> => {\n return languageService.translate('countries').pipe(\n map((countries) =>\n Object.keys(countries)\n .map(\n (country) =>\n ({\n value: country.toUpperCase(),\n name: countries[country],\n }) as SelectOption\n )\n .sort((a, b) => {\n if (a.name > b.name) {\n return 1;\n } else if (b.name > a.name) {\n return -1;\n }\n return 0;\n })\n ),\n map((countries) => {\n if (defaultOption) {\n return [defaultOption, ...countries];\n }\n return countries;\n })\n );\n};\n","<div *ngIf=\"(ondOffers$ | async)?.length > 0\" class=\"mr-large-y\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\" *ngIf=\"heading$ | async\">\n {{ heading$ | async }}\n </h2>\n\n <div *ngIf=\"sortOptions$ | async as options\" class=\"fill align-right mr-small-b\">\n <select\n class=\"nordic-blue-900-text medium-type focus-inset\"\n name=\"selectedSortBy\"\n (change)=\"sortOffers($any($event.target).value)\"\n >\n <option *ngFor=\"let option of options\" [value]=\"option.value\" [selected]=\"option.value === defaultSort\">\n {{ option.label }}\n </option>\n </select>\n </div>\n\n <div class=\"ms-xxsmall-t\">\n <div\n *ngFor=\"let ondOffer of ondOffers$ | async | slice: 0 : offerAmount; let i = index\"\n class=\"offer-list-item flex border rounded grey-50-bg pr-xsmall mr-xxsmall-b animate-appear ond-list-item\"\n [ngClass]=\"\n i + 1 > offerAmount - moreOffersAmount && !dynamicAnimationDisabled\n ? 'animate-appear--' + (i - offerAmount + moreOffersAmount)\n : ''\n \"\n >\n <div class=\"flex-1 flex--basis0 flex--self-center pr-medium-r\">\n <div class=\"light-type font-body-1 ms-xxsmall-b\" data-testid=\"offer-list-location-codes\">\n {{ ondOffer?.originLocationCode }} – {{ ondOffer?.destinationLocationCode }}\n </div>\n\n <div class=\"font-heading-3 nordic-blue-900-text bold-type ms-xxsmall-b\">\n {{ ondOffer.originCityName }} -\n {{ ondOffer.destinationCityName }}\n </div>\n\n <div class=\"light-type font-body-2\">\n {{ ondOffer?.departureDate | finDateFormat: 'FULL' }} – {{ ondOffer?.returnDate | finDateFormat: 'FULL' }}\n </div>\n </div>\n\n <div class=\"flex-1 flex--basis0 flex--self-center flex--column align-right pr-medium-l\">\n <div class=\"mr-xsmall-b\">\n <div class=\"nordic-blue-900-text light-type font-body-1 lowercase\">\n {{ 'pricesStartingFrom' | finLocalization }}\n </div>\n\n <span class=\"heather-700-text font-heading-2 bold-type inline-block animate-pulse\">\n {{ ondOffer?.price | finPrice: { roundPrice: true } }}\n </span>\n </div>\n\n <a\n [finLink]=\"ondOffer?.link\"\n class=\"offer-list-item__link bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\"\n >\n {{ 'bookNow' | finLocalization }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"(ondOffers$ | async)?.length > offerAmount\" class=\"align-center\">\n <button class=\"btn bold-type\" (click)=\"loadMoreOffers()\">{{ 'ondMarketing.loadMore' | finLocalization }}</button>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { enumValues, isNotEmpty, isPresent } from '@fcom/core/utils';\n\nimport { OndMarketingOffer, OndPairEnhancedResponse } from '../interfaces';\nimport { OndMarketingOffersService } from '../services';\n\nconst INITIAL_OFFER_AMOUNT = 4;\nconst OFFERS_TO_LOAD_AMOUNT = 3;\n\ninterface SortOption {\n value: string;\n label: string;\n}\n\nexport enum OfferListSortBy {\n DEPARTURE = 'departureDate',\n PRICE_ASC = 'priceAscending',\n PRICE_DESC = 'priceDescending',\n}\n\n@Component({\n selector: 'fin-ond-marketing-offers-list',\n templateUrl: './ond-marketing-offers-list.component.html',\n styleUrls: ['./ond-marketing-offers-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OndMarketingOffersListComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n originLocationCode$: Observable<string | undefined> = of(undefined);\n @Input()\n destinationLocationCode$: Observable<string | undefined> = of(undefined);\n @Input()\n links$: Observable<OndPairEnhancedResponse>;\n\n dynamicAnimationDisabled = false;\n moreOffersAmount: number = OFFERS_TO_LOAD_AMOUNT;\n offerAmount: number = INITIAL_OFFER_AMOUNT;\n defaultSort: OfferListSortBy = OfferListSortBy.PRICE_ASC;\n ondOffers$: Observable<OndMarketingOffer[]>;\n sortOptions$: Observable<SortOption[]>;\n heading$: Observable<string>;\n sortBy$: BehaviorSubject<OfferListSortBy> = new BehaviorSubject<OfferListSortBy>(this.defaultSort);\n\n constructor(\n private ondMarketingOffersService: OndMarketingOffersService,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n const notSortedOffer$ = this.ondMarketingOffersService.getOffersOrFlightData(\n this.originLocationCode$,\n this.destinationLocationCode$,\n this.links$\n );\n\n this.ondOffers$ = combineLatest([notSortedOffer$, this.sortBy$]).pipe(\n map(([offers, sortBy]) => {\n return offers.sort((a, b) => {\n switch (sortBy) {\n case OfferListSortBy.PRICE_ASC:\n return parseFloat(a.price.amount) > parseFloat(b.price.amount) ? 1 : -1;\n case OfferListSortBy.PRICE_DESC:\n return parseFloat(a.price.amount) > parseFloat(b.price.amount) ? -1 : 1;\n case OfferListSortBy.DEPARTURE:\n return a.departureDate > b.departureDate ? 1 : -1;\n default:\n return 0;\n }\n });\n })\n );\n\n this.heading$ = this.ondMarketingOffersService.getHeading(\n this.originLocationCode$,\n this.destinationLocationCode$,\n this.ondOffers$,\n 'mostSearchedDeals'\n );\n\n this.getSortOptions();\n }\n\n loadMoreOffers(): void {\n this.dynamicAnimationDisabled = false;\n this.offerAmount += this.moreOffersAmount;\n }\n\n sortOffers(value: OfferListSortBy): void {\n this.sortBy$.next(value);\n }\n\n private getSortOptions(): void {\n this.dynamicAnimationDisabled = true;\n const sortByValues: string[] = enumValues(OfferListSortBy);\n const translationKeys: string[] = sortByValues.map((key: string) => `ondMarketing.sortOfferOptions.${key}`);\n\n this.sortOptions$ = this.languageService.translateMultiple(translationKeys).pipe(\n map((labels: string[]): SortOption[] =>\n labels\n .map((label: string, i: number) => ({ value: sortByValues[i] as OfferListSortBy, label }))\n .filter((option: SortOption) => isPresent(option.label))\n ),\n filter(isNotEmpty)\n );\n }\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bound');\nvar inspect = require('object-inspect');\nvar getSideChannelMap = require('side-channel-map');\n\nvar $TypeError = require('es-errors/type');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\n\n/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\n/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\n/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\n/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */\nvar $weakMapDelete = callBound('WeakMap.prototype.delete', true);\n\n/** @type {import('.')} */\nmodule.exports = $WeakMap\n\t? /** @type {Exclude<import('.'), false>} */ function getSideChannelWeakMap() {\n\t\t/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */\n\t\t/** @typedef {Parameters<Channel['get']>[0]} K */\n\t\t/** @typedef {Parameters<Channel['set']>[1]} V */\n\n\t\t/** @type {WeakMap<K & object, V> | undefined} */ var $wm;\n\t\t/** @type {Channel | undefined} */ var $m;\n\n\t\t/** @type {Channel} */\n\t\tvar channel = {\n\t\t\tassert: function (key) {\n\t\t\t\tif (!channel.has(key)) {\n\t\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t\t}\n\t\t\t},\n\t\t\t'delete': function (key) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif ($wm) {\n\t\t\t\t\t\treturn $weakMapDelete($wm, key);\n\t\t\t\t\t}\n\t\t\t\t} else if (getSideChannelMap) {\n\t\t\t\t\tif ($m) {\n\t\t\t\t\t\treturn $m['delete'](key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tget: function (key) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif ($wm) {\n\t\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $m && $m.get(key);\n\t\t\t},\n\t\t\thas: function (key) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif ($wm) {\n\t\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn !!$m && $m.has(key);\n\t\t\t},\n\t\t\tset: function (key, value) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif (!$wm) {\n\t\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t\t}\n\t\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t\t} else if (getSideChannelMap) {\n\t\t\t\t\tif (!$m) {\n\t\t\t\t\t\t$m = getSideChannelMap();\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\t\t\t/** @type {NonNullable<typeof $m>} */ ($m).set(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// @ts-expect-error TODO: figure out why this is erroring\n\t\treturn channel;\n\t}\n\t: getSideChannelMap;\n","<ng-container *finLet=\"isJunior$ | async as isJunior\">\n <fin-login-form-container\n *ngIf=\"(phonePrefixes$ | async) && currentStep$ | async as currentStep\"\n [fullScreen]=\"fullScreen\"\n [invertHeaderColors]=\"currentStep !== JoinFlowStep.JOIN_COMPLETE\"\n [icon]=\"currentStep === JoinFlowStep.JOIN_COMPLETE ? SvgLibraryIcon.CHECKMARK_BLOCK : undefined\"\n (closeClicked)=\"closeDialog()\"\n [stepperSteps$]=\"stepperSteps$\"\n [stepperActiveStep$]=\"stepperIndex$\"\n [showLeftIcon]=\"\n enableAccountCreationVerification &&\n [JoinFlowStep.CONTACT_DETAILS, JoinFlowStep.GUARDIAN_DETAILS, JoinFlowStep.MARKETING_CONSENT].includes(\n currentStep$ | async\n )\n \"\n (stepperClicked)=\"openStep($event)\"\n (returnClicked)=\"goBack($event)\"\n [title]=\"(stepTranslations$ | async).title\"\n [description]=\"\n currentStep !== JoinFlowStep.CONTACT_DETAILS ? ((stepTranslations$ | async).description | finLocalization) : ''\n \"\n [overlay]=\"enableAccountCreationVerification\"\n data-hj-suppress\n >\n <div class=\"header-content\">\n <ng-container *ngIf=\"currentStep === JoinFlowStep.BASIC_INFO\">\n <div\n class=\"font-body-1 flex flex-1 flex--top ms-xsmall-r ms-xsmall-b\"\n *ngFor=\"let promote of ['earn', 'benefits', 'offers']\"\n >\n <fcom-icon class=\"icon-medium ps-xsmall-r\" [name]=\"SvgLibraryIcon.CHECKMARK\" />\n <span class=\"fill\">{{ 'login.join.promote.' + promote | finLocalization }}</span>\n </div>\n </ng-container>\n\n <p class=\"ps-medium-y\" *ngIf=\"isJunior && currentStep === JoinFlowStep.CONTACT_DETAILS\">\n {{ 'login.join.juniorInfo' | finLocalization }}\n </p>\n </div>\n\n <ng-container [ngSwitch]=\"currentStep\">\n <ng-container *ngSwitchCase=\"JoinFlowStep.BASIC_INFO\">\n <form (submit)=\"moveToStep(JoinFlowStep.CONTACT_DETAILS)\" [formGroup]=\"basicInfoForm\" class=\"white-bg\">\n <fcom-text-input\n [translationPrefix]=\"'login.join.fields.firstName'\"\n [parentForm]=\"basicInfoForm\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'firstName'\"\n ></fcom-text-input>\n <fcom-text-input\n [translationPrefix]=\"'login.join.fields.lastName'\"\n [parentForm]=\"basicInfoForm\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'lastName'\"\n ></fcom-text-input>\n\n <span class=\"font-body-1 regular-type nordic-blue-400-text\" [attr.id]=\"'select-group-label-dob'\">\n {{ 'login.join.fields.dateOfBirth.label' | finLocalization }}\n </span>\n\n <fin-form-group\n class=\"block\"\n [groupTranslationPrefix]=\"'login.join.fields.dateOfBirth'\"\n [group]=\"basicInfoFormBirthDate\"\n [names]=\"['dateOfBirth', 'monthOfBirth', 'yearOfBirth']\"\n >\n <div class=\"flex\">\n <fin-select-input\n data-testid=\"form-field-dateOfBirth\"\n class=\"flex-1 flex--basis0 mr-xsmall-r\"\n [controlName]=\"'dateOfBirth'\"\n [parentForm]=\"basicInfoFormBirthDate\"\n [options]=\"availableDays$ | async\"\n [displayMargin]=\"false\"\n [disableLabel]=\"true\"\n [translationPrefix]=\"'login.join.fields.dateOfBirth'\"\n [selectLabelTranslationKey]=\"'login.join.daySelect'\"\n >\n </fin-select-input>\n\n <fin-select-input\n data-testid=\"form-field-monthOfBirth\"\n class=\"flex-1 flex--basis0 mr-xsmall-r\"\n [controlName]=\"'monthOfBirth'\"\n [parentForm]=\"basicInfoFormBirthDate\"\n [options]=\"availableMonths$ | async\"\n [displayMargin]=\"false\"\n [disableLabel]=\"true\"\n [translationPrefix]=\"'login.join.fields.monthOfBirth'\"\n [selectLabelTranslationKey]=\"'login.join.monthSelect'\"\n >\n </fin-select-input>\n\n <fin-select-input\n data-testid=\"form-field-yearOfBirth\"\n class=\"flex-1 flex--basis0\"\n [controlName]=\"'yearOfBirth'\"\n [parentForm]=\"basicInfoFormBirthDate\"\n [options]=\"availableYears$ | async\"\n [displayMargin]=\"false\"\n [disableLabel]=\"true\"\n [translationPrefix]=\"'login.join.fields.yearOfBirth'\"\n [selectLabelTranslationKey]=\"'login.join.yearSelect'\"\n >\n </fin-select-input>\n </div>\n </fin-form-group>\n\n <span *ngIf=\"isJunior && basicInfoFormBirthDate.valid\" class=\"font-body-2 regular-type nordic-blue-400-text\">\n {{ 'login.join.joinJunior' | finLocalization }}\n </span>\n\n <div class=\"ms-medium-b ps-xxsmall-t\">\n <fcom-radio-item-group\n [options]=\"[{ value: LoginGender.MALE }, { value: LoginGender.FEMALE }]\"\n [controlName]=\"'gender'\"\n [isSensitive]=\"true\"\n [translationPrefix]=\"'login.join.fields.gender'\"\n [parentForm]=\"basicInfoForm\"\n >\n </fcom-radio-item-group>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"continueBtn\"\n [ngTemplateOutletContext]=\"{ disabled: !basicInfoForm.valid }\"\n />\n </form>\n\n <button\n *ngIf=\"fullScreen\"\n type=\"button\"\n class=\"underline nordic-blue-900-text fill align-center ms-small-y tr-medium font-body-1\"\n (click)=\"openLogin()\"\n >\n {{ 'login.join.logIn' | finLocalization }}\n </button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"JoinFlowStep.CONTACT_DETAILS\">\n <form\n (submit)=\"moveToStep(isJunior ? JoinFlowStep.GUARDIAN_DETAILS : JoinFlowStep.MARKETING_CONSENT)\"\n [formGroup]=\"contactDetailsForm\"\n >\n <fin-form-group\n class=\"block ps-small-b\"\n [group]=\"contactDetailsFormPhone\"\n [translationPrefix]=\"'login.join.fields.phone'\"\n [required]=\"false\"\n [showOnlyGroupLevelErrors]=\"true\"\n [names]=\"['phonePrefix', 'phoneNumber']\"\n >\n <span\n class=\"font-body-1 regular-type light-type nordic-blue-400-text\"\n [attr.id]=\"'select-group-label-phone-number'\"\n >\n {{ 'login.join.fields.phone.label' | finLocalization }}\n </span>\n\n <div class=\"flex\">\n <fin-select-input\n class=\"ms-xxsmall-r flex--basis2\"\n [parentForm]=\"contactDetailsFormPhone\"\n [controlName]=\"'phonePrefix'\"\n [options]=\"phonePrefixes$ | async\"\n [displayMargin]=\"false\"\n [disableSelectOption]=\"true\"\n [disableLabel]=\"true\"\n ></fin-select-input>\n <fcom-text-input\n [class.fill]=\"fullScreen\"\n [parentForm]=\"contactDetailsFormPhone\"\n [displayMargin]=\"false\"\n [hideLabel]=\"true\"\n [controlName]=\"'phoneNumber'\"\n (inputEvent)=\"removeLeadingZero($event)\"\n ></fcom-text-input>\n </div>\n </fin-form-group>\n <fcom-text-input\n class=\"block ps-small-b\"\n [translationPrefix]=\"'login.join.fields.email'\"\n [parentForm]=\"contactDetailsForm\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'email'\"\n (change)=\"email$.next(contactDetailsForm.get('email').value)\"\n ></fcom-text-input>\n\n <fin-combo-box\n [id]=\"'select-country'\"\n [parentForm]=\"contactDetailsForm\"\n [controlName]=\"'countryCode'\"\n [required]=\"false\"\n [searchable]=\"true\"\n [options]=\"countryOptions | async\"\n [displayMargin]=\"false\"\n [translationPrefix]=\"'login.join.fields.country'\"\n [clearSearchLabel]=\"'login.join.fields.country.clearSearch' | finLocalization\"\n [tooltipHeading]=\"'login.join.fields.country.tooltipHeading' | finLocalization\"\n [tooltipContent]=\"'login.join.fields.country.tooltipContent' | finLocalization\"\n [tooltipOptions]=\"{ zIndex: 6 }\"\n class=\"block ps-small-b\"\n ></fin-combo-box>\n\n <fin-form-group\n class=\"block\"\n [groupTranslationPrefix]=\"'login.join.fields.confirmPassword'\"\n [group]=\"contactDetailsFormPassword\"\n [names]=\"['pwd', 'confirmPwd']\"\n >\n <fcom-text-input\n class=\"block ps-small-b\"\n [translationPrefix]=\"'login.join.fields.password'\"\n [parentForm]=\"contactDetailsFormPassword\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'pwd'\"\n [isPassword]=\"true\"\n ></fcom-text-input>\n <fcom-text-input\n [translationPrefix]=\"'login.join.fields.confirmPassword'\"\n [parentForm]=\"contactDetailsFormPassword\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [isPassword]=\"true\"\n [controlName]=\"'confirmPwd'\"\n ></fcom-text-input>\n </fin-form-group>\n\n <ng-container\n *ngIf=\"!isJunior\"\n [ngTemplateOutlet]=\"termsAndPolicy\"\n [ngTemplateOutletContext]=\"{\n formGroup: contactDetailsForm,\n control: 'accept',\n contentUrl: 'fragments.acceptProgramRules.url',\n }\"\n />\n\n <ng-container\n [ngTemplateOutlet]=\"continueBtn\"\n [ngTemplateOutletContext]=\"{\n disabled: !(contactDetailsForm.valid && (isJunior || contactDetailsForm.get('accept').value)),\n }\"\n />\n </form>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"JoinFlowStep.GUARDIAN_DETAILS\">\n <form\n (submit)=\"enableAccountCreationVerification ? moveToStep(JoinFlowStep.EMAIL_VEFIFICATION) : complete(true)\"\n [formGroup]=\"guardianInfoForm\"\n >\n <fcom-text-input\n [translationPrefix]=\"'login.join.fields.guardianName'\"\n [parentForm]=\"guardianInfoForm\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'guardianName'\"\n ></fcom-text-input>\n\n <fin-form-group\n class=\"block ps-small-y\"\n [group]=\"guardianInfoFormPhone\"\n [translationPrefix]=\"'login.join.fields.guardianPhone'\"\n [required]=\"false\"\n [showOnlyGroupLevelErrors]=\"true\"\n [names]=\"['phonePrefix', 'phoneNumber']\"\n >\n <span\n class=\"font-body-1 regular-type light-type nordic-blue-400-text\"\n [attr.id]=\"'select-group-label-guardian-phone-number'\"\n >\n {{ 'login.join.fields.guardianPhone.label' | finLocalization }}\n </span>\n\n <div class=\"flex\">\n <fin-select-input\n class=\"ms-xxsmall-r flex--basis2\"\n [parentForm]=\"guardianInfoFormPhone\"\n [controlName]=\"'phonePrefix'\"\n [options]=\"phonePrefixes$ | async\"\n [displayMargin]=\"false\"\n [disableSelectOption]=\"true\"\n [disableLabel]=\"true\"\n ></fin-select-input>\n <fcom-text-input\n [class.fill]=\"fullScreen\"\n [parentForm]=\"guardianInfoFormPhone\"\n [displayMargin]=\"false\"\n [hideLabel]=\"true\"\n [controlName]=\"'phoneNumber'\"\n ></fcom-text-input>\n </div>\n </fin-form-group>\n\n <fcom-text-input\n [translationPrefix]=\"'login.join.fields.guardianEmail'\"\n [parentForm]=\"guardianInfoForm\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'guardianEmail'\"\n ></fcom-text-input>\n\n <fcom-text-input\n class=\"ps-small-t block\"\n [translationPrefix]=\"'login.join.fields.guardianMemberNumber'\"\n [parentForm]=\"guardianInfoForm\"\n [displayMargin]=\"false\"\n [required]=\"false\"\n [controlName]=\"'guardianMemberNumber'\"\n ></fcom-text-input>\n\n <ng-container\n [ngTemplateOutlet]=\"termsAndPolicy\"\n [ngTemplateOutletContext]=\"{\n formGroup: guardianInfoForm,\n control: 'consent',\n contentUrl: 'fragments.guardianProgramRules.url',\n }\"\n />\n\n <ng-container\n [ngTemplateOutlet]=\"continueBtn\"\n [ngTemplateOutletContext]=\"{\n disabled: !guardianInfoForm.get('consent').value || !guardianInfoForm.valid,\n loading: (loading$ | async),\n label: enableAccountCreationVerification ? 'login.join.saveAndContinue' : 'login.join.joinFinnairPlus',\n }\"\n />\n </form>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"JoinFlowStep.MARKETING_CONSENT\">\n <div aria-live=\"assertive\">\n <fcom-notification\n *ngIf=\"(apiStatus$ | async) === ApiStatus.JOIN_ERROR\"\n class=\"mr-xsmall-t\"\n [theme]=\"NotificationTheme.ALERT\"\n >\n <span class=\"font-body-1\">{{\n enableAccountCreationVerification\n ? ('login.join.unexpectedError' | finLocalization)\n : ('login.join.flowError' | finLocalization)\n }}</span>\n </fcom-notification>\n </div>\n\n <form\n (submit)=\"complete()\"\n [formGroup]=\"marketingConsentForm\"\n *ngIf=\"consentTextsGroup$ | async as consentGroup\"\n >\n <p class=\"ps-medium-y\">{{ consentGroup.introductionText | finStripHtml }}</p>\n\n <fcom-checkbox\n *ngFor=\"let consent of consentGroup.consentTexts; let first = first; let last = last\"\n [formControlName]=\"consent.consentTextId\"\n [formGroup]=\"marketingConsentForm\"\n [ngClass]=\"{\n block: true,\n 'ps-medium-t': first,\n 'ps-large-b': !last,\n 'ps-xxsmall-b': last,\n }\"\n >\n <div>{{ consent.text | finStripHtml }}</div>\n </fcom-checkbox>\n\n <p class=\"font-body-1 ms-large-t regular-type\" [innerHTML]=\"consentGroup.afterwordText | finSafe: 'html'\"></p>\n <ng-container\n [ngTemplateOutlet]=\"continueBtn\"\n [ngTemplateOutletContext]=\"{\n label: enableAccountCreationVerification ? 'login.join.saveAndContinue' : 'login.join.joinFinnairPlus',\n loading: (loading$ | async),\n }\"\n />\n </form>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"JoinFlowStep.EMAIL_VEFIFICATION\">\n <div aria-live=\"assertive\">\n <fcom-notification\n *ngIf=\"(apiStatus$ | async) === ApiStatus.RESEND_SUCCESS\"\n class=\"block ms-medium-t\"\n [theme]=\"NotificationTheme.SUCCESS\"\n data-testid=\"resend-success\"\n >\n {{ 'login.join.resendSuccess' | finLocalization }}\n </fcom-notification>\n <fcom-notification\n *ngIf=\"(apiStatus$ | async) === ApiStatus.RESEND_ERROR\"\n class=\"mr-xsmall-t\"\n [theme]=\"NotificationTheme.ALERT\"\n [isClosable]=\"true\"\n (closeClick)=\"closeError()\"\n >\n <span class=\"font-body-1\">{{ 'login.join.resendError' | finLocalization }}</span>\n </fcom-notification>\n </div>\n\n <p class=\"font-body-1 regular-type ms-small-y\" [innerHTML]=\"verificationEmailSentText$ | async\"></p>\n <p\n class=\"font-body-1 regular-type ms-small-y\"\n [innerHTML]=\"'login.join.verificationGoToInbox' | finLocalization | finSafe: 'html'\"\n ></p>\n <p class=\"font-body-1 regular-type ms-small-y\">\n {{ 'login.join.verificationDidntReceive' | finLocalization }}\n  \n <fcom-link\n class=\"font-body-1 regular-type bold underline nordic-blue-900-text\"\n (afterNavigation)=\"resend()\"\n data-testid=\"resend-link\"\n >\n {{ 'actions.resend' | finLocalization }}</fcom-link\n >\n </p>\n <fcom-notification\n *ngIf=\"resendLimitReached$ | async\"\n class=\"error block ms-medium-t\"\n [iconName]=\"SvgLibraryIcon.ALERT_TRIANGLE\"\n [theme]=\"NotificationTheme.WARNING\"\n data-testid=\"resend-alert\"\n >\n {{ 'login.join.verificationWarning' | finLocalization }}\n </fcom-notification>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"JoinFlowStep.JOIN_COMPLETE\">\n <p class=\"font-body-1 regular-type\">\n {{ 'login.join.completedEmailSent' | finLocalization: { email: contactDetailsForm.controls['email'].value } }}\n </p>\n\n <ng-container\n [ngTemplateOutlet]=\"continueBtn\"\n [ngTemplateOutletContext]=\"{\n label: 'login.join.logIn',\n icon: { name: SvgLibraryIcon.SINGLE_PAX, position: IconPosition.LEFT },\n login: true,\n }\"\n />\n\n <fcom-button\n data-testid=\"join-form-read-more\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n (clickBtn)=\"readMore()\"\n [text]=\"'login.join.readMore' | finLocalization\"\n ></fcom-button>\n </ng-container>\n </ng-container>\n </fin-login-form-container>\n</ng-container>\n\n<ng-template\n #continueBtn\n let-disabled=\"disabled\"\n let-label=\"label\"\n let-icon=\"icon\"\n let-login=\"login\"\n let-loading=\"loading\"\n>\n <fcom-button\n [type]=\"ButtonType.SUBMIT\"\n [aria]=\"{ label: label ?? 'actions.continue' | finLocalization, loadingLabel: 'actions.loading' | finLocalization }\"\n [disabled]=\"disabled\"\n [loading]=\"loading\"\n (clickBtn)=\"login ? openLogin() : undefined\"\n [icon]=\"icon ? icon : { name: SvgLibraryIcon.ARROW_RIGHT, position: IconPosition.RIGHT }\"\n [mode]=\"ButtonMode.FILL\"\n [text]=\"label ?? 'actions.continue' | finLocalization\"\n class=\"ms-large-t ms-small-b\"\n ></fcom-button>\n</ng-template>\n\n<ng-template #termsAndPolicy let-contentUrl=\"contentUrl\" let-formGroup=\"formGroup\" let-control=\"control\">\n <div [formGroup]=\"formGroup\" class=\"block ps-large-y\">\n <fcom-checkbox [name]=\"control\" [formControlName]=\"control\" [cid]=\"control\">\n <cms-unstyled-fragment class=\"block font-body-1\" [contentUrl$]=\"contentUrl | finLocalization | finToObservable\">\n </cms-unstyled-fragment>\n </fcom-checkbox>\n </div>\n\n <cms-unstyled-fragment\n class=\"block font-body-1\"\n [contentUrl$]=\"'fragments.privacyPolicy.url' | finLocalization | finToObservable\"\n >\n </cms-unstyled-fragment>\n</ng-template>\n","import { Component, HostListener, Input, OnDestroy, OnInit, SecurityContext } from '@angular/core';\nimport { AbstractControl, UntypedFormBuilder, UntypedFormGroup, ValidatorFn, Validators } from '@angular/forms';\nimport { NavigationStart, Router } from '@angular/router';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport {\n BehaviorSubject,\n combineLatest,\n Observable,\n of,\n ReplaySubject,\n Subject,\n Subscription,\n withLatestFrom,\n} from 'rxjs';\nimport { distinctUntilChanged, filter, map, skip, startWith, switchMap, take, tap } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { AppState, ConfigService, CountryCode } from '@fcom/core';\nimport {\n ButtonMode,\n ButtonSize,\n ButtonTheme,\n ButtonType,\n IconPosition,\n InputType,\n LoaderTheme,\n NotificationTheme,\n} from '@fcom/ui-components';\nimport { LoginGender, LoginStep } from '@fcom/core-api/login';\nimport {\n EMAIL_PATTERN,\n isTruthy,\n isPresent,\n LocalDate,\n NAME_PATTERN,\n PASSWORD_PATTERN,\n PHONE_PATTERN,\n rangeBetween,\n rangeFrom,\n sortBy,\n TzDate,\n uniqueBy,\n unsubscribe,\n} from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\nimport { LoginActions } from '@fcom/core/actions';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { WindowRef } from '@fcom/core/providers';\nimport { StepperStep } from '@fcom/ui-components/components/stepper/interfaces';\nimport { JoinFinnairPlusResponseData } from '@fcom/common';\n\nimport { ConsentService, JoinService } from '../../services';\nimport {\n ConsentText,\n ConsentTextId,\n ConsentTextsGroup,\n ElementActions,\n ElementTypes,\n GaContext,\n SelectOption,\n} from '../../../interfaces';\nimport { Airline } from '../../../interfaces/airlines';\nimport { finnairPlusNumberValidator } from '../../../utils/form-validators';\nimport { ToasterService } from '../../../services';\nimport { DataCloudService } from '../../../datacloud';\nimport { GtmService } from '../../../gtm';\nimport { JoinFinnairPlusRequestData } from '../../../interfaces/join-finnair-plus.interface';\n\nexport enum JoinFlowStep {\n BASIC_INFO = 'basic',\n CONTACT_DETAILS = 'contact',\n GUARDIAN_DETAILS = 'guardian',\n MARKETING_CONSENT = 'marketing',\n EMAIL_VEFIFICATION = 'verification',\n JOIN_COMPLETE = 'completed',\n}\n\nconst stepToPreviousStep = {\n [JoinFlowStep.BASIC_INFO]: JoinFlowStep.BASIC_INFO,\n [JoinFlowStep.CONTACT_DETAILS]: JoinFlowStep.BASIC_INFO,\n [JoinFlowStep.GUARDIAN_DETAILS]: JoinFlowStep.CONTACT_DETAILS,\n [JoinFlowStep.MARKETING_CONSENT]: JoinFlowStep.CONTACT_DETAILS,\n [JoinFlowStep.EMAIL_VEFIFICATION]: JoinFlowStep.EMAIL_VEFIFICATION,\n};\n\nexport enum ApiStatus {\n INITIAL = 'initial',\n JOIN_SUCCESS = 'join_success',\n JOIN_ERROR = 'join_error',\n RESEND_SUCCESS = 'resend_success',\n RESEND_ERROR = 'resend_error',\n}\n\nexport interface Step extends StepperStep {\n step: JoinFlowStep;\n}\n\n@Component({\n selector: 'fin-join-form',\n templateUrl: './join-form.component.html',\n})\nexport class JoinFormComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonType = ButtonType;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly IconPosition = IconPosition;\n readonly LoaderTheme = LoaderTheme;\n readonly NotificationTheme = NotificationTheme;\n readonly LoginGender = LoginGender;\n readonly JoinFlowStep = JoinFlowStep;\n readonly InputType = InputType;\n readonly ConsentTextId = ConsentTextId;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly ApiStatus = ApiStatus;\n\n @Input()\n fullScreen = false;\n\n basicInfoForm: UntypedFormGroup;\n contactDetailsForm: UntypedFormGroup;\n marketingConsentForm: UntypedFormGroup;\n guardianInfoForm: UntypedFormGroup;\n\n stepperSteps$: Observable<Step[]>;\n stepperIndex$: Observable<number>;\n stepTranslations$: Observable<{ title: string; description: string }>;\n\n consentTextsGroup$: Observable<ConsentTextsGroup>;\n\n showError$: Observable<boolean>;\n currentStep$: BehaviorSubject<JoinFlowStep> = new BehaviorSubject<JoinFlowStep>(JoinFlowStep.BASIC_INFO);\n loading$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n countryOptions: Observable<SelectOption[]>;\n\n phonePrefixes$: Observable<SelectOption[]>;\n availableDays$: Observable<SelectOption[]>;\n availableMonths$: Observable<SelectOption[]> = of(\n rangeFrom(1, 12).map((month) => ({ name: String(month), value: String(month) }))\n );\n availableYears$: Observable<SelectOption[]> = of(\n rangeBetween(LocalDate.now().minusYears(100).localYear, LocalDate.now().localYear)\n .reverse()\n .map((year) => ({ name: String(year), value: String(year) }))\n );\n isJunior$: Observable<boolean>;\n dateOfBirth$: Observable<LocalDate>;\n\n enableAccountCreationVerification = false;\n memberNumber: string;\n\n apiStatus$: BehaviorSubject<ApiStatus> = new BehaviorSubject<ApiStatus>(ApiStatus.INITIAL);\n\n verificationEmailSentText$: Observable<string>;\n\n email$: ReplaySubject<string> = new ReplaySubject(1);\n\n private resend$ = new Subject();\n resendLimitReached$: Observable<boolean>;\n\n get basicInfoFormBirthDate(): UntypedFormGroup {\n return this.basicInfoForm.get('birthDate') as UntypedFormGroup;\n }\n get contactDetailsFormPassword(): UntypedFormGroup {\n return this.contactDetailsForm.get('password') as UntypedFormGroup;\n }\n get contactDetailsFormPhone(): UntypedFormGroup {\n return this.contactDetailsForm.get('phone') as UntypedFormGroup;\n }\n get guardianInfoFormPhone(): UntypedFormGroup {\n return this.guardianInfoForm.get('guardianPhoneNumber') as UntypedFormGroup;\n }\n\n private subscriptions = new Subscription();\n\n constructor(\n private fb: UntypedFormBuilder,\n private store$: Store<AppState>,\n private joinService: JoinService,\n private languageService: LanguageService,\n private consentService: ConsentService,\n private router: Router,\n private toasterService: ToasterService,\n private windowRef: WindowRef,\n private gtmService: GtmService,\n private dataCloudService: DataCloudService,\n configService: ConfigService,\n private sanitizer: DomSanitizer\n ) {\n this.enableAccountCreationVerification = configService.cfg.enableAccountCreationVerification;\n }\n\n ngOnInit(): void {\n const countryCodes$: Observable<CountryCode[]> = this.languageService.translate('countryCodes').pipe(finShare());\n this.countryOptions = countryCodes$.pipe(\n map((countryCodes) => countryCodes.map(({ name, countryCode }) => ({ name, value: countryCode })))\n );\n\n this.basicInfoForm = this.fb.group({\n firstName: this.fb.control(\n '',\n Validators.compose([\n Validators.required,\n Validators.minLength(2),\n Validators.maxLength(56),\n Validators.pattern(NAME_PATTERN),\n ])\n ),\n lastName: this.fb.control(\n '',\n Validators.compose([\n Validators.required,\n Validators.minLength(2),\n Validators.maxLength(56),\n Validators.pattern(NAME_PATTERN),\n ])\n ),\n birthDate: this.fb.group(\n {\n dateOfBirth: ['', Validators.required],\n monthOfBirth: ['', Validators.required],\n yearOfBirth: ['', Validators.required],\n },\n { validators: [this.ageValidator()] }\n ),\n gender: ['', Validators.required],\n });\n\n this.contactDetailsForm = this.fb.group({\n phone: this.fb.group(\n {\n phonePrefix: this.fb.control(''),\n phoneNumber: this.fb.control(''),\n },\n { validators: [this.phoneValidator()] }\n ),\n email: this.fb.control('', Validators.compose([Validators.required, Validators.pattern(EMAIL_PATTERN)])),\n countryCode: this.fb.control('', Validators.required),\n password: this.fb.group(\n {\n pwd: this.fb.control('', Validators.compose([Validators.required, Validators.pattern(PASSWORD_PATTERN)])),\n confirmPwd: this.fb.control('', Validators.compose([Validators.required])),\n },\n { validators: [this.passwordMatchValidator()] }\n ),\n accept: this.fb.control(false),\n });\n\n this.guardianInfoForm = this.fb.group({\n guardianName: this.fb.control(\n '',\n Validators.compose([\n Validators.required,\n Validators.minLength(2),\n Validators.maxLength(56),\n Validators.pattern(NAME_PATTERN),\n ])\n ),\n guardianEmail: this.fb.control('', Validators.compose([Validators.required, Validators.pattern(EMAIL_PATTERN)])),\n guardianPhoneNumber: this.fb.group(\n {\n phonePrefix: this.fb.control(''),\n phoneNumber: this.fb.control(''),\n },\n { validators: [Validators.required, this.phoneValidator()] }\n ),\n guardianMemberNumber: this.fb.control(\n '',\n Validators.compose([Validators.required, finnairPlusNumberValidator()])\n ),\n consent: this.fb.control(false),\n });\n\n this.marketingConsentForm = this.fb.group({});\n\n this.consentTextsGroup$ = this.consentService.getMarketingConsentTexts().pipe(filter(isPresent), finShare());\n\n this.subscriptions.add(\n this.consentTextsGroup$.subscribe(({ consentTexts }) => {\n this.createMarketingConsentForm(consentTexts);\n })\n );\n\n this.availableDays$ = this.getDays(\n this.basicInfoForm.get('birthDate.yearOfBirth'),\n this.basicInfoForm.get('birthDate.monthOfBirth')\n ).pipe(map((days) => days.map((day) => ({ name: String(day), value: String(day) }))));\n\n this.dateOfBirth$ = combineLatest([\n this.basicInfoForm.get('birthDate.yearOfBirth').valueChanges,\n this.basicInfoForm.get('birthDate.monthOfBirth').valueChanges,\n this.basicInfoForm.get('birthDate.dateOfBirth').valueChanges,\n ]).pipe(\n map(([year, month, day]: [string, string, string]) => {\n if (year && month && day) {\n return LocalDate.forDate(year, month, day);\n }\n return undefined;\n }),\n finShare()\n );\n\n this.isJunior$ = this.dateOfBirth$.pipe(\n map((day) => day && day.gte(LocalDate.now().minusYears(16))),\n finShare(),\n startWith(false)\n );\n\n this.phonePrefixes$ = countryCodes$.pipe(\n take(1),\n tap((countryCodes: CountryCode[]) => {\n const phonePrefix =\n countryCodes.find(({ countryCode }) => countryCode === this.languageService.ddsLocaleValue.countrySite)\n ?.phonePrefix ?? '';\n this.contactDetailsForm.get('phone').get('phonePrefix').setValue(phonePrefix);\n this.guardianInfoForm.get('guardianPhoneNumber').get('phonePrefix').setValue(phonePrefix);\n }),\n map((countryCodes: CountryCode[]) =>\n sortBy(\n countryCodes.filter(uniqueBy(({ phonePrefix }) => phonePrefix)).map((cc) => ({\n name: `(+${cc.phonePrefix})`,\n value: cc.phonePrefix,\n })),\n (option) => option.name\n )\n )\n );\n this.stepTranslations$ = this.currentStep$.pipe(\n withLatestFrom(this.isJunior$),\n map(([step, junior]) => (junior && step === JoinFlowStep.CONTACT_DETAILS ? 'junior' : step)),\n map((prefix) => ({\n title: `login.join.${prefix}Title`,\n description: `login.join.${prefix}Description`,\n })),\n finShare()\n );\n\n this.stepperSteps$ = this.currentStep$.pipe(\n withLatestFrom(this.isJunior$),\n map(([currentStep, junior]) => {\n return currentStep === JoinFlowStep.JOIN_COMPLETE\n ? []\n : [\n JoinFlowStep.BASIC_INFO,\n JoinFlowStep.CONTACT_DETAILS,\n JoinFlowStep.GUARDIAN_DETAILS,\n JoinFlowStep.MARKETING_CONSENT,\n JoinFlowStep.EMAIL_VEFIFICATION,\n ]\n .filter((step) =>\n junior ? step !== JoinFlowStep.MARKETING_CONSENT : step !== JoinFlowStep.GUARDIAN_DETAILS\n )\n .map((step) => ({\n step,\n ariaLabel: `login.join.${step}Aria`,\n }));\n })\n );\n\n this.stepperIndex$ = this.currentStep$.pipe(\n withLatestFrom(this.stepperSteps$),\n map(([currentStep, steps]) => steps.findIndex(({ step }) => step === currentStep))\n );\n\n this.subscriptions.add(\n this.router.events.pipe(filter((e) => e instanceof NavigationStart)).subscribe(() => this.closeDialog())\n );\n\n this.verificationEmailSentText$ = this.email$.pipe(\n switchMap((unsanitizedEmail) => {\n const email = this.sanitizer.sanitize(SecurityContext.HTML, unsanitizedEmail);\n return this.languageService.translate('login.join.verificationEmailSent', {\n email,\n });\n })\n );\n\n const maxResendCount = 2;\n\n const resendStatus$ = this.resend$.pipe(\n take(maxResendCount),\n switchMap(() => this.joinService.resendAccountVerificationEmail(this.memberNumber))\n );\n\n this.subscriptions.add(\n resendStatus$.subscribe({\n next: () => {\n return this.apiStatus$.next(ApiStatus.RESEND_SUCCESS);\n },\n error: () => {\n return this.apiStatus$.next(ApiStatus.RESEND_ERROR);\n },\n })\n );\n\n this.resendLimitReached$ = this.resend$.pipe(\n skip(maxResendCount - 1),\n map((_value) => {\n return true;\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n openLogin(): void {\n this.trackEvent('open-login');\n this.closeDialog();\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n }\n\n moveToStep(step: JoinFlowStep): void {\n this.trackEvent(`open-step-${step}`);\n this.currentStep$.next(step);\n }\n\n closeDialog(): void {\n this.trackEvent('close-dialog');\n this.joinService.joinDialogOpen$.next(false);\n }\n\n closeError(): void {\n this.apiStatus$.next(ApiStatus.INITIAL);\n }\n\n complete(isJunior = false): void {\n const data = this.signUpData(isJunior);\n this.loading$.next(true);\n this.subscriptions.add(\n this.joinService.joinFinnairPlus(data).subscribe({\n next: (responseData: JoinFinnairPlusResponseData) => {\n this.memberNumber = responseData.memberNumber;\n if (this.enableAccountCreationVerification) {\n this.trackEvent('verify-email', 'account-pending', ElementTypes.MODAL, ElementActions.VIEW);\n this.currentStep$.next(JoinFlowStep.EMAIL_VEFIFICATION);\n } else {\n this.trackEvent('join-event', 'true');\n this.trackDataCloud(responseData.memberNumber);\n this.currentStep$.next(JoinFlowStep.JOIN_COMPLETE);\n }\n this.loading$.next(false);\n this.apiStatus$.next(ApiStatus.JOIN_SUCCESS);\n },\n error: () => {\n if (this.enableAccountCreationVerification) {\n this.trackEvent('join-failed', 'false');\n } else {\n this.trackEvent('join-event', 'false');\n }\n if (!this.enableAccountCreationVerification) {\n this.showErrorAndClose();\n } else {\n this.loading$.next(false);\n this.apiStatus$.next(ApiStatus.JOIN_ERROR);\n }\n },\n })\n );\n }\n\n resend(): void {\n this.resend$.next(null);\n }\n\n readMore(): void {\n this.trackEvent('read-more');\n this.subscriptions.add(\n this.languageService\n .translate('fragments.plusReadMore.url')\n .subscribe((url) => this.windowRef.nativeWindow.open(url, '_blank'))\n );\n }\n\n openStep(stepperStep: StepperStep): void {\n if (this.currentStep$.getValue() === JoinFlowStep.EMAIL_VEFIFICATION) {\n return;\n } else {\n const { step } = stepperStep as Step;\n this.trackEvent(`open-stepper-step-${step}`);\n this.apiStatus$.next(ApiStatus.INITIAL);\n this.currentStep$.next(step);\n }\n }\n\n goBack(_event: Event): void {\n const previousStep = stepToPreviousStep[this.currentStep$.getValue()];\n this.apiStatus$.next(ApiStatus.INITIAL);\n this.currentStep$.next(previousStep);\n }\n\n removeLeadingZero(event: Event): void {\n if (event.type !== 'input') {\n return;\n }\n\n const inputEvent = event as InputEvent;\n const inputField = event.target as HTMLInputElement;\n\n if (!inputEvent.inputType && inputField.value[0] === '0') {\n this.contactDetailsFormPhone.get('phoneNumber').setValue(inputField.value.slice(1));\n }\n }\n\n private createMarketingConsentForm(consents: ConsentText[]) {\n const consentFields = consents.reduce((fields, consent) => {\n fields[consent.consentTextId] = this.fb.control(false, { nonNullable: true });\n return fields;\n }, {});\n this.marketingConsentForm = this.fb.group({\n ...consentFields,\n });\n }\n\n private signUpData(isJunior: boolean): JoinFinnairPlusRequestData {\n const { birthDate, firstName, lastName, gender } = this.basicInfoForm.getRawValue();\n const { accept, email, password, phone, countryCode } = this.contactDetailsForm.getRawValue();\n const date = TzDate.utcMidnight(birthDate.yearOfBirth, birthDate.monthOfBirth, birthDate.dateOfBirth);\n\n const data: JoinFinnairPlusRequestData = {\n firstName,\n lastName,\n gender,\n dateOfBirth: date.toTzString(),\n password: password.pwd,\n phoneNumber: `+${phone.phonePrefix}${phone.phoneNumber}`,\n enrollmentChannel: 'Web',\n locale: this.languageService.localeValue.replace('_', '-'),\n countryCode,\n email,\n };\n\n if (isJunior) {\n const { consent, guardianEmail, guardianMemberNumber, guardianName, guardianPhoneNumber } =\n this.guardianInfoForm.getRawValue();\n return {\n ...data,\n consent,\n guardianName,\n guardianEmail,\n guardianMemberNumber,\n guardianPhoneNumber: `+${guardianPhoneNumber.phonePrefix}${guardianPhoneNumber.phoneNumber}`,\n };\n }\n\n const marketingConsentForm = this.marketingConsentForm.getRawValue();\n\n return {\n ...data,\n agreements: accept,\n marketingPermissions: marketingConsentForm,\n };\n }\n\n private getDays = (yearControl: AbstractControl, monthControl: AbstractControl): Observable<number[]> => {\n return combineLatest([\n yearControl.valueChanges.pipe(startWith(yearControl.value as string), filter(isTruthy)),\n monthControl.valueChanges.pipe(startWith(monthControl.value as string), filter(isTruthy)),\n ]).pipe(\n map(([year, month]: [string, string]) => LocalDate.getAmountOfDaysInMonth(Number(year), Number(month))),\n map((numberOfDays) => rangeFrom(1, numberOfDays)),\n startWith(rangeFrom(1, 31)),\n distinctUntilChanged(),\n finShare()\n );\n };\n\n private passwordMatchValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (\n !control.get('pwd').pristine &&\n !control.get('confirmPwd').pristine &&\n control.get('pwd').value !== control.get('confirmPwd').value\n ) {\n return { match: true };\n }\n return null;\n };\n };\n\n private phoneValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (!control.get('phoneNumber').pristine && !control.get('phoneNumber').value.match(PHONE_PATTERN)) {\n return { pattern: true };\n }\n return null;\n };\n };\n\n private ageValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.get('dateOfBirth').value && control.get('monthOfBirth').value && control.get('yearOfBirth').value) {\n const date = LocalDate.forDate(\n control.get('yearOfBirth').value,\n control.get('monthOfBirth').value,\n control.get('dateOfBirth').value\n );\n if (date.isBetween(LocalDate.now().minusYears(2), LocalDate.now())) {\n return { tooYoung: true };\n }\n if (date.gte(LocalDate.now())) {\n return { invalid: true };\n }\n }\n return null;\n };\n };\n\n private showErrorAndClose(): void {\n this.toasterService.addMessageToQueue({\n id: 'join-failed',\n contentKey: 'login.join.flowError',\n theme: NotificationTheme.ALERT,\n });\n this.closeDialog();\n }\n\n private trackEvent(\n elementName: string,\n state: string = undefined,\n elementType = ElementTypes.BUTTON,\n action = ElementActions.CLICK\n ): void {\n this.gtmService.trackElement(`join-form-${elementName}`, GaContext.FINNAIR_PLUS, elementType, state, action);\n }\n\n private trackDataCloud(memberNumber: string): void {\n const firstName = this.basicInfoForm.get('firstName').value;\n const lastName = this.basicInfoForm.get('lastName').value;\n const email = this.contactDetailsForm.get('email').value;\n const phone = this.contactDetailsForm.get('phone').value;\n this.dataCloudService.signupPaxDetails({\n firstName,\n lastName,\n emailAddress: email,\n countryCode: phone.phonePrefix,\n phoneNumber: phone.phoneNumber,\n memberProgram: Airline.FINNAIR,\n memberNumber,\n });\n }\n\n @HostListener('document:keydown.escape', ['$event']) onKeydownHandler(_event: KeyboardEvent): void {\n this.closeDialog();\n }\n}\n","<article [ngClass]=\"styleClasses$ | async\" #articleWrapper [id]=\"mappedSegment | decodeURI: true\">\n <div *ngIf=\"mappedImage$ | async\" class=\"image-container\">\n <fin-content-image\n class=\"block image-height mr-medium-b\"\n [scale]=\"scaleImage\"\n [imageData$]=\"mappedImage$\"\n ></fin-content-image>\n </div>\n <ng-container *ngIf=\"title$ | async as t\">\n <div class=\"mr-xsmall-b\" *ngIf=\"icons$ | async as icons; else plainTextTitle\">\n <fcom-icon\n *ngFor=\"let icon of icons\"\n [name]=\"icon.name\"\n [category]=\"icon.category ?? IconLibrary.SVG_LIBRARY\"\n class=\"icon-large ms-small-r\"\n ></fcom-icon>\n <span class=\"bold-type\">{{ t }}</span>\n </div>\n <ng-template #plainTextTitle>\n <cms-heading-tag\n [level]=\"headerLevel ?? (content$ | async).headerLevel ?? DEFAULT_HEADER_LEVEL\"\n [extraClasses]=\"headerStyles.concat((content$ | async).subjectTaxonomyTags ?? []).join(' ')\"\n >\n {{ t }}\n </cms-heading-tag>\n </ng-template>\n </ng-container>\n <div #contentWrapper [innerHTML]=\"mappedContent$ | async | finSafe: 'html'\"></div>\n</article>\n","import { ChangeDetectionStrategy, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, Subject } from 'rxjs';\nimport { filter, map, takeUntil } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { DdsLanguage } from '@fcom/core';\nimport { symbolToLangPath } from '@fcom/core/utils/cms-path-helpers';\nimport { CmsArticle, CmsContentType, CmsImageData, CmsPicture, CmsVideo } from '@fcom/core-api';\nimport { type IconName } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-rich-text',\n styleUrls: ['./rich-text.component.scss'],\n templateUrl: './rich-text.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RichTextComponent implements OnDestroy, OnInit {\n readonly DEFAULT_HEADER_LEVEL = 3;\n readonly IconLibrary = IconLibrary;\n\n @Input()\n title$: Observable<string>;\n @Input()\n content$: Observable<CmsArticle>;\n @Input()\n media$: Observable<CmsPicture[] | CmsVideo[]>;\n @Input()\n icons$: Observable<{ name: IconName; category?: IconLibrary }[]>;\n @Input()\n styleClasses$: Observable<string[]>;\n @Input()\n scaleImage = true;\n @Input()\n headerLevel: number;\n @Input()\n headerStyles = [];\n @ViewChild('contentWrapper', { static: true })\n contentWrapper: ElementRef;\n @ViewChild('articleWrapper', { static: true })\n articleWrapper: ElementRef;\n\n mappedContent$: Observable<string>;\n mappedImage$: Observable<CmsImageData>;\n mappedSegment: string;\n\n private ngDestroyed$ = new Subject();\n\n constructor(private languageService: LanguageService) {}\n\n ngOnInit(): void {\n const ddsLocale: DdsLanguage = this.languageService.ddsLocaleValue;\n\n this.mappedContent$ = this.content$.pipe(\n map((content) => content.detailText),\n map((contentHtml: string) => {\n const parsedContent = contentHtml\n .replace(/<table\\b/g, '<div class=\"rich-text-table-wrapper pr-xsmall-t pr-medium-b\"><table')\n .replace(/<\\/table>/g, '</table></div>');\n\n return symbolToLangPath(parsedContent, ddsLocale);\n })\n );\n\n this.mappedImage$ = this.media$.pipe(\n filter((media) => media.length > 0),\n filter((media) => media[0].contentType === CmsContentType.CMPicture),\n map((media: CmsPicture[]) => media[0])\n );\n\n this.content$.pipe(takeUntil(this.ngDestroyed$)).subscribe((content) => {\n this.mappedSegment = content.segment;\n });\n }\n\n ngOnDestroy(): void {\n this.ngDestroyed$.next(true);\n }\n}\n","'use strict';\n\nvar undefined;\n\nvar $Object = require('es-object-atoms');\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar abs = require('math-intrinsics/abs');\nvar floor = require('math-intrinsics/floor');\nvar max = require('math-intrinsics/max');\nvar min = require('math-intrinsics/min');\nvar pow = require('math-intrinsics/pow');\nvar round = require('math-intrinsics/round');\nvar sign = require('math-intrinsics/sign');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = require('gopd');\nvar $defineProperty = require('es-define-property');\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = require('get-proto');\nvar $ObjectGPO = require('get-proto/Object.getPrototypeOf');\nvar $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');\n\nvar $apply = require('call-bind-apply-helpers/functionApply');\nvar $call = require('call-bind-apply-helpers/functionCall');\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': $Object,\n\t'%Object.getOwnPropertyDescriptor%': $gOPD,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\n\t'%Function.prototype.call%': $call,\n\t'%Function.prototype.apply%': $apply,\n\t'%Object.defineProperty%': $defineProperty,\n\t'%Object.getPrototypeOf%': $ObjectGPO,\n\t'%Math.abs%': abs,\n\t'%Math.floor%': floor,\n\t'%Math.max%': max,\n\t'%Math.min%': min,\n\t'%Math.pow%': pow,\n\t'%Math.round%': round,\n\t'%Math.sign%': sign,\n\t'%Reflect.getPrototypeOf%': $ReflectGPO\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call($call, Array.prototype.concat);\nvar $spliceApply = bind.call($apply, Array.prototype.splice);\nvar $replace = bind.call($call, String.prototype.replace);\nvar $strSlice = bind.call($call, String.prototype.slice);\nvar $exec = bind.call($call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","<div\n [ngClass]=\"{\n 'nordic-blue-900-text': (enableBenefitChanges$ | async) === false || benefit.isPositive,\n 'grey-600-text': (enableBenefitChanges$ | async) && !benefit.isPositive,\n }\"\n data-testid=\"benefit\"\n>\n <div\n class=\"fill flex flex--row flex--top\"\n [ngClass]=\"{\n 'pr-xxsmall-t': (enableBenefitChanges$ | async) === false,\n }\"\n >\n <div\n class=\"flex--nogrow ms-xsmall-r\"\n [ngClass]=\"{\n 'grey-500-text': (enableBenefitChanges$ | async) && !benefit.isPositive,\n }\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"benefitWithIcon.icon\"></fcom-icon>\n </div>\n <div class=\"flex-1\">\n <div\n [class.heather-700-text]=\"isKoreanColor\"\n class=\"font-body-1\"\n [ngClass]=\"{\n 'medium-type': (enableBenefitChanges$ | async) === false || benefit.isPositive,\n 'regular-type': (enableBenefitChanges$ | async) === true && !benefit.isPositive,\n }\"\n >\n {{ benefitWithIcon.label }}\n </div>\n <div\n class=\"regular-type\"\n *ngIf=\"!hasChildren\"\n [ngClass]=\"{\n 'font-body-1': (enableBenefitChanges$ | async) === false,\n 'font-body-2': (enableBenefitChanges$ | async) === true,\n }\"\n >\n {{ benefitWithIcon.value }}\n </div>\n </div>\n </div>\n <div *ngIf=\"hasChildren\">\n <ng-container *ngFor=\"let childBenefit of benefitWithIcon.children\">\n <div\n class=\"fill flex flex--row flex--top ps-large-l ps-xxsmall-y\"\n *ngIf=\"childBenefit.isPositive\"\n [ngClass]=\"{ 'ms-xsmall-y': (enableBenefitChanges$ | async) === false }\"\n >\n <div class=\"flex--nogrow ms-xsmall-r\">\n <fcom-icon class=\"icon-medium\" [name]=\"childBenefit.icon\"></fcom-icon>\n </div>\n <div class=\"flex-1\">\n <div\n class=\"medium-type\"\n [ngClass]=\"{\n 'font-body-1': (enableBenefitChanges$ | async) === false,\n 'font-body-2': (enableBenefitChanges$ | async) === true,\n }\"\n >\n {{ childBenefit.label }}\n </div>\n <div\n class=\"regular-type\"\n [ngClass]=\"{\n 'font-body-1': (enableBenefitChanges$ | async) === false,\n 'font-body-2': (enableBenefitChanges$ | async) === true,\n }\"\n >\n {{ childBenefit.value }}\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, of } from 'rxjs';\n\nimport { TranslatedBenefitRow } from '@fcom/dapi/api/models';\n\nimport { BENEFITS_ICON_MAP, koreanColoredBenefits } from '../../../utils/benefit.utils';\n\nexport interface BenefitRowWithIcon extends TranslatedBenefitRow {\n children: BenefitRowWithIcon[];\n icon: SvgLibraryIcon;\n}\n\n@Component({\n selector: 'fin-benefit',\n templateUrl: './benefit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BenefitComponent implements OnInit {\n public benefitWithIcon?: BenefitRowWithIcon;\n\n isKoreanColor = false;\n hasChildren = false;\n\n @Input() benefit: TranslatedBenefitRow;\n @Input() showKoreaNotification: boolean;\n @Input() enableBenefitChanges$: Observable<boolean> = of(false);\n\n ngOnInit(): void {\n this.benefitWithIcon = this.extendWithIcon(this.benefit);\n this.isKoreanColor = this.showKoreaNotification && koreanColoredBenefits.includes(this.benefit.key);\n this.hasChildren = !!this.benefit.children?.length;\n }\n\n private extendWithIcon(benefit: TranslatedBenefitRow): BenefitRowWithIcon {\n return {\n ...benefit,\n children: benefit.children?.map(this.extendWithIcon),\n icon: BENEFITS_ICON_MAP[benefit.key] ?? SvgLibraryIcon.CHECKMARK,\n };\n }\n}\n","<div *ngFor=\"let html of htmls$ | async\" [innerHTML]=\"html\"></div>\n","import { Component, OnInit } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\nimport { Observable, distinctUntilChanged, map } from 'rxjs';\n\nimport { Schema, SchemaService } from '../../services';\n\n@Component({\n selector: 'fin-schema',\n templateUrl: 'schema.component.html',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: { ngSkipHydration: 'true' },\n styles: [],\n})\nexport class SchemaComponent implements OnInit {\n htmls$: Observable<SafeHtml[]>;\n\n constructor(\n private sanitizer: DomSanitizer,\n private schemaService: SchemaService\n ) {}\n\n ngOnInit(): void {\n this.htmls$ = this.schemaService.schemas$.pipe(\n distinctUntilChanged(),\n map((schemas: Schema[]) => schemas.map((schema) => this.getSafeHTML(schema)))\n );\n }\n\n private getSafeHTML(schema: Schema): SafeHtml {\n const json = schema ? JSON.stringify(schema, null, 2).replace(/<\\/script>/g, '<\\\\/script>') : ''; // escape / to prevent script tag in JSON\n const html = `<script type=\"application/ld+json\">${json}</script>`;\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { MatDatepickerIntl } from '@angular/material/datepicker';\nimport { Injectable, OnDestroy } from '@angular/core';\n\nimport { Subscription } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { unsubscribe } from '@fcom/core/utils';\n\n@Injectable({ providedIn: 'root' })\nexport class DatePickerLocalizationService extends MatDatepickerIntl implements OnDestroy {\n private subscription = new Subscription();\n\n constructor(private languageService: LanguageService) {\n super();\n this.subscription.add(\n this.languageService\n .translate('SERVICE_FORMS.NTServiceForms.helpers.datePicker')\n .subscribe((values) => this.attachTranslations(values))\n );\n }\n\n attachTranslations(values: Record<string, string>): void {\n this.calendarLabel = values.calendarLabel;\n this.openCalendarLabel = values.openCalendarLabel;\n this.prevMonthLabel = values.prevMonthLabel;\n this.nextMonthLabel = values.nextMonthLabel;\n this.prevYearLabel = values.prevYearLabel;\n this.nextYearLabel = values.nextYearLabel;\n this.prevMultiYearLabel = values.prevMultiYearLabel;\n this.nextMultiYearLabel = values.nextMultiYearLabel;\n this.switchToMonthViewLabel = values.switchToMonthViewLabel;\n this.switchToMultiYearViewLabel = values.switchToMultiYearViewLabel;\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n}\n","import { DateAdapter } from '@angular/material/core';\nimport { Injectable } from '@angular/core';\n\nimport { LocalDate, pad } from '@fcom/core/utils';\n\nexport const dayMonthYearFormat = {\n parse: {\n dateInput: 'DD/MM/YYYY',\n },\n display: {\n dateInput: 'DD/MM/YYYY',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n },\n};\n\nconst DEFAULT_MONTH_NAMES = {\n long: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n};\n\nconst DEFAULT_DAY_OF_WEEK_NAMES = {\n long: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n};\n\nlet SUPPORTS_INTL_API;\ntry {\n SUPPORTS_INTL_API = typeof Intl != 'undefined';\n} catch (_a) {\n SUPPORTS_INTL_API = false;\n}\n\nconst range = (length, valueFunction) => {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n};\n\n@Injectable({ providedIn: 'root' })\nexport class CustomDateAdapter extends DateAdapter<LocalDate> {\n parse(value: string): LocalDate | null {\n if (value.indexOf('/') > -1 || value.indexOf('.') > -1) {\n const splitDateRegex = /[ .:;?!~,`''&|()<>{}[\\]\\r\\n/\\\\]+/;\n const [date, month, year] = value.split(splitDateRegex).map(Number);\n\n try {\n return LocalDate.forDate(year, month, date);\n } catch {\n return null;\n }\n }\n return null;\n }\n\n deserialize(value: unknown): LocalDate | null {\n if (typeof value === 'string' && LocalDate.isLocalDate(value)) {\n return new LocalDate(value);\n }\n return super.deserialize(value);\n }\n\n compareDate(first: LocalDate, second: LocalDate): number {\n return first.lt(second) ? -1 : first.equals(second) ? 0 : 1;\n }\n\n getDateNames(): string[] {\n return Array(31)\n .fill(0)\n .map((_, i) => String(i + 1));\n }\n\n format(date: LocalDate): string {\n return `${pad(date.localDay)}.${pad(date.localMonth)}.${date.localYear}`;\n }\n\n addCalendarDays(date: LocalDate, days: number): LocalDate {\n return date.plusDays(days);\n }\n\n addCalendarMonths(date: LocalDate, months: number): LocalDate {\n return date.plusMonths(months);\n }\n\n addCalendarYears(date: LocalDate, years: number): LocalDate {\n return date.plusYears(years);\n }\n\n clone(date: LocalDate): LocalDate {\n return new LocalDate(date.toString());\n }\n\n /**\n * @param year\n * @param month index based number starting from 0\n * @param date\n */\n createDate(year: number, month: number, date: number): LocalDate {\n return LocalDate.forDate(year, month + 1, date);\n }\n\n getDate(date: LocalDate): number {\n return date.localDay;\n }\n\n getDayOfWeek(date: LocalDate): number {\n return date.weekday;\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, { weekday: style, timeZone: 'utc' });\n return range(7, (i) =>\n this.stripDirectionalityCharacters(this.intFormat(dtf, LocalDate.forDate(2017, 1, i + 1)))\n );\n }\n\n return DEFAULT_DAY_OF_WEEK_NAMES[style];\n }\n\n getFirstDayOfWeek(): number {\n return 1;\n }\n\n /**\n * @param date\n * @return number zero based number of month\n */\n getMonth(date: LocalDate): number {\n return date.localMonth - 1;\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, { month: style, timeZone: 'utc' });\n return range(12, (i) =>\n this.stripDirectionalityCharacters(this.intFormat(dtf, LocalDate.forDate(2017, i + 1, 1)))\n );\n }\n\n return DEFAULT_MONTH_NAMES[style];\n }\n\n getNumDaysInMonth(date: LocalDate): number {\n return LocalDate.getAmountOfDaysInMonth(date.localYear, date.localMonth);\n }\n\n getYear(date: LocalDate): number {\n return date.localYear;\n }\n\n getYearName(date: LocalDate): string {\n return date.localYear.toString();\n }\n\n invalid(): LocalDate {\n return null;\n }\n\n isDateInstance(obj: unknown): boolean {\n return obj instanceof LocalDate;\n }\n\n isValid(date: LocalDate | null): boolean {\n if (date === null) {\n return false;\n }\n return !isNaN(date.toDate().getTime());\n }\n\n toIso8601(date: LocalDate): string {\n return date.toISOString();\n }\n\n today(): LocalDate {\n return LocalDate.now();\n }\n\n private stripDirectionalityCharacters(str): string {\n return str.replace(/[\\u200e\\u200f]/g, '');\n }\n\n private intFormat(dtf: Intl.DateTimeFormat, date: LocalDate) {\n return dtf.format(date.toDate());\n }\n}\n","<div\n [formGroup]=\"parentForm\"\n class=\"autocomplete-container\"\n [class.ms-xlarge-b]=\"displayMargin\"\n [class.theme-web2]=\"theme === DatepickerTheme.WEB_2\"\n matAutocompleteOrigin\n #origin=\"matAutocompleteOrigin\"\n>\n <div class=\"relative ps-xxsmall-b\" [class.new-theme]=\"theme === DatepickerTheme.WEB_2\">\n <label\n class=\"font-body-1 flex ps-xxsmall-b\"\n [for]=\"idOrControlName\"\n [ngClass]=\"{\n 'grey-600-text': !(ctrlField.invalid && ctrlField.touched) && theme === DatepickerTheme.DEFAULT,\n 'nordic-blue-400-text': !(ctrlField.invalid && ctrlField.touched) && theme === DatepickerTheme.WEB_2,\n 'error-900-text': ctrlField.invalid && ctrlField.touched,\n }\"\n >\n <div class=\"flex-1\">\n {{ translationPrefix + '.label' | finLocalization }}\n <span *ngIf=\"isRequired\" class=\"flex-1 flex--nogrow\"> *</span>\n </div>\n </label>\n <div [class.relative]=\"theme === DatepickerTheme.WEB_2\">\n <input\n class=\"font-body-1 light-type\"\n [min]=\"minDate\"\n [max]=\"maxDate\"\n [class.form-field-empty]=\"!(ctrlField.value || placeHolder)\"\n [formControlName]=\"controlName\"\n [matDatepicker]=\"dp\"\n [id]=\"idOrControlName\"\n [placeholder]=\"placeHolder ? (placeHolder | finLocalization) : null\"\n (dateChange)=\"signalSelection($event)\"\n [name]=\"controlName\"\n [ngClass]=\"{\n 'light-type': theme !== DatepickerTheme.WEB_2,\n 'medium-type': theme === DatepickerTheme.WEB_2,\n 'ps-small': theme === DatepickerTheme.WEB_2,\n 'rounded-large': theme === DatepickerTheme.WEB_2,\n }\"\n />\n <span class=\"divider\" *ngIf=\"theme !== DatepickerTheme.WEB_2\"></span>\n <div class=\"absolute datepicker-container\">\n <button\n (click)=\"dp.open()\"\n type=\"button\"\n [class.disabled]=\"ctrlField.disabled\"\n [attr.aria-label]=\"'SERVICE_FORMS.NTServiceForms.helpers.datePicker.openCalendarLabel' | finLocalization\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"icon\"></fcom-icon>\n </button>\n <mat-datepicker\n panelClass=\"service-datepicker shadow font-body-1 pr-small white-bg regular-type\"\n #dp\n ></mat-datepicker>\n </div>\n </div>\n </div>\n <div *ngIf=\"ctrlField.invalid && ctrlField.touched\" class=\"error-label font-body-2 error-900-text\" aria-live=\"polite\">\n <span *ngIf=\"ctrlField.errors?.required\" aria-live=\"polite\" class=\"required\">\n {{ translationPrefix + '.required' | finLocalization }}\n </span>\n <span *ngIf=\"ctrlField.errors?.pattern\" aria-live=\"polite\" class=\"pattern\">\n {{ translationPrefix + '.pattern' | finLocalization }}\n </span>\n <span *ngIf=\"ctrlField.errors?.matDatepickerMax\" aria-live=\"polite\" class=\"max\">\n {{ translationPrefix + '.max' | finLocalization }}\n </span>\n <span *ngIf=\"ctrlField.errors?.matDatepickerMin\" aria-live=\"polite\" class=\"min\">\n {{ translationPrefix + '.min' | finLocalization }}\n </span>\n </div>\n</div>\n<div aria-live=\"polite\" class=\"result-helper is-vishidden\">\n <span tabindex=\"-1\" *ngIf=\"selectedDay\">\n {{\n translationPrefix + '.selection' | finLocalization: { day: selectedDay, month: selectedMonth, year: selectedYear }\n }}</span\n >\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup } from '@angular/forms';\nimport { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';\nimport { MatDatepickerInputEvent, MatDatepickerIntl } from '@angular/material/datepicker';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { LoaderType } from '@fcom/common/';\nimport { LocalDate } from '@fcom/core/utils';\n\nimport { DatePickerLocalizationService } from '../../services/datepicker-localization.service';\nimport { CustomDateAdapter, dayMonthYearFormat } from '../../services/datepicker-adapter';\n\nexport enum DatepickerTheme {\n DEFAULT = 'default',\n WEB_2 = 'web-2',\n}\n\n@Component({\n selector: 'fin-datepicker',\n styleUrls: ['./datepicker.component.scss'],\n templateUrl: 'datepicker.component.html',\n providers: [\n { provide: MatDatepickerIntl, useClass: DatePickerLocalizationService },\n { provide: DateAdapter, useClass: CustomDateAdapter },\n { provide: MAT_DATE_FORMATS, useValue: dayMonthYearFormat },\n ],\n})\nexport class DatepickerComponent implements OnInit {\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n displayMargin = true;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n placeHolder: string = null;\n\n @Input()\n minDate: LocalDate = LocalDate.forDateObj(new Date(0));\n\n @Input()\n maxDate: LocalDate = LocalDate.now();\n\n @Input()\n id: string;\n\n @Input()\n icon: SvgLibraryIcon = SvgLibraryIcon.BOOK_FLIGHT;\n\n @Input()\n theme = DatepickerTheme.DEFAULT;\n\n public readonly LoaderType = LoaderType;\n public readonly DatepickerTheme = DatepickerTheme;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n\n selectedDay: number;\n selectedMonth: number;\n selectedYear: number;\n isRequired = false;\n idOrControlName: string;\n\n constructor(\n private languageService: LanguageService,\n private adapter: DateAdapter<CustomDateAdapter>\n ) {}\n\n ngOnInit(): void {\n this.setLocale();\n\n this.isRequired = this.required;\n this.idOrControlName = this.id || this.controlName;\n }\n\n setLocale(): void {\n const lang = this.languageService.localeValue.replace('_', '-');\n\n this.adapter.setLocale(lang);\n }\n\n signalSelection(eventValue: MatDatepickerInputEvent<any>): void {\n if (eventValue.value && eventValue.value instanceof LocalDate) {\n this.selectedDay = eventValue.value.localDay;\n this.selectedMonth = eventValue.value.localMonth;\n this.selectedYear = eventValue.value.localYear;\n }\n }\n\n get required(): boolean {\n return this.ctrlField.errors?.required;\n }\n\n get ctrlField(): AbstractControl {\n return this.parentForm.get(this.controlName);\n }\n}\n","import { Data } from '@angular/router';\n\nimport { Amount } from '@fcom/dapi';\nimport { CmsImageData } from '@fcom/core-api';\n\nexport interface OndMarketingOfferResponse {\n [locationMatchKey: string]: {\n prices: OndMarketingOfferInput[];\n };\n}\n\nexport interface OndMarketingOfferInput {\n /**\n * currencyCode to use, eq EUR\n */\n currency: string;\n /**\n * Departure date string \"2020-08-25\"\n */\n departure: string;\n /**\n * From locationCode\n */\n from: string;\n /**\n * Offer price\n */\n price: number;\n /**\n * Return date string \"2020-08-28\"\n */\n return: string;\n /**\n * To locationCode\n */\n to: string;\n}\n\nexport interface OndMarketingOffer {\n /**\n * IATA code for flight origin location\n */\n originLocationCode: string;\n /**\n * IATA code for flight destination location\n */\n destinationLocationCode: string;\n /**\n * ISO8601 (e.g. 2019-04-12)\n */\n departureDate: string;\n /**\n * ISO8601 (e.g. 2019-04-12)\n */\n returnDate: string;\n /**\n * The price for a single adult passenger\n */\n price: Amount;\n /**\n * The (internal) url to navigate to when clicked\n */\n link: string;\n /**\n * Origin city name translations for offer in UX\n */\n originCityName?: string;\n /**\n * Destination city name translations for offer in UX\n */\n destinationCityName?: string;\n /**\n * Origin country name translations for offer in UX\n */\n originCountryName?: string;\n /**\n * Destination country name translations for offer in UX\n */\n destinationCountryName?: string;\n /**\n * Origin country code translations for offer in UX\n */\n originCountryCode?: string;\n /**\n * Destination country code translations for offer in UX\n */\n destinationCountryCode?: string;\n}\n\nexport interface OndMarketingOffersRequestBody {\n departureFrom: string;\n departureTo: string;\n destinations: string[];\n duration: string | number;\n origin: string;\n}\n\nexport interface OndLocationsRequestBody {\n destinations: string[];\n lang: string;\n}\n\nexport type OndLocationsResponse = OndLocationsCountryResponse | OndLocationsLocationResponse;\n\nexport interface OndLocationsCountryResponse {\n [key: string]: OndLocationsCountryData;\n}\n\nexport interface OndLocationsCountryData {\n countryName: string;\n}\n\nexport interface OndLocationsLocationResponse {\n [key: string]: OndLocationData;\n}\n\nexport interface OndMarketingFlightData {\n [locationMatchKey: string]: OndMarketingFlightDataItem;\n}\n\nexport interface OndMarketingFlightDataItem {\n from: string;\n to: string;\n departure: string;\n return: string;\n currency: string;\n price: number;\n}\n\nexport interface OndFlightsRequestBody {\n origins: string[];\n destinations: string[];\n}\n\nexport interface FlightPair {\n origin: string | null;\n destination: string | null;\n ignoredSEOTitle?: string;\n originAirport?: string;\n destinationAirport?: string;\n}\n\nexport interface OndStream {\n flightParams: FlightPair;\n locationData: OndLocationsResponse;\n}\n\nexport interface OndDataStream {\n data: Data;\n locationData: OndLocationsResponse;\n}\n\ninterface OndLocationInfo {\n /**\n * The name of the corresponding city.\n * E.g. { name: 'Helsinki Vantaa', cityName: 'Helsinki' }\n */\n cityName: string;\n\n /**\n * Two-letter state code (uppercase)\n * Usually null, probably for U.S. states only. E.g. JFK has \"NY\".\n */\n stateCode?: string;\n\n /**\n * Two-letter country code (uppercase)\n */\n countryCode: string;\n\n /**\n * Picture which is mapped from locations api\n */\n picture?: CmsImageData;\n}\n\nexport interface OndLocationData extends OndLocationInfo {\n country?: string;\n countryUrl?: string;\n destinationUrl?: string;\n continentCode: string;\n}\n\nexport interface OndPairEnhanced extends OndPair {\n /**\n * Translation added in UX\n */\n originCityName: string;\n originCountryName: string;\n destinationCityName: string;\n destinationCountryName: string;\n}\n\nexport interface OndPair {\n origin: string;\n originCountry: string;\n destination: string;\n destinationCountry: string;\n title: string;\n detailText: string | null;\n htmlDescription: string;\n lang: string;\n}\n\nexport type OndPairRequestBody =\n | FromCityOndPairRequestBody\n | FromCountryOndPairRequestBody\n | ToCityOndPairRequestBody\n | ToLocaleRequestBody\n | ToCountryOndPairRequestBody;\n\nexport type FromCityOndPairRequestBody =\n | {\n origin: string;\n lang: string;\n }\n | {\n origin: string;\n destination: string;\n lang: string;\n }\n | {\n origin: string;\n destinationCountry: string;\n lang: string;\n };\n\nexport type FromCountryOndPairRequestBody =\n | {\n originCountry: string;\n lang: string;\n }\n | {\n originCountry: string;\n destination: string;\n lang: string;\n }\n | {\n originCountry: string;\n destinationCountry: string;\n lang: string;\n };\n\nexport type ToCityOndPairRequestBody =\n | {\n destination: string;\n lang: string;\n }\n | {\n destination: string;\n origin: string;\n lang: string;\n }\n | {\n destination: string;\n originCountry: string;\n lang: string;\n };\n\nexport type ToCountryOndPairRequestBody =\n | {\n destinationCountry: string;\n lang: string;\n }\n | {\n destinationCountry: string;\n origin: string;\n lang: string;\n }\n | {\n destinationCountry: string;\n originCountry: string;\n lang: string;\n };\n\nexport type ToLocaleRequestBody =\n | {\n destinationCountry: string;\n }\n | {\n destinationCountry: string;\n origin: string;\n }\n | {\n destinationCountry: string;\n originCountry: string;\n };\n\nexport interface OndPairEnhancedResponse {\n [key: string]: OndPairEnhanced;\n}\n\nexport interface OndPairResponse {\n [key: string]: OndPair;\n}\n\nexport enum OndPageType {\n LANDING = 'landing',\n LISTING = 'listing',\n}\n\nexport interface OndLink {\n origin: string;\n destination?: string;\n link: string;\n originCityName: string;\n originCountryName: string;\n destinationCityName?: string;\n destinationCountryName?: string;\n}\n\nexport interface OndLinkObject {\n link: string;\n locationName: string;\n countryCode?: string;\n}\n\nexport interface OndLinkTranslations {\n to: string;\n from: string;\n fromTo: string;\n}\n\nexport enum OndMarketingRoutesPath {\n FROM = 'from',\n FROM_COUNTRY = 'from-country',\n CITY_TO_CITY = 'city-to-city',\n COUNTRY_TO_COUNTRY = 'country-to-country',\n}\n","import { OperatorFunction, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\n\n/**\n * Buffers the source Observable values until `closingNotifier` emits.\n *\n * <span class=\"informal\">Collects values from the past as an array, and emits\n * that array only when another Observable emits.</span>\n *\n * ![](buffer.png)\n *\n * Buffers the incoming Observable values until the given `closingNotifier`\n * `ObservableInput` (that internally gets converted to an Observable)\n * emits a value, at which point it emits the buffer on the output\n * Observable and starts a new buffer internally, awaiting the next time\n * `closingNotifier` emits.\n *\n * ## Example\n *\n * On every click, emit array of most recent interval events\n *\n * ```ts\n * import { fromEvent, interval, buffer } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const intervalEvents = interval(1000);\n * const buffered = intervalEvents.pipe(buffer(clicks));\n * buffered.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link window}\n *\n * @param closingNotifier An `ObservableInput` that signals the\n * buffer to be emitted on the output Observable.\n * @return A function that returns an Observable of buffers, which are arrays\n * of values.\n */\nexport function buffer<T>(closingNotifier: ObservableInput<any>): OperatorFunction<T, T[]> {\n return operate((source, subscriber) => {\n // The current buffered values.\n let currentBuffer: T[] = [];\n\n // Subscribe to our source.\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => currentBuffer.push(value),\n () => {\n subscriber.next(currentBuffer);\n subscriber.complete();\n }\n )\n );\n\n // Subscribe to the closing notifier.\n innerFrom(closingNotifier).subscribe(\n createOperatorSubscriber(\n subscriber,\n () => {\n // Start a new buffer and emit the previous one.\n const b = currentBuffer;\n currentBuffer = [];\n subscriber.next(b);\n },\n noop\n )\n );\n\n return () => {\n // Ensure buffered values are released on finalization.\n currentBuffer = null!;\n };\n });\n}\n","export const ATTACHMENT_ALLOWED_FILE_EXTENSIONS = ['bmp', 'doc', 'docx', 'gif', 'jpeg', 'jpg', 'pdf', 'png', 'txt'];\n\nexport const ATTACHMENT_MAX_SIZE_IN_BYTES = 3670016; //3.5MB\n\nexport const MAX_ATTACHMENTS_5 = 5;\n\nexport const MAX_ATTACHMENTS_10 = 10;\n\nexport const TEXTAREA_LIMIT_100 = 100;\n\nexport const TEXTAREA_LIMIT_1000 = 1000;\n\nexport const TEXTAREA_LIMIT_3000 = 3000;\n","import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n */\nexport class Observable<T> implements Subscribable<T> {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable<any> | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator<any, T> | undefined;\n\n /**\n * @param subscribe The function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @param subscribe the subscriber function to be passed to the Observable constructor\n * @return A new observable.\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = <T>(subscribe?: (subscriber: Subscriber<T>) => TeardownLogic) => {\n return new Observable<T>(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @param operator the operator defining the operation to take on the observable\n * @return A new observable with the Operator applied.\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift<R>(operator?: Operator<T, R>): Observable<R> {\n const observable = new Observable<R>();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial<Observer<T>> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * <span class=\"informal\">Use it when you have all these Observables, but still nothing is happening.</span>\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param observerOrNext Either an {@link Observer} with some or all callback methods,\n * or the `next` handler that is called for each value emitted from the subscribed Observable.\n * @param error A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param complete A handler for a terminal event resulting from successful completion.\n * @return A subscription reference to the registered handlers.\n */\n subscribe(\n observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber<T>): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next A handler for each value emitted by the observable.\n * @return A promise that either resolves on observable completion or\n * rejects with the handled error.\n */\n forEach(next: (value: T) => void): Promise<void>;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise<void>;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void> {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor<void>((resolve, reject) => {\n const subscriber = new SafeSubscriber<T>({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise<void>;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber<any>): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @return This instance of the observable.\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable<T>;\n pipe<A>(op1: OperatorFunction<T, A>): Observable<A>;\n pipe<A, B>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>): Observable<B>;\n pipe<A, B, C>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>;\n pipe<A, B, C, D>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>\n ): Observable<D>;\n pipe<A, B, C, D, E>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>,\n op5: OperatorFunction<D, E>\n ): Observable<E>;\n pipe<A, B, C, D, E, F>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>,\n op5: OperatorFunction<D, E>,\n op6: OperatorFunction<E, F>\n ): Observable<F>;\n pipe<A, B, C, D, E, F, G>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>,\n op5: OperatorFunction<D, E>,\n op6: OperatorFunction<E, F>,\n op7: OperatorFunction<F, G>\n ): Observable<G>;\n pipe<A, B, C, D, E, F, G, H>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>,\n op5: OperatorFunction<D, E>,\n op6: OperatorFunction<E, F>,\n op7: OperatorFunction<F, G>,\n op8: OperatorFunction<G, H>\n ): Observable<H>;\n pipe<A, B, C, D, E, F, G, H, I>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>,\n op5: OperatorFunction<D, E>,\n op6: OperatorFunction<E, F>,\n op7: OperatorFunction<F, G>,\n op8: OperatorFunction<G, H>,\n op9: OperatorFunction<H, I>\n ): Observable<I>;\n pipe<A, B, C, D, E, F, G, H, I>(\n op1: OperatorFunction<T, A>,\n op2: OperatorFunction<A, B>,\n op3: OperatorFunction<B, C>,\n op4: OperatorFunction<C, D>,\n op5: OperatorFunction<D, E>,\n op6: OperatorFunction<E, F>,\n op7: OperatorFunction<F, G>,\n op8: OperatorFunction<G, H>,\n op9: OperatorFunction<H, I>,\n ...operations: OperatorFunction<any, any>[]\n ): Observable<unknown>;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n *\n * @return The Observable result of all the operators having been called\n * in the order they were passed in.\n */\n pipe(...operations: OperatorFunction<any, any>[]): Observable<any> {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise<T | undefined>;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise<T | undefined>;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise<T | undefined>;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise<T | undefined> {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise<T | undefined>;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver<T>(value: any): value is Observer<T> {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber<T>(value: any): value is Subscriber<T> {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","<div class=\"flight-card mr-small\">\n <ng-content select=\"fcom-notification, [notifications]\"></ng-content>\n <div class=\"mr-xsmall-t\" [class.disabled]=\"disabled\">\n <!-- LabelDate and TicketType -->\n\n <div class=\"flex flex--space-between flex--wrap pr-xsmall-b labels font-body-2\">\n <div>\n <span class=\"label\" *ngIf=\"date\"> {{ type }} {{ date }} </span>\n <span *ngIf=\"disruptedLabel\" class=\"label label--error\">{{ disruptedLabel | finLocalization }}</span>\n </div>\n <fcom-tag *ngIf=\"cabin || fareBrand\"\n >{{ cabin ? ('travelClass.' + cabin.toLowerCase() | finLocalization) : '' }} {{ fareBrand }}</fcom-tag\n >\n </div>\n\n <ng-content select=\"fcom-ufo\"></ng-content>\n </div>\n\n <div *ngIf=\"showDivider\" class=\"border-top-dotted mr-small-t mr-xsmall-b\"></div>\n\n <div class=\"mr-xsmall-t buttons flex flex--end flex--column hide-empty\">\n <ng-content select=\"fcom-button\"></ng-content>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n/**\n * @Unstable\n * Warning! This component is in active development and is not production ready.\n *\n * Documentation can be found in `storybook/stories/flights/flight-card.stories.mdx`\n */\n@Component({\n selector: 'fcom-flight-card',\n templateUrl: './flight-card.component.html',\n styleUrls: ['./flight-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlightCardComponent {\n /**\n * Flight type (Departure, Return).\n * This is optional information, that is being shown according to the context\n *\n * @example\n * Departure\n */\n @Input() type = '';\n\n /**\n * Flight date (date, month, year).\n * This is optional information, that is being shown according to the context\n * (e.g. it is not being shown in the context of the flight search results within the booking flow).\n *\n * @example\n * 5 may 2020\n */\n @Input() date = '';\n\n /**\n * Travel class cabin (mandatory)\n */\n @Input({ required: true }) cabin: string;\n\n /**\n * fare brand (optional) the user has \tselected\n */\n @Input() fareBrand = '';\n\n /**\n * Boolean indicating if the component is in teh greyed out state\n */\n @Input() disabled = false;\n\n /**\n * Boolean indicating if the component should have a divider before notifications/buttons\n */\n @Input() showDivider = false;\n\n /**\n * String for disrupted label\n */\n @Input() disruptedLabel = '';\n}\n","<ng-template #spinner>\n <fin-loader data-testid=\"general-loader\" [type]=\"LoaderType.INLINE\"></fin-loader>\n</ng-template>\n\n<cms-page *ngIf=\"page$ | async as page\" [content]=\"page\"></cms-page>\n\n<ng-template #noGridLayout let-classnames=\"classnames\">\n <fin-cms-json-content\n *ngIf=\"hasContent$ | async; else spinner\"\n [class]=\"classnames\"\n [template$]=\"template$\"\n [showSideTitle$]=\"showSideTitle$\"\n [pageViewType$]=\"pageViewType$\"\n ></fin-cms-json-content>\n</ng-template>\n\n<ng-container [ngSwitch]=\"renderSwitch$ | async\">\n <ng-container *ngSwitchCase=\"PAGETYPE.SECTION_PAGE_EXTERNAL_TEMPLATE\">\n <cms-external-page-renderer [template$]=\"template$\"></cms-external-page-renderer>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.DESTINATION_PAGE\">\n <cms-destination\n *ngIf=\"hasContent$ | async; else spinner\"\n class=\"main-content\"\n [template$]=\"template$\"\n [pageViewType$]=\"pageViewType$\"\n ></cms-destination>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.EDITORIAL_LANDING_PAGE\">\n <cms-editorial-main-page\n *ngIf=\"hasContent$ | async\"\n [hasContent]=\"hasContent$ | async\"\n class=\"main-content\"\n [template$]=\"template$\"\n ></cms-editorial-main-page>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.EDITORIAL_CATEGORY_PAGE\">\n <cms-editorial-category-page\n *ngIf=\"hasContent$ | async; else spinner\"\n class=\"main-content\"\n [template$]=\"template$\"\n ></cms-editorial-category-page>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.FORM_WIZARD_PAGE\">\n <fin-render-lazy-wizard\n *ngIf=\"hasContent$ | async; else spinner\"\n [template$]=\"template$\"\n class=\"grey-25-bg\"\n ></fin-render-lazy-wizard>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.EMERGENCY_IN_OPERATIONS\">\n <cms-emergency-in-operations\n *ngIf=\"hasContent$ | async; else spinner\"\n [template$]=\"template$\"\n ></cms-emergency-in-operations>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.PREMIUM_ECONOMY_LANDING_PAGE_2021\">\n <ng-container\n [ngTemplateOutlet]=\"noGridLayout\"\n [ngTemplateOutletContext]=\"{ classnames: 'main-content ' + PAGETYPE.PREMIUM_ECONOMY_LANDING_PAGE_2021 }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.BLUEWINGS_CLUSTER_LP\">\n <cms-bluewings-cluster-page\n class=\"main-content\"\n [template$]=\"template$\"\n [hasContent]=\"hasContent$ | async\"\n ></cms-bluewings-cluster-page>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.BLUEWINGS_LANDING_PAGE\">\n <cms-bluewings-main-page\n class=\"main-content\"\n [template$]=\"template$\"\n [hasContent]=\"hasContent$ | async\"\n ></cms-bluewings-main-page>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.CHILD_PAGE\">\n <cms-child-page\n *ngIf=\"hasContent$ | async; else spinner\"\n class=\"main-content\"\n [template$]=\"template$\"\n [title$]=\"page$ | finMap: 'title'\"\n ></cms-child-page>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.CHILD_PAGE_NO_HEADING\">\n <cms-child-page\n *ngIf=\"hasContent$ | async; else spinner\"\n class=\"main-content\"\n [template$]=\"template$\"\n ></cms-child-page>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.NO_GRID_FULL_WIDTH_PAGE\">\n <ng-container [ngTemplateOutlet]=\"noGridLayout\" [ngTemplateOutletContext]=\"{ classnames: 'main-content' }\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"PAGETYPE.NO_GRID_FULL_WIDTH_PAGE_WITH_TITLE\">\n <section class=\"grid-col-12 grid-max-width no-row-gap\">\n <h1 data-testid=\"cms-teaser-title\" class=\"nordic-blue-900-text col-1-12 font-heading-2 mr-clear-t ps-xsmall-t\">\n {{ teaserTitle$ | async }}\n </h1>\n </section>\n <ng-container [ngTemplateOutlet]=\"noGridLayout\" [ngTemplateOutletContext]=\"{ classnames: 'main-content' }\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <fin-cms-json-content\n *ngIf=\"hasContent$ | async; else spinner\"\n class=\"main-content grid-col-12 grid-max-width no-row-gap pr-xlarge-b\"\n [template$]=\"template$\"\n [showSideTitle$]=\"showSideTitle$\"\n [pageViewType$]=\"pageViewType$\"\n ></fin-cms-json-content>\n </ng-container>\n\n <ng-container *ngIf=\"enablePageFeedback\">\n <fin-qualtrics-embedded-page-feedback\n *ngIf=\"hasContent$ | async\"\n [pageType]=\"pageViewType$ | async\"\n ></fin-qualtrics-embedded-page-feedback>\n </ng-container>\n</ng-container>\n\n<div aria-live=\"assertive\" class=\"page-announcer\" tabindex=\"-1\">\n <span class=\"is-vishidden\" *ngIf=\"title$ | async\"\n >{{ 'navigation.pageChangedTo' | finLocalization: { pageTitle: title$ | async } }}\n </span>\n</div>\n","import { AfterViewInit, Component, ElementRef, HostBinding, OnDestroy, OnInit } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { BehaviorSubject, combineLatest, Observable, ReplaySubject, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith, switchMap, take, tap } from 'rxjs/operators';\n\nimport {\n BreadcrumbService,\n ElementActions,\n ElementTypes,\n isNavigationEvent,\n NavigationMenuService,\n} from '@fcom/common';\nimport { isPresent, sanitizeWhiteListedPath, unsubscribe } from '@fcom/core/utils';\nimport { GaContext, LoaderType } from '@fcom/common/interfaces';\nimport { CmsContent, CmsContentType, CmsPage, CmsTemplate, CmsViewType, PageViewType } from '@fcom/core-api';\nimport { ConfigService } from '@fcom/core';\nimport { ddsLangToNewLang } from '@fcom/core/selectors/dds-languages';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare } from '@fcom/rx';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport { CmsTemplateService } from '../../services';\n\nconst mapToRenderSwitch = (header: CmsContent | CmsPage): PageViewType => {\n if (header.viewTypeName && header.viewTypeName === PageViewType.SECTION_PAGE_EXTERNAL_TEMPLATE) {\n return PageViewType.SECTION_PAGE_EXTERNAL_TEMPLATE;\n } else if (header.navigationContentType && header.navigationContentType === CmsContentType.FIDestination) {\n return PageViewType.DESTINATION_PAGE;\n } else {\n return header.viewTypeName as PageViewType; // shorthand to return PageViewType that is the same\n }\n};\n\nconst FRONTPAGE_TOP_DESTINATIONS_TEXT_MASTER_CONTENT_ID = 2430456;\n\n/**\n * Renders a CMS-based route by fetching the template straight from CMS.\n */\n@Component({\n selector: 'fin-dynamic-route',\n templateUrl: './dynamic-route.component.html',\n styleUrls: ['./dynamic-route.component.scss'],\n})\nexport class DynamicRouteComponent implements AfterViewInit, OnInit, OnDestroy {\n @HostBinding('class.block') defaultClass = true;\n\n readonly DOCTYPE: typeof CmsContentType = CmsContentType;\n readonly VIEWTYPE: typeof CmsViewType = CmsViewType;\n readonly PAGETYPE: typeof PageViewType = PageViewType;\n readonly LoaderType = LoaderType;\n\n path$: ReplaySubject<string> = new ReplaySubject(1);\n template$: Observable<CmsTemplate>;\n pageViewType$: Observable<string>;\n hasContent$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n renderSwitch$: Observable<string>;\n title$: Observable<string>;\n teaserTitle$: Observable<string>;\n showSideTitle$: Observable<boolean>;\n page$: Observable<CmsPage>;\n private subscription: Subscription = new Subscription();\n\n enablePageFeedback: boolean;\n\n constructor(\n private router: Router,\n private elementRef: ElementRef,\n private cmsTemplateService: CmsTemplateService,\n private breadcrumbService: BreadcrumbService,\n private navigationMenuService: NavigationMenuService,\n private configService: ConfigService,\n private languageService: LanguageService,\n private gtmService: GtmService\n ) {\n this.subscription.add(\n this.router.events\n .pipe(\n startWith(new NavigationEnd(1, this.router.url, this.router.url)),\n filter(isNavigationEvent),\n map((event: NavigationEnd) => event.url.replace(/\\(.*\\)/, '')),\n map((url: string) => (ddsLangToNewLang(url) ? `/${ddsLangToNewLang(url)}/error` : url)),\n distinctUntilChanged((prev: string, next: string) => {\n return this.getUrlWithoutQueryParams(prev) === this.getUrlWithoutQueryParams(next);\n })\n )\n .subscribe((url) => {\n this.path$.next(sanitizeWhiteListedPath(url, this.configService.cfg));\n })\n );\n }\n\n ngOnInit(): void {\n const translation$ = this.languageService.translate('trendingDestinations').pipe(take(1));\n\n this.template$ = this.path$.pipe(\n tap(() => this.hasContent$.next(false)), // Start Spinner side effect\n switchMap((path) => combineLatest([this.cmsTemplateService.load(path), translation$])),\n tap(() => this.hasContent$.next(true)), // End Spinner side effect\n tap(([template]) => {\n const cmsPage = template?.header?.[0] as CmsPage;\n if (cmsPage?.navigationPathList) {\n this.breadcrumbService.setBreadcrumbNormal(cmsPage.navigationPathList);\n }\n if (cmsPage?.oneworld) {\n this.navigationMenuService.setOneworldLink(cmsPage?.oneworld);\n }\n if (isPresent(cmsPage?.isHeaderVisible)) {\n this.navigationMenuService.setHeaderVisibility(cmsPage.isHeaderVisible);\n }\n if (isPresent(cmsPage?.isFooterVisible)) {\n this.navigationMenuService.setFooterVisibility(cmsPage.isFooterVisible);\n }\n }),\n map(([template, translation]) => {\n const isFrontPage = template?.header?.[0]?.navigationPathList?.length === 1;\n if (isFrontPage) {\n template.main.forEach((item) => {\n // handling top destinations label\n if (item.masterContentId === FRONTPAGE_TOP_DESTINATIONS_TEXT_MASTER_CONTENT_ID) {\n item.detailText = `<h2>${translation}</h2>`;\n item.teaserText = `<h2>${translation}</h2>`;\n }\n // handling the trending destinations\n if (item.viewType === CmsViewType.OFFERS_GRID) {\n item.viewType = CmsViewType.TRENDING_DESTINATIONS;\n }\n });\n }\n return template;\n }),\n finShare()\n );\n\n this.page$ = this.template$.pipe(\n filter(Boolean),\n map((template) => template.header?.find((i) => i.template === 'cms-page') as CmsPage),\n filter(Boolean)\n );\n\n this.renderSwitch$ = this.template$.pipe(map((a) => (a?.header?.[0] ? mapToRenderSwitch(a.header[0]) : '')));\n this.pageViewType$ = this.template$.pipe(map((a) => a?.header?.[0]?.viewTypeName ?? ''));\n\n // Show side title should be toggled to true if main content has a picture or disruption as first element\n this.showSideTitle$ = this.template$.pipe(\n map((template) => {\n return !!(template.main.length > 0 && template.main[0].picture);\n })\n );\n\n this.title$ = this.template$.pipe(\n map((template: CmsTemplate) => template?.header?.[0]?.title ?? ''),\n startWith('') // for aria-live announcer to notice page changes\n );\n\n this.teaserTitle$ = this.template$.pipe(\n map((template: CmsTemplate) => template?.header?.[0]?.teaserTitle ?? ''),\n startWith('') // for aria-live announcer to notice page changes\n );\n\n if (this.configService.cfg.enableQualtricsPageFeedback) {\n this.enablePageFeedback = true;\n }\n }\n\n ngAfterViewInit(): void {\n this.elementRef.nativeElement.addEventListener('click', this.linkListener);\n }\n\n ngOnDestroy(): void {\n this.path$.complete();\n this.elementRef.nativeElement.removeEventListener('click', this.linkListener);\n unsubscribe(this.subscription);\n }\n\n getUrlWithoutQueryParams(url: string): string {\n return url.split('?')[0];\n }\n\n private linkListener = this.linkHandler.bind(this);\n\n private linkHandler(e: MouseEvent): void {\n const target = (e.target as Element).closest('a');\n\n if (target) {\n this.trackTargetBlank(target);\n }\n }\n\n private trackTargetBlank(element: HTMLAnchorElement): void {\n if (element.target === '_blank' && !element.href.startsWith(this.configService.cfg.baseUrl)) {\n this.gtmService.trackElement('new-tab', GaContext.CONTENT, ElementTypes.LINK, element.href, ElementActions.CLICK);\n }\n }\n}\n","<ng-container *ngIf=\"imageData$ | async as imageData\">\n <fcom-image\n *ngIf=\"!imageData.error\"\n class=\"fill\"\n [fillParent]=\"fillParent\"\n [imageData]=\"imageData\"\n [alt]=\"imageData?.alt\"\n [ratio]=\"aspectRatio$ | async\"\n [scale]=\"scale\"\n [maxWidthImage]=\"maxImageWidth\"\n [fetchPriority]=\"fetchPriority\"\n [isLazyLoad]=\"isLazyLoad\"\n >\n </fcom-image>\n</ng-container>\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\n\nimport { AspectRatios, FetchPriorityEnum, IMAGE_WIDTHS } from '@fcom/ui-components';\nimport { CmsImageData } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-content-image',\n templateUrl: './content-image.component.html',\n styleUrls: ['./content-image.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ContentImageComponent {\n @Input()\n imageData$: Observable<CmsImageData>;\n\n /**\n * The preferred aspect ratio of the image. Defaults to 16x9\n */\n @Input()\n aspectRatio$: Observable<keyof typeof AspectRatios> = of('16x9');\n\n /**\n * Stretches image to fill the container.\n */\n @Input()\n fillParent = false;\n\n @Input()\n maxImageWidth = IMAGE_WIDTHS[0];\n\n @Input()\n scale = true;\n\n @Input()\n fetchPriority?: keyof typeof FetchPriorityEnum;\n\n @Input()\n isLazyLoad = true;\n}\n","/* eslint-disable no-underscore-dangle */\nimport { createSelector } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { BoundType, PaxDetailsFormData } from '@fcom/dapi';\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { isNotEmpty } from '@fcom/core/utils/utils';\nimport {\n Bound,\n FinnairAirBoundsResponse,\n FinnairBoundItem,\n FinnairCart,\n FinnairItineraryItem,\n FinnairPassengerCode,\n FinnairServiceItem,\n Offer,\n OfferList,\n} from '@fcom/dapi/api/models';\nimport { mapServicesToBookingSummary } from '@fcom/common-booking/store/utils/services.utils';\nimport { BookingSummaryBound, BookingSummaryPassenger, BookingSummaryService } from '@fcom/common-booking';\nimport { formatDateOfBirth } from '@fcom/common-booking/utils/date-utils';\nimport { cloneDeep } from '@fcom/core/utils';\nimport { BookingAppState, BoundFareInformation, FareFamilyMap } from '@fcom/common/interfaces/booking';\nimport { combineServices } from '@fcom/common-booking/modules/ancillaries/utils';\n\nimport {\n inboundsSelector,\n outboundsSelector,\n selectedInboundAirBoundIdSelector,\n selectedInboundIdBoundsSelector,\n selectedOutboundAirBoundIdSelector,\n selectedOutboundIdBoundsSelector,\n} from './bounds.selector';\nimport { cartDataSelector } from './cart.selector';\nimport {\n _currentOffer as currentOfferSelector,\n currentOffersSelector,\n fareFamiliesSelector,\n selectedInboundFareFamilyCodeSelector,\n selectedInboundIdSelector,\n selectedOutboundFareFamilyCodeSelector,\n selectedOutboundIdSelector,\n} from './offers.selector';\nimport { paxDetailTravelerSelector } from './pax-details.selector';\n\nconst _createBookingSummaryBound = (\n bound: FinnairBoundItem,\n boundFareInformation: BoundFareInformation[],\n type: BoundType\n): BookingSummaryBound => {\n const generateItinerary = (): FinnairItineraryItem[] => {\n if (boundFareInformation) {\n return bound.itinerary.reduce(\n (all, it) => {\n if (it.type === 'FLIGHT') {\n all.arr.push({\n ...it,\n cabinClass: boundFareInformation?.[all.index]\n ? boundFareInformation[all.index].cabinClass.toLowerCase()\n : undefined,\n bookingClass: boundFareInformation?.[all.index]\n ? boundFareInformation[all.index].bookingClass\n : undefined,\n });\n all.index = all.index + 1;\n } else {\n all.arr.push(it);\n }\n return all;\n },\n { index: 0, arr: [] }\n ).arr;\n }\n return bound.itinerary;\n };\n return {\n ...bound,\n itinerary: generateItinerary(),\n type,\n };\n};\n\nconst _selectedOfferSummaryProjector =\n (type: BoundType) =>\n (\n flightOffers: OfferList,\n currentOffer: Offer,\n boundId: string,\n fareFamilies: FareFamilyMap,\n selectedFareFamilyCode: string\n ): BookingSummaryBound => {\n if (!flightOffers || !boundId) {\n return;\n }\n\n const journeyDirection = type === BoundType.outbound ? 'outbounds' : 'inbounds';\n const bound: Bound = flightOffers?.[journeyDirection]?.[boundId];\n const boundFareInformation: BoundFareInformation[] = currentOffer\n ? type === BoundType.outbound\n ? currentOffer.outboundFareInformation\n : currentOffer.inboundFareInformation || []\n : [];\n const fareFamilyName = fareFamilies?.[selectedFareFamilyCode]?.brandName;\n\n const boundWithFareFamilyDetails: Bound & any = {\n ...bound,\n fareFamily: {\n ...(bound as any).fareFamily,\n name: fareFamilyName,\n },\n };\n\n const summaryBound = fareFamilyName ? boundWithFareFamilyDetails : bound;\n\n return _createBookingSummaryBound(summaryBound, boundFareInformation, type);\n };\n\nconst _selectedOfferOutboundSummary = createSelector(\n currentOffersSelector,\n currentOfferSelector,\n selectedOutboundIdSelector,\n fareFamiliesSelector,\n selectedOutboundFareFamilyCodeSelector,\n _selectedOfferSummaryProjector(BoundType.outbound)\n);\n\nconst _selectedOfferInboundSummary = createSelector(\n currentOffersSelector,\n currentOfferSelector,\n selectedInboundIdSelector,\n fareFamiliesSelector,\n selectedInboundFareFamilyCodeSelector,\n _selectedOfferSummaryProjector(BoundType.inbound)\n);\n\nconst _selectedAirBoundSummaryProjector =\n (type: BoundType) =>\n (bounds: FinnairAirBoundsResponse, boundId: string, fareFamilyId: string): BookingSummaryBound => {\n if (!bounds || !boundId || !fareFamilyId) {\n return;\n }\n\n const bound = bounds.boundGroups.find((boundGroup) => boundGroup.sortingId === boundId);\n\n if (!bound) {\n return;\n }\n\n const boundFareFamily = bound.fareFamilies.find(({ id }) => id === fareFamilyId);\n\n if (!boundFareFamily) {\n return;\n }\n\n const { fareFamilyCode, fareInformation } = boundFareFamily;\n\n const enrichedBound: FinnairBoundItem = bound\n ? {\n ...bound.details,\n fareFamily: {\n ...bound.details.fareFamily,\n name: bounds.fareFamilies[fareFamilyCode]?.brandName,\n },\n }\n : undefined;\n\n return _createBookingSummaryBound(enrichedBound, fareInformation, type);\n };\n\nconst _selectedAirBoundOutboundSummary = createSelector(\n outboundsSelector,\n selectedOutboundIdBoundsSelector,\n selectedOutboundAirBoundIdSelector,\n _selectedAirBoundSummaryProjector(BoundType.outbound)\n);\n\nconst _selectedAirBoundInboundSummary = createSelector(\n inboundsSelector,\n selectedInboundIdBoundsSelector,\n selectedInboundAirBoundIdSelector,\n _selectedAirBoundSummaryProjector(BoundType.inbound)\n);\n\nconst _cartOfferSummaries = createSelector(cartDataSelector, (cartData: FinnairCart): BookingSummaryBound[] => {\n const bounds = cartData?.bounds || [];\n\n return bounds.map((bound, index) =>\n cartBoundToBookingSummaryBound(bound, index === 0 ? BoundType.outbound : BoundType.inbound)\n );\n});\n\nconst _airBoundSummaries = createSelector(\n _selectedAirBoundOutboundSummary,\n _selectedAirBoundInboundSummary,\n (outbound, inbound): BookingSummaryBound[] => [outbound, inbound].filter(Boolean)\n);\n\nconst _offerSummaries = createSelector(\n _selectedOfferOutboundSummary,\n _selectedOfferInboundSummary,\n (outbound, inbound): BookingSummaryBound[] => [outbound, inbound].filter(Boolean)\n);\n\nconst _currentOfferSelection = createSelector(\n _cartOfferSummaries,\n _airBoundSummaries,\n _offerSummaries,\n (\n cartOfferSummaries: BookingSummaryBound[],\n airBoundSummaries: BookingSummaryBound[],\n offerSummaries: BookingSummaryBound[]\n ): BookingSummaryBound[] =>\n [cartOfferSummaries, airBoundSummaries, offerSummaries].find((bookingSummaryBounds) =>\n isNotEmpty(bookingSummaryBounds)\n ) || []\n);\n\nconst _currentPassengers = createSelector(paxDetailTravelerSelector, (paxDetail) => {\n return paxDetail\n .filter((pax) => pax.type !== FinnairPassengerCode.INF)\n .map((p) => paxDetailFormToBookingSummaryTraveler(p, paxDetail));\n});\n\nconst _currentServices = createSelector(cartDataSelector, (data) =>\n mapServicesToBookingSummary(data?.prices.unpaid?.services, data?.passengers)\n);\n\nconst _combinedServices = createSelector(cartDataSelector, (cartData) =>\n combineServices([cartData?.services?.included ?? [], cartData?.services?.unpaid ?? []])\n);\nconst _combinedServicesMap = createSelector(_combinedServices, (_services) =>\n _services.reduce((categories, service) => {\n categories[service.category] = cloneDeep(service);\n return categories;\n }, {})\n);\n\nexport const paxDetailFormToBookingSummaryTraveler = (\n t: PaxDetailsFormData,\n allPassengers: PaxDetailsFormData[]\n): BookingSummaryPassenger => {\n const infant = allPassengers.find((i) => i.travelling === t.id);\n return {\n firstName: t.firstName,\n lastName: t.lastName,\n type: `passenger.${asPaxTypeKey(t.type).toLowerCase()}`,\n withInfantFullName: infant ? `${infant.firstName || ''} ${infant.lastName || ''}` : '',\n email: t.email,\n birthDate: t.birthDate ? formatDateOfBirth(t.birthDate) : null,\n phone:\n t.phone?.phoneNumber && t.phone?.phonePrefix\n ? `+${t.phone.phonePrefix.split('|')[1]} ${t.phone.phoneNumber}`\n : null,\n frequentFlyerCard: t.frequentFlyerCard,\n };\n};\n\nexport const cartBoundToBookingSummaryBound = (b: FinnairBoundItem, boundType: BoundType): BookingSummaryBound => ({\n ...b,\n type: boundType,\n});\n\nexport const currentOfferSelection = (): StateSelector<BookingAppState, BookingSummaryBound[]> =>\n safeSelect(_currentOfferSelection);\n\nexport const currentPassengers = (): StateSelector<BookingAppState, BookingSummaryPassenger[]> =>\n safeSelect(_currentPassengers);\n\nexport const currentServices = (): StateSelector<BookingAppState, BookingSummaryService[]> =>\n safeSelect(_currentServices);\n\nexport const combinedCartServicesMap = (): StateSelector<BookingAppState, { [category: string]: FinnairServiceItem }> =>\n safeSelect(_combinedServicesMap);\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, Subscription, combineLatest } from 'rxjs';\nimport { filter, map, switchMap, take, takeUntil } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { LocationRouteCffService, SentryLogger } from '@fcom/core/services';\nimport { Location, LocationsMap } from '@fcom/core-api/interfaces';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { LocationAppState } from '../interfaces';\nimport { getLocation, getLocations } from '../store/selectors';\nimport { LocationActions } from '../store/actions';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LocationsService implements OnDestroy {\n private subscriptions = new Subscription();\n\n constructor(\n private store$: Store<LocationAppState>,\n private locationRouteCffService: LocationRouteCffService,\n private languageService: LanguageService,\n private sentryLogger: SentryLogger\n ) {}\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n triggerLocationFetch(locationCode: string): void {\n this.subscriptions.add(\n this.languageService.locale\n .pipe(\n switchMap((locale) => this.locationRouteCffService.bestGuessFor(locationCode, locale)),\n takeUntil(this.locationAlreadyInStore(locationCode))\n )\n .subscribe({\n next: (l) => this.saveLocation(l),\n error: (error: unknown) => this.sentryLogger.error('Error fetching location info', { error, locationCode }),\n })\n );\n }\n\n /**\n * Accepts an array of location codes and waits for all locations to finish loading before the\n * returned observable will complete.\n */\n triggerLocationFetchAll(locationCodes: string[]): Observable<{ [locationCode: string]: Location }> {\n return combineLatest(\n locationCodes.map((locationCode) => {\n this.triggerLocationFetch(locationCode);\n\n return this.retrieveLocation(locationCode);\n })\n ).pipe(\n filter((locations) => {\n return locations.every(Boolean) && locations.length === locationCodes.length;\n }),\n take(1),\n map((locations) => {\n return locations.reduce((acc, location) => {\n acc[location.locationCode] = location;\n\n return acc;\n }, {});\n })\n );\n }\n\n retrieveLocation(key: string): Observable<Location> {\n return this.store$.select(getLocation(key));\n }\n\n retrieveAllLocations(): Observable<LocationsMap> {\n return this.store$.select(getLocations());\n }\n\n saveLocation(destination: Location, oldDestination?: Location): void {\n if (oldDestination) {\n this.store$.dispatch(LocationActions.removeLocationData({ location: oldDestination }));\n }\n this.store$.dispatch(LocationActions.storeLocationData({ location: destination }));\n }\n\n private locationAlreadyInStore(locationCode: string): Observable<Location> {\n return this.retrieveLocation(locationCode).pipe(finShare(), filter<Location>(Boolean), take(1));\n }\n}\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? { __proto__: null } : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object' && typeof source !== 'function') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if (\n (options && (options.plainObjects || options.allowPrototypes))\n || !has.call(Object.prototype, source)\n ) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, defaultDecoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar limit = 1024;\n\n/* eslint operator-linebreak: [2, \"before\"] */\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var j = 0; j < string.length; j += limit) {\n var segment = string.length >= limit ? string.slice(j, j + limit) : string;\n var arr = [];\n\n for (var i = 0; i < segment.length; ++i) {\n var c = segment.charCodeAt(i);\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n arr[arr.length] = segment.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n arr[arr.length] = hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n arr[arr.length] = hexTable[0xC0 | (c >> 6)]\n + hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n arr[arr.length] = hexTable[0xE0 | (c >> 12)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));\n\n arr[arr.length] = hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n out += arr.join('');\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","import { Breadcrumb } from '@fcom/ui-components';\n\nimport { Stage } from './interfaces/stage.interface';\n\nexport const UPGRADE_FEATURE_KEY = 'upgrade';\n\nexport const BREADCRUMBS: Breadcrumb[] = [\n {\n id: Stage.PASSENGERS,\n name: null,\n translationKey: 'passengers',\n active: false,\n },\n {\n id: Stage.FLIGHTS,\n name: null,\n translationKey: 'flights',\n active: false,\n },\n {\n id: Stage.REVIEW,\n name: null,\n translationKey: 'review',\n active: false,\n },\n];\n\nexport const WAITLIST_CUTOFF = 60 * 24 * 60 * 60 * 1000; // 60 day in milliseonds\n\nexport const FINNAIR_LIKE_AIRLINECODES = ['N7', 'AY'];\n\nexport const OFFERS_V2_TIMEOUT = 30000; // V2Offers API has long processing times, so for now we add timeout for long queries\n","import { ThirdPartyAncillariesProvider } from '@fcom/common';\n\nexport const MANAGE_BOOKING_FEATURE_KEY = 'manage-booking';\n\nexport const STATIC_OLD_MMB_POST_PARAMS = {\n SITE: 'FINRFINR',\n PAGE: 'BKGD',\n};\n\nconst prefix = 'apis-update';\nexport const OPEN_TRAVEL_PREPARATIONS_NOTIFICATION = `${prefix}_open-travel-preparations-notification`;\nexport const CANCEL_APIS_UPDATE = `${prefix}-details_apis-cancel`;\nexport const FULL_APIS_UPDATE = `${prefix}-details-full_apis-success`;\nexport const PARTIAL_APIS_UPDATE = `${prefix}-details-partial_apis-success`;\nexport const ERROR_APIS_UPDATE = `${prefix}-details_apis-error`;\nexport const APIS_REQUIRED = `${prefix}_required`;\nexport const USER_OTHER_ADDRESS_APIS = `${prefix}-use-other-address_apis`;\n\nexport const mapToGaString = {\n [ThirdPartyAncillariesProvider.CAR_TRAWLER_RENTAL]: 'third-party-box_cartrawler-rental',\n [ThirdPartyAncillariesProvider.CAR_TRAWLER_TRANSFER]: 'third-party-box_cartrawler-transfer',\n};\n\nexport const carTrawlerSmartBlockConfig = {\n partnerName: 'finnair',\n CTProduct: 'widget',\n};\n\nexport enum CarTrawlerClientID {\n MMB_TRIP_DETAILS_FIRST_24H = 608790,\n MMB_CAR_RENTAL_AIRPORT_TRANSFERS = 398065,\n MMB_ANCILLARY_CONFIRMATION_PAGE = 402825,\n MMB_CHECK_IN_CONFORMATION = 403743,\n}\n","import { Validators, type AbstractControl, type ValidatorFn } from '@angular/forms';\n\nimport {\n EMAIL_REGEX,\n formatFinnairPlusCardNumber,\n isFinnairCustomerNumber,\n isFinnairPlusCardNumber,\n isValidIBAN,\n LocalDate,\n} from '@fcom/core/utils';\n\nimport { isPnrCode } from './utils';\n\n/**\n * Amadeus PNR sync validator\n */\nexport const pnrFormatValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === null || control.value === '' || isPnrCode(control.value.toUpperCase())) {\n return null;\n } else {\n return { pattern: { value: control.value } };\n }\n };\n};\n\n/**\n * Ticket number validation, 13-digits and MANDATORY dash\n * Valid sample: 105-1231231231\n */\nexport const ticketNumberValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const dashPattern = /^(\\d+-)+\\d+$/;\n\n if (\n control.value === null ||\n control.value === '' ||\n (dashPattern.test(control.value) && control.value.length === 14)\n ) {\n return null;\n } else {\n return { pattern: { value: control.value } };\n }\n };\n};\n\nconst TICKET_PATTERN = /^\\d{3}[ -]?\\d{10}$/;\n\n/**\n * Ticket number validation, 13-digits and OPTIONAL dash\n * Valid samples: 105-1231231231, 105 1231231231, 1051231231231\n */\nexport const softTicketNumberValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: unknown } | null => {\n if (control.value !== null && control.value !== '') {\n const strippedValue = control.value ? control.value.replace(/[- ]/g, '') : null;\n if (!/^\\d+$/.test(strippedValue)) {\n return { custom: 'formatInvalid' };\n } else if (!TICKET_PATTERN.test(control.value)) {\n return { pattern: { value: control.value } };\n }\n }\n return null;\n };\n};\n\n/**\n * FPlus number validation\n */\nexport const frequentFlyerValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (\n control.value === null ||\n control.value === '' ||\n isFinnairPlusCardNumber(formatFinnairPlusCardNumber(control.value))\n ) {\n return null;\n } else {\n return { pattern: true };\n }\n };\n};\n\n/**\n * FPlus number validation without AY prefix\n */\nexport const finnairPlusNumberValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const numericPattern = /^\\d+$/;\n if (\n control.value === null ||\n control.value === '' ||\n (numericPattern.test(control.value) && isFinnairPlusCardNumber(control.value))\n ) {\n return null;\n } else {\n return { pattern: true };\n }\n };\n};\n\nexport const usernameValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const invalidEmail = Validators.pattern(EMAIL_REGEX)(control);\n const invalidMemberNumber = finnairPlusNumberValidator()(control);\n if (control.value === '') {\n return null;\n } else if (invalidEmail && invalidMemberNumber) {\n return { ...invalidEmail, ...invalidMemberNumber };\n } else {\n return null;\n }\n };\n};\n\n/**\n * dateValidator\n */\nexport const dateValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === null || control.value === '' || (control.value && control.value instanceof LocalDate)) {\n return null;\n } else {\n return { pattern: { value: control.value } };\n }\n };\n};\n\nexport const dateStringValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === null || control.value === '' || LocalDate.isLocalDate(control.value)) {\n return null;\n } else {\n return { pattern: { value: control.value } };\n }\n };\n};\n\n/**\n * The Required format is \"(airport code) title\".\n * @todo: could be deprecated now as option selection is forced on the\n */\nexport const locationFormatValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === null || control.value === '' || control.value.locationCode) {\n return null;\n } else {\n return { forbiddenFormat: { value: control.value } };\n }\n };\n};\n\n/**\n * IBAN validation\n */\nexport const ibanValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === null || control.value === '' || isValidIBAN(control.value)) {\n return null;\n } else {\n return { pattern: true };\n }\n };\n};\n\n/**\n * BIC/SWIFT validation\n * Checks that the string contains 8 or 11 alphanumeric characters\n * Source: https://en.wikipedia.org/wiki/ISO_9362\n */\nexport const bicValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const pattern = /^[a-zA-Z0-9]{8}$|^[a-zA-Z0-9]{11}$/;\n if (control.value === null || control.value === '' || pattern.test(control.value)) {\n return null;\n } else {\n return { pattern: true };\n }\n };\n};\n\nexport const finnairCustomerNumberValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === null || control.value === '' || isFinnairCustomerNumber(control.value)) {\n return null;\n } else {\n return { pattern: true };\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\nimport {\n TemplateRef,\n ViewContainerRef,\n ElementRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n ComponentFactoryResolver,\n} from '@angular/core';\nimport {\n throwNullPortalOutletError,\n throwPortalAlreadyAttachedError,\n throwNoPortalAttachedError,\n throwNullPortalError,\n throwPortalOutletAlreadyDisposedError,\n throwUnknownPortalTypeError,\n} from './portal-errors';\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n let host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n * Defaults to using the resolver from the outlet that the portal is attached to.\n */\n componentFactoryResolver?: ComponentFactoryResolver | null;\n\n /**\n * List of DOM nodes that should be projected through `<ng-content>` of the attached component.\n */\n projectableNodes?: Node[][] | null;\n\n constructor(\n component: ComponentType<T>,\n viewContainerRef?: ViewContainerRef | null,\n injector?: Injector | null,\n componentFactoryResolver?: ComponentFactoryResolver | null,\n projectableNodes?: Node[][] | null,\n ) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n this.projectableNodes = projectableNodes;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n public templateRef: TemplateRef<C>,\n /** Reference to the ViewContainer into which the template will be stamped out. */\n public viewContainerRef: ViewContainerRef,\n /** Contextual data to be passed in to the embedded view. */\n public context?: C,\n /** The injector to use for the embedded view. */\n public injector?: Injector,\n ) {\n super();\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n override attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n override detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = HTMLElement> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is an space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * @deprecated Use `PortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nexport type PortalHost = PortalOutlet;\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed: boolean = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nexport abstract class BasePortalHost extends BasePortalOutlet {}\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\nimport {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n} from '@angular/core';\nimport {BasePortalOutlet, ComponentPortal, DomPortal, TemplatePortal} from './portal';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class DomPortalOutlet extends BasePortalOutlet {\n private _document: Document;\n\n /**\n * @param outletElement Element into which the content is projected.\n * @param _componentFactoryResolver Used to resolve the component factory.\n * Only required when attaching component portals.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually\n * become a required parameter.\n */\n constructor(\n /** Element into which the content is projected. */\n public outletElement: Element,\n private _componentFactoryResolver?: ComponentFactoryResolver,\n private _appRef?: ApplicationRef,\n private _defaultInjector?: Injector,\n\n /**\n * @deprecated `_document` Parameter to be made required.\n * @breaking-change 10.0.0\n */\n _document?: any,\n ) {\n super();\n this._document = _document;\n }\n\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n const resolver = (portal.componentFactoryResolver || this._componentFactoryResolver)!;\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {\n throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');\n }\n\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(\n componentFactory,\n portal.viewContainerRef.length,\n portal.injector || portal.viewContainerRef.injector,\n portal.projectableNodes || undefined,\n );\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n\n componentRef = componentFactory.create(\n portal.injector || this._defaultInjector || Injector.NULL,\n );\n this._appRef!.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (this._appRef!.viewCount > 0) {\n this._appRef!.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n this._attachedPortal = portal;\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n // @breaking-change 10.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n\n element.parentNode!.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n override dispose(): void {\n super.dispose();\n this.outletElement.remove();\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nexport class DomPortalHost extends DomPortalOutlet {}\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\nimport {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n EmbeddedViewRef,\n EventEmitter,\n NgModule,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewContainerRef,\n Inject,\n Input,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {BasePortalOutlet, ComponentPortal, Portal, TemplatePortal, DomPortal} from './portal';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n standalone: true,\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ],\n standalone: true,\n})\nexport class TemplatePortalDirective extends CdkPortal {}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n standalone: true,\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n private _document: Document;\n\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _viewContainerRef: ViewContainerRef,\n\n /**\n * @deprecated `_document` parameter to be made required.\n * @breaking-change 9.0.0\n */\n @Inject(DOCUMENT) _document?: any,\n ) {\n super();\n this._document = _document;\n }\n\n /** Portal associated with the Portal outlet. */\n @Input('cdkPortalOutlet')\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null | undefined | '') {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal || null;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() readonly attached: EventEmitter<CdkPortalOutletAttachedRef> =\n new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedRef = this._attachedPortal = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef =\n portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(\n componentFactory,\n viewContainerRef.length,\n portal.injector || viewContainerRef.injector,\n portal.projectableNodes || undefined,\n );\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild((ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n // @breaking-change 9.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n element.parentNode!.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): HTMLElement {\n const nativeElement: Node = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (\n nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode!\n ) as HTMLElement;\n }\n}\n\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\n@Directive({\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: [{name: 'portal', alias: 'cdkPortalHost'}],\n providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ],\n standalone: true,\n})\nexport class PortalHostDirective extends CdkPortalOutlet {}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n})\nexport class PortalModule {}\n","import { Component, HostBinding, OnDestroy, OnInit } from '@angular/core';\n\nimport { SchemaService } from '@fcom/common/services';\n\nimport { FeedbackService } from '../../services/feedback/feedback.service';\nimport { QualtricsSurveys } from '../../qualtrics/qualtrics.utils';\n\n@Component({\n selector: 'fin-front-page',\n styleUrls: ['./front-page.component.scss'],\n templateUrl: './front-page.component.html',\n})\nexport class FrontPageComponent implements OnInit, OnDestroy {\n @HostBinding('class.col-f') defaultClass = true;\n\n constructor(\n private feedbackService: FeedbackService,\n private schemaService: SchemaService\n ) {}\n\n ngOnInit(): void {\n this.schemaService.addAirlineSchema();\n this.schemaService.addWebSiteSchema();\n this.feedbackService.setSurvey(QualtricsSurveys.FEEDBACK);\n this.feedbackService.setFeedbackWidgetVisibility(true);\n }\n\n ngOnDestroy(): void {\n this.feedbackService.setFeedbackWidgetVisibility(false);\n }\n}\n","<fin-newsletter-notification></fin-newsletter-notification>\n<fin-booking-entry></fin-booking-entry>\n<fin-dynamic-route></fin-dynamic-route>\n","<div class=\"df-laptop-up landing-page pr-large-t\">\n <div class=\"country-selector-wrapper\">\n <div class=\"country-selector align-center\">\n <fcom-icon\n class=\"finnair-logo nordic-blue-900-text mr-large-y\"\n [category]=\"IconLibrary.CUSTOM\"\n [name]=\"CustomIcon.FINNAIR_LOGO\"\n ></fcom-icon>\n <fin-country-and-language-selector\n [useH1]=\"true\"\n [prefill]=\"false\"\n [showCloseButton]=\"false\"\n (applySelection)=\"applySelection($event)\"\n ></fin-country-and-language-selector>\n <div class=\"ms-large-t font-body-2\">Your country wasn't listed?</div>\n <a class=\"nordic-blue-900-text font-body-2\" href=\"/en\">Go to the international site</a>\n </div>\n </div>\n <div\n *ngIf=\"imageUrl$ | async\"\n class=\"image-wrapper dn-laptop-down\"\n [ngStyle]=\"{ 'background-image': 'url(' + (imageUrl$ | async) + ')' }\"\n ></div>\n</div>\n","import { Component, OnDestroy, OnInit, Renderer2 } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { CustomIcon, IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, Observable, Subscription } from 'rxjs';\nimport { distinctUntilChanged, map, startWith, take } from 'rxjs/operators';\n\nimport { CountryState, unsubscribe } from '@fcom/core';\nimport { CmsTeaser } from '@fcom/core-api/interfaces';\n\nimport { CmsPageComponentMetaData, FragmentService, Links, PageMetaService } from '../../services';\nimport { getCountryStates } from '../../utils/language.utils';\nimport { ElementActions, ElementTypes, GaContext } from '../../interfaces';\nimport { CountryAndLanguageSelection } from '../country-and-language-selector/country-and-language-selector.component';\nimport { GtmService } from '../../gtm';\n\nconst parseLocalizedPathFromUrl = (langCode: string, url: string): string => {\n const everythingBeforeLangCode = new RegExp(`.+?(?=/${langCode})`);\n return url ? url.replace(everythingBeforeLangCode, '') : `/${langCode}`;\n};\n\nconst LANG = 'en';\nconst DESCRIPTION =\n 'Finnair flies between Europe, Asia and North America via Helsinki. Modern fleet - more comfort, lower emissions. Search and book your flights today.';\nconst META_TAGS: CmsPageComponentMetaData[] = [\n {\n tagName: 'meta',\n attributes: {\n name: 'description',\n content: DESCRIPTION,\n },\n },\n {\n tagName: 'meta',\n attributes: {\n name: 'og:description',\n content: DESCRIPTION,\n },\n },\n {\n tagName: 'meta',\n attributes: {\n name: 'og:site_name',\n content: 'Finnair',\n },\n },\n];\n\n@Component({\n selector: 'fin-select-language',\n styleUrls: ['./select-language.component.scss'],\n templateUrl: './select-language.component.html',\n})\nexport class SelectLanguageComponent implements OnInit, OnDestroy {\n readonly CustomIcon = CustomIcon;\n readonly IconLibrary = IconLibrary;\n\n static readonly TITLE = 'Flight bookings | select country and language | Finnair';\n\n countries: CountryState[] = getCountryStates();\n countries$: Observable<CountryState[]>;\n subscriptions: Subscription = new Subscription();\n imageUrl$: Observable<string>;\n\n constructor(\n private router: Router,\n private pageMetaService: PageMetaService,\n private renderer: Renderer2,\n private fragmentService: FragmentService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n // TODO: after AB-test, refactor this to use BehaviorSubject which gets it's default value from getCountryStates()\n // subscribe to links and prevPageUrl and set the value of the BehaviourSubject from there\n // use getValue() to get the latest value in applySelection()\n this.countries$ = combineLatest([this.pageMetaService.links, this.pageMetaService.prevPageUrl$]).pipe(\n map(([links, prevPageUrl]) =>\n this.countries.map((country) => this.mapCountryLanguageLinks(country, links, prevPageUrl))\n ),\n distinctUntilChanged(),\n startWith(this.countries)\n );\n\n this.pageMetaService.setTitle(SelectLanguageComponent.TITLE);\n this.pageMetaService.setDocumentLanguage(LANG, this.renderer);\n this.pageMetaService.setMetaTags(META_TAGS, this.renderer);\n\n this.imageUrl$ = this.fragmentService\n .getFragment<CmsTeaser>('fragments.countryLanguageSelector.url')\n .pipe(map((teaser) => teaser.picture.responsiveImageLinksData.portrait_ratio1x1['768']));\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n applySelection(selection: CountryAndLanguageSelection): void {\n this.gtmService.trackElement(\n 'language-selector-select',\n GaContext.LANDING_PAGE,\n ElementTypes.BUTTON,\n selection.languageCode,\n ElementActions.SUBMIT\n );\n\n const subj$ = new BehaviorSubject<CountryState[]>(this.countries);\n this.subscriptions.add(this.countries$.subscribe(subj$));\n this.subscriptions.add(\n subj$.pipe(take(1)).subscribe((countries) => {\n const url = countries\n .find((country) => country.code === selection.country)\n ?.languages.find((lang) => lang.code === selection.languageCode)?.link;\n this.router.navigateByUrl(url || `/${selection.languageCode}`);\n })\n );\n }\n\n private mapCountryLanguageLinks = (country: CountryState, links: Links, prevPageUrl: string): CountryState => ({\n ...country,\n languages: country.languages.map((language) => ({\n ...language,\n link: this.getLocalizedLinkForLangCode(language.code, links, prevPageUrl),\n })),\n });\n\n private getLocalizedLinkForLangCode = (langCode: string, links: Links = {}, prevPageUrl: string): string => {\n const localizedCmsPageUrl = parseLocalizedPathFromUrl(langCode, links[langCode]);\n const localizedPrevPageUrl = prevPageUrl ? `/${langCode}${prevPageUrl}` : undefined;\n return localizedPrevPageUrl ?? localizedCmsPageUrl;\n };\n}\n","import { CmsImageData } from '@fcom/core-api';\nimport { LocalDate } from '@fcom/core/utils';\nimport { Amount } from '@fcom/dapi';\n\n/**\n * Microservice response, info part\n */\nexport interface DestinationSearchResponseInfo {\n totalCount: number;\n locale: string;\n}\n\n/**\n * Microservice response, a single record\n */\nexport interface DestinationSearchResponseItem {\n title: string;\n titleMaster: string; // From master-en (en_001)\n country?: string; // Empty for countries\n countryMaster?: string; // From master-en (en_001). Empty for countries\n countryCode?: string;\n locationCode?: string;\n continent: string;\n continentMaster: string; // From master-en (en_001)\n flightType: string;\n tags: string[] | Set<string>;\n url: string;\n rank: number;\n type: DestinationSearchItemType;\n picture?: CmsImageData;\n items?: DestinationSearchResponseItem[];\n lastModified?: string;\n directFlight?: boolean;\n}\n\n/**\n * Microservice response, combines DestinationSearchResponseItem and DestinationSearchResponseInfo\n */\nexport interface DestinationSearchResponseData {\n items: DestinationSearchResponseItem[];\n info: DestinationSearchResponseInfo;\n}\n\n/**\n * AurinkoMatkat destination response\n */\n\nexport interface AmDestinationOfferBase {\n dest: string;\n bookUrl: string;\n duration: number;\n}\n\nexport interface AmDestinationOffer extends AmDestinationOfferBase {\n price: Amount;\n}\n\nexport interface AmDestinationResponseItem extends AmDestinationOfferBase {\n price: number;\n destName_fi: string;\n}\n\n/**\n * Mapped from DestinationSearchResponseItem\n * Search item is client's expanded version of response\n */\nexport interface DestinationSearchItem extends DestinationSearchResponseItem {\n tags: Set<string>;\n matchesQuery?: boolean;\n id: string;\n items?: DestinationSearchItem[];\n normalizedTitle: string;\n normalizedTitleMaster: string;\n price?: number;\n currency?: string;\n origin?: string;\n count?: number;\n}\n\nexport interface DestinationSearchItemFilterSelection {\n destination: DestinationSearchItem;\n action: FilterAction;\n selectedDestinations: DestinationSearchItem[];\n}\n\nexport enum FilterAction {\n ADD = 'add',\n REMOVE = 'remove',\n REMOVE_ALL = 'remove_all',\n CUSTOM = 'custom',\n}\n\n/**\n * Mapped from DestinationSearchResponseData\n */\nexport interface DestinationSearchResult {\n items: DestinationSearchItem[];\n info: DestinationSearchResponseInfo;\n}\n\nexport enum DestinationSearchViewStyle {\n TILES = 'TILES',\n}\n\nexport enum DestinationSearchItemType {\n DESTINATION = 'DESTINATION',\n COUNTRY = 'COUNTRY',\n CONTINENT = 'CONTINENT',\n DESTINATIONSBYORIGIN = 'DESTINATIONSBYORIGIN',\n}\n\nexport interface DestinationListItem {\n titleMaster: string;\n listPosition: number;\n}\n\n/**\n * Object received by sorting dropdown component etc.\n */\nexport interface SortOption {\n value: string;\n label?: string;\n}\n\n/**\n * DestinationSearch query params\n */\nexport enum DestinationSearchQueryParams {\n country = 'country',\n continent = 'continent',\n destination = 'destination',\n type = 'type',\n cabin = 'cabin',\n origin = 'origin',\n maxPrice = 'maxPrice',\n directFlights = 'directFlights',\n roundTripPrices = 'roundTripPrices',\n}\n\nexport interface DestinationSearchTripDates {\n departureDate: LocalDate | undefined;\n returnDate: LocalDate | undefined;\n}\n\nexport enum PriceLoadingState {\n INITIAL,\n LOADING,\n LOADED,\n}\n\nexport type DestinationSearchQueryParamNames = {\n [DestinationSearchQueryParams.destination]?: string[];\n [DestinationSearchQueryParams.continent]?: string[];\n [DestinationSearchQueryParams.country]?: string[];\n [DestinationSearchQueryParams.cabin]?: string;\n [DestinationSearchQueryParams.type]?: string;\n [DestinationSearchQueryParams.maxPrice]?: number;\n [DestinationSearchQueryParams.directFlights]?: boolean;\n [DestinationSearchQueryParams.roundTripPrices]?: boolean;\n};\n","<div class=\"grey-25-bg pr-xsmall-t\" *ngIf=\"(availableCabinClasses$ | async).length\" data-testid=\"cabin-class-tags\">\n <div class=\"mr-xsmall-b pr-xsmall rounded-large border white-bg df-desktop\" data-testid=\"tags-list\">\n <div class=\"font-body-1 ps-small-r\">\n {{ 'upsellCabinClasses.chipTitle' | finLocalization }}\n </div>\n <ul class=\"no-list-style flex flex--wrap flex--nogrow\" #tagsList>\n <ng-container *ngFor=\"let item of availableCabinClasses$ | async\">\n <li class=\"ms-xsmall-r ms-xsmall-b\">\n <fcom-tag-button\n [text]=\"'travelClass.' + item.id | finLocalization | titlecase\"\n (tagClicked)=\"openModal($event, item.id)\"\n [ngClass]=\"item.id\"\n [attr.data-testid]=\"'cabin-class-tag-' + item.id\"\n [theme]=\"TagTheme.ACTIVE\"\n ></fcom-tag-button>\n </li>\n </ng-container>\n </ul>\n </div>\n\n <fcom-modal\n class=\"test-modal\"\n title=\"{{ 'upsellCabinClasses.modalTitle' | finLocalization }}\"\n [buttons]=\"null\"\n [open]=\"cabinClassModalOpen\"\n (close)=\"closeModal()\"\n >\n <ng-container *ngIf=\"cabinClassModalOpen\">\n <div class=\"relative\">\n <fcom-tabs\n [prevButtonAriaLabel]=\"'carousel.previous' | finLocalization\"\n [nextButtonAriaLabel]=\"'carousel.next' | finLocalization\"\n [align]=\"'right'\"\n [layoutType]=\"TabLayoutType.IN_MODAL\"\n class=\"absolute rounded-top-medium\"\n >\n <ng-container *ngFor=\"let item of availableCabinClasses$ | async\">\n <fcom-tab\n [title]=\"'travelClass.' + item.id | finLocalization | titlecase\"\n [active]=\"item.id === selectedCabinClassId\"\n [attr.data-testid]=\"'cabin-class-' + item.id\"\n >\n <div class=\"pr-large-x\">\n <fin-cms-json-content [template$]=\"item.template\"></fin-cms-json-content>\n </div>\n </fcom-tab>\n </ng-container>\n </fcom-tabs>\n </div>\n </ng-container>\n </fcom-modal>\n</div>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\n\nimport { isNull, stopPropagation } from '@fcom/core/utils';\nimport { Cabin, FinnairCabinClass } from '@fcom/dapi/api/models';\nimport { CmsTemplate } from '@fcom/core-api';\nimport { TagTheme, TabLayoutType } from '@fcom/ui-components';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { GtmService } from '@fcom/common/gtm';\nimport { CmsTemplateService } from '@fcom/cms';\n\ninterface CabinClassContent {\n id: string;\n template: Observable<CmsTemplate>;\n}\n@Component({\n selector: 'fin-cabin-class-modal',\n styleUrls: ['./cabin-class-modal.component.scss'],\n templateUrl: './cabin-class-modal.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CabinClassModalComponent implements OnInit {\n @Input()\n cabinClasses$: Observable<FinnairCabinClass[] | Cabin[]>;\n\n public readonly TagTheme = TagTheme;\n public readonly TabLayoutType = TabLayoutType;\n\n cabinClassModalOpen = false;\n selectedCabinClassId: string;\n availableCabinClasses$: Observable<CabinClassContent[]>;\n template$: Observable<CmsTemplate>;\n\n constructor(\n private languageService: LanguageService,\n private gtmService: GtmService,\n private templateService: CmsTemplateService,\n private changeDetectorRef: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.availableCabinClasses$ = this.cabinClasses$.pipe(\n map((cabinClasses: FinnairCabinClass[]) => {\n const cmsMap = {\n [FinnairCabinClass.ECONOMY]: { id: 'economy', url: 'fragments.cabinModalEconomy.url' },\n [FinnairCabinClass.ECOPREMIUM]: { id: 'ecopremium', url: 'fragments.cabinModalEcopremium.url' },\n [FinnairCabinClass.BUSINESS]: { id: 'business', url: 'fragments.cabinModalBusiness.url' },\n };\n\n return cabinClasses.map((cabinClass) => {\n return {\n id: cmsMap[cabinClass].id,\n template: this.getCollectionUrl(cmsMap[cabinClass].url).pipe(\n switchMap((url) => {\n return this.templateService.load(url);\n })\n ),\n };\n });\n })\n );\n }\n\n openModal(e: Event, id: string): void {\n stopPropagation(e);\n this.selectedCabinClassId = id;\n this.cabinClassModalOpen = true;\n this.gtmService.trackElement(\n 'open-cabin-class-chip',\n GaContext.FLIGHT_SELECTION,\n ElementTypes.BUTTON,\n id,\n ElementActions.CLICK\n );\n\n if (isNull(e)) {\n this.changeDetectorRef.markForCheck();\n }\n }\n\n closeModal(): void {\n this.cabinClassModalOpen = false;\n }\n\n getCollectionUrl(fragmentKey: string): Observable<string> {\n return this.languageService.translate(fragmentKey);\n }\n}\n","import { Amount, BoundType, CartOffer, CartServices, CartServiceSelections, PaxAmount, TotalPrices } from '@fcom/dapi';\nimport { PaymentType } from '@fcom/common-booking/modules/purchase-success/interfaces';\nimport { Bound, FinnairBoundItem, Offer } from '@fcom/dapi/api/models';\nimport { CombinedDateString } from '@fcom/core/utils';\nimport { SegmentInfoV2 } from '@fcom/one-upgrade/api/models';\nimport { GlobalBookingTravelClass } from '@fcom/core';\n\nimport { FlightSegment } from './flight-search.interface';\nimport { ConsentData, DeepLinkSource } from '../interfaces';\n\nexport const NOT_SET = 'not set';\nexport const UNSET = 'UNSET';\nexport const FINNAIR = 'Finnair';\n\nexport enum PromotionType {\n VIEW = 'promoView',\n CLICK = 'promoClick',\n}\n\nexport enum SearchType {\n BOOKING_FLOW = 'booking-flow',\n AWARD = 'award',\n}\n\nexport enum GtmHaulType {\n LONG_HAUL = 'long-haul',\n SHORT_HAUL = 'short-haul',\n}\n\nexport enum ContentType {\n FRONT_PAGE = 'front_page',\n SINGLE_DESTINATION = 'single_destination',\n}\n\nexport enum GtmPurchaseFlow {\n BOOKING = 'NEW FINNAIR',\n MANAGE_BOOKING = 'MANAGE BOOKING',\n AWARD = 'AWARD',\n CORPORATE = 'CORPORATE',\n VOLUNTARY_CHANGE = 'VOLUNTARY CHANGE',\n}\n\nexport enum GtmEcommerceMeasurement {\n IMPRESSIONS = 'impressions',\n CLICK = 'click',\n DETAIL = 'detail',\n CHECKOUT = 'checkout',\n ADD = 'add',\n REMOVE = 'remove',\n}\n\nexport enum GtmEcommerceList {\n BOOKING_SMP = 'Booking - Service master page',\n MMB_VIEW_PNR = 'Manage booking - View PNR',\n VOLUNTARY_CHANGE_FLIGHT_SELECTION = 'Voluntary change - Flight selection',\n}\n\nexport enum GtmCustomDimensions {\n PNR = 'dimension11', // PNR\n FLOW_TYPE = 'dimension12', // Booking flow - Flow Type\n FLOW_JOURNEY_LENGTH = 'dimension24', // Booking flow - journey length segment\n FLOW_DEPARTURE_COUNTRY = 'dimension47', // Booking flow - product - Departure Country\n FLOW_ARRIVAL_COUNTRY = 'dimension48', // Booking flow - product - Arrival Country\n}\n\nexport enum GtmCustomMetrics {\n POINTS_SPENT = 'metric1', // Points spent\n}\n\nexport interface PromotionItem {\n type: string;\n position: string;\n id: string;\n product: string;\n}\n\nexport interface GtmInternalPromotionItem {\n creative: string;\n id: string;\n name: string;\n position: string;\n}\n\nexport enum GtmClickOutboundLinkClass {\n BOOKING_WIDGET = 'booking-widget',\n DESTINATION_LISTING_CARD = 'destination-listing-card',\n}\n\nexport interface GtmClickOutboundData {\n link_url: string;\n link_classes: GtmClickOutboundLinkClass;\n outbound: true;\n}\n\nexport interface GtmCustomDimensionOrderData extends GtmCustomDimensionEcommerce {\n locationOrigin: string;\n locationDestination: string;\n locationOriginCountry: string;\n locationDestinationCountry: string;\n longOrShortHaul: GtmHaulType;\n PNRrecordLocator: string;\n fareTypes: string;\n tripType: string;\n totalPaxAmount: number;\n totalPriceAmount: string;\n totalPointsAmount: number | 'UNSET';\n paymentType: string;\n paymentSubType: string;\n currencyCode: string;\n stayDurationCategory: string;\n}\n\nexport interface GtmCustomDimensionEcommerce {\n purchaseFlow: GtmPurchaseFlow;\n}\n\nexport interface GtmDefaultEvent {\n action: ElementActions;\n label: string;\n category: string;\n}\n\nexport interface GtmInternalPromotionEvent {\n ecommerce: GtmInternalPromotionView | GtmInternalPromotionClick;\n}\n\nexport interface GtmInternalPromotionView {\n promoView: {\n promotions: GtmInternalPromotionItem[];\n };\n}\n\nexport interface GtmInternalPromotionClick {\n promoClick: {\n promotions: GtmInternalPromotionItem[];\n };\n}\n\nexport interface GtmFlightCheckoutData {\n tripType: GtmTripType;\n offer: CartOffer;\n total: Amount;\n points: string;\n purchaseFlow: GtmPurchaseFlow;\n}\n\nexport interface GtmSiteSearchData {\n language: string;\n pointOfSale: string;\n event: SiteSearchEvents;\n query: string;\n results: number;\n pageNumber: number;\n clickUrl?: string;\n}\n\nexport interface GtmPaxData {\n main: number;\n children: number;\n infants: number;\n}\n\nexport interface SeatMapFlightInfo {\n origin?: string;\n destination?: string;\n departureTime?: string;\n acType?: string;\n flightNo?: string;\n ticketType?: string;\n price?: string;\n currency?: string;\n}\n\nexport interface SeatMapSeatInfo {\n seatType?: string;\n seatNo?: string;\n price?: string;\n currency?: string;\n}\n\nexport interface SeatMapData {\n flightInfo?: SeatMapFlightInfo;\n seatInfo?: SeatMapSeatInfo;\n}\n\nexport type GtmEcommerceProductSeatId = `SEAT:${string} ${string}_${string}_${string}`;\n\nexport interface GtmEcommerceBase {\n name: string;\n id: string;\n brand: string;\n category: string;\n [GtmCustomDimensions.PNR]?: string;\n [GtmCustomDimensions.FLOW_TYPE]?: GtmPurchaseFlow;\n}\n\nexport interface GtmFlightProductCustomDefinitions extends GtmFareFamilyProductCustomDefinitions {\n [GtmCustomDimensions.PNR]: string;\n [GtmCustomDimensions.FLOW_JOURNEY_LENGTH]: string;\n [GtmCustomDimensions.FLOW_DEPARTURE_COUNTRY]: string;\n [GtmCustomDimensions.FLOW_ARRIVAL_COUNTRY]: string;\n}\n\nexport enum GA4Affiliation {\n BOOKING = 'Finnaircom-booking',\n MMB = 'Finnaircom-MMB',\n}\n\nexport enum GA4Category {\n FLIGHTS = 'Flights',\n ANCILLARIES = 'Ancillaries',\n FLIGHT_CHANGE = 'FlightsChange',\n}\n\nexport enum GA4TripType {\n ONEWAY = 'OneWay',\n RETURN = 'RoundTrip',\n OPENJAW = 'OpenJaw',\n MULTICITY = 'MultiCity',\n}\n\nexport enum Ga4AncillaryType {\n UPGRADE = 'Upgrade',\n}\n\nexport enum Ga4UpgradeWaitlist {\n WAITLISTED = 'waitlisted',\n NOT_WAITLISTED = 'not-waitlisted',\n}\n\nexport enum GaContext {\n BOOKING_FLOW = 'booking-flow',\n MOBILE_MAIN_NAVIGATION = 'mobile-main-navigation',\n BLOCK_OFFER = 'block-offer',\n CANCEL_BOOKING = 'cancel-booking',\n CHANGE_FLOW_FLIGHT_SELECTION = 'change-flow-flight-selection',\n CHATTER_MESSAGE_FORM = 'chatter-message-form',\n CONTENT = 'content',\n DESTINATION_MAIN_PAGE = 'destination-main-page',\n LANDING_PAGE = 'landing-page',\n DESKTOP_MAIN_NAVIGATION = 'desktop-main-navigation',\n DISRUPTION = 'disruption',\n FINNAIR_PLUS = 'finnair-plus',\n FLIGHT_SELECTION = 'flight-selection',\n PAX_DETAILS_FLIGHT_REVIEW = 'pax-details-flight-review',\n MANAGE_BOOKING = 'manage-booking',\n CHECK_IN = 'check-in',\n CORPORATE_PORTAL = 'corporate-portal',\n QUALTRICS = 'qualtrics',\n REACCOMMODATION = 'reaccommodation',\n REFUNDS = 'refunds',\n RETRIEVE_CASE_FORM = 'retrieve-case-form',\n SEAT_MAP = 'booking-flow_seatmap',\n SERVICE_FORMS = 'service-forms',\n SECTION_NAVIGATION = 'section-navigation',\n TOP_NAVIGATION = 'top-navigation',\n THIRD_PARTY_ANCILLARY = 'third-party-ancillary',\n UPGRADE_AVAILABILITY_SEARCH = 'upgrade-availability-search',\n VOLUNTARY_CHANGE = 'voluntary-change',\n WIZARD_CASE_FORM = 'wizard-case-form',\n NO_CONTEXT = 'no-context',\n CHAT = 'content-chat',\n}\n\nexport interface GA4Product {\n /**\n * The ID of the item. Same as the item_name.\n */\n item_id: string;\n /**\n * The name of the item.\n *\n * Flights: [TripType]_[locationCode 1]-[locationCode 2]-[locationCode n]\n * Upgrades: [TripType]_upg_[locationCode 1]-[locationCode 2]-[locationCode n]\n * Seats: [Category]_[Seat type]\n * Other services: [Category]_[variant]\n */\n item_name: string;\n price: number;\n quantity: number;\n currency: string;\n affiliation: GA4Affiliation;\n item_category: GA4Category;\n item_category2: GA4TripType | Ga4AncillaryType | string;\n /**\n * Cabins combined with dash\n * ECONOMY-ECONOMY\n */\n item_category3: string;\n /**\n * Ticket type (dash separated), Seat type or variant\n * ECLASSIC01-ECLASSIC01\n * A350_ECONOMY_PREFERRED\n * PDBG\n */\n item_category4?: string;\n item_category5?: Ga4UpgradeWaitlist | string;\n item_variant: string;\n item_list_id?: string;\n item_list_name?: string;\n item_haul_type?: string;\n}\n\nexport interface GtmFareFamilyProductCustomDefinitions {\n [GtmCustomMetrics.POINTS_SPENT]?: number; // Points spent\n}\n\nexport interface GtmEcommerceImpressionProduct extends GtmEcommerceBase {\n list: string;\n position?: number;\n variant?: string;\n price?: string;\n}\n\nexport interface GtmEcommerceClickProduct extends GtmEcommerceBase {\n position?: number;\n variant?: string;\n price?: string;\n}\n\nexport interface GtmEcommerceDetailProduct extends GtmEcommerceBase {\n variant?: string;\n price?: string;\n}\n\nexport interface GtmEcommerceProduct extends GtmEcommerceBase {\n price?: string;\n variant?: string;\n quantity?: number;\n}\n\nexport interface GtmEcommerceActionField {\n id: string;\n affiliation: string;\n revenue: string;\n shipping: string;\n tax: string;\n}\n\nexport interface GtmTransactionData extends GtmFlightCheckoutData {\n seats?: CartServiceSelections;\n locations: GtmLocations;\n services: CartServices;\n id: string;\n prices: TotalPrices;\n paymentType: string;\n paymentSubType: string;\n paxAmount: GtmPaxData;\n purchaseFlow: GtmPurchaseFlow;\n}\n\nexport interface GA4PurchaseEvent {\n event: GtmEvent.PURCHASE;\n dates?: CombinedDateString;\n points_used?: string;\n points?: number;\n ecomNew: GA4PurchaseData;\n all_locations: string;\n}\n\nexport interface GA4PurchaseData {\n transaction_id: string;\n affiliation: GA4Affiliation;\n value: number;\n tax: number;\n shipping: number;\n currency: string;\n items: GA4Product[];\n coupon?: string;\n}\n\nexport interface GtmLocations {\n originCountryCode: string;\n destinationCountryCode: string;\n}\n\nexport interface GtmFlightSearchData {\n origin: string;\n destination: string;\n start: string | undefined;\n end: string | undefined;\n tripType: GtmTripType;\n travelClass: GlobalBookingTravelClass;\n passengers: Omit<PaxAmount, 'c15s'>;\n totalPax: number;\n purchaseFlow?: GtmPurchaseFlow;\n dates: CombinedDateString;\n all_locations: string;\n searchType: SearchType;\n amountOfBounds: number;\n haulType: string;\n}\n\nexport interface GTtmMulticityTicketTypeOptions {\n economy: string;\n ecopremium: string;\n business: string;\n}\n\nexport interface GtmPageViewData {\n path: string;\n language: string;\n pointOfSale: string;\n}\n\nexport interface GtmUiEventData {\n id: string;\n language: string;\n pagePath: string;\n}\n\nexport interface GtmFlowData {\n officeId: string;\n market: string;\n destinationCountryCode: string;\n destinationLocationCode: string;\n originCountryCode: string;\n originLocationCode: string;\n sellAncillariesPerFlight: { [id: string]: boolean };\n sellBags: boolean;\n purchaseFlow: GtmPurchaseFlow;\n}\n\nexport interface GtmPaymentMethodData {\n methodOfPayment: string;\n joinFinnairPlus: boolean;\n rememberPaxDetails: boolean;\n}\n\nexport interface GtmFlightOfferSelection extends Offer {\n preselectionUsed: boolean;\n}\n\nexport interface GtmFlightSelectionData {\n boundType: BoundType;\n aircraft: string;\n flightNumber: string;\n fareFamilyName: string;\n travelClass: string;\n currencyCode: string;\n price: string;\n points: string;\n paxAmount: string;\n route: string;\n purchaseFlow: GtmPurchaseFlow;\n}\n\nexport interface GtmMulticityOfferSelectionData extends GtmFlightSelectionData {\n boundNumber: number;\n stage: string;\n}\n\nexport interface GtmMulticityFareFamilySelectionData {\n boundType: BoundType;\n fareFamilyName: string;\n travelClass: string;\n currencyCode: string;\n price: string;\n points: string;\n paxAmount: string;\n route: string;\n dates: string;\n purchaseFlow: GtmPurchaseFlow;\n stage: string;\n}\n\nexport interface GtmUiEventWithContextData extends GtmUiEventData {\n context: string;\n triggerElement: string;\n state: string;\n action?: ElementActions;\n}\n\nexport interface GtmUiEventWithIndexData extends GtmUiEventWithContextData {\n index: number;\n}\n\nexport interface GtmErrorEvent {\n type: string;\n path: string;\n locations?: string;\n dates?: string;\n}\n\nexport interface GtmMultivariateEvent {\n testId: string;\n segment: number;\n source: string;\n variant: string;\n}\n\nexport interface GtmNativeAppSession {\n system: MobileOsType;\n isInsideNativeApp: boolean;\n}\n\nexport interface GtmDestinationPromotion {\n element: string;\n destCity: string;\n destCountry: string;\n}\n\nexport interface GtmLoginEvent {\n tier: string;\n corporateProfile?: string;\n isLogged: boolean;\n}\n\nexport enum HaulType {\n SHORT = 'short-haul',\n LONG = 'long-haul',\n}\n\nexport enum UpgradePaymentType {\n ECOPREMIUM_CASH = 'Ancillaries/Upgrade/ECOPREMIUM/Cash',\n BUSINESS_CASH = 'Ancillaries/Upgrade/BUSINESS/Cash',\n ECOPREMIUM_SHORT_HAUL_VOUCHER = 'Ancillaries/Upgrade/ECOPREMIUM/Voucher/short-haul',\n BUSINESS_SHORT_HAUL_VOUCHER = 'Ancillaries/Upgrade/BUSINESS/Voucher/short-haul',\n ECOPREMIUM_LONG_HAUL_VOUCHER = 'Ancillaries/Upgrade/ECOPREMIUM/Voucher/long-haul',\n BUSINESS_LONG_HAUL_VOUCHER = 'Ancillaries/Upgrade/BUSINESS/Voucher/long-haul',\n ECOPREMIUM_POINTS = 'Ancillaries/Upgrade/ECOPREMIUM/Points',\n BUSINESS_POINTS = 'Ancillaries/Upgrade/BUSINESS/Points',\n ECOPREMIUM_COMPLIMENTARY = 'Ancillaries/Upgrade/ECOPREMIUM/Complimentary',\n BUSINESS_COMPLIMENTARY = 'Ancillaries/Upgrade/BUSINESS/Complimentary',\n}\n\nexport enum UpgradePaymentShortType {\n UNKNOWN = 'UNKNOWN',\n CASH = 'CASH',\n VOUCHER = 'VOUCHER',\n POINTS = 'POINTS',\n COMPLIMENTARY = 'COMPLIMENTARY',\n}\n\nexport interface UpgradePurchaseDataBasketFlight {\n name: 'Upgrade';\n id: string;\n price: string;\n brand: 'Finnair';\n category: UpgradePaymentType;\n quantity: number;\n metric1: number;\n}\n\nexport interface UpgradePurchaseData {\n upgradePurchase: {\n activeCurrency: string;\n purchaseSource: DeepLinkSource;\n totalPointsSpent: number;\n origin: string; // e.g. HEL\n destination: string; // e.g. HEL\n departure: string; // e.g. 2012-06-09\n return: string; // e.g. 2012-06-09\n paymentMethod?: PaymentType[] | null;\n haulType: HaulType;\n };\n ecommerce: {\n purchase: {\n actionField: {\n id: string; // E.g. MEL-HEL_dep:2019-08-21_ret:2019-08-24_VRHA7T_upgrade_waitlisted\n revenue: string | '0'; // e.g. 60.99\n };\n products: Array<UpgradePurchaseDataBasketFlight>;\n };\n };\n}\n\nexport interface ReaccommodationBoundData {\n /**\n * IATA code for bound origin location, e.g. HEL\n */\n departureLocation: string;\n /**\n * IATA code for bound arrival location, e.g. AMS\n */\n arrivalLocation: string;\n /**\n * Datetime for departure, e.g. 2019-09-14T14:26:19.828Z\n */\n departureTime: string;\n /**\n * Datetime for arrival, e.g. 2019-09-15T14:26:19.828Z\n */\n arrivalTime: string;\n /**\n * Operating airlnecodes for bound, e.g. ['AY'];\n */\n operatingAirlineCodes: string[];\n}\n\nexport interface ReaccommodationData {\n reaccommodation: {\n reaccommodationSource: DeepLinkSource;\n proposedFlightAccepted: boolean;\n offerToAcknowledge: ReaccommodationBoundData;\n selectedOffer: ReaccommodationBoundData;\n };\n}\n\nexport interface GtmEcommerceOrderData {\n custom: GtmCustomDimensionOrderData;\n products: GtmEcommerceProduct[];\n actionField: GtmEcommerceActionField;\n}\n\nexport interface GtmEcommerceAddToCart {\n currencyCode: string;\n add: {\n products: GtmEcommerceProduct[];\n };\n}\n\nexport interface GtmEcommerceRemoveFromCart {\n remove: {\n products: GtmEcommerceProduct[];\n };\n}\n\nexport interface GtmEcommerceImpression {\n currencyCode?: string;\n impressions: GtmEcommerceImpressionProduct[];\n}\n\nexport interface GtmEcommerceClick {\n currencyCode?: string;\n click: {\n actionField: {\n list?: string;\n };\n products: GtmEcommerceClickProduct[];\n };\n}\n\nexport interface GtmEcommerceDetail {\n currencyCode?: string;\n detail: {\n actionField: {\n list?: string;\n };\n products: GtmEcommerceDetailProduct[];\n };\n}\n\nexport interface GtmPath {\n path: string;\n basePath: string;\n queryString: string;\n}\n\nexport interface GtmFlightInformationData {\n origin: string;\n destination: string;\n date: string;\n}\n\nexport interface ThirdPartyClickEvent {\n thirdParty: string;\n}\n\nexport interface NewsletterFormSubmittedEvent {\n selected_country: string;\n selected_language: string;\n}\n\nexport type GtmFlightInformation = FlightSegment[] | FinnairBoundItem[] | SegmentInfoV2[] | Bound[];\n\nexport type GtmEventData =\n | GtmDefaultEvent\n | GtmTransactionData\n | GtmFlightCheckoutData\n | GtmFlightSearchData\n | GtmFlightSelectionData[]\n | GtmPageViewData\n | GtmUiEventData\n | GtmUiEventWithContextData\n | GtmFlowData\n | GtmPaymentMethodData\n | GtmUiEventWithIndexData\n | GtmFlightOfferSelection\n | GtmErrorEvent\n | GtmDestinationPromotion\n | GtmNativeAppSession\n | GtmLoginEvent\n | GtmMultivariateEvent\n | ConsentData\n | UpgradePurchaseData\n | ReaccommodationData\n | GtmInternalPromotionEvent\n | GtmSiteSearchData\n | GtmEcommerceOrderData\n | GA4PurchaseData\n | ThirdPartyClickEvent\n | GtmClickOutboundData\n | NewsletterFormSubmittedEvent\n | GTtmMulticityTicketTypeOptions\n | GtmMulticityFareFamilySelectionData\n | GtmMulticityOfferSelectionData\n | string;\n\nexport enum GtmEvent {\n VISIBILITY_CHANGE = 'visibilityChange',\n PAGE_VIEW = 'pageView',\n ORIGINAL_LOCATION = 'originalLocation',\n PRE_FLIGHT_SEARCH = 'preFlightSearch',\n FLIGHT_SEARCH = 'flightSearch',\n FLIGHT_SELECTION_VIEW = 'flightSelectionView',\n FLIGHT_SELECTION_CLICK = 'flightSelectionSelect',\n FLIGHT = 'flight',\n FLIGHT_CART_CHECKOUT = 'flightCartCheckout',\n MULTICITY_TICKET_TYPE_OPTIONS = 'multicity-ticket-type-options',\n /**\n * @deprecated use ADD_TO_CART for GA4\n * This is for old analytics only\n */\n ADD_SERVICES = 'addServices',\n /**\n * @deprecated use REMOVE_FROM_CART for GA4\n * This is for old analytics only\n */\n REMOVE_SERVICES = 'removeServices',\n PRODUCT_IMPRESSIONS = 'productImpressions',\n PRODUCT_CLICK = 'productClick',\n PRODUCT_DETAIL = 'productDetail',\n /**\n * @deprecated use PURCHASE for GA4\n * This is for old analytics only\n */\n ORDER = 'order',\n TRANSACTION = 'transaction',\n TRANSACTION_MANAGE_BOOKING = 'transactionManageBooking',\n UI_EVENT = 'uiEvent',\n FLOW_DATA = 'flowData',\n TIMING = 'timing',\n ERROR = 'error',\n DESTINATION_PROMOTION = 'destinationPromotion',\n NATIVEAPP_SESSION = 'nativeAppSession',\n CONSENTS = 'consentsSet',\n LOGIN = 'login',\n MULTIVARIATE_TEST = 'multiVariateTest',\n UPGRADE_PURCHASE = 'upgradePurchase',\n REACCOMMODATION = 'reaccommodation',\n INTERNAL_PROMOTION_VIEW = 'internalPromotionView',\n INTERNAL_PROMOTION_CLICK = 'internalPromotionClick',\n SITE_SEARCH = 'siteSearch',\n SITE_SEARCH_CLICKED = 'siteSearchClicked',\n /**\n * @deprecated use PURCHASE for GA4\n * This is for old analytics only\n */\n ORDER_DATA = 'orderData',\n /**\n * GA4 analytics transaction\n */\n PURCHASE = 'purchase',\n /**\n * GA4 analytics add products to cart\n */\n ADD_TO_CART = 'add_to_cart',\n /**\n * GA4 analytics remove products from cart\n */\n REMOVE_FROM_CART = 'remove_from_cart',\n /**\n * GA4 analytics view cart/order before payment\n */\n VIEW_CART = 'view_cart',\n /**\n * GA4 analytics initialize checkout\n */\n BEGIN_CHECKOUT = 'begin_checkout',\n /**\n * GA4 analytics view available ancillaries list\n */\n VIEW_ITEM_LIST = 'view_item_list',\n\n /**\n * GA4 analytics ancillaries selected\n */\n SELECT_ITEM = 'select_item',\n\n THIRD_PARTY_CLICK = 'third_party',\n\n CLEAR_ECOM = 'clear-ecom',\n\n CLICK_OUTBOUND = 'click_outbound',\n\n NEWSLETTER_FORM_SUBMITTED = 'newsletter_form_submitted',\n\n NEWSLETTER_SUBSCRIPTION_COMPLETED = 'newsletter_subscription_completed',\n}\n\nexport enum MobileOsType {\n IOS = 'ios',\n ANDROID = 'android',\n}\n\nexport enum GtmTripType {\n ONEWAY = 'ONEWAY',\n RETURN = 'RETURN',\n OPENJAW = 'OPENJAW',\n MULTICITY = 'MULTICITY',\n}\n\nexport enum GtmTripTypeLegacy {\n ONEWAY = 'OneWay',\n RETURN = 'RoundTrip',\n OPENJAW = 'OpenJaw',\n MULTICITY = 'MultiCity',\n}\n\n// NOTE: To be expanded\nexport enum ElementTypes {\n MODAL = 'MODAL',\n ACCORDION = 'ACCORDION',\n BUTTON = 'BUTTON',\n TAB = 'TAB',\n SEARCH = 'SEARCH',\n LIST_ITEM = 'LIST_ITEM',\n INPUT = 'INPUT',\n RADIO = 'RADIO',\n CHECKBOX = 'CHECKBOX',\n LINK = 'LINK',\n BANNER = 'BANNER',\n BOOKING_WIDGET = 'BOOKING_WIDGET',\n FORM = 'FORM',\n SELECT_BOX = 'SELECT_BOX',\n SURVEY = 'SURVEY',\n NOTIFICATION = 'NOTIFICATION',\n}\n\n// NOTE: To be expanded\n// Mainly exist so we can send specific actions from component side also\n// Needed to match the tracking convention of old finnair.com\nexport enum ElementActions {\n OPEN = 'open',\n CLOSE = 'close',\n CLICK = 'click',\n VIEW = 'view',\n SCROLL = 'scroll',\n SUBMIT = 'submit',\n ERROR = 'error',\n SEARCH = 'search',\n}\n\nexport enum SiteSearchEvents {\n SEARCH = 'search',\n SUGGEST = 'suggest',\n RESULT_CLICK = 'resultClick',\n SUGGESTION_CLICK = 'suggestionClick',\n}\n","/**\n * Expected result from Location (route) CFF microservice.\n */\nimport { TransportType } from '../../common-booking/interfaces/utils.interface';\nimport { CmsImageData } from './cms-interface';\n\nexport enum LocationRouteType {\n AJB = 'AJB',\n SJB = 'SJB',\n DEFAULT = 'default',\n}\n\nexport type SurchargeVendor = 'VI' | 'CA' | 'DC' | 'AX' | 'JC' | 'TP';\nexport type SurchargeDisplayName =\n | 'Visa'\n | 'Visa Debit'\n | 'Mastercard'\n | 'Mastercard Debit'\n | 'Diners Club'\n | 'Diners Club Debit'\n | 'American Express'\n | 'American Express Debit'\n | 'JCB'\n | 'UATP';\n\nexport enum CardType {\n CREDIT = 'credit',\n DEBIT = 'debit',\n}\n\nexport interface SurchargeSetting {\n vendor: SurchargeVendor;\n displayName: SurchargeDisplayName;\n percentage: string | null;\n corporate: boolean;\n cardType: CardType;\n}\n\nexport interface LocationRouteCffData {\n cffEconomy: string;\n cffPremiumEconomy: string | null;\n cffBusiness: string | null;\n cffMixed: string | null;\n hasCorporateCodeOverride: boolean;\n hasMatrixEnabled: boolean;\n market: string;\n officeId: string;\n fpp: boolean;\n originLocation: string;\n destinationLocation: string;\n currency: string;\n surcharges: SurchargeSetting[];\n routeType: LocationRouteType;\n isCountryShop: boolean;\n}\n\nexport type RouteCffField = keyof Pick<\n LocationRouteCffData,\n 'cffEconomy' | 'cffPremiumEconomy' | 'cffBusiness' | 'cffMixed'\n>;\n\n/**\n * A single location match item from Location (location match) microservice.\n */\nexport interface Location {\n /**\n * true, if the location is the nearest airport determined by the user's geolocation\n */\n isFromUserLocation?: boolean;\n distanceKm?: number;\n title: string;\n country: string;\n countryCode: string;\n cityName?: string;\n locationCode: string;\n\n /**\n * The city code if not equal to locationCode.\n * E.g., locationCityCode=BER for locationCode=TXL, but undefined for HEL\n */\n locationCityCode?: string;\n\n AJBPartner: boolean;\n SJBPartner: boolean;\n airAward: boolean;\n airPartner: boolean;\n airAlliance: boolean;\n\n type: 'city' | 'airport';\n\n latitude: number;\n longitude: number;\n transportType?: TransportType[];\n\n /**\n * Picture matched from cms destination page to location\n */\n picture?: CmsImageData | null;\n continentCode: string;\n}\n\n/**\n * Expected results from Location (location match) microservice.\n */\nexport interface LocationMatchData {\n ok: boolean;\n count: number;\n locale: string;\n items: Location[];\n}\n\n/**\n * Expected result from Location (geolocation match) microservice.\n */\nexport interface LocationGeoLocData {\n ok: boolean;\n locale: string;\n item: Location;\n}\n\nexport interface LocationSuggestions {\n departures: Location[];\n destinations: Location[];\n}\n\nexport interface SuggestedLocationsData {\n count: number;\n items: Location[];\n}\n\n/**\n * Expected result from Location (suggested locations) microservice.\n */\nexport interface SuggestedLocationsResponse {\n ok: boolean;\n error?: any;\n errorMessage?: any;\n locale?: string;\n departures: SuggestedLocationsData;\n destinations: SuggestedLocationsData;\n}\n\nexport type LocationsMap = {\n [locationCode: string]: Location;\n};\n\nexport type SearchData = {\n locations: Location[];\n input: string;\n};\n","<header *ngIf=\"isVisible$ | async\" class=\"sticky-nav white-bg medium-type fill\" data-elastic-exclude>\n <!-- Top nav desktop start here -->\n <div\n class=\"navigation-heading-top center grid-max-width padding-left-gutter padding-right-gutter flex dn-laptop-down flex--space-between flex--middle ps-xsmall-y font-body-1\"\n data-testid=\"header-heading\"\n >\n <div class=\"flex flex--middle\">\n <a\n [finLink]=\"homeLink$ | async\"\n data-testid=\"finnair-logo-link\"\n (click)=\"headerGtmClickEvent('finnair-logo', GaContext.TOP_NAVIGATION)\"\n >\n <span class=\"is-vishidden\">{{ 'actions.home' | finLocalization }}</span>\n <fcom-icon\n class=\"finnair-blue nordic-blue-900-text\"\n [category]=\"IconLibrary.CUSTOM\"\n [name]=\"CustomIcon.FINNAIR_LOGO\"\n ></fcom-icon>\n </a>\n\n <a\n [finLink]=\"oneworldLink$ | finMap: 'url' | async\"\n (click)=\"headerGtmClickEvent('oneworld-logo', GaContext.TOP_NAVIGATION)\"\n data-testid=\"oneworld-link\"\n class=\"ms-large-l font-body-1\"\n >\n <span class=\"is-vishidden\">{{ oneworldLink$ | finMap: 'title' | async }}</span>\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ONEWORLD_LOGO\"></fcom-icon>\n </a>\n </div>\n\n <div class=\"flex flex--middle\">\n <!-- Language selector -->\n <div class=\"align-right\">\n <fin-language-selector [context]=\"LANGUAGE_SELECTOR_CONTEXT\"></fin-language-selector>\n </div>\n\n <!-- Login -->\n <div class=\"login-item ms-large-l align-right font-body-1 mr-xsmall-l\">\n <ng-container *ngIf=\"loginStatus$ | async as loginStatus\">\n <fin-login-button\n [showName]=\"true\"\n [trackingContext]=\"GaContext.TOP_NAVIGATION\"\n class=\"font-body-1 grow flex nordic-blue-900-text\"\n (click)=\"handleLoginButtonClick($event, loginStatus)\"\n ></fin-login-button>\n <fin-login-form\n *ngIf=\"(loginDialogOpen$ | async) && (mobileOrTablet$ | async) === false\"\n class=\"absolute ms-xxsmall-t dn-laptop-down\"\n [accountVerificationToken$]=\"accountVerificationToken$\"\n (verificationFinished)=\"accountVerificationFinished()\"\n ></fin-login-form>\n </ng-container>\n </div>\n\n <fcom-button\n *ngIf=\"enableLoginDialog && (loginStatus$ | async) !== LoginStatus.LOGGED_IN\"\n data-testid=\"join-finnair-plus-button\"\n (clickBtn)=\"joinFinnairPlus()\"\n [class]=\"'mr-xsmall-l'\"\n [text]=\"'login.joinFinnairPlus' | finLocalization\"\n [icon]=\"{ name: SvgLibraryIcon.FINNAIR_PLUS, position: IconPosition.LEFT }\"\n [mode]=\"ButtonMode.INLINE\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n >\n </fcom-button>\n <div\n *ngIf=\"(joinService.joinDialogOpen$ | async) && (mobileOrTablet$ | async) === false\"\n class=\"relative dn-laptop-down\"\n >\n <fin-join-form class=\"absolute ms-large-t\"></fin-join-form>\n </div>\n <fin-welcome-back-message *ngIf=\"welcomeBackMessageOpen$ | async\"></fin-welcome-back-message>\n </div>\n </div>\n <fin-login-form\n *ngIf=\"(loginDialogOpen$ | async) && (mobileOrTablet$ | async)\"\n class=\"dn-laptop-up\"\n [fullScreen]=\"true\"\n [accountVerificationToken$]=\"accountVerificationToken$\"\n (verificationFinished)=\"accountVerificationFinished()\"\n >\n </fin-login-form>\n <fin-join-form\n *ngIf=\"(joinService.joinDialogOpen$ | async) && (mobileOrTablet$ | async)\"\n class=\"dn-laptop-up\"\n [fullScreen]=\"true\"\n >\n </fin-join-form>\n <fin-login-widget></fin-login-widget>\n\n <!--Top nav mobile start here -->\n <div\n class=\"grid-col-12 no-row-gap grid-max-width border-top-dark-ice dn-laptop-up mobile-header-controls border-bottom\"\n >\n <fin-header-boxes\n class=\"col-f\"\n [homeLink$]=\"homeLink$\"\n (homeGtmEvent)=\"headerGtmClickEvent('finnair-logo', GaContext.TOP_NAVIGATION)\"\n >\n <div left class=\"flex flex--center\">\n <fin-navigation-trigger\n (toggleMenuGtmEvent)=\"\n headerGtmClickEvent('mobile-main-navigation-hamburger-navi', GaContext.MOBILE_MAIN_NAVIGATION)\n \"\n class=\"flex--nogrow inline-block relative\"\n ></fin-navigation-trigger>\n </div>\n <div right>\n <ng-container *ngIf=\"(isMenuOpen$ | async) !== true && loginStatus$ | async as loginStatus\">\n <fin-login-button\n class=\"grow flex nordic-blue-900-text\"\n (click)=\"openLoginWidget($event)\"\n [showName]=\"false\"\n [trackingContext]=\"GaContext.TOP_NAVIGATION\"\n ></fin-login-button>\n </ng-container>\n </div>\n </fin-header-boxes>\n <div class=\"col-f\"></div>\n </div>\n\n <!-- Lower nav start here -->\n <div class=\"relative z2\" (finClickOutside)=\"clickOutside()\" data-testid=\"navigation-header\">\n <div class=\"nordic-blue-900-bg\" data-testid=\"navigation-heading\">\n <div\n class=\"center grid-max-width padding-left-gutter padding-right-gutter flex flex--space-between flex--middle navigation-heading-bottom\"\n [class.extended-navi-padding]=\"!!(amountOfUpcomingTrips$ | async)\"\n data-testid=\"navigation-heading-container\"\n >\n <!-- Menu button set start here -->\n <div class=\"flex dn-laptop-down misc-menu padding-right-gutter\">\n <fcom-button\n data-testid=\"navigation-toggle\"\n [aria]=\"{\n controls: 'main-navigation',\n expanded: isOpen,\n }\"\n [icon]=\"{\n name: isOpen ? SvgLibraryIcon.CLOSE_DELETE : SvgLibraryIcon.MENU_LIST,\n\n position: IconPosition.LEFT,\n }\"\n [text]=\"'navigation.menu' | finLocalization\"\n [theme]=\"ButtonTheme.DARK_TERTIARY_GHOST\"\n (clickBtn)=\"toggleNavigation($event)\"\n ></fcom-button>\n </div>\n\n <!-- Menu category options start here -->\n <div class=\"desktop-header-wrapper nordic-blue-900-bg fill\">\n <div class=\"flex flex--center grow align-center white-text\">\n <div\n *ngFor=\"let item of topMenuItems$ | async\"\n class=\"menu-item flex text-hover pr-xsmall-x\"\n [class.active]=\"item.active\"\n >\n <a\n class=\"no-underline white-text inline-block fill font-body-1\"\n [attr.aria-current]=\"item.active ? 'page' : null\"\n [finLink]=\"item.link\"\n [external]=\"item.external\"\n [attr.target]=\"item.openInNewTab ? '_blank' : ''\"\n [finElemTracker]=\"'top-header: ' + item.trackingId\"\n [finElemContext]=\"GaContext.TOP_NAVIGATION\"\n [finElemType]=\"ElementTypes.LINK\"\n (click)=\"scrollToTop()\"\n >\n @if (item.link.includes('/manage') && (amountOfUpcomingTrips$ | async)) {\n {{ 'navigation.myTrips' | finLocalization: { amount: (amountOfUpcomingTrips$ | async) } }}\n } @else {\n {{ item.teaserTitle }}\n }\n <span *ngIf=\"item.active\" class=\"is-vishidden\">{{ 'navigation.currentPage' | finLocalization }}</span>\n </a>\n </div>\n </div>\n </div>\n\n <!-- Search set start here -->\n <div class=\"padding-left-gutter misc-search dn-laptop-down\">\n <div class=\"relative grow\">\n <fin-site-search-header-widget-starter\n class=\"search-component block icon-button white-text grow\"\n [expandable]=\"true\"\n [context]=\"'desktop'\"\n [context]=\"'header'\"\n (searchGtmEvent)=\"\n headerGtmClickEvent('desktop-main-navigation-search-navi', GaContext.DESKTOP_MAIN_NAVIGATION)\n \"\n >\n </fin-site-search-header-widget-starter>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Main menu start here -->\n <nav\n id=\"main-navigation\"\n class=\"border-bottom ps-small-t absolute z1 white-bg fill\"\n [attr.aria-label]=\"'navigation.mainNavigation' | finLocalization\"\n [class.is-vishidden]=\"!isOpen\"\n >\n <div class=\"grid-max-width padding-left-gutter padding-right-gutter relative desktop-navigation-wrapper center\">\n <div class=\"desktop-navigation-head flex flex--space-between\">\n <ng-container *ngFor=\"let item of (menuItems$ | async)?.main; trackBy: trackItems; index as catIdx\">\n <button\n class=\"navigation-category nordic-blue-900-text font-body-2 ps-xxsmall no-decoration\"\n [attr.aria-controls]=\"'category-' + catIdx\"\n [attr.aria-expanded]=\"(expandedCategory$ | async) === item ? true : false\"\n *ngIf=\"item.teaserTitle && item.items && item.items.length > 0 && !item.hideInMenu\"\n [class.active]=\"(expandedOrActiveNaviCategory$ | async) === item\"\n [finElemTracker]=\"'level-1: ' + item.teaserTitle\"\n [finElemContext]=\"GaContext.TOP_NAVIGATION\"\n [finElemType]=\"ElementTypes.LINK\"\n (click)=\"setCategoryAsExpanded($event, item)\"\n >\n <span *ngIf=\"(activeNaviCategory$ | async) === item\" class=\"is-vishidden\">{{\n 'navigation.currentPageUnderTopic' | finLocalization\n }}</span>\n {{ item.teaserTitle }}\n </button>\n <div\n class=\"white-bg desktop-navigation-body absolute z2\"\n [attr.aria-labelledby]=\"'category-' + catIdx\"\n [attr.aria-hidden]=\"(expandedCategory$ | async) === item ? false : true\"\n [class.navi-expanded]=\"(expandedCategory$ | async) === item\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"desktop-navigation-body-content center grid-max-width padding-left-gutter padding-right-gutter ps-xxlarge-t ps-xsmall-b font-body-2 regular-type\"\n [class.nav-active-category]=\"(expandedCategory$ | async) === item\"\n >\n <ng-container *ngFor=\"let section of item.items; trackBy: trackItems\">\n <dl *ngIf=\"section.link && !section.hideInMenu\" class=\"ms-large-b pr-medium-r\">\n <dt class=\"ms-xsmall-b\">\n <a\n [finLink]=\"section.link\"\n class=\"nordic-blue-900-text bold-type no-decoration flex flex--middle\"\n (click)=\"closeNaviMenu()\"\n [class.current-item]=\"section.active\"\n [attr.aria-current]=\"section.active ? 'page' : null\"\n [external]=\"section.external\"\n [finElemTracker]=\"'level-2: ' + section.link\"\n [finElemContext]=\"GaContext.TOP_NAVIGATION\"\n [finElemType]=\"ElementTypes.LINK\"\n [attr.target]=\"section.openInNewTab ? '_blank' : ''\"\n >\n {{ section.teaserTitle }}\n <span *ngIf=\"section.active\" class=\"is-vishidden\">{{\n 'navigation.currentPage' | finLocalization\n }}</span>\n <fcom-icon\n *ngIf=\"section.external\"\n [name]=\"SvgLibraryIcon.EXTERNAL_TAB\"\n class=\"icon-small ms-xxsmall-l\"\n ></fcom-icon>\n <fcom-icon\n *ngIf=\"section.loginRequired\"\n [name]=\"SvgLibraryIcon.LOCK_OPEN\"\n class=\"icon-small ms-xxsmall-l\"\n ></fcom-icon>\n </a>\n </dt>\n <ng-container *ngFor=\"let child of section.items; trackBy: trackItems\">\n <dd *ngIf=\"child.link && child.teaserTitle && !child.hideInMenu\">\n <a\n [finLink]=\"child.link\"\n class=\"nordic-blue-900-text no-decoration ps-xxsmall-t block flex flex--middle\"\n (click)=\"closeNaviMenu()\"\n [class.current-item]=\"child.active\"\n [attr.aria-current]=\"child.active ? 'page' : null\"\n [external]=\"child.external\"\n [finElemTracker]=\"'level-3: ' + child.link\"\n [finElemContext]=\"GaContext.TOP_NAVIGATION\"\n [finElemType]=\"ElementTypes.LINK\"\n [attr.target]=\"child.openInNewTab ? '_blank' : ''\"\n >\n {{ child.teaserTitle }}\n <span *ngIf=\"child.active\" class=\"is-vishidden\">{{\n 'navigation.currentPage' | finLocalization\n }}</span>\n <fcom-icon\n *ngIf=\"child.external\"\n [name]=\"SvgLibraryIcon.EXTERNAL_TAB\"\n class=\"icon-small ms-xxsmall-l\"\n ></fcom-icon>\n <fcom-icon\n *ngIf=\"child.loginRequired\"\n [name]=\"SvgLibraryIcon.LOCK_OPEN\"\n class=\"icon-small ms-xxsmall-l\"\n ></fcom-icon>\n </a>\n </dd>\n </ng-container>\n </dl>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </nav>\n </div>\n</header>\n<fin-breadcrumb *ngIf=\"showBreadcrumbs && (isVisible$ | async)\" class=\"z1 fill\"></fin-breadcrumb>\n","import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { combineLatest, Observable, of, ReplaySubject, Subscription } from 'rxjs';\nimport { distinctUntilChanged, filter, map, startWith, switchMap, take, tap } from 'rxjs/operators';\n\nimport { GtmService } from '@fcom/common/gtm';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { AppState, ConfigService, CountryState, StorageService, unsubscribe, WindowRef } from '@fcom/core';\nimport { loginIsOpen, loginStatus } from '@fcom/core/selectors';\nimport { LoginStatus, LoginStep } from '@fcom/core-api/login';\nimport { isPresent, stopPropagation } from '@fcom/core/utils';\nimport { finShare, snapshot } from '@fcom/rx';\nimport { CmsTemplate, CmsViewType } from '@fcom/core-api/interfaces';\nimport { ButtonMode, ButtonSize, ButtonTheme, IconPosition } from '@fcom/ui-components';\nimport { LoginActions } from '@fcom/core/actions';\nimport { OrderService } from '@fcom/dapi/api/services';\n\nimport { CmsPageService, MediaQueryService, NavigationMenuService } from '../../services';\nimport {\n BreadcrumbItem,\n ConsentStatus,\n ElementActions,\n ElementTypes,\n GaContext,\n MenuItem,\n MenuJson,\n onOpenGtmEvent,\n} from '../../interfaces';\nimport { ConsentService, JoinService, LoginService, LoginWidgetComponent } from '../../login';\nimport { isNavigationEvent } from '../../utils';\nimport { LanguageSelectorContext } from '../language-selector/language-selector.component';\n\ninterface ExtendedMenuItem extends MenuItem {\n trackingId?: string;\n}\n\nconst UPCOMING_TRIPS_STORAGE_KEY = 'amountOfUpcomingTrips';\nconst UPCOMING_TRIPS_MAX_AMOUNT = 5;\n\n@Component({\n selector: 'fin-header',\n styleUrls: ['./header.component.scss'],\n templateUrl: './header.component.html',\n})\nexport class HeaderComponent implements OnInit, OnDestroy {\n @Input()\n showBreadcrumbs = true;\n\n @ViewChild(LoginWidgetComponent, { static: false }) loginWidget: LoginWidgetComponent;\n\n readonly ButtonSize = ButtonSize;\n readonly CustomIcon = CustomIcon;\n readonly IconLibrary = IconLibrary;\n readonly IconPosition = IconPosition;\n readonly ButtonMode = ButtonMode;\n readonly ButtonTheme = ButtonTheme;\n readonly ElementTypes = ElementTypes;\n readonly GaContext = GaContext;\n readonly homeLink$: Observable<string>;\n readonly currentLanguage$: Observable<string>;\n readonly LoginStatus = LoginStatus;\n readonly enableWelcomeBackMessage: boolean = false;\n readonly isVisible$: Observable<boolean>;\n readonly LANGUAGE_SELECTOR_CONTEXT = LanguageSelectorContext.TOP_NAVI;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n isMenuOpen$: Observable<boolean>;\n countries$: Observable<CountryState>;\n loginStatus$: Observable<LoginStatus>;\n oneworldLink$: Observable<BreadcrumbItem>;\n\n menuItems$: Observable<MenuJson>;\n topMenuItems$: Observable<ExtendedMenuItem[]>;\n expandedCategory$: Observable<MenuItem>;\n expandedOrActiveNaviCategory$: Observable<MenuItem>;\n activeNaviCategory$: Observable<MenuItem>;\n isOpen = false;\n pageHasDisruptions$: Observable<boolean>;\n enableLoginDialog = false;\n enableJoinDialog = false;\n loginDialogOpen$: Observable<boolean>;\n cookiePolicy$: Observable<boolean>;\n mobileOrTablet$: Observable<boolean>;\n isLandingPage$: Observable<boolean>;\n welcomeBackMessageOpen$: Observable<boolean>;\n isStickyNavTest$ = of(false);\n amountOfUpcomingTrips$: Observable<string>;\n enableAccountCreationVerification = false;\n accountVerificationToken$ = new ReplaySubject<string>(0);\n subscriptions = new Subscription();\n\n constructor(\n private navigationMenuService: NavigationMenuService,\n private languageService: LanguageService,\n private configService: ConfigService,\n private loginService: LoginService,\n private store$: Store<AppState>,\n private mediaQueryService: MediaQueryService,\n private gtmService: GtmService,\n private router: Router,\n private route: ActivatedRoute,\n\n private pageService: CmsPageService,\n private consentService: ConsentService,\n public joinService: JoinService,\n private orderService: OrderService,\n private storageService: StorageService,\n private readonly windowRef: WindowRef\n ) {\n this.isVisible$ = this.navigationMenuService.isHeaderVisible$;\n this.isMenuOpen$ = this.navigationMenuService.isNavigationMenuOpen$;\n this.homeLink$ = this.languageService.lang.pipe(map((lang) => `/${lang}`));\n this.enableWelcomeBackMessage = this.configService.cfg.enableWelcomeBackMessage;\n this.enableLoginDialog = this.configService.cfg.enableLoginDialog;\n this.enableJoinDialog = this.configService.cfg.enableJoinDialog;\n this.enableAccountCreationVerification = configService.cfg.enableAccountCreationVerification;\n }\n\n ngOnInit(): void {\n this.loginStatus$ = this.store$.pipe(loginStatus(), finShare());\n this.oneworldLink$ = this.navigationMenuService.oneworldLink$;\n this.menuItems$ = this.navigationMenuService.menuItems$;\n const matchUrlLocalRegex = /^\\/\\w+-\\w+\\//;\n this.topMenuItems$ = this.menuItems$.pipe(\n map((menuItems) =>\n menuItems.top.map((menuItem) => ({\n ...menuItem,\n trackingId: menuItem.link.match(matchUrlLocalRegex) ? menuItem.link.replace(matchUrlLocalRegex, '') : 'book',\n }))\n )\n );\n this.expandedCategory$ = this.navigationMenuService.expandedNaviCategory;\n this.expandedOrActiveNaviCategory$ = this.navigationMenuService.expandedOrActiveNaviCategory$;\n this.activeNaviCategory$ = this.navigationMenuService.activeNaviCategory;\n const pagePath$ = this.router.events.pipe(\n filter<NavigationEnd>(isNavigationEvent),\n map((navigation) => navigation.url),\n startWith(this.router.url),\n distinctUntilChanged()\n );\n\n const amountOfUpcomingTrips$: Observable<number> = this.loginStatus$.pipe(\n filter((status) => status === LoginStatus.LOGGED_IN),\n switchMap(() =>\n this.orderService\n .fetchOrderPreviews(this.configService.cfg.orderUrl, {\n locale: this.languageService.localeValue,\n })\n .pipe(take(1))\n ),\n map((response) => response?.orderPreviews?.length || 0),\n tap((orderPreviews) => {\n this.storageService.SESSION.set(UPCOMING_TRIPS_STORAGE_KEY, orderPreviews);\n }),\n startWith(this.storageService.SESSION.get(UPCOMING_TRIPS_STORAGE_KEY) || 0),\n finShare()\n );\n\n this.amountOfUpcomingTrips$ = amountOfUpcomingTrips$.pipe(\n map((amount) => {\n if (amount > 0) {\n return amount <= UPCOMING_TRIPS_MAX_AMOUNT ? amount.toString() : `${UPCOMING_TRIPS_MAX_AMOUNT}+`;\n }\n return '';\n }),\n finShare()\n );\n\n this.pageHasDisruptions$ = pagePath$.pipe(\n switchMap((path) => this.pageService.getPageDataIfExists(path)),\n filter<CmsTemplate>(Boolean),\n map((template) => template.main),\n map((contents) =>\n contents.find(\n ({ viewTypeName }) => isPresent(viewTypeName) && viewTypeName.endsWith(CmsViewType.FRONT_PAGE_DISRUPTIONS)\n )\n ),\n map((disruptions) => disruptions?.items.length > 0),\n startWith(false)\n );\n\n this.cookiePolicy$ = this.consentService.cookieConsents$.pipe(\n map((cg) => cg?.consents?.every((c) => c.consentStatus !== ConsentStatus.WITHDRAWN)),\n startWith(false),\n finShare()\n );\n\n this.loginDialogOpen$ = combineLatest([this.loginStatus$, this.store$.pipe(loginIsOpen())]).pipe(\n map(([status, isOpen]) => status !== LoginStatus.INITIAL && status !== LoginStatus.PENDING && isOpen)\n );\n this.mobileOrTablet$ = combineLatest([\n this.mediaQueryService.isBreakpoint$('mobile'),\n this.mediaQueryService.isBreakpoint$('tablet'),\n ]).pipe(\n map(([mobile, tablet]) => mobile || tablet),\n distinctUntilChanged(),\n startWith(false)\n );\n\n this.isLandingPage$ = pagePath$.pipe(map((routeValue) => new RegExp('^/[^/]+$').test(routeValue)));\n\n this.welcomeBackMessageOpen$ = combineLatest([\n this.loginDialogOpen$,\n this.joinService.joinDialogOpen$,\n this.pageHasDisruptions$,\n this.cookiePolicy$,\n of(this.enableWelcomeBackMessage),\n this.loginStatus$,\n this.isLandingPage$,\n this.mobileOrTablet$,\n ]).pipe(\n map(\n ([\n loginDialogOpen,\n joinDialogOpen,\n pageHasDisruptions,\n cookiePolicy,\n enableWelcomeBackMessage,\n loginStatus,\n isLandingPage,\n mobileOrTablet,\n ]) =>\n !loginDialogOpen &&\n !joinDialogOpen &&\n !pageHasDisruptions &&\n cookiePolicy &&\n enableWelcomeBackMessage &&\n loginStatus === LoginStatus.NOT_LOGGED_IN &&\n isLandingPage &&\n !mobileOrTablet\n )\n );\n\n if (this.enableAccountCreationVerification) {\n const token = this.route.snapshot.queryParamMap.get('verify-account');\n this.accountVerificationToken$.next(token);\n if (token) {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n }\n } else {\n this.accountVerificationToken$.next(null);\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n openLoginWidget(event: MouseEvent): void {\n this.loginWidget.open();\n stopPropagation(event);\n }\n\n closeNaviMenu(): void {\n this.navigationMenuService.closeNaviMenu();\n this.isOpen = false;\n }\n\n setCategoryAsExpanded(event: Event, item: MenuItem): void {\n this.navigationMenuService.setCategoryAsExpanded(event, item);\n }\n\n trackItems(index: number): number {\n return index;\n }\n\n clickOutside(): void {\n this.isOpen = false;\n this.navigationMenuService.closeNaviMenu();\n }\n\n handleLoginButtonClick(event: MouseEvent, loginStatus: LoginStatus): void {\n if (loginStatus === LoginStatus.LOGGED_IN) {\n this.openLoginWidget(event);\n }\n\n if (loginStatus === LoginStatus.NOT_LOGGED_IN) {\n this.openLoginDialog();\n }\n }\n\n toggleNavigation(event: Event): void {\n stopPropagation(event);\n\n this.isOpen = !this.isOpen;\n\n if (this.isOpen) {\n this.navigationMenuService.setExpandedCategory(snapshot(this.expandedOrActiveNaviCategory$));\n } else {\n this.navigationMenuService.closeNaviMenu();\n }\n\n this.gtmService.trackElement(\n 'desktop-main-navigation-hamburger-navi',\n GaContext.DESKTOP_MAIN_NAVIGATION,\n ElementTypes.ACCORDION,\n undefined,\n this.isOpen ? ElementActions.OPEN : ElementActions.CLOSE\n );\n }\n\n headerGtmClickEvent(gtmId: string, gtmContext: GaContext): void {\n this.gtmService.trackElement(gtmId, gtmContext, ElementTypes.BUTTON, undefined, ElementActions.CLICK);\n }\n\n joinFinnairPlus(): void {\n if (this.enableJoinDialog) {\n this.loginWidget.close();\n this.joinService.joinDialogOpen$.next(true);\n this.headerGtmClickEvent(`join-form-open-${onOpenGtmEvent}`, GaContext.FINNAIR_PLUS);\n } else {\n this.loginService.redirectToJoin();\n }\n }\n\n openLoginDialog(): void {\n if (this.enableLoginDialog) {\n this.loginWidget.close();\n this.joinService.joinDialogOpen$.next(false);\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n } else {\n this.loginService.redirectToLogin();\n }\n }\n\n closeLoginDialog(): void {\n this.store$.dispatch(LoginActions.clearLoginPhase());\n }\n\n scrollToTop(): void {\n this.windowRef.nativeWindow.scrollTo({ top: 0, behavior: 'smooth' });\n }\n\n accountVerificationFinished(): void {\n this.accountVerificationToken$.next(null);\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\nimport {ScrollStrategy} from './scroll-strategy';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {coerceCssPixelValue} from '@angular/cdk/coercion';\nimport {supportsScrollBehavior} from '@angular/cdk/platform';\n\nconst scrollBehaviorSupported = supportsScrollBehavior();\n\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nexport class BlockScrollStrategy implements ScrollStrategy {\n private _previousHTMLStyles = {top: '', left: ''};\n private _previousScrollPosition: {top: number; left: number};\n private _isEnabled = false;\n private _document: Document;\n\n constructor(\n private _viewportRuler: ViewportRuler,\n document: any,\n ) {\n this._document = document;\n }\n\n /** Attaches this scroll strategy to an overlay. */\n attach() {}\n\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this._canBeEnabled()) {\n const root = this._document.documentElement!;\n\n this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n // Cache the previous inline styles in case the user had set them.\n this._previousHTMLStyles.left = root.style.left || '';\n this._previousHTMLStyles.top = root.style.top || '';\n\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n root.classList.add('cdk-global-scrollblock');\n this._isEnabled = true;\n }\n }\n\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable() {\n if (this._isEnabled) {\n const html = this._document.documentElement!;\n const body = this._document.body!;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n\n this._isEnabled = false;\n\n htmlStyle.left = this._previousHTMLStyles.left;\n htmlStyle.top = this._previousHTMLStyles.top;\n html.classList.remove('cdk-global-scrollblock');\n\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n // because it can throw off feature detections in `supportsScrollBehavior` which\n // checks for `'scrollBehavior' in documentElement.style`.\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n }\n\n window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n }\n\n private _canBeEnabled(): boolean {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n const html = this._document.documentElement!;\n\n if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n return false;\n }\n\n const body = this._document.body;\n const viewport = this._viewportRuler.getViewportSize();\n return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\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 */\nimport {NgZone} from '@angular/core';\nimport {ScrollStrategy, getMatScrollStrategyAlreadyAttachedError} from './scroll-strategy';\nimport {Subscription} from 'rxjs';\nimport {ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling';\nimport {filter} from 'rxjs/operators';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Config options for the CloseScrollStrategy.\n */\nexport interface CloseScrollStrategyConfig {\n /** Amount of pixels the user has to scroll before the overlay is closed. */\n threshold?: number;\n}\n\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nexport class CloseScrollStrategy implements ScrollStrategy {\n private _scrollSubscription: Subscription | null = null;\n private _overlayRef: OverlayRef;\n private _initialScrollPosition: number;\n\n constructor(\n private _scrollDispatcher: ScrollDispatcher,\n private _ngZone: NgZone,\n private _viewportRuler: ViewportRuler,\n private _config?: CloseScrollStrategyConfig,\n ) {}\n\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef: OverlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n\n this._overlayRef = overlayRef;\n }\n\n /** Enables the closing of the attached overlay on scroll. */\n enable() {\n if (this._scrollSubscription) {\n return;\n }\n\n const stream = this._scrollDispatcher.scrolled(0).pipe(\n filter(scrollable => {\n return (\n !scrollable ||\n !this._overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement)\n );\n }),\n );\n\n if (this._config && this._config.threshold && this._config.threshold > 1) {\n this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n\n this._scrollSubscription = stream.subscribe(() => {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n\n if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config!.threshold!) {\n this._detach();\n } else {\n this._overlayRef.updatePosition();\n }\n });\n } else {\n this._scrollSubscription = stream.subscribe(this._detach);\n }\n }\n\n /** Disables the closing the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n\n detach() {\n this.disable();\n this._overlayRef = null!;\n }\n\n /** Detaches the overlay ref and disables the scroll strategy. */\n private _detach = () => {\n this.disable();\n\n if (this._overlayRef.hasAttached()) {\n this._ngZone.run(() => this._overlayRef.detach());\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\nimport {ScrollStrategy} from './scroll-strategy';\n\n/** Scroll strategy that doesn't do anything. */\nexport class NoopScrollStrategy implements ScrollStrategy {\n /** Does nothing, as this scroll strategy is a no-op. */\n enable() {}\n /** Does nothing, as this scroll strategy is a no-op. */\n disable() {}\n /** Does nothing, as this scroll strategy is a no-op. */\n attach() {}\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// TODO(jelbourn): move this to live with the rest of the scrolling code\n// TODO(jelbourn): someday replace this with IntersectionObservers\n\n/** Equivalent of `DOMRect` without some of the properties we don't care about. */\ntype Dimensions = Omit<DOMRect, 'x' | 'y' | 'toJSON'>;\n\n/**\n * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is scrolled out of view\n * @docs-private\n */\nexport function isElementScrolledOutsideView(element: Dimensions, scrollContainers: Dimensions[]) {\n return scrollContainers.some(containerBounds => {\n const outsideAbove = element.bottom < containerBounds.top;\n const outsideBelow = element.top > containerBounds.bottom;\n const outsideLeft = element.right < containerBounds.left;\n const outsideRight = element.left > containerBounds.right;\n\n return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n });\n}\n\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is clipped\n * @docs-private\n */\nexport function isElementClippedByScrolling(element: Dimensions, scrollContainers: Dimensions[]) {\n return scrollContainers.some(scrollContainerRect => {\n const clippedAbove = element.top < scrollContainerRect.top;\n const clippedBelow = element.bottom > scrollContainerRect.bottom;\n const clippedLeft = element.left < scrollContainerRect.left;\n const clippedRight = element.right > scrollContainerRect.right;\n\n return clippedAbove || clippedBelow || clippedLeft || clippedRight;\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\nimport {NgZone} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {ScrollStrategy, getMatScrollStrategyAlreadyAttachedError} from './scroll-strategy';\nimport {ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling';\nimport {isElementScrolledOutsideView} from '../position/scroll-clip';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Config options for the RepositionScrollStrategy.\n */\nexport interface RepositionScrollStrategyConfig {\n /** Time in milliseconds to throttle the scroll events. */\n scrollThrottle?: number;\n\n /** Whether to close the overlay once the user has scrolled away completely. */\n autoClose?: boolean;\n}\n\n/**\n * Strategy that will update the element position as the user is scrolling.\n */\nexport class RepositionScrollStrategy implements ScrollStrategy {\n private _scrollSubscription: Subscription | null = null;\n private _overlayRef: OverlayRef;\n\n constructor(\n private _scrollDispatcher: ScrollDispatcher,\n private _viewportRuler: ViewportRuler,\n private _ngZone: NgZone,\n private _config?: RepositionScrollStrategyConfig,\n ) {}\n\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef: OverlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n\n this._overlayRef = overlayRef;\n }\n\n /** Enables repositioning of the attached overlay on scroll. */\n enable() {\n if (!this._scrollSubscription) {\n const throttle = this._config ? this._config.scrollThrottle : 0;\n\n this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => {\n this._overlayRef.updatePosition();\n\n // TODO(crisbeto): make `close` on by default once all components can handle it.\n if (this._config && this._config.autoClose) {\n const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();\n const {width, height} = this._viewportRuler.getViewportSize();\n\n // TODO(crisbeto): include all ancestor scroll containers here once\n // we have a way of exposing the trigger element to the scroll strategy.\n const parentRects = [{width, height, bottom: height, right: width, top: 0, left: 0}];\n\n if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n this.disable();\n this._ngZone.run(() => this._overlayRef.detach());\n }\n }\n });\n }\n }\n\n /** Disables repositioning of the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n\n detach() {\n this.disable();\n this._overlayRef = null!;\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\nimport {ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, NgZone} from '@angular/core';\nimport {BlockScrollStrategy} from './block-scroll-strategy';\nimport {CloseScrollStrategy, CloseScrollStrategyConfig} from './close-scroll-strategy';\nimport {NoopScrollStrategy} from './noop-scroll-strategy';\nimport {\n RepositionScrollStrategy,\n RepositionScrollStrategyConfig,\n} from './reposition-scroll-strategy';\n\n/**\n * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollStrategyOptions {\n private _document: Document;\n\n constructor(\n private _scrollDispatcher: ScrollDispatcher,\n private _viewportRuler: ViewportRuler,\n private _ngZone: NgZone,\n @Inject(DOCUMENT) document: any,\n ) {\n this._document = document;\n }\n\n /** Do nothing on scroll. */\n noop = () => new NoopScrollStrategy();\n\n /**\n * Close the overlay as soon as the user scrolls.\n * @param config Configuration to be used inside the scroll strategy.\n */\n close = (config?: CloseScrollStrategyConfig) =>\n new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config);\n\n /** Block scrolling. */\n block = () => new BlockScrollStrategy(this._viewportRuler, this._document);\n\n /**\n * Update the overlay's position on scroll.\n * @param config Configuration to be used inside the scroll strategy.\n * Allows debouncing the reposition calls.\n */\n reposition = (config?: RepositionScrollStrategyConfig) =>\n new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config);\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\nimport {PositionStrategy} from './position/position-strategy';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {ScrollStrategy, NoopScrollStrategy} from './scroll/index';\n\n/** Initial configuration used when creating an overlay. */\nexport class OverlayConfig {\n /** Strategy with which to position the overlay. */\n positionStrategy?: PositionStrategy;\n\n /** Strategy to be used when handling scroll events while the overlay is open. */\n scrollStrategy?: ScrollStrategy = new NoopScrollStrategy();\n\n /** Custom class to add to the overlay pane. */\n panelClass?: string | string[] = '';\n\n /** Whether the overlay has a backdrop. */\n hasBackdrop?: boolean = false;\n\n /** Custom class to add to the backdrop */\n backdropClass?: string | string[] = 'cdk-overlay-dark-backdrop';\n\n /** The width of the overlay panel. If a number is provided, pixel units are assumed. */\n width?: number | string;\n\n /** The height of the overlay panel. If a number is provided, pixel units are assumed. */\n height?: number | string;\n\n /** The min-width of the overlay panel. If a number is provided, pixel units are assumed. */\n minWidth?: number | string;\n\n /** The min-height of the overlay panel. If a number is provided, pixel units are assumed. */\n minHeight?: number | string;\n\n /** The max-width of the overlay panel. If a number is provided, pixel units are assumed. */\n maxWidth?: number | string;\n\n /** The max-height of the overlay panel. If a number is provided, pixel units are assumed. */\n maxHeight?: number | string;\n\n /**\n * Direction of the text in the overlay panel. If a `Directionality` instance\n * is passed in, the overlay will handle changes to its value automatically.\n */\n direction?: Direction | Directionality;\n\n /**\n * Whether the overlay should be disposed of when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n disposeOnNavigation?: boolean = false;\n\n constructor(config?: OverlayConfig) {\n if (config) {\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n const configKeys = Object.keys(config) as Iterable<keyof OverlayConfig> &\n (keyof OverlayConfig)[];\n for (const key of configKeys) {\n if (config[key] !== undefined) {\n // TypeScript, as of version 3.5, sees the left-hand-side of this expression\n // as \"I don't know *which* key this is, so the only valid value is the intersection\n // of all the possible values.\" In this case, that happens to be `undefined`. TypeScript\n // is not smart enough to see that the right-hand-side is actually an access of the same\n // exact type with the same exact key, meaning that the value type must be identical.\n // So we use `any` to work around this.\n this[key] = config[key] as any;\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 */\n\n/** Horizontal dimension of a connection point on the perimeter of the origin or overlay element. */\nexport type HorizontalConnectionPos = 'start' | 'center' | 'end';\n\n/** Vertical dimension of a connection point on the perimeter of the origin or overlay element. */\nexport type VerticalConnectionPos = 'top' | 'center' | 'bottom';\n\n/** A connection point on the origin element. */\nexport interface OriginConnectionPosition {\n originX: HorizontalConnectionPos;\n originY: VerticalConnectionPos;\n}\n\n/** A connection point on the overlay element. */\nexport interface OverlayConnectionPosition {\n overlayX: HorizontalConnectionPos;\n overlayY: VerticalConnectionPos;\n}\n\n/** The points of the origin element and the overlay element to connect. */\nexport class ConnectionPositionPair {\n /** X-axis attachment point for connected overlay origin. Can be 'start', 'end', or 'center'. */\n originX: HorizontalConnectionPos;\n /** Y-axis attachment point for connected overlay origin. Can be 'top', 'bottom', or 'center'. */\n originY: VerticalConnectionPos;\n /** X-axis attachment point for connected overlay. Can be 'start', 'end', or 'center'. */\n overlayX: HorizontalConnectionPos;\n /** Y-axis attachment point for connected overlay. Can be 'top', 'bottom', or 'center'. */\n overlayY: VerticalConnectionPos;\n\n constructor(\n origin: OriginConnectionPosition,\n overlay: OverlayConnectionPosition,\n /** Offset along the X axis. */\n public offsetX?: number,\n /** Offset along the Y axis. */\n public offsetY?: number,\n /** Class(es) to be applied to the panel while this position is active. */\n public panelClass?: string | string[],\n ) {\n this.originX = origin.originX;\n this.originY = origin.originY;\n this.overlayX = overlay.overlayX;\n this.overlayY = overlay.overlayY;\n }\n}\n\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n * ----------- -----------\n * | outside | | clipped |\n * | view | --------------------------\n * | | | | | |\n * ---------- | ----------- |\n * -------------------------- | |\n * | | | Scrollable |\n * | | | |\n * | | --------------------------\n * | Scrollable |\n * | |\n * --------------------------\n *\n * @docs-private\n */\nexport class ScrollingVisibility {\n isOriginClipped: boolean;\n isOriginOutsideView: boolean;\n isOverlayClipped: boolean;\n isOverlayOutsideView: boolean;\n}\n\n/** The change event emitted by the strategy when a fallback position is used. */\nexport class ConnectedOverlayPositionChange {\n constructor(\n /** The position used as a result of this change. */\n public connectionPair: ConnectionPositionPair,\n /** @docs-private */\n public scrollableViewProperties: ScrollingVisibility,\n ) {}\n}\n\n/**\n * Validates whether a vertical position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nexport function validateVerticalPosition(property: string, value: VerticalConnectionPos) {\n if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n throw Error(\n `ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"top\", \"bottom\" or \"center\".`,\n );\n }\n}\n\n/**\n * Validates whether a horizontal position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nexport function validateHorizontalPosition(property: string, value: HorizontalConnectionPos) {\n if (value !== 'start' && value !== 'end' && value !== 'center') {\n throw Error(\n `ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"start\", \"end\" or \"center\".`,\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, OnDestroy} from '@angular/core';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Service for dispatching events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\n@Injectable({providedIn: 'root'})\nexport abstract class BaseOverlayDispatcher implements OnDestroy {\n /** Currently attached overlays in the order they were attached. */\n _attachedOverlays: OverlayRef[] = [];\n\n protected _document: Document;\n protected _isAttached: boolean;\n\n constructor(@Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n ngOnDestroy(): void {\n this.detach();\n }\n\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef: OverlayRef): void {\n // Ensure that we don't get the same overlay multiple times.\n this.remove(overlayRef);\n this._attachedOverlays.push(overlayRef);\n }\n\n /** Remove an overlay from the list of attached overlay refs. */\n remove(overlayRef: OverlayRef): void {\n const index = this._attachedOverlays.indexOf(overlayRef);\n\n if (index > -1) {\n this._attachedOverlays.splice(index, 1);\n }\n\n // Remove the global listener once there are no more overlays.\n if (this._attachedOverlays.length === 0) {\n this.detach();\n }\n }\n\n /** Detaches the global event listener. */\n protected abstract detach(): void;\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {BaseOverlayDispatcher} from './base-overlay-dispatcher';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\n@Injectable({providedIn: 'root'})\nexport class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {\n constructor(\n @Inject(DOCUMENT) document: any,\n /** @breaking-change 14.0.0 _ngZone will be required. */\n @Optional() private _ngZone?: NgZone,\n ) {\n super(document);\n }\n\n /** Add a new overlay to the list of attached overlay refs. */\n override add(overlayRef: OverlayRef): void {\n super.add(overlayRef);\n\n // Lazily start dispatcher once first overlay is added\n if (!this._isAttached) {\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() =>\n this._document.body.addEventListener('keydown', this._keydownListener),\n );\n } else {\n this._document.body.addEventListener('keydown', this._keydownListener);\n }\n this._isAttached = true;\n }\n }\n\n /** Detaches the global keyboard event listener. */\n protected detach() {\n if (this._isAttached) {\n this._document.body.removeEventListener('keydown', this._keydownListener);\n this._isAttached = false;\n }\n }\n\n /** Keyboard event listener that will be attached to the body. */\n private _keydownListener = (event: KeyboardEvent) => {\n const overlays = this._attachedOverlays;\n\n for (let i = overlays.length - 1; i > -1; i--) {\n // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.\n // We want to target the most recent overlay, rather than trying to match where the event came\n // from, because some components might open an overlay, but keep focus on a trigger element\n // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,\n // because we don't want overlays that don't handle keyboard events to block the ones below\n // them that do.\n if (overlays[i]._keydownEvents.observers.length > 0) {\n const keydownEvents = overlays[i]._keydownEvents;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.run(() => keydownEvents.next(event));\n } else {\n keydownEvents.next(event);\n }\n break;\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 */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, NgZone, Optional} from '@angular/core';\nimport {Platform, _getEventTarget} from '@angular/cdk/platform';\nimport {BaseOverlayDispatcher} from './base-overlay-dispatcher';\nimport type {OverlayRef} from '../overlay-ref';\n\n/**\n * Service for dispatching mouse click events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\n@Injectable({providedIn: 'root'})\nexport class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {\n private _cursorOriginalValue: string;\n private _cursorStyleIsSet = false;\n private _pointerDownEventTarget: EventTarget | null;\n\n constructor(\n @Inject(DOCUMENT) document: any,\n private _platform: Platform,\n /** @breaking-change 14.0.0 _ngZone will be required. */\n @Optional() private _ngZone?: NgZone,\n ) {\n super(document);\n }\n\n /** Add a new overlay to the list of attached overlay refs. */\n override add(overlayRef: OverlayRef): void {\n super.add(overlayRef);\n\n // Safari on iOS does not generate click events for non-interactive\n // elements. However, we want to receive a click for any element outside\n // the overlay. We can force a \"clickable\" state by setting\n // `cursor: pointer` on the document body. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile\n // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\n if (!this._isAttached) {\n const body = this._document.body;\n\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => this._addEventListeners(body));\n } else {\n this._addEventListeners(body);\n }\n\n // click event is not fired on iOS. To make element \"clickable\" we are\n // setting the cursor to pointer\n if (this._platform.IOS && !this._cursorStyleIsSet) {\n this._cursorOriginalValue = body.style.cursor;\n body.style.cursor = 'pointer';\n this._cursorStyleIsSet = true;\n }\n\n this._isAttached = true;\n }\n }\n\n /** Detaches the global keyboard event listener. */\n protected detach() {\n if (this._isAttached) {\n const body = this._document.body;\n body.removeEventListener('pointerdown', this._pointerDownListener, true);\n body.removeEventListener('click', this._clickListener, true);\n body.removeEventListener('auxclick', this._clickListener, true);\n body.removeEventListener('contextmenu', this._clickListener, true);\n if (this._platform.IOS && this._cursorStyleIsSet) {\n body.style.cursor = this._cursorOriginalValue;\n this._cursorStyleIsSet = false;\n }\n this._isAttached = false;\n }\n }\n\n private _addEventListeners(body: HTMLElement): void {\n body.addEventListener('pointerdown', this._pointerDownListener, true);\n body.addEventListener('click', this._clickListener, true);\n body.addEventListener('auxclick', this._clickListener, true);\n body.addEventListener('contextmenu', this._clickListener, true);\n }\n\n /** Store pointerdown event target to track origin of click. */\n private _pointerDownListener = (event: PointerEvent) => {\n this._pointerDownEventTarget = _getEventTarget(event);\n };\n\n /** Click event listener that will be attached to the body propagate phase. */\n private _clickListener = (event: MouseEvent) => {\n const target = _getEventTarget(event);\n // In case of a click event, we want to check the origin of the click\n // (e.g. in case where a user starts a click inside the overlay and\n // releases the click outside of it).\n // This is done by using the event target of the preceding pointerdown event.\n // Every click event caused by a pointer device has a preceding pointerdown\n // event, unless the click was programmatically triggered (e.g. in a unit test).\n const origin =\n event.type === 'click' && this._pointerDownEventTarget\n ? this._pointerDownEventTarget\n : target;\n // Reset the stored pointerdown event target, to avoid having it interfere\n // in subsequent events.\n this._pointerDownEventTarget = null;\n\n // We copy the array because the original may be modified asynchronously if the\n // outsidePointerEvents listener decides to detach overlays resulting in index errors inside\n // the for loop.\n const overlays = this._attachedOverlays.slice();\n\n // Dispatch the mouse event to the top overlay which has subscribers to its mouse events.\n // We want to target all overlays for which the click could be considered as outside click.\n // As soon as we reach an overlay for which the click is not outside click we break off\n // the loop.\n for (let i = overlays.length - 1; i > -1; i--) {\n const overlayRef = overlays[i];\n if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) {\n continue;\n }\n\n // If it's a click inside the overlay, just break - we should do nothing\n // If it's an outside click (both origin and target of the click) dispatch the mouse event,\n // and proceed with the next overlay\n if (\n overlayRef.overlayElement.contains(target as Node) ||\n overlayRef.overlayElement.contains(origin as Node)\n ) {\n break;\n }\n\n const outsidePointerEvents = overlayRef._outsidePointerEvents;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.run(() => outsidePointerEvents.next(event));\n } else {\n outsidePointerEvents.next(event);\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 */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, OnDestroy} from '@angular/core';\nimport {Platform, _isTestEnvironment} from '@angular/cdk/platform';\n\n/** Container inside which all overlays will render. */\n@Injectable({providedIn: 'root'})\nexport class OverlayContainer implements OnDestroy {\n protected _containerElement: HTMLElement;\n protected _document: Document;\n\n constructor(\n @Inject(DOCUMENT) document: any,\n protected _platform: Platform,\n ) {\n this._document = document;\n }\n\n ngOnDestroy() {\n this._containerElement?.remove();\n }\n\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n getContainerElement(): HTMLElement {\n if (!this._containerElement) {\n this._createContainer();\n }\n\n return this._containerElement;\n }\n\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n */\n protected _createContainer(): void {\n const containerClass = 'cdk-overlay-container';\n\n // TODO(crisbeto): remove the testing check once we have an overlay testing\n // module or Angular starts tearing down the testing `NgModule`. See:\n // https://github.com/angular/angular/issues/18831\n if (this._platform.isBrowser || _isTestEnvironment()) {\n const oppositePlatformContainers = this._document.querySelectorAll(\n `.${containerClass}[platform=\"server\"], ` + `.${containerClass}[platform=\"test\"]`,\n );\n\n // Remove any old containers from the opposite platform.\n // This can happen when transitioning from the server to the client.\n for (let i = 0; i < oppositePlatformContainers.length; i++) {\n oppositePlatformContainers[i].remove();\n }\n }\n\n const container = this._document.createElement('div');\n container.classList.add(containerClass);\n\n // A long time ago we kept adding new overlay containers whenever a new app was instantiated,\n // but at some point we added logic which clears the duplicate ones in order to avoid leaks.\n // The new logic was a little too aggressive since it was breaking some legitimate use cases.\n // To mitigate the problem we made it so that only containers from a different platform are\n // cleared, but the side-effect was that people started depending on the overly-aggressive\n // logic to clean up their tests for them. Until we can introduce an overlay-specific testing\n // module which does the cleanup, we try to detect that we're in a test environment and we\n // always clear the container. See #17006.\n // TODO(crisbeto): remove the test environment check once we have an overlay testing module.\n if (_isTestEnvironment()) {\n container.setAttribute('platform', 'test');\n } else if (!this._platform.isBrowser) {\n container.setAttribute('platform', 'server');\n }\n\n this._document.body.appendChild(container);\n this._containerElement = container;\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\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {ComponentPortal, Portal, PortalOutlet, TemplatePortal} from '@angular/cdk/portal';\nimport {ComponentRef, EmbeddedViewRef, NgZone} from '@angular/core';\nimport {Location} from '@angular/common';\nimport {Observable, Subject, merge, SubscriptionLike, Subscription} from 'rxjs';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {OverlayKeyboardDispatcher} from './dispatchers/overlay-keyboard-dispatcher';\nimport {OverlayOutsideClickDispatcher} from './dispatchers/overlay-outside-click-dispatcher';\nimport {OverlayConfig} from './overlay-config';\nimport {coerceCssPixelValue, coerceArray} from '@angular/cdk/coercion';\nimport {PositionStrategy} from './position/position-strategy';\nimport {ScrollStrategy} from './scroll';\n\n/** An object where all of its properties cannot be written. */\nexport type ImmutableObject<T> = {\n readonly [P in keyof T]: T[P];\n};\n\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nexport class OverlayRef implements PortalOutlet {\n private _backdropElement: HTMLElement | null = null;\n private _backdropTimeout: number | undefined;\n private readonly _backdropClick = new Subject<MouseEvent>();\n private readonly _attachments = new Subject<void>();\n private readonly _detachments = new Subject<void>();\n private _positionStrategy: PositionStrategy | undefined;\n private _scrollStrategy: ScrollStrategy | undefined;\n private _locationChanges: SubscriptionLike = Subscription.EMPTY;\n private _backdropClickHandler = (event: MouseEvent) => this._backdropClick.next(event);\n private _backdropTransitionendHandler = (event: TransitionEvent) => {\n this._disposeBackdrop(event.target as HTMLElement | null);\n };\n\n /**\n * Reference to the parent of the `_host` at the time it was detached. Used to restore\n * the `_host` to its original position in the DOM when it gets re-attached.\n */\n private _previousHostParent: HTMLElement;\n\n /** Stream of keydown events dispatched to this overlay. */\n readonly _keydownEvents = new Subject<KeyboardEvent>();\n\n /** Stream of mouse outside events dispatched to this overlay. */\n readonly _outsidePointerEvents = new Subject<MouseEvent>();\n\n constructor(\n private _portalOutlet: PortalOutlet,\n private _host: HTMLElement,\n private _pane: HTMLElement,\n private _config: ImmutableObject<OverlayConfig>,\n private _ngZone: NgZone,\n private _keyboardDispatcher: OverlayKeyboardDispatcher,\n private _document: Document,\n private _location: Location,\n private _outsideClickDispatcher: OverlayOutsideClickDispatcher,\n private _animationsDisabled = false,\n ) {\n if (_config.scrollStrategy) {\n this._scrollStrategy = _config.scrollStrategy;\n this._scrollStrategy.attach(this);\n }\n\n this._positionStrategy = _config.positionStrategy;\n }\n\n /** The overlay's HTML element */\n get overlayElement(): HTMLElement {\n return this._pane;\n }\n\n /** The overlay's backdrop HTML element. */\n get backdropElement(): HTMLElement | null {\n return this._backdropElement;\n }\n\n /**\n * Wrapper around the panel element. Can be used for advanced\n * positioning where a wrapper with specific styling is\n * required around the overlay pane.\n */\n get hostElement(): HTMLElement {\n return this._host;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param portal Portal instance to which to attach the overlay.\n * @returns The portal attachment result.\n */\n attach(portal: Portal<any>): any {\n // Insert the host into the DOM before attaching the portal, otherwise\n // the animations module will skip animations on repeat attachments.\n if (!this._host.parentElement && this._previousHostParent) {\n this._previousHostParent.appendChild(this._host);\n }\n\n const attachResult = this._portalOutlet.attach(portal);\n\n if (this._positionStrategy) {\n this._positionStrategy.attach(this);\n }\n\n this._updateStackingOrder();\n this._updateElementSize();\n this._updateElementDirection();\n\n if (this._scrollStrategy) {\n this._scrollStrategy.enable();\n }\n\n // Update the position once the zone is stable so that the overlay will be fully rendered\n // before attempting to position it, as the position may depend on the size of the rendered\n // content.\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n // The overlay could've been detached before the zone has stabilized.\n if (this.hasAttached()) {\n this.updatePosition();\n }\n });\n\n // Enable pointer events for the overlay pane element.\n this._togglePointerEvents(true);\n\n if (this._config.hasBackdrop) {\n this._attachBackdrop();\n }\n\n if (this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, true);\n }\n\n // Only emit the `attachments` event once all other setup is done.\n this._attachments.next();\n\n // Track this overlay by the keyboard dispatcher\n this._keyboardDispatcher.add(this);\n\n if (this._config.disposeOnNavigation) {\n this._locationChanges = this._location.subscribe(() => this.dispose());\n }\n\n this._outsideClickDispatcher.add(this);\n\n // TODO(crisbeto): the null check is here, because the portal outlet returns `any`.\n // We should be guaranteed for the result to be `ComponentRef | EmbeddedViewRef`, but\n // `instanceof EmbeddedViewRef` doesn't appear to work at the moment.\n if (typeof attachResult?.onDestroy === 'function') {\n // In most cases we control the portal and we know when it is being detached so that\n // we can finish the disposal process. The exception is if the user passes in a custom\n // `ViewContainerRef` that isn't destroyed through the overlay API. Note that we use\n // `detach` here instead of `dispose`, because we don't know if the user intends to\n // reattach the overlay at a later point. It also has the advantage of waiting for animations.\n attachResult.onDestroy(() => {\n if (this.hasAttached()) {\n // We have to delay the `detach` call, because detaching immediately prevents\n // other destroy hooks from running. This is likely a framework bug similar to\n // https://github.com/angular/angular/issues/46119\n this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => this.detach()));\n }\n });\n }\n\n return attachResult;\n }\n\n /**\n * Detaches an overlay from a portal.\n * @returns The portal detachment result.\n */\n detach(): any {\n if (!this.hasAttached()) {\n return;\n }\n\n this.detachBackdrop();\n\n // When the overlay is detached, the pane element should disable pointer events.\n // This is necessary because otherwise the pane element will cover the page and disable\n // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n this._togglePointerEvents(false);\n\n if (this._positionStrategy && this._positionStrategy.detach) {\n this._positionStrategy.detach();\n }\n\n if (this._scrollStrategy) {\n this._scrollStrategy.disable();\n }\n\n const detachmentResult = this._portalOutlet.detach();\n\n // Only emit after everything is detached.\n this._detachments.next();\n\n // Remove this overlay from keyboard dispatcher tracking.\n this._keyboardDispatcher.remove(this);\n\n // Keeping the host element in the DOM can cause scroll jank, because it still gets\n // rendered, even though it's transparent and unclickable which is why we remove it.\n this._detachContentWhenStable();\n this._locationChanges.unsubscribe();\n this._outsideClickDispatcher.remove(this);\n return detachmentResult;\n }\n\n /** Cleans up the overlay from the DOM. */\n dispose(): void {\n const isAttached = this.hasAttached();\n\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n\n this._disposeScrollStrategy();\n this._disposeBackdrop(this._backdropElement);\n this._locationChanges.unsubscribe();\n this._keyboardDispatcher.remove(this);\n this._portalOutlet.dispose();\n this._attachments.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n this._outsidePointerEvents.complete();\n this._outsideClickDispatcher.remove(this);\n this._host?.remove();\n\n this._previousHostParent = this._pane = this._host = null!;\n\n if (isAttached) {\n this._detachments.next();\n }\n\n this._detachments.complete();\n }\n\n /** Whether the overlay has attached content. */\n hasAttached(): boolean {\n return this._portalOutlet.hasAttached();\n }\n\n /** Gets an observable that emits when the backdrop has been clicked. */\n backdropClick(): Observable<MouseEvent> {\n return this._backdropClick;\n }\n\n /** Gets an observable that emits when the overlay has been attached. */\n attachments(): Observable<void> {\n return this._attachments;\n }\n\n /** Gets an observable that emits when the overlay has been detached. */\n detachments(): Observable<void> {\n return this._detachments;\n }\n\n /** Gets an observable of keydown events targeted to this overlay. */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._keydownEvents;\n }\n\n /** Gets an observable of pointer events targeted outside this overlay. */\n outsidePointerEvents(): Observable<MouseEvent> {\n return this._outsidePointerEvents;\n }\n\n /** Gets the current overlay configuration, which is immutable. */\n getConfig(): OverlayConfig {\n return this._config;\n }\n\n /** Updates the position of the overlay based on the position strategy. */\n updatePosition(): void {\n if (this._positionStrategy) {\n this._positionStrategy.apply();\n }\n }\n\n /** Switches to a new position strategy and updates the overlay position. */\n updatePositionStrategy(strategy: PositionStrategy): void {\n if (strategy === this._positionStrategy) {\n return;\n }\n\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n\n this._positionStrategy = strategy;\n\n if (this.hasAttached()) {\n strategy.attach(this);\n this.updatePosition();\n }\n }\n\n /** Update the size properties of the overlay. */\n updateSize(sizeConfig: OverlaySizeConfig): void {\n this._config = {...this._config, ...sizeConfig};\n this._updateElementSize();\n }\n\n /** Sets the LTR/RTL direction for the overlay. */\n setDirection(dir: Direction | Directionality): void {\n this._config = {...this._config, direction: dir};\n this._updateElementDirection();\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): void {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, true);\n }\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): void {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, false);\n }\n }\n\n /**\n * Returns the layout direction of the overlay panel.\n */\n getDirection(): Direction {\n const direction = this._config.direction;\n\n if (!direction) {\n return 'ltr';\n }\n\n return typeof direction === 'string' ? direction : direction.value;\n }\n\n /** Switches to a new scroll strategy. */\n updateScrollStrategy(strategy: ScrollStrategy): void {\n if (strategy === this._scrollStrategy) {\n return;\n }\n\n this._disposeScrollStrategy();\n this._scrollStrategy = strategy;\n\n if (this.hasAttached()) {\n strategy.attach(this);\n strategy.enable();\n }\n }\n\n /** Updates the text direction of the overlay panel. */\n private _updateElementDirection() {\n this._host.setAttribute('dir', this.getDirection());\n }\n\n /** Updates the size of the overlay element based on the overlay config. */\n private _updateElementSize() {\n if (!this._pane) {\n return;\n }\n\n const style = this._pane.style;\n\n style.width = coerceCssPixelValue(this._config.width);\n style.height = coerceCssPixelValue(this._config.height);\n style.minWidth = coerceCssPixelValue(this._config.minWidth);\n style.minHeight = coerceCssPixelValue(this._config.minHeight);\n style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n }\n\n /** Toggles the pointer events for the overlay pane element. */\n private _togglePointerEvents(enablePointer: boolean) {\n this._pane.style.pointerEvents = enablePointer ? '' : 'none';\n }\n\n /** Attaches a backdrop for this overlay. */\n private _attachBackdrop() {\n const showingClass = 'cdk-overlay-backdrop-showing';\n\n this._backdropElement = this._document.createElement('div');\n this._backdropElement.classList.add('cdk-overlay-backdrop');\n\n if (this._animationsDisabled) {\n this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation');\n }\n\n if (this._config.backdropClass) {\n this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n }\n\n // Insert the backdrop before the pane in the DOM order,\n // in order to handle stacked overlays properly.\n this._host.parentElement!.insertBefore(this._backdropElement, this._host);\n\n // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n // action desired when such a click occurs (usually closing the overlay).\n this._backdropElement.addEventListener('click', this._backdropClickHandler);\n\n // Add class to fade-in the backdrop after one frame.\n if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n if (this._backdropElement) {\n this._backdropElement.classList.add(showingClass);\n }\n });\n });\n } else {\n this._backdropElement.classList.add(showingClass);\n }\n }\n\n /**\n * Updates the stacking order of the element, moving it to the top if necessary.\n * This is required in cases where one overlay was detached, while another one,\n * that should be behind it, was destroyed. The next time both of them are opened,\n * the stacking will be wrong, because the detached element's pane will still be\n * in its original DOM position.\n */\n private _updateStackingOrder() {\n if (this._host.nextSibling) {\n this._host.parentNode!.appendChild(this._host);\n }\n }\n\n /** Detaches the backdrop (if any) associated with the overlay. */\n detachBackdrop(): void {\n const backdropToDetach = this._backdropElement;\n\n if (!backdropToDetach) {\n return;\n }\n\n if (this._animationsDisabled) {\n this._disposeBackdrop(backdropToDetach);\n return;\n }\n\n backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n\n this._ngZone.runOutsideAngular(() => {\n backdropToDetach!.addEventListener('transitionend', this._backdropTransitionendHandler);\n });\n\n // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n // In this case we make it unclickable and we try to remove it after a delay.\n backdropToDetach.style.pointerEvents = 'none';\n\n // Run this outside the Angular zone because there's nothing that Angular cares about.\n // If it were to run inside the Angular zone, every test that used Overlay would have to be\n // either async or fakeAsync.\n this._backdropTimeout = this._ngZone.runOutsideAngular(() =>\n setTimeout(() => {\n this._disposeBackdrop(backdropToDetach);\n }, 500),\n );\n }\n\n /** Toggles a single CSS class or an array of classes on an element. */\n private _toggleClasses(element: HTMLElement, cssClasses: string | string[], isAdd: boolean) {\n const classes = coerceArray(cssClasses || []).filter(c => !!c);\n\n if (classes.length) {\n isAdd ? element.classList.add(...classes) : element.classList.remove(...classes);\n }\n }\n\n /** Detaches the overlay content next time the zone stabilizes. */\n private _detachContentWhenStable() {\n // Normally we wouldn't have to explicitly run this outside the `NgZone`, however\n // if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will\n // be patched to run inside the zone, which will throw us into an infinite loop.\n this._ngZone.runOutsideAngular(() => {\n // We can't remove the host here immediately, because the overlay pane's content\n // might still be animating. This stream helps us avoid interrupting the animation\n // by waiting for the pane to become empty.\n const subscription = this._ngZone.onStable\n .pipe(takeUntil(merge(this._attachments, this._detachments)))\n .subscribe(() => {\n // Needs a couple of checks for the pane and host, because\n // they may have been removed by the time the zone stabilizes.\n if (!this._pane || !this._host || this._pane.children.length === 0) {\n if (this._pane && this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, false);\n }\n\n if (this._host && this._host.parentElement) {\n this._previousHostParent = this._host.parentElement;\n this._host.remove();\n }\n\n subscription.unsubscribe();\n }\n });\n });\n }\n\n /** Disposes of a scroll strategy. */\n private _disposeScrollStrategy() {\n const scrollStrategy = this._scrollStrategy;\n\n if (scrollStrategy) {\n scrollStrategy.disable();\n\n if (scrollStrategy.detach) {\n scrollStrategy.detach();\n }\n }\n }\n\n /** Removes a backdrop element from the DOM. */\n private _disposeBackdrop(backdrop: HTMLElement | null) {\n if (backdrop) {\n backdrop.removeEventListener('click', this._backdropClickHandler);\n backdrop.removeEventListener('transitionend', this._backdropTransitionendHandler);\n backdrop.remove();\n\n // It is possible that a new portal has been attached to this overlay since we started\n // removing the backdrop. If that is the case, only clear the backdrop reference if it\n // is still the same instance that we started to remove.\n if (this._backdropElement === backdrop) {\n this._backdropElement = null;\n }\n }\n\n if (this._backdropTimeout) {\n clearTimeout(this._backdropTimeout);\n this._backdropTimeout = undefined;\n }\n }\n}\n\n/** Size properties for an overlay. */\nexport interface OverlaySizeConfig {\n width?: number | string;\n height?: number | string;\n minWidth?: number | string;\n minHeight?: number | string;\n maxWidth?: number | string;\n maxHeight?: number | string;\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\nimport {PositionStrategy} from './position-strategy';\nimport {ElementRef} from '@angular/core';\nimport {ViewportRuler, CdkScrollable, ViewportScrollPosition} from '@angular/cdk/scrolling';\nimport {\n ConnectedOverlayPositionChange,\n ConnectionPositionPair,\n ScrollingVisibility,\n validateHorizontalPosition,\n validateVerticalPosition,\n} from './connected-position';\nimport {Observable, Subscription, Subject} from 'rxjs';\nimport {isElementScrolledOutsideView, isElementClippedByScrolling} from './scroll-clip';\nimport {coerceCssPixelValue, coerceArray} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {OverlayContainer} from '../overlay-container';\nimport {OverlayRef} from '../overlay-ref';\n\n// TODO: refactor clipping detection into a separate thing (part of scrolling module)\n// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.\n\n/** Class to be added to the overlay bounding box. */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/** Possible values that can be set as the origin of a FlexibleConnectedPositionStrategy. */\nexport type FlexibleConnectedPositionStrategyOrigin =\n | ElementRef\n | Element\n | (Point & {\n width?: number;\n height?: number;\n });\n\n/** Equivalent of `DOMRect` without some of the properties we don't care about. */\ntype Dimensions = Omit<DOMRect, 'x' | 'y' | 'toJSON'>;\n\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nexport class FlexibleConnectedPositionStrategy implements PositionStrategy {\n /** The overlay to which this strategy is attached. */\n private _overlayRef: OverlayRef;\n\n /** Whether we're performing the very first positioning of the overlay. */\n private _isInitialRender: boolean;\n\n /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */\n private _lastBoundingBoxSize = {width: 0, height: 0};\n\n /** Whether the overlay was pushed in a previous positioning. */\n private _isPushed = false;\n\n /** Whether the overlay can be pushed on-screen on the initial open. */\n private _canPush = true;\n\n /** Whether the overlay can grow via flexible width/height after the initial open. */\n private _growAfterOpen = false;\n\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n private _hasFlexibleDimensions = true;\n\n /** Whether the overlay position is locked. */\n private _positionLocked = false;\n\n /** Cached origin dimensions */\n private _originRect: Dimensions;\n\n /** Cached overlay dimensions */\n private _overlayRect: Dimensions;\n\n /** Cached viewport dimensions */\n private _viewportRect: Dimensions;\n\n /** Cached container dimensions */\n private _containerRect: Dimensions;\n\n /** Amount of space that must be maintained between the overlay and the edge of the viewport. */\n private _viewportMargin = 0;\n\n /** The Scrollable containers used to check scrollable view properties on position change. */\n private _scrollables: CdkScrollable[] = [];\n\n /** Ordered list of preferred positions, from most to least desirable. */\n _preferredPositions: ConnectionPositionPair[] = [];\n\n /** The origin element against which the overlay will be positioned. */\n _origin: FlexibleConnectedPositionStrategyOrigin;\n\n /** The overlay pane element. */\n private _pane: HTMLElement;\n\n /** Whether the strategy has been disposed of already. */\n private _isDisposed: boolean;\n\n /**\n * Parent element for the overlay panel used to constrain the overlay panel's size to fit\n * within the viewport.\n */\n private _boundingBox: HTMLElement | null;\n\n /** The last position to have been calculated as the best fit position. */\n private _lastPosition: ConnectedPosition | null;\n\n /** The last calculated scroll visibility. Only tracked */\n private _lastScrollVisibility: ScrollingVisibility | null;\n\n /** Subject that emits whenever the position changes. */\n private readonly _positionChanges = new Subject<ConnectedOverlayPositionChange>();\n\n /** Subscription to viewport size changes. */\n private _resizeSubscription = Subscription.EMPTY;\n\n /** Default offset for the overlay along the x axis. */\n private _offsetX = 0;\n\n /** Default offset for the overlay along the y axis. */\n private _offsetY = 0;\n\n /** Selector to be used when finding the elements on which to set the transform origin. */\n private _transformOriginSelector: string;\n\n /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */\n private _appliedPanelClasses: string[] = [];\n\n /** Amount by which the overlay was pushed in each axis during the last time it was positioned. */\n private _previousPushAmount: {x: number; y: number} | null;\n\n /** Observable sequence of position changes. */\n positionChanges: Observable<ConnectedOverlayPositionChange> = this._positionChanges;\n\n /** Ordered list of preferred positions, from most to least desirable. */\n get positions(): ConnectionPositionPair[] {\n return this._preferredPositions;\n }\n\n constructor(\n connectedTo: FlexibleConnectedPositionStrategyOrigin,\n private _viewportRuler: ViewportRuler,\n private _document: Document,\n private _platform: Platform,\n private _overlayContainer: OverlayContainer,\n ) {\n this.setOrigin(connectedTo);\n }\n\n /** Attaches this position strategy to an overlay. */\n attach(overlayRef: OverlayRef): void {\n if (\n this._overlayRef &&\n overlayRef !== this._overlayRef &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throw Error('This position strategy is already attached to an overlay');\n }\n\n this._validatePositions();\n\n overlayRef.hostElement.classList.add(boundingBoxClass);\n\n this._overlayRef = overlayRef;\n this._boundingBox = overlayRef.hostElement;\n this._pane = overlayRef.overlayElement;\n this._isDisposed = false;\n this._isInitialRender = true;\n this._lastPosition = null;\n this._resizeSubscription.unsubscribe();\n this._resizeSubscription = this._viewportRuler.change().subscribe(() => {\n // When the window is resized, we want to trigger the next reposition as if it\n // was an initial render, in order for the strategy to pick a new optimal position,\n // otherwise position locking will cause it to stay at the old one.\n this._isInitialRender = true;\n this.apply();\n });\n }\n\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satisfies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * @docs-private\n */\n apply(): void {\n // We shouldn't do anything if the strategy was disposed or we're on the server.\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n\n // If the position has been applied already (e.g. when the overlay was opened) and the\n // consumer opted into locking in the position, re-use the old position, in order to\n // prevent the overlay from jumping around.\n if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n this.reapplyLastPosition();\n return;\n }\n\n this._clearPanelClasses();\n this._resetOverlayElementStyles();\n this._resetBoundingBoxStyles();\n\n // We need the bounding rects for the origin, the overlay and the container to determine how to position\n // the overlay relative to the origin.\n // We use the viewport rect to determine whether a position would go off-screen.\n this._viewportRect = this._getNarrowedViewportRect();\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n\n const originRect = this._originRect;\n const overlayRect = this._overlayRect;\n const viewportRect = this._viewportRect;\n const containerRect = this._containerRect;\n\n // Positions where the overlay will fit with flexible dimensions.\n const flexibleFits: FlexibleFit[] = [];\n\n // Fallback if none of the preferred positions fit within the viewport.\n let fallback: FallbackPosition | undefined;\n\n // Go through each of the preferred positions looking for a good fit.\n // If a good fit is found, it will be applied immediately.\n for (let pos of this._preferredPositions) {\n // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n let originPoint = this._getOriginPoint(originRect, containerRect, pos);\n\n // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n // overlay in this position. We use the top-left corner for calculations and later translate\n // this into an appropriate (top, left, bottom, right) style.\n let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n\n // Calculate how well the overlay would fit into the viewport with this point.\n let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n\n // If the overlay, without any further work, fits into the viewport, use this position.\n if (overlayFit.isCompletelyWithinViewport) {\n this._isPushed = false;\n this._applyPosition(pos, originPoint);\n return;\n }\n\n // If the overlay has flexible dimensions, we can use this position\n // so long as there's enough space for the minimum dimensions.\n if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n // Save positions where the overlay will fit with flexible dimensions. We will use these\n // if none of the positions fit *without* flexible dimensions.\n flexibleFits.push({\n position: pos,\n origin: originPoint,\n overlayRect,\n boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos),\n });\n\n continue;\n }\n\n // If the current preferred position does not fit on the screen, remember the position\n // if it has more visible area on-screen than we've seen and move onto the next preferred\n // position.\n if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n fallback = {overlayFit, overlayPoint, originPoint, position: pos, overlayRect};\n }\n }\n\n // If there are any positions where the overlay would fit with flexible dimensions, choose the\n // one that has the greatest area available modified by the position's weight\n if (flexibleFits.length) {\n let bestFit: FlexibleFit | null = null;\n let bestScore = -1;\n for (const fit of flexibleFits) {\n const score =\n fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1);\n if (score > bestScore) {\n bestScore = score;\n bestFit = fit;\n }\n }\n\n this._isPushed = false;\n this._applyPosition(bestFit!.position, bestFit!.origin);\n return;\n }\n\n // When none of the preferred positions fit within the viewport, take the position\n // that went off-screen the least and attempt to push it on-screen.\n if (this._canPush) {\n // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n this._isPushed = true;\n this._applyPosition(fallback!.position, fallback!.originPoint);\n return;\n }\n\n // All options for getting the overlay within the viewport have been exhausted, so go with the\n // position that went off-screen the least.\n this._applyPosition(fallback!.position, fallback!.originPoint);\n }\n\n detach(): void {\n this._clearPanelClasses();\n this._lastPosition = null;\n this._previousPushAmount = null;\n this._resizeSubscription.unsubscribe();\n }\n\n /** Cleanup after the element gets destroyed. */\n dispose(): void {\n if (this._isDisposed) {\n return;\n }\n\n // We can't use `_resetBoundingBoxStyles` here, because it resets\n // some properties to zero, rather than removing them.\n if (this._boundingBox) {\n extendStyles(this._boundingBox.style, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n } as CSSStyleDeclaration);\n }\n\n if (this._pane) {\n this._resetOverlayElementStyles();\n }\n\n if (this._overlayRef) {\n this._overlayRef.hostElement.classList.remove(boundingBoxClass);\n }\n\n this.detach();\n this._positionChanges.complete();\n this._overlayRef = this._boundingBox = null!;\n this._isDisposed = true;\n }\n\n /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n */\n reapplyLastPosition(): void {\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n\n const lastPosition = this._lastPosition;\n\n if (lastPosition) {\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._viewportRect = this._getNarrowedViewportRect();\n this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n\n const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition);\n this._applyPosition(lastPosition, originPoint);\n } else {\n this.apply();\n }\n }\n\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n */\n withScrollableContainers(scrollables: CdkScrollable[]): this {\n this._scrollables = scrollables;\n return this;\n }\n\n /**\n * Adds new preferred positions.\n * @param positions List of positions options for this overlay.\n */\n withPositions(positions: ConnectedPosition[]): this {\n this._preferredPositions = positions;\n\n // If the last calculated position object isn't part of the positions anymore, clear\n // it in order to avoid it being picked up if the consumer tries to re-apply.\n if (positions.indexOf(this._lastPosition!) === -1) {\n this._lastPosition = null;\n }\n\n this._validatePositions();\n\n return this;\n }\n\n /**\n * Sets a minimum distance the overlay may be positioned to the edge of the viewport.\n * @param margin Required margin between the overlay and the viewport edge in pixels.\n */\n withViewportMargin(margin: number): this {\n this._viewportMargin = margin;\n return this;\n }\n\n /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n withFlexibleDimensions(flexibleDimensions = true): this {\n this._hasFlexibleDimensions = flexibleDimensions;\n return this;\n }\n\n /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n withGrowAfterOpen(growAfterOpen = true): this {\n this._growAfterOpen = growAfterOpen;\n return this;\n }\n\n /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n withPush(canPush = true): this {\n this._canPush = canPush;\n return this;\n }\n\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param isLocked Whether the overlay should locked in.\n */\n withLockedPosition(isLocked = true): this {\n this._positionLocked = isLocked;\n return this;\n }\n\n /**\n * Sets the origin, relative to which to position the overlay.\n * Using an element origin is useful for building components that need to be positioned\n * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be\n * used for cases like contextual menus which open relative to the user's pointer.\n * @param origin Reference to the new origin.\n */\n setOrigin(origin: FlexibleConnectedPositionStrategyOrigin): this {\n this._origin = origin;\n return this;\n }\n\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param offset New offset in the X axis.\n */\n withDefaultOffsetX(offset: number): this {\n this._offsetX = offset;\n return this;\n }\n\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param offset New offset in the Y axis.\n */\n withDefaultOffsetY(offset: number): this {\n this._offsetY = offset;\n return this;\n }\n\n /**\n * Configures that the position strategy should set a `transform-origin` on some elements\n * inside the overlay, depending on the current position that is being applied. This is\n * useful for the cases where the origin of an animation can change depending on the\n * alignment of the overlay.\n * @param selector CSS selector that will be used to find the target\n * elements onto which to set the transform origin.\n */\n withTransformOriginOn(selector: string): this {\n this._transformOriginSelector = selector;\n return this;\n }\n\n /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n */\n private _getOriginPoint(\n originRect: Dimensions,\n containerRect: Dimensions,\n pos: ConnectedPosition,\n ): Point {\n let x: number;\n if (pos.originX == 'center') {\n // Note: when centering we should always use the `left`\n // offset, otherwise the position will be wrong in RTL.\n x = originRect.left + originRect.width / 2;\n } else {\n const startX = this._isRtl() ? originRect.right : originRect.left;\n const endX = this._isRtl() ? originRect.left : originRect.right;\n x = pos.originX == 'start' ? startX : endX;\n }\n\n // When zooming in Safari the container rectangle contains negative values for the position\n // and we need to re-add them to the calculated coordinates.\n if (containerRect.left < 0) {\n x -= containerRect.left;\n }\n\n let y: number;\n if (pos.originY == 'center') {\n y = originRect.top + originRect.height / 2;\n } else {\n y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n }\n\n // Normally the containerRect's top value would be zero, however when the overlay is attached to an input\n // (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle\n // of the screen and to make space for the virtual keyboard. We need to account for this offset,\n // otherwise our positioning will be thrown off.\n // Additionally, when zooming in Safari this fixes the vertical position.\n if (containerRect.top < 0) {\n y -= containerRect.top;\n }\n\n return {x, y};\n }\n\n /**\n * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n * origin point to which the overlay should be connected.\n */\n private _getOverlayPoint(\n originPoint: Point,\n overlayRect: Dimensions,\n pos: ConnectedPosition,\n ): Point {\n // Calculate the (overlayStartX, overlayStartY), the start of the\n // potential overlay position relative to the origin point.\n let overlayStartX: number;\n if (pos.overlayX == 'center') {\n overlayStartX = -overlayRect.width / 2;\n } else if (pos.overlayX === 'start') {\n overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n } else {\n overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n }\n\n let overlayStartY: number;\n if (pos.overlayY == 'center') {\n overlayStartY = -overlayRect.height / 2;\n } else {\n overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n }\n\n // The (x, y) coordinates of the overlay.\n return {\n x: originPoint.x + overlayStartX,\n y: originPoint.y + overlayStartY,\n };\n }\n\n /** Gets how well an overlay at the given point will fit within the viewport. */\n private _getOverlayFit(\n point: Point,\n rawOverlayRect: Dimensions,\n viewport: Dimensions,\n position: ConnectedPosition,\n ): OverlayFit {\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n let {x, y} = point;\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n\n // Account for the offsets since they could push the overlay out of the viewport.\n if (offsetX) {\n x += offsetX;\n }\n\n if (offsetY) {\n y += offsetY;\n }\n\n // How much the overlay would overflow at this position, on each side.\n let leftOverflow = 0 - x;\n let rightOverflow = x + overlay.width - viewport.width;\n let topOverflow = 0 - y;\n let bottomOverflow = y + overlay.height - viewport.height;\n\n // Visible parts of the element on each axis.\n let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n let visibleArea = visibleWidth * visibleHeight;\n\n return {\n visibleArea,\n isCompletelyWithinViewport: overlay.width * overlay.height === visibleArea,\n fitsInViewportVertically: visibleHeight === overlay.height,\n fitsInViewportHorizontally: visibleWidth == overlay.width,\n };\n }\n\n /**\n * Whether the overlay can fit within the viewport when it may resize either its width or height.\n * @param fit How well the overlay fits in the viewport at some position.\n * @param point The (x, y) coordinates of the overlay at some position.\n * @param viewport The geometry of the viewport.\n */\n private _canFitWithFlexibleDimensions(fit: OverlayFit, point: Point, viewport: Dimensions) {\n if (this._hasFlexibleDimensions) {\n const availableHeight = viewport.bottom - point.y;\n const availableWidth = viewport.right - point.x;\n const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight);\n const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth);\n\n const verticalFit =\n fit.fitsInViewportVertically || (minHeight != null && minHeight <= availableHeight);\n const horizontalFit =\n fit.fitsInViewportHorizontally || (minWidth != null && minWidth <= availableWidth);\n\n return verticalFit && horizontalFit;\n }\n return false;\n }\n\n /**\n * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the\n * right and bottom).\n *\n * @param start Starting point from which the overlay is pushed.\n * @param rawOverlayRect Dimensions of the overlay.\n * @param scrollPosition Current viewport scroll position.\n * @returns The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n private _pushOverlayOnScreen(\n start: Point,\n rawOverlayRect: Dimensions,\n scrollPosition: ViewportScrollPosition,\n ): Point {\n // If the position is locked and we've pushed the overlay already, reuse the previous push\n // amount, rather than pushing it again. If we were to continue pushing, the element would\n // remain in the viewport, which goes against the expectations when position locking is enabled.\n if (this._previousPushAmount && this._positionLocked) {\n return {\n x: start.x + this._previousPushAmount.x,\n y: start.y + this._previousPushAmount.y,\n };\n }\n\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n const viewport = this._viewportRect;\n\n // Determine how much the overlay goes outside the viewport on each\n // side, which we'll use to decide which direction to push it.\n const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0);\n const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0);\n const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);\n\n // Amount by which to push the overlay in each axis such that it remains on-screen.\n let pushX = 0;\n let pushY = 0;\n\n // If the overlay fits completely within the bounds of the viewport, push it from whichever\n // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n // viewport and allow for the trailing end of the overlay to go out of bounds.\n if (overlay.width <= viewport.width) {\n pushX = overflowLeft || -overflowRight;\n } else {\n pushX = start.x < this._viewportMargin ? viewport.left - scrollPosition.left - start.x : 0;\n }\n\n if (overlay.height <= viewport.height) {\n pushY = overflowTop || -overflowBottom;\n } else {\n pushY = start.y < this._viewportMargin ? viewport.top - scrollPosition.top - start.y : 0;\n }\n\n this._previousPushAmount = {x: pushX, y: pushY};\n\n return {\n x: start.x + pushX,\n y: start.y + pushY,\n };\n }\n\n /**\n * Applies a computed position to the overlay and emits a position change.\n * @param position The position preference\n * @param originPoint The point on the origin element where the overlay is connected.\n */\n private _applyPosition(position: ConnectedPosition, originPoint: Point) {\n this._setTransformOrigin(position);\n this._setOverlayElementStyles(originPoint, position);\n this._setBoundingBoxStyles(originPoint, position);\n\n if (position.panelClass) {\n this._addPanelClasses(position.panelClass);\n }\n\n // Notify that the position has been changed along with its change properties.\n // We only emit if we've got any subscriptions, because the scroll visibility\n // calculations can be somewhat expensive.\n if (this._positionChanges.observers.length) {\n const scrollVisibility = this._getScrollVisibility();\n\n // We're recalculating on scroll, but we only want to emit if anything\n // changed since downstream code might be hitting the `NgZone`.\n if (\n position !== this._lastPosition ||\n !this._lastScrollVisibility ||\n !compareScrollVisibility(this._lastScrollVisibility, scrollVisibility)\n ) {\n const changeEvent = new ConnectedOverlayPositionChange(position, scrollVisibility);\n this._positionChanges.next(changeEvent);\n }\n\n this._lastScrollVisibility = scrollVisibility;\n }\n\n // Save the last connected position in case the position needs to be re-calculated.\n this._lastPosition = position;\n this._isInitialRender = false;\n }\n\n /** Sets the transform origin based on the configured selector and the passed-in position. */\n private _setTransformOrigin(position: ConnectedPosition) {\n if (!this._transformOriginSelector) {\n return;\n }\n\n const elements: NodeListOf<HTMLElement> = this._boundingBox!.querySelectorAll(\n this._transformOriginSelector,\n );\n let xOrigin: 'left' | 'right' | 'center';\n let yOrigin: 'top' | 'bottom' | 'center' = position.overlayY;\n\n if (position.overlayX === 'center') {\n xOrigin = 'center';\n } else if (this._isRtl()) {\n xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n } else {\n xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n }\n\n for (let i = 0; i < elements.length; i++) {\n elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n }\n }\n\n /**\n * Gets the position and size of the overlay's sizing container.\n *\n * This method does no measuring and applies no styles so that we can cheaply compute the\n * bounds for all positions and choose the best fit based on these results.\n */\n private _calculateBoundingBoxRect(origin: Point, position: ConnectedPosition): BoundingBoxRect {\n const viewport = this._viewportRect;\n const isRtl = this._isRtl();\n let height: number, top: number, bottom: number;\n\n if (position.overlayY === 'top') {\n // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n top = origin.y;\n height = viewport.height - top + this._viewportMargin;\n } else if (position.overlayY === 'bottom') {\n // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n // the viewport margin back in, because the viewport rect is narrowed down to remove the\n // margin, whereas the `origin` position is calculated based on its `DOMRect`.\n bottom = viewport.height - origin.y + this._viewportMargin * 2;\n height = viewport.height - bottom + this._viewportMargin;\n } else {\n // If neither top nor bottom, it means that the overlay is vertically centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.bottom - origin.y` and\n // `origin.y - viewport.top`.\n const smallestDistanceToViewportEdge = Math.min(\n viewport.bottom - origin.y + viewport.top,\n origin.y,\n );\n\n const previousHeight = this._lastBoundingBoxSize.height;\n\n height = smallestDistanceToViewportEdge * 2;\n top = origin.y - smallestDistanceToViewportEdge;\n\n if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n top = origin.y - previousHeight / 2;\n }\n }\n\n // The overlay is opening 'right-ward' (the content flows to the right).\n const isBoundedByRightViewportEdge =\n (position.overlayX === 'start' && !isRtl) || (position.overlayX === 'end' && isRtl);\n\n // The overlay is opening 'left-ward' (the content flows to the left).\n const isBoundedByLeftViewportEdge =\n (position.overlayX === 'end' && !isRtl) || (position.overlayX === 'start' && isRtl);\n\n let width: number, left: number, right: number;\n\n if (isBoundedByLeftViewportEdge) {\n right = viewport.width - origin.x + this._viewportMargin * 2;\n width = origin.x - this._viewportMargin;\n } else if (isBoundedByRightViewportEdge) {\n left = origin.x;\n width = viewport.right - origin.x;\n } else {\n // If neither start nor end, it means that the overlay is horizontally centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.right - origin.x` and\n // `origin.x - viewport.left`.\n const smallestDistanceToViewportEdge = Math.min(\n viewport.right - origin.x + viewport.left,\n origin.x,\n );\n const previousWidth = this._lastBoundingBoxSize.width;\n\n width = smallestDistanceToViewportEdge * 2;\n left = origin.x - smallestDistanceToViewportEdge;\n\n if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n left = origin.x - previousWidth / 2;\n }\n }\n\n return {top: top!, left: left!, bottom: bottom!, right: right!, width, height};\n }\n\n /**\n * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n * origin's connection point and stretches to the bounds of the viewport.\n *\n * @param origin The point on the origin element where the overlay is connected.\n * @param position The position preference\n */\n private _setBoundingBoxStyles(origin: Point, position: ConnectedPosition): void {\n const boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n\n // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n // when applying a new size.\n if (!this._isInitialRender && !this._growAfterOpen) {\n boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n }\n\n const styles = {} as CSSStyleDeclaration;\n\n if (this._hasExactPosition()) {\n styles.top = styles.left = '0';\n styles.bottom = styles.right = styles.maxHeight = styles.maxWidth = '';\n styles.width = styles.height = '100%';\n } else {\n const maxHeight = this._overlayRef.getConfig().maxHeight;\n const maxWidth = this._overlayRef.getConfig().maxWidth;\n\n styles.height = coerceCssPixelValue(boundingBoxRect.height);\n styles.top = coerceCssPixelValue(boundingBoxRect.top);\n styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom);\n styles.width = coerceCssPixelValue(boundingBoxRect.width);\n styles.left = coerceCssPixelValue(boundingBoxRect.left);\n styles.right = coerceCssPixelValue(boundingBoxRect.right);\n\n // Push the pane content towards the proper direction.\n if (position.overlayX === 'center') {\n styles.alignItems = 'center';\n } else {\n styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n }\n\n if (position.overlayY === 'center') {\n styles.justifyContent = 'center';\n } else {\n styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n }\n\n if (maxHeight) {\n styles.maxHeight = coerceCssPixelValue(maxHeight);\n }\n\n if (maxWidth) {\n styles.maxWidth = coerceCssPixelValue(maxWidth);\n }\n }\n\n this._lastBoundingBoxSize = boundingBoxRect;\n\n extendStyles(this._boundingBox!.style, styles);\n }\n\n /** Resets the styles for the bounding box so that a new positioning can be computed. */\n private _resetBoundingBoxStyles() {\n extendStyles(this._boundingBox!.style, {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n } as CSSStyleDeclaration);\n }\n\n /** Resets the styles for the overlay pane so that a new positioning can be computed. */\n private _resetOverlayElementStyles() {\n extendStyles(this._pane.style, {\n top: '',\n left: '',\n bottom: '',\n right: '',\n position: '',\n transform: '',\n } as CSSStyleDeclaration);\n }\n\n /** Sets positioning styles to the overlay element. */\n private _setOverlayElementStyles(originPoint: Point, position: ConnectedPosition): void {\n const styles = {} as CSSStyleDeclaration;\n const hasExactPosition = this._hasExactPosition();\n const hasFlexibleDimensions = this._hasFlexibleDimensions;\n const config = this._overlayRef.getConfig();\n\n if (hasExactPosition) {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition));\n extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition));\n } else {\n styles.position = 'static';\n }\n\n // Use a transform to apply the offsets. We do this because the `center` positions rely on\n // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n // off the position. We also can't use margins, because they won't have an effect in some\n // cases where the element doesn't have anything to \"push off of\". Finally, this works\n // better both with flexible and non-flexible positioning.\n let transformString = '';\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n\n if (offsetX) {\n transformString += `translateX(${offsetX}px) `;\n }\n\n if (offsetY) {\n transformString += `translateY(${offsetY}px)`;\n }\n\n styles.transform = transformString.trim();\n\n // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n // Note that this doesn't apply when we have an exact position, in which case we do want to\n // apply them because they'll be cleared from the bounding box.\n if (config.maxHeight) {\n if (hasExactPosition) {\n styles.maxHeight = coerceCssPixelValue(config.maxHeight);\n } else if (hasFlexibleDimensions) {\n styles.maxHeight = '';\n }\n }\n\n if (config.maxWidth) {\n if (hasExactPosition) {\n styles.maxWidth = coerceCssPixelValue(config.maxWidth);\n } else if (hasFlexibleDimensions) {\n styles.maxWidth = '';\n }\n }\n\n extendStyles(this._pane.style, styles);\n }\n\n /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */\n private _getExactOverlayY(\n position: ConnectedPosition,\n originPoint: Point,\n scrollPosition: ViewportScrollPosition,\n ) {\n // Reset any existing styles. This is necessary in case the\n // preferred position has changed since the last `apply`.\n let styles = {top: '', bottom: ''} as CSSStyleDeclaration;\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n\n // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n // above or below the origin and the direction in which the element will expand.\n if (position.overlayY === 'bottom') {\n // When using `bottom`, we adjust the y position such that it is the distance\n // from the bottom of the viewport rather than the top.\n const documentHeight = this._document.documentElement!.clientHeight;\n styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;\n } else {\n styles.top = coerceCssPixelValue(overlayPoint.y);\n }\n\n return styles;\n }\n\n /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */\n private _getExactOverlayX(\n position: ConnectedPosition,\n originPoint: Point,\n scrollPosition: ViewportScrollPosition,\n ) {\n // Reset any existing styles. This is necessary in case the preferred position has\n // changed since the last `apply`.\n let styles = {left: '', right: ''} as CSSStyleDeclaration;\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n\n // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n // or \"after\" the origin, which determines the direction in which the element will expand.\n // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n // page is in RTL or LTR.\n let horizontalStyleProperty: 'left' | 'right';\n\n if (this._isRtl()) {\n horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n } else {\n horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n }\n\n // When we're setting `right`, we adjust the x position such that it is the distance\n // from the right edge of the viewport rather than the left edge.\n if (horizontalStyleProperty === 'right') {\n const documentWidth = this._document.documentElement!.clientWidth;\n styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;\n } else {\n styles.left = coerceCssPixelValue(overlayPoint.x);\n }\n\n return styles;\n }\n\n /**\n * Gets the view properties of the trigger and overlay, including whether they are clipped\n * or completely outside the view of any of the strategy's scrollables.\n */\n private _getScrollVisibility(): ScrollingVisibility {\n // Note: needs fresh rects since the position could've changed.\n const originBounds = this._getOriginRect();\n const overlayBounds = this._pane.getBoundingClientRect();\n\n // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n // every time, we should be able to use the scrollTop of the containers if the size of those\n // containers hasn't changed.\n const scrollContainerBounds = this._scrollables.map(scrollable => {\n return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n });\n\n return {\n isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n };\n }\n\n /** Subtracts the amount that an element is overflowing on an axis from its length. */\n private _subtractOverflows(length: number, ...overflows: number[]): number {\n return overflows.reduce((currentValue: number, currentOverflow: number) => {\n return currentValue - Math.max(currentOverflow, 0);\n }, length);\n }\n\n /** Narrows the given viewport rect by the current _viewportMargin. */\n private _getNarrowedViewportRect(): Dimensions {\n // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n // and `innerHeight` that do. This is necessary, because the overlay container uses\n // 100% `width` and `height` which don't include the scrollbar either.\n const width = this._document.documentElement!.clientWidth;\n const height = this._document.documentElement!.clientHeight;\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n return {\n top: scrollPosition.top + this._viewportMargin,\n left: scrollPosition.left + this._viewportMargin,\n right: scrollPosition.left + width - this._viewportMargin,\n bottom: scrollPosition.top + height - this._viewportMargin,\n width: width - 2 * this._viewportMargin,\n height: height - 2 * this._viewportMargin,\n };\n }\n\n /** Whether the we're dealing with an RTL context */\n private _isRtl() {\n return this._overlayRef.getDirection() === 'rtl';\n }\n\n /** Determines whether the overlay uses exact or flexible positioning. */\n private _hasExactPosition() {\n return !this._hasFlexibleDimensions || this._isPushed;\n }\n\n /** Retrieves the offset of a position along the x or y axis. */\n private _getOffset(position: ConnectedPosition, axis: 'x' | 'y') {\n if (axis === 'x') {\n // We don't do something like `position['offset' + axis]` in\n // order to avoid breaking minifiers that rename properties.\n return position.offsetX == null ? this._offsetX : position.offsetX;\n }\n\n return position.offsetY == null ? this._offsetY : position.offsetY;\n }\n\n /** Validates that the current position match the expected values. */\n private _validatePositions(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._preferredPositions.length) {\n throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n }\n\n // TODO(crisbeto): remove these once Angular's template type\n // checking is advanced enough to catch these cases.\n this._preferredPositions.forEach(pair => {\n validateHorizontalPosition('originX', pair.originX);\n validateVerticalPosition('originY', pair.originY);\n validateHorizontalPosition('overlayX', pair.overlayX);\n validateVerticalPosition('overlayY', pair.overlayY);\n });\n }\n }\n\n /** Adds a single CSS class or an array of classes on the overlay panel. */\n private _addPanelClasses(cssClasses: string | string[]) {\n if (this._pane) {\n coerceArray(cssClasses).forEach(cssClass => {\n if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) {\n this._appliedPanelClasses.push(cssClass);\n this._pane.classList.add(cssClass);\n }\n });\n }\n }\n\n /** Clears the classes that the position strategy has applied from the overlay panel. */\n private _clearPanelClasses() {\n if (this._pane) {\n this._appliedPanelClasses.forEach(cssClass => {\n this._pane.classList.remove(cssClass);\n });\n this._appliedPanelClasses = [];\n }\n }\n\n /** Returns the DOMRect of the current origin. */\n private _getOriginRect(): Dimensions {\n const origin = this._origin;\n\n if (origin instanceof ElementRef) {\n return origin.nativeElement.getBoundingClientRect();\n }\n\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n\n const width = origin.width || 0;\n const height = origin.height || 0;\n\n // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width,\n };\n }\n}\n\n/** A simple (x, y) coordinate. */\ninterface Point {\n x: number;\n y: number;\n}\n\n/** Record of measurements for how an overlay (at a given position) fits into the viewport. */\ninterface OverlayFit {\n /** Whether the overlay fits completely in the viewport. */\n isCompletelyWithinViewport: boolean;\n\n /** Whether the overlay fits in the viewport on the y-axis. */\n fitsInViewportVertically: boolean;\n\n /** Whether the overlay fits in the viewport on the x-axis. */\n fitsInViewportHorizontally: boolean;\n\n /** The total visible area (in px^2) of the overlay inside the viewport. */\n visibleArea: number;\n}\n\n/** Record of the measurements determining whether an overlay will fit in a specific position. */\ninterface FallbackPosition {\n position: ConnectedPosition;\n originPoint: Point;\n overlayPoint: Point;\n overlayFit: OverlayFit;\n overlayRect: Dimensions;\n}\n\n/** Position and size of the overlay sizing wrapper for a specific position. */\ninterface BoundingBoxRect {\n top: number;\n left: number;\n bottom: number;\n right: number;\n height: number;\n width: number;\n}\n\n/** Record of measures determining how well a given position will fit with flexible dimensions. */\ninterface FlexibleFit {\n position: ConnectedPosition;\n origin: Point;\n overlayRect: Dimensions;\n boundingBoxRect: BoundingBoxRect;\n}\n\n/** A connected position as specified by the user. */\nexport interface ConnectedPosition {\n originX: 'start' | 'center' | 'end';\n originY: 'top' | 'center' | 'bottom';\n\n overlayX: 'start' | 'center' | 'end';\n overlayY: 'top' | 'center' | 'bottom';\n\n weight?: number;\n offsetX?: number;\n offsetY?: number;\n panelClass?: string | string[];\n}\n\n/** Shallow-extends a stylesheet object with another stylesheet object. */\nfunction extendStyles(\n destination: CSSStyleDeclaration,\n source: CSSStyleDeclaration,\n): CSSStyleDeclaration {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = source[key];\n }\n }\n\n return destination;\n}\n\n/**\n * Extracts the pixel value as a number from a value, if it's a number\n * or a CSS pixel string (e.g. `1337px`). Otherwise returns null.\n */\nfunction getPixelValue(input: number | string | null | undefined): number | null {\n if (typeof input !== 'number' && input != null) {\n const [value, units] = input.split(cssUnitPattern);\n return !units || units === 'px' ? parseFloat(value) : null;\n }\n\n return input || null;\n}\n\n/**\n * Gets a version of an element's bounding `DOMRect` where all the values are rounded down to\n * the nearest pixel. This allows us to account for the cases where there may be sub-pixel\n * deviations in the `DOMRect` returned by the browser (e.g. when zoomed in with a percentage\n * size, see #21350).\n */\nfunction getRoundedBoundingClientRect(clientRect: Dimensions): Dimensions {\n return {\n top: Math.floor(clientRect.top),\n right: Math.floor(clientRect.right),\n bottom: Math.floor(clientRect.bottom),\n left: Math.floor(clientRect.left),\n width: Math.floor(clientRect.width),\n height: Math.floor(clientRect.height),\n };\n}\n\n/** Returns whether two `ScrollingVisibility` objects are identical. */\nfunction compareScrollVisibility(a: ScrollingVisibility, b: ScrollingVisibility): boolean {\n if (a === b) {\n return true;\n }\n\n return (\n a.isOriginClipped === b.isOriginClipped &&\n a.isOriginOutsideView === b.isOriginOutsideView &&\n a.isOverlayClipped === b.isOverlayClipped &&\n a.isOverlayOutsideView === b.isOverlayOutsideView\n );\n}\n\nexport const STANDARD_DROPDOWN_BELOW_POSITIONS: ConnectedPosition[] = [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},\n];\n\nexport const STANDARD_DROPDOWN_ADJACENT_POSITIONS: ConnectedPosition[] = [\n {originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top'},\n {originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom'},\n {originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top'},\n {originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom'},\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\nimport {OverlayRef} from '../overlay-ref';\nimport {PositionStrategy} from './position-strategy';\n\n/** Class to be added to the overlay pane wrapper. */\nconst wrapperClass = 'cdk-global-overlay-wrapper';\n\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nexport class GlobalPositionStrategy implements PositionStrategy {\n /** The overlay to which this strategy is attached. */\n private _overlayRef: OverlayRef;\n private _cssPosition = 'static';\n private _topOffset = '';\n private _bottomOffset = '';\n private _alignItems = '';\n private _xPosition = '';\n private _xOffset = '';\n private _width = '';\n private _height = '';\n private _isDisposed = false;\n\n attach(overlayRef: OverlayRef): void {\n const config = overlayRef.getConfig();\n\n this._overlayRef = overlayRef;\n\n if (this._width && !config.width) {\n overlayRef.updateSize({width: this._width});\n }\n\n if (this._height && !config.height) {\n overlayRef.updateSize({height: this._height});\n }\n\n overlayRef.hostElement.classList.add(wrapperClass);\n this._isDisposed = false;\n }\n\n /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param value New top offset.\n */\n top(value: string = ''): this {\n this._bottomOffset = '';\n this._topOffset = value;\n this._alignItems = 'flex-start';\n return this;\n }\n\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param value New left offset.\n */\n left(value: string = ''): this {\n this._xOffset = value;\n this._xPosition = 'left';\n return this;\n }\n\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param value New bottom offset.\n */\n bottom(value: string = ''): this {\n this._topOffset = '';\n this._bottomOffset = value;\n this._alignItems = 'flex-end';\n return this;\n }\n\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param value New right offset.\n */\n right(value: string = ''): this {\n this._xOffset = value;\n this._xPosition = 'right';\n return this;\n }\n\n /**\n * Sets the overlay to the start of the viewport, depending on the overlay direction.\n * This will be to the left in LTR layouts and to the right in RTL.\n * @param offset Offset from the edge of the screen.\n */\n start(value: string = ''): this {\n this._xOffset = value;\n this._xPosition = 'start';\n return this;\n }\n\n /**\n * Sets the overlay to the end of the viewport, depending on the overlay direction.\n * This will be to the right in LTR layouts and to the left in RTL.\n * @param offset Offset from the edge of the screen.\n */\n end(value: string = ''): this {\n this._xOffset = value;\n this._xPosition = 'end';\n return this;\n }\n\n /**\n * Sets the overlay width and clears any previously set width.\n * @param value New width for the overlay\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n width(value: string = ''): this {\n if (this._overlayRef) {\n this._overlayRef.updateSize({width: value});\n } else {\n this._width = value;\n }\n\n return this;\n }\n\n /**\n * Sets the overlay height and clears any previously set height.\n * @param value New height for the overlay\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n height(value: string = ''): this {\n if (this._overlayRef) {\n this._overlayRef.updateSize({height: value});\n } else {\n this._height = value;\n }\n\n return this;\n }\n\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param offset Overlay offset from the horizontal center.\n */\n centerHorizontally(offset: string = ''): this {\n this.left(offset);\n this._xPosition = 'center';\n return this;\n }\n\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param offset Overlay offset from the vertical center.\n */\n centerVertically(offset: string = ''): this {\n this.top(offset);\n this._alignItems = 'center';\n return this;\n }\n\n /**\n * Apply the position to the element.\n * @docs-private\n */\n apply(): void {\n // Since the overlay ref applies the strategy asynchronously, it could\n // have been disposed before it ends up being applied. If that is the\n // case, we shouldn't do anything.\n if (!this._overlayRef || !this._overlayRef.hasAttached()) {\n return;\n }\n\n const styles = this._overlayRef.overlayElement.style;\n const parentStyles = this._overlayRef.hostElement.style;\n const config = this._overlayRef.getConfig();\n const {width, height, maxWidth, maxHeight} = config;\n const shouldBeFlushHorizontally =\n (width === '100%' || width === '100vw') &&\n (!maxWidth || maxWidth === '100%' || maxWidth === '100vw');\n const shouldBeFlushVertically =\n (height === '100%' || height === '100vh') &&\n (!maxHeight || maxHeight === '100%' || maxHeight === '100vh');\n const xPosition = this._xPosition;\n const xOffset = this._xOffset;\n const isRtl = this._overlayRef.getConfig().direction === 'rtl';\n let marginLeft = '';\n let marginRight = '';\n let justifyContent = '';\n\n if (shouldBeFlushHorizontally) {\n justifyContent = 'flex-start';\n } else if (xPosition === 'center') {\n justifyContent = 'center';\n\n if (isRtl) {\n marginRight = xOffset;\n } else {\n marginLeft = xOffset;\n }\n } else if (isRtl) {\n if (xPosition === 'left' || xPosition === 'end') {\n justifyContent = 'flex-end';\n marginLeft = xOffset;\n } else if (xPosition === 'right' || xPosition === 'start') {\n justifyContent = 'flex-start';\n marginRight = xOffset;\n }\n } else if (xPosition === 'left' || xPosition === 'start') {\n justifyContent = 'flex-start';\n marginLeft = xOffset;\n } else if (xPosition === 'right' || xPosition === 'end') {\n justifyContent = 'flex-end';\n marginRight = xOffset;\n }\n\n styles.position = this._cssPosition;\n styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;\n styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;\n styles.marginBottom = this._bottomOffset;\n styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;\n parentStyles.justifyContent = justifyContent;\n parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;\n }\n\n /**\n * Cleans up the DOM changes from the position strategy.\n * @docs-private\n */\n dispose(): void {\n if (this._isDisposed || !this._overlayRef) {\n return;\n }\n\n const styles = this._overlayRef.overlayElement.style;\n const parent = this._overlayRef.hostElement;\n const parentStyles = parent.style;\n\n parent.classList.remove(wrapperClass);\n parentStyles.justifyContent =\n parentStyles.alignItems =\n styles.marginTop =\n styles.marginBottom =\n styles.marginLeft =\n styles.marginRight =\n styles.position =\n '';\n\n this._overlayRef = null!;\n this._isDisposed = true;\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\nimport {Platform} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {OverlayContainer} from '../overlay-container';\nimport {\n FlexibleConnectedPositionStrategy,\n FlexibleConnectedPositionStrategyOrigin,\n} from './flexible-connected-position-strategy';\nimport {GlobalPositionStrategy} from './global-position-strategy';\n\n/** Builder for overlay position strategy. */\n@Injectable({providedIn: 'root'})\nexport class OverlayPositionBuilder {\n constructor(\n private _viewportRuler: ViewportRuler,\n @Inject(DOCUMENT) private _document: any,\n private _platform: Platform,\n private _overlayContainer: OverlayContainer,\n ) {}\n\n /**\n * Creates a global position strategy.\n */\n global(): GlobalPositionStrategy {\n return new GlobalPositionStrategy();\n }\n\n /**\n * Creates a flexible position strategy.\n * @param origin Origin relative to which to position the overlay.\n */\n flexibleConnectedTo(\n origin: FlexibleConnectedPositionStrategyOrigin,\n ): FlexibleConnectedPositionStrategy {\n return new FlexibleConnectedPositionStrategy(\n origin,\n this._viewportRuler,\n this._document,\n this._platform,\n this._overlayContainer,\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\nimport {Directionality} from '@angular/cdk/bidi';\nimport {DomPortalOutlet} from '@angular/cdk/portal';\nimport {DOCUMENT, Location} from '@angular/common';\nimport {\n ApplicationRef,\n ComponentFactoryResolver,\n Inject,\n Injectable,\n Injector,\n NgZone,\n ANIMATION_MODULE_TYPE,\n Optional,\n} from '@angular/core';\nimport {OverlayKeyboardDispatcher} from './dispatchers/overlay-keyboard-dispatcher';\nimport {OverlayOutsideClickDispatcher} from './dispatchers/overlay-outside-click-dispatcher';\nimport {OverlayConfig} from './overlay-config';\nimport {OverlayContainer} from './overlay-container';\nimport {OverlayRef} from './overlay-ref';\nimport {OverlayPositionBuilder} from './position/overlay-position-builder';\nimport {ScrollStrategyOptions} from './scroll/index';\n\n/** Next overlay unique ID. */\nlet nextUniqueId = 0;\n\n// Note that Overlay is *not* scoped to the app root because of the ComponentFactoryResolver\n// which needs to be different depending on where OverlayModule is imported.\n\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\n@Injectable({providedIn: 'root'})\nexport class Overlay {\n private _appRef: ApplicationRef;\n\n constructor(\n /** Scrolling strategies that can be used when creating an overlay. */\n public scrollStrategies: ScrollStrategyOptions,\n private _overlayContainer: OverlayContainer,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _positionBuilder: OverlayPositionBuilder,\n private _keyboardDispatcher: OverlayKeyboardDispatcher,\n private _injector: Injector,\n private _ngZone: NgZone,\n @Inject(DOCUMENT) private _document: any,\n private _directionality: Directionality,\n private _location: Location,\n private _outsideClickDispatcher: OverlayOutsideClickDispatcher,\n @Inject(ANIMATION_MODULE_TYPE) @Optional() private _animationsModuleType?: string,\n ) {}\n\n /**\n * Creates an overlay.\n * @param config Configuration applied to the overlay.\n * @returns Reference to the created overlay.\n */\n create(config?: OverlayConfig): OverlayRef {\n const host = this._createHostElement();\n const pane = this._createPaneElement(host);\n const portalOutlet = this._createPortalOutlet(pane);\n const overlayConfig = new OverlayConfig(config);\n\n overlayConfig.direction = overlayConfig.direction || this._directionality.value;\n\n return new OverlayRef(\n portalOutlet,\n host,\n pane,\n overlayConfig,\n this._ngZone,\n this._keyboardDispatcher,\n this._document,\n this._location,\n this._outsideClickDispatcher,\n this._animationsModuleType === 'NoopAnimations',\n );\n }\n\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @returns An overlay position builder.\n */\n position(): OverlayPositionBuilder {\n return this._positionBuilder;\n }\n\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @returns Newly-created pane element\n */\n private _createPaneElement(host: HTMLElement): HTMLElement {\n const pane = this._document.createElement('div');\n\n pane.id = `cdk-overlay-${nextUniqueId++}`;\n pane.classList.add('cdk-overlay-pane');\n host.appendChild(pane);\n\n return pane;\n }\n\n /**\n * Creates the host element that wraps around an overlay\n * and can be used for advanced positioning.\n * @returns Newly-create host element.\n */\n private _createHostElement(): HTMLElement {\n const host = this._document.createElement('div');\n this._overlayContainer.getContainerElement().appendChild(host);\n return host;\n }\n\n /**\n * Create a DomPortalOutlet into which the overlay content can be loaded.\n * @param pane The DOM element to turn into a portal outlet.\n * @returns A portal outlet for the given DOM element.\n */\n private _createPortalOutlet(pane: HTMLElement): DomPortalOutlet {\n // We have to resolve the ApplicationRef later in order to allow people\n // to use overlay-based providers during app initialization.\n if (!this._appRef) {\n this._appRef = this._injector.get<ApplicationRef>(ApplicationRef);\n }\n\n return new DomPortalOutlet(\n pane,\n this._componentFactoryResolver,\n this._appRef,\n this._injector,\n this._document,\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\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {Subscription} from 'rxjs';\nimport {takeWhile} from 'rxjs/operators';\nimport {Overlay} from './overlay';\nimport {OverlayConfig} from './overlay-config';\nimport {OverlayRef} from './overlay-ref';\nimport {ConnectedOverlayPositionChange} from './position/connected-position';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n FlexibleConnectedPositionStrategyOrigin,\n} from './position/flexible-connected-position-strategy';\nimport {RepositionScrollStrategy, ScrollStrategy} from './scroll/index';\n\n/** Default set of positions for the overlay. Follows the behavior of a dropdown. */\nconst defaultPositionList: ConnectedPosition[] = [\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n];\n\n/** Injection token that determines the scroll handling while the connected overlay is open. */\nexport const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'cdk-connected-overlay-scroll-strategy',\n {\n providedIn: 'root',\n factory: () => {\n const overlay = inject(Overlay);\n return () => overlay.scrollStrategies.reposition();\n },\n },\n);\n\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\n@Directive({\n selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n exportAs: 'cdkOverlayOrigin',\n standalone: true,\n})\nexport class CdkOverlayOrigin {\n constructor(\n /** Reference to the element on which the directive is applied. */\n public elementRef: ElementRef,\n ) {}\n}\n\n/**\n * Directive to facilitate declarative creation of an\n * Overlay using a FlexibleConnectedPositionStrategy.\n */\n@Directive({\n selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n exportAs: 'cdkConnectedOverlay',\n standalone: true,\n})\nexport class CdkConnectedOverlay implements OnDestroy, OnChanges {\n private _overlayRef: OverlayRef;\n private _templatePortal: TemplatePortal;\n private _backdropSubscription = Subscription.EMPTY;\n private _attachSubscription = Subscription.EMPTY;\n private _detachSubscription = Subscription.EMPTY;\n private _positionSubscription = Subscription.EMPTY;\n private _offsetX: number;\n private _offsetY: number;\n private _position: FlexibleConnectedPositionStrategy;\n private _scrollStrategyFactory: () => ScrollStrategy;\n private _disposeOnNavigation = false;\n private _ngZone = inject(NgZone);\n\n /** Origin for the connected overlay. */\n @Input('cdkConnectedOverlayOrigin')\n origin: CdkOverlayOrigin | FlexibleConnectedPositionStrategyOrigin;\n\n /** Registered connected position pairs. */\n @Input('cdkConnectedOverlayPositions') positions: ConnectedPosition[];\n\n /**\n * This input overrides the positions input if specified. It lets users pass\n * in arbitrary positioning strategies.\n */\n @Input('cdkConnectedOverlayPositionStrategy') positionStrategy: FlexibleConnectedPositionStrategy;\n\n /** The offset in pixels for the overlay connection point on the x-axis */\n @Input('cdkConnectedOverlayOffsetX')\n get offsetX(): number {\n return this._offsetX;\n }\n set offsetX(offsetX: number) {\n this._offsetX = offsetX;\n\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n\n /** The offset in pixels for the overlay connection point on the y-axis */\n @Input('cdkConnectedOverlayOffsetY')\n get offsetY() {\n return this._offsetY;\n }\n set offsetY(offsetY: number) {\n this._offsetY = offsetY;\n\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n\n /** The width of the overlay panel. */\n @Input('cdkConnectedOverlayWidth') width: number | string;\n\n /** The height of the overlay panel. */\n @Input('cdkConnectedOverlayHeight') height: number | string;\n\n /** The min width of the overlay panel. */\n @Input('cdkConnectedOverlayMinWidth') minWidth: number | string;\n\n /** The min height of the overlay panel. */\n @Input('cdkConnectedOverlayMinHeight') minHeight: number | string;\n\n /** The custom class to be set on the backdrop element. */\n @Input('cdkConnectedOverlayBackdropClass') backdropClass: string | string[];\n\n /** The custom class to add to the overlay pane element. */\n @Input('cdkConnectedOverlayPanelClass') panelClass: string | string[];\n\n /** Margin between the overlay and the viewport edges. */\n @Input('cdkConnectedOverlayViewportMargin') viewportMargin: number = 0;\n\n /** Strategy to be used when handling scroll events while the overlay is open. */\n @Input('cdkConnectedOverlayScrollStrategy') scrollStrategy: ScrollStrategy;\n\n /** Whether the overlay is open. */\n @Input('cdkConnectedOverlayOpen') open: boolean = false;\n\n /** Whether the overlay can be closed by user interaction. */\n @Input('cdkConnectedOverlayDisableClose') disableClose: boolean = false;\n\n /** CSS selector which to set the transform origin. */\n @Input('cdkConnectedOverlayTransformOriginOn') transformOriginSelector: string;\n\n /** Whether or not the overlay should attach a backdrop. */\n @Input({alias: 'cdkConnectedOverlayHasBackdrop', transform: booleanAttribute})\n hasBackdrop: boolean = false;\n\n /** Whether or not the overlay should be locked when scrolling. */\n @Input({alias: 'cdkConnectedOverlayLockPosition', transform: booleanAttribute})\n lockPosition: boolean = false;\n\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n @Input({alias: 'cdkConnectedOverlayFlexibleDimensions', transform: booleanAttribute})\n flexibleDimensions: boolean = false;\n\n /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */\n @Input({alias: 'cdkConnectedOverlayGrowAfterOpen', transform: booleanAttribute})\n growAfterOpen: boolean = false;\n\n /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */\n @Input({alias: 'cdkConnectedOverlayPush', transform: booleanAttribute}) push: boolean = false;\n\n /** Whether the overlay should be disposed of when the user goes backwards/forwards in history. */\n @Input({alias: 'cdkConnectedOverlayDisposeOnNavigation', transform: booleanAttribute})\n get disposeOnNavigation(): boolean {\n return this._disposeOnNavigation;\n }\n set disposeOnNavigation(value: boolean) {\n this._disposeOnNavigation = value;\n }\n\n /** Event emitted when the backdrop is clicked. */\n @Output() readonly backdropClick = new EventEmitter<MouseEvent>();\n\n /** Event emitted when the position has changed. */\n @Output() readonly positionChange = new EventEmitter<ConnectedOverlayPositionChange>();\n\n /** Event emitted when the overlay has been attached. */\n @Output() readonly attach = new EventEmitter<void>();\n\n /** Event emitted when the overlay has been detached. */\n @Output() readonly detach = new EventEmitter<void>();\n\n /** Emits when there are keyboard events that are targeted at the overlay. */\n @Output() readonly overlayKeydown = new EventEmitter<KeyboardEvent>();\n\n /** Emits when there are mouse outside click events that are targeted at the overlay. */\n @Output() readonly overlayOutsideClick = new EventEmitter<MouseEvent>();\n\n // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n\n constructor(\n private _overlay: Overlay,\n templateRef: TemplateRef<any>,\n viewContainerRef: ViewContainerRef,\n @Inject(CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY) scrollStrategyFactory: any,\n @Optional() private _dir: Directionality,\n ) {\n this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n this._scrollStrategyFactory = scrollStrategyFactory;\n this.scrollStrategy = this._scrollStrategyFactory();\n }\n\n /** The associated overlay reference. */\n get overlayRef(): OverlayRef {\n return this._overlayRef;\n }\n\n /** The element's layout direction. */\n get dir(): Direction {\n return this._dir ? this._dir.value : 'ltr';\n }\n\n ngOnDestroy() {\n this._attachSubscription.unsubscribe();\n this._detachSubscription.unsubscribe();\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (this._position) {\n this._updatePositionStrategy(this._position);\n this._overlayRef.updateSize({\n width: this.width,\n minWidth: this.minWidth,\n height: this.height,\n minHeight: this.minHeight,\n });\n\n if (changes['origin'] && this.open) {\n this._position.apply();\n }\n }\n\n if (changes['open']) {\n this.open ? this._attachOverlay() : this._detachOverlay();\n }\n }\n\n /** Creates an overlay */\n private _createOverlay() {\n if (!this.positions || !this.positions.length) {\n this.positions = defaultPositionList;\n }\n\n const overlayRef = (this._overlayRef = this._overlay.create(this._buildConfig()));\n this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());\n this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());\n overlayRef.keydownEvents().subscribe((event: KeyboardEvent) => {\n this.overlayKeydown.next(event);\n\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this._detachOverlay();\n }\n });\n\n this._overlayRef.outsidePointerEvents().subscribe((event: MouseEvent) => {\n const origin = this._getOriginElement();\n const target = _getEventTarget(event) as Element | null;\n\n if (!origin || (origin !== target && !origin.contains(target))) {\n this.overlayOutsideClick.next(event);\n }\n });\n }\n\n /** Builds the overlay config based on the directive's inputs */\n private _buildConfig(): OverlayConfig {\n const positionStrategy = (this._position =\n this.positionStrategy || this._createPositionStrategy());\n const overlayConfig = new OverlayConfig({\n direction: this._dir,\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n hasBackdrop: this.hasBackdrop,\n disposeOnNavigation: this.disposeOnNavigation,\n });\n\n if (this.width || this.width === 0) {\n overlayConfig.width = this.width;\n }\n\n if (this.height || this.height === 0) {\n overlayConfig.height = this.height;\n }\n\n if (this.minWidth || this.minWidth === 0) {\n overlayConfig.minWidth = this.minWidth;\n }\n\n if (this.minHeight || this.minHeight === 0) {\n overlayConfig.minHeight = this.minHeight;\n }\n\n if (this.backdropClass) {\n overlayConfig.backdropClass = this.backdropClass;\n }\n\n if (this.panelClass) {\n overlayConfig.panelClass = this.panelClass;\n }\n\n return overlayConfig;\n }\n\n /** Updates the state of a position strategy, based on the values of the directive inputs. */\n private _updatePositionStrategy(positionStrategy: FlexibleConnectedPositionStrategy) {\n const positions: ConnectedPosition[] = this.positions.map(currentPosition => ({\n originX: currentPosition.originX,\n originY: currentPosition.originY,\n overlayX: currentPosition.overlayX,\n overlayY: currentPosition.overlayY,\n offsetX: currentPosition.offsetX || this.offsetX,\n offsetY: currentPosition.offsetY || this.offsetY,\n panelClass: currentPosition.panelClass || undefined,\n }));\n\n return positionStrategy\n .setOrigin(this._getOrigin())\n .withPositions(positions)\n .withFlexibleDimensions(this.flexibleDimensions)\n .withPush(this.push)\n .withGrowAfterOpen(this.growAfterOpen)\n .withViewportMargin(this.viewportMargin)\n .withLockedPosition(this.lockPosition)\n .withTransformOriginOn(this.transformOriginSelector);\n }\n\n /** Returns the position strategy of the overlay to be set on the overlay config */\n private _createPositionStrategy(): FlexibleConnectedPositionStrategy {\n const strategy = this._overlay.position().flexibleConnectedTo(this._getOrigin());\n this._updatePositionStrategy(strategy);\n return strategy;\n }\n\n private _getOrigin(): FlexibleConnectedPositionStrategyOrigin {\n if (this.origin instanceof CdkOverlayOrigin) {\n return this.origin.elementRef;\n } else {\n return this.origin;\n }\n }\n\n private _getOriginElement(): Element | null {\n if (this.origin instanceof CdkOverlayOrigin) {\n return this.origin.elementRef.nativeElement;\n }\n\n if (this.origin instanceof ElementRef) {\n return this.origin.nativeElement;\n }\n\n if (typeof Element !== 'undefined' && this.origin instanceof Element) {\n return this.origin;\n }\n\n return null;\n }\n\n /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */\n private _attachOverlay() {\n if (!this._overlayRef) {\n this._createOverlay();\n } else {\n // Update the overlay size, in case the directive's inputs have changed\n this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;\n }\n\n if (!this._overlayRef.hasAttached()) {\n this._overlayRef.attach(this._templatePortal);\n }\n\n if (this.hasBackdrop) {\n this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => {\n this.backdropClick.emit(event);\n });\n } else {\n this._backdropSubscription.unsubscribe();\n }\n\n this._positionSubscription.unsubscribe();\n\n // Only subscribe to `positionChanges` if requested, because putting\n // together all the information for it can be expensive.\n if (this.positionChange.observers.length > 0) {\n this._positionSubscription = this._position.positionChanges\n .pipe(takeWhile(() => this.positionChange.observers.length > 0))\n .subscribe(position => {\n this._ngZone.run(() => this.positionChange.emit(position));\n\n if (this.positionChange.observers.length === 0) {\n this._positionSubscription.unsubscribe();\n }\n });\n }\n }\n\n /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */\n private _detachOverlay() {\n if (this._overlayRef) {\n this._overlayRef.detach();\n }\n\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n }\n}\n\n/** @docs-private */\nexport function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(\n overlay: Overlay,\n): () => RepositionScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {\n provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,\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\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {ScrollingModule} from '@angular/cdk/scrolling';\nimport {NgModule} from '@angular/core';\nimport {Overlay} from './overlay';\nimport {\n CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,\n CdkConnectedOverlay,\n CdkOverlayOrigin,\n} from './overlay-directives';\n\n@NgModule({\n imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin],\n exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],\n providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER],\n})\nexport class OverlayModule {}\n","'use strict';\n\n/** @type {import('./functionCall')} */\nmodule.exports = Function.prototype.call;\n","import { Directive, Input, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\n\nimport { LoginStatus } from '@fcom/core-api/login';\nimport { AppState } from '@fcom/core';\nimport { loginStatus } from '@fcom/core/selectors';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\n@Directive({\n selector: '[finShowForLoginStatus]',\n})\nexport class ShowForLoginStatusDirective implements OnDestroy {\n private hasView = false;\n private subscriptions = new Subscription();\n\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private store$: Store<AppState>\n ) {}\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('finShowForLoginStatus') set finShowForLoginStatus(status: LoginStatus) {\n if (!status) {\n if (!this.hasView) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n }\n } else {\n if (!this.subscriptions) {\n this.subscriptions = new Subscription();\n }\n this.subscriptions.add(\n this.store$.pipe(loginStatus(), finShare()).subscribe((userStatus) => {\n if (status === userStatus) {\n if (!this.hasView) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n this.hasView = true;\n }\n } else {\n this.viewContainer.clear();\n this.hasView = false;\n }\n })\n );\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { CmsImageData } from '@fcom/core-api/interfaces';\n\nimport { Amount } from './dapi.interface';\nimport {\n Category,\n FinnairAmount,\n FinnairBoundItem,\n FinnairCodeAndName,\n FinnairLowestPrice,\n FinnairPassengerCode,\n FinnairPassengerServiceItem,\n FinnairPassengerServiceSelectionItem,\n FinnairServiceCatalogCampaign,\n FinnairServiceItem,\n FinnairServiceSegmentItem,\n FinnairServiceVariantItemV3,\n PaxLevelQuota,\n SubCategory,\n} from '../api/models';\n\nexport interface ServiceAvailabilityPerFragment {\n [fragmentId: string]: boolean;\n}\n\nexport enum ServicesStatus {\n /**\n * No request for services has been placed.\n */\n INITIAL,\n\n /**\n * A request for fetching the services is ongoing.\n */\n PENDING,\n\n /**\n * The request for the services failed.\n */\n LOAD_ERROR,\n\n /**\n * The services request passed succesfully and should be in the state.\n */\n OK,\n}\n\nexport interface ServiceAvailability {\n [Category.CABIN_BAGGAGE]: ServiceAvailabilityPerFragment;\n [Category.BAGGAGE]: ServiceAvailabilityPerFragment;\n [Category.MEAL]: ServiceAvailabilityPerFragment;\n [Category.WIFI]: ServiceAvailabilityPerFragment;\n [Category.LOUNGE]: ServiceAvailabilityPerFragment;\n [Category.COVER]: ServiceAvailabilityPerFragment;\n [Category.SPORT]: ServiceAvailabilityPerFragment;\n [Category.PET]: ServiceAvailabilityPerFragment;\n [Category.SAF]: ServiceAvailabilityPerFragment;\n}\n\nexport interface BaseService {\n /**\n * The semantic identifier of the service.\n * <p/>\n * Combined with the type of the service (baggage/meals), this uniquely identifies the type of the service.\n * Can be used for detecting whether a service is the same for multiple bounds or flights.\n * <p/>\n * Can be used as a localization key in combination with the service type.\n */\n variant: string;\n\n /**\n * The top-level category of the service\n */\n category: Category;\n}\n\nexport interface CartService extends BaseService {\n /**\n * Category name\n */\n subCategory: string;\n\n /**\n * The identifier of the cart's traveler to whom this service is assigned to.\n */\n travelerId: string;\n\n /**\n * The desired services count, e.g., amount of extra bags.\n */\n quantity: number;\n\n /**\n * The price for a single item. Total price can be calculated from quantity * price.\n */\n price?: Amount;\n\n /**\n * Flight ids this service is attached to\n */\n flightIds: string[];\n}\n\nexport interface ServiceCatalogTranslations {\n title: string;\n description?: string;\n detailText?: string;\n\n /** Ingredients if meal service */\n ingredients?: string;\n /** HTML content describing the nutrition facts for meal service. Contains title. */\n nutrition?: string;\n /** meal categories, e.g. low-lactose. These need to be translated. */\n itemCategory?: string[];\n\n /** Specific to cancellation cover and SAF */\n disclaimerText?: string;\n actionText?: string;\n}\n\nexport interface ServiceCatalogService extends Omit<FinnairServiceVariantItemV3, 'translations' | 'media'> {\n /**\n * The category of the service\n */\n category: Category;\n\n /**\n * The child-level category of the service\n */\n subCategory: SubCategory;\n\n /**\n * Translations for category coming from cms\n */\n translations: ServiceCatalogTranslations;\n\n /**\n * Picture for category coming from cms\n */\n media?: CmsImageData;\n\n /**\n * If discount is given then this is the original price if we know it\n */\n originalPrice?: Amount;\n\n isPaid?: boolean;\n isTicketed?: boolean;\n isModifiable?: boolean;\n}\n\nexport interface ServicesPerTraveler {\n [travelerId: string]: ServiceCatalogService[];\n}\n\nexport interface ServiceCatalogServices {\n // fragmentId can be for journey, bound or flight\n [fragmentId: string]: ServicesPerTraveler;\n}\n\nexport interface SelectionsPerTraveler<T> {\n [travelerId: string]: T;\n}\n\nexport interface ServiceCatalogSelections<T> {\n // fragmentId can be for journey, bound or flight\n [fragmentId: string]: SelectionsPerTraveler<T>;\n}\n\nexport interface ServiceCatalogSelectionsForAllTravelers {\n [fragmentId: string]: TravelerService[];\n}\n\nexport interface ServiceCatalogCategoryServicesMap {\n [category: string]: ServiceCatalogServices;\n}\n\nexport interface ServiceCatalogCategory {\n category: Category;\n services: ServiceCatalogServices;\n translations: ServiceCatalogTranslations;\n media?: CmsImageData;\n lowestPrice?: {\n [key: string]: {\n [key: string]: FinnairLowestPrice;\n };\n };\n}\n\nexport interface ServiceCatalog {\n messages: string[];\n categories: ServiceCatalogCategory[];\n campaigns?: FinnairServiceCatalogCampaign[];\n paxLevelQuota: PaxLevelQuota;\n}\n\nexport interface ServiceSelections {\n [Category.BAGGAGE]?: ServiceCatalogSelections<TravelerService[]>;\n [Category.WIFI]?: ServiceCatalogSelections<TravelerService>;\n [Category.LOUNGE]?: ServiceCatalogSelections<TravelerService[]>;\n [Category.COVER]?: ServiceCatalogSelections<TravelerService[]>;\n [Category.MEAL]?: ServiceCatalogSelections<TravelerService>;\n [Category.PET]?: ServiceCatalogSelections<TravelerService>;\n [Category.SPORT]?: ServiceCatalogSelections<TravelerService>;\n}\n\nexport enum CustomServiceType {\n JOURNEY = 'JOURNEY',\n GROUP = 'GROUP',\n}\n\nexport interface TravelerService {\n category: SubCategory;\n\n /**\n * Identifies the type of the service in combination with service category.\n * @see BaseService#variant\n */\n variant: string;\n quantity: number;\n /**\n * If discount is given this is the original price\n */\n originalPricePerItem?: Amount;\n pricePerItem: Amount;\n includedInTicketType: boolean;\n includedInTierBenefit: boolean;\n\n displayName: string;\n paid?: boolean;\n ticketed?: boolean;\n modifiable?: boolean;\n travelerId?: string;\n\n /**\n * Extra fields for translations\n */\n title?: string;\n seatNumber?: string;\n maxBaggageWeight?: string;\n}\n\nexport interface ServicesState {\n status: ServicesStatus;\n services?: ServiceCatalog;\n selections?: ServiceSelections;\n upsell?: SelectedServiceData;\n campaignsShown: string[];\n serviceAvailability?: ServiceAvailability;\n}\n\nexport interface ServicePassenger extends FinnairPassengerServiceItem {\n withInfant: boolean;\n withInfantFullName: string;\n}\n\nexport interface Upsell {\n enabled: boolean;\n articleKey: string;\n expand: boolean;\n lowestPrice: FinnairAmount | null;\n isShowMoreBtn: boolean;\n updatingService$: Observable<boolean>;\n hasPlusTierBenefit: boolean;\n}\n\nexport interface BoundWithServices extends FinnairBoundItem {\n services: FinnairServiceItemWithUpsell[];\n}\n\nexport interface FinnairServiceItemWithUpsell extends FinnairServiceItem {\n upsell?: Upsell;\n complimentaryService?: FinnairPassengerServiceSelectionItem[];\n notIncludedServices?: boolean;\n}\n\nexport interface UpsellCategoriesForBound {\n [boundId: string]: {\n [category: string]: boolean;\n };\n}\n\nexport interface SelectedServiceData {\n category: Category;\n index?: number;\n fragmentId?: string;\n paxId?: string;\n}\n\nexport enum ServiceStatus {\n CONFIRMED = 'confirmed',\n PENDING_PAYMENT = 'pendingPayment',\n AVAILABLE_FOR_SELL = 'availableForSell',\n ASSIGN_AT_AIRPORT = 'assignAtAirport',\n}\n\ntype GroupedServicesSeatType = 'confirmed' | 'pendingPayment' | 'availableForSell' | 'assignAtAirport';\n\nexport interface GroupedServices {\n key: GroupedServicesSeatType;\n icon?: SvgLibraryIcon.SHOPPING_CART | SvgLibraryIcon.CHECKMARK | SvgLibraryIcon.TIME_ZONE;\n services: FinnairPassengerServiceSelectionItemWithStatus[];\n showActionsButtons: boolean;\n tierLevel?: string;\n}\n\nexport interface FinnairPassengerServiceSelectionItemWithStatus extends FinnairPassengerServiceSelectionItem {\n removeInProgress?: boolean;\n}\n\ninterface ServicesForPassenger extends FinnairPassengerServiceItem {\n groupedServices?: GroupedServices[];\n passengerTypeCode?: FinnairPassengerCode;\n}\n\nexport interface FlightServices extends Omit<FinnairServiceSegmentItem, 'passengers'> {\n operatingAirline?: FinnairCodeAndName;\n passengers?: ServicesForPassenger[];\n complimentaryServices: FinnairPassengerServiceSelectionItem[];\n}\n\nexport interface RemovedServiceInfo {\n category: Category;\n variant?: string;\n travelerId?: string;\n fragmentId?: string;\n boundId?: string;\n seatNumber?: string;\n}\n\nexport interface RemovedServiceProgress {\n service?: RemovedServiceInfo;\n removeInProgress: boolean;\n}\n","import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\nexport function skipWhile<T>(predicate: BooleanConstructor): OperatorFunction<T, Extract<T, Falsy> extends never ? never : T>;\nexport function skipWhile<T>(predicate: (value: T, index: number) => true): OperatorFunction<T, never>;\nexport function skipWhile<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>;\n\n/**\n * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds\n * true, but emits all further source items as soon as the condition becomes false.\n *\n * ![](skipWhile.png)\n *\n * Skips all the notifications with a truthy predicate. It will not skip the notifications when the predicate is falsy.\n * It can also be skipped using index. Once the predicate is true, it will not be called again.\n *\n * ## Example\n *\n * Skip some super heroes\n *\n * ```ts\n * import { from, skipWhile } from 'rxjs';\n *\n * const source = from(['Green Arrow', 'SuperMan', 'Flash', 'SuperGirl', 'Black Canary'])\n * // Skip the heroes until SuperGirl\n * const example = source.pipe(skipWhile(hero => hero !== 'SuperGirl'));\n * // output: SuperGirl, Black Canary\n * example.subscribe(femaleHero => console.log(femaleHero));\n * ```\n *\n * Skip values from the array until index 5\n *\n * ```ts\n * import { from, skipWhile } from 'rxjs';\n *\n * const source = from([1, 2, 3, 4, 5, 6, 7, 9, 10]);\n * const example = source.pipe(skipWhile((_, i) => i !== 5));\n * // output: 6, 7, 9, 10\n * example.subscribe(value => console.log(value));\n * ```\n *\n * @see {@link last}\n * @see {@link skip}\n * @see {@link skipUntil}\n * @see {@link skipLast}\n *\n * @param predicate A function to test each item emitted from the source Observable.\n * @return A function that returns an Observable that begins emitting items\n * emitted by the source Observable when the specified predicate becomes false.\n */\nexport function skipWhile<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n let taking = false;\n let index = 0;\n source.subscribe(\n createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value))\n );\n });\n}\n","<div class=\"relative ps-medium-t\" [class.disabled]=\"disabled\" [formGroup]=\"group\">\n <input\n #inputElement\n [id]=\"name\"\n [formControlName]=\"modelName\"\n [class.form-field-empty]=\"!(group.get(modelName)?.value?.length > 0)\"\n [attr.name]=\"name\"\n [attr.type]=\"inputType\"\n [attr.pattern]=\"inputPattern\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n (focus)=\"focus.emit([translationPrefix, 'info'].join('.'))\"\n (blur)=\"blur.emit([translationPrefix, 'info'].join('.'))\"\n (change)=\"onChangeEvent($event)\"\n />\n <label [attr.for]=\"name\" class=\"font-body-2 overflow-hidden truncate\">\n <span class=\"is-vishidden\" aria-hidden=\"true\" *ngIf=\"!!hiddenLabel\">{{ hiddenLabel }}</span>\n <span>\n {{ [translationPrefix, 'label'].join('.') | finLocalization }}\n <span *ngIf=\"required\"> *</span>\n </span>\n </label>\n</div>\n\n<div\n class=\"error-label font-body-2\"\n *ngIf=\"group.get(modelName)?.invalid && group.get(modelName)?.touched && !hideError\"\n>\n <span class=\"error-900-text\">\n {{ [translationPrefix, firstError().key].join('.') | finLocalization: firstError().data }}\n </span>\n</div>\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n ViewChild,\n} from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\n\nimport { Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils';\n\n@Component({\n selector: 'fin-input-field',\n templateUrl: './input-field.component.html',\n})\nexport class InputFieldComponent implements OnInit, OnDestroy {\n @ViewChild('inputElement', { static: true })\n inputElement: ElementRef;\n\n @Output()\n focus: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n blur: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n change: EventEmitter<string> = new EventEmitter<string>();\n\n @Input()\n group: UntypedFormGroup;\n @Input()\n hideError: boolean;\n @Input()\n modelName: string;\n @Input()\n name: string;\n @Input()\n autocomplete: string;\n @Input()\n hiddenLabel: string;\n @Input()\n translationPrefix: string;\n @Input()\n required: boolean;\n @Input()\n disabled: boolean;\n\n @Input()\n set type(type: string) {\n if (type === 'tel') {\n this.inputPattern = '[0-9]*';\n }\n this.inputType = type || 'text';\n }\n\n inputPattern: string = undefined;\n inputType: string;\n\n subscription: Subscription;\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n this.subscription = this.group.get(this.modelName).valueChanges.subscribe((s) => {\n if (isPlatformBrowser(this.platform) && this.inputElement.nativeElement !== this.document.activeElement) {\n this.inputElement.nativeElement.value = s;\n }\n });\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n firstError(): any {\n const errors = this.group.get(this.modelName).errors;\n if (!errors) {\n return { key: undefined, data: undefined };\n }\n const key = Object.keys(errors).filter((k) => errors[k])[0];\n return {\n key,\n data: errors[key],\n };\n }\n\n onChangeEvent(event: Event): void {\n const field = this.group.get(this.modelName);\n\n // Chrome on iOS does not trigger the \"input\" event on autofill.\n if ((event.target as HTMLInputElement).value !== field.value) {\n field.setValue((event.target as HTMLInputElement).value);\n }\n\n this.change.emit([this.translationPrefix, 'info'].join('.'));\n }\n}\n","export enum PromoTheme {\n WHITE = 'white',\n BLUE = 'blue',\n BLACK = 'black',\n FULL_BG = 'full_bg',\n}\n","<div class=\"grid-max-width\" [ngClass]=\"{ 'grid-col-12': !noGrid }\">\n <div\n [ngClass]=\"{\n 'sm-col-2-11 md-col-3-10 xl-col-4-9': !noGrid,\n }\"\n class=\"col-f pr-xlarge-y align-center\"\n >\n <fcom-icon class=\"nordic-blue-900-text icon-large\" [name]=\"iconName\"></fcom-icon>\n <h1 class=\"h1r pr-xsmall-t nordic-blue-900-text\">{{ title ? (title | finLocalization) : 'Sorry!' }}</h1>\n <h2 class=\"h2r pr-xsmall-t nordic-blue-900-text\">\n {{ subtitle ? (subtitle | finLocalization) : 'Something went wrong' }}\n </h2>\n <p class=\"font-body-1 pr-medium-y\">\n {{\n info\n ? (info | finLocalization)\n : 'An unexpected error occurred. Unfortunately you will need to restart your session. We apologize for the inconvenience.'\n }}\n </p>\n <button\n *ngIf=\"showButton\"\n class=\"btn btn--white border nordic-blue-900-border font-body-1 bold-type\"\n (click)=\"handleButtonClick()\"\n >\n {{ cta ? (cta | finLocalization) : 'Refresh' }}\n </button>\n </div>\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { RootPaths } from '@fcom/core';\nimport { WindowRef } from '@fcom/core/providers';\n\nimport { leaveError } from '../../store/actions/error.actions';\n\nexport const enum ERROR_CTA_ACTIONS {\n NAVIGATE_TO_BOOKING = 'NAVIGATE_TO_BOOKING',\n NAVIGATE_TO_MANAGE_BOOKING = 'NAVIGATE_TO_MANAGE_BOOKING',\n NAVIGATE_TO_MANAGE_BOOKING_VIEW_PNR = 'NAVIGATE_TO_MANAGE_BOOKING_VIEW_PNR',\n REFRESH = 'REFRESH',\n NONE = 'NONE',\n}\n\n@Component({\n selector: 'fin-error',\n templateUrl: 'error.component.html',\n})\nexport class ErrorComponent implements OnInit {\n @Input()\n title: string;\n @Input()\n subtitle: string;\n @Input()\n info: string;\n @Input()\n cta: string;\n @Input()\n showButton = true;\n @Input()\n iconName: SvgLibraryIcon = SvgLibraryIcon.PET;\n @Input()\n ctaAction: ERROR_CTA_ACTIONS = ERROR_CTA_ACTIONS.REFRESH;\n @Input()\n noGrid = false;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private languageService: LanguageService,\n private windowRef: WindowRef,\n private store$: Store\n ) {}\n\n ngOnInit(): void {\n // Use queryParams as mapping data to show as currently state object in the router is not updating when\n // skipLocationChange: true used\n const errorParams = this.route.snapshot.queryParams ?? {};\n\n this.iconName = errorParams['iconName'] ?? this.iconName;\n this.title = errorParams['title'] ?? this.title;\n this.subtitle = errorParams['subtitle'] ?? this.subtitle;\n this.info = errorParams['info'] ?? this.info;\n this.cta = errorParams['cta'] ?? this.cta;\n this.showButton = errorParams['showButton'] ? errorParams['showButton'] !== 'false' : this.showButton;\n this.noGrid = errorParams['noGrid'] ? errorParams['noGrid'] === 'true' : this.noGrid;\n\n const getAction = (action: ERROR_CTA_ACTIONS | string): ERROR_CTA_ACTIONS => {\n switch (action) {\n case ERROR_CTA_ACTIONS.NAVIGATE_TO_BOOKING:\n return ERROR_CTA_ACTIONS.NAVIGATE_TO_BOOKING;\n case ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING:\n return ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING;\n case ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING_VIEW_PNR:\n return ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING_VIEW_PNR;\n case ERROR_CTA_ACTIONS.REFRESH:\n return ERROR_CTA_ACTIONS.REFRESH;\n default:\n return ERROR_CTA_ACTIONS.NONE;\n }\n };\n this.ctaAction = errorParams['ctaAction'] ? getAction(errorParams['ctaAction']) : this.ctaAction;\n }\n\n handleButtonClick(): void {\n switch (this.ctaAction) {\n case ERROR_CTA_ACTIONS.NAVIGATE_TO_BOOKING:\n this.store$.dispatch(leaveError());\n this.router.navigateByUrl(`${this.languageService.langValue}/${RootPaths.BOOKING_ROOT}`);\n break;\n case ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING:\n this.router.navigateByUrl(`${this.languageService.langValue}/${RootPaths.MANAGE_BOOKING_ROOT}`);\n break;\n case ERROR_CTA_ACTIONS.NAVIGATE_TO_MANAGE_BOOKING_VIEW_PNR:\n this.router.navigateByUrl(`${this.languageService.langValue}/${RootPaths.MANAGE_BOOKING_ROOT}/view`);\n break;\n case ERROR_CTA_ACTIONS.REFRESH:\n this.windowRef.nativeWindow.location.reload();\n break;\n default:\n // Nothing\n }\n }\n}\n","<fieldset>\n <div *ngIf=\"heading\" class=\"flex ms-medium-b\">\n <legend class=\"group-heading bold-type font-body-1 flex-1 flex--center\" [attr.id]=\"'check-group-' + name\">\n {{ heading | finLocalization }}\n </legend>\n <div *ngIf=\"headingInfo\" class=\"heading-info flex-1 align-right font-body-1\">\n <button class=\"nordic-blue-900-text underline overflow-hidden\" (click)=\"headingInfoClick.emit($event)\">\n {{ headingInfo }}\n <fcom-icon [name]=\"SvgLibraryIcon.HELP_BLOCK\" class=\"icon-small nordic-blue-900-text ms-xxsmall-l\"></fcom-icon>\n </button>\n </div>\n </div>\n\n <span class=\"is-vishidden\" *ngIf=\"hiddenText\">{{ hiddenText | finLocalization }}</span>\n\n <div class=\"flex flex--column group-options\">\n <ng-content></ng-content>\n </div>\n</fieldset>\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fcom-block-selection-group',\n templateUrl: './block-selection-group.component.html',\n styleUrls: ['./block-selection-group.component.scss'],\n})\nexport class BlockSelectionGroupComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n name = '';\n @Input()\n heading: string;\n @Input()\n headingInfo: string;\n @Input()\n hiddenText: string;\n\n @Output()\n headingInfoClick: EventEmitter<MouseEvent> = new EventEmitter();\n}\n","/* copied from @angular/core/src/facade/lang */\nexport const looseIdentical = (a, b): boolean => {\n return a === b || (typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b));\n};\n\nconst keyLength = (o: Record<string, unknown>): number => {\n if (Object.keys) {\n return Object.keys(o).length;\n }\n let count = 0;\n for (const key in o) {\n // eslint-disable-next-line no-prototype-builtins\n if (o.hasOwnProperty(key)) {\n count++;\n }\n }\n return count;\n};\n\nconst arraysEqual = (o1: unknown, o2: unknown): boolean => {\n if (Array.isArray(o1) && Array.isArray(o2)) {\n if (o1.length !== o2.length) {\n return false;\n }\n for (let i = 0; i < o1.length; i++) {\n if (!equals(o1[i], o2[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n};\n\nconst objectsEqual = (o1: Record<string, unknown>, o2: Record<string, unknown>): boolean => {\n if (keyLength(o1) !== keyLength(o2)) {\n return false;\n }\n for (const key in o1) {\n if (!equals(o1[key], o2[key])) {\n return false;\n }\n }\n return true;\n};\n\nexport const equals = (o1: unknown, o2: unknown): boolean => {\n if (looseIdentical(o1, o2)) {\n return true;\n }\n if (o1 === null || o2 === null) {\n return false;\n }\n if (typeof o1 !== 'object' || typeof o2 !== 'object') {\n return false;\n }\n /* eslint-disable dot-notation */\n if (o1['equals'] && o2['equals']) {\n return o1['equals'](o2);\n }\n /* eslint-enable dot-notation */\n\n if (Array.isArray(o1) || Array.isArray(o2)) {\n return arraysEqual(o1, o2);\n }\n return objectsEqual(o1 as Record<string, unknown>, o2 as Record<string, unknown>);\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { AfterViewInitDirective } from './after-view-init.directive';\nimport { ClickOutsideDirective } from './click-outside.directive';\nimport { FocusDirective } from './focus.directive';\nimport { LinkDirective } from './link.directive';\nimport { MutationObserverDirective } from './mutation-observer.directive';\nimport { PhoneNumberMaskDirective } from './phone-number-mask.directive';\nimport { ScrolledPastDirective } from './scrolled-past.directive';\nimport { ShowForLoginStatusDirective } from './show-for-login-status.directive';\nimport { ShowForProfileTiersDirective } from './show-for-profile-tiers.directive';\nimport { ClientOnlyDirective } from './client-only.directive';\nimport { LetDirective } from './let-directive';\nimport { FormErrorFocusDirective } from './form-error-focus.directive';\n\nconst directives = [\n AfterViewInitDirective,\n ClickOutsideDirective,\n FocusDirective,\n LinkDirective,\n MutationObserverDirective,\n PhoneNumberMaskDirective,\n ScrolledPastDirective,\n ShowForLoginStatusDirective,\n ShowForProfileTiersDirective,\n ClientOnlyDirective,\n LetDirective,\n FormErrorFocusDirective,\n];\n\n@NgModule({\n imports: [CommonModule],\n providers: [],\n declarations: [...directives],\n exports: [...directives],\n})\nexport class DirectiveModule {}\n","export enum PopoverPosition {\n AUTOMATIC = 'AUTOMATIC',\n TOP = 'TOP',\n BOTTOM = 'BOTTOM',\n}\n","import {\n Component,\n ComponentFactory,\n ComponentFactoryResolver,\n ComponentRef,\n Input,\n OnDestroy,\n OnInit,\n Type,\n ViewContainerRef,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { ActivatedRoute } from '@angular/router';\n\n/**\n * This component can be used to dynamically disable rendering of components on server side.\n *\n * @example\n * <code><pre>\n * @NgModule({\n * imports: [ ComponentsModule ]\n * declarations: [ TestComponent ],\n * // make it possible to use component wihout selector\n * entryComponents: [ TestComponent ],\n * })\n * export class TestModule {\n * }\n *\n *\n * @Component({\n * template: '<fin-client-only [componentType]=\"componentType\"></fin-client-only>'\n * })\n * export class RootComponent {\n * public readonly componentType: typeOf TestComponent = TestComponent;\n * }\n * </pre></code>\n *\n * @example\n * In the routes definition:\n *\n * <code><pre>\n * const route: Route = {\n * path: 'route/to/client-component',\n * component: ClientOnlyComponent,\n * data: {\n * componentType: TestComponent\n * }\n * };\n * </code></pre>\n *\n */\n@Component({\n selector: 'fin-client-only',\n template: '',\n})\nexport class ClientOnlyComponent<T> implements OnInit, OnDestroy {\n @Input()\n componentType: Type<T>;\n\n componentReference: ComponentRef<T>;\n\n constructor(\n private viewContainerRef: ViewContainerRef,\n private componentFactoryResolver: ComponentFactoryResolver,\n private activatedRoute: ActivatedRoute,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit() {\n if (isPlatformBrowser(this.platform)) {\n const componentType: Type<T> = this.componentType || this.activatedRoute.snapshot.data['componentType'];\n if (!componentType) {\n throw new Error('Component type not found from input or activatedRoute data');\n }\n this.load(componentType);\n }\n }\n\n ngOnDestroy(): void {\n if (this.componentReference) {\n this.componentReference.destroy();\n }\n this.viewContainerRef.clear();\n }\n\n private load(componentType: Type<T>): void {\n const componentFactory: ComponentFactory<T> = this.componentFactoryResolver.resolveComponentFactory(componentType);\n this.componentReference = this.viewContainerRef.createComponent(componentFactory);\n }\n}\n","import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, ValidationErrors, Validators } from '@angular/forms';\nimport { Injectable } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport {\n combineLatest,\n distinctUntilChanged,\n filter,\n map,\n NEVER,\n Observable,\n of,\n startWith,\n switchMap,\n take,\n} from 'rxjs';\n\nimport { CorporateUser } from '@fcom/common/interfaces/corporate/corporate.interface';\nimport { FinnairCart, FinnairOrder, FinnairPassengerCode, FinnairPassengerItem } from '@fcom/dapi/api/models';\nimport { finShare } from '@fcom/rx';\nimport {\n EMAIL_PATTERN,\n isNotEmpty,\n isTruthy,\n LocalDate,\n NAME_PATTERN,\n rangeBetween,\n rangeFrom,\n} from '@fcom/core/utils';\nimport { cartData as selectCartData, paxDetails as selectPaxDetails } from '@fcom/booking/store/selectors';\nimport { BookingAppState, PaxDetailsState } from '@fcom/common/interfaces/booking';\nimport { asPaxTypeKey, safePhonePrefix } from '@fcom/dapi/utils';\nimport { TypedFormGroup } from '@fcom/service-forms/interfaces/forms.interface';\nimport { PhonePrefixService } from '@fcom/common/services/phone-prefix/phone-prefix.service';\nimport { PaxDetailsFormData } from '@fcom/dapi/interfaces';\nimport { loginStatus, profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors/login.selector';\nimport { NativeBridgeService } from '@fcom/core/services';\nimport { LoginStatus, ParsedPhone, Profile, ProfileTier } from '@fcom/core-api/login';\nimport { AppState } from '@fcom/core/interfaces';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { TranslatedCountryCode } from '@fcom/common/services';\n\nimport { formatToDateOfBirth } from '../utils/date-utils';\nimport {\n corporateSalutationToGenderOption,\n finnairGenderToGenderOption,\n loginGenderToGenderOption,\n numberOfDaysInMonth,\n splitPhoneNumber,\n} from '../utils/common-booking.utils';\nimport { PaxValidationService } from './pax-validation.service';\nimport { orderData } from '../store';\n\nexport const PaxFormFields = {\n gender: 'gender',\n firstName: 'firstName',\n lastName: 'lastName',\n type: 'type',\n email: 'email',\n phone: 'phone',\n phones: 'phones',\n phoneNumber: 'phoneNumber',\n phonePrefix: 'phonePrefix',\n birthDate: 'birthDate',\n yearOfBirth: 'yearOfBirth',\n monthOfBirth: 'monthOfBirth',\n dateOfBirth: 'dateOfBirth',\n frequentFlyerCard: 'frequentFlyerCard',\n frequentFlyerCards: 'frequentFlyerCards',\n companyCode: 'companyCode',\n cardNumber: 'cardNumber',\n joinFinnairPlus: 'joinFinnairPlus',\n id: 'id',\n travelerId: 'travelerId',\n number: 'number',\n travelling: 'travelling',\n isPrimaryPax: 'isPrimaryPax',\n};\n\nexport interface PassengerDetails {\n group: TypedFormGroup<UntypedFormGroup | UntypedFormControl>;\n availableDays$?: Observable<number[]>;\n years?: number[];\n typeLocalizationKey?: string;\n}\n\nexport enum PrefillSource {\n CART = 'CART',\n PROFILE = 'PROFILE',\n SESSION = 'SESSION',\n ORDER = 'ORDER',\n CORPORATE = 'CORPORATE',\n}\n\nconst setValueIfEmpty = (control: UntypedFormControl, value: string | boolean, overwrite: boolean): void => {\n if (control && (!control?.value || overwrite) && value) {\n control.setValue(value);\n control.markAsTouched();\n }\n};\n\nconst setGroupValueIfEmpty = <T>(group: TypedFormGroup<UntypedFormControl>, values: T, overwrite: boolean): void => {\n if (!group || !values) {\n return;\n }\n\n Object.keys(group.controls).forEach((controlName) => {\n const control: UntypedFormControl = group.get(controlName);\n\n setValueIfEmpty(control, values[controlName], overwrite);\n });\n};\n\n@Injectable()\nexport class PassengerFormService {\n cartData$: Observable<FinnairCart>;\n sessionData$: Observable<PaxDetailsState>;\n profile$: Observable<Profile>;\n orderData$: Observable<FinnairOrder>;\n countryCodes$: Observable<TranslatedCountryCode[]>;\n\n constructor(\n private store$: Store<BookingAppState>,\n private store: Store<AppState>,\n private fb: UntypedFormBuilder,\n private paxValidationService: PaxValidationService,\n private phonePrefixService: PhonePrefixService,\n private nativeBridgeService: NativeBridgeService,\n private languageService: LanguageService\n ) {\n this.cartData$ = this.store$.pipe(selectCartData());\n this.orderData$ = this.store.pipe(orderData());\n this.sessionData$ = this.store$.pipe(selectPaxDetails());\n this.countryCodes$ = this.languageService.translate('countryCodes');\n\n this.profile$ = this.store$.pipe(\n loginStatus(),\n switchMap((status) => {\n if (status === LoginStatus.INITIAL && this.nativeBridgeService.isInsideNativeWebView) {\n return of(undefined);\n }\n\n return this.store$.pipe(profileOrUndefinedIfNotLoggedIn());\n })\n );\n }\n\n /**\n * Search on the cart or order for a passenger with the ID passed to the function and create an empty\n * FormGroup for this passenger.\n */\n createPassengerFormGroup(\n paxId: string,\n isOrder: boolean = false,\n disabledFields: Array<keyof typeof PaxFormFields> = []\n ): Observable<PassengerDetails> {\n const data$ = (isOrder ? this.orderData$ : this.cartData$) as Observable<FinnairCart | FinnairOrder>;\n\n return data$.pipe(\n take(1),\n map((data) => {\n const { id, index } = this.getLocalPaxIdAndIndex(paxId, data.passengers);\n const passenger = data.passengers.find((pax) => pax.id === paxId);\n const controlData = data.controlData;\n const isPrimaryPax = data.passengers.findIndex((pax) => pax.id === paxId) === 0;\n\n const formGroup = this.fb.group({\n [PaxFormFields.type]: passenger.passengerTypeCode,\n [PaxFormFields.travelerId]: passenger.id,\n [PaxFormFields.gender]: ['', Validators.required],\n [PaxFormFields.firstName]: [\n {\n value: '',\n disabled: passenger.firstNameInputDisabled,\n },\n Validators.compose([\n Validators.required,\n Validators.minLength(2),\n Validators.maxLength(20),\n Validators.pattern(controlData?.nameRegex || NAME_PATTERN),\n ]),\n ],\n [PaxFormFields.lastName]: [\n {\n value: '',\n disabled: passenger.lastNameInputDisabled,\n },\n Validators.compose([\n Validators.required,\n Validators.minLength(2),\n Validators.maxLength(30),\n Validators.pattern(controlData?.nameRegex || NAME_PATTERN),\n ]),\n ],\n isPrimaryPax,\n id,\n number: index,\n });\n\n if (passenger.birthdayRequired) {\n formGroup.addControl(PaxFormFields.birthDate, this.createBirthdayGroup(passenger));\n }\n\n if (passenger.passengerTypeCode === FinnairPassengerCode.INF) {\n formGroup.addControl(PaxFormFields.travelling, this.fb.control('', Validators.required));\n } else {\n const emailValidators = [Validators.pattern(controlData?.emailRegex || EMAIL_PATTERN)];\n\n if (isPrimaryPax) {\n emailValidators.push(Validators.required);\n }\n\n formGroup.addControl(PaxFormFields.email, this.fb.control('', emailValidators));\n formGroup.addControl(\n PaxFormFields.phone,\n this.fb.group({\n [PaxFormFields.phonePrefix]: '',\n [PaxFormFields.phoneNumber]: '',\n })\n );\n formGroup.addControl(\n PaxFormFields.frequentFlyerCard,\n this.fb.group({\n [PaxFormFields.companyCode]: '',\n [PaxFormFields.cardNumber]: '',\n })\n );\n formGroup.addControl(PaxFormFields.joinFinnairPlus, this.fb.control(''));\n }\n\n disabledFields.forEach((name: keyof typeof PaxFormFields) => {\n formGroup.get(name)?.disable();\n });\n\n return {\n group: formGroup as TypedFormGroup<UntypedFormGroup | UntypedFormControl>,\n years: this.getPassengerYearLimits(passenger),\n typeLocalizationKey: asPaxTypeKey(passenger.passengerTypeCode).toLowerCase(),\n availableDays$: this.getAvailableDays(formGroup),\n };\n })\n );\n }\n\n /**\n * Pass in a single passenger FormGroup and a list of sources you want to prefill.\n *\n * The sources are prioritised so that if sources[0] fills in a value, sources[1] will skip\n * it as it is lower priority.\n */\n prefillData(\n passenger: PassengerDetails,\n sources: PrefillSource[],\n corporateUser?: CorporateUser\n ): Observable<PassengerDetails> {\n const prefillMap = {\n [PrefillSource.ORDER]: this.getPrefillFromOrder,\n [PrefillSource.CART]: this.getPrefillFromCart,\n [PrefillSource.PROFILE]: this.getPrefillFromProfile,\n [PrefillSource.SESSION]: this.getPrefillFromSession,\n [PrefillSource.CORPORATE]: () => this.getPrefillFromCorporate(corporateUser),\n };\n // Corporate prefill should overwrite any existing values\n const overwrite = !!corporateUser;\n\n return combineLatest(\n sources.map((source): Observable<Partial<PaxDetailsFormData>> => {\n // .apply is used here because we lose scope when calling the prefill methods\n return prefillMap[source].apply(this, [\n passenger.group.get(PaxFormFields.travelerId).value,\n passenger.group.get(PaxFormFields.id).value,\n ]);\n })\n ).pipe(\n take(1),\n map((prefillFromSource) => {\n prefillFromSource.forEach((data: Partial<PaxDetailsFormData>) => {\n setValueIfEmpty(passenger.group.get(PaxFormFields.gender), data.gender, overwrite);\n setValueIfEmpty(passenger.group.get(PaxFormFields.firstName), data.firstName, overwrite);\n\n setValueIfEmpty(passenger.group.get(PaxFormFields.lastName), data.lastName, overwrite);\n setValueIfEmpty(passenger.group.get(PaxFormFields.email), data.email, overwrite);\n setValueIfEmpty(passenger.group.get(PaxFormFields.travelling), data.travelling, overwrite);\n setValueIfEmpty(passenger.group.get(PaxFormFields.joinFinnairPlus), data.joinFinnairPlus, overwrite);\n\n setGroupValueIfEmpty(passenger.group.get(PaxFormFields.phone), data.phone, overwrite);\n setGroupValueIfEmpty(passenger.group.get(PaxFormFields.birthDate), data.birthDate, overwrite);\n setGroupValueIfEmpty(passenger.group.get(PaxFormFields.frequentFlyerCard), data.frequentFlyerCard, overwrite);\n });\n\n return passenger;\n })\n );\n }\n\n private getPrefill(\n paxId,\n _id: string,\n cartOrOrder$: Observable<FinnairCart | FinnairOrder>,\n sessionData$: Observable<PaxDetailsState>\n ): Observable<Partial<PaxDetailsFormData>> {\n return combineLatest([cartOrOrder$, sessionData$]).pipe(\n take(1),\n map(([cartData, sessionData]) => {\n const matchedPassenger = cartData.passengers.find((pax) => pax.id === paxId);\n\n if (!matchedPassenger) {\n return {};\n }\n\n const cartPrefill: Partial<PaxDetailsFormData> = {\n firstName: matchedPassenger.firstName,\n lastName: matchedPassenger.lastName,\n gender: finnairGenderToGenderOption(matchedPassenger.gender),\n travelling: sessionData?.passengers.find((pax) => pax.travelerId === matchedPassenger.accompanyingTravelerId)\n ?.id,\n email: matchedPassenger.email,\n };\n\n if (matchedPassenger.phoneNumbers?.[0]) {\n const prefix = matchedPassenger.phoneNumbers[0].countryPrefix;\n const code = matchedPassenger.phoneNumbers[0].countryCode.replace('+', '');\n\n cartPrefill.phone = {\n phonePrefix: `${code}|${prefix}`,\n phoneNumber: matchedPassenger.phoneNumbers[0].number,\n };\n }\n\n if (matchedPassenger.dateOfBirth) {\n cartPrefill.birthDate = formatToDateOfBirth(matchedPassenger.dateOfBirth);\n }\n\n const frequentFlyerCard = matchedPassenger.frequentFlyerCards?.[0];\n\n if (frequentFlyerCard) {\n cartPrefill.frequentFlyerCard = {\n cardNumber: frequentFlyerCard.cardNumber,\n companyCode: frequentFlyerCard.companyCode,\n };\n }\n\n return cartPrefill;\n })\n );\n }\n\n private getPrefillFromCart(paxId: string, _id: string) {\n return this.getPrefill(paxId, _id, this.cartData$, this.sessionData$);\n }\n\n private getPrefillFromOrder(paxId: string, _id: string) {\n return this.getPrefill(paxId, _id, this.orderData$, of(null));\n }\n\n /**\n * The \"session\" refers to `paxDetails` in the store, which are saved into session storage\n */\n private getPrefillFromSession(_paxId: string, id: string): Observable<Partial<PaxDetailsFormData>> {\n return this.sessionData$.pipe(\n take(1),\n map((paxDetails) => {\n const matchedPax = paxDetails?.passengers.find((pax) => {\n return pax.id === id;\n });\n\n if (!matchedPax) {\n return {};\n }\n\n return matchedPax;\n })\n );\n }\n\n private getPrefillFromProfile(_paxId: string, id: string): Observable<Partial<PaxDetailsFormData>> {\n // We can only get the first passenger from the profile, so therefore returning empty Observable if not the first passenger\n if (id !== 'ADULT1') {\n return of({});\n }\n\n return this.profile$.pipe(\n switchMap((profile) => {\n return combineLatest([\n of(profile),\n this.phonePrefixService.getCountryCodeFromPhonePrefix(profile?.parsedMobilePhone?.countryCode),\n ]);\n }),\n map(([profile, countryCode]) => {\n if (!profile) {\n return {};\n }\n\n const mobilePhone: ParsedPhone = profile.parsedMobilePhone;\n const safeMobilePhone = {\n phoneNumber: mobilePhone?.nationalNumber ? mobilePhone.nationalNumber.toString() : null,\n regionCode: mobilePhone && isNotEmpty(mobilePhone.regionCodes) ? mobilePhone.regionCodes[0] : null,\n countryCode: mobilePhone?.countryCode ? mobilePhone.countryCode.toString() : null,\n };\n\n const birthDate = formatToDateOfBirth(profile.dateOfBirth);\n\n const getFrequentFlyerDetailsFromProfile = () => {\n return {\n companyCode: profile.tier !== ProfileTier.ACCOUNT && profile.memberNumber ? 'AY' : '',\n cardNumber: profile.memberNumber || '',\n };\n };\n\n return {\n email: profile.email,\n firstName: profile.firstname,\n gender: loginGenderToGenderOption(profile.gender),\n frequentFlyerCard: getFrequentFlyerDetailsFromProfile(),\n joinFinnairPlus: false,\n lastName: profile.lastname,\n phone: {\n phoneNumber: safeMobilePhone.phoneNumber,\n phonePrefix: safePhonePrefix(countryCode, safeMobilePhone.countryCode),\n },\n birthDate: birthDate || { yearOfBirth: '', monthOfBirth: '', dateOfBirth: '' },\n };\n })\n );\n }\n\n private getPrefillFromCorporate(user: CorporateUser): Observable<Partial<PaxDetailsFormData>> {\n return this.countryCodes$.pipe(\n take(1),\n map((countryCodes) => {\n const phone = splitPhoneNumber(user.mobile || user.workPhone, countryCodes);\n return {\n email: user.email,\n firstName: user.firstname,\n gender: corporateSalutationToGenderOption(user.title),\n frequentFlyerCard: {\n companyCode: user.finnairPlus ? 'AY' : '',\n cardNumber: user.finnairPlus,\n },\n joinFinnairPlus: false,\n lastName: user.lastname,\n phone: {\n phonePrefix: phone[0],\n phoneNumber: phone[1],\n },\n };\n })\n );\n }\n\n private createBirthdayGroup(passenger: FinnairPassengerItem): UntypedFormGroup {\n return this.fb.group(\n {\n dateOfBirth: ['', Validators.required],\n monthOfBirth: ['', Validators.required],\n yearOfBirth: ['', Validators.required],\n },\n {\n validator: this.ageValidation(\n passenger.passengerTypeCode,\n passenger.minBirthDateInclusive,\n passenger.maxBirthDateInclusive\n ),\n }\n );\n }\n\n private ageValidation(\n type: FinnairPassengerCode | string,\n minBirthDateInclusiveStr: string,\n maxBirthDateInclusiveStr: string\n ): (formGroup: UntypedFormGroup) => ValidationErrors {\n const minBirthDateInclusive: LocalDate = new LocalDate(minBirthDateInclusiveStr);\n const maxBirthDateInclusive: LocalDate = new LocalDate(maxBirthDateInclusiveStr);\n\n return (formGroup: UntypedFormGroup) => {\n const yearOfBirth = formGroup.get(PaxFormFields.yearOfBirth).value;\n const monthOfBirth = formGroup.get(PaxFormFields.monthOfBirth).value;\n const dateOfBirth = formGroup.get(PaxFormFields.dateOfBirth).value;\n if (!yearOfBirth || !monthOfBirth || !dateOfBirth) {\n return {};\n }\n const birthDate: LocalDate = LocalDate.forDate(yearOfBirth, monthOfBirth, dateOfBirth);\n\n return this.paxValidationService.validatePaxAge(type, birthDate, minBirthDateInclusive, maxBirthDateInclusive);\n };\n }\n\n private getAvailableDays(formGroup: UntypedFormGroup): Observable<number[]> {\n if (!formGroup?.get(PaxFormFields.birthDate)) {\n return NEVER as Observable<number[]>;\n }\n\n const yearOfBirth = formGroup.get(PaxFormFields.birthDate).get(PaxFormFields.yearOfBirth);\n const monthOfBirth = formGroup.get(PaxFormFields.birthDate).get(PaxFormFields.monthOfBirth);\n\n return combineLatest({\n year: yearOfBirth.valueChanges.pipe(startWith(yearOfBirth.value), filter(isTruthy)),\n month: monthOfBirth.valueChanges.pipe(startWith(monthOfBirth.value), filter(isTruthy)),\n }).pipe(\n map(({ year, month }) => numberOfDaysInMonth(Number(year))[Number(month) - 1]),\n map((numberOfDays) => rangeFrom(1, numberOfDays)),\n startWith(rangeFrom(1, 31)),\n distinctUntilChanged(),\n finShare()\n );\n }\n\n private getPassengerYearLimits(passenger: FinnairPassengerItem): number[] {\n return rangeBetween(\n new Date(passenger.minBirthDateInclusive).getFullYear(),\n new Date(passenger.maxBirthDateInclusive).getFullYear()\n ).reverse();\n }\n\n /**\n * Creates an `id` that is in the format `ADULT1` `ADULT2` `C151`, `INFANT1`. The number at the\n * end of the pax type increases by 1 for each passenger of that type (e.g Adult, C15, Child,\n * Infant).\n *\n * Creates an `index` that is a NOT specific to a passenger type. If there is 5 passengers in the\n * cart then `5` will be returned for the last passenger.\n *\n * All indexes are human readable, starting at 1.\n */\n private getLocalPaxIdAndIndex(paxId: string, passengers: FinnairPassengerItem[]): { id: string; index: number } {\n const pax = passengers.find((passenger) => passenger.id === paxId);\n const paxType = pax?.passengerTypeCode;\n const paxFilteredByType = passengers.filter((passenger) => {\n return passenger?.passengerTypeCode === paxType;\n });\n const indexInType = paxFilteredByType.findIndex((passenger) => {\n return passenger.id === paxId;\n });\n const indexInTotal = passengers.findIndex((passenger) => {\n return passenger.id === paxId;\n });\n\n return { id: `${asPaxTypeKey(paxType)}${indexInType + 1}`, index: indexInTotal + 1 };\n }\n}\n","'use strict';\n\nvar reflectGetProto = require('./Reflect.getPrototypeOf');\nvar originalGetProto = require('./Object.getPrototypeOf');\n\nvar getDunderProto = require('dunder-proto/get');\n\n/** @type {import('.')} */\nmodule.exports = reflectGetProto\n\t? function getProto(O) {\n\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\treturn reflectGetProto(O);\n\t}\n\t: originalGetProto\n\t\t? function getProto(O) {\n\t\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\t\tthrow new TypeError('getProto: not an object');\n\t\t\t}\n\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\treturn originalGetProto(O);\n\t\t}\n\t\t: getDunderProto\n\t\t\t? function getProto(O) {\n\t\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\t\treturn getDunderProto(O);\n\t\t\t}\n\t\t\t: null;\n","<div\n *ngIf=\"endpoint\"\n class=\"endpoint-time grow fill flex flex--wrap flex--middle flex--column {{ wrapAt ? 'wrap-at-' + wrapAt : '' }}\"\n [class.flex--row-reverse]=\"reverse\"\n>\n <div\n class=\"endpoint-time-location flex--nogrow font-body-1 regular-type rounded white-text ps-xsmall-x ms-xxsmall-y nordic-blue-900-bg\"\n [ngClass]=\"{ 'align-end': reverse, 'align-start': !reverse }\"\n >\n {{ endpoint.locationCode }}\n </div>\n <div\n class=\"endpoint-time-date-time flex--nogrow font-body-1 light-type\"\n [ngClass]=\"{ 'align-right': reverse, 'align-left': !reverse }\"\n >\n <time [attr.datetime]=\"endpoint.dateTime\">{{ endpoint.dateTime | finTime }}</time>\n <span class=\"ps-xxsmall-l\">{{ endpoint.dateTime | finDateFormat: 'WEEKDAY_SHORT' }}</span>\n </div>\n</div>\n","import { Component, Input, HostBinding } from '@angular/core';\n\nimport { Breakpoint } from '@fcom/common/interfaces';\nimport { LegEndpoint } from '@fcom/dapi';\n\n@Component({\n selector: 'fin-endpoint-time',\n templateUrl: './endpoint-time.component.html',\n styleUrls: ['./endpoint-time.component.scss'],\n})\nexport class EndpointTimeComponent {\n @HostBinding('class.block') defaultClass = true;\n @Input()\n endpoint: LegEndpoint;\n\n @Input()\n reverse = false;\n\n @Input()\n wrapAt: Breakpoint;\n}\n","'use strict';\n\n/** @type {import('.')} */\nvar $gOPD = require('./gOPD');\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","import {\n DataCloudFlightSelectionData,\n DataCloudIdentityData,\n OfferListFetchParams,\n PreFlightSearchParams,\n} from '../../interfaces';\n\nexport abstract class DataCloudService {\n abstract preFlightSearch(data: PreFlightSearchParams): void;\n\n abstract flightSearch(data: OfferListFetchParams): void;\n\n abstract flightSelectionSelect(data: DataCloudFlightSelectionData[]): void;\n\n abstract paxDetails(data: DataCloudIdentityData): void;\n\n abstract mmbPaxDetails(data: DataCloudIdentityData): void;\n\n abstract signupPaxDetails(data: DataCloudIdentityData): void;\n\n abstract subscriberId(subscriberId: string): void;\n\n abstract completePurchase(): void;\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule } from '@fcom/ui-components';\n\nimport { DirectiveModule } from '../directives/directive.module';\nimport { PipesModule } from '../pipes';\nimport { InputFieldComponent } from './input-field.component';\nimport { FormFieldsComponent } from './form-fields.component';\nimport { FormGroupComponent } from './form-group.component';\nimport { InputCheckboxComponent } from './input-checkbox.component';\nimport { SimpleSelectFieldComponent } from './simple-select-field.component';\nimport { PlusMinusSelectorComponent } from './plus-minus-selector/plus-minus-selector.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PipesModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n DirectiveModule,\n UiTranslateModule,\n IconsModule,\n ],\n declarations: [\n InputCheckboxComponent,\n InputFieldComponent,\n SimpleSelectFieldComponent,\n FormFieldsComponent,\n FormGroupComponent,\n PlusMinusSelectorComponent,\n ],\n exports: [\n FormsModule,\n ReactiveFormsModule,\n InputCheckboxComponent,\n InputFieldComponent,\n SimpleSelectFieldComponent,\n FormFieldsComponent,\n FormGroupComponent,\n PlusMinusSelectorComponent,\n ],\n})\nexport class FinFormsModule {}\n","<div class=\"absolute z5 float-right mr-large-r mr-xsmall-t\">\n <div\n *ngIf=\"messageType$ | async; else content\"\n fcomPopover\n [options]=\"popoverOptions\"\n [content]=\"contentPopover\"\n [ariaCloseText]=\"'welcomeBackMessage.closeText' | finLocalization\"\n (closeClick)=\"onCloseClick()\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-template #contentPopover>\n <div [ngSwitch]=\"messageType$ | async\" class=\"align-left nordic-blue-900-text\">\n <ng-container *ngSwitchCase=\"MessageType.ANONYMOUS\">\n <h2 class=\"font-heading-4 normal-type ms-xxsmall-t\">\n {{ 'welcomeBackMessage.anonymousUserTextTitle' | finLocalization }}\n </h2>\n\n <p class=\"font-body-1 ms-medium-t regular-type\">\n {{ 'welcomeBackMessage.anonymousUserTextBody' | finLocalization }}\n </p>\n <div class=\"align-right ms-medium-t\">\n <fcom-button\n class=\"font-body-1 bold-type\"\n (clickBtn)=\"onJoinButtonClick()\"\n [text]=\"'welcomeBackMessage.anonymousUserTextButton' | finLocalization\"\n data-testid=\"welcome-back-message-join-button\"\n ></fcom-button>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"MessageType.FPLUS_MEMBER\">\n <h2 class=\"font-heading-4 normal-type ms-xxsmall-t\">\n {{ 'welcomeBackMessage.plusMemberTextTitle' | finLocalization }}\n </h2>\n <p class=\"font-body-1 ms-medium-t regular-type\">\n {{ 'welcomeBackMessage.plusMemberTextBody' | finLocalization }}\n </p>\n <div class=\"align-right ms-medium-t\">\n <fcom-button\n class=\"font-body-1 bold-type\"\n (clickBtn)=\"onLoginButtonClick()\"\n [text]=\"'welcomeBackMessage.plusMemberTextButton' | finLocalization\"\n data-testid=\"welcome-back-message-login-button\"\n ></fcom-button>\n </div>\n </ng-container>\n </div>\n</ng-template>\n","import { Component, Inject, OnInit, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { Store } from '@ngrx/store';\nimport { EMPTY, Observable } from 'rxjs';\nimport { filter, map, switchMap, tap } from 'rxjs/operators';\n\nimport { PopoverOptions, ButtonSize, PopoverPosition } from '@fcom/ui-components';\nimport { AppState, ConfigService, StorageService } from '@fcom/core';\nimport { LoginStatus, LoginStep } from '@fcom/core-api/login';\nimport { loginStatus } from '@fcom/core/selectors';\nimport { PersonalizationTrackingService } from '@fcom/loyalty-personalization/services/personalization-tracking.service';\nimport { finShare } from '@fcom/rx';\nimport { LoginActions } from '@fcom/core/actions';\n\nimport { GtmService } from '../../gtm';\nimport { ElementActions, ElementTypes, GaContext } from '../../interfaces';\nimport { WelcomeBackMessageService, WELCOME_BACK_MESSAGE_CLOSED_KEY } from '../../services';\nimport { JoinService, LoginService } from '../../login/services';\n\nenum MessageType {\n FPLUS_MEMBER = 'fplus-member',\n ANONYMOUS = 'anonymous',\n}\n\nconst TRACKING_ELEMENT_NAME = 'welcome-back-message';\n\n@Component({\n selector: 'fin-welcome-back-message',\n templateUrl: './welcome-back-message.component.html',\n})\nexport class WelcomeBackMessageComponent implements OnInit {\n readonly MessageType = MessageType;\n\n readonly ButtonSize = ButtonSize;\n\n popoverOptions: PopoverOptions = {\n popoverID: 'welcome-back-message',\n openByDefault: true,\n showCloseButton: true,\n closeOnScroll: false,\n showArrowCaret: false,\n showLeftBorder: false,\n popoverPosition: PopoverPosition.BOTTOM,\n roundedCorners: true,\n useFixedPosition: true,\n };\n\n messageType$: Observable<MessageType>;\n\n constructor(\n private store$: Store<AppState>,\n private storageService: StorageService,\n private loginService: LoginService,\n private gtmService: GtmService,\n public joinService: JoinService,\n private personalizationTrackingService: PersonalizationTrackingService,\n private configService: ConfigService,\n private welcomeBackMessageService: WelcomeBackMessageService,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n if (this.storageService.SESSION.get(WELCOME_BACK_MESSAGE_CLOSED_KEY) || isPlatformServer(this.platform)) {\n this.messageType$ = EMPTY;\n } else {\n this.messageType$ = this.store$.pipe(\n loginStatus(),\n filter((status) => status === LoginStatus.NOT_LOGGED_IN),\n tap(() => this.trackGtm('view', ElementActions.VIEW)),\n switchMap(() =>\n this.personalizationTrackingService\n .isNotLoggedInFPlusMember()\n .pipe(\n map((isNotLoggedInFPlusMember) =>\n isNotLoggedInFPlusMember ? MessageType.FPLUS_MEMBER : MessageType.ANONYMOUS\n )\n )\n ),\n finShare()\n );\n }\n }\n\n onLoginButtonClick(): void {\n this.trackGtm('login', ElementActions.CLICK);\n if (this.configService.cfg.enableLoginDialog) {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n } else {\n this.loginService.redirectToLogin();\n }\n }\n\n onJoinButtonClick(): void {\n this.trackGtm('join', ElementActions.CLICK);\n if (this.configService.cfg.enableJoinDialog) {\n this.joinService.joinDialogOpen$.next(true);\n } else {\n this.loginService.redirectToJoin();\n }\n }\n\n onCloseClick(): void {\n this.trackGtm('close', ElementActions.CLOSE);\n this.welcomeBackMessageService.close();\n }\n\n private trackGtm(eventName: string, action: ElementActions): void {\n this.gtmService.trackElement(TRACKING_ELEMENT_NAME, GaContext.FINNAIR_PLUS, ElementTypes.BANNER, eventName, action);\n }\n}\n","<ul class=\"no-list-style\">\n <li>\n <button\n *ngFor=\"let bound of bounds | async; let index = index; let first = first; let last = last\"\n (click)=\"clickedBound.emit({ bound, index })\"\n class=\"flight-summary flex fill ps-small border\"\n [ngClass]=\"{\n 'rounded-top-large': first && !last,\n 'rounded-bottom-large': !first && last,\n 'rounded-large': first && last,\n first: first,\n }\"\n [attr.aria-label]=\"\n 'multiCity.flightSelection.returnToBoundAria'\n | finLocalization\n : {\n bound: index + 1,\n origin: bound.departure.locationCode | finLocationName,\n destination: bound.arrival.locationCode | finLocationName,\n date: bound.departure.dateTime | finDateFormat: 'DATE',\n }\n \"\n >\n <div class=\"flex-1 align-left\">\n <span *ngIf=\"listStyle === 'ordered'\" class=\"bold-type\">\n {{ 'multiCity.flightSelection.flightNumber' | finLocalization: [index + 1] }},\n </span>\n <span *ngIf=\"listStyle === 'departure-return'\" class=\"bold-type\">\n {{\n index === 0\n ? ('ticketSelection.departure' | finLocalization)\n : ('ticketSelection.return' | finLocalization)\n }},</span\n >\n <span class=\"ps-xxsmall-l\">{{ bound.departure.dateTime | finDateFormat: 'DATE' }}</span>\n </div>\n <div class=\"flex-1 align-right\">\n <span>\n <span class=\"medium-type\">{{ bound.departure.dateTime | finTime }}</span>\n <span class=\"ps-xsmall-x\">{{ bound.departure.locationCode | finLocationName }}</span>\n </span>\n <span class=\"ps-xsmall-r\">-</span>\n <span>\n <span class=\"medium-type\">{{ bound.arrival.dateTime | finTime }}</span>\n <span class=\"ps-xsmall-x\">{{ bound.arrival.locationCode | finLocationName }}</span>\n </span>\n <fcom-icon [name]=\"SvgLibraryIcon.CHECKMARK\"></fcom-icon>\n </div>\n </button>\n </li>\n</ul>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { Bound } from '@fcom/dapi/api/models';\n\n@Component({\n selector: 'fin-flight-selection-flight-summary',\n templateUrl: './flight-summary.component.html',\n styleUrls: ['./flight-summary.component.scss'],\n})\nexport class FlightSelectionFlightSummaryComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() listStyle: 'ordered' | 'departure-return' = 'departure-return';\n @Input({ required: true }) bounds: Observable<Bound[]>;\n @Output() clickedBound = new EventEmitter<{\n bound: Bound;\n index: number;\n }>();\n}\n","<iframe\n *ngIf=\"renderIframe$ | async\"\n [attr.src]=\"iframeSrc$ | async | finSafe: 'resource'\"\n class=\"is-vishidden\"\n title=\"\"\n aria-hidden=\"true\"\n></iframe>\n","import { ChangeDetectionStrategy, Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { BehaviorSubject, of, ReplaySubject, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { ConfigService, NativeBridgeService, PostMessenger, WindowRef } from '@fcom/core';\nimport { LoginPostMessage } from '@fcom/core-api/login';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { safeMap } from '@fcom/rx';\n\nimport { LoginService } from '../services';\n\n@Component({\n selector: 'fin-login-iframe',\n templateUrl: './login-iframe.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoginIframeComponent implements OnInit, OnDestroy {\n renderIframe$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n iframeSrc$: ReplaySubject<string> = new ReplaySubject(1);\n supportedEventTypes = ['loginSuccess', 'mobileAppLoginSuccess', 'mobileAppGuestLogin'];\n\n private messenger: PostMessenger<LoginPostMessage>;\n private subscriptions: Subscription = new Subscription();\n\n constructor(\n private loginService: LoginService,\n private windowRef: WindowRef,\n private nativeBridgeService: NativeBridgeService,\n private configService: ConfigService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n const originSelf = this.windowRef.nativeWindow.location.origin;\n this.messenger = new PostMessenger(this.windowRef, of([this.configService.cfg.apiBaseUrl, originSelf]), platform);\n }\n\n ngOnInit(): void {\n if (isPlatformServer(this.platform)) {\n this.renderIframe$.next(false);\n this.renderIframe$.complete();\n return;\n }\n this.listenToLoginPostMessages();\n if (!this.nativeBridgeService.isInsideNativeWebView || this.nativeBridgeService.isLocalView) {\n this.renderIframeOnLoginTrigger();\n this.loginService.initSsoLoginSession();\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n private listenToLoginPostMessages() {\n this.subscriptions.add(\n this.messenger.inbound$\n .pipe(\n filter((msg) => {\n // Filter out Devtool postMessages and the Augury chrome extension\n return msg && this.supportedEventTypes.includes(msg.eventType);\n })\n )\n .subscribe((msg: LoginPostMessage) => {\n this.loginService.handleLoginEvent(msg);\n this.renderIframe$.next(false);\n })\n );\n this.nativeBridgeService.clientReady();\n }\n\n private renderIframeOnLoginTrigger() {\n this.subscriptions.add(\n this.loginService.loginTrigger$\n .pipe(\n safeMap(\n (nonce) =>\n `${this.configService.cfg.apiBaseUrl}${\n this.configService.cfg.uxAuthBasePath\n }/init?nonce=${encodeURIComponent(nonce)}&redirectPath=${encodeURIComponent(\n this.windowRef.nativeWindow.location.href\n )}`\n )\n )\n .subscribe((iframeSrc) => {\n this.iframeSrc$.next(iframeSrc);\n this.renderIframe$.next(true);\n })\n );\n }\n}\n","<fcom-modal\n *finLet=\"consentApiStatus$ | async as consentApiStatus\"\n [open]=\"modalOpen\"\n [buttons]=\"ModalButtons.CUSTOM\"\n [fitToContent]=\"true\"\n [title]=\"\n consentApiStatus === ConsentApiStatus.NOT_LOADED || consentApiStatus === ConsentApiStatus.LOADED\n ? ('plus.memberMarketingPreferences.title' | finLocalization)\n : consentApiStatus === ConsentApiStatus.SAVED\n ? ('plus.memberMarketingPreferences.successTitle' | finLocalization)\n : ('plus.memberMarketingPreferences.errorTitle' | finLocalization)\n \"\n [forceRemainOpen]=\"modalOpen\"\n>\n <ng-container *finLet=\"consentGroup$ | async as consentGroup\" [ngSwitch]=\"consentApiStatus\">\n <fcom-loader *ngSwitchCase=\"ConsentApiStatus.NOT_LOADED\"> </fcom-loader>\n <form\n *ngSwitchCase=\"ConsentApiStatus.LOADED\"\n [formGroup]=\"marketingPreferencesForm\"\n (ngSubmit)=\"sendConsents()\"\n class=\"marketing-preferences pr-large-x pr-medium-y text\"\n >\n <fieldset>\n <legend class=\"align-left\">\n <div class=\"font-body-1\">\n <p class=\"pr-small-b ps-xxsmall-t\">\n {{ 'plus.memberMarketingPreferences.memberNumber' | finLocalization }}:\n <strong>{{ consentGroup.fplusMember }}</strong>\n </p>\n <p\n data-testid=\"cms-description\"\n [innerHTML]=\"'plus.memberMarketingPreferences.description' | finLocalization | finSafe: 'html'\"\n ></p>\n </div>\n </legend>\n\n <fcom-checkbox\n *ngFor=\"let consent of consentGroup.consents; let last = last\"\n [formControlName]=\"consent.consentTextId\"\n [formGroup]=\"marketingPreferencesForm\"\n [ngClass]=\"{\n block: true,\n 'ms-small-t': true,\n 'ms-small-b': last,\n }\"\n >\n <span class=\"content\" [innerHTML]=\"consent.text | finSafe: 'html'\"></span>\n </fcom-checkbox>\n </fieldset>\n <hr />\n <p\n class=\"pr-small-y align-left\"\n [innerHTML]=\"'plus.memberMarketingPreferences.disclaimer' | finLocalization | finSafe: 'html'\"\n ></p>\n </form>\n\n <p\n *ngSwitchCase=\"ConsentApiStatus.SAVED\"\n class=\"pr-large-x pr-small-y\"\n [innerHTML]=\"'plus.memberMarketingPreferences.success' | finLocalization | finSafe: 'html'\"\n ></p>\n\n <p\n *ngSwitchCase=\"ConsentApiStatus.ERROR\"\n class=\"pr-large-x pr-small-y\"\n [innerHTML]=\"'plus.memberMarketingPreferences.error' | finLocalization | finSafe: 'html'\"\n ></p>\n </ng-container>\n\n <div buttons>\n <ng-container [ngSwitch]=\"consentApiStatus\">\n <ng-container *ngSwitchCase=\"ConsentApiStatus.LOADED\">\n <fcom-button\n class=\"pr-xxsmall-l\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [text]=\"'plus.memberMarketingPreferences.saveButtonTitle' | finLocalization\"\n [disabled]=\"!marketingPreferencesForm?.valid\"\n data-testid=\"save-button\"\n (clickBtn)=\"sendConsents()\"\n ></fcom-button>\n </ng-container>\n <ng-container *ngSwitchCase=\"ConsentApiStatus.SAVED\">\n <fcom-button\n *finLet=\"successButtonUrl$ | async as successButtonUrl\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'plus.memberMarketingPreferences.successButtonTitle' | finLocalization\"\n data-testid=\"success-button\"\n (clickBtn)=\"onClick(successButtonUrl)\"\n ></fcom-button>\n </ng-container>\n <ng-container *ngSwitchCase=\"ConsentApiStatus.ERROR\">\n <fcom-button\n *finLet=\"errorButtonUrl$ | async as errorButtonUrl\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'plus.memberMarketingPreferences.errorButtonTitle' | finLocalization\"\n data-testid=\"error-button\"\n (clickBtn)=\"onClick(errorButtonUrl)\"\n ></fcom-button>\n </ng-container>\n </ng-container>\n </div>\n</fcom-modal>\n","import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, combineLatest, EMPTY, Observable, of, Subscription } from 'rxjs';\nimport { catchError, distinctUntilChanged, filter, map, switchMap, take } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ModalButtons, ButtonTheme } from '@fcom/ui-components';\nimport { ProfileType, ProfileTier, LoginMemberStatus } from '@fcom/core-api/login';\nimport { AppState } from '@fcom/core';\nimport { loginToken, profileType, profile } from '@fcom/core/selectors';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\n\nimport { Consent, ConsentGroup, ConsentStatus } from '../../interfaces';\nimport { ConsentService, ConsentToken, ConsentTokenType } from '../services/consent.service';\n\nexport enum ConsentApiStatus {\n NOT_LOADED = 'NOT_LOADED',\n LOADED = 'LOADED',\n SAVED = 'SAVED',\n ERROR = 'ERROR',\n}\n\nconst consentPreferencesToken = 'consent_preferences_token';\n\n@Component({\n selector: 'fin-marketing-preferences',\n styleUrls: ['marketing-preferences.component.scss'],\n templateUrl: 'marketing-preferences.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MarketingPreferencesComponent implements OnInit, OnDestroy {\n marketingPreferencesForm: UntypedFormGroup;\n\n modalOpen = false;\n consentApiStatus$ = new BehaviorSubject<ConsentApiStatus>(ConsentApiStatus.NOT_LOADED);\n consentGroup$: Observable<ConsentGroup>;\n\n successButtonUrl$: Observable<string>;\n errorButtonUrl$: Observable<string>;\n\n tokenFromUrl: boolean;\n\n private subscription: Subscription = new Subscription();\n private token$: Observable<ConsentToken>;\n\n readonly CustomIcon = CustomIcon;\n readonly IconLibrary = IconLibrary;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly ConsentApiStatus = ConsentApiStatus;\n readonly ButtonTheme = ButtonTheme;\n readonly ModalButtons = ModalButtons;\n\n token: string;\n\n constructor(\n private consentService: ConsentService,\n private store$: Store<AppState>,\n private languageService: LanguageService,\n private route: ActivatedRoute,\n public router: Router,\n private changeDetectorRef: ChangeDetectorRef,\n private fb: UntypedFormBuilder\n ) {}\n\n ngOnInit(): void {\n const token = this.route.snapshot.queryParamMap.get(consentPreferencesToken);\n\n let accountType$: Observable<ProfileType>;\n\n if (token) {\n this.tokenFromUrl = true;\n this.token$ = of({ token, type: ConsentTokenType.CAT });\n accountType$ = of(ProfileType.FPLUS);\n this.modalOpen = true;\n } else {\n this.tokenFromUrl = false;\n this.token$ = this.store$.pipe(\n loginToken(),\n filter((v) => !!v),\n take(1),\n map((v) => ({\n token: v,\n }))\n );\n accountType$ = this.store$.pipe(\n profileType(),\n filter((v) => !!v),\n take(1)\n );\n }\n\n this.consentGroup$ = combineLatest([this.token$, accountType$]).pipe(\n switchMap(([authHeaderValue, type]) => {\n return this.consentService.getMarketingConsents(authHeaderValue, type);\n }),\n filter((v) => {\n return !!v;\n }),\n finShare(),\n catchError(() => {\n this.consentApiStatus$.next(ConsentApiStatus.ERROR);\n return EMPTY;\n })\n );\n\n this.subscription.add(\n this.consentGroup$.subscribe(({ consents }) => {\n this.createMarketingConsentForm(consents);\n this.consentApiStatus$.next(ConsentApiStatus.LOADED);\n })\n );\n\n this.subscription.add(\n this.store$.pipe(profile(), take(1)).subscribe((currentProfile) => {\n if (currentProfile.tier === ProfileTier.ACCOUNT && currentProfile.memberStatus === LoginMemberStatus.PENDING) {\n this.sendConsents();\n } else {\n this.checkReconsent();\n }\n })\n );\n\n this.successButtonUrl$ = this.languageService\n .translate('plus.memberMarketingPreferences.successButtonLink.url')\n .pipe(\n distinctUntilChanged(),\n filter((v) => !!v)\n );\n\n this.errorButtonUrl$ = this.languageService.translate('plus.memberMarketingPreferences.errorButtonLink.url').pipe(\n distinctUntilChanged(),\n filter((v) => !!v)\n );\n }\n\n checkReconsent(): void {\n this.subscription.add(\n this.consentGroup$\n .pipe(\n filter((group) => group.consents.filter((a) => a.reConsentRequired === true).length > 0),\n take(1)\n )\n .subscribe(() => {\n this.modalOpen = true;\n })\n );\n }\n\n sendConsents(): void {\n const formData = this.marketingPreferencesForm;\n\n setTimeout(() => {\n this.consentApiStatus$.next(ConsentApiStatus.NOT_LOADED);\n }, 0);\n\n this.subscription.add(\n combineLatest([this.token$, this.consentGroup$])\n .pipe(\n switchMap(([token, consentGroup]: [ConsentToken, ConsentGroup]) => {\n if (!this.tokenFromUrl) {\n this.consentApiStatus$.next(ConsentApiStatus.SAVED);\n this.closeModal();\n }\n return this.consentService.sendConsents(\n token,\n consentGroup.consents.map(\n (c) =>\n ({\n ...c,\n consentStatus: formData?.value[c.consentTextId] ? ConsentStatus.ACCEPTED : ConsentStatus.DECLINED,\n }) as Consent\n )\n );\n })\n )\n .subscribe(() => {\n this.consentApiStatus$.next(ConsentApiStatus.SAVED);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n closeModal(): void {\n this.modalOpen = false;\n\n this.router.navigate([], {\n relativeTo: this.route,\n queryParams: {\n [consentPreferencesToken]: null,\n },\n queryParamsHandling: 'merge',\n });\n }\n\n onClick(url: string): void {\n this.modalOpen = false;\n this.changeDetectorRef.detectChanges();\n this.router.navigateByUrl(url);\n }\n\n private createMarketingConsentForm(consents: Consent[]) {\n const consentFields = consents.reduce((fields, consent) => {\n fields[consent.consentTextId] = this.fb.control(consent.consentStatus === 'accepted', { nonNullable: true });\n return fields;\n }, {});\n this.marketingPreferencesForm = this.fb.group({\n ...consentFields,\n });\n }\n}\n","<div\n *ngIf=\"profile$ | async as profile\"\n class=\"profile-quick-view white-bg grow relative {{\n (tierDataMap[profile.tier] || tierDataMap[ProfileTier.ACCOUNT]).className\n }}\"\n>\n <div class=\"top-section ps-large-y ps-medium-x\" data-hj-suppress>\n <ng-container *ngIf=\"!profile.isCorporate\">\n <ng-container *ngTemplateOutlet=\"fPlusHeader; context: { profile }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"profile.isCorporate\">\n <ng-container *ngTemplateOutlet=\"corporateHeader; context: { profile }\"></ng-container>\n </ng-container>\n </div>\n <div class=\"ps-xsmall-y\">\n <fcom-menu-list [items]=\"menuItems$ | async\" (itemClicked)=\"handleClick($event)\"></fcom-menu-list>\n </div>\n</div>\n\n<ng-template #fPlusHeader let-profile=\"profile\">\n <span class=\"font-body-2\">\n <ng-container *ngIf=\"profile.isJuniorMember\">\n {{ tierDataMap[profile.tier].juniorName || tierDataMap[ProfileTier.JUNIOR].name | finLocalization }}\n </ng-container>\n <ng-container *ngIf=\"!profile.isJuniorMember\">\n {{ (tierDataMap[profile.tier] || tierDataMap[ProfileTier.ACCOUNT]).name | finLocalization }}\n </ng-container>\n </span>\n <h4 class=\"font-heading-5 ms-large-t\">{{ profile.firstname }} {{ profile.lastname }}</h4>\n <span\n class=\"font-body-1 regular-type\"\n [innerHTML]=\"'finnairPlus.awardPoints' | finLocalization: { awardPoints: profile.awardPoints || 0 | finPoints }\"\n ></span>\n</ng-template>\n\n<ng-template #corporateHeader let-profile=\"profile\">\n <span class=\"font-body-2\">\n {{ profile.corporate.name }}\n </span>\n <h4 class=\"font-heading-5 ms-large-t ms-xxsmall-b\">{{ profile.firstname }} {{ profile.lastname }}</h4>\n <span class=\"font-body-1 regular-type\">{{ 'corporate.roles.' + profile.corporate.userRole | finLocalization }}</span>\n</ng-template>\n","import { Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output } from '@angular/core';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, startWith } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsDataService, RootPaths, WindowRef } from '@fcom/core';\nimport { CorporateUserRole, Profile, ProfileTier } from '@fcom/core-api/login';\nimport { pathIsWithinHardcodedPath } from '@fcom/core/utils/app-url-utils';\nimport { isNotBlank } from '@fcom/core/utils';\nimport { MenuItemIcon, MenuListItem } from '@fcom/common/interfaces';\nimport { LoyaltyRoutesPath } from '@fcom/loyalty-core/interfaces';\nimport { MenuListClickEvent } from '@fcom/ui-components/components/notifications/menu-list/menu-list.component';\nimport { IconPosition } from '@fcom/ui-components/components/icons';\n\nimport { MenuJson } from '../../../interfaces';\nimport { isCorporateAdminOrTravelBooker, LoginService } from '../../services';\n\nexport type TierDataMap = Record<\n ProfileTier[number],\n {\n name?: string;\n juniorName?: string;\n links: string;\n className: string;\n }\n>;\n\nconst logoutIcon: MenuItemIcon = {\n category: IconLibrary.SVG_LIBRARY,\n name: SvgLibraryIcon.LOGOUT,\n position: IconPosition.LEFT,\n};\n\n@Component({\n selector: 'fin-profile-quick-view',\n styleUrls: ['profile-quick-view.component.scss'],\n templateUrl: 'profile-quick-view.component.html',\n})\nexport class ProfileQuickViewComponent implements OnInit {\n @Output()\n popOverClosed = new EventEmitter<void>();\n\n @Input({ required: true })\n profile$: Observable<Profile>;\n\n readonly IconLibrary = IconLibrary;\n readonly ProfileTier = ProfileTier;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly LOGOUT_ID = 'logout-link';\n\n readonly tierDataMap: TierDataMap = {\n [ProfileTier.ACCOUNT]: {\n name: 'finnairPlus.tier.account',\n links: 'fragments.quickProfileViewLinksAccount.url',\n className: 'tier-account',\n },\n [ProfileTier.BASIC]: {\n name: 'finnairPlus.tier.basic',\n links: 'fragments.quickProfileViewLinksBasic.url',\n className: 'tier-basic',\n },\n [ProfileTier.JUNIOR]: {\n name: 'finnairPlus.tier.junior',\n links: 'fragments.quickProfileViewLinksJunior.url',\n className: 'tier-junior',\n },\n [ProfileTier.SILVER]: {\n name: 'finnairPlus.tier.silver',\n juniorName: 'finnairPlus.tier.juniorSilver',\n links: 'fragments.quickProfileViewLinksSilver.url',\n className: 'tier-silver',\n },\n [ProfileTier.GOLD]: {\n name: 'finnairPlus.tier.gold',\n juniorName: 'finnairPlus.tier.juniorGold',\n links: 'fragments.quickProfileViewLinksGold.url',\n className: 'tier-gold',\n },\n [ProfileTier.PLATINUM]: {\n name: 'finnairPlus.tier.platinum',\n juniorName: 'finnairPlus.tier.juniorPlatinum',\n links: 'fragments.quickProfileViewLinksPlatinum.url',\n className: 'tier-platinum',\n },\n [ProfileTier.LUMO]: {\n name: 'finnairPlus.tier.lumo',\n links: 'fragments.quickProfileViewLinksLumo.url',\n className: 'tier-lumo',\n },\n [ProfileTier.CORPORATE]: {\n links: 'fragments.quickProfileViewLinksCorporate.url',\n className: 'tier-corporate',\n },\n [CorporateUserRole.ADMIN]: {\n links: 'fragments.quickProfileViewLinksCorporateAdmin.url',\n className: 'tier-corporate',\n },\n };\n\n menuItems$: Observable<MenuListItem[]>;\n\n constructor(\n private loginService: LoginService,\n private elementRef: ElementRef,\n private languageService: LanguageService,\n private cmsDataService: CmsDataService,\n private windowRef: WindowRef\n ) {}\n\n ngOnInit(): void {\n this.menuItems$ = this.profile$.pipe(\n switchMap((memberProfile: Profile) => {\n const links = this.getLinks(memberProfile);\n return this.languageService.translate(links).pipe(\n filter(isNotBlank),\n switchMap((url) => this.cmsDataService.getFragmentJson<MenuJson>(url)),\n map(({ top }) => top.filter(({ link }) => !link.includes(LoyaltyRoutesPath.TIER_PROGRESS_AND_BENEFITS))),\n startWith([])\n );\n }),\n switchMap((menuItems: MenuListItem[]) => {\n return this.languageService.translate('login.logoutButton').pipe(\n map((logoutText) => [\n ...menuItems,\n {\n teaserTitle: logoutText,\n withDivider: true,\n icon: logoutIcon,\n id: this.LOGOUT_ID,\n external: false,\n attrs: {\n 'data-testid': 'profile-quick-view-logout-btn',\n },\n },\n ])\n );\n }),\n distinctUntilChanged()\n );\n }\n\n handleClick(e: MenuListClickEvent): void {\n if (e.itemId === this.LOGOUT_ID) {\n this.logout(e.originalEvent);\n }\n this.popOverClosed.emit();\n }\n\n logout(event: Event): void {\n const inFinnairPlus = pathIsWithinHardcodedPath(this.windowRef.nativeWindow.location.pathname, RootPaths.PLUS_ROOT);\n const inCorporate = pathIsWithinHardcodedPath(this.windowRef.nativeWindow.location.pathname, RootPaths.CORPORATE);\n const redirectPath = inFinnairPlus\n ? `/${this.languageService.langValue}`\n : inCorporate\n ? `/${this.languageService.langValue}/${RootPaths.CORPORATE}`\n : undefined;\n this.loginService.logout(redirectPath ? { redirectPath } : undefined);\n event.preventDefault();\n }\n\n @HostListener('document:click', ['$event'])\n clickOut(event: Event): void {\n if (!this.elementRef.nativeElement.contains(event.target)) {\n this.popOverClosed.emit();\n }\n }\n\n getLinks(memberProfile: Profile): string {\n if (isCorporateAdminOrTravelBooker(memberProfile)) {\n return this.tierDataMap[CorporateUserRole.ADMIN].links;\n }\n return this.tierDataMap[memberProfile.tier]?.links ?? 'fragments.quickProfileViewLinksBasic.url';\n }\n}\n","<ng-template #showIcon>\n <fcom-icon\n *ngIf=\"icon; else returnBtn\"\n [ngClass]=\"fullScreen ? 'icon-large' : 'icon-medium'\"\n [name]=\"icon\"\n ></fcom-icon>\n</ng-template>\n<ng-template #emptyIcon>\n <fcom-icon *ngIf=\"!icon && (stepperSteps$ | async)\" [name]=\"SvgLibraryIcon.EMPTY\"></fcom-icon>\n</ng-template>\n<ng-template #returnBtn>\n <button\n [attr.aria-label]=\"'actions.back' | finLocalization\"\n [attr.title]=\"'actions.back' | finLocalization\"\n (click)=\"returnClicked.emit($event)\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_LEFT\"></fcom-icon>\n </button>\n</ng-template>\n\n<div\n [style.height]=\"availableHeight < loginContainer?.clientHeight ? availableHeight - bottomMargin + 'px' : 'auto'\"\n [style.overflow]=\"availableHeight < loginContainer?.clientHeight ? 'auto' : 'unset'\"\n class=\"login-dialog login-dialog-open z5\"\n [class.overlay]=\"overlay && !fullScreen\"\n role=\"dialog\"\n data-testid=\"login-dialog-container\"\n>\n <div\n #loginContainer\n [class.grow]=\"fullScreen\"\n [ngClass]=\"{ 'rounded-large shadow': !fullScreen }\"\n class=\"content-container scroll\"\n clickOutsideException=\"fin-login-form-container\"\n (fcomClickOutside)=\"closeClicked.emit($event)\"\n data-testid=\"login-form-container-content-root\"\n >\n <div\n class=\"dialog-header white-bg ps-medium-x ps-medium-t ps-xsmall-b align-left\"\n [ngClass]=\"{ 'nordic-blue-900-bg white-text': invertHeaderColors }\"\n >\n <div *finLet=\"stepperSteps$ | async as steps\" class=\"flex flex--space-between\">\n <button\n *ngIf=\"showLeftIcon && steps; else emptyIcon\"\n [attr.aria-label]=\"'actions.back' | finLocalization\"\n [attr.title]=\"'actions.back' | finLocalization\"\n (click)=\"returnClicked.emit($event)\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CHEVRON_LEFT\"></fcom-icon>\n </button>\n <fcom-stepper\n *ngIf=\"steps; else showIcon\"\n class=\"inline-block\"\n [showLabels]=\"false\"\n [steps]=\"steps\"\n [theme]=\"StepperTheme.DARK\"\n [activeStep]=\"stepperActiveStep$ | async\"\n (clicked)=\"stepperClicked.emit($event)\"\n ></fcom-stepper>\n <button\n *ngIf=\"closable\"\n class=\"float-right\"\n [class.nordic-blue-900-text]=\"!invertHeaderColors\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n [attr.title]=\"'actions.close' | finLocalization\"\n (click)=\"closeClicked.emit($event)\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n\n <h1\n [ngClass]=\"fullScreen ? 'font-heading-2' : 'font-heading-4'\"\n class=\"dialog-title ps-medium-t\"\n #dialogTitle\n tabindex=\"-1\"\n >\n {{ title | finLocalization }}\n </h1>\n\n <div aria-live=\"assertive\">\n <fcom-notification\n *ngIf=\"error\"\n class=\"mr-small-t\"\n [theme]=\"NotificationTheme.ALERT\"\n [buttonStyle]=\"NotificationButtonStyle.LINK\"\n [linkText]=\"errorLinkText\"\n (linkClick)=\"alertNotificationLinkClicked.emit($event)\"\n >\n <span class=\"font-body-1\">{{ error }}</span>\n </fcom-notification>\n </div>\n\n <ng-content select=\".header-notification\"></ng-content>\n\n <div class=\"font-body-1 ms-large-t\" [class.ms-medium-b]=\"!compact\" [innerHTML]=\"description\"></div>\n\n <ng-content select=\".header-content\"></ng-content>\n </div>\n <div class=\"dialog-content white-bg align-left\" [ngClass]=\"{ 'ps-medium-x ps-medium-b ps-xsmall-t': !compact }\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { NotificationButtonStyle, NotificationTheme } from '@fcom/ui-components';\nimport { StepperStep } from '@fcom/ui-components/components/stepper/interfaces';\nimport { StepperTheme } from '@fcom/ui-components/components/stepper/enums';\nimport { findScrollContainer } from '@fcom/core';\n\n@Component({\n selector: 'fin-login-form-container',\n templateUrl: './login-form-container.component.html',\n styleUrls: ['./login-form-container.component.scss'],\n})\nexport class LoginFormContainerComponent implements OnInit, AfterViewInit, OnDestroy {\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly StepperTheme = StepperTheme;\n readonly NotificationButtonStyle = NotificationButtonStyle;\n\n readonly bottomMargin = 20;\n\n @ViewChild('dialogTitle') dialogTitle: ElementRef;\n @ViewChild('loginContainer') loginContainer: ElementRef;\n\n @Input()\n fullScreen = false;\n @Input()\n invertHeaderColors = false;\n @Input()\n closable = true;\n\n /**\n * A boolean flag indicating whether to use a compact representation\n * which removes some paddings and margins\n */\n @Input()\n compact = false;\n @Input()\n icon: SvgLibraryIcon;\n @Input()\n title: string;\n @Input()\n description: string;\n @Input()\n error: string;\n @Input()\n errorLinkText: string;\n @Input()\n stepperSteps$: Observable<StepperStep[]>;\n @Input()\n stepperActiveStep$: Observable<number>;\n @Input()\n overlay = false;\n @Input()\n showLeftIcon = false;\n\n @Output()\n stepperClicked: EventEmitter<StepperStep> = new EventEmitter<StepperStep>();\n\n @Output()\n returnClicked = new EventEmitter<Event>();\n @Output()\n closeClicked = new EventEmitter<Event>();\n @Output()\n alertNotificationLinkClicked = new EventEmitter<Event>();\n\n availableHeight: number;\n\n constructor(\n private cd: ChangeDetectorRef,\n private renderer: Renderer2,\n @Inject(DOCUMENT) private document: Document,\n private elementRef: ElementRef\n ) {}\n\n ngOnInit(): void {\n this.availableHeight = this.document.documentElement.clientHeight;\n this.renderer.addClass(this.document.body, 'modal-open-laptop-down');\n this.renderer.addClass(\n findScrollContainer(this.elementRef.nativeElement) || this.document.documentElement,\n 'ios-scroll-touch'\n );\n\n this.cd.detectChanges();\n }\n\n ngOnDestroy(): void {\n this.renderer.removeClass(this.document.body, 'modal-open-laptop-down');\n this.renderer.removeClass(\n findScrollContainer(this.elementRef.nativeElement) || this.document.documentElement,\n 'ios-scroll-touch'\n );\n this.cd.detectChanges();\n }\n\n ngAfterViewInit(): void {\n this.dialogTitle.nativeElement.focus();\n const containerYPos = this.loginContainer.nativeElement.getBoundingClientRect().top;\n this.availableHeight = this.availableHeight - containerYPos;\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\n\nexport interface ShareConfig<T> {\n /**\n * The factory used to create the subject that will connect the source observable to\n * multicast consumers.\n */\n connector?: () => SubjectLike<T>;\n /**\n * If `true`, the resulting observable will reset internal state on error from source and return to a \"cold\" state. This\n * allows the resulting observable to be \"retried\" in the event of an error.\n * If `false`, when an error comes from the source it will push the error into the connecting subject, and the subject\n * will remain the connecting subject, meaning the resulting observable will not go \"cold\" again, and subsequent retries\n * or resubscriptions will resubscribe to that same subject. In all cases, RxJS subjects will emit the same error again, however\n * {@link ReplaySubject} will also push its buffered values before pushing the error.\n * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained\n * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets.\n */\n resetOnError?: boolean | ((error: any) => ObservableInput<any>);\n /**\n * If `true`, the resulting observable will reset internal state on completion from source and return to a \"cold\" state. This\n * allows the resulting observable to be \"repeated\" after it is done.\n * If `false`, when the source completes, it will push the completion through the connecting subject, and the subject\n * will remain the connecting subject, meaning the resulting observable will not go \"cold\" again, and subsequent repeats\n * or resubscriptions will resubscribe to that same subject.\n * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained\n * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets.\n */\n resetOnComplete?: boolean | (() => ObservableInput<any>);\n /**\n * If `true`, when the number of subscribers to the resulting observable reaches zero due to those subscribers unsubscribing, the\n * internal state will be reset and the resulting observable will return to a \"cold\" state. This means that the next\n * time the resulting observable is subscribed to, a new subject will be created and the source will be subscribed to\n * again.\n * If `false`, when the number of subscribers to the resulting observable reaches zero due to unsubscription, the subject\n * will remain connected to the source, and new subscriptions to the result will be connected through that same subject.\n * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained\n * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets.\n */\n resetOnRefCountZero?: boolean | (() => ObservableInput<any>);\n}\n\nexport function share<T>(): MonoTypeOperatorFunction<T>;\n\nexport function share<T>(options: ShareConfig<T>): MonoTypeOperatorFunction<T>;\n\n/**\n * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one\n * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will\n * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.\n * This is an alias for `multicast(() => new Subject()), refCount()`.\n *\n * The subscription to the underlying source Observable can be reset (unsubscribe and resubscribe for new subscribers),\n * if the subscriber count to the shared observable drops to 0, or if the source Observable errors or completes. It is\n * possible to use notifier factories for the resets to allow for behaviors like conditional or delayed resets. Please\n * note that resetting on error or complete of the source Observable does not behave like a transparent retry or restart\n * of the source because the error or complete will be forwarded to all subscribers and their subscription will be\n * closed. Only new subscribers after a reset on error or complete happened will cause a fresh subscription to the\n * source. To achieve transparent retries or restarts pipe the source through appropriate operators before sharing.\n *\n * ![](share.png)\n *\n * ## Example\n *\n * Generate new multicast Observable from the `source` Observable value\n *\n * ```ts\n * import { interval, tap, map, take, share } from 'rxjs';\n *\n * const source = interval(1000).pipe(\n * tap(x => console.log('Processing: ', x)),\n * map(x => x * x),\n * take(6),\n * share()\n * );\n *\n * source.subscribe(x => console.log('subscription 1: ', x));\n * source.subscribe(x => console.log('subscription 2: ', x));\n *\n * // Logs:\n * // Processing: 0\n * // subscription 1: 0\n * // subscription 2: 0\n * // Processing: 1\n * // subscription 1: 1\n * // subscription 2: 1\n * // Processing: 2\n * // subscription 1: 4\n * // subscription 2: 4\n * // Processing: 3\n * // subscription 1: 9\n * // subscription 2: 9\n * // Processing: 4\n * // subscription 1: 16\n * // subscription 2: 16\n * // Processing: 5\n * // subscription 1: 25\n * // subscription 2: 25\n * ```\n *\n * ## Example with notifier factory: Delayed reset\n *\n * ```ts\n * import { interval, take, share, timer } from 'rxjs';\n *\n * const source = interval(1000).pipe(\n * take(3),\n * share({\n * resetOnRefCountZero: () => timer(1000)\n * })\n * );\n *\n * const subscriptionOne = source.subscribe(x => console.log('subscription 1: ', x));\n * setTimeout(() => subscriptionOne.unsubscribe(), 1300);\n *\n * setTimeout(() => source.subscribe(x => console.log('subscription 2: ', x)), 1700);\n *\n * setTimeout(() => source.subscribe(x => console.log('subscription 3: ', x)), 5000);\n *\n * // Logs:\n * // subscription 1: 0\n * // (subscription 1 unsubscribes here)\n * // (subscription 2 subscribes here ~400ms later, source was not reset)\n * // subscription 2: 1\n * // subscription 2: 2\n * // (subscription 2 unsubscribes here)\n * // (subscription 3 subscribes here ~2000ms later, source did reset before)\n * // subscription 3: 0\n * // subscription 3: 1\n * // subscription 3: 2\n * ```\n *\n * @see {@link shareReplay}\n *\n * @return A function that returns an Observable that mirrors the source.\n */\nexport function share<T>(options: ShareConfig<T> = {}): MonoTypeOperatorFunction<T> {\n const { connector = () => new Subject<T>(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;\n // It's necessary to use a wrapper here, as the _operator_ must be\n // referentially transparent. Otherwise, it cannot be used in calls to the\n // static `pipe` function - to create a partial pipeline.\n //\n // The _operator function_ - the function returned by the _operator_ - will\n // not be referentially transparent - as it shares its source - but the\n // _operator function_ is called when the complete pipeline is composed via a\n // call to a source observable's `pipe` method - not when the static `pipe`\n // function is called.\n return (wrapperSource) => {\n let connection: SafeSubscriber<T> | undefined;\n let resetConnection: Subscription | undefined;\n let subject: SubjectLike<T> | undefined;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n\n const cancelReset = () => {\n resetConnection?.unsubscribe();\n resetConnection = undefined;\n };\n // Used to reset the internal state to a \"cold\"\n // state, as though it had never been subscribed to.\n const reset = () => {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n // We need to capture the connection before\n // we reset (if we need to reset).\n const conn = connection;\n reset();\n conn?.unsubscribe();\n };\n\n return operate<T, T>((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n\n // Create the subject if we don't have one yet. Grab a local reference to\n // it as well, which avoids non-null assertions when using it and, if we\n // connect to it now, then error/complete need a reference after it was\n // reset.\n const dest = (subject = subject ?? connector());\n\n // Add the finalization directly to the subscriber - instead of returning it -\n // so that the handling of the subscriber's unsubscription will be wired\n // up _before_ the subscription to the source occurs. This is done so that\n // the assignment to the source connection's `closed` property will be seen\n // by synchronous firehose sources.\n subscriber.add(() => {\n refCount--;\n\n // If we're resetting on refCount === 0, and it's 0, we only want to do\n // that on \"unsubscribe\", really. Resetting on error or completion is a different\n // configuration.\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n\n // The following line adds the subscription to the subscriber passed.\n // Basically, `subscriber === dest.subscribe(subscriber)` is `true`.\n dest.subscribe(subscriber);\n\n if (\n !connection &&\n // Check this shareReplay is still activate - it can be reset to 0\n // and be \"unsubscribed\" _before_ it actually subscribes.\n // If we were to subscribe then, it'd leak and get stuck.\n refCount > 0\n ) {\n // We need to create a subscriber here - rather than pass an observer and\n // assign the returned subscription to connection - because it's possible\n // for reentrant subscriptions to the shared observable to occur and in\n // those situations we want connection to be already-assigned so that we\n // don't create another connection to the source.\n connection = new SafeSubscriber({\n next: (value) => dest.next(value),\n error: (err) => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\n\nfunction handleReset<T extends unknown[] = never[]>(\n reset: () => void,\n on: boolean | ((...args: T) => ObservableInput<any>),\n ...args: T\n): Subscription | undefined {\n if (on === true) {\n reset();\n return;\n }\n\n if (on === false) {\n return;\n }\n\n const onSubscriber = new SafeSubscriber({\n next: () => {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n\n return innerFrom(on(...args)).subscribe(onSubscriber);\n}\n","import { Subscription } from 'rxjs';\n\nexport const unsubscribe = (sub: Subscription): Subscription => {\n if (sub && !sub.closed) {\n sub.unsubscribe();\n }\n return undefined;\n};\n\nexport const removeListener = (unregistrar: Function): undefined => {\n if (unregistrar) {\n unregistrar();\n }\n return undefined;\n};\n","import { FinnairAirBoundsResponse, FinnairBoundGroup } from '@fcom/dapi/api/models';\nimport { FinnairBoundItemWithLocation } from '@fcom/common-booking/interfaces/flight-selection.interface';\n\nexport interface FinnairBoundGroupWithLocation extends FinnairBoundGroup {\n details: FinnairBoundItemWithLocation;\n hasSpecialOffers?: boolean;\n}\n\nexport interface FinnairAirBounds extends FinnairAirBoundsResponse {\n boundGroups: FinnairBoundGroupWithLocation[];\n}\n\nexport enum SelectionPhase {\n OUTBOUND = 'OUTBOUND',\n INBOUND = 'INBOUND',\n MULTICITY = 'MULTICITY',\n}\n","import { Observable } from 'rxjs';\n\nimport {\n Cabin,\n Duration,\n FinnairBoundItem,\n FinnairCabinClass,\n ItineraryItemFlight,\n ItineraryItemLayover,\n MultiOffer,\n MultiOfferList,\n StatusCode,\n} from '@fcom/dapi/api/models';\nimport { ExtendedFareFamily } from '@fcom/common-booking/interfaces';\n\nexport interface Airport {\n dateTime: string;\n city: string;\n airportCode: string;\n airport: string;\n}\n\nexport interface MultiCityOffer extends MultiOffer {\n hash: string;\n fullId: string;\n}\n\nexport interface MultiCityState\n extends Omit<MultiOfferList, 'hash' | 'offerIdPrefix' | 'status' | 'fareFamiliesPerCabin'> {\n offers: Array<MultiCityOffer>;\n selectedFareFamily?: string;\n selectedItinerary?: string[];\n hashMap: Record<string, string>;\n status: MultiCityStatus;\n statusCode?: StatusCode;\n requestedMoreFlightOfferIds: string[];\n fareFamiliesPerCabin: Partial<Record<Cabin, string[]>>;\n}\n\nexport interface UFOInfo {\n departure: Airport;\n arrival: Airport;\n tails?: string[];\n duration: Duration;\n airlines?: string[];\n stops?: number;\n bound?: FinnairBoundItem;\n itinerary: (ItineraryItemFlight | ItineraryItemLayover)[];\n showViewDetails?: boolean;\n isByBusOnly?: boolean;\n focusOnViewDetails$?: Observable<boolean>;\n viewDetailsBtnKey?: string;\n itineraryWithDifferentCabinClass?: ItineraryItemFlight[];\n cabinClass?: FinnairCabinClass;\n}\n\nexport interface OffersPerBound {\n itineraryId: string;\n cheapestOffer: MultiCityOffer;\n fareFamily: ExtendedFareFamily;\n boundInfo: UFOInfo;\n}\n\nexport enum MultiCityStatus {\n INITIAL = 'INITIAL',\n PENDING = 'PENDING',\n PENDING_MORE_FLIGHTS = 'PENDING_MORE_FLIGHTS',\n ERROR = 'ERROR',\n READY = 'READY',\n NO_OFFERS = 'NO_OFFERS',\n}\n","import { Location } from '@fcom/core-api';\nimport { LocalDate } from '@fcom/core/utils';\n\nimport { AmRoomSelection } from './paxAmount.interface';\n\nexport interface AmOrigin {\n name: string;\n city: string;\n code: string;\n countryCode: string;\n}\n\nexport interface AmSearchable {\n from: string;\n to: string;\n}\n\nexport enum AmHolidayType {\n AM = 'AM',\n DP = 'DP',\n}\n\nexport interface AmDestination {\n city: string;\n destinationCode: string;\n countryCode: string;\n country: string;\n holidayType: AmHolidayType;\n searchable: AmSearchable[];\n}\n\nexport interface AmHolidayTypeDuration {\n label: string;\n code: string;\n}\n\nexport interface AmHolidayTypeItem {\n label: string;\n type: 'list' | 'days';\n items?: AmHolidayTypeDuration[];\n minDays?: number;\n maxDays?: number;\n}\n\nexport interface AmDestinationsResponse {\n destinations: AmDestination[];\n holidayTypes: {\n [key: string]: AmHolidayTypeItem;\n };\n}\n\nexport interface AmLocation {\n location: Location;\n holidayType: AmHolidayType;\n holidayTypeItem: AmHolidayTypeItem;\n searchable: AmSearchable[];\n}\n\nexport interface AmAvailability {\n [date: string]: {\n [durationCode: string]: number;\n };\n}\n\nexport interface AmContinueParams {\n originLocationCode: string;\n destinationLocationCode: string;\n departureDate: LocalDate;\n returnDate?: LocalDate;\n durationCode?: string;\n rooms: AmRoomSelection[];\n flexible: boolean;\n holidayType: AmHolidayType;\n}\n","import { NgModule } from '@angular/core';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { UiComponentsModule } from '@fcom/ui-components';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { PipesModule } from '@fcom/common/pipes';\n\nimport { DatepickerComponent } from './datepicker.component';\nimport { FormArrayComponent } from './form-array.component';\nimport { FormErrorComponent } from './form-error.component';\nimport { FormInputCheckboxComponent } from './form-input-checkbox.component';\nimport { FormInputRadioComponent } from './form-input-radio.component';\nimport { FormInputSelectComponent } from './form-input-select.component';\nimport { FormInputTextComponent } from './form-input-text.component';\nimport { LocationsAutocompleteComponent } from './locations-autocomplete.component';\nimport { FormInputCheckboxListComponent } from './form-input-checkbox-list.component';\nimport { FileValueAccessorDirective } from '../../directives/file-value-accessor.directive';\n\nconst components = [\n DatepickerComponent,\n FormArrayComponent,\n FormErrorComponent,\n FormInputCheckboxComponent,\n FormInputCheckboxListComponent,\n FormInputRadioComponent,\n FormInputSelectComponent,\n FormInputTextComponent,\n LocationsAutocompleteComponent,\n FileValueAccessorDirective,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n ComponentsModule,\n DirectiveModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n MatAutocompleteModule,\n UiComponentsModule,\n UiTranslateModule,\n PipesModule,\n MatDatepickerModule,\n ],\n declarations: [...components],\n exports: [...components],\n providers: [],\n})\nexport class CommonServiceFormsModule {}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = require('es-errors/type');\nvar $Map = GetIntrinsic('%Map%', true);\n\n/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */\nvar $mapGet = callBound('Map.prototype.get', true);\n/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */\nvar $mapSet = callBound('Map.prototype.set', true);\n/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */\nvar $mapHas = callBound('Map.prototype.has', true);\n/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */\nvar $mapDelete = callBound('Map.prototype.delete', true);\n/** @type {<K, V>(thisArg: Map<K, V>) => number} */\nvar $mapSize = callBound('Map.prototype.size', true);\n\n/** @type {import('.')} */\nmodule.exports = !!$Map && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {\n\t/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */\n\t/** @typedef {Parameters<Channel['get']>[0]} K */\n\t/** @typedef {Parameters<Channel['set']>[1]} V */\n\n\t/** @type {Map<K, V> | undefined} */ var $m;\n\n\t/** @type {Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\t'delete': function (key) {\n\t\t\tif ($m) {\n\t\t\t\tvar result = $mapDelete($m, key);\n\t\t\t\tif ($mapSize($m) === 0) {\n\t\t\t\t\t$m = void undefined;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($m) {\n\t\t\t\treturn $mapGet($m, key);\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($m) {\n\t\t\t\treturn $mapHas($m, key);\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (!$m) {\n\t\t\t\t// @ts-expect-error TS can't handle narrowing a variable inside a closure\n\t\t\t\t$m = new $Map();\n\t\t\t}\n\t\t\t$mapSet($m, key, value);\n\t\t}\n\t};\n\n\t// @ts-expect-error TODO: figure out why TS is erroring here\n\treturn channel;\n};\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\n\n// These constants are used to create handler registry functions using array mapping below.\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'] as const;\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'] as const;\nconst jqueryMethods = ['on', 'off'] as const;\n\nexport interface NodeStyleEventEmitter {\n addListener(eventName: string | symbol, handler: NodeEventHandler): this;\n removeListener(eventName: string | symbol, handler: NodeEventHandler): this;\n}\n\nexport type NodeEventHandler = (...args: any[]) => void;\n\n// For APIs that implement `addListener` and `removeListener` methods that may\n// not use the same arguments or return EventEmitter values\n// such as React Native\nexport interface NodeCompatibleEventEmitter {\n addListener(eventName: string, handler: NodeEventHandler): void | {};\n removeListener(eventName: string, handler: NodeEventHandler): void | {};\n}\n\n// Use handler types like those in @types/jquery. See:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/847731ba1d7fa6db6b911c0e43aa0afe596e7723/types/jquery/misc.d.ts#L6395\nexport interface JQueryStyleEventEmitter<TContext, T> {\n on(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void;\n off(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void;\n}\n\nexport interface EventListenerObject<E> {\n handleEvent(evt: E): void;\n}\n\nexport interface HasEventTargetAddRemove<E> {\n addEventListener(\n type: string,\n listener: ((evt: E) => void) | EventListenerObject<E> | null,\n options?: boolean | AddEventListenerOptions\n ): void;\n removeEventListener(\n type: string,\n listener: ((evt: E) => void) | EventListenerObject<E> | null,\n options?: EventListenerOptions | boolean\n ): void;\n}\n\nexport interface EventListenerOptions {\n capture?: boolean;\n passive?: boolean;\n once?: boolean;\n}\n\nexport interface AddEventListenerOptions extends EventListenerOptions {\n once?: boolean;\n passive?: boolean;\n}\n\nexport function fromEvent<T>(target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>, eventName: string): Observable<T>;\nexport function fromEvent<T, R>(\n target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,\n eventName: string,\n resultSelector: (event: T) => R\n): Observable<R>;\nexport function fromEvent<T>(\n target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,\n eventName: string,\n options: EventListenerOptions\n): Observable<T>;\nexport function fromEvent<T, R>(\n target: HasEventTargetAddRemove<T> | ArrayLike<HasEventTargetAddRemove<T>>,\n eventName: string,\n options: EventListenerOptions,\n resultSelector: (event: T) => R\n): Observable<R>;\n\nexport function fromEvent(target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>, eventName: string): Observable<unknown>;\n/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */\nexport function fromEvent<T>(target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>, eventName: string): Observable<T>;\nexport function fromEvent<R>(\n target: NodeStyleEventEmitter | ArrayLike<NodeStyleEventEmitter>,\n eventName: string,\n resultSelector: (...args: any[]) => R\n): Observable<R>;\n\nexport function fromEvent(\n target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>,\n eventName: string\n): Observable<unknown>;\n/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */\nexport function fromEvent<T>(target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>, eventName: string): Observable<T>;\nexport function fromEvent<R>(\n target: NodeCompatibleEventEmitter | ArrayLike<NodeCompatibleEventEmitter>,\n eventName: string,\n resultSelector: (...args: any[]) => R\n): Observable<R>;\n\nexport function fromEvent<T>(\n target: JQueryStyleEventEmitter<any, T> | ArrayLike<JQueryStyleEventEmitter<any, T>>,\n eventName: string\n): Observable<T>;\nexport function fromEvent<T, R>(\n target: JQueryStyleEventEmitter<any, T> | ArrayLike<JQueryStyleEventEmitter<any, T>>,\n eventName: string,\n resultSelector: (value: T, ...args: any[]) => R\n): Observable<R>;\n\n/**\n * Creates an Observable that emits events of a specific type coming from the\n * given event target.\n *\n * <span class=\"informal\">Creates an Observable from DOM events, or Node.js\n * EventEmitter events or others.</span>\n *\n * ![](fromEvent.png)\n *\n * `fromEvent` accepts as a first argument event target, which is an object with methods\n * for registering event handler functions. As a second argument it takes string that indicates\n * type of event we want to listen for. `fromEvent` supports selected types of event targets,\n * which are described in detail below. If your event target does not match any of the ones listed,\n * you should use {@link fromEventPattern}, which can be used on arbitrary APIs.\n * When it comes to APIs supported by `fromEvent`, their methods for adding and removing event\n * handler functions have different names, but they all accept a string describing event type\n * and function itself, which will be called whenever said event happens.\n *\n * Every time resulting Observable is subscribed, event handler function will be registered\n * to event target on given event type. When that event fires, value\n * passed as a first argument to registered function will be emitted by output Observable.\n * When Observable is unsubscribed, function will be unregistered from event target.\n *\n * Note that if event target calls registered function with more than one argument, second\n * and following arguments will not appear in resulting stream. In order to get access to them,\n * you can pass to `fromEvent` optional project function, which will be called with all arguments\n * passed to event handler. Output Observable will then emit value returned by project function,\n * instead of the usual value.\n *\n * Remember that event targets listed below are checked via duck typing. It means that\n * no matter what kind of object you have and no matter what environment you work in,\n * you can safely use `fromEvent` on that object if it exposes described methods (provided\n * of course they behave as was described above). So for example if Node.js library exposes\n * event target which has the same method names as DOM EventTarget, `fromEvent` is still\n * a good choice.\n *\n * If the API you use is more callback then event handler oriented (subscribed\n * callback function fires only once and thus there is no need to manually\n * unregister it), you should use {@link bindCallback} or {@link bindNodeCallback}\n * instead.\n *\n * `fromEvent` supports following types of event targets:\n *\n * **DOM EventTarget**\n *\n * This is an object with `addEventListener` and `removeEventListener` methods.\n *\n * In the browser, `addEventListener` accepts - apart from event type string and event\n * handler function arguments - optional third parameter, which is either an object or boolean,\n * both used for additional configuration how and when passed function will be called. When\n * `fromEvent` is used with event target of that type, you can provide this values\n * as third parameter as well.\n *\n * **Node.js EventEmitter**\n *\n * An object with `addListener` and `removeListener` methods.\n *\n * **JQuery-style event target**\n *\n * An object with `on` and `off` methods\n *\n * **DOM NodeList**\n *\n * List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`.\n *\n * Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes\n * it contains and install event handler function in every of them. When returned Observable\n * is unsubscribed, function will be removed from all Nodes.\n *\n * **DOM HtmlCollection**\n *\n * Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is\n * installed and removed in each of elements.\n *\n *\n * ## Examples\n *\n * Emit clicks happening on the DOM document\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * clicks.subscribe(x => console.log(x));\n *\n * // Results in:\n * // MouseEvent object logged to console every time a click\n * // occurs on the document.\n * ```\n *\n * Use `addEventListener` with capture option\n *\n * ```ts\n * import { fromEvent } from 'rxjs';\n *\n * const div = document.createElement('div');\n * div.style.cssText = 'width: 200px; height: 200px; background: #09c;';\n * document.body.appendChild(div);\n *\n * // note optional configuration parameter which will be passed to addEventListener\n * const clicksInDocument = fromEvent(document, 'click', { capture: true });\n * const clicksInDiv = fromEvent(div, 'click');\n *\n * clicksInDocument.subscribe(() => console.log('document'));\n * clicksInDiv.subscribe(() => console.log('div'));\n *\n * // By default events bubble UP in DOM tree, so normally\n * // when we would click on div in document\n * // \"div\" would be logged first and then \"document\".\n * // Since we specified optional `capture` option, document\n * // will catch event when it goes DOWN DOM tree, so console\n * // will log \"document\" and then \"div\".\n * ```\n *\n * @see {@link bindCallback}\n * @see {@link bindNodeCallback}\n * @see {@link fromEventPattern}\n *\n * @param target The DOM EventTarget, Node.js EventEmitter, JQuery-like event target,\n * NodeList or HTMLCollection to attach the event handler to.\n * @param eventName The event name of interest, being emitted by the `target`.\n * @param options Options to pass through to the underlying `addListener`,\n * `addEventListener` or `on` functions.\n * @param resultSelector A mapping function used to transform events. It takes the\n * arguments from the event handler and should return a single value.\n * @return An Observable emitting events registered through `target`'s\n * listener handlers.\n */\nexport function fromEvent<T>(\n target: any,\n eventName: string,\n options?: EventListenerOptions | ((...args: any[]) => T),\n resultSelector?: (...args: any[]) => T\n): Observable<T> {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent<T>(target, eventName, options as EventListenerOptions).pipe(mapOneOrManyArgs(resultSelector));\n }\n\n // Figure out our add and remove methods. In order to do this,\n // we are going to analyze the target in a preferred order, if\n // the target matches a given signature, we take the two \"add\" and \"remove\"\n // method names and apply them to a map to create opposite versions of the\n // same function. This is because they all operate in duplicate pairs,\n // `addListener(name, handler)`, `removeListener(name, handler)`, for example.\n // The call only differs by method name, as to whether or not you're adding or removing.\n const [add, remove] =\n // If it is an EventTarget, we need to use a slightly different method than the other two patterns.\n isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler: any) => target[methodName](eventName, handler, options as EventListenerOptions))\n : // In all other cases, the call pattern is identical with the exception of the method names.\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n\n // If add is falsy, it's because we didn't match a pattern above.\n // Check to see if it is an ArrayLike, because if it is, we want to\n // try to apply fromEvent to all of it's items. We do this check last,\n // because there are may be some types that are both ArrayLike *and* implement\n // event registry points, and we'd rather delegate to that when possible.\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget: any) => fromEvent(subTarget, eventName, options as EventListenerOptions))(\n innerFrom(target)\n ) as Observable<T>;\n }\n }\n\n // If add is falsy and we made it here, it's because we didn't\n // match any valid target objects above.\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n\n return new Observable<T>((subscriber) => {\n // The handler we are going to register. Forwards the event object, by itself, or\n // an array of arguments to the event handler, if there is more than one argument,\n // to the consumer.\n const handler = (...args: any[]) => subscriber.next(1 < args.length ? args : args[0]);\n // Do the work of adding the handler to the target.\n add(handler);\n // When we finalize, we want to remove the handler and free up memory.\n return () => remove!(handler);\n });\n}\n\n/**\n * Used to create `add` and `remove` functions to register and unregister event handlers\n * from a target in the most common handler pattern, where there are only two arguments.\n * (e.g. `on(name, fn)`, `off(name, fn)`, `addListener(name, fn)`, or `removeListener(name, fn)`)\n * @param target The target we're calling methods on\n * @param eventName The event name for the event we're creating register or unregister functions for\n */\nfunction toCommonHandlerRegistry(target: any, eventName: string) {\n return (methodName: string) => (handler: any) => target[methodName](eventName, handler);\n}\n\n/**\n * Checks to see if the target implements the required node-style EventEmitter methods\n * for adding and removing event handlers.\n * @param target the object to check\n */\nfunction isNodeStyleEventEmitter(target: any): target is NodeStyleEventEmitter {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\n\n/**\n * Checks to see if the target implements the required jQuery-style EventEmitter methods\n * for adding and removing event handlers.\n * @param target the object to check\n */\nfunction isJQueryStyleEventEmitter(target: any): target is JQueryStyleEventEmitter<any, any> {\n return isFunction(target.on) && isFunction(target.off);\n}\n\n/**\n * Checks to see if the target implements the required EventTarget methods\n * for adding and removing event handlers.\n * @param target the object to check\n */\nfunction isEventTarget(target: any): target is HasEventTargetAddRemove<any> {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","<ng-template\n #priceLine\n let-label=\"label\"\n let-value=\"value\"\n let-originalValue=\"originalValue\"\n let-labelContent=\"labelContent\"\n let-bold=\"bold\"\n>\n <tr>\n <th scope=\"row\" class=\"align-left\" [ngClass]=\"{ 'light-type': !bold, 'medium-type ms-xsmall-t': bold }\">\n <ng-container *ngIf=\"label; else labelContent\">{{ label }}</ng-container>\n </th>\n <td class=\"align-right\" [ngClass]=\"{ 'medium-type ms-xsmall-t': bold }\">\n <span class=\"nordic-blue-900-text strike-through pr-xxsmall-r\" *ngIf=\"originalValue\">{{ originalValue }}</span\n >{{ value }}\n </td>\n </tr>\n</ng-template>\n\n<fin-expand\n class=\"flex--basis-full block pr-small-x mr-small-t pr-small-b\"\n *ngFor=\"let breakdown of breakdowns$ | finObsToArray; let last = last\"\n [class.border-bottom]=\"!last\"\n [class.rounded-large]=\"last\"\n [key]=\"'price-breakdown-expand-' + (breakdown | async)?.id\"\n [id]=\"'price-breakdown-expand-' + (breakdown | async)?.id\"\n [initiallyOpen]=\"expandOpen\"\n #expand\n>\n <div class=\"trigger flex\" *ngIf=\"breakdown | async as passenger\">\n <div class=\"flex-1\">\n <h3 class=\"font-body-1 flex transform-none\">\n <fcom-icon\n class=\"flex flex-1 flex--nogrow flex--self-start icon-medium nordic-blue-900-text\"\n [name]=\"\n passenger.passengerTypeCode === FinnairPassengerCode.INF\n ? SvgLibraryIcon.ADULT_INFANT\n : SvgLibraryIcon.SINGLE_PAX\n \"\n ></fcom-icon>\n <span class=\"flex-1 flex--self-center ps-xsmall-l medium-type\" data-hj-suppress>\n {{ passenger?.title ? ('passenger.title.' + passenger?.title | lowercase | finLocalization) : '' }}\n {{ passenger?.firstName }} {{ passenger?.lastName }} ({{\n 'passenger.' + asPaxTypeKey(passenger.passengerTypeCode).toLowerCase() | finLocalization | titlecase\n }})\n </span>\n </h3>\n </div>\n <fcom-icon\n class=\"flex-1 flex--nogrow rotate flex--self-start icon-medium nordic-blue-900-text\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n <div class=\"font-body-1 ps-xsmall-t content\" *ngIf=\"breakdown | async as pax\">\n <table class=\"fill tax-table\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.review.taxBreakDown.header' | finLocalization\n }}\n </caption>\n\n <tbody>\n <ng-container\n *ngIf=\"showBaseFare\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.baseFare' | finLocalization,\n originalValue: pax.prices?.originalBaseFare ? (pax.prices?.originalBaseFare | finPrice) : undefined,\n value:\n showPoints && pax.prices?.totalPoints\n ? ('award.points' | finLocalization: { pointsAmount: +pax.prices?.totalPoints.amount | finPoints })\n : (pax.prices?.baseFare | finPrice),\n bold: false,\n }\"\n >\n </ng-container>\n <ng-template #labelContent>\n <button\n *ngIf=\"showTotalTax\"\n (click)=\"\n openTaxModal(\n $event,\n pax.prices.taxes,\n asPaxTypeKey(pax.passengerTypeCode).toLowerCase(),\n pax.prices.totalTax\n )\n \"\n class=\"underline nordic-blue-900-text\"\n >\n {{ 'purchase.review.taxTotal' | finLocalization }}\n </button>\n </ng-template>\n <ng-container\n *ngIf=\"showTotalTax\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n value: pax.prices?.totalTax || { amount: '0', currencyCode: pax.prices?.baseFare.currencyCode } | finPrice,\n labelContent: pax.prices?.totalTax ? labelContent : null,\n label: pax.prices?.totalTax ? null : ('purchase.review.taxTotal' | finLocalization),\n }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let fee of pax.prices?.fees\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.' + fee.code | finLocalization,\n value: fee | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let service of pax.services\">\n <ng-container\n *ngIf=\"service.count\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n service.key\n | finLocalization\n : {\n seatCount: service.count,\n mealCount: service.count,\n baggageCount: service.count,\n loungeCount: service.count,\n travelComfortCount: service.count,\n wifiCount: service.count,\n coverCount: service.count,\n petCount: service.count,\n sportCount: service.count,\n specialCount: service.count,\n firearmCount: service.count,\n medicCount: service.count,\n specialNeedCount: service.count,\n childCount: service.count,\n amount: service.count,\n },\n value: service.total | finPrice,\n originalValue: service.originalTotal | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n </tbody>\n <tfoot>\n <ng-container *ngIf=\"showSubTotals$ | async\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n ('price.total' | finLocalization) +\n ' (' +\n ('passenger.' + asPaxTypeKey(pax.passengerTypeCode).toLowerCase() | finLocalization) +\n ')',\n value:\n showPoints && pax.prices?.totalPoints\n ? ('award.points' | finLocalization: { pointsAmount: +pax.prices?.totalPoints.amount | finPoints }) +\n ' + ' +\n (pax.total | finPrice)\n : (pax.total | finPrice),\n bold: true,\n }\"\n >\n </ng-container>\n </ng-container>\n </tfoot>\n </table>\n </div>\n</fin-expand>\n\n<fcom-modal\n [(open)]=\"taxModalOpen\"\n [title]=\"'purchase.review.taxTotal' | finLocalization\"\n [buttons]=\"ModalButtons.DONE\"\n (close)=\"closeTaxModal()\"\n>\n <div class=\"pr-large\">\n <cms-unstyled-fragment\n *ngIf=\"'fragments.purchaseTaxesAndRefund.url' | finLocalization\"\n class=\"block font-body-1 unstyled-fragment-line-height pr-medium-b\"\n [contentUrl$]=\"'fragments.purchaseTaxesAndRefund.url' | finLocalization | finToObservable\"\n >\n </cms-unstyled-fragment>\n\n <table class=\"fill dictionary-table tax-table font-body-1\" *ngIf=\"taxModalData\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.review.taxBreakDown.header' | finLocalization\n }}\n </caption>\n <thead>\n <tr>\n <th class=\"bold-type ms-medium-y\" scope=\"col\" colspan=\"2\">\n {{ 'purchase.review.taxBreakDown.per.' + taxModalData.ptc | finLocalization }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let tax of taxModalData.taxes\" class=\"flex flex--space-between\">\n <th scope=\"row\">\n {{ 'TAX_CODES.' + tax.code.slice(0, 2) | finLocalization | finEmpty: tax.code.slice(0, 2) }}\n </th>\n <td>{{ tax | finPrice }}</td>\n </tr>\n </tbody>\n <tfoot>\n <tr class=\"flex flex--space-between\">\n <th scope=\"row\">{{ 'price.total' | finLocalization }}</th>\n <td>{{ taxModalData.total | finPrice }}</td>\n </tr>\n </tfoot>\n </table>\n </div>\n</fcom-modal>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, EMPTY, Observable } from 'rxjs';\nimport { catchError, filter, map } from 'rxjs/operators';\n\nimport { ModalButtons } from '@fcom/ui-components';\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { SentryLogger } from '@fcom/core/services';\nimport { Amount, PriceService } from '@fcom/dapi';\nimport {\n FinnairCharge,\n FinnairPassengerCode,\n FinnairPassengerItem,\n FinnairPrice,\n FinnairTotalPricesDetails,\n FinnairAmount,\n} from '@fcom/dapi/api/models';\nimport { safeMap as safeMapObs } from '@fcom/rx';\nimport { isPresent } from '@fcom/core/utils';\nimport { hasUnitPrices } from '@fcom/common/utils';\n\nimport { getPassengerServices } from '../../utils/order.utils';\n\ninterface BreakdownModel extends FinnairPassengerItem {\n prices: FinnairPrice;\n services: PriceService[];\n total: FinnairAmount;\n}\n\ninterface TaxModalModel {\n taxes: FinnairCharge[];\n ptc: string;\n total: Amount;\n}\n\nconst hasPassengers = (passengers: FinnairPassengerItem[]): boolean => isPresent(passengers) && passengers.length > 0;\n\n@Component({\n selector: 'fin-price-breakdown',\n templateUrl: './price-breakdown.component.html',\n})\nexport class PriceBreakdownComponent implements OnInit {\n public readonly ModalButtons = ModalButtons;\n public readonly asPaxTypeKey = asPaxTypeKey;\n public readonly FinnairPassengerCode = FinnairPassengerCode;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n prices$: Observable<FinnairTotalPricesDetails>;\n @Input()\n passengers$: Observable<FinnairPassengerItem[]>;\n @Input()\n showBaseFare = true;\n @Input()\n showTotalTax = true;\n @Input()\n showPoints = false;\n @Input()\n expandOpen = false;\n\n breakdowns$: Observable<BreakdownModel[]>;\n totalPrice$: Observable<Amount>;\n showSubTotals$: Observable<boolean>;\n taxModalOpen = false;\n taxModalData: TaxModalModel;\n\n constructor(private sentryLogger: SentryLogger) {}\n\n ngOnInit(): void {\n this.breakdowns$ = combineLatest([this.passengers$, this.prices$]).pipe(\n filter(([passengers, prices]) => hasPassengers(passengers) && hasUnitPrices(prices)),\n map(([passengers, prices]) =>\n passengers\n .filter((passenger) => parseFloat(prices.total.totalPerPax?.[passenger.id]?.totalAmount.amount) > 0)\n .map((passenger: FinnairPassengerItem) => ({\n ...passenger,\n prices: prices.flight?.totalPerPax?.[passenger.id] || prices.services?.totalPerPax?.[passenger.id],\n services: getPassengerServices(prices.services?.totalPerCategory, passenger),\n total: prices.total.totalPerPax?.[passenger.id]?.totalAmount,\n }))\n ),\n catchError((e: unknown) => {\n this.sentryLogger.error('Exception in handling prices of passengers', e);\n return EMPTY;\n })\n );\n\n this.totalPrice$ = this.prices$.pipe(safeMapObs((prices) => ({ ...prices.total?.total?.totalAmount })));\n this.showSubTotals$ = this.passengers$.pipe(\n safeMapObs((passengers: FinnairPassengerItem[]) => passengers.length > 1)\n );\n }\n\n openTaxModal(event, taxes: FinnairCharge[], ptc: string, total: Amount) {\n event.stopPropagation();\n\n this.taxModalOpen = true;\n this.taxModalData = {\n taxes,\n ptc,\n total,\n };\n }\n\n closeTaxModal() {\n this.taxModalData = null;\n }\n}\n","<button\n *ngIf=\"!useCustomTrigger\"\n class=\"font-body-1 inherit-color block no-decoration focus-inset fill align-left\"\n [attr.aria-controls]=\"'expand-component-' + id\"\n [attr.aria-expanded]=\"isOpen$ | async\"\n [disabled]=\"disabled\"\n (click)=\"toggleDetails($event)\"\n>\n <ng-content select=\".trigger\"></ng-content>\n</button>\n\n<fin-expand-content\n [open$]=\"isOpen$\"\n [initialValue]=\"initialValue\"\n [id]=\"'expand-component-' + id\"\n [expandContainerClass]=\"expandContainerClass\"\n [expandContentClass]=\"expandContentClass\"\n [ngClass]=\"expandContentClass\"\n [targetHeightElement]=\"targetHeightElement\"\n>\n <ng-content select=\".content\"></ng-content>\n</fin-expand-content>\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, Subscription } from 'rxjs';\nimport { distinctUntilChanged, map } from 'rxjs/operators';\n\nimport { PseudoLocalActions } from '@fcom/core/actions';\nimport { AppState } from '@fcom/core';\nimport { pseudoLocal } from '@fcom/core/selectors';\nimport { finShare, snapshot } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { TARGET_HEIGHT_ELEMENT } from './expand-content.component';\n\n@Component({\n selector: 'fin-expand',\n templateUrl: 'expand.component.html',\n})\nexport class ExpandComponent implements OnInit, OnDestroy {\n @Input()\n id: string;\n\n @Input()\n key: string;\n\n @Input()\n initiallyOpen: boolean;\n\n @Input()\n clearSelectionOnDestroy = false;\n\n @Input()\n expandContainerClass?: string | string[];\n\n @Input()\n expandContentClass?: string | string[];\n\n @Input()\n disabled = false;\n\n @Input()\n targetHeightElement: TARGET_HEIGHT_ELEMENT = TARGET_HEIGHT_ELEMENT.CHILDREN;\n\n @Input()\n useCustomTrigger = false;\n\n @Output()\n expandOpen: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n subscription: Subscription = new Subscription();\n isOpen$: Observable<boolean>;\n initialValue: boolean;\n\n constructor(private store$: Store<AppState>) {}\n\n ngOnInit(): void {\n if (this.initiallyOpen) {\n this.store$.dispatch(PseudoLocalActions.setValue({ key: this.key, data: this.id }));\n }\n\n // The get initial render not to flicker when open\n this.initialValue = snapshot(this.store$.pipe(pseudoLocal(this.key))) === this.id;\n\n this.expandOpen.emit(this.initialValue);\n\n const openState$: Observable<boolean> = this.store$.pipe(\n pseudoLocal(this.key),\n map((value) => value === this.id),\n distinctUntilChanged(),\n finShare()\n );\n\n this.subscription.add(openState$.subscribe((item) => this.expandOpen.emit(item)));\n this.isOpen$ = openState$;\n }\n\n ngOnDestroy(): void {\n if (this.clearSelectionOnDestroy) {\n this.store$.dispatch(PseudoLocalActions.setValue({ key: this.key, data: undefined }));\n }\n this.subscription = unsubscribe(this.subscription);\n }\n\n toggleDetails(event?: Event): void {\n const currentValue: string = snapshot(this.store$.pipe(pseudoLocal(this.key)));\n const newValue: string = currentValue === this.id ? undefined : this.id;\n this.store$.dispatch(PseudoLocalActions.setValue({ key: this.key, data: newValue }));\n event?.preventDefault();\n }\n}\n","import { Observable } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\n/**\n * Synchronously take the current value out of the store.\n * Will only work if the stream is replayable.\n *\n * We only use snapshot on Store by Developer policy or in unit tests.\n */\nexport const snapshot = <T>(o$?: Observable<T>): T => {\n let r: T;\n if (o$ instanceof Observable) {\n // eslint-disable-next-line rxjs/no-ignored-subscription\n o$.pipe(take(1)).subscribe((s) => (r = s));\n }\n return r;\n};\n","'use strict';\n\nvar $TypeError = require('es-errors/type');\nvar inspect = require('object-inspect');\nvar getSideChannelList = require('side-channel-list');\nvar getSideChannelMap = require('side-channel-map');\nvar getSideChannelWeakMap = require('side-channel-weakmap');\n\nvar makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannel() {\n\t/** @typedef {ReturnType<typeof getSideChannel>} Channel */\n\n\t/** @type {Channel | undefined} */ var $channelData;\n\n\t/** @type {Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\t'delete': function (key) {\n\t\t\treturn !!$channelData && $channelData['delete'](key);\n\t\t},\n\t\tget: function (key) {\n\t\t\treturn $channelData && $channelData.get(key);\n\t\t},\n\t\thas: function (key) {\n\t\t\treturn !!$channelData && $channelData.has(key);\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (!$channelData) {\n\t\t\t\t$channelData = makeChannel();\n\t\t\t}\n\n\t\t\t$channelData.set(key, value);\n\t\t}\n\t};\n\t// @ts-expect-error TODO: figure out why this is erroring\n\treturn channel;\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { PipesModule } from '@fcom/common/pipes/pipes.module';\n\nimport { ButtonModule } from '../buttons/button.module';\nimport { IconsModule } from '../icons/icons.module';\nimport { ExpandModule } from '../expand/expand.module';\nimport { ImagesModule } from '../images/images.module';\nimport { NotificationsModule } from '../notifications/notifications.module';\nimport { TripCardComponent } from './trip-card/trip-card.component';\nimport { FlightCardComponent } from './flight-card/flight-card.component';\nimport { UnifiedFlightObjectComponent } from './unified-flight-object/unified-flight-object.component';\nimport { TimelineComponent } from './timeline/timeline.component';\nimport { TagModule } from '../tag';\n\nconst components = [TripCardComponent, FlightCardComponent, UnifiedFlightObjectComponent, TimelineComponent];\n\n@NgModule({\n declarations: [...components],\n imports: [\n CommonModule,\n IconsModule,\n UiTranslateModule,\n NotificationsModule,\n ExpandModule,\n ImagesModule,\n TagModule,\n PipesModule,\n ButtonModule,\n ],\n exports: [...components],\n providers: [],\n})\nexport class FlightsModule {}\n","<ng-template #modalButton let-text=\"text\">\n <fcom-button\n class=\"close-modal-btn\"\n [text]=\"text | finLocalization\"\n [disabled]=\"!open || forceRemainOpen\"\n (clickBtn)=\"onClose()\"\n data-testid=\"modal-close-btn\"\n >\n </fcom-button>\n</ng-template>\n\n<ng-template #buttonTmpl>\n <div class=\"align-center pr-medium-x pr-xsmall-y nordic-blue-25-bg rounded-bottom-large\" [ngSwitch]=\"buttons\">\n <ng-container\n *ngSwitchCase=\"ModalButtons.CLOSE\"\n [ngTemplateOutlet]=\"modalButton\"\n [ngTemplateOutletContext]=\"{ text: 'actions.close' }\"\n >\n </ng-container>\n <ng-container\n *ngSwitchCase=\"ModalButtons.OK\"\n [ngTemplateOutlet]=\"modalButton\"\n [ngTemplateOutletContext]=\"{ text: 'actions.ok' }\"\n >\n </ng-container>\n <ng-container *ngSwitchCase=\"ModalButtons.CONTINUE_CANCEL\" [ngTemplateOutlet]=\"modalButtonContinueCancel\">\n </ng-container>\n <ng-container *ngSwitchCase=\"ModalButtons.CUSTOM\">\n <ng-content select=\"[buttons]\"></ng-content>\n </ng-container>\n <ng-container\n *ngSwitchDefault\n [ngTemplateOutlet]=\"modalButton\"\n [ngTemplateOutletContext]=\"{ text: 'actions.done' }\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #modalButtonContinueCancel>\n <fcom-button\n class=\"close-modal-btn mr-xsmall-r\"\n [text]=\"'actions.cancel' | finLocalization\"\n [disabled]=\"!open || forceRemainOpen\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n (clickBtn)=\"onClose()\"\n >\n </fcom-button>\n <fcom-button\n class=\"confirm-modal-btn\"\n [text]=\"confirmTranslationKey | finLocalization\"\n [disabled]=\"!open || !confirmEnabled || forceRemainOpen\"\n (clickBtn)=\"onConfirm()\"\n >\n </fcom-button>\n</ng-template>\n\n<ng-template #modalContent>\n <div\n #modalOverlay\n data-testid=\"modal-overlay\"\n class=\"modal\"\n [ngClass]=\"{ 'fit-content-mobile': !fullHeightMobile }\"\n [attr.aria-labelledby]=\"'modal-' + modalId + '-title'\"\n role=\"dialog\"\n aria-modal=\"true\"\n (click)=\"overlayClickable && overlayClick($event)\"\n >\n <div\n class=\"modal-wrapper grow flex flex--column white-bg rounded-large\"\n [ngClass]=\"{\n 'fit-to-content': fitToContent,\n 'full-height': fullHeight,\n 'extra-wide': extraWide,\n }\"\n >\n <header class=\"modal-header fill relative flex--column border-bottom\" [class.is-hidden]=\"!title\">\n <div class=\"flex--nogrow flex--basis-header flex flex--row flex--center\">\n <h2\n #modalHeading\n *ngIf=\"title\"\n class=\"font-heading-4 flex-1 truncate overflow-hidden nordic-blue-900-text pr-xsmall-y pr-large-l\"\n [attr.id]=\"'modal-' + modalId + '-title'\"\n data-testid=\"modal-title\"\n tabindex=\"-1\"\n >\n {{ title }}\n </h2>\n <button\n *ngIf=\"!forceRemainOpen && (modalService.hideCloseButton$ | async) === false\"\n #closeButton\n class=\"close-button flex--nogrow flex--self-stretch btn--no-outline focus-inset pr-large-x pr-xsmall-y\"\n [disabled]=\"!open\"\n [attr.title]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n (click)=\"onClose()\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n <ng-content select=\"[subtitle]\"></ng-content>\n </header>\n <div\n class=\"modal-content-wrapper flex-1 scroll relative\"\n [class.rounded-large]=\"roundedContent\"\n tabindex=\"0\"\n #content\n >\n <ng-content></ng-content>\n </div>\n <footer *ngIf=\"buttons\" class=\"flex--nogrow\">\n <ng-content select=\"[messageBox]\"></ng-content>\n <ng-container *ngTemplateOutlet=\"buttonTmpl\"></ng-container>\n </footer>\n </div>\n </div>\n</ng-template>\n\n<div fcomTrapFocus *ngIf=\"open\" (keydown.escape)=\"onCloseEvent($event)\" [@openClose] class=\"transition\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n</div>\n","import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Output,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { animate, style, transition, trigger } from '@angular/animations';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\n\nimport { ModalButtons } from './interfaces';\nimport { ButtonTheme } from '../buttons/button';\nimport { coerceBooleanProperty } from '../../utils/utils';\nimport { ModalService } from './service/modal.service';\n\n/**\n * A modal component that displays its content in a scrollable div.\n *\n * @example\n * <b>Example with buttons from parameters</b>\n * The button is rendered inside the scrollable content\n *\n * <code>\n * <pre>\n * <fcom-modal\n * [(open)]=\"modal.open\"\n * [title]=\"modal.title | finLocalization\"\n * [buttons]=\"ModalButtons.DONE\">\n * <div class=\"block pr-medium-x pr-medium-y\">\n * Some amazing content\n * </div>\n * <div messageBox>Place a notification above the buttons</div>\n * <div buttons>Place custom buttons in the same place as the standard buttons</div>\n * </fcom-modal>\n * </pre>\n * </code>\n */\n@Component({\n selector: 'fcom-modal',\n styleUrls: ['modal.component.scss'],\n templateUrl: 'modal.component.html',\n animations: [\n trigger('openClose', [\n transition(':enter', [style({ opacity: 0 }), animate('0.3s ease', style({ opacity: 1 }))]),\n transition(':leave', [style({ opacity: '1' }), animate('0.3s ease', style({ opacity: 0 }))]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalComponent implements OnDestroy {\n @ViewChild('closeButton') closeButton: ElementRef;\n @ViewChild('content') content: ElementRef;\n @ViewChild('modalOverlay') modalOverlay: ElementRef;\n @ViewChild('modalHeading') modalHeading: ElementRef;\n\n public readonly ModalButtons = ModalButtons;\n public readonly modalId = uuid();\n public readonly ButtonTheme = ButtonTheme;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n\n /**\n * Private boolean property storing the open state\n */\n private _openState = false;\n\n /**\n * Private boolean property storing the last attempted open state. Used for closing the modal after remainOpen changed to false\n */\n private _lastAttemptedState = false;\n\n /**\n * Called when the open state changes to closed\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output()\n close: EventEmitter<void> = new EventEmitter();\n\n /**\n * @Deprecated - Use open instead\n */\n @Input()\n set isOpen(_open) {\n this.open = _open;\n }\n\n private _forceRemainOpen = false;\n\n /**\n * Stops the modal from closing until this value is changed to false. This disables\n * all buttons within the view and prevents close-button in header from rendering.\n *\n * This input replaces open being changed to false.\n */\n @Input()\n set forceRemainOpen(val: boolean) {\n this._forceRemainOpen = coerceBooleanProperty(val);\n // check if we need to toggle the open state\n if (!this._forceRemainOpen && !this._lastAttemptedState && this.open) {\n this.open = this._lastAttemptedState;\n }\n }\n get forceRemainOpen(): boolean {\n return this._forceRemainOpen;\n }\n\n /**\n * Boolean property indicating the state of the modal (i.e. open or closed).\n */\n @Input()\n set open(_open: boolean) {\n const open = coerceBooleanProperty(_open);\n this._lastAttemptedState = open;\n\n // prevent close routine if forceRemainOpen is true and currently closing\n if (!open && this.open && this.forceRemainOpen) {\n return;\n }\n\n if (this._openState === open) {\n return;\n }\n this._openState = open;\n\n this.openChange.emit(this._openState);\n\n if (this._openState) {\n // If the modal is being destroyed before it has closed, make sure to remove the class from the body.\n this.renderer.addClass(this.document.body, 'modal-open');\n this.renderer.addClass(this.findScrollContainer(this.modalOverlay), 'ios-scroll-touch');\n this.cd.detectChanges();\n this.setFocus();\n } else {\n // If the modal is being destroyed before it has closed, make sure to remove the class from the body.\n this.renderer.removeClass(this.document.body, 'modal-open');\n this.renderer.removeClass(this.findScrollContainer(this.modalOverlay), 'ios-scroll-touch');\n this.close.next();\n this.cd.detectChanges();\n }\n }\n\n get open(): boolean {\n return this._openState;\n }\n\n /**\n * Event emmiter Indicating the new state of the modal. Allows two-way data binding\n *\n * @example\n * <code>\n * <pre>\n * <fcom-modal [(open)]=\"openState\"></fcom-modal>\n * </pre>\n * </code>\n */\n @Output() openChange = new EventEmitter<boolean>();\n\n /**\n * The title to show in the header of the modal. If empty then the header is not rendered.\n */\n @Input()\n title: string | null;\n\n /**\n * The buttons to show in the footer of the modal. If empty then the footer is not rendered.\n */\n @Input()\n buttons: ModalButtons | null = ModalButtons.DONE;\n\n /**\n * Toggles the enabled/disabled state of the confirm button, with <code>ModalButtons.CONTINUE_CANCEL</code>\n */\n @Input()\n confirmEnabled = true;\n\n /**\n * Translation key to be used with the confirm button. Defaults to actions.next.\n */\n @Input()\n confirmTranslationKey = 'actions.next';\n\n /**\n * Makes modal height to fit to content height\n */\n @Input()\n fitToContent = false;\n\n /**\n * Decides if overlay click event is propagated\n */\n @Input()\n overlayClickable = true;\n\n /**\n * Modal can take up the height of the screen\n */\n @Input()\n fullHeight = false;\n\n /**\n * Whether modal should be closed when continue is clicked\n */\n @Input()\n closeOnContinue = true;\n\n /**\n * Modal can take up the height of the screen in mobile\n */\n @Input()\n fullHeightMobile = true;\n\n /**\n * Extend max-width to 900px (45rem)\n */\n @Input()\n extraWide = false;\n\n /**\n * Add border-radius to modal content\n * Can be used to align styling if no header and footer is rendered\n */\n @Input()\n roundedContent = false;\n\n /**\n * ElementRef for an element that should receive focus when the modal opens\n */\n @Input()\n focusTarget?: ElementRef;\n\n /**\n * Called when modal is confirmed. Only applicable to certain buttons\n */\n @Output()\n confirm: EventEmitter<void> = new EventEmitter();\n\n constructor(\n @Inject(DOCUMENT) private readonly document: any,\n private renderer: Renderer2,\n private cd: ChangeDetectorRef,\n private elem: ElementRef,\n protected modalService: ModalService\n ) {}\n\n ngOnDestroy(): void {\n this.renderer.removeClass(this.document.body, 'modal-open');\n this.renderer.removeClass(this.findScrollContainer(this.modalOverlay), 'ios-scroll-touch');\n\n if (this.open) {\n this.close.next();\n }\n }\n\n onClose(): void {\n if (!this.forceRemainOpen) {\n this.open = false;\n }\n }\n\n onCloseEvent(event: Event): void {\n event.stopPropagation();\n this.onClose();\n }\n\n onConfirm(): void {\n this.confirm.next();\n if (this.closeOnContinue) {\n this.onClose();\n }\n }\n\n /**\n * Only close when the overlay is clicked, and stop propagation to stop fcomClickOutside events\n * from firing on other elements.\n */\n overlayClick(event: MouseEvent): void {\n if (event.target === this.modalOverlay.nativeElement) {\n this.onCloseEvent(event);\n }\n }\n\n private setFocus(): void {\n if (this.focusTarget?.nativeElement && this.elem.nativeElement.contains(this.focusTarget.nativeElement)) {\n this.focusTarget.nativeElement.focus();\n } else if (this.title) {\n this.modalHeading.nativeElement.focus();\n } else {\n if (this.elem.nativeElement.querySelector('[data-focus-on-modal-open]')) {\n this.elem.nativeElement.querySelector('[data-focus-on-modal-open]').focus();\n } else {\n this.content.nativeElement.focus();\n }\n }\n }\n\n private findScrollContainer(elRef: ElementRef): HTMLElement {\n if (!elRef || !elRef.nativeElement) {\n return this.document.documentElement;\n }\n\n let el: HTMLElement = elRef.nativeElement;\n\n while (el.parentElement) {\n el = el.parentElement;\n if (el.classList.contains('scroll')) {\n return el;\n }\n }\n return this.document.documentElement;\n }\n}\n","declare const jest: unknown;\n\nexport const elementIsVisible = (element: HTMLElement, includeVisuallyHidden: boolean): boolean => {\n return (\n !element.classList.contains('is-hidden') &&\n (includeVisuallyHidden || (!includeVisuallyHidden && !element.classList.contains('is-vishidden'))) &&\n // If this is run in Jest, Jest does not render the elements into DOM, and they don't get a height or a width\n (typeof jest !== 'undefined' ||\n // if this is run on browser, we should check for widths and height\n !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length))\n );\n};\n\nexport const getBreakpoint = (width: number): string => {\n switch (true) {\n case width < 600:\n return 'mobile';\n case width < 1024:\n return 'tablet';\n case width < 1600:\n return 'laptop';\n default:\n return 'desktop';\n }\n};\n\nexport const findFirstFocusableElement = (node: HTMLElement): HTMLElement | HTMLInputElement | null => {\n const focusableSelector = `button:not([disabled]), [href]:not([disabled]), input:not([type=\"hidden\"]):not([disabled]), \n select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])`;\n const focusableElements = Array.from(node.querySelectorAll<HTMLElement | HTMLInputElement>(focusableSelector));\n const firstValidElement = focusableElements.find((element) => {\n return (\n !(element.offsetWidth === 0 && element.offsetHeight === 0) &&\n !element.hidden &&\n (element.tabIndex === undefined || element.tabIndex >= 0)\n );\n });\n\n return firstValidElement || null;\n};\n","<div class=\"font-body-1\" [formGroup]=\"parentForm\" [class.mr-large-b]=\"displayContainerStyles\">\n <div [formArrayName]=\"controlName\">\n <ng-container *ngFor=\"let group of formArray.controls; let i = index\">\n <div\n [formGroupName]=\"i\"\n [ngClass]=\"{\n 'mr-medium-t': i > 0 && !isNestedArray && !compressedList,\n 'mr-xsmall-t': i > 0 && isNestedArray,\n 'pr-small-x pr-small-t grey-25-bg nested-array-item': isNestedArray,\n }\"\n [class]=\"'form-array-item-' + controlName\"\n *ngIf=\"i === 0 || !hideGroups\"\n >\n <div\n *ngIf=\"displayLabels\"\n class=\"bold-type nordic-blue-900-text mr-xxsmall-b item-label\"\n [class.font-body-1]=\"isNestedArray\"\n [class.font-body-1]=\"!isNestedArray\"\n >\n {{ translationPrefix + '.label' | finLocalization }} {{ i + 1 }}\n </div>\n <ng-container *ngTemplateOutlet=\"formGroup; context: { parentFormGroup: group, index: i }\"></ng-container>\n <fcom-button\n *ngIf=\"i >= minGroups\"\n class=\"remove-button\"\n [attr.data-testid]=\"'remove-' + controlName\"\n [class.mr-small-b]=\"!compressedList\"\n [class.disabled-area]=\"disabled\"\n [ngClass]=\"'form-array-remove-' + controlName\"\n (clickBtn)=\"removeFormGroup(i)\"\n [disabled]=\"disabled\"\n [text]=\"(translationPrefix + '.remove' | finLocalization) + (displayLabels ? ' ' + (i + 1).toString() : '')\"\n [icon]=\"{ name: SvgLibraryIcon.TRASH, position: IconPosition.LEFT }\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n >\n </fcom-button>\n </div>\n </ng-container>\n </div>\n <div\n *ngIf=\"!hideGroups\"\n [ngClass]=\"{ 'pr-small-x grey-25-bg nested-array-item': isNestedArray }\"\n [class.mr-xsmall-t]=\"formArray.length > 0\"\n >\n <fcom-button\n #addGroupButtonElement\n class=\"add-button\"\n [ngClass]=\"'form-array-add-' + controlName\"\n [attr.data-testid]=\"'add-' + controlName\"\n [class.mr-xsmall-y]=\"!compressedList\"\n [class.disabled-area]=\"disabled\"\n [class.nordic-blue-900-text]=\"formArray.length < maxGroups\"\n [class.nordic-blue-900-text]=\"formArray.length >= maxGroups\"\n (clickBtn)=\"addFormGroup()\"\n [disabled]=\"formArray.length >= maxGroups || disabled\"\n [aria]=\"{ describedby: 'addPassengerDescription' }\"\n [text]=\"translationPrefix + '.add' | finLocalization\"\n [icon]=\"{ name: SvgLibraryIcon.PLUS, position: IconPosition.LEFT }\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n [focus$]=\"focusToButton$\"\n >\n </fcom-button>\n <span id=\"addPassengerDescription\" class=\"is-vishidden\">{{ 'formArray.addNewItem' | finLocalization }}</span>\n </div>\n</div>\n","import { Component, ContentChild, Input, OnChanges, OnInit, TemplateRef } from '@angular/core';\nimport { AbstractControlOptions, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Subject } from 'rxjs';\n\nimport { ButtonTheme, IconPosition } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-form-array',\n templateUrl: 'form-array.component.html',\n styleUrls: ['form-array.component.scss'],\n})\nexport class FormArrayComponent implements OnInit, OnChanges {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly IconPosition = IconPosition;\n readonly ButtonTheme = ButtonTheme;\n\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n formGroupConfig: { [key: string]: any };\n\n @Input()\n formGroupOptions: AbstractControlOptions = {};\n\n @Input()\n minGroups = 0;\n\n @Input()\n maxGroups = 100;\n\n @Input()\n hideGroups = false;\n\n @Input()\n displayLabels = false;\n\n @Input()\n isNestedArray = false;\n\n @Input()\n displayContainerStyles = true;\n\n @Input()\n compressedList = false;\n\n @Input()\n disabled = false;\n\n @ContentChild(TemplateRef, { static: true }) formGroup: TemplateRef<any>;\n\n focusToButton$: Subject<boolean> = new Subject<boolean>();\n\n constructor(private fb: UntypedFormBuilder) {}\n\n ngOnInit(): void {\n for (let i = this.formArray.length; i < this.minGroups; i++) {\n this.formArray.push(this.fb.group(this.formGroupConfig, this.formGroupOptions));\n }\n }\n\n ngOnChanges(): void {\n while (this.maxGroups < this.formArray.length) {\n this.formArray.removeAt(this.formArray.length - 1);\n }\n }\n\n addFormGroup(): void {\n if (this.formArray.length < this.maxGroups) {\n this.formArray.push(this.fb.group(this.formGroupConfig, this.formGroupOptions));\n this.parentForm.markAsDirty();\n }\n }\n\n removeFormGroup(index: number): void {\n this.focusToButton$.next(true);\n this.formArray.removeAt(index);\n this.parentForm.markAsDirty();\n }\n\n get formArray(): UntypedFormArray {\n return this.parentForm.get(this.controlName) as UntypedFormArray;\n }\n}\n","import { AbstractControl, ValidatorFn, Validators } from '@angular/forms';\n\nimport { CORPORATE_USERNAME_PATTERN, EMAIL_REGEX, isFinnairPlusCardNumber } from '@fcom/core/utils';\n\n/**\n * FPlus number validation without AY prefix\n */\nexport const finnairPlusNumberValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if (control.value === '' || control.value === null || isFinnairPlusCardNumber(control.value.toUpperCase())) {\n return null;\n } else {\n return { pattern: true };\n }\n };\n};\n\nexport const usernameValidator = (): ValidatorFn => {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const invalidEmail = Validators.pattern(EMAIL_REGEX)(control);\n const invalidMemberNumber = finnairPlusNumberValidator()(control);\n if (control.value === '' || control.value === null) {\n return null;\n } else if (invalidEmail && invalidMemberNumber) {\n return { pattern: true };\n } else {\n return null;\n }\n };\n};\n\nexport const corporateUsernameValidator = (): ValidatorFn => {\n return (control: AbstractControl<string>): { [key: string]: boolean } | null => {\n if (!control.value) {\n return null;\n }\n const invalidEmail = Validators.pattern(EMAIL_REGEX)(control);\n const invalidUserName = !control.value.match(CORPORATE_USERNAME_PATTERN);\n if (invalidEmail && invalidUserName) {\n return { pattern: true };\n }\n return null;\n };\n};\n","<span class=\"fragment\">\n <h3 *ngIf=\"showTitle && (title$ | async)\" class=\"teaser-title\">\n {{ title$ | async }}\n </h3>\n <div *ngIf=\"icon$ | async\" class=\"teaser-icon-container\">\n <img [src]=\"icon$ | async\" [alt]=\"title$ | async | finEmpty\" class=\"grow\" />\n </div>\n <div class=\"teaser-text\" [innerHTML]=\"text$ | async | resolveLinks | finSafe: 'html'\"></div>\n</span>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { isNotBlank } from '@fcom/core/utils';\nimport { CmsTeaser } from '@fcom/core-api';\nimport { finShare } from '@fcom/rx';\n\n@Component({\n selector: 'cms-unstyled-teaser',\n templateUrl: './cms-unstyled-teaser.component.html',\n})\nexport class CmsUnstyledTeaserComponent implements OnInit {\n @Input()\n content$: Observable<CmsTeaser>;\n @Input()\n showIcon = false;\n @Input()\n showTitle = true;\n\n title$: Observable<string>;\n text$: Observable<string>;\n icon$: Observable<string>;\n\n ngOnInit(): void {\n const shared$ = this.content$.pipe(finShare());\n this.title$ = shared$.pipe(\n filter((t: CmsTeaser) => isNotBlank(t.teaserTitle)),\n map((t: CmsTeaser) => t.teaserTitle)\n );\n this.text$ = shared$.pipe(map((t: CmsTeaser) => t.teaserText));\n this.icon$ = shared$.pipe(\n filter((t: CmsTeaser) => this.showIcon && isNotBlank(t.iconUrl)),\n map((t: CmsTeaser) => t.iconUrl)\n );\n }\n}\n","<div class=\"product-card white-bg grow fill flex flex--column relative\">\n @if (useNewProductCardLayout) {\n <div class=\"rounded-large overflow-hidden border\">\n <div\n class=\"content-container flex\"\n [class.nordic-blue-400-bg]=\"isSpecialUpsellProduct\"\n data-testid=\"product-card-content-container\"\n >\n <div class=\"relative flex overflow-hidden image-container\">\n <fcom-image\n *ngIf=\"image\"\n class=\"picture block flex--self-stretch\"\n [imageData]=\"image\"\n [ratio]=\"isLaptopUp ? '16x9' : '21x9'\"\n [scale]=\"false\"\n [fillParent]=\"isLaptopUp\"\n ></fcom-image>\n </div>\n <div class=\"flex-1 flex flex--column pr-small-x ps-medium-y\">\n <h2 class=\"font-heading-4\" [class.white-text]=\"isSpecialUpsellProduct\" data-testid=\"product-card-title\">\n {{ title }}\n </h2>\n <div class=\"flex-1 flex flex--row flex--space-between\">\n <div class=\"flex-1 flex flex--column flex--self-end\">\n @if (!countText) {\n @if (lowestPrice) {\n <div class=\"flex flex--middle\">\n <span\n class=\"font-body-2\"\n [class.white-text]=\"isSpecialUpsellProduct\"\n data-testid=\"product-card-starting-from-label\"\n >{{ 'pricesStartingFrom' | finLocalization }}</span\n >\n @if (originalPrice) {\n <span\n class=\"font-body-2 strike-through ps-xxsmall-l\"\n [class.white-text]=\"isSpecialUpsellProduct\"\n data-testid=\"product-card-original-price\"\n >{{ originalPrice }}</span\n >\n }\n </div>\n <span\n [class.heather-700-text]=\"originalPrice && !isSpecialUpsellProduct\"\n [class.white-text]=\"isSpecialUpsellProduct\"\n class=\"font-heading-5\"\n data-testid=\"product-card-price\"\n >{{ lowestPrice }}</span\n >\n }\n\n @if (productTagText && productTagIcon) {\n <fcom-tag data-testid=\"product-card-product-tag\" [theme]=\"productTagTheme\">\n <fcom-icon class=\"icon-small\" [name]=\"productTagIcon\"></fcom-icon>\n <span class=\"ms-xxsmall-l\">{{ productTagText }}</span>\n </fcom-tag>\n }\n }\n </div>\n <fcom-button\n class=\"block ps-xlarge-t flex--self-end\"\n [mode]=\"ButtonMode.INLINE\"\n [loading]=\"loading\"\n [theme]=\"buttonTheme\"\n [text]=\"buttonText\"\n [icon]=\"{ name: buttonIcon, position: IconPosition.RIGHT }\"\n [title]=\"buttonAriaText\"\n [aria]=\"{ label: buttonAriaText, role: 'button', loadingLabel: 'actions.loading' | finLocalization }\"\n [focus$]=\"focusOnBtn$\"\n (clickBtn)=\"emitProductCategory($event)\"\n >\n </fcom-button>\n </div>\n </div>\n </div>\n @if (countText) {\n <div class=\"border-top font-body-1 bold-type ps-xsmall-y pr-small-x\" data-testid=\"product-card-count-text\">\n {{ countText }}: {{ price }}\n </div>\n }\n\n <fcom-notification\n class=\"border-top\"\n *ngIf=\"notificationText\"\n [theme]=\"notificationTheme\"\n [layout]=\"NotificationLayout.EDGE_TO_EDGE\"\n [title]=\"notificationTitle\"\n [iconName]=\"notificationIcon\"\n >\n {{ notificationText }}\n </fcom-notification>\n </div>\n } @else {\n <fcom-image\n *ngIf=\"image\"\n class=\"picture block rounded-top-large border-top border-left border-right border\"\n [ratio]=\"'21x9'\"\n [imageData]=\"image\"\n ></fcom-image>\n\n <div\n class=\"flex-1 pr-small-x ps-medium-y flex flex--column rounded-bottom-large border-bottom border-left border-right border\"\n >\n <h2 class=\"nordic-blue-900-text font-heading-4\">{{ title }}</h2>\n\n @if (lowestPrice) {\n <div class=\"flex flex--middle\">\n <span class=\"font-body-2 ps-xxsmall-r\" data-testid=\"product-card-starting-from-label\">{{\n 'pricesStartingFrom' | finLocalization\n }}</span>\n <span\n [ngClass]=\"{\n 'font-heading-5': !originalPrice,\n 'strike-through': originalPrice,\n 'font-body-2': originalPrice,\n }\"\n data-testid=\"product-card-starting-from-price\"\n >{{ originalPrice ? originalPrice : lowestPrice }}</span\n >\n @if (originalPrice) {\n <span class=\"font-heading-5 heather-700-text ps-xxsmall-l\" data-testid=\"product-card-discounted-price\">{{\n lowestPrice\n }}</span>\n }\n </div>\n }\n\n @if (productTagText && productTagIcon) {\n <fcom-tag data-testid=\"product-card-product-tag\" [theme]=\"productTagTheme\">\n <fcom-icon class=\"icon-small\" [name]=\"productTagIcon\"></fcom-icon>\n <span class=\"ms-xxsmall-l\">{{ productTagText }}</span>\n </fcom-tag>\n }\n\n <p *ngIf=\"detailText\" class=\"ps-xsmall-t ps-small-b font-body-1 flex-1\">{{ detailText }}</p>\n\n <ng-container *ngIf=\"statusText || purchasedText\">\n <hr class=\"border-top-dashed nordic-blue-50-border\" aria-hidden=\"true\" />\n\n <div class=\"ps-small-y align-right\">\n <div class=\"nordic-blue-900-text font-body-1\" *ngIf=\"purchasedText\">\n {{ purchasedText }}\n </div>\n <div\n class=\"font-body-1\"\n [ngClass]=\"{\n 'medium-type': hasAddedItems,\n 'nordic-nordic-blue-900-100-text': hasAddedItems,\n 'nordic-blue-900-text': !hasAddedItems,\n }\"\n >\n {{ statusText }}\n </div>\n <div *ngIf=\"price\" class=\"font-body-1 nordic-blue-900-text\">{{ price }}</div>\n </div>\n\n <hr class=\"border-top-dashed nordic-blue-50-border\" aria-hidden=\"true\" />\n </ng-container>\n\n <div class=\"align-center\">\n <fcom-button\n *ngIf=\"!hideButton\"\n class=\"block\"\n [ngClass]=\"{ 'ps-small-y': !hideViewButton, 'ps-small-t': hideViewButton }\"\n [mode]=\"ButtonMode.FILL\"\n [loading]=\"loading\"\n [theme]=\"buttonTheme\"\n [text]=\"buttonText\"\n [icon]=\"{ name: buttonIcon, position: IconPosition.RIGHT }\"\n [title]=\"buttonAriaText\"\n [aria]=\"{ label: buttonAriaText, role: 'button', loadingLabel: 'actions.loading' | finLocalization }\"\n [focus$]=\"focusOnBtn$\"\n (clickBtn)=\"emitProductCategory($event)\"\n >\n </fcom-button>\n\n <fcom-notification\n *ngIf=\"notificationText\"\n class=\"block ps-small-y ps-small-t align-left\"\n [theme]=\"notificationTheme\"\n [title]=\"notificationTitle\"\n [iconName]=\"notificationIcon\"\n >\n {{ notificationText }}\n </fcom-notification>\n\n <button\n #viewSummaryBtn\n class=\"view-details nordic-blue-900-text underline font-body-1\"\n *ngIf=\"!hideViewButton\"\n (click)=\"emitViewDetails($event)\"\n [attr.aria-label]=\"viewSummaryText + ' ' + title\"\n >\n {{ viewSummaryText }}\n </button>\n </div>\n </div>\n }\n</div>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils/unsubscribe';\n\nimport { ButtonMode, ButtonTheme } from './../../buttons/button/enums';\nimport { IconPosition } from '../../icons';\nimport { ResponsiveImage } from '../../images/interfaces';\nimport { TagTheme } from '../../tag';\nimport { NotificationLayout, NotificationTheme } from '../../notifications';\n\nconst stopPropagation = (event: Event): boolean => {\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n return false;\n};\n\n@Component({\n selector: 'fcom-product-card',\n templateUrl: './product-card.component.html',\n styleUrls: ['./product-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProductCardComponent implements AfterViewInit, OnDestroy {\n readonly TagTheme = TagTheme;\n readonly ButtonMode = ButtonMode;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly NotificationLayout = NotificationLayout;\n\n @Input() hasAddedItems: boolean;\n\n /**\n * The title of the product.\n */\n @Input() title: string;\n\n /**\n * The detailed description of the product.\n */\n @Input() detailText: string;\n\n /**\n * The image of the product.\n */\n @Input() image: ResponsiveImage;\n\n /**\n * The current status text to be shown for the product.\n * Should be used to to show for example how many of this product we have selected\n */\n @Input() statusText: string;\n\n /**\n * The purchased text to be shown for the product.\n * Should be used to to show how many of this product have previously been bought\n */\n @Input() purchasedText: string;\n\n /**\n * Price of the product\n */\n @Input() price: string;\n\n /**\n * Text to be shown for view button\n */\n @Input() viewSummaryText: string;\n\n /**\n * Primary button loading state for the product\n */\n @Input() loading: boolean;\n\n /**\n * Primary button theme\n */\n @Input() buttonTheme: ButtonTheme;\n\n /**\n * Primary button text\n */\n @Input() buttonText: string;\n\n /**\n * Primary button aria text\n */\n @Input() buttonAriaText: string;\n\n /**\n * If button should be disabled for the product\n */\n @Input() hideButton = false;\n\n /**\n * Hides the view button of the product card if set\n */\n @Input() hideViewButton = false;\n\n /**\n * Primary button icon\n */\n @Input() buttonIcon: SvgLibraryIcon = SvgLibraryIcon.PLUS;\n\n /**\n * Notification translated text\n */\n @Input() notificationText?: string;\n\n /**\n * Notification translated title\n */\n @Input() notificationTitle?: string;\n\n /**\n * Notification icon\n */\n @Input() notificationIcon?: SvgLibraryIcon;\n\n /**\n * Notification theme\n */\n @Input() notificationTheme: NotificationTheme = NotificationTheme.INFO;\n\n @Input() focusOnViewSummary$: Observable<boolean>;\n @Input() focusOnBtn$: Observable<boolean>;\n\n @Input() lowestPrice?: string = undefined;\n\n @Input() originalPrice?: string = undefined;\n\n @Input() productTagText?: string = undefined;\n\n @Input() productTagIcon?: SvgLibraryIcon = undefined;\n\n @Input() productTagTheme?: TagTheme = undefined;\n\n @Input() useNewProductCardLayout = false;\n\n @Input() countText: string = undefined;\n\n @Input() isLaptopUp: boolean;\n\n @Input() isSpecialUpsellProduct: boolean;\n\n /**\n * Event emitter for selectProduct event from primary button\n */\n @Output() selectProduct: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Event emitter for viewDetails event from view button\n */\n @Output() viewDetails: EventEmitter<void> = new EventEmitter<void>();\n\n private subscriptions: Subscription = new Subscription();\n\n @ViewChild('viewSummaryBtn', { static: false }) viewSummaryBtn: ElementRef;\n\n ngAfterViewInit(): void {\n this.subscriptions.add(\n this.focusOnViewSummary$\n .pipe(filter((focus) => !this.hideButton && focus))\n .subscribe(() => this.viewSummaryBtn.nativeElement.focus())\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n emitProductCategory(event: Event): void {\n stopPropagation(event);\n this.selectProduct.emit();\n }\n\n emitViewDetails(event: Event): void {\n stopPropagation(event);\n this.viewDetails.emit();\n }\n}\n","export interface KeyCode {\n keyCode: number;\n key: string[];\n}\nexport class KeyCodes {\n static ESC: KeyCode = { keyCode: 27, key: ['Escape'] };\n static SPACE: KeyCode = { keyCode: 32, key: ['Spacebar', ' '] };\n static ENTER: KeyCode = { keyCode: 13, key: ['Enter'] };\n static DOWN: KeyCode = { keyCode: 40, key: ['ArrowDown', 'Down'] };\n static UP: KeyCode = { keyCode: 38, key: ['ArrowUp', 'Up'] };\n static LEFT: KeyCode = { keyCode: 37, key: ['ArrowLeft', 'Left'] };\n static RIGHT: KeyCode = { keyCode: 39, key: ['ArrowRight', 'Right'] };\n static PAGE_UP: KeyCode = { keyCode: 33, key: ['PageUp'] };\n static PAGE_DOWN: KeyCode = { keyCode: 34, key: ['PageDown'] };\n static END: KeyCode = { keyCode: 35, key: ['End'] };\n static HOME: KeyCode = { keyCode: 36, key: ['Home'] };\n static TAB: KeyCode = { keyCode: 9, key: ['Tab'] };\n static KEYCODES_ARRAY: KeyCode[] = [\n KeyCodes.ESC,\n KeyCodes.SPACE,\n KeyCodes.ENTER,\n KeyCodes.DOWN,\n KeyCodes.UP,\n KeyCodes.LEFT,\n KeyCodes.RIGHT,\n KeyCodes.PAGE_UP,\n KeyCodes.PAGE_DOWN,\n KeyCodes.END,\n KeyCodes.HOME,\n KeyCodes.TAB,\n ];\n}\n\nexport const isKeyboardEvent = (event: KeyboardEvent, keyCode: KeyCode): boolean => {\n if (event.key !== undefined) {\n return keyCode.key.indexOf(event.key) > -1;\n } else if (event.keyCode !== undefined) {\n return event.keyCode === keyCode.keyCode;\n }\n return false;\n};\n\nexport const getKeyCodeFromEvent = (event: KeyboardEvent): KeyCode => {\n return KeyCodes.KEYCODES_ARRAY.find(\n (keyCode: KeyCode) => keyCode.keyCode === event.keyCode || keyCode.key.indexOf(event.key) > -1\n );\n};\n","'use strict';\n\nvar $Object = require('es-object-atoms');\n\n/** @type {import('./Object.getPrototypeOf')} */\nmodule.exports = $Object.getPrototypeOf || null;\n","import { BehaviorSubject, Observable, of } from 'rxjs';\nimport { delay, filter, map, mergeMap, scan, startWith, switchMap, take, tap } from 'rxjs/operators';\n\n/* eslint-disable @typescript-eslint/no-this-alias */\n\nexport type ObjectOrArray<T> = T | T[];\n/**\n * Operator that zips the stream with the last value.\n *\n * @param [initialValue=undefined] the value to set as the second element of the first emitted value.\n *\n * E.g.\n * With the inputs: 1, 2, 3, 4\n * Would pass on values: [1, undefined], [2, 1], [3, 2], [4, 3]\n *\n * @example\n * Observable.from([1,2,3])\n * .pipe(zipWithLastValue()) -> [1, undefined], [2, 1], [3, 2]\n *\n * Observable.from([1])\n * .pipe(zipWithLastValue(10)) -> [1, 10]\n */\nexport const zipWithLastValue =\n <T>(initialValue?: T) =>\n (o$: Observable<T>): Observable<T[]> =>\n o$.pipe(scan((previous, current) => [current, previous[0]], [initialValue]));\n\n/**\n * Zips the stream with index.\n *\n * @example\n * <code><pre>\n * Observable.from(['a', 'b', 'c'])\n * .pipe(zipWithIndex())\n *\n * -> ['a', 0], ['b', 1], ['c', 2]\n * </pre></code>\n */\nexport const zipWithIndex =\n <T>() =>\n (o$: Observable<T>): Observable<[T, number]> =>\n o$.pipe(map((obj, idx) => [obj, idx]));\n\n/**\n * Reduces a stream of observables (`Observable<Observable<T>>`) so that\n * the execution of the next item in the stream will begin only after the previous\n * stream has _completed_.\n *\n * Ensures that the operations are run in correct order.\n *\n * @example\n * <code><pre>\n * const startTime = Date.now();\n * from([\n * of(1).pipe(delay(2000), startWith(0)),\n * from([2, 3]),\n * of(4).pipe(delay(1000)),\n * of(5).pipe(delay(1000))\n * ])\n * .pipe(triggerWhenPreviousCompletes())\n * .subscribe((v) => console.log(`${Date.now() - startTime}:\\t${v}`));\n *\n * -------\n * OUTPUT FROM REAL RUN:\n * 4: 0\n * 5009: 1\n * 5012: 2\n * 5012: 3\n * 6016: 4\n * 7021: 5\n * </pre></code>\n */\nexport const triggerWhenPreviousCompletes =\n <T>() =>\n (o$: Observable<Observable<T>>): Observable<T> => {\n return new Observable<T>((subscriber) => {\n const indexReady$: BehaviorSubject<number> = new BehaviorSubject(0);\n const subscription = o$\n .pipe(\n zipWithIndex(),\n mergeMap(([obs, idx]) =>\n indexReady$.pipe(\n filter((i) => i === idx),\n take(1),\n switchMap(() => obs),\n tap({\n complete: () => indexReady$.next(idx + 1),\n })\n )\n )\n )\n .subscribe({\n next(value) {\n subscriber.next(value);\n },\n error(err: unknown) {\n subscriber.error(err);\n },\n complete() {\n indexReady$.complete();\n subscriber.complete();\n },\n });\n\n return () => {\n // eslint-disable-next-line rxjs/no-subject-unsubscribe\n indexReady$.unsubscribe();\n subscription.unsubscribe();\n };\n });\n };\n\ninterface PrevNext<T> {\n previous: T;\n next: T;\n}\n\n/**\n * Ensures execution in order with scan, i.e., the last input value is always guaranteed to be in effect.\n */\nexport const keepState =\n <T>(durationMs: number, test: (ms: T) => boolean = (a) => !a, initialState?: T) =>\n (o$: Observable<T>): Observable<T> =>\n o$.pipe(\n scan(\n (acc: PrevNext<T>, val: T) => {\n return {\n previous: acc.next,\n next: val,\n };\n },\n { previous: undefined, next: initialState }\n ),\n switchMap(({ previous, next }) => {\n if (!test(previous) && test(next)) {\n return of(next).pipe(delay(durationMs), startWith(previous));\n }\n return of(next);\n })\n );\n","import { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\n// Copied here from utils to avoid circular dependencies\nconst isNull = (obj) => obj === null && typeof obj === 'object';\nconst isUndefined = (obj) => typeof obj === 'undefined';\nconst isPresent = (obj) => !isUndefined(obj) && !isNull(obj);\n\nexport const safeMap =\n <T, R>(project: (value: T, index: number) => R, thisArg?: any) =>\n (source$: Observable<T>) => {\n return source$.pipe(filter(isPresent), map(project, thisArg));\n };\n","import { throwError, Observable, of, TimeoutError } from 'rxjs';\nimport { retryWhen, switchMap, delay } from 'rxjs/operators';\n\nexport const DEFAULT_RETRY_BACKOFF_TIME = 1000;\nexport const STATUS_CODES_FOR_RETRY = [408, 504];\n/**\n * Retries with a backoff period between the retries.\n * Use with the <code>.let</code> operator\n * @example\n * <code><pre>\n * httpClient\n * .get(...)\n * .pipe(retryWithBackoff(3))\n * .subscribe(...);\n * </pre></code>\n *\n * @param {number} maxCount=1 the number of times to retry, defaults to 1.\n * @param {number} backoffMs=1000 the amount of milliseconds to wait between retries\n * @param {number[]} retryCodes if retryCodes array specified, means all failed requests with status codes not listed in this array will throw an error immediately without retrying.\n * @return\n */\nexport function retryWithBackoff<T>(\n maxCount = 1,\n backoffMs = DEFAULT_RETRY_BACKOFF_TIME,\n retryCodes = STATUS_CODES_FOR_RETRY\n) {\n return (o$: Observable<T>) =>\n o$.pipe(\n retryWhen((attempts$: Observable<any>) => {\n const errorWhenMaxCountExceeded = (err, idx) => {\n if (err instanceof TimeoutError || (err.status && retryCodes.length && !retryCodes.includes(err.status))) {\n return throwError(() => err);\n }\n\n return idx + 1 > maxCount ? throwError(() => err) : of(idx);\n };\n return attempts$.pipe(switchMap(errorWhenMaxCountExceeded), delay(backoffMs));\n })\n );\n}\n","import { Observable, combineLatest, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nfunction combineTemplateStatic<R>(template: any): Observable<R> {\n const observableKeys = Object.keys(template);\n const observables = observableKeys\n .map((key) => template[key])\n .map((value) => (value instanceof Observable ? value : of(value)));\n\n return combineLatest(observables).pipe(\n map((results) =>\n observableKeys.reduce((resultObject, current, index) => {\n resultObject[current] = results[index];\n return resultObject;\n }, {} as R)\n )\n );\n}\n\n/**\n * @deprecated\n *\n * Should be removed and using combineLatest\n */\nexport const combineTemplate = combineTemplateStatic;\n","import { HttpErrorResponse } from '@angular/common/http';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { DapiHttpErrorResponse } from '@fcom/dapi';\n\nexport const catchErrorAsJson =\n <T>() =>\n (o$: Observable<T>): Observable<T> =>\n o$.pipe(\n catchError((response: unknown) => {\n if (response instanceof HttpErrorResponse && typeof response.error === 'string') {\n try {\n const error = JSON.parse(response.error);\n return throwError(() => new DapiHttpErrorResponse({ ...response, error: error }));\n // eslint-disable-next-line no-empty\n } catch (_err) {}\n }\n return throwError(() => response);\n })\n );\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairAirBoundsChangeRequest } from '../models/finnair-air-bounds-change-request';\nimport { FinnairOrder } from '../models/finnair-order';\n\n\n/**\n * Order change endpoint\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class OrderChangeService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation postOrderChanges\n */\n static readonly PostOrderChangesPath = '/api/v2/order-change/{orderId}';\n\n /**\n * postOrderChanges.\n *\n * POST new itinerary selection during voluntary change flow\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `postOrderChanges()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n postOrderChanges$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairAirBoundsChangeRequest\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<void>> {\n const rb = new DapiRequestBuilder(rootUrl, OrderChangeService.PostOrderChangesPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as DapiHttpResponse<void>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * postOrderChanges.\n *\n * POST new itinerary selection during voluntary change flow\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `postOrderChanges$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n postOrderChanges(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairAirBoundsChangeRequest\n },\n context?: HttpContext\n\n): Observable<void> {\n return this.postOrderChanges$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation getOrderChanges\n */\n static readonly GetOrderChangesPath = '/api/v2/order-change/{orderId}/{orderChangeId}';\n\n /**\n * getOrderChanges.\n *\n * GET temporary PNR created during the change flow\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getOrderChanges()` instead.\n *\n * This method doesn't expect any request body.\n */\n getOrderChanges$Response(rootUrl: string, params: {\n orderId: string;\n orderChangeId: string;\n locale?: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<FinnairOrder>> {\n const rb = new DapiRequestBuilder(rootUrl, OrderChangeService.GetOrderChangesPath, 'get');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.path('orderChangeId', params.orderChangeId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<FinnairOrder>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getOrderChanges.\n *\n * GET temporary PNR created during the change flow\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getOrderChanges$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getOrderChanges(rootUrl: string, params: {\n orderId: string;\n orderChangeId: string;\n locale?: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable<FinnairOrder> {\n return this.getOrderChanges$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<FinnairOrder>) => r.body as FinnairOrder)\n );\n }\n\n}\n","export function getSymbolIterator(): symbol {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator' as any;\n }\n\n return Symbol.iterator;\n}\n\nexport const iterator = getSymbolIterator();\n","export enum LoaderTheme {\n FULL_SCREEN = 'FULL_SCREEN',\n EMBEDDED = 'EMBEDDED',\n INLINE = 'INLINE',\n INLINE_TEXT = 'INLINE_TEXT',\n BUTTON = 'BUTTON',\n}\n\nexport enum LoaderColor {\n BLUE = 'blue',\n WHITE = 'white',\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonModule, IconsModule, ModalModule } from '@fcom/ui-components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { ImagesModule } from '@fcom/common/components/images/images.module';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { GtmModule } from '@fcom/common/gtm';\nimport { PipesModule } from '@fcom/common/pipes';\n\nimport { ContentServicesModule } from '../services/content-services.module';\nimport { BlockOfferTileComponent } from './block-offer/block-offer-tile.component';\n\n// Exports dummy content components as shared module for importing on child modules of cms module and other use cases\n\n@NgModule({\n imports: [\n ButtonModule,\n CommonModule,\n ComponentsModule,\n DirectiveModule,\n GtmModule,\n ImagesModule,\n UiTranslateModule,\n PipesModule,\n IconsModule,\n ContentServicesModule,\n ModalModule,\n ],\n declarations: [BlockOfferTileComponent],\n exports: [BlockOfferTileComponent],\n})\nexport class ContentComponentsModule {}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { ToggleSwitchComponent } from './toggle-switch.component';\n\n@NgModule({\n declarations: [ToggleSwitchComponent],\n imports: [FormsModule, CommonModule],\n exports: [ToggleSwitchComponent],\n})\nexport class ToggleSwitchModule {}\n","<header class=\"layout__booking-header layout__header--override shadow-highlight white-bg nordic-blue-900-text\">\n <div class=\"grid-col-12 no-row-gap grid-max-width\">\n <div class=\"col-f\">\n <div class=\"boxes fill flex\">\n <div class=\"flex-1 flex--basis0 flex flex--start flex--self-center\">\n <fcom-icon-button\n *ngIf=\"showHamburgerMenu$ | async\"\n class=\"nav ms-medium-r\"\n [icon]=\"{ name: SvgLibraryIcon.MENU_LIST }\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_GHOST\"\n [size]=\"IconButtonSize.MEDIUM\"\n [aria]=\"{ label: 'menu.open' | finLocalization }\"\n (clickBtn)=\"menuClick.emit($event)\"\n >\n </fcom-icon-button>\n @if (enableNewStepper && !isInsideNativeWebView) {\n <div class=\"dn-laptop-up\">\n <ng-content select=\"[mobile]\"></ng-content>\n </div>\n }\n <fcom-icon-button\n *ngIf=\"!enableNewStepper || isInsideNativeWebView\"\n [class.hidden]=\"!showBack\"\n class=\"back\"\n [disabled]=\"!showBack\"\n [icon]=\"{ name: SvgLibraryIcon.CHEVRON_LEFT }\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_GHOST\"\n [size]=\"IconButtonSize.MEDIUM\"\n [aria]=\"{ label: 'actions.back' | finLocalization }\"\n (clickBtn)=\"onBackClick()\"\n >\n </fcom-icon-button>\n <a\n class=\"home-link desktop-icon ms-large-r dn-laptop-down flex\"\n [attr.aria-label]=\"'actions.home' | finLocalization\"\n [class.disabled]=\"isInsideNativeWebView\"\n [class.ms-large-l]=\"!enableNewStepper\"\n [href]=\"homeUrl\"\n (click)=\"onHomeClick($event)\"\n >\n <fcom-icon\n class=\"finnair-home nordic-blue-900-text\"\n [category]=\"IconLibrary.CUSTOM\"\n [name]=\"CustomIcon.FINNAIR_LOGO\"\n ></fcom-icon>\n </a>\n </div>\n <div class=\"flex-1 flex flex--center flex--self-center breadcrumb-wrapper\">\n <a\n class=\"home-link mobile-icon dn-laptop-up\"\n [attr.aria-label]=\"'actions.home' | finLocalization\"\n [class.disabled]=\"isInsideNativeWebView\"\n [href]=\"homeUrl\"\n (click)=\"onHomeClick($event)\"\n >\n <fcom-icon\n class=\"nordic-blue-900-text\"\n [category]=\"IconLibrary.CUSTOM\"\n [name]=\"CustomIcon.FINNAIR_EMBLEM\"\n ></fcom-icon>\n </a>\n <ul *ngIf=\"breadcrumbs\" class=\"breadcrumbs flex flex-1 dn-laptop-down\">\n <li\n (click)=\"onBreadcrumbClick(breadcrumb, i)\"\n class=\"breadcrumb phase flex-1 flex flex--center\"\n [class.selectable]=\"i < activeIndex\"\n [class.active]=\"breadcrumb.active\"\n *ngFor=\"let breadcrumb of breadcrumbs; let i = index\"\n >\n <button\n role=\"link\"\n class=\"flex flex--center\"\n [title]=\"breadcrumb.name\"\n [disabled]=\"breadcrumb.disabled || i > activeIndex\"\n >\n <div class=\"phase-block flex--nogrow rounded\"></div>\n <div\n class=\"phase-text flex-1\"\n [ngClass]=\"breadcrumb.active ? 'heather-700-text' : 'nordic-blue-900-text'\"\n >\n {{ breadcrumb.name }}\n </div>\n <span *ngIf=\"phasesAria\">\n <span *ngIf=\"i < activeIndex\" class=\"is-vishidden\">{{ phasesAria.pastStep }}</span>\n <span *ngIf=\"breadcrumb.active\" class=\"is-vishidden\">{{ phasesAria.currentStep }}</span>\n <span *ngIf=\"i > activeIndex\" class=\"is-vishidden\">{{ phasesAria.futureStep }}</span>\n </span>\n </button>\n </li>\n </ul>\n </div>\n <div class=\"flex-1 flex--basis0 flex flex--end flex--self-center align-right\" data-hj-suppress>\n @if (enableNewStepper && !isInsideNativeWebView) {\n <div class=\"dn-laptop-down\">\n <ng-content select=\"[desktop]\"></ng-content>\n </div>\n }\n <fcom-button\n data-testid=\"booking-header-finnair-plus-login-button\"\n (clickBtn)=\"loginClick.emit({ loggedIn: loggedIn, event: $event })\"\n [class.logged-in]=\"loggedIn\"\n [class.hidden]=\"!showLogin\"\n [class]=\"'login-btn'\"\n [disabled]=\"!showLogin\"\n [icon]=\"{\n name: profileIcon,\n position: IconPosition.LEFT,\n }\"\n [mode]=\"ButtonMode.FILL\"\n [text]=\"\n showLogin && loggedIn\n ? userName || logoutText || ('navigation.logout' | finLocalization)\n : enableNewStepper && isMobile\n ? null\n : loginText || ('navigation.login' | finLocalization)\n \"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n ></fcom-button>\n </div>\n </div>\n </div>\n <div class=\"col-f dn-laptop-up breadcrumbs-mobile\">\n <ul *ngIf=\"breadcrumbs\" class=\"flex\">\n <li\n class=\"breadcrumb phase flex-1 flex flex--center\"\n [class.selectable]=\"i < activeIndex\"\n [class.active]=\"breadcrumb.active\"\n *ngFor=\"let breadcrumb of breadcrumbs; let i = index\"\n >\n <div class=\"phase-block\"></div>\n </li>\n </ul>\n </div>\n </div>\n</header>\n","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, TemplateRef } from '@angular/core';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { map, Observable } from 'rxjs';\n\nimport { ConfigService, NativeBridgeService } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ProfileType } from '@fcom/core-api/login';\n\nimport { ButtonMode, ButtonTheme, IconButtonSize, IconButtonTheme } from '../../buttons';\nimport { IconPosition } from '../../icons';\nimport { Breadcrumb, LoginEvent, PhasesAria } from './interfaces';\n\n/**\n * This component contains the booking header used during booking flows. Please note that this\n * header is intended to be be position:fixed with page content below. To position this content\n * below correctly, please use the following spacings.\n *\n * default - margin-top: 2.9rem;<br>\n * tablet-up - margin-top: 3.1rem;<br>\n * laptop-up - margin-top: 3.5rem;<br>\n * desktop - margin-top: 3.7rem;<br>\n *\n * @example\n * <b>Example with basic options</b>\n *\n * <code>\n * <pre>\n * <fcom-booking-header\n * [loggedIn]=\"true\"\n * [homeUrl]=\"'https://finnair.com/fi-fi\"\n * [breadcrumbs]=\"Breadcrumb[]\"\n * [showLogin]=\"true\"\n * [showHamburgerMenu]=\"true\"\n * [showBack]=\"true\"\n * [userName]=\"'Pekka Pekkanen\"\n * [loginText]=\"'Login'\"\n * [logoutText]=\"'Logout\"\n * (loginClick)=\"\"\n * (menuClick)=\"\"\n * (homeClick)=\"\"\n * (breadcrumbClick)=\"\">\n * </fcom-booking-header>\n * </pre>\n * </code>\n */\n@Component({\n selector: 'fcom-booking-header',\n templateUrl: './booking-header.component.html',\n styleUrls: ['./booking-header.component.scss'],\n})\nexport class BookingHeaderComponent implements OnInit, OnChanges {\n /**\n * What url the finnair logo should link to (including language)\n */\n @Input() homeUrl: string;\n\n /**\n * Template reference for the language selector component.\n * This allows the parent component to pass a custom template\n * for the language selector, which will be rendered within\n * the booking header.\n */\n @Input() languageSelector: TemplateRef<any>;\n\n @Input() isMobile = false;\n\n /**\n * An array of breadcrumbs and their state\n */\n @Input() breadcrumbs: Breadcrumb[] = [];\n\n /**\n * Whether we should show the login/logout text\n */\n @Input() loggedIn = true;\n\n /**\n * Controls the display of the login/logout button. The button should be hidden where the user\n * shouldn't be able to login or out.\n */\n @Input() showLogin = true;\n\n /**\n * Controls the display of the back button. The button should be hidden whether it isn't possible\n * to go back (for example on purchase confirmation pages)\n */\n @Input() showBack = true;\n\n /**\n * Controls the propagation of the back button click event. If it is true, the event will be propagated\n * to be handled by the caller.\n */\n @Input() propagateBackClick = false;\n\n /**\n * Shows a username instead of the logout text. Its recommended to use this when you have the username.\n */\n @Input() userName: string | null;\n\n /**\n * Indicates whether the user is F+ member or corporate user. This is used to show the correct icon.\n */\n @Input() profileType: ProfileType;\n\n /**\n * The translated text to display for instead of \"Login\". If not text is provided then a default\n * will be used.\n */\n @Input() loginText: string;\n\n /**\n * The translated text to display instead of \"Logout\". If not text is provided then a default\n * will be used.\n */\n @Input() logoutText: string;\n\n /**\n * The translated text to be read in voice over.\n */\n @Input({ required: true }) phasesAria: PhasesAria;\n\n /**\n * The event emitted when the login button is clicked.\n */\n @Output() loginClick: EventEmitter<LoginEvent> = new EventEmitter();\n\n /**\n * The event emitted when the menu button is clicked.\n */\n @Output() menuClick: EventEmitter<Event> = new EventEmitter();\n\n /**\n * The event emitted when a breadcrumb item is clicked. This does not emit\n * when the breadcrumb.disabled property is true.\n */\n @Output() breadcrumbClick: EventEmitter<Breadcrumb> = new EventEmitter();\n\n /**\n * The event emitted when home button is clicked.\n *\n * If there is no listener for the event, the link will work as a regular a tag and redirect the\n * page. If there is a listener you must redirect the user to the page required (via angular\n * routing for example)\n */\n @Output() homeClick: EventEmitter<string> = new EventEmitter();\n\n /**\n * The event emitted when back button is clicked. This does not emit\n * when the propagateBack property is false.\n */\n @Output() backClick: EventEmitter<Event> = new EventEmitter();\n\n showHamburgerMenu$: Observable<boolean>;\n activeIndex: number;\n isInsideNativeWebView: boolean;\n enableNewStepper: boolean;\n profileIcon: SvgLibraryIcon;\n\n readonly ButtonMode = ButtonMode;\n readonly ButtonTheme = ButtonTheme;\n readonly CustomIcon = CustomIcon;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconLibrary = IconLibrary;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n constructor(\n private nativeBridgeService: NativeBridgeService,\n private languageService: LanguageService,\n private configService: ConfigService\n ) {}\n\n ngOnInit(): void {\n this.findActiveIndex();\n this.isInsideNativeWebView = this.nativeBridgeService.isInsideNativeWebView;\n this.enableNewStepper = this.configService.cfg.enableNewStepper;\n\n this.showHamburgerMenu$ = this.nativeBridgeService.isHamburgerMenuVisible?.pipe(\n map((visible) => (!this.enableNewStepper || this.isInsideNativeWebView) && visible)\n );\n this.setProfileIcon();\n }\n\n ngOnChanges(): void {\n this.setProfileIcon();\n this.findActiveIndex();\n }\n\n findActiveIndex(): void {\n (this.breadcrumbs || []).forEach((breadcrumb, i) => {\n if (breadcrumb.active) {\n this.activeIndex = i;\n }\n });\n }\n\n onBreadcrumbClick(breadcrumb, index): void {\n if (breadcrumb.disabled) {\n return;\n }\n\n if (index < this.activeIndex) {\n this.breadcrumbClick.emit(breadcrumb);\n }\n }\n\n onBackClick(): void {\n if (this.propagateBackClick) {\n this.backClick.emit();\n } else if (this.activeIndex > 0) {\n this.breadcrumbClick.emit(this.breadcrumbs[this.activeIndex - 1]);\n }\n }\n\n onHomeClick(event: Event): void {\n event.preventDefault();\n this.homeClick.emit(this.homeUrl ?? this.languageService.langValue);\n }\n\n private setProfileIcon(): void {\n this.profileIcon =\n this.showLogin && this.loggedIn\n ? this.profileType === ProfileType.CORPORATE\n ? SvgLibraryIcon.B2B\n : SvgLibraryIcon.LOGGED_IN\n : SvgLibraryIcon.SINGLE_PAX;\n }\n}\n","/* eslint-disable no-underscore-dangle */\nimport { createFeatureSelector, createSelector, select } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { TravelerService, ServiceCatalogSelectionsForAllTravelers } from '@fcom/dapi';\nimport {\n FlightSeatSelections,\n SeatMapState,\n SeatMapStatus,\n SeatMapWithStatus,\n SeatSelectionForFlight,\n} from '@fcom/common/interfaces/seat-map.interface';\nimport { entrySet, mapValues } from '@fcom/core/utils';\nimport { SeatmapSvgAndControlData, SubCategory } from '@fcom/dapi/api/models';\n\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\nimport { CommonBookingFeatureState, CommonBookingState } from '../store.interface';\nimport { getSeatPrice } from '../../modules/ancillaries/utils';\n\nconst _selectCommonBookingState = createFeatureSelector<CommonBookingFeatureState, CommonBookingState>(\n COMMON_BOOKING_FEATURE_KEY\n);\nconst _seatMapState = createSelector(_selectCommonBookingState, (state: CommonBookingState) => state?.seatMap);\n\nconst _seatMapStateForFlight = (flightId: string) =>\n createSelector(_seatMapState, (sm: SeatMapState) => sm?.[flightId]);\n\nconst _seatSelectionsForFlight = (flightId: string) =>\n createSelector(_seatMapStateForFlight(flightId), (sm: SeatMapWithStatus) => sm?.selections);\n\n/**\n * Selects the seatMap from the state via given flightId.\n */\nexport const seatMapForFlight = (\n flightId: string\n): StateSelector<CommonBookingFeatureState, SeatmapSvgAndControlData> =>\n safeSelect(createSelector(_seatMapStateForFlight(flightId), (sm: SeatMapWithStatus) => sm?.seatMap));\n\nexport const seatMapWithStatus = (flightId: string): StateSelector<CommonBookingFeatureState, SeatMapWithStatus> =>\n select(createSelector(_seatMapStateForFlight(flightId), (sm: SeatMapWithStatus) => sm));\n\nexport const seatSelectionsForFlight = (\n flightId: string\n): StateSelector<CommonBookingFeatureState, FlightSeatSelections> => select(_seatSelectionsForFlight(flightId));\n\nexport const seatSelectionsForFlightAndTraveler = (\n flightId: string,\n travelerId: string\n): StateSelector<CommonBookingFeatureState, SeatSelectionForFlight> =>\n select(createSelector(_seatSelectionsForFlight(flightId), (ss: FlightSeatSelections) => ss?.[travelerId]));\n\nexport const seatMapForFlightStatus = (flightId: string): StateSelector<CommonBookingFeatureState, SeatMapStatus> =>\n select(createSelector(_seatMapStateForFlight(flightId), (ss: SeatMapWithStatus) => ss?.status));\n\nexport const seatSelections = (): StateSelector<CommonBookingFeatureState, ServiceCatalogSelectionsForAllTravelers> =>\n select(\n createSelector(_seatMapState, (sm: SeatMapState) =>\n sm\n ? mapValues(sm, (s) =>\n entrySet<SeatSelectionForFlight>(s.selections)\n .reduce<TravelerService[]>((all: TravelerService[], { key, value: { seatNumber } }) => {\n const seatPrice = getSeatPrice(\n s.seatMap?.seats.find((seat) => seat.seatNumber === seatNumber),\n key\n );\n return all.concat({\n category: SubCategory.SEAT,\n quantity: seatNumber ? 1 : 0,\n variant: seatNumber,\n seatNumber,\n displayName: '',\n title: '',\n originalPricePerItem: seatPrice?.originalPrice ?? s.selections[key].originalPricePerItem,\n pricePerItem: seatPrice?.price ?? s.selections[key].pricePerItem,\n paid: s.selections[key].paid,\n ticketed: s.selections[key].ticketed,\n modifiable: s.selections[key].modifiable,\n travelerId: key,\n includedInTicketType: false,\n includedInTierBenefit: false,\n });\n }, [])\n .filter(Boolean)\n )\n : undefined\n )\n );\n","/* eslint-disable no-underscore-dangle */\nimport { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\n\nimport { PaymentState, PaymentStatus } from '../../interfaces/payment.interface';\nimport { CommonBookingFeatureState, CommonBookingState } from '../store.interface';\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\n\nconst _selectCommonBookingState = createFeatureSelector<CommonBookingFeatureState, CommonBookingState>(\n COMMON_BOOKING_FEATURE_KEY\n);\nconst _paymentState = createSelector(_selectCommonBookingState, (state: CommonBookingState) => state?.payment);\nconst _paymentStatus = createSelector(_paymentState, (_ps: PaymentState) => _ps?.paymentStatus);\nconst _paymentIds = createSelector(_paymentState, (_ps: PaymentState) => _ps?.paymentIds);\nconst _paymentRedirectionUrl = createSelector(_paymentState, (_ps: PaymentState) => _ps?.redirectionUrl);\n\nexport const paymentStatus = (): StateSelector<CommonBookingFeatureState, PaymentStatus> => safeSelect(_paymentStatus);\n\nexport const paymentIdsPaid = (): StateSelector<CommonBookingFeatureState, string[]> => safeSelect(_paymentIds);\nexport const paymentRedirectionUrl = (): StateSelector<CommonBookingFeatureState, string> =>\n safeSelect(_paymentRedirectionUrl);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\n\nimport { CommonBookingFeatureState, CommonBookingState } from '../store.interface';\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\n\nconst _selectCommonBookingState = createFeatureSelector<CommonBookingFeatureState, CommonBookingState>(\n COMMON_BOOKING_FEATURE_KEY\n);\n\nconst _selectedBoundIdState = createSelector(\n _selectCommonBookingState,\n (state: CommonBookingState) => state?.disruption?.selectedBoundId\n);\n\nexport const selectedBoundId = (): StateSelector<CommonBookingFeatureState, string> =>\n safeSelect(_selectedBoundIdState);\n","import { createFeatureSelector } from '@ngrx/store';\n\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\nimport { CommonBookingState } from '../store.interface';\n\nexport const selectCommonBookingState = createFeatureSelector<CommonBookingState>(COMMON_BOOKING_FEATURE_KEY);\n","import { select } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { BaseState } from '@fcom/core/index';\n\nimport { CommonBookingState, PassengerNameRecord } from '../../index';\nimport { selectCommonBookingState } from './feature.selector';\n\nexport const getRedirectPnrOrUndefined =\n () =>\n (state$: Observable<BaseState>): Observable<PassengerNameRecord | undefined> =>\n state$.pipe(\n select(selectCommonBookingState),\n map((state: CommonBookingState) => state?.redirect?.pnr)\n );\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { TripType, FinnairMultiCitySearchInterface, FlightSearchParams, GlobalBookingTripDates } from '@fcom/common';\nimport { AvailabilityEntry } from '@fcom/dapi/api/models';\nimport {\n DateFormat,\n DISCOUNT_CODE_PATTERN,\n GIFT_CARD_PATTERN,\n isNotBlank,\n isPresent,\n LocalDate,\n TzDate,\n} from '@fcom/core/utils';\nimport { Pattern } from '@fcom/core/utils/date.format';\nimport { Amount } from '@fcom/dapi';\nimport { GlobalBookingFlight } from '@fcom/common/store';\n\nimport { DatePickerPrices, PreviousSearch, SeasonalNotificationData } from '../interfaces';\n\nexport const createDeeplinkPathFromFlightSearchParams = (\n { locale, flights, paxAmount, travelClass, promoCode, isAward, isCorporate, tripType }: FlightSearchParams,\n corporateTravelClassLimitEnabled = false\n): string => {\n const { adults, c15s, children, infants } = paxAmount;\n\n const urlParams: FinnairMultiCitySearchInterface = {\n flights: mapFlightsToParams(flights),\n cabin: getBookingWidgetCabinClass(\n travelClass,\n isCorporate,\n corporateTravelClassLimitEnabled,\n tripType === TripType.MULTICITY\n ),\n adults,\n c15s,\n children,\n infants,\n isAward: isAward || undefined,\n promoCode: isAward ? undefined : promoCode,\n };\n\n Object.keys(urlParams).forEach((key) => {\n if (urlParams[key] === (undefined || null)) {\n delete urlParams[key];\n }\n });\n\n const params = encodeURIComponent(JSON.stringify(urlParams));\n return `/${locale}/booking/flight-selection?json=${params}`;\n};\n\nexport const mapFlightsToParams = (\n flights: GlobalBookingFlight[]\n): { origin: string; destination: string; departureDate: string }[] => {\n return flights.map(({ origin, destination, departureDate }) => {\n return {\n origin: origin.locationCode,\n destination: destination.locationCode,\n departureDate: departureDate.toString(),\n };\n });\n};\n\nexport const getBookingWidgetCabinClass = (\n travelClass: GlobalBookingTravelClass,\n isCorporate: boolean,\n corporateTravelClassLimitEnabled: boolean,\n isMultiCity: boolean = false\n): GlobalBookingTravelClass => {\n if ((corporateTravelClassLimitEnabled && isCorporate) || isMultiCity) {\n return travelClass;\n }\n\n return travelClass === GlobalBookingTravelClass.ECONOMY ? GlobalBookingTravelClass.MIXED : travelClass;\n};\n\nexport const seasonalNotificationHandler = (\n availabilityEntry: AvailabilityEntry[],\n dateTranslations: Record<string, string | string[]>\n): SeasonalNotificationData => {\n return availabilityEntry.reduce((acc: SeasonalNotificationData, availability: AvailabilityEntry, index: number) => {\n const postFix: string = index > 0 ? String(index + 1) : '';\n\n const sameYear = new LocalDate(availability.start).localYear === new LocalDate(availability.end).localYear;\n const startFormat: Pattern =\n isNotBlank(availability.start) && isNotBlank(availability.end) && sameYear\n ? DateFormat.MONTH\n : DateFormat.LONG_MONTH_AND_YEAR;\n\n const start = new DateFormat(dateTranslations).format(availability.start, startFormat);\n const end = new DateFormat(dateTranslations).format(availability.end, DateFormat.LONG_MONTH_AND_YEAR);\n\n acc[`start${postFix}`] = start;\n acc[`end${postFix}`] = end;\n return acc;\n }, {});\n};\n\nexport const createPreviousSearches = (\n { locale, flights, paxAmount, travelClass, tripType, promoCode }: FlightSearchParams,\n previousSearches: PreviousSearch[]\n): PreviousSearch[] => {\n const previousSearch: PreviousSearch = {\n paxAmount,\n travelClass,\n tripType,\n flights,\n creationDate: TzDate.now().millis,\n discountCode: promoCode || null,\n locale: locale,\n };\n\n let previousIndex = -1;\n\n previousIndex = previousSearches.findIndex((ps) =>\n ps.flights?.every(\n (flight, index) =>\n flight?.origin.locationCode === flights[index]?.origin.locationCode &&\n flight?.destination.locationCode === flights[index]?.destination.locationCode\n )\n );\n\n return previousIndex !== -1\n ? [previousSearch, ...previousSearches.slice(0, previousIndex), ...previousSearches.slice(previousIndex + 1)]\n : [previousSearch, ...previousSearches.slice(0, 1)];\n};\n\nexport const getStartingFromPrice = (\n prices: DatePickerPrices,\n travelDates: GlobalBookingTripDates,\n isOneWay: boolean\n): Amount => prices?.calendar?.[isOneWay ? travelDates?.departureDate?.id : travelDates?.returnDate?.id]?.amount;\n\nexport const discountCodeValidator = (): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isPresent(control.value) && isNotBlank(control.value)) {\n if (GIFT_CARD_PATTERN.test(control.value)) {\n return { custom: 'giftCardPatternError' };\n }\n\n if (!DISCOUNT_CODE_PATTERN.test(control.value)) {\n return { custom: 'pattern' };\n }\n }\n\n return null;\n };\n};\n\nexport const hasCorrectAmountOfFlights = (tripType: TripType, flights: GlobalBookingFlight[]): boolean => {\n switch (tripType) {\n case TripType.ONEWAY:\n return flights.length === 1;\n case TripType.RETURN:\n return flights.length === 2;\n default:\n return flights.length > 1;\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.dev/license\n */\n\nimport {Directive, ElementRef, InjectionToken, Renderer2} from '@angular/core';\n\n/**\n * @description\n * Defines an interface that acts as a bridge between the Angular forms API and a\n * native element in the DOM.\n *\n * Implement this interface to create a custom form control directive\n * that integrates with Angular forms.\n *\n * @see {@link DefaultValueAccessor}\n *\n * @publicApi\n */\nexport interface ControlValueAccessor {\n /**\n * @description\n * Writes a new value to the element.\n *\n * This method is called by the forms API to write to the view when programmatic\n * changes from model to view are requested.\n *\n * @usageNotes\n * ### Write a value to the element\n *\n * The following example writes a value to the native DOM element.\n *\n * ```ts\n * writeValue(value: any): void {\n * this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);\n * }\n * ```\n *\n * @param obj The new value for the element\n */\n writeValue(obj: any): void;\n\n /**\n * @description\n * Registers a callback function that is called when the control's value\n * changes in the UI.\n *\n * This method is called by the forms API on initialization to update the form\n * model when values propagate from the view to the model.\n *\n * When implementing the `registerOnChange` method in your own value accessor,\n * save the given function so your class calls it at the appropriate time.\n *\n * @usageNotes\n * ### Store the change function\n *\n * The following example stores the provided function as an internal method.\n *\n * ```ts\n * registerOnChange(fn: (_: any) => void): void {\n * this._onChange = fn;\n * }\n * ```\n *\n * When the value changes in the UI, call the registered\n * function to allow the forms API to update itself:\n *\n * ```ts\n * host: {\n * '(change)': '_onChange($event.target.value)'\n * }\n * ```\n *\n * @param fn The callback function to register\n */\n registerOnChange(fn: any): void;\n\n /**\n * @description\n * Registers a callback function that is called by the forms API on initialization\n * to update the form model on blur.\n *\n * When implementing `registerOnTouched` in your own value accessor, save the given\n * function so your class calls it when the control should be considered\n * blurred or \"touched\".\n *\n * @usageNotes\n * ### Store the callback function\n *\n * The following example stores the provided function as an internal method.\n *\n * ```ts\n * registerOnTouched(fn: any): void {\n * this._onTouched = fn;\n * }\n * ```\n *\n * On blur (or equivalent), your class should call the registered function to allow\n * the forms API to update itself:\n *\n * ```ts\n * host: {\n * '(blur)': '_onTouched()'\n * }\n * ```\n *\n * @param fn The callback function to register\n */\n registerOnTouched(fn: any): void;\n\n /**\n * @description\n * Function that is called by the forms API when the control status changes to\n * or from 'DISABLED'. Depending on the status, it enables or disables the\n * appropriate DOM element.\n *\n * @usageNotes\n * The following is an example of writing the disabled property to a native DOM element:\n *\n * ```ts\n * setDisabledState(isDisabled: boolean): void {\n * this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n * }\n * ```\n *\n * @param isDisabled The disabled status to set on the element\n */\n setDisabledState?(isDisabled: boolean): void;\n}\n\n/**\n * Base class for all ControlValueAccessor classes defined in Forms package.\n * Contains common logic and utility functions.\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\n@Directive()\nexport class BaseControlValueAccessor {\n /**\n * The registered callback function called when a change or input event occurs on the input\n * element.\n * @nodoc\n */\n onChange = (_: any) => {};\n\n /**\n * The registered callback function called when a blur event occurs on the input element.\n * @nodoc\n */\n onTouched = () => {};\n\n constructor(\n private _renderer: Renderer2,\n private _elementRef: ElementRef,\n ) {}\n\n /**\n * Helper method that sets a property on a target element using the current Renderer\n * implementation.\n * @nodoc\n */\n protected setProperty(key: string, value: any): void {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }\n\n /**\n * Registers a function called when the control is touched.\n * @nodoc\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n registerOnChange(fn: (_: any) => {}): void {\n this.onChange = fn;\n }\n\n /**\n * Sets the \"disabled\" property on the range input element.\n * @nodoc\n */\n setDisabledState(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n}\n\n/**\n * Base class for all built-in ControlValueAccessor classes (except DefaultValueAccessor, which is\n * used in case no other CVAs can be found). We use this class to distinguish between default CVA,\n * built-in CVAs and custom CVAs, so that Forms logic can recognize built-in CVAs and treat custom\n * ones with higher priority (when both built-in and custom CVAs are present).\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\n@Directive()\nexport class BuiltInControlValueAccessor extends BaseControlValueAccessor {}\n\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nexport const NG_VALUE_ACCESSOR = new InjectionToken<ReadonlyArray<ControlValueAccessor>>(\n ngDevMode ? 'NgValueAccessor' : '',\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.dev/license\n */\n\nimport {Directive, forwardRef, Provider} from '@angular/core';\n\nimport {\n BuiltInControlValueAccessor,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from './control_value_accessor';\n\nconst CHECKBOX_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxControlValueAccessor),\n multi: true,\n};\n\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'},\n providers: [CHECKBOX_VALUE_ACCESSOR],\n})\nexport class CheckboxControlValueAccessor\n extends BuiltInControlValueAccessor\n implements ControlValueAccessor\n{\n /**\n * Sets the \"checked\" property on the input element.\n * @nodoc\n */\n writeValue(value: any): void {\n this.setProperty('checked', 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.dev/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n forwardRef,\n Inject,\n InjectionToken,\n Optional,\n Provider,\n Renderer2,\n} from '@angular/core';\n\nimport {\n BaseControlValueAccessor,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from './control_value_accessor';\n\nexport const DEFAULT_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DefaultValueAccessor),\n multi: true,\n};\n\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid(): boolean {\n const userAgent = getDOM() ? getDOM().getUserAgent() : '';\n return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nexport const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>(\n ngDevMode ? 'CompositionEventMode' : '',\n);\n\n/**\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * This value accessor is used by default for `<input type=\"text\">` and `<textarea>` elements, but\n * you could also use it for custom components that have similar behavior and do not require special\n * processing. In order to attach the default value accessor to a custom element, add the\n * `ngDefaultControl` attribute as shown below.\n *\n * ```\n * <custom-input-component ngDefaultControl [(ngModel)]=\"value\"></custom-input-component>\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n // TODO: vsavkin replace the above selector with the one below it once\n // https://github.com/angular/angular/issues/3011 is implemented\n // selector: '[ngModel],[formControl],[formControlName]',\n host: {\n '(input)': '$any(this)._handleInput($event.target.value)',\n '(blur)': 'onTouched()',\n '(compositionstart)': '$any(this)._compositionStart()',\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)',\n },\n providers: [DEFAULT_VALUE_ACCESSOR],\n})\nexport class DefaultValueAccessor extends BaseControlValueAccessor implements ControlValueAccessor {\n /** Whether the user is creating a composition string (IME events). */\n private _composing = false;\n\n constructor(\n renderer: Renderer2,\n elementRef: ElementRef,\n @Optional() @Inject(COMPOSITION_BUFFER_MODE) private _compositionMode: boolean,\n ) {\n super(renderer, elementRef);\n if (this._compositionMode == null) {\n this._compositionMode = !_isAndroid();\n }\n }\n\n /**\n * Sets the \"value\" property on the input element.\n * @nodoc\n */\n writeValue(value: any): void {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }\n\n /** @internal */\n _handleInput(value: any): void {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n }\n\n /** @internal */\n _compositionStart(): void {\n this._composing = true;\n }\n\n /** @internal */\n _compositionEnd(value: any): void {\n this._composing = false;\n this._compositionMode && this.onChange(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.dev/license\n */\n\nimport {\n InjectionToken,\n ɵisPromise as isPromise,\n ɵisSubscribable as isSubscribable,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {forkJoin, from, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {\n AsyncValidator,\n AsyncValidatorFn,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from './directives/validators';\nimport {RuntimeErrorCode} from './errors';\nimport {AbstractControl} from './model/abstract_model';\n\nfunction isEmptyInputValue(value: any): boolean {\n /**\n * Check if the object is a string or array before evaluating the length attribute.\n * This avoids falsely rejecting objects that contain a custom length attribute.\n * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.\n */\n return (\n value == null || ((typeof value === 'string' || Array.isArray(value)) && value.length === 0)\n );\n}\n\nfunction hasValidLength(value: any): boolean {\n // non-strict comparison is intentional, to check for both `null` and `undefined` values\n return value != null && typeof value.length === 'number';\n}\n\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see {@link NG_ASYNC_VALIDATORS}\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors | null {\n * return { 'custom': true };\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport const NG_VALIDATORS = new InjectionToken<ReadonlyArray<Validator | Function>>(\n ngDevMode ? 'NgValidators' : '',\n);\n\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see {@link NG_VALIDATORS}\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n * selector: '[customAsyncValidator]',\n * providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n * validate(control: AbstractControl): Promise<ValidationErrors|null> {\n * return Promise.resolve({'custom': true});\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport const NG_ASYNC_VALIDATORS = new InjectionToken<ReadonlyArray<Validator | Function>>(\n ngDevMode ? 'NgAsyncValidators' : '',\n);\n\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP =\n /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @publicApi\n */\nexport class Validators {\n /**\n * @description\n * Validator that requires the control's value to be greater than or equal to the provided number.\n *\n * @usageNotes\n *\n * ### Validate against a minimum of 3\n *\n * ```typescript\n * const control = new FormControl(2, Validators.min(3));\n *\n * console.log(control.errors); // {min: {min: 3, actual: 2}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `min` property if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static min(min: number): ValidatorFn {\n return minValidator(min);\n }\n\n /**\n * @description\n * Validator that requires the control's value to be less than or equal to the provided number.\n *\n * @usageNotes\n *\n * ### Validate against a maximum of 15\n *\n * ```typescript\n * const control = new FormControl(16, Validators.max(15));\n *\n * console.log(control.errors); // {max: {max: 15, actual: 16}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `max` property if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static max(max: number): ValidatorFn {\n return maxValidator(max);\n }\n\n /**\n * @description\n * Validator that requires the control have a non-empty value.\n *\n * @usageNotes\n *\n * ### Validate that the field is non-empty\n *\n * ```typescript\n * const control = new FormControl('', Validators.required);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map with the `required` property\n * if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static required(control: AbstractControl): ValidationErrors | null {\n return requiredValidator(control);\n }\n\n /**\n * @description\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n *\n * @usageNotes\n *\n * ### Validate that the field value is true\n *\n * ```typescript\n * const control = new FormControl('some value', Validators.requiredTrue);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map that contains the `required` property\n * set to `true` if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static requiredTrue(control: AbstractControl): ValidationErrors | null {\n return requiredTrueValidator(control);\n }\n\n /**\n * @description\n * Validator that requires the control's value pass an email validation test.\n *\n * Tests the value using a [regular\n * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n * pattern suitable for common use cases. The pattern is based on the definition of a valid email\n * address in the [WHATWG HTML\n * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address).\n *\n * The differences from the WHATWG version include:\n * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n * - Disallow `local-part` to be longer than 64 characters.\n * - Disallow the whole address to be longer than 254 characters.\n *\n * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n * validate the value against a different pattern.\n *\n * @usageNotes\n *\n * ### Validate that the field matches a valid email pattern\n *\n * ```typescript\n * const control = new FormControl('bad@', Validators.email);\n *\n * console.log(control.errors); // {email: true}\n * ```\n *\n * @returns An error map with the `email` property\n * if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static email(control: AbstractControl): ValidationErrors | null {\n return emailValidator(control);\n }\n\n /**\n * @description\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. This validator is also provided by default if you use the\n * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays. The\n * `minLength` validator logic is also not invoked for values when their `length` property is 0\n * (for example in case of an empty string or an empty array), to support optional controls. You\n * can use the standard `required` validator if empty values should not be considered valid.\n *\n * @usageNotes\n *\n * ### Validate that the field has a minimum of 3 characters\n *\n * ```typescript\n * const control = new FormControl('ng', Validators.minLength(3));\n *\n * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n * ```\n *\n * ```html\n * <input minlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `minlength` property if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static minLength(minLength: number): ValidatorFn {\n return minLengthValidator(minLength);\n }\n\n /**\n * @description\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. This validator is also provided by default if you use the\n * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays.\n *\n * @usageNotes\n *\n * ### Validate that the field has maximum of 5 characters\n *\n * ```typescript\n * const control = new FormControl('Angular', Validators.maxLength(5));\n *\n * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n * ```\n *\n * ```html\n * <input maxlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxlength` property if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static maxLength(maxLength: number): ValidatorFn {\n return maxLengthValidator(maxLength);\n }\n\n /**\n * @description\n * Validator that requires the control's value to match a regex pattern. This validator is also\n * provided by default if you use the HTML5 `pattern` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field only contains letters or spaces\n *\n * ```typescript\n * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n *\n * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n * ```\n *\n * ```html\n * <input pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * ### Pattern matching with the global or sticky flag\n *\n * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`\n * can produce different results on the same input when validations are run consecutively. This is\n * due to how the behavior of `RegExp.prototype.test` is\n * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)\n * (`RegExp` preserves the index of the last match when the global or sticky flag is used).\n * Due to this behavior, it is recommended that when using\n * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky\n * flag enabled.\n *\n * ```typescript\n * // Not recommended (since the `g` flag is used)\n * const controlOne = new FormControl('1', Validators.pattern(/foo/g));\n *\n * // Good\n * const controlTwo = new FormControl('1', Validators.pattern(/foo/));\n * ```\n *\n * @param pattern A regular expression to be used as is to test the values, or a string.\n * If a string is passed, the `^` character is prepended and the `$` character is\n * appended to the provided string (if not already present), and the resulting regular\n * expression is used to test the values.\n *\n * @returns A validator function that returns an error map with the\n * `pattern` property if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static pattern(pattern: string | RegExp): ValidatorFn {\n return patternValidator(pattern);\n }\n\n /**\n * @description\n * Validator that performs no operation.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static nullValidator(control: AbstractControl): ValidationErrors | null {\n return nullValidator(control);\n }\n\n /**\n * @description\n * Compose multiple validators into a single function that returns the union\n * of the individual error maps for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error maps of the validators if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static compose(validators: null): null;\n static compose(validators: (ValidatorFn | null | undefined)[]): ValidatorFn | null;\n static compose(validators: (ValidatorFn | null | undefined)[] | null): ValidatorFn | null {\n return compose(validators);\n }\n\n /**\n * @description\n * Compose multiple async validators into a single function that returns the union\n * of the individual error objects for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error objects of the async validators if the validation check fails, otherwise `null`.\n *\n * @see {@link updateValueAndValidity()}\n *\n */\n static composeAsync(validators: (AsyncValidatorFn | null)[]): AsyncValidatorFn | null {\n return composeAsync(validators);\n }\n}\n\n/**\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * See `Validators.min` for additional information.\n */\nexport function minValidator(min: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n return !isNaN(value) && value < min ? {'min': {'min': min, 'actual': control.value}} : null;\n };\n}\n\n/**\n * Validator that requires the control's value to be less than or equal to the provided number.\n * See `Validators.max` for additional information.\n */\nexport function maxValidator(max: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? {'max': {'max': max, 'actual': control.value}} : null;\n };\n}\n\n/**\n * Validator that requires the control have a non-empty value.\n * See `Validators.required` for additional information.\n */\nexport function requiredValidator(control: AbstractControl): ValidationErrors | null {\n return isEmptyInputValue(control.value) ? {'required': true} : null;\n}\n\n/**\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n * See `Validators.requiredTrue` for additional information.\n */\nexport function requiredTrueValidator(control: AbstractControl): ValidationErrors | null {\n return control.value === true ? null : {'required': true};\n}\n\n/**\n * Validator that requires the control's value pass an email validation test.\n * See `Validators.email` for additional information.\n */\nexport function emailValidator(control: AbstractControl): ValidationErrors | null {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : {'email': true};\n}\n\n/**\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. See `Validators.minLength` for additional information.\n */\nexport function minLengthValidator(minLength: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n // don't validate empty values to allow optional controls\n // don't validate values without `length` property\n return null;\n }\n\n return control.value.length < minLength\n ? {'minlength': {'requiredLength': minLength, 'actualLength': control.value.length}}\n : null;\n };\n}\n\n/**\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. See `Validators.maxLength` for additional information.\n */\nexport function maxLengthValidator(maxLength: number): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n return hasValidLength(control.value) && control.value.length > maxLength\n ? {'maxlength': {'requiredLength': maxLength, 'actualLength': control.value.length}}\n : null;\n };\n}\n\n/**\n * Validator that requires the control's value to match a regex pattern.\n * See `Validators.pattern` for additional information.\n */\nexport function patternValidator(pattern: string | RegExp): ValidatorFn {\n if (!pattern) return nullValidator;\n let regex: RegExp;\n let regexStr: string;\n if (typeof pattern === 'string') {\n regexStr = '';\n\n if (pattern.charAt(0) !== '^') regexStr += '^';\n\n regexStr += pattern;\n\n if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$';\n\n regex = new RegExp(regexStr);\n } else {\n regexStr = pattern.toString();\n regex = pattern;\n }\n return (control: AbstractControl): ValidationErrors | null => {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n const value: string = control.value;\n return regex.test(value)\n ? null\n : {'pattern': {'requiredPattern': regexStr, 'actualValue': value}};\n };\n}\n\n/**\n * Function that has `ValidatorFn` shape, but performs no operation.\n */\nexport function nullValidator(control: AbstractControl): ValidationErrors | null {\n return null;\n}\n\nfunction isPresent(o: any): boolean {\n return o != null;\n}\n\nexport function toObservable(value: any): Observable<any> {\n const obs = isPromise(value) ? from(value) : value;\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !isSubscribable(obs)) {\n let errorMessage = `Expected async validator to return Promise or Observable.`;\n // A synchronous validator will return object or null.\n if (typeof value === 'object') {\n errorMessage +=\n ' Are you using a synchronous validator where an async validator is expected?';\n }\n throw new RuntimeError(RuntimeErrorCode.WRONG_VALIDATOR_RETURN_TYPE, errorMessage);\n }\n return obs;\n}\n\nfunction mergeErrors(arrayOfErrors: (ValidationErrors | null)[]): ValidationErrors | null {\n let res: {[key: string]: any} = {};\n arrayOfErrors.forEach((errors: ValidationErrors | null) => {\n res = errors != null ? {...res!, ...errors} : res!;\n });\n\n return Object.keys(res).length === 0 ? null : res;\n}\n\ntype GenericValidatorFn = (control: AbstractControl) => any;\n\nfunction executeValidators<V extends GenericValidatorFn>(\n control: AbstractControl,\n validators: V[],\n): ReturnType<V>[] {\n return validators.map((validator) => validator(control));\n}\n\nfunction isValidatorFn<V>(validator: V | Validator | AsyncValidator): validator is V {\n return !(validator as Validator).validate;\n}\n\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n * as well as represented as a validator class.\n */\nexport function normalizeValidators<V>(validators: (V | Validator | AsyncValidator)[]): V[] {\n return validators.map((validator) => {\n return isValidatorFn<V>(validator)\n ? validator\n : (((c: AbstractControl) => validator.validate(c)) as unknown as V);\n });\n}\n\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\nfunction compose(validators: (ValidatorFn | null | undefined)[] | null): ValidatorFn | null {\n if (!validators) return null;\n const presentValidators: ValidatorFn[] = validators.filter(isPresent) as any;\n if (presentValidators.length == 0) return null;\n\n return function (control: AbstractControl) {\n return mergeErrors(executeValidators<ValidatorFn>(control, presentValidators));\n };\n}\n\n/**\n * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\nexport function composeValidators(validators: Array<Validator | ValidatorFn>): ValidatorFn | null {\n return validators != null ? compose(normalizeValidators<ValidatorFn>(validators)) : null;\n}\n\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\nfunction composeAsync(validators: (AsyncValidatorFn | null)[]): AsyncValidatorFn | null {\n if (!validators) return null;\n const presentValidators: AsyncValidatorFn[] = validators.filter(isPresent) as any;\n if (presentValidators.length == 0) return null;\n\n return function (control: AbstractControl) {\n const observables = executeValidators<AsyncValidatorFn>(control, presentValidators).map(\n toObservable,\n );\n return forkJoin(observables).pipe(map(mergeErrors));\n };\n}\n\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\nexport function composeAsyncValidators(\n validators: Array<AsyncValidator | AsyncValidatorFn>,\n): AsyncValidatorFn | null {\n return validators != null\n ? composeAsync(normalizeValidators<AsyncValidatorFn>(validators))\n : null;\n}\n\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\nexport function mergeValidators<V>(controlValidators: V | V[] | null, dirValidator: V): V[] {\n if (controlValidators === null) return [dirValidator];\n return Array.isArray(controlValidators)\n ? [...controlValidators, dirValidator]\n : [controlValidators, dirValidator];\n}\n\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\nexport function getControlValidators(control: AbstractControl): ValidatorFn | ValidatorFn[] | null {\n return (control as any)._rawValidators as ValidatorFn | ValidatorFn[] | null;\n}\n\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\nexport function getControlAsyncValidators(\n control: AbstractControl,\n): AsyncValidatorFn | AsyncValidatorFn[] | null {\n return (control as any)._rawAsyncValidators as AsyncValidatorFn | AsyncValidatorFn[] | null;\n}\n\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\nexport function makeValidatorsArray<T extends ValidatorFn | AsyncValidatorFn>(\n validators: T | T[] | null,\n): T[] {\n if (!validators) return [];\n return Array.isArray(validators) ? validators : [validators];\n}\n\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\nexport function hasValidator<T extends ValidatorFn | AsyncValidatorFn>(\n validators: T | T[] | null,\n validator: T,\n): boolean {\n return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of current validators.\n * @returns An array of validators.\n */\nexport function addValidators<T extends ValidatorFn | AsyncValidatorFn>(\n validators: T | T[],\n currentValidators: T | T[] | null,\n): T[] {\n const current = makeValidatorsArray(currentValidators);\n const validatorsToAdd = makeValidatorsArray(validators);\n validatorsToAdd.forEach((v: T) => {\n // Note: if there are duplicate entries in the new validators array,\n // only the first one would be added to the current list of validators.\n // Duplicate ones would be ignored since `hasValidator` would detect\n // the presence of a validator function and we update the current list in place.\n if (!hasValidator(current, v)) {\n current.push(v);\n }\n });\n return current;\n}\n\nexport function removeValidators<T extends ValidatorFn | AsyncValidatorFn>(\n validators: T | T[],\n currentValidators: T | T[] | null,\n): T[] {\n return makeValidatorsArray(currentValidators).filter((v) => !hasValidator(validators, v));\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.dev/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {AbstractControl} from '../model/abstract_model';\nimport {composeAsyncValidators, composeValidators} from '../validators';\n\nimport {\n AsyncValidator,\n AsyncValidatorFn,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from './validators';\n\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nexport abstract class AbstractControlDirective {\n /**\n * @description\n * A reference to the underlying control.\n *\n * @returns the control that backs this directive. Most properties fall through to that instance.\n */\n abstract get control(): AbstractControl | null;\n\n /**\n * @description\n * Reports the value of the control if it is present, otherwise null.\n */\n get value(): any {\n return this.control ? this.control.value : null;\n }\n\n /**\n * @description\n * Reports whether the control is valid. A control is considered valid if no\n * validation errors exist with the current value.\n * If the control is not present, null is returned.\n */\n get valid(): boolean | null {\n return this.control ? this.control.valid : null;\n }\n\n /**\n * @description\n * Reports whether the control is invalid, meaning that an error exists in the input value.\n * If the control is not present, null is returned.\n */\n get invalid(): boolean | null {\n return this.control ? this.control.invalid : null;\n }\n\n /**\n * @description\n * Reports whether a control is pending, meaning that async validation is occurring and\n * errors are not yet available for the input value. If the control is not present, null is\n * returned.\n */\n get pending(): boolean | null {\n return this.control ? this.control.pending : null;\n }\n\n /**\n * @description\n * Reports whether the control is disabled, meaning that the control is disabled\n * in the UI and is exempt from validation checks and excluded from aggregate\n * values of ancestor controls. If the control is not present, null is returned.\n */\n get disabled(): boolean | null {\n return this.control ? this.control.disabled : null;\n }\n\n /**\n * @description\n * Reports whether the control is enabled, meaning that the control is included in ancestor\n * calculations of validity or value. If the control is not present, null is returned.\n */\n get enabled(): boolean | null {\n return this.control ? this.control.enabled : null;\n }\n\n /**\n * @description\n * Reports the control's validation errors. If the control is not present, null is returned.\n */\n get errors(): ValidationErrors | null {\n return this.control ? this.control.errors : null;\n }\n\n /**\n * @description\n * Reports whether the control is pristine, meaning that the user has not yet changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get pristine(): boolean | null {\n return this.control ? this.control.pristine : null;\n }\n\n /**\n * @description\n * Reports whether the control is dirty, meaning that the user has changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get dirty(): boolean | null {\n return this.control ? this.control.dirty : null;\n }\n\n /**\n * @description\n * Reports whether the control is touched, meaning that the user has triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get touched(): boolean | null {\n return this.control ? this.control.touched : null;\n }\n\n /**\n * @description\n * Reports the validation status of the control. Possible values include:\n * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n * If the control is not present, null is returned.\n */\n get status(): string | null {\n return this.control ? this.control.status : null;\n }\n\n /**\n * @description\n * Reports whether the control is untouched, meaning that the user has not yet triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get untouched(): boolean | null {\n return this.control ? this.control.untouched : null;\n }\n\n /**\n * @description\n * Returns a multicasting observable that emits a validation status whenever it is\n * calculated for the control. If the control is not present, null is returned.\n */\n get statusChanges(): Observable<any> | null {\n return this.control ? this.control.statusChanges : null;\n }\n\n /**\n * @description\n * Returns a multicasting observable of value changes for the control that emits every time the\n * value of the control changes in the UI or programmatically.\n * If the control is not present, null is returned.\n */\n get valueChanges(): Observable<any> | null {\n return this.control ? this.control.valueChanges : null;\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get path(): string[] | null {\n return null;\n }\n\n /**\n * Contains the result of merging synchronous validators into a single validator function\n * (combined using `Validators.compose`).\n */\n private _composedValidatorFn: ValidatorFn | null | undefined;\n\n /**\n * Contains the result of merging asynchronous validators into a single validator function\n * (combined using `Validators.composeAsync`).\n */\n private _composedAsyncValidatorFn: AsyncValidatorFn | null | undefined;\n\n /**\n * Set of synchronous validators as they were provided while calling `setValidators` function.\n * @internal\n */\n _rawValidators: Array<Validator | ValidatorFn> = [];\n\n /**\n * Set of asynchronous validators as they were provided while calling `setAsyncValidators`\n * function.\n * @internal\n */\n _rawAsyncValidators: Array<AsyncValidator | AsyncValidatorFn> = [];\n\n /**\n * Sets synchronous validators for this directive.\n * @internal\n */\n _setValidators(validators: Array<Validator | ValidatorFn> | undefined): void {\n this._rawValidators = validators || [];\n this._composedValidatorFn = composeValidators(this._rawValidators);\n }\n\n /**\n * Sets asynchronous validators for this directive.\n * @internal\n */\n _setAsyncValidators(validators: Array<AsyncValidator | AsyncValidatorFn> | undefined): void {\n this._rawAsyncValidators = validators || [];\n this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);\n }\n\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators registered with this\n * directive.\n */\n get validator(): ValidatorFn | null {\n return this._composedValidatorFn || null;\n }\n\n /**\n * @description\n * Asynchronous validator function composed of all the asynchronous validators registered with\n * this directive.\n */\n get asyncValidator(): AsyncValidatorFn | null {\n return this._composedAsyncValidatorFn || null;\n }\n\n /*\n * The set of callbacks to be invoked when directive instance is being destroyed.\n */\n private _onDestroyCallbacks: (() => void)[] = [];\n\n /**\n * Internal function to register callbacks that should be invoked\n * when directive instance is being destroyed.\n * @internal\n */\n _registerOnDestroy(fn: () => void): void {\n this._onDestroyCallbacks.push(fn);\n }\n\n /**\n * Internal function to invoke all registered \"on destroy\" callbacks.\n * Note: calling this function also clears the list of callbacks.\n * @internal\n */\n _invokeOnDestroyCallbacks(): void {\n this._onDestroyCallbacks.forEach((fn) => fn());\n this._onDestroyCallbacks = [];\n }\n\n /**\n * @description\n * Resets the control with the provided value if the control is present.\n */\n reset(value: any = undefined): void {\n if (this.control) this.control.reset(value);\n }\n\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode: string, path?: Array<string | number> | string): boolean {\n return this.control ? this.control.hasError(errorCode, path) : false;\n }\n\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode: string, path?: Array<string | number> | string): any {\n return this.control ? this.control.getError(errorCode, path) : null;\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.dev/license\n */\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {Form} from './form_interface';\n\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nexport abstract class ControlContainer extends AbstractControlDirective {\n /**\n * @description\n * The name for the control\n */\n // TODO(issue/24571): remove '!'.\n name!: string | number | null;\n\n /**\n * @description\n * The top-level form directive for the control.\n */\n get formDirective(): Form | null {\n return null;\n }\n\n /**\n * @description\n * The path to this group.\n */\n override get path(): string[] | null {\n return null;\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.dev/license\n */\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\n\n/**\n * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nexport abstract class NgControl extends AbstractControlDirective {\n /**\n * @description\n * The parent form for the control.\n *\n * @internal\n */\n _parent: ControlContainer | null = null;\n\n /**\n * @description\n * The name for the control\n */\n name: string | number | null = null;\n\n /**\n * @description\n * The value accessor for the control\n */\n valueAccessor: ControlValueAccessor | null = null;\n\n /**\n * @description\n * The callback method to update the model from the view when requested\n *\n * @param newValue The new value for the view\n */\n abstract viewToModelUpdate(newValue: any): void;\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.dev/license\n */\n\nimport {Directive, Optional, Self, ɵWritable as Writable} from '@angular/core';\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {NgControl} from './ng_control';\nimport {type NgForm} from './ng_form';\nimport {type FormGroupDirective} from './reactive_directives/form_group_directive';\n\n// DO NOT REFACTOR!\n// Each status is represented by a separate function to make sure that\n// advanced Closure Compiler optimizations related to property renaming\n// can work correctly.\nexport class AbstractControlStatus {\n private _cd: AbstractControlDirective | null;\n\n constructor(cd: AbstractControlDirective | null) {\n this._cd = cd;\n }\n\n protected get isTouched() {\n // track the touched signal\n this._cd?.control?._touched?.();\n return !!this._cd?.control?.touched;\n }\n\n protected get isUntouched() {\n return !!this._cd?.control?.untouched;\n }\n\n protected get isPristine() {\n // track the pristine signal\n this._cd?.control?._pristine?.();\n return !!this._cd?.control?.pristine;\n }\n\n protected get isDirty() {\n // pristine signal already tracked above\n return !!this._cd?.control?.dirty;\n }\n\n protected get isValid() {\n // track the status signal\n this._cd?.control?._status?.();\n return !!this._cd?.control?.valid;\n }\n\n protected get isInvalid() {\n // status signal already tracked above\n return !!this._cd?.control?.invalid;\n }\n\n protected get isPending() {\n // status signal already tracked above\n return !!this._cd?.control?.pending;\n }\n\n protected get isSubmitted() {\n // track the submitted signal\n (this._cd as Writable<NgForm | FormGroupDirective> | null)?._submitted?.();\n // We check for the `submitted` field from `NgForm` and `FormGroupDirective` classes, but\n // we avoid instanceof checks to prevent non-tree-shakable references to those types.\n return !!(this._cd as Writable<NgForm | FormGroupDirective> | null)?.submitted;\n }\n}\n\nexport const ngControlStatusHost = {\n '[class.ng-untouched]': 'isUntouched',\n '[class.ng-touched]': 'isTouched',\n '[class.ng-pristine]': 'isPristine',\n '[class.ng-dirty]': 'isDirty',\n '[class.ng-valid]': 'isValid',\n '[class.ng-invalid]': 'isInvalid',\n '[class.ng-pending]': 'isPending',\n};\n\nexport const ngGroupStatusHost = {\n ...ngControlStatusHost,\n '[class.ng-submitted]': 'isSubmitted',\n};\n\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})\nexport class NgControlStatus extends AbstractControlStatus {\n constructor(@Self() cd: NgControl) {\n super(cd);\n }\n}\n\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc). On groups, this includes the additional\n * class ng-submitted.\n *\n * @see {@link NgControlStatus}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngGroupStatusHost,\n})\nexport class NgControlStatusGroup extends AbstractControlStatus {\n constructor(@Optional() @Self() cd: ControlContainer) {\n super(cd);\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.dev/license\n */\n\nimport {\n EventEmitter,\n signal,\n ɵRuntimeError as RuntimeError,\n ɵWritable as Writable,\n untracked,\n computed,\n} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {\n asyncValidatorsDroppedWithOptsWarning,\n missingControlError,\n missingControlValueError,\n noControlsError,\n} from '../directives/reactive_errors';\nimport {AsyncValidatorFn, ValidationErrors, ValidatorFn} from '../directives/validators';\nimport {RuntimeErrorCode} from '../errors';\nimport {FormArray, FormGroup} from '../forms';\nimport {\n addValidators,\n composeAsyncValidators,\n composeValidators,\n hasValidator,\n removeValidators,\n toObservable,\n} from '../validators';\n\n/**\n * Reports that a control is valid, meaning that no errors exist in the input value.\n *\n * @see {@link status}\n */\nexport const VALID = 'VALID';\n\n/**\n * Reports that a control is invalid, meaning that an error exists in the input value.\n *\n * @see {@link status}\n */\nexport const INVALID = 'INVALID';\n\n/**\n * Reports that a control is pending, meaning that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see {@link markAsPending}\n * @see {@link status}\n */\nexport const PENDING = 'PENDING';\n\n/**\n * Reports that a control is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see {@link markAsDisabled}\n * @see {@link status}\n */\nexport const DISABLED = 'DISABLED';\n\n/**\n * A form can have several different statuses. Each\n * possible status is returned as a string literal.\n *\n * * **VALID**: Reports that a control is valid, meaning that no errors exist in the input\n * value.\n * * **INVALID**: Reports that a control is invalid, meaning that an error exists in the input\n * value.\n * * **PENDING**: Reports that a control is pending, meaning that async validation is\n * occurring and errors are not yet available for the input value.\n * * **DISABLED**: Reports that a control is\n * disabled, meaning that the control is exempt from ancestor calculations of validity or value.\n *\n * @publicApi\n */\nexport type FormControlStatus = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';\n\n/**\n * Base class for every event sent by `AbstractControl.events()`\n *\n * @publicApi\n */\nexport abstract class ControlEvent<T = any> {\n /**\n * Form control from which this event is originated.\n *\n * Note: the type of the control can't be infered from T as the event can be emitted by any of child controls\n */\n public abstract readonly source: AbstractControl<unknown>;\n}\n\n/**\n * Event fired when the value of a control changes.\n *\n * @publicApi\n */\nexport class ValueChangeEvent<T> extends ControlEvent<T> {\n constructor(\n public readonly value: T,\n public readonly source: AbstractControl,\n ) {\n super();\n }\n}\n\n/**\n * Event fired when the control's pristine state changes (pristine <=> dirty).\n *\n * @publicApi */\nexport class PristineChangeEvent extends ControlEvent {\n constructor(\n public readonly pristine: boolean,\n public readonly source: AbstractControl,\n ) {\n super();\n }\n}\n\n/**\n * Event fired when the control's touched status changes (touched <=> untouched).\n *\n * @publicApi\n */\nexport class TouchedChangeEvent extends ControlEvent {\n constructor(\n public readonly touched: boolean,\n public readonly source: AbstractControl,\n ) {\n super();\n }\n}\n\n/**\n * Event fired when the control's status changes.\n *\n * @publicApi\n */\nexport class StatusChangeEvent extends ControlEvent {\n constructor(\n public readonly status: FormControlStatus,\n public readonly source: AbstractControl,\n ) {\n super();\n }\n}\n\n/**\n * Event fired when a form is submitted\n *\n * @publicApi\n */\nexport class FormSubmittedEvent extends ControlEvent {\n constructor(public readonly source: AbstractControl) {\n super();\n }\n}\n/**\n * Event fired when a form is reset.\n *\n * @publicApi\n */\nexport class FormResetEvent extends ControlEvent {\n constructor(public readonly source: AbstractControl) {\n super();\n }\n}\n\n/**\n * Gets validators from either an options object or given validators.\n */\nexport function pickValidators(\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n): ValidatorFn | ValidatorFn[] | null {\n return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n\n/**\n * Creates validator function by combining provided validators.\n */\nfunction coerceToValidator(validator: ValidatorFn | ValidatorFn[] | null): ValidatorFn | null {\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n\n/**\n * Gets async validators from either an options object or given validators.\n */\nexport function pickAsyncValidators(\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n): AsyncValidatorFn | AsyncValidatorFn[] | null {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (isOptionsObj(validatorOrOpts) && asyncValidator) {\n console.warn(asyncValidatorsDroppedWithOptsWarning);\n }\n }\n return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n\n/**\n * Creates async validator function by combining provided async validators.\n */\nfunction coerceToAsyncValidator(\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n): AsyncValidatorFn | null {\n return Array.isArray(asyncValidator)\n ? composeAsyncValidators(asyncValidator)\n : asyncValidator || null;\n}\n\nexport type FormHooks = 'change' | 'blur' | 'submit';\n\n/**\n * Interface for options provided to an `AbstractControl`.\n *\n * @publicApi\n */\nexport interface AbstractControlOptions {\n /**\n * @description\n * The list of validators applied to a control.\n */\n validators?: ValidatorFn | ValidatorFn[] | null;\n /**\n * @description\n * The list of async validators applied to control.\n */\n asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null;\n /**\n * @description\n * The event name for control to update upon.\n */\n updateOn?: 'change' | 'blur' | 'submit';\n}\n\nexport function isOptionsObj(\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n): validatorOrOpts is AbstractControlOptions {\n return (\n validatorOrOpts != null &&\n !Array.isArray(validatorOrOpts) &&\n typeof validatorOrOpts === 'object'\n );\n}\n\nexport function assertControlPresent(parent: any, isGroup: boolean, key: string | number): void {\n const controls = parent.controls as {[key: string | number]: unknown};\n const collection = isGroup ? Object.keys(controls) : controls;\n if (!collection.length) {\n throw new RuntimeError(\n RuntimeErrorCode.NO_CONTROLS,\n typeof ngDevMode === 'undefined' || ngDevMode ? noControlsError(isGroup) : '',\n );\n }\n if (!controls[key]) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_CONTROL,\n typeof ngDevMode === 'undefined' || ngDevMode ? missingControlError(isGroup, key) : '',\n );\n }\n}\n\nexport function assertAllValuesPresent(control: any, isGroup: boolean, value: any): void {\n control._forEachChild((_: unknown, key: string | number) => {\n if (value[key] === undefined) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_CONTROL_VALUE,\n typeof ngDevMode === 'undefined' || ngDevMode ? missingControlValueError(isGroup, key) : '',\n );\n }\n });\n}\n\n// IsAny checks if T is `any`, by checking a condition that couldn't possibly be true otherwise.\nexport type ɵIsAny<T, Y, N> = 0 extends 1 & T ? Y : N;\n\n/**\n * `TypedOrUntyped` allows one of two different types to be selected, depending on whether the Forms\n * class it's applied to is typed or not.\n *\n * This is for internal Angular usage to support typed forms; do not directly use it.\n */\nexport type ɵTypedOrUntyped<T, Typed, Untyped> = ɵIsAny<T, Untyped, Typed>;\n\n/**\n * Value gives the value type corresponding to a control type.\n *\n * Note that the resulting type will follow the same rules as `.value` on your control, group, or\n * array, including `undefined` for each group element which might be disabled.\n *\n * If you are trying to extract a value type for a data model, you probably want {@link RawValue},\n * which will not have `undefined` in group keys.\n *\n * @usageNotes\n *\n * ### `FormControl` value type\n *\n * You can extract the value type of a single control:\n *\n * ```ts\n * type NameControl = FormControl<string>;\n * type NameValue = Value<NameControl>;\n * ```\n *\n * The resulting type is `string`.\n *\n * ### `FormGroup` value type\n *\n * Imagine you have an interface defining the controls in your group. You can extract the shape of\n * the values as follows:\n *\n * ```ts\n * interface PartyFormControls {\n * address: FormControl<string>;\n * }\n *\n * // Value operates on controls; the object must be wrapped in a FormGroup.\n * type PartyFormValues = Value<FormGroup<PartyFormControls>>;\n * ```\n *\n * The resulting type is `{address: string|undefined}`.\n *\n * ### `FormArray` value type\n *\n * You can extract values from FormArrays as well:\n *\n * ```ts\n * type GuestNamesControls = FormArray<FormControl<string>>;\n *\n * type NamesValues = Value<GuestNamesControls>;\n * ```\n *\n * The resulting type is `string[]`.\n *\n * **Internal: not for public use.**\n */\nexport type ɵValue<T extends AbstractControl | undefined> =\n T extends AbstractControl<any, any> ? T['value'] : never;\n\n/**\n * RawValue gives the raw value type corresponding to a control type.\n *\n * Note that the resulting type will follow the same rules as `.getRawValue()` on your control,\n * group, or array. This means that all controls inside a group will be required, not optional,\n * regardless of their disabled state.\n *\n * You may also wish to use {@link ɵValue}, which will have `undefined` in group keys (which can be\n * disabled).\n *\n * @usageNotes\n *\n * ### `FormGroup` raw value type\n *\n * Imagine you have an interface defining the controls in your group. You can extract the shape of\n * the raw values as follows:\n *\n * ```ts\n * interface PartyFormControls {\n * address: FormControl<string>;\n * }\n *\n * // RawValue operates on controls; the object must be wrapped in a FormGroup.\n * type PartyFormValues = RawValue<FormGroup<PartyFormControls>>;\n * ```\n *\n * The resulting type is `{address: string}`. (Note the absence of `undefined`.)\n *\n * **Internal: not for public use.**\n */\nexport type ɵRawValue<T extends AbstractControl | undefined> =\n T extends AbstractControl<any, any>\n ? T['setValue'] extends (v: infer R) => void\n ? R\n : never\n : never;\n\n/**\n * Tokenize splits a string literal S by a delimiter D.\n */\nexport type ɵTokenize<S extends string, D extends string> = string extends S\n ? string[] /* S must be a literal */\n : S extends `${infer T}${D}${infer U}`\n ? [T, ...ɵTokenize<U, D>]\n : [S] /* Base case */;\n\n/**\n * CoerceStrArrToNumArr accepts an array of strings, and converts any numeric string to a number.\n */\nexport type ɵCoerceStrArrToNumArr<S> =\n // Extract the head of the array.\n S extends [infer Head, ...infer Tail]\n ? // Using a template literal type, coerce the head to `number` if possible.\n // Then, recurse on the tail.\n Head extends `${number}`\n ? [number, ...ɵCoerceStrArrToNumArr<Tail>]\n : [Head, ...ɵCoerceStrArrToNumArr<Tail>]\n : [];\n\n/**\n * Navigate takes a type T and an array K, and returns the type of T[K[0]][K[1]][K[2]]...\n */\nexport type ɵNavigate<\n T,\n K extends Array<string | number>,\n> = T extends object /* T must be indexable (object or array) */\n ? K extends [infer Head, ...infer Tail] /* Split K into head and tail */\n ? Head extends keyof T /* head(K) must index T */\n ? Tail extends (string | number)[] /* tail(K) must be an array */\n ? [] extends Tail\n ? T[Head] /* base case: K can be split, but Tail is empty */\n : ɵNavigate<T[Head], Tail> /* explore T[head(K)] by tail(K) */\n : any /* tail(K) was not an array, give up */\n : never /* head(K) does not index T, give up */\n : any /* K cannot be split, give up */\n : any /* T is not indexable, give up */;\n\n/**\n * ɵWriteable removes readonly from all keys.\n */\nexport type ɵWriteable<T> = {\n -readonly [P in keyof T]: T[P];\n};\n\n/**\n * GetProperty takes a type T and some property names or indices K.\n * If K is a dot-separated string, it is tokenized into an array before proceeding.\n * Then, the type of the nested property at K is computed: T[K[0]][K[1]][K[2]]...\n * This works with both objects, which are indexed by property name, and arrays, which are indexed\n * numerically.\n *\n * For internal use only.\n */\nexport type ɵGetProperty<T, K> =\n // K is a string\n K extends string\n ? ɵGetProperty<T, ɵCoerceStrArrToNumArr<ɵTokenize<K, '.'>>>\n : // Is it an array\n ɵWriteable<K> extends Array<string | number>\n ? ɵNavigate<T, ɵWriteable<K>>\n : // Fall through permissively if we can't calculate the type of K.\n any;\n\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * The first type parameter TValue represents the value type of the control (`control.value`).\n * The optional type parameter TRawValue represents the raw value type (`control.getRawValue()`).\n *\n * @see [Forms Guide](guide/forms)\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see [Dynamic Forms Guide](guide/forms/dynamic-forms)\n *\n * @publicApi\n */\nexport abstract class AbstractControl<TValue = any, TRawValue extends TValue = TValue> {\n /** @internal */\n _pendingDirty = false;\n\n /**\n * Indicates that a control has its own pending asynchronous validation in progress.\n * It also stores if the control should emit events when the validation status changes.\n *\n * @internal\n */\n _hasOwnPendingAsyncValidator: null | {emitEvent: boolean} = null;\n\n /** @internal */\n _pendingTouched = false;\n\n /** @internal */\n _onCollectionChange = () => {};\n\n /** @internal */\n _updateOn?: FormHooks;\n\n private _parent: FormGroup | FormArray | null = null;\n private _asyncValidationSubscription: any;\n\n /**\n * Contains the result of merging synchronous validators into a single validator function\n * (combined using `Validators.compose`).\n *\n * @internal\n */\n private _composedValidatorFn!: ValidatorFn | null;\n\n /**\n * Contains the result of merging asynchronous validators into a single validator function\n * (combined using `Validators.composeAsync`).\n *\n * @internal\n */\n private _composedAsyncValidatorFn!: AsyncValidatorFn | null;\n\n /**\n * Synchronous validators as they were provided:\n * - in `AbstractControl` constructor\n * - as an argument while calling `setValidators` function\n * - while calling the setter on the `validator` field (e.g. `control.validator = validatorFn`)\n *\n * @internal\n */\n private _rawValidators!: ValidatorFn | ValidatorFn[] | null;\n\n /**\n * Asynchronous validators as they were provided:\n * - in `AbstractControl` constructor\n * - as an argument while calling `setAsyncValidators` function\n * - while calling the setter on the `asyncValidator` field (e.g. `control.asyncValidator =\n * asyncValidatorFn`)\n *\n * @internal\n */\n private _rawAsyncValidators!: AsyncValidatorFn | AsyncValidatorFn[] | null;\n\n /**\n * The current value of the control.\n *\n * * For a `FormControl`, the current value.\n * * For an enabled `FormGroup`, the values of enabled controls as an object\n * with a key-value pair for each member of the group.\n * * For a disabled `FormGroup`, the values of all controls as an object\n * with a key-value pair for each member of the group.\n * * For a `FormArray`, the values of enabled controls as an array.\n *\n */\n public readonly value!: TValue;\n\n /**\n * Initialize the AbstractControl instance.\n *\n * @param validators The function or array of functions that is used to determine the validity of\n * this control synchronously.\n * @param asyncValidators The function or array of functions that is used to determine validity of\n * this control asynchronously.\n */\n constructor(\n validators: ValidatorFn | ValidatorFn[] | null,\n asyncValidators: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ) {\n this._assignValidators(validators);\n this._assignAsyncValidators(asyncValidators);\n }\n\n /**\n * Returns the function that is used to determine the validity of this control synchronously.\n * If multiple validators have been added, this will be a single composed function.\n * See `Validators.compose()` for additional information.\n */\n get validator(): ValidatorFn | null {\n return this._composedValidatorFn;\n }\n set validator(validatorFn: ValidatorFn | null) {\n this._rawValidators = this._composedValidatorFn = validatorFn;\n }\n\n /**\n * Returns the function that is used to determine the validity of this control asynchronously.\n * If multiple validators have been added, this will be a single composed function.\n * See `Validators.compose()` for additional information.\n */\n get asyncValidator(): AsyncValidatorFn | null {\n return this._composedAsyncValidatorFn;\n }\n set asyncValidator(asyncValidatorFn: AsyncValidatorFn | null) {\n this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n }\n\n /**\n * The parent control.\n */\n get parent(): FormGroup | FormArray | null {\n return this._parent;\n }\n\n /**\n * The validation status of the control.\n *\n * @see {@link FormControlStatus}\n *\n * These status values are mutually exclusive, so a control cannot be\n * both valid AND invalid or invalid AND disabled.\n */\n get status(): FormControlStatus {\n return untracked(this.statusReactive)!;\n }\n private set status(v: FormControlStatus) {\n untracked(() => this.statusReactive.set(v));\n }\n /** @internal */\n readonly _status = computed(() => this.statusReactive());\n private readonly statusReactive = signal<FormControlStatus | undefined>(undefined);\n\n /**\n * A control is `valid` when its `status` is `VALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control has passed all of its validation tests,\n * false otherwise.\n */\n get valid(): boolean {\n return this.status === VALID;\n }\n\n /**\n * A control is `invalid` when its `status` is `INVALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control has failed one or more of its validation checks,\n * false otherwise.\n */\n get invalid(): boolean {\n return this.status === INVALID;\n }\n\n /**\n * A control is `pending` when its `status` is `PENDING`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control is in the process of conducting a validation check,\n * false otherwise.\n */\n get pending(): boolean {\n return this.status == PENDING;\n }\n\n /**\n * A control is `disabled` when its `status` is `DISABLED`.\n *\n * Disabled controls are exempt from validation checks and\n * are not included in the aggregate value of their ancestor\n * controls.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control is disabled, false otherwise.\n */\n get disabled(): boolean {\n return this.status === DISABLED;\n }\n\n /**\n * A control is `enabled` as long as its `status` is not `DISABLED`.\n *\n * @returns True if the control has any status other than 'DISABLED',\n * false if the status is 'DISABLED'.\n *\n * @see {@link AbstractControl.status}\n *\n */\n get enabled(): boolean {\n return this.status !== DISABLED;\n }\n\n /**\n * An object containing any errors generated by failing validation,\n * or null if there are no errors.\n */\n public readonly errors!: ValidationErrors | null;\n\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get pristine(): boolean {\n return untracked(this.pristineReactive);\n }\n private set pristine(v: boolean) {\n untracked(() => this.pristineReactive.set(v));\n }\n /** @internal */\n readonly _pristine = computed(() => this.pristineReactive());\n private readonly pristineReactive = signal(true);\n\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get dirty(): boolean {\n return !this.pristine;\n }\n\n /**\n * True if the control is marked as `touched`.\n *\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n get touched(): boolean {\n return untracked(this.touchedReactive);\n }\n private set touched(v: boolean) {\n untracked(() => this.touchedReactive.set(v));\n }\n /** @internal */\n readonly _touched = computed(() => this.touchedReactive());\n private readonly touchedReactive = signal(false);\n\n /**\n * True if the control has not been marked as touched\n *\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get untouched(): boolean {\n return !this.touched;\n }\n\n /**\n * Exposed as observable, see below.\n *\n * @internal\n */\n readonly _events = new Subject<ControlEvent<TValue>>();\n\n /**\n * A multicasting observable that emits an event every time the state of the control changes.\n * It emits for value, status, pristine or touched changes.\n *\n * **Note**: On value change, the emit happens right after a value of this control is updated. The\n * value of a parent control (for example if this FormControl is a part of a FormGroup) is updated\n * later, so accessing a value of a parent control (using the `value` property) from the callback\n * of this event might result in getting a value that has not been updated yet. Subscribe to the\n * `events` of the parent control instead.\n * For other event types, the events are emitted after the parent control has been updated.\n *\n */\n public readonly events = this._events.asObservable();\n\n /**\n * A multicasting observable that emits an event every time the value of the control changes, in\n * the UI or programmatically. It also emits an event each time you call enable() or disable()\n * without passing along {emitEvent: false} as a function argument.\n *\n * **Note**: the emit happens right after a value of this control is updated. The value of a\n * parent control (for example if this FormControl is a part of a FormGroup) is updated later, so\n * accessing a value of a parent control (using the `value` property) from the callback of this\n * event might result in getting a value that has not been updated yet. Subscribe to the\n * `valueChanges` event of the parent control instead.\n *\n * TODO: this should be piped from events() but is breaking in G3\n */\n public readonly valueChanges!: Observable<TValue>;\n\n /**\n * A multicasting observable that emits an event every time the validation `status` of the control\n * recalculates.\n *\n * @see {@link FormControlStatus}\n * @see {@link AbstractControl.status}\n *\n * TODO: this should be piped from events() but is breaking in G3\n */\n public readonly statusChanges!: Observable<FormControlStatus>;\n\n /**\n * Reports the update strategy of the `AbstractControl` (meaning\n * the event on which the control updates itself).\n * Possible values: `'change'` | `'blur'` | `'submit'`\n * Default value: `'change'`\n */\n get updateOn(): FormHooks {\n return this._updateOn ? this._updateOn : this.parent ? this.parent.updateOn : 'change';\n }\n\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this overwrites any existing synchronous validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * If you want to add a new validator without affecting existing ones, consider\n * using `addValidators()` method instead.\n */\n setValidators(validators: ValidatorFn | ValidatorFn[] | null): void {\n this._assignValidators(validators);\n }\n\n /**\n * Sets the asynchronous validators that are active on this control. Calling this\n * overwrites any existing asynchronous validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * If you want to add a new validator without affecting existing ones, consider\n * using `addAsyncValidators()` method instead.\n */\n setAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[] | null): void {\n this._assignAsyncValidators(validators);\n }\n\n /**\n * Add a synchronous validator or validators to this control, without affecting other validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * Adding a validator that already exists will have no effect. If duplicate validator functions\n * are present in the `validators` array, only the first instance would be added to a form\n * control.\n *\n * @param validators The new validator function or functions to add to this control.\n */\n addValidators(validators: ValidatorFn | ValidatorFn[]): void {\n this.setValidators(addValidators(validators, this._rawValidators));\n }\n\n /**\n * Add an asynchronous validator or validators to this control, without affecting other\n * validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * Adding a validator that already exists will have no effect.\n *\n * @param validators The new asynchronous validator function or functions to add to this control.\n */\n addAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): void {\n this.setAsyncValidators(addValidators(validators, this._rawAsyncValidators));\n }\n\n /**\n * Remove a synchronous validator from this control, without affecting other validators.\n * Validators are compared by function reference; you must pass a reference to the exact same\n * validator function as the one that was originally set. If a provided validator is not found,\n * it is ignored.\n *\n * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<string | null>('', Validators.required);\n * ctrl.removeValidators(Validators.required);\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<string | null>('', minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n *\n * ctrl.removeValidators(minValidator);\n * ```\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * @param validators The validator or validators to remove.\n */\n removeValidators(validators: ValidatorFn | ValidatorFn[]): void {\n this.setValidators(removeValidators(validators, this._rawValidators));\n }\n\n /**\n * Remove an asynchronous validator from this control, without affecting other validators.\n * Validators are compared by function reference; you must pass a reference to the exact same\n * validator function as the one that was originally set. If a provided validator is not found, it\n * is ignored.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n * @param validators The asynchronous validator or validators to remove.\n */\n removeAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[]): void {\n this.setAsyncValidators(removeValidators(validators, this._rawAsyncValidators));\n }\n\n /**\n * Check whether a synchronous validator function is present on this control. The provided\n * validator must be a reference to the exact same function that was provided.\n *\n * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<number | null>(0, Validators.required);\n * expect(ctrl.hasValidator(Validators.required)).toEqual(true)\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<number | null>(0, minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n * ```\n *\n * @param validator The validator to check for presence. Compared by function reference.\n * @returns Whether the provided validator was found on this control.\n */\n hasValidator(validator: ValidatorFn): boolean {\n return hasValidator(this._rawValidators, validator);\n }\n\n /**\n * Check whether an asynchronous validator function is present on this control. The provided\n * validator must be a reference to the exact same function that was provided.\n *\n * @param validator The asynchronous validator to check for presence. Compared by function\n * reference.\n * @returns Whether the provided asynchronous validator was found on this control.\n */\n hasAsyncValidator(validator: AsyncValidatorFn): boolean {\n return hasValidator(this._rawAsyncValidators, validator);\n }\n\n /**\n * Empties out the synchronous validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n clearValidators(): void {\n this.validator = null;\n }\n\n /**\n * Empties out the async validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n clearAsyncValidators(): void {\n this.asyncValidator = null;\n }\n\n /**\n * Marks the control as `touched`. A control is touched by focus and\n * blur events that do not change the value.\n *\n * @see {@link markAsUntouched()}\n * @see {@link markAsDirty()}\n * @see {@link markAsPristine()}\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `events`\n * observable emits a `TouchedChangeEvent` with the `touched` property being `true`.\n * When false, no events are emitted.\n */\n markAsTouched(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n * @internal Used to propagate the source control downwards\n */\n markAsTouched(opts?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n sourceControl?: AbstractControl;\n }): void;\n markAsTouched(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n const changed = this.touched === false;\n this.touched = true;\n\n const sourceControl = opts.sourceControl ?? this;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched({...opts, sourceControl});\n }\n\n if (changed && opts.emitEvent !== false) {\n this._events.next(new TouchedChangeEvent(true, sourceControl));\n }\n }\n\n /**\n * Marks the control and all its descendant controls as `touched`.\n * @see {@link markAsTouched()}\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `emitEvent`: When true or not supplied (the default), the `events`\n * observable emits a `TouchedChangeEvent` with the `touched` property being `true`.\n * When false, no events are emitted.\n */\n markAllAsTouched(opts: {emitEvent?: boolean} = {}): void {\n this.markAsTouched({onlySelf: true, emitEvent: opts.emitEvent, sourceControl: this});\n\n this._forEachChild((control: AbstractControl) => control.markAllAsTouched(opts));\n }\n\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, also marks all children as `untouched`\n * and recalculates the `touched` status of all parent controls.\n *\n * @see {@link markAsTouched()}\n * @see {@link markAsDirty()}\n * @see {@link markAsPristine()}\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after the marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `events`\n * observable emits a `TouchedChangeEvent` with the `touched` property being `false`.\n * When false, no events are emitted.\n */\n markAsUntouched(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n *\n * @internal Used to propagate the source control downwards\n */\n markAsUntouched(opts: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n sourceControl?: AbstractControl;\n }): void;\n markAsUntouched(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n const changed = this.touched === true;\n this.touched = false;\n this._pendingTouched = false;\n\n const sourceControl = opts.sourceControl ?? this;\n this._forEachChild((control: AbstractControl) => {\n control.markAsUntouched({onlySelf: true, emitEvent: opts.emitEvent, sourceControl});\n });\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts, sourceControl);\n }\n\n if (changed && opts.emitEvent !== false) {\n this._events.next(new TouchedChangeEvent(false, sourceControl));\n }\n }\n\n /**\n * Marks the control as `dirty`. A control becomes dirty when\n * the control's value is changed through the UI; compare `markAsTouched`.\n *\n * @see {@link markAsTouched()}\n * @see {@link markAsUntouched()}\n * @see {@link markAsPristine()}\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `events`\n * observable emits a `PristineChangeEvent` with the `pristine` property being `false`.\n * When false, no events are emitted.\n */\n markAsDirty(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n * @internal Used to propagate the source control downwards\n */\n markAsDirty(opts: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n sourceControl?: AbstractControl;\n }): void;\n markAsDirty(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n const changed = this.pristine === true;\n this.pristine = false;\n\n const sourceControl = opts.sourceControl ?? this;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty({...opts, sourceControl});\n }\n\n if (changed && opts.emitEvent !== false) {\n this._events.next(new PristineChangeEvent(false, sourceControl));\n }\n }\n\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, marks all children as `pristine`,\n * and recalculates the `pristine` status of all parent\n * controls.\n *\n * @see {@link markAsTouched()}\n * @see {@link markAsUntouched()}\n * @see {@link markAsDirty()}\n *\n * @param opts Configuration options that determine how the control emits events after\n * marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `events`\n * observable emits a `PristineChangeEvent` with the `pristine` property being `true`.\n * When false, no events are emitted.\n */\n markAsPristine(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n * @internal Used to propagate the source control downwards\n */\n markAsPristine(opts: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n sourceControl?: AbstractControl;\n }): void;\n markAsPristine(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n const changed = this.pristine === false;\n this.pristine = true;\n this._pendingDirty = false;\n\n const sourceControl = opts.sourceControl ?? this;\n this._forEachChild((control: AbstractControl) => {\n /** We don't propagate the source control downwards */\n control.markAsPristine({onlySelf: true, emitEvent: opts.emitEvent});\n });\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts, sourceControl);\n }\n\n if (changed && opts.emitEvent !== false) {\n this._events.next(new PristineChangeEvent(true, sourceControl));\n }\n }\n\n /**\n * Marks the control as `pending`.\n *\n * A control is pending while the control performs async validation.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates changes and\n * emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event with the latest status the control is marked pending\n * and the `events` observable emits a `StatusChangeEvent` with the `status` property being\n * `PENDING` When false, no events are emitted.\n *\n */\n markAsPending(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n * @internal Used to propagate the source control downwards\n */\n markAsPending(opts: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n sourceControl?: AbstractControl;\n }): void;\n markAsPending(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n this.status = PENDING;\n\n const sourceControl = opts.sourceControl ?? this;\n if (opts.emitEvent !== false) {\n this._events.next(new StatusChangeEvent(this.status, sourceControl));\n (this.statusChanges as EventEmitter<FormControlStatus>).emit(this.status);\n }\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending({...opts, sourceControl});\n }\n }\n\n /**\n * Disables the control. This means the control is exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n *\n * If the control has children, all children are also disabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control is disabled.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`,\n * `valueChanges` and `events`\n * observables emit events with the latest status and value when the control is disabled.\n * When false, no events are emitted.\n */\n disable(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n * @internal Used to propagate the source control downwards\n */\n disable(opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl}): void;\n disable(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n this.status = DISABLED;\n (this as Writable<this>).errors = null;\n this._forEachChild((control: AbstractControl) => {\n /** We don't propagate the source control downwards */\n control.disable({...opts, onlySelf: true});\n });\n this._updateValue();\n\n const sourceControl = opts.sourceControl ?? this;\n if (opts.emitEvent !== false) {\n this._events.next(new ValueChangeEvent(this.value, sourceControl));\n this._events.next(new StatusChangeEvent(this.status, sourceControl));\n (this.valueChanges as EventEmitter<TValue>).emit(this.value);\n (this.statusChanges as EventEmitter<FormControlStatus>).emit(this.status);\n }\n\n this._updateAncestors({...opts, skipPristineCheck}, this);\n this._onDisabledChange.forEach((changeFn) => changeFn(true));\n }\n\n /**\n * Enables the control. This means the control is included in validation checks and\n * the aggregate value of its parent. Its status recalculates based on its value and\n * its validators.\n *\n * By default, if the control has children, all children are enabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configure options that control how the control propagates changes and\n * emits events when marked as untouched\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`,\n * `valueChanges` and `events`\n * observables emit events with the latest status and value when the control is enabled.\n * When false, no events are emitted.\n */\n enable(opts: {onlySelf?: boolean; emitEvent?: boolean} = {}): void {\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n this.status = VALID;\n this._forEachChild((control: AbstractControl) => {\n control.enable({...opts, onlySelf: true});\n });\n this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n\n this._updateAncestors({...opts, skipPristineCheck}, this);\n this._onDisabledChange.forEach((changeFn) => changeFn(false));\n }\n\n private _updateAncestors(\n opts: {onlySelf?: boolean; emitEvent?: boolean; skipPristineCheck?: boolean},\n sourceControl: AbstractControl,\n ): void {\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n if (!opts.skipPristineCheck) {\n this._parent._updatePristine({}, sourceControl);\n }\n this._parent._updateTouched({}, sourceControl);\n }\n }\n\n /**\n * Sets the parent of the control\n *\n * @param parent The new parent.\n */\n setParent(parent: FormGroup | FormArray | null): void {\n this._parent = parent;\n }\n\n /**\n * Sets the value of the control. Abstract method (implemented in sub-classes).\n */\n abstract setValue(value: TRawValue, options?: Object): void;\n\n /**\n * Patches the value of the control. Abstract method (implemented in sub-classes).\n */\n abstract patchValue(value: TValue, options?: Object): void;\n\n /**\n * Resets the control. Abstract method (implemented in sub-classes).\n */\n abstract reset(value?: TValue, options?: Object): void;\n\n /**\n * The raw value of this control. For most control implementations, the raw value will include\n * disabled children.\n */\n getRawValue(): any {\n return this.value;\n }\n\n /**\n * Recalculates the value and validation status of the control.\n *\n * By default, it also updates the value and validity of its ancestors.\n *\n * @param opts Configuration options determine how the control propagates changes and emits events\n * after updates and validity checks are applied.\n * * `onlySelf`: When true, only update this control. When false or not supplied,\n * update all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`,\n * `valueChanges` and `events`\n * observables emit events with the latest status and value when the control is updated.\n * When false, no events are emitted.\n */\n updateValueAndValidity(opts?: {onlySelf?: boolean; emitEvent?: boolean}): void;\n /**\n * @internal Used to propagate the source control downwards\n */\n updateValueAndValidity(opts: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n sourceControl?: AbstractControl;\n }): void;\n updateValueAndValidity(\n opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},\n ): void {\n this._setInitialStatus();\n this._updateValue();\n\n if (this.enabled) {\n const shouldHaveEmitted = this._cancelExistingSubscription();\n\n (this as Writable<this>).errors = this._runValidator();\n this.status = this._calculateStatus();\n\n if (this.status === VALID || this.status === PENDING) {\n // If the canceled subscription should have emitted\n // we make sure the async validator emits the status change on completion\n this._runAsyncValidator(shouldHaveEmitted, opts.emitEvent);\n }\n }\n\n const sourceControl = opts.sourceControl ?? this;\n if (opts.emitEvent !== false) {\n this._events.next(new ValueChangeEvent<TValue>(this.value, sourceControl));\n this._events.next(new StatusChangeEvent(this.status, sourceControl));\n (this.valueChanges as EventEmitter<TValue>).emit(this.value);\n (this.statusChanges as EventEmitter<FormControlStatus>).emit(this.status);\n }\n\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity({...opts, sourceControl});\n }\n }\n\n /** @internal */\n _updateTreeValidity(opts: {emitEvent?: boolean} = {emitEvent: true}): void {\n this._forEachChild((ctrl: AbstractControl) => ctrl._updateTreeValidity(opts));\n this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n }\n\n private _setInitialStatus() {\n this.status = this._allControlsDisabled() ? DISABLED : VALID;\n }\n\n private _runValidator(): ValidationErrors | null {\n return this.validator ? this.validator(this) : null;\n }\n\n private _runAsyncValidator(shouldHaveEmitted: boolean, emitEvent?: boolean): void {\n if (this.asyncValidator) {\n this.status = PENDING;\n this._hasOwnPendingAsyncValidator = {emitEvent: emitEvent !== false};\n const obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription = obs.subscribe((errors: ValidationErrors | null) => {\n this._hasOwnPendingAsyncValidator = null;\n // This will trigger the recalculation of the validation status, which depends on\n // the state of the asynchronous validation (whether it is in progress or not). So, it is\n // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n this.setErrors(errors, {emitEvent, shouldHaveEmitted});\n });\n }\n }\n\n private _cancelExistingSubscription(): boolean {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n\n // we're cancelling the validator subscribtion, we keep if it should have emitted\n // because we want to emit eventually if it was required at least once.\n const shouldHaveEmitted = this._hasOwnPendingAsyncValidator?.emitEvent ?? false;\n this._hasOwnPendingAsyncValidator = null;\n return shouldHaveEmitted;\n }\n return false;\n }\n\n /**\n * Sets errors on a form control when running validations manually, rather than automatically.\n *\n * Calling `setErrors` also updates the validity of the parent control.\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control errors are set.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event after the errors are set.\n *\n * @usageNotes\n *\n * ### Manually set the errors for a control\n *\n * ```\n * const login = new FormControl('someLogin');\n * login.setErrors({\n * notUnique: true\n * });\n *\n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({ notUnique: true });\n *\n * login.setValue('someOtherLogin');\n *\n * expect(login.valid).toEqual(true);\n * ```\n */\n setErrors(errors: ValidationErrors | null, opts?: {emitEvent?: boolean}): void;\n\n /** @internal */\n setErrors(\n errors: ValidationErrors | null,\n opts?: {emitEvent?: boolean; shouldHaveEmitted?: boolean},\n ): void;\n setErrors(\n errors: ValidationErrors | null,\n opts: {emitEvent?: boolean; shouldHaveEmitted?: boolean} = {},\n ): void {\n (this as Writable<this>).errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false, this, opts.shouldHaveEmitted);\n }\n\n /**\n * Retrieves a child control given the control's name or path.\n *\n * This signature for get supports strings and `const` arrays (`.get(['foo', 'bar'] as const)`).\n */\n get<P extends string | readonly (string | number)[]>(\n path: P,\n ): AbstractControl<ɵGetProperty<TRawValue, P>> | null;\n\n /**\n * Retrieves a child control given the control's name or path.\n *\n * This signature for `get` supports non-const (mutable) arrays. Inferred type\n * information will not be as robust, so prefer to pass a `readonly` array if possible.\n */\n get<P extends string | Array<string | number>>(\n path: P,\n ): AbstractControl<ɵGetProperty<TRawValue, P>> | null;\n\n /**\n * Retrieves a child control given the control's name or path.\n *\n * @param path A dot-delimited string or array of string/number values that define the path to the\n * control. If a string is provided, passing it as a string literal will result in improved type\n * information. Likewise, if an array is provided, passing it `as const` will cause improved type\n * information to be available.\n *\n * @usageNotes\n * ### Retrieve a nested control\n *\n * For example, to get a `name` control nested within a `person` sub-group:\n *\n * * `this.form.get('person.name');`\n *\n * -OR-\n *\n * * `this.form.get(['person', 'name'] as const);` // `as const` gives improved typings\n *\n * ### Retrieve a control in a FormArray\n *\n * When accessing an element inside a FormArray, you can use an element index.\n * For example, to get a `price` control from the first element in an `items` array you can use:\n *\n * * `this.form.get('items.0.price');`\n *\n * -OR-\n *\n * * `this.form.get(['items', 0, 'price']);`\n */\n get<P extends string | (string | number)[]>(\n path: P,\n ): AbstractControl<ɵGetProperty<TRawValue, P>> | null {\n let currPath: Array<string | number> | string = path;\n if (currPath == null) return null;\n if (!Array.isArray(currPath)) currPath = currPath.split('.');\n if (currPath.length === 0) return null;\n return currPath.reduce(\n (control: AbstractControl | null, name) => control && control._find(name),\n this,\n );\n }\n\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n getError(errorCode: string, path?: Array<string | number> | string): any {\n const control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n }\n\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n hasError(errorCode: string, path?: Array<string | number> | string): boolean {\n return !!this.getError(errorCode, path);\n }\n\n /**\n * Retrieves the top-level ancestor of this control.\n */\n get root(): AbstractControl {\n let x: AbstractControl = this;\n\n while (x._parent) {\n x = x._parent;\n }\n\n return x;\n }\n\n /** @internal */\n _updateControlsErrors(\n emitEvent: boolean,\n changedControl: AbstractControl,\n shouldHaveEmitted?: boolean,\n ): void {\n this.status = this._calculateStatus();\n\n if (emitEvent) {\n (this.statusChanges as EventEmitter<FormControlStatus>).emit(this.status);\n }\n\n // The Events Observable expose a slight different bevahior than the statusChanges obs\n // An async validator will still emit a StatusChangeEvent is a previously cancelled\n // async validator has emitEvent set to true\n if (emitEvent || shouldHaveEmitted) {\n this._events.next(new StatusChangeEvent(this.status, changedControl));\n }\n\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent, changedControl, shouldHaveEmitted);\n }\n }\n\n /** @internal */\n _initObservables() {\n (this as Writable<this>).valueChanges = new EventEmitter();\n (this as Writable<this>).statusChanges = new EventEmitter();\n }\n\n private _calculateStatus(): FormControlStatus {\n if (this._allControlsDisabled()) return DISABLED;\n if (this.errors) return INVALID;\n if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING)) return PENDING;\n if (this._anyControlsHaveStatus(INVALID)) return INVALID;\n return VALID;\n }\n\n /** @internal */\n abstract _updateValue(): void;\n\n /** @internal */\n abstract _forEachChild(cb: (c: AbstractControl) => void): void;\n\n /** @internal */\n abstract _anyControls(condition: (c: AbstractControl) => boolean): boolean;\n\n /** @internal */\n abstract _allControlsDisabled(): boolean;\n\n /** @internal */\n abstract _syncPendingControls(): boolean;\n\n /** @internal */\n _anyControlsHaveStatus(status: FormControlStatus): boolean {\n return this._anyControls((control: AbstractControl) => control.status === status);\n }\n\n /** @internal */\n _anyControlsDirty(): boolean {\n return this._anyControls((control: AbstractControl) => control.dirty);\n }\n\n /** @internal */\n _anyControlsTouched(): boolean {\n return this._anyControls((control: AbstractControl) => control.touched);\n }\n\n /** @internal */\n _updatePristine(opts: {onlySelf?: boolean}, changedControl: AbstractControl): void {\n const newPristine = !this._anyControlsDirty();\n const changed = this.pristine !== newPristine;\n this.pristine = newPristine;\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts, changedControl);\n }\n\n if (changed) {\n this._events.next(new PristineChangeEvent(this.pristine, changedControl));\n }\n }\n\n /** @internal */\n _updateTouched(opts: {onlySelf?: boolean} = {}, changedControl: AbstractControl): void {\n this.touched = this._anyControlsTouched();\n this._events.next(new TouchedChangeEvent(this.touched, changedControl));\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts, changedControl);\n }\n }\n\n /** @internal */\n _onDisabledChange: Array<(isDisabled: boolean) => void> = [];\n\n /** @internal */\n _registerOnCollectionChange(fn: () => void): void {\n this._onCollectionChange = fn;\n }\n\n /** @internal */\n _setUpdateStrategy(opts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null): void {\n if (isOptionsObj(opts) && opts.updateOn != null) {\n this._updateOn = opts.updateOn!;\n }\n }\n /**\n * Check to see if parent has been marked artificially dirty.\n *\n * @internal\n */\n private _parentMarkedDirty(onlySelf?: boolean): boolean {\n const parentDirty = this._parent && this._parent.dirty;\n return !onlySelf && !!parentDirty && !this._parent!._anyControlsDirty();\n }\n\n /** @internal */\n _find(name: string | number): AbstractControl | null {\n return null;\n }\n\n /**\n * Internal implementation of the `setValidators` method. Needs to be separated out into a\n * different method, because it is called in the constructor and it can break cases where\n * a control is extended.\n */\n private _assignValidators(validators: ValidatorFn | ValidatorFn[] | null): void {\n this._rawValidators = Array.isArray(validators) ? validators.slice() : validators;\n this._composedValidatorFn = coerceToValidator(this._rawValidators);\n }\n\n /**\n * Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a\n * different method, because it is called in the constructor and it can break cases where\n * a control is extended.\n */\n private _assignAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[] | null): void {\n this._rawAsyncValidators = Array.isArray(validators) ? validators.slice() : validators;\n this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\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.dev/license\n */\n\nimport {ɵWritable as Writable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from '../directives/validators';\n\nimport {\n AbstractControl,\n AbstractControlOptions,\n assertAllValuesPresent,\n assertControlPresent,\n pickAsyncValidators,\n pickValidators,\n ɵRawValue,\n ɵTypedOrUntyped,\n ɵValue,\n} from './abstract_model';\n\n/**\n * FormGroupValue extracts the type of `.value` from a FormGroup's inner object type. The untyped\n * case falls back to {[key: string]: any}.\n *\n * Angular uses this type internally to support Typed Forms; do not use it directly.\n *\n * For internal use only.\n */\nexport type ɵFormGroupValue<T extends {[K in keyof T]?: AbstractControl<any>}> = ɵTypedOrUntyped<\n T,\n Partial<{[K in keyof T]: ɵValue<T[K]>}>,\n {[key: string]: any}\n>;\n\n/**\n * FormGroupRawValue extracts the type of `.getRawValue()` from a FormGroup's inner object type. The\n * untyped case falls back to {[key: string]: any}.\n *\n * Angular uses this type internally to support Typed Forms; do not use it directly.\n *\n * For internal use only.\n */\nexport type ɵFormGroupRawValue<T extends {[K in keyof T]?: AbstractControl<any>}> = ɵTypedOrUntyped<\n T,\n {[K in keyof T]: ɵRawValue<T[K]>},\n {[key: string]: any}\n>;\n\n/**\n * OptionalKeys returns the union of all optional keys in the object.\n *\n * Angular uses this type internally to support Typed Forms; do not use it directly.\n */\nexport type ɵOptionalKeys<T> = {\n [K in keyof T]-?: undefined extends T[K] ? K : never;\n}[keyof T];\n\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key. It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormArray`, and `FormRecord`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * `FormGroup` is intended for use cases where the keys are known ahead of time.\n * If you need to dynamically add and remove controls, use {@link FormRecord} instead.\n *\n * `FormGroup` accepts an optional type parameter `TControl`, which is an object type with inner\n * control types as values.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n *\n * ### The type argument, and optional controls\n *\n * `FormGroup` accepts one generic argument, which is an object containing its inner controls.\n * This type will usually be inferred automatically, but you can always specify it explicitly if you\n * wish.\n *\n * If you have controls that are optional (i.e. they can be removed, you can use the `?` in the\n * type):\n *\n * ```\n * const form = new FormGroup<{\n * first: FormControl<string|null>,\n * middle?: FormControl<string|null>, // Middle name is optional.\n * last: FormControl<string|null>,\n * }>({\n * first: new FormControl('Nancy'),\n * last: new FormControl('Drew'),\n * });\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('')\n * passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n * one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * ### Using a FormGroup with optional controls\n *\n * It is possible to have optional controls in a FormGroup. An optional control can be removed later\n * using `removeControl`, and can be omitted when calling `reset`. Optional controls must be\n * declared optional in the group's type.\n *\n * ```ts\n * const c = new FormGroup<{one?: FormControl<string>}>({\n * one: new FormControl('')\n * });\n * ```\n *\n * Notice that `c.value.one` has type `string|null|undefined`. This is because calling `c.reset({})`\n * without providing the optional key `one` will cause it to become `null`.\n *\n * @publicApi\n */\nexport class FormGroup<\n TControl extends {[K in keyof TControl]: AbstractControl<any>} = any,\n> extends AbstractControl<\n ɵTypedOrUntyped<TControl, ɵFormGroupValue<TControl>, any>,\n ɵTypedOrUntyped<TControl, ɵFormGroupRawValue<TControl>, any>\n> {\n /**\n * Creates a new `FormGroup` instance.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(\n controls: TControl,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n (typeof ngDevMode === 'undefined' || ngDevMode) && validateFormGroupControls(controls);\n this.controls = controls;\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,\n // so we set `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator,\n });\n }\n\n public controls: ɵTypedOrUntyped<TControl, TControl, {[key: string]: AbstractControl<any>}>;\n\n /**\n * Registers a control with the group's list of controls. In a strongly-typed group, the control\n * must be in the group's type (possibly as an optional key).\n *\n * This method does not update the value or validity of the control.\n * Use {@link FormGroup#addControl addControl} instead.\n *\n * @param name The control name to register in the collection\n * @param control Provides the control for the given name\n */\n registerControl<K extends string & keyof TControl>(name: K, control: TControl[K]): TControl[K];\n registerControl(\n this: FormGroup<{[key: string]: AbstractControl<any>}>,\n name: string,\n control: AbstractControl<any>,\n ): AbstractControl<any>;\n\n registerControl<K extends string & keyof TControl>(name: K, control: TControl[K]): TControl[K] {\n if (this.controls[name]) return (this.controls as any)[name];\n this.controls[name] = control;\n control.setParent(this as FormGroup);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n }\n\n /**\n * Add a control to this group. In a strongly-typed group, the control must be in the group's type\n * (possibly as an optional key).\n *\n * If a control with a given name already exists, it would *not* be replaced with a new one.\n * If you want to replace an existing control, use the {@link FormGroup#setControl setControl}\n * method instead. This method also updates the value and validity of the control.\n *\n * @param name The control name to add to the collection\n * @param control Provides the control for the given name\n * @param options Specifies whether this FormGroup instance should emit events after a new\n * control is added.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * added. When false, no events are emitted.\n */\n addControl(\n this: FormGroup<{[key: string]: AbstractControl<any>}>,\n name: string,\n control: AbstractControl,\n options?: {emitEvent?: boolean},\n ): void;\n addControl<K extends string & keyof TControl>(\n name: K,\n control: Required<TControl>[K],\n options?: {\n emitEvent?: boolean;\n },\n ): void;\n\n addControl<K extends string & keyof TControl>(\n name: K,\n control: Required<TControl>[K],\n options: {\n emitEvent?: boolean;\n } = {},\n ): void {\n this.registerControl(name, control);\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n this._onCollectionChange();\n }\n\n removeControl(\n this: FormGroup<{[key: string]: AbstractControl<any>}>,\n name: string,\n options?: {\n emitEvent?: boolean;\n },\n ): void;\n removeControl<S extends string>(\n name: ɵOptionalKeys<TControl> & S,\n options?: {\n emitEvent?: boolean;\n },\n ): void;\n\n /**\n * Remove a control from this group. In a strongly-typed group, required controls cannot be\n * removed.\n *\n * This method also updates the value and validity of the control.\n *\n * @param name The control name to remove from the collection\n * @param options Specifies whether this FormGroup instance should emit events after a\n * control is removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * removed. When false, no events are emitted.\n */\n removeControl(name: string, options: {emitEvent?: boolean} = {}): void {\n if ((this.controls as any)[name])\n (this.controls as any)[name]._registerOnCollectionChange(() => {});\n delete (this.controls as any)[name];\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n this._onCollectionChange();\n }\n\n /**\n * Replace an existing control. In a strongly-typed group, the control must be in the group's type\n * (possibly as an optional key).\n *\n * If a control with a given name does not exist in this `FormGroup`, it will be added.\n *\n * @param name The control name to replace in the collection\n * @param control Provides the control for the given name\n * @param options Specifies whether this FormGroup instance should emit events after an\n * existing control is replaced.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * replaced with a new one. When false, no events are emitted.\n */\n setControl<K extends string & keyof TControl>(\n name: K,\n control: TControl[K],\n options?: {\n emitEvent?: boolean;\n },\n ): void;\n setControl(\n this: FormGroup<{[key: string]: AbstractControl<any>}>,\n name: string,\n control: AbstractControl,\n options?: {emitEvent?: boolean},\n ): void;\n\n setControl<K extends string & keyof TControl>(\n name: K,\n control: TControl[K],\n options: {\n emitEvent?: boolean;\n } = {},\n ): void {\n if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n delete this.controls[name];\n if (control) this.registerControl(name, control);\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n this._onCollectionChange();\n }\n\n /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * Reports false for disabled controls. If you'd like to check for existence in the group\n * only, use {@link AbstractControl#get get} instead.\n *\n * @param controlName The control name to check for existence in the collection\n *\n * @returns false for disabled controls, true otherwise.\n */\n contains<K extends string>(controlName: K): boolean;\n contains(this: FormGroup<{[key: string]: AbstractControl<any>}>, controlName: string): boolean;\n\n contains<K extends string & keyof TControl>(controlName: K): boolean {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n }\n\n /**\n * Sets the value of the `FormGroup`. It accepts an object that matches\n * the structure of the group, with control names as keys.\n *\n * @usageNotes\n * ### Set the complete value for the form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n *\n * console.log(form.value); // {first: null, last: null}\n *\n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * ```\n *\n * @throws When strict checks fail, such as setting the value of a control\n * that doesn't exist or if you exclude a value of a control that does exist.\n *\n * @param value The new value for the control that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n */\n override setValue(\n value: ɵFormGroupRawValue<TControl>,\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n } = {},\n ): void {\n assertAllValuesPresent(this, true, value);\n (Object.keys(value) as Array<keyof TControl>).forEach((name) => {\n assertControlPresent(this, true, name as any);\n (this.controls as any)[name].setValue((value as any)[name], {\n onlySelf: true,\n emitEvent: options.emitEvent,\n });\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and does its best to match the values to the correct controls\n * in the group.\n *\n * It accepts both super-sets and sub-sets of the group without throwing an error.\n *\n * @usageNotes\n * ### Patch the value for a form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n *\n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * ```\n *\n * @param value The object that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes and\n * emits events after the value is patched.\n * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n * true.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control value\n * is updated. When false, no events are emitted. The configuration options are passed to\n * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n */\n override patchValue(\n value: ɵFormGroupValue<TControl>,\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n } = {},\n ): void {\n // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n // `patchValue` can be called recursively and inner data structures might have these values, so\n // we just ignore such cases when a field containing FormGroup instance receives `null` or\n // `undefined` as a value.\n if (value == null /* both `null` and `undefined` */) return;\n (Object.keys(value) as Array<keyof TControl>).forEach((name) => {\n // The compiler cannot see through the uninstantiated conditional type of `this.controls`, so\n // `as any` is required.\n const control = (this.controls as any)[name];\n if (control) {\n control.patchValue(\n /* Guaranteed to be present, due to the outer forEach. */ value[\n name as keyof ɵFormGroupValue<TControl>\n ]!,\n {onlySelf: true, emitEvent: options.emitEvent},\n );\n }\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets\n * the value of all descendants to their default values, or null if no defaults were provided.\n *\n * You reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * is a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * @param value Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the group is reset.\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * @usageNotes\n *\n * ### Reset the form group values\n *\n * ```ts\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * console.log(form.value); // {first: 'first name', last: 'last name'}\n *\n * form.reset({ first: 'name', last: 'last name' });\n *\n * console.log(form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * ### Reset the form group values and disabled status\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n *\n * console.log(form.value); // {last: 'last'}\n * console.log(form.get('first').status); // 'DISABLED'\n * ```\n */\n override reset(\n value: ɵTypedOrUntyped<\n TControl,\n ɵFormGroupValue<TControl>,\n any\n > = {} as unknown as ɵFormGroupValue<TControl>,\n options: {onlySelf?: boolean; emitEvent?: boolean} = {},\n ): void {\n this._forEachChild((control: AbstractControl, name) => {\n control.reset(value ? (value as any)[name] : null, {\n onlySelf: true,\n emitEvent: options.emitEvent,\n });\n });\n this._updatePristine(options, this);\n this._updateTouched(options, this);\n this.updateValueAndValidity(options);\n }\n\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * Retrieves all values regardless of disabled status.\n */\n override getRawValue(): ɵTypedOrUntyped<TControl, ɵFormGroupRawValue<TControl>, any> {\n return this._reduceChildren({}, (acc, control, name) => {\n (acc as any)[name] = (control as any).getRawValue();\n return acc;\n }) as any;\n }\n\n /** @internal */\n override _syncPendingControls(): boolean {\n let subtreeUpdated = this._reduceChildren(false, (updated: boolean, child) => {\n return child._syncPendingControls() ? true : updated;\n });\n if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n return subtreeUpdated;\n }\n\n /** @internal */\n override _forEachChild(cb: (v: any, k: any) => void): void {\n Object.keys(this.controls).forEach((key) => {\n // The list of controls can change (for ex. controls might be removed) while the loop\n // is running (as a result of invoking Forms API in `valueChanges` subscription), so we\n // have to null check before invoking the callback.\n const control = (this.controls as any)[key];\n control && cb(control, key);\n });\n }\n\n /** @internal */\n _setUpControls(): void {\n this._forEachChild((control) => {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n });\n }\n\n /** @internal */\n override _updateValue(): void {\n (this as Writable<this>).value = this._reduceValue() as any;\n }\n\n /** @internal */\n override _anyControls(condition: (c: AbstractControl) => boolean): boolean {\n for (const [controlName, control] of Object.entries(this.controls)) {\n if (this.contains(controlName as any) && condition(control as any)) {\n return true;\n }\n }\n return false;\n }\n\n /** @internal */\n _reduceValue(): Partial<TControl> {\n let acc: Partial<TControl> = {};\n return this._reduceChildren(acc, (acc, control, name) => {\n if (control.enabled || this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n }\n\n /** @internal */\n _reduceChildren<T, K extends keyof TControl>(\n initValue: T,\n fn: (acc: T, control: TControl[K], name: K) => T,\n ): T {\n let res = initValue;\n this._forEachChild((control: TControl[K], name: K) => {\n res = fn(res, control, name);\n });\n return res;\n }\n\n /** @internal */\n override _allControlsDisabled(): boolean {\n for (const controlName of Object.keys(this.controls) as Array<keyof TControl>) {\n if ((this.controls as any)[controlName].enabled) {\n return false;\n }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n }\n\n /** @internal */\n override _find(name: string | number): AbstractControl | null {\n return this.controls.hasOwnProperty(name as string)\n ? (this.controls as any)[name as keyof TControl]\n : null;\n }\n}\n\n/**\n * Will validate that none of the controls has a key with a dot\n * Throws other wise\n */\nfunction validateFormGroupControls<TControl>(controls: {\n [K in keyof TControl]: AbstractControl<any, any>;\n}) {\n const invalidKeys = Object.keys(controls).filter((key) => key.includes('.'));\n if (invalidKeys.length > 0) {\n // TODO: make this an error once there are no more uses in G3\n console.warn(\n `FormGroup keys cannot include \\`.\\`, please replace the keys for: ${invalidKeys.join(',')}.`,\n );\n }\n}\n\ninterface UntypedFormGroupCtor {\n new (\n controls: {[key: string]: AbstractControl},\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): UntypedFormGroup;\n\n /**\n * The presence of an explicit `prototype` property provides backwards-compatibility for apps that\n * manually inspect the prototype chain.\n */\n prototype: FormGroup<any>;\n}\n\n/**\n * UntypedFormGroup is a non-strongly-typed version of `FormGroup`.\n */\nexport type UntypedFormGroup = FormGroup<any>;\n\nexport const UntypedFormGroup: UntypedFormGroupCtor = FormGroup;\n\n/**\n * @description\n * Asserts that the given control is an instance of `FormGroup`\n *\n * @publicApi\n */\nexport const isFormGroup = (control: unknown): control is FormGroup => control instanceof FormGroup;\n\n/**\n * Tracks the value and validity state of a collection of `FormControl` instances, each of which has\n * the same value type.\n *\n * `FormRecord` is very similar to {@link FormGroup}, except it can be used with a dynamic keys,\n * with controls added and removed as needed.\n *\n * `FormRecord` accepts one generic argument, which describes the type of the controls it contains.\n *\n * @usageNotes\n *\n * ```\n * let numbers = new FormRecord({bill: new FormControl('415-123-456')});\n * numbers.addControl('bob', new FormControl('415-234-567'));\n * numbers.removeControl('bill');\n * ```\n *\n * @publicApi\n */\nexport class FormRecord<TControl extends AbstractControl = AbstractControl> extends FormGroup<{\n [key: string]: TControl;\n}> {}\n\nexport interface FormRecord<TControl> {\n /**\n * Registers a control with the records's list of controls.\n *\n * See `FormGroup#registerControl` for additional information.\n */\n registerControl(name: string, control: TControl): TControl;\n\n /**\n * Add a control to this group.\n *\n * See `FormGroup#addControl` for additional information.\n */\n addControl(name: string, control: TControl, options?: {emitEvent?: boolean}): void;\n\n /**\n * Remove a control from this group.\n *\n * See `FormGroup#removeControl` for additional information.\n */\n removeControl(name: string, options?: {emitEvent?: boolean}): void;\n\n /**\n * Replace an existing control.\n *\n * See `FormGroup#setControl` for additional information.\n */\n setControl(name: string, control: TControl, options?: {emitEvent?: boolean}): void;\n\n /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * See `FormGroup#contains` for additional information.\n */\n contains(controlName: string): boolean;\n\n /**\n * Sets the value of the `FormRecord`. It accepts an object that matches\n * the structure of the group, with control names as keys.\n *\n * See `FormGroup#setValue` for additional information.\n */\n setValue(\n value: {[key: string]: ɵValue<TControl>},\n options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n },\n ): void;\n\n /**\n * Patches the value of the `FormRecord`. It accepts an object with control\n * names as keys, and does its best to match the values to the correct controls\n * in the group.\n *\n * See `FormGroup#patchValue` for additional information.\n */\n patchValue(\n value: {[key: string]: ɵValue<TControl>},\n options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n },\n ): void;\n\n /**\n * Resets the `FormRecord`, marks all descendants `pristine` and `untouched` and sets\n * the value of all descendants to null.\n *\n * See `FormGroup#reset` for additional information.\n */\n reset(\n value?: {[key: string]: ɵValue<TControl>},\n options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n },\n ): void;\n\n /**\n * The aggregate value of the `FormRecord`, including any disabled controls.\n *\n * See `FormGroup#getRawValue` for additional information.\n */\n getRawValue(): {[key: string]: ɵRawValue<TControl>};\n}\n\n/**\n * @description\n * Asserts that the given control is an instance of `FormRecord`\n *\n * @publicApi\n */\nexport const isFormRecord = (control: unknown): control is FormRecord =>\n control instanceof FormRecord;\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.dev/license\n */\n\nimport {Inject, InjectionToken, ɵRuntimeError as RuntimeError} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\nimport {AbstractControl} from '../model/abstract_model';\nimport {FormArray} from '../model/form_array';\nimport {FormControl} from '../model/form_control';\nimport {FormGroup} from '../model/form_group';\nimport {getControlAsyncValidators, getControlValidators, mergeValidators} from '../validators';\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {BuiltInControlValueAccessor, ControlValueAccessor} from './control_value_accessor';\nimport {DefaultValueAccessor} from './default_value_accessor';\nimport {NgControl} from './ng_control';\nimport {FormArrayName} from './reactive_directives/form_group_name';\nimport {ngModelWarning} from './reactive_errors';\nimport {AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\n/**\n * Token to provide to allow SetDisabledState to always be called when a CVA is added, regardless of\n * whether the control is disabled or enabled.\n *\n * @see {@link FormsModule#withconfig}\n */\nexport const CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', {\n providedIn: 'root',\n factory: () => setDisabledStateDefault,\n});\n\n/**\n * The type for CALL_SET_DISABLED_STATE. If `always`, then ControlValueAccessor will always call\n * `setDisabledState` when attached, which is the most correct behavior. Otherwise, it will only be\n * called when disabled, which is the legacy behavior for compatibility.\n *\n * @publicApi\n * @see {@link FormsModule#withconfig}\n */\nexport type SetDisabledStateOption = 'whenDisabledForLegacyCode' | 'always';\n\n/**\n * Whether to use the fixed setDisabledState behavior by default.\n */\nexport const setDisabledStateDefault: SetDisabledStateOption = 'always';\n\nexport function controlPath(name: string | null, parent: ControlContainer): string[] {\n return [...parent.path!, name!];\n}\n\n/**\n * Links a Form control and a Form directive by setting up callbacks (such as `onChange`) on both\n * instances. This function is typically invoked when form directive is being initialized.\n *\n * @param control Form control instance that should be linked.\n * @param dir Directive that should be linked with a given control.\n */\nexport function setUpControl(\n control: FormControl,\n dir: NgControl,\n callSetDisabledState: SetDisabledStateOption = setDisabledStateDefault,\n): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!control) _throwError(dir, 'Cannot find control with');\n if (!dir.valueAccessor) _throwMissingValueAccessorError(dir);\n }\n\n setUpValidators(control, dir);\n\n dir.valueAccessor!.writeValue(control.value);\n\n // The legacy behavior only calls the CVA's `setDisabledState` if the control is disabled.\n // If the `callSetDisabledState` option is set to `always`, then this bug is fixed and\n // the method is always called.\n if (control.disabled || callSetDisabledState === 'always') {\n dir.valueAccessor!.setDisabledState?.(control.disabled);\n }\n\n setUpViewChangePipeline(control, dir);\n setUpModelChangePipeline(control, dir);\n\n setUpBlurPipeline(control, dir);\n\n setUpDisabledChangeHandler(control, dir);\n}\n\n/**\n * Reverts configuration performed by the `setUpControl` control function.\n * Effectively disconnects form control with a given form directive.\n * This function is typically invoked when corresponding form directive is being destroyed.\n *\n * @param control Form control which should be cleaned up.\n * @param dir Directive that should be disconnected from a given control.\n * @param validateControlPresenceOnChange Flag that indicates whether onChange handler should\n * contain asserts to verify that it's not called once directive is destroyed. We need this flag\n * to avoid potentially breaking changes caused by better control cleanup introduced in #39235.\n */\nexport function cleanUpControl(\n control: FormControl | null,\n dir: NgControl,\n validateControlPresenceOnChange: boolean = true,\n): void {\n const noop = () => {\n if (validateControlPresenceOnChange && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n _noControlError(dir);\n }\n };\n\n // The `valueAccessor` field is typically defined on FromControl and FormControlName directive\n // instances and there is a logic in `selectValueAccessor` function that throws if it's not the\n // case. We still check the presence of `valueAccessor` before invoking its methods to make sure\n // that cleanup works correctly if app code or tests are setup to ignore the error thrown from\n // `selectValueAccessor`. See https://github.com/angular/angular/issues/40521.\n if (dir.valueAccessor) {\n dir.valueAccessor.registerOnChange(noop);\n dir.valueAccessor.registerOnTouched(noop);\n }\n\n cleanUpValidators(control, dir);\n\n if (control) {\n dir._invokeOnDestroyCallbacks();\n control._registerOnCollectionChange(() => {});\n }\n}\n\nfunction registerOnValidatorChange<V>(validators: (V | Validator)[], onChange: () => void): void {\n validators.forEach((validator: V | Validator) => {\n if ((<Validator>validator).registerOnValidatorChange)\n (<Validator>validator).registerOnValidatorChange!(onChange);\n });\n}\n\n/**\n * Sets up disabled change handler function on a given form control if ControlValueAccessor\n * associated with a given directive instance supports the `setDisabledState` call.\n *\n * @param control Form control where disabled change handler should be setup.\n * @param dir Corresponding directive instance associated with this control.\n */\nexport function setUpDisabledChangeHandler(control: FormControl, dir: NgControl): void {\n if (dir.valueAccessor!.setDisabledState) {\n const onDisabledChange = (isDisabled: boolean) => {\n dir.valueAccessor!.setDisabledState!(isDisabled);\n };\n control.registerOnDisabledChange(onDisabledChange);\n\n // Register a callback function to cleanup disabled change handler\n // from a control instance when a directive is destroyed.\n dir._registerOnDestroy(() => {\n control._unregisterOnDisabledChange(onDisabledChange);\n });\n }\n}\n\n/**\n * Sets up sync and async directive validators on provided form control.\n * This function merges validators from the directive into the validators of the control.\n *\n * @param control Form control where directive validators should be setup.\n * @param dir Directive instance that contains validators to be setup.\n */\nexport function setUpValidators(control: AbstractControl, dir: AbstractControlDirective): void {\n const validators = getControlValidators(control);\n if (dir.validator !== null) {\n control.setValidators(mergeValidators<ValidatorFn>(validators, dir.validator));\n } else if (typeof validators === 'function') {\n // If sync validators are represented by a single validator function, we force the\n // `Validators.compose` call to happen by executing the `setValidators` function with\n // an array that contains that function. We need this to avoid possible discrepancies in\n // validators behavior, so sync validators are always processed by the `Validators.compose`.\n // Note: we should consider moving this logic inside the `setValidators` function itself, so we\n // have consistent behavior on AbstractControl API level. The same applies to the async\n // validators logic below.\n control.setValidators([validators]);\n }\n\n const asyncValidators = getControlAsyncValidators(control);\n if (dir.asyncValidator !== null) {\n control.setAsyncValidators(\n mergeValidators<AsyncValidatorFn>(asyncValidators, dir.asyncValidator),\n );\n } else if (typeof asyncValidators === 'function') {\n control.setAsyncValidators([asyncValidators]);\n }\n\n // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n const onValidatorChange = () => control.updateValueAndValidity();\n registerOnValidatorChange<ValidatorFn>(dir._rawValidators, onValidatorChange);\n registerOnValidatorChange<AsyncValidatorFn>(dir._rawAsyncValidators, onValidatorChange);\n}\n\n/**\n * Cleans up sync and async directive validators on provided form control.\n * This function reverts the setup performed by the `setUpValidators` function, i.e.\n * removes directive-specific validators from a given control instance.\n *\n * @param control Form control from where directive validators should be removed.\n * @param dir Directive instance that contains validators to be removed.\n * @returns true if a control was updated as a result of this action.\n */\nexport function cleanUpValidators(\n control: AbstractControl | null,\n dir: AbstractControlDirective,\n): boolean {\n let isControlUpdated = false;\n if (control !== null) {\n if (dir.validator !== null) {\n const validators = getControlValidators(control);\n if (Array.isArray(validators) && validators.length > 0) {\n // Filter out directive validator function.\n const updatedValidators = validators.filter((validator) => validator !== dir.validator);\n if (updatedValidators.length !== validators.length) {\n isControlUpdated = true;\n control.setValidators(updatedValidators);\n }\n }\n }\n\n if (dir.asyncValidator !== null) {\n const asyncValidators = getControlAsyncValidators(control);\n if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {\n // Filter out directive async validator function.\n const updatedAsyncValidators = asyncValidators.filter(\n (asyncValidator) => asyncValidator !== dir.asyncValidator,\n );\n if (updatedAsyncValidators.length !== asyncValidators.length) {\n isControlUpdated = true;\n control.setAsyncValidators(updatedAsyncValidators);\n }\n }\n }\n }\n\n // Clear onValidatorChange callbacks by providing a noop function.\n const noop = () => {};\n registerOnValidatorChange<ValidatorFn>(dir._rawValidators, noop);\n registerOnValidatorChange<AsyncValidatorFn>(dir._rawAsyncValidators, noop);\n\n return isControlUpdated;\n}\n\nfunction setUpViewChangePipeline(control: FormControl, dir: NgControl): void {\n dir.valueAccessor!.registerOnChange((newValue: any) => {\n control._pendingValue = newValue;\n control._pendingChange = true;\n control._pendingDirty = true;\n\n if (control.updateOn === 'change') updateControl(control, dir);\n });\n}\n\nfunction setUpBlurPipeline(control: FormControl, dir: NgControl): void {\n dir.valueAccessor!.registerOnTouched(() => {\n control._pendingTouched = true;\n\n if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);\n if (control.updateOn !== 'submit') control.markAsTouched();\n });\n}\n\nfunction updateControl(control: FormControl, dir: NgControl): void {\n if (control._pendingDirty) control.markAsDirty();\n control.setValue(control._pendingValue, {emitModelToViewChange: false});\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n}\n\nfunction setUpModelChangePipeline(control: FormControl, dir: NgControl): void {\n const onChange = (newValue?: any, emitModelEvent?: boolean) => {\n // control -> view\n dir.valueAccessor!.writeValue(newValue);\n\n // control -> ngModel\n if (emitModelEvent) dir.viewToModelUpdate(newValue);\n };\n control.registerOnChange(onChange);\n\n // Register a callback function to cleanup onChange handler\n // from a control instance when a directive is destroyed.\n dir._registerOnDestroy(() => {\n control._unregisterOnChange(onChange);\n });\n}\n\n/**\n * Links a FormGroup or FormArray instance and corresponding Form directive by setting up validators\n * present in the view.\n *\n * @param control FormGroup or FormArray instance that should be linked.\n * @param dir Directive that provides view validators.\n */\nexport function setUpFormContainer(\n control: FormGroup | FormArray,\n dir: AbstractFormGroupDirective | FormArrayName,\n) {\n if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'Cannot find control with');\n setUpValidators(control, dir);\n}\n\n/**\n * Reverts the setup performed by the `setUpFormContainer` function.\n *\n * @param control FormGroup or FormArray instance that should be cleaned up.\n * @param dir Directive that provided view validators.\n * @returns true if a control was updated as a result of this action.\n */\nexport function cleanUpFormContainer(\n control: FormGroup | FormArray,\n dir: AbstractFormGroupDirective | FormArrayName,\n): boolean {\n return cleanUpValidators(control, dir);\n}\n\nfunction _noControlError(dir: NgControl) {\n return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\n\nfunction _throwError(dir: AbstractControlDirective, message: string): void {\n const messageEnd = _describeControlLocation(dir);\n throw new Error(`${message} ${messageEnd}`);\n}\n\nfunction _describeControlLocation(dir: AbstractControlDirective): string {\n const path = dir.path;\n if (path && path.length > 1) return `path: '${path.join(' -> ')}'`;\n if (path?.[0]) return `name: '${path}'`;\n return 'unspecified name attribute';\n}\n\nfunction _throwMissingValueAccessorError(dir: AbstractControlDirective) {\n const loc = _describeControlLocation(dir);\n throw new RuntimeError(\n RuntimeErrorCode.NG_MISSING_VALUE_ACCESSOR,\n `No value accessor for form control ${loc}.`,\n );\n}\n\nfunction _throwInvalidValueAccessorError(dir: AbstractControlDirective) {\n const loc = _describeControlLocation(dir);\n throw new RuntimeError(\n RuntimeErrorCode.NG_VALUE_ACCESSOR_NOT_PROVIDED,\n `Value accessor was not provided as an array for form control with ${loc}. ` +\n `Check that the \\`NG_VALUE_ACCESSOR\\` token is configured as a \\`multi: true\\` provider.`,\n );\n}\n\nexport function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {\n if (!changes.hasOwnProperty('model')) return false;\n const change = changes['model'];\n\n if (change.isFirstChange()) return true;\n return !Object.is(viewModel, change.currentValue);\n}\n\nexport function isBuiltInAccessor(valueAccessor: ControlValueAccessor): boolean {\n // Check if a given value accessor is an instance of a class that directly extends\n // `BuiltInControlValueAccessor` one.\n return Object.getPrototypeOf(valueAccessor.constructor) === BuiltInControlValueAccessor;\n}\n\nexport function syncPendingControls(\n form: FormGroup,\n directives: Set<NgControl> | NgControl[],\n): void {\n form._syncPendingControls();\n directives.forEach((dir: NgControl) => {\n const control = dir.control as FormControl;\n if (control.updateOn === 'submit' && control._pendingChange) {\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n }\n });\n}\n\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nexport function selectValueAccessor(\n dir: NgControl,\n valueAccessors: ControlValueAccessor[],\n): ControlValueAccessor | null {\n if (!valueAccessors) return null;\n\n if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwInvalidValueAccessorError(dir);\n\n let defaultAccessor: ControlValueAccessor | undefined = undefined;\n let builtinAccessor: ControlValueAccessor | undefined = undefined;\n let customAccessor: ControlValueAccessor | undefined = undefined;\n\n valueAccessors.forEach((v: ControlValueAccessor) => {\n if (v.constructor === DefaultValueAccessor) {\n defaultAccessor = v;\n } else if (isBuiltInAccessor(v)) {\n if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'More than one built-in value accessor matches form control with');\n builtinAccessor = v;\n } else {\n if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n _throwError(dir, 'More than one custom value accessor matches form control with');\n customAccessor = v;\n }\n });\n\n if (customAccessor) return customAccessor;\n if (builtinAccessor) return builtinAccessor;\n if (defaultAccessor) return defaultAccessor;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _throwError(dir, 'No valid value accessor for form control with');\n }\n return null;\n}\n\nexport function removeListItem<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) list.splice(index, 1);\n}\n\n// TODO(kara): remove after deprecation period\nexport function _ngModelWarning(\n name: string,\n type: {_ngModelWarningSentOnce: boolean},\n instance: {_ngModelWarningSent: boolean},\n warningConfig: string | null,\n) {\n if (warningConfig === 'never') return;\n\n if (\n ((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n (warningConfig === 'always' && !instance._ngModelWarningSent)\n ) {\n console.warn(ngModelWarning(name));\n type._ngModelWarningSentOnce = true;\n instance._ngModelWarningSent = true;\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.dev/license\n */\n\nimport {\n AfterViewInit,\n computed,\n Directive,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n Optional,\n Provider,\n Self,\n signal,\n untracked,\n ɵWritable as Writable,\n} from '@angular/core';\n\nimport {AbstractControl, FormHooks} from '../model/abstract_model';\nimport {FormControl} from '../model/form_control';\nimport {FormGroup} from '../model/form_group';\nimport {\n composeAsyncValidators,\n composeValidators,\n NG_ASYNC_VALIDATORS,\n NG_VALIDATORS,\n} from '../validators';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {NgControl} from './ng_control';\nimport {NgModel} from './ng_model';\nimport {NgModelGroup} from './ng_model_group';\nimport {\n CALL_SET_DISABLED_STATE,\n SetDisabledStateOption,\n setUpControl,\n setUpFormContainer,\n syncPendingControls,\n} from './shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nconst formDirectiveProvider: Provider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgForm),\n};\n\nconst resolvedPromise = (() => Promise.resolve())();\n\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags. You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful. Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n * <input name=\"one\" ngModel> <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * ### Native DOM validation UI\n *\n * In order to prevent the native DOM form validation UI from interfering with Angular's form\n * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever\n * `FormModule` or `ReactiveFormModule` are imported into the application.\n * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the\n * `ngNativeValidate` attribute to the `<form>` element:\n *\n * ```html\n * <form ngNativeValidate>\n * ...\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n providers: [formDirectiveProvider],\n host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n outputs: ['ngSubmit'],\n exportAs: 'ngForm',\n})\nexport class NgForm extends ControlContainer implements Form, AfterViewInit {\n /**\n * @description\n * Returns whether the form submission has been triggered.\n */\n get submitted(): boolean {\n return untracked(this.submittedReactive);\n }\n /** @internal */\n readonly _submitted = computed(() => this.submittedReactive());\n private readonly submittedReactive = signal(false);\n\n private _directives = new Set<NgModel>();\n\n /**\n * @description\n * The `FormGroup` instance created for this form.\n */\n form: FormGroup;\n\n /**\n * @description\n * Event emitter for the \"ngSubmit\" event\n */\n ngSubmit = new EventEmitter();\n\n /**\n * @description\n * Tracks options for the `NgForm` instance.\n *\n * **updateOn**: Sets the default `updateOn` value for all child `NgModels` below it\n * unless explicitly set by a child `NgModel` using `ngModelOptions`). Defaults to 'change'.\n * Possible values: `'change'` | `'blur'` | `'submit'`.\n *\n */\n // TODO(issue/24571): remove '!'.\n @Input('ngFormOptions') options!: {updateOn?: FormHooks};\n\n constructor(\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n @Optional()\n @Inject(CALL_SET_DISABLED_STATE)\n private callSetDisabledState?: SetDisabledStateOption,\n ) {\n super();\n this.form = new FormGroup(\n {},\n composeValidators(validators),\n composeAsyncValidators(asyncValidators),\n );\n }\n\n /** @nodoc */\n ngAfterViewInit() {\n this._setUpdateStrategy();\n }\n\n /**\n * @description\n * The directive instance.\n */\n override get formDirective(): Form {\n return this;\n }\n\n /**\n * @description\n * The internal `FormGroup` instance.\n */\n override get control(): FormGroup {\n return this.form;\n }\n\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it is always an empty array.\n */\n override get path(): string[] {\n return [];\n }\n\n /**\n * @description\n * Returns a map of the controls in this group.\n */\n get controls(): {[key: string]: AbstractControl} {\n return this.form.controls;\n }\n\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `NgModel` directive instance.\n */\n addControl(dir: NgModel): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n (dir as Writable<NgModel>).control = <FormControl>(\n container.registerControl(dir.name, dir.control)\n );\n setUpControl(dir.control, dir, this.callSetDisabledState);\n dir.control.updateValueAndValidity({emitEvent: false});\n this._directives.add(dir);\n });\n }\n\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n *\n * @param dir The `NgModel` directive instance.\n */\n getControl(dir: NgModel): FormControl {\n return <FormControl>this.form.get(dir.path);\n }\n\n /**\n * @description\n * Removes the `NgModel` instance from the internal list of directives\n *\n * @param dir The `NgModel` directive instance.\n */\n removeControl(dir: NgModel): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n this._directives.delete(dir);\n });\n }\n\n /**\n * @description\n * Adds a new `NgModelGroup` directive instance to the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n addFormGroup(dir: NgModelGroup): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n const group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({emitEvent: false});\n });\n }\n\n /**\n * @description\n * Removes the `NgModelGroup` directive instance from the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n removeFormGroup(dir: NgModelGroup): void {\n resolvedPromise.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n }\n\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n getFormGroup(dir: NgModelGroup): FormGroup {\n return <FormGroup>this.form.get(dir.path);\n }\n\n /**\n * Sets the new value for the provided `NgControl` directive.\n *\n * @param dir The `NgControl` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir: NgControl, value: any): void {\n resolvedPromise.then(() => {\n const ctrl = <FormControl>this.form.get(dir.path!);\n ctrl.setValue(value);\n });\n }\n\n /**\n * @description\n * Sets the value for this `FormGroup`.\n *\n * @param value The new value\n */\n setValue(value: {[key: string]: any}): void {\n this.control.setValue(value);\n }\n\n /**\n * @description\n * Method called when the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event: Event): boolean {\n this.submittedReactive.set(true);\n syncPendingControls(this.form, this._directives);\n this.ngSubmit.emit($event);\n // Forms with `method=\"dialog\"` have some special behavior\n // that won't reload the page and that shouldn't be prevented.\n return ($event?.target as HTMLFormElement | null)?.method === 'dialog';\n }\n\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset(): void {\n this.resetForm();\n }\n\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value: any = undefined): void {\n this.form.reset(value);\n this.submittedReactive.set(false);\n }\n\n private _setUpdateStrategy() {\n if (this.options && this.options.updateOn != null) {\n this.form._updateOn = this.options.updateOn;\n }\n }\n\n private _findContainer(path: string[]): FormGroup {\n path.pop();\n return path.length ? <FormGroup>this.form.get(path) : this.form;\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.dev/license\n */\n\nexport function removeListItem<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) list.splice(index, 1);\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.dev/license\n */\n\nimport {ɵWritable as Writable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from '../directives/validators';\nimport {removeListItem} from '../util';\n\nimport {\n AbstractControl,\n AbstractControlOptions,\n isOptionsObj,\n pickAsyncValidators,\n pickValidators,\n} from './abstract_model';\n\n/**\n * FormControlState is a boxed form value. It is an object with a `value` key and a `disabled` key.\n *\n * @publicApi\n */\nexport interface FormControlState<T> {\n value: T;\n disabled: boolean;\n}\n\n/**\n * Interface for options provided to a `FormControl`.\n *\n * This interface extends all options from {@link AbstractControlOptions}, plus some options\n * unique to `FormControl`.\n *\n * @publicApi\n */\nexport interface FormControlOptions extends AbstractControlOptions {\n /**\n * @description\n * Whether to use the initial value used to construct the `FormControl` as its default value\n * as well. If this option is false or not provided, the default value of a FormControl is `null`.\n * When a FormControl is reset without an explicit value, its value reverts to\n * its default value.\n */\n nonNullable?: boolean;\n\n /**\n * @deprecated Use `nonNullable` instead.\n */\n initialValueIsDefault?: boolean;\n}\n\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the four fundamental building blocks of Angular forms, along with\n * `FormGroup`, `FormArray` and `FormRecord`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events.\n *\n * `FormControl` takes a single generic argument, which describes the type of its value. This\n * argument always implicitly includes `null` because the control can be reset. To change this\n * behavior, set `nonNullable` or see the usage notes below.\n *\n * See [usage examples below](#usage-notes).\n *\n * @see {@link AbstractControl}\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @publicApi\n *\n * @overriddenImplementation ɵFormControlCtor\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value); // 'some value'\n * ```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value); // 'n/a'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a synchronous validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value); // ''\n * console.log(control.status); // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n * validators: Validators.required,\n * asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### The single type argument\n *\n * `FormControl` accepts a generic argument, which describes the type of its value.\n * In most cases, this argument will be inferred.\n *\n * If you are initializing the control to `null`, or you otherwise wish to provide a\n * wider type, you may specify the argument explicitly:\n *\n * ```\n * let fc = new FormControl<string|null>(null);\n * fc.setValue('foo');\n * ```\n *\n * You might notice that `null` is always added to the type of the control.\n * This is because the control will become `null` if you call `reset`. You can change\n * this behavior by setting `{nonNullable: true}`.\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to a specific value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control to its initial value\n *\n * If you wish to always reset the control to its initial value (instead of null),\n * you can pass the `nonNullable` option:\n *\n * ```\n * const control = new FormControl('Nancy', {nonNullable: true});\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset();\n *\n * console.log(control.value); // 'Nancy'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n * ```\n */\nexport interface FormControl<TValue = any> extends AbstractControl<TValue> {\n /**\n * The default value of this FormControl, used whenever the control is reset without an explicit\n * value. See {@link FormControlOptions#nonNullable} for more information on configuring\n * a default value.\n */\n readonly defaultValue: TValue;\n\n /** @internal */\n _onChange: Function[];\n\n /**\n * This field holds a pending value that has not yet been applied to the form's value.\n * @internal\n */\n _pendingValue: TValue;\n\n /** @internal */\n _pendingChange: boolean;\n\n /**\n * Sets a new value for the form control.\n *\n * @param value The new value for the control.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * * `emitModelToViewChange`: When true or not supplied (the default), each change triggers an\n * `onChange` event to\n * update the view.\n * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n * `ngModelChange`\n * event to update the model.\n *\n */\n setValue(\n value: TValue,\n options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n emitModelToViewChange?: boolean;\n emitViewToModelChange?: boolean;\n },\n ): void;\n\n /**\n * Patches the value of a control.\n *\n * This function is functionally the same as {@link FormControl#setValue setValue} at this level.\n * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and\n * `FormArrays`, where it does behave differently.\n *\n * @see {@link FormControl#setValue} for options\n */\n patchValue(\n value: TValue,\n options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n emitModelToViewChange?: boolean;\n emitViewToModelChange?: boolean;\n },\n ): void;\n\n /**\n * Resets the form control, marking it `pristine` and `untouched`, and resetting\n * the value. The new value will be the provided value (if passed), `null`, or the initial value\n * if `nonNullable` was set in the constructor via {@link FormControlOptions}.\n *\n * ```ts\n * // By default, the control will reset to null.\n * const dog = new FormControl('spot');\n * dog.reset(); // dog.value is null\n *\n * // If this flag is set, the control will instead reset to the initial value.\n * const cat = new FormControl('tabby', {nonNullable: true});\n * cat.reset(); // cat.value is \"tabby\"\n *\n * // A value passed to reset always takes precedence.\n * const fish = new FormControl('finn', {nonNullable: true});\n * fish.reset('bubble'); // fish.value is \"bubble\"\n * ```\n *\n * @param formState Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n *\n */\n reset(\n formState?: TValue | FormControlState<TValue>,\n options?: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n },\n ): void;\n\n /**\n * For a simple FormControl, the raw value is equivalent to the value.\n */\n getRawValue(): TValue;\n\n /**\n * @internal\n */\n _updateValue(): void;\n\n /**\n * @internal\n */\n _anyControls(condition: (c: AbstractControl) => boolean): boolean;\n\n /**\n * @internal\n */\n _allControlsDisabled(): boolean;\n\n /**\n * Register a listener for change events.\n *\n * @param fn The method that is called when the value changes\n */\n registerOnChange(fn: Function): void;\n\n /**\n * Internal function to unregister a change events listener.\n * @internal\n */\n _unregisterOnChange(fn: (value?: any, emitModelEvent?: boolean) => void): void;\n\n /**\n * Register a listener for disabled events.\n *\n * @param fn The method that is called when the disabled status changes.\n */\n registerOnDisabledChange(fn: (isDisabled: boolean) => void): void;\n\n /**\n * Internal function to unregister a disabled event listener.\n * @internal\n */\n _unregisterOnDisabledChange(fn: (isDisabled: boolean) => void): void;\n\n /**\n * @internal\n */\n _forEachChild(cb: (c: AbstractControl) => void): void;\n\n /** @internal */\n _syncPendingControls(): boolean;\n}\n\n// This internal interface is present to avoid a naming clash, resulting in the wrong `FormControl`\n// symbol being used.\ntype FormControlInterface<TValue = any> = FormControl<TValue>;\n\n/**\n * Various available constructors for `FormControl`.\n * Do not use this interface directly. Instead, use `FormControl`:\n * ```\n * const fc = new FormControl('foo');\n * ```\n * This symbol is prefixed with ɵ to make plain that it is an internal symbol.\n */\nexport interface ɵFormControlCtor {\n /**\n * Construct a FormControl with no initial value or validators.\n */\n new (): FormControl<any>;\n\n /**\n * Creates a new `FormControl` instance.\n *\n * @param formState Initializes the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or a `FormControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n */\n new <T = any>(\n value: FormControlState<T> | T,\n opts: FormControlOptions & {nonNullable: true},\n ): FormControl<T>;\n\n /**\n * @deprecated Use `nonNullable` instead.\n */\n new <T = any>(\n value: FormControlState<T> | T,\n opts: FormControlOptions & {\n initialValueIsDefault: true;\n },\n ): FormControl<T>;\n\n /**\n * @deprecated When passing an `options` argument, the `asyncValidator` argument has no effect.\n */\n new <T = any>(\n value: FormControlState<T> | T,\n opts: FormControlOptions,\n asyncValidator: AsyncValidatorFn | AsyncValidatorFn[],\n ): FormControl<T | null>;\n\n new <T = any>(\n value: FormControlState<T> | T,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): FormControl<T | null>;\n\n /**\n * The presence of an explicit `prototype` property provides backwards-compatibility for apps that\n * manually inspect the prototype chain.\n */\n prototype: FormControl<any>;\n}\n\nfunction isFormControlState(formState: unknown): formState is FormControlState<unknown> {\n return (\n typeof formState === 'object' &&\n formState !== null &&\n Object.keys(formState).length === 2 &&\n 'value' in formState &&\n 'disabled' in formState\n );\n}\n\nexport const FormControl: ɵFormControlCtor = class FormControl<TValue = any>\n extends AbstractControl<TValue>\n implements FormControlInterface<TValue>\n{\n /** @publicApi */\n public readonly defaultValue: TValue = null as unknown as TValue;\n\n /** @internal */\n _onChange: Array<Function> = [];\n\n /** @internal */\n _pendingValue!: TValue;\n\n /** @internal */\n _pendingChange: boolean = false;\n\n constructor(\n // formState and defaultValue will only be null if T is nullable\n formState: FormControlState<TValue> | TValue = null as unknown as TValue,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n this._applyFormState(formState);\n this._setUpdateStrategy(validatorOrOpts);\n this._initObservables();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`.\n // The status should be broadcasted via the `statusChanges` observable, so we set\n // `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator,\n });\n if (\n isOptionsObj(validatorOrOpts) &&\n (validatorOrOpts.nonNullable || validatorOrOpts.initialValueIsDefault)\n ) {\n if (isFormControlState(formState)) {\n this.defaultValue = formState.value;\n } else {\n this.defaultValue = formState;\n }\n }\n }\n\n override setValue(\n value: TValue,\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n emitModelToViewChange?: boolean;\n emitViewToModelChange?: boolean;\n } = {},\n ): void {\n (this as Writable<this>).value = this._pendingValue = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach((changeFn) =>\n changeFn(this.value, options.emitViewToModelChange !== false),\n );\n }\n this.updateValueAndValidity(options);\n }\n\n override patchValue(\n value: TValue,\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n emitModelToViewChange?: boolean;\n emitViewToModelChange?: boolean;\n } = {},\n ): void {\n this.setValue(value, options);\n }\n\n override reset(\n formState: TValue | FormControlState<TValue> = this.defaultValue,\n options: {onlySelf?: boolean; emitEvent?: boolean} = {},\n ): void {\n this._applyFormState(formState);\n this.markAsPristine(options);\n this.markAsUntouched(options);\n this.setValue(this.value, options);\n this._pendingChange = false;\n }\n\n /** @internal */\n override _updateValue(): void {}\n\n /** @internal */\n override _anyControls(condition: (c: AbstractControl) => boolean): boolean {\n return false;\n }\n\n /** @internal */\n override _allControlsDisabled(): boolean {\n return this.disabled;\n }\n\n registerOnChange(fn: Function): void {\n this._onChange.push(fn);\n }\n\n /** @internal */\n _unregisterOnChange(fn: (value?: any, emitModelEvent?: boolean) => void): void {\n removeListItem(this._onChange, fn);\n }\n\n registerOnDisabledChange(fn: (isDisabled: boolean) => void): void {\n this._onDisabledChange.push(fn);\n }\n\n /** @internal */\n _unregisterOnDisabledChange(fn: (isDisabled: boolean) => void): void {\n removeListItem(this._onDisabledChange, fn);\n }\n\n /** @internal */\n override _forEachChild(cb: (c: AbstractControl) => void): void {}\n\n /** @internal */\n override _syncPendingControls(): boolean {\n if (this.updateOn === 'submit') {\n if (this._pendingDirty) this.markAsDirty();\n if (this._pendingTouched) this.markAsTouched();\n if (this._pendingChange) {\n this.setValue(this._pendingValue, {onlySelf: true, emitModelToViewChange: false});\n return true;\n }\n }\n return false;\n }\n\n private _applyFormState(formState: FormControlState<TValue> | TValue) {\n if (isFormControlState(formState)) {\n (this as Writable<this>).value = this._pendingValue = formState.value;\n formState.disabled\n ? this.disable({onlySelf: true, emitEvent: false})\n : this.enable({onlySelf: true, emitEvent: false});\n } else {\n (this as Writable<this>).value = this._pendingValue = formState;\n }\n }\n};\n\ninterface UntypedFormControlCtor {\n new (): UntypedFormControl;\n\n new (\n formState?: any,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): UntypedFormControl;\n\n /**\n * The presence of an explicit `prototype` property provides backwards-compatibility for apps that\n * manually inspect the prototype chain.\n */\n prototype: FormControl<any>;\n}\n\n/**\n * UntypedFormControl is a non-strongly-typed version of `FormControl`.\n */\nexport type UntypedFormControl = FormControl<any>;\n\nexport const UntypedFormControl: UntypedFormControlCtor = FormControl;\n\n/**\n * @description\n * Asserts that the given control is an instance of `FormControl`\n *\n * @publicApi\n */\nexport const isFormControl = (control: unknown): control is FormControl =>\n control instanceof FormControl;\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.dev/license\n */\n\nimport {Directive, OnDestroy, OnInit} from '@angular/core';\n\nimport {FormGroup} from '../model/form_group';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {controlPath} from './shared';\n\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\n@Directive()\nexport class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {\n /**\n * @description\n * The parent control for the group\n *\n * @internal\n */\n // TODO(issue/24571): remove '!'.\n _parent!: ControlContainer;\n\n /** @nodoc */\n ngOnInit(): void {\n this._checkParentType();\n // Register the group with its parent group.\n this.formDirective!.addFormGroup(this);\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n if (this.formDirective) {\n // Remove the group from its parent group.\n this.formDirective.removeFormGroup(this);\n }\n }\n\n /**\n * @description\n * The `FormGroup` bound to this directive.\n */\n override get control(): FormGroup {\n return this.formDirective!.getFormGroup(this);\n }\n\n /**\n * @description\n * The path to this group from the top-level directive.\n */\n override get path(): string[] {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n override get formDirective(): Form | null {\n return this._parent ? this._parent.formDirective : null;\n }\n\n /** @internal */\n _checkParentType(): void {}\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.dev/license\n */\n\nimport {\n booleanAttribute,\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n forwardRef,\n Host,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n Provider,\n Self,\n SimpleChanges,\n} from '@angular/core';\n\nimport {FormHooks} from '../model/abstract_model';\nimport {FormControl} from '../model/form_control';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\nimport {NgForm} from './ng_form';\nimport {NgModelGroup} from './ng_model_group';\nimport {\n CALL_SET_DISABLED_STATE,\n controlPath,\n isPropertyUpdated,\n selectValueAccessor,\n SetDisabledStateOption,\n setUpControl,\n} from './shared';\nimport {\n formGroupNameException,\n missingNameException,\n modelParentException,\n} from './template_driven_errors';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nconst formControlBinding: Provider = {\n provide: NgControl,\n useExisting: forwardRef(() => NgModel),\n};\n\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have an old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel`s have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve())();\n\n/**\n * @description\n * Creates a `FormControl` instance from a [domain\n * model](https://en.wikipedia.org/wiki/Domain_model) and binds it to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the domain model's value in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-in-a-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like the validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You can then access the control using the directive's `control` property.\n * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control\n * for direct access. See a full list of properties directly available in\n * `AbstractControlDirective`.\n *\n * @see {@link RadioControlValueAccessor}\n * @see {@link SelectControlValueAccessor}\n *\n * @usageNotes\n *\n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,\n * as the parent form syncs the value for you. You access its properties by exporting it into a\n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where\n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n *\n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Using a standalone ngModel within a group\n *\n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n * <input name=\"login\" ngModel placeholder=\"Login\">\n * <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n *\n * ### Setting the ngModel `name` attribute through options\n *\n * The following example shows you an alternate way to set the name attribute. Here,\n * an attribute identified as name is used within a custom form control component. To still be able\n * to specify the NgModel's name, you must specify it using the `ngModelOptions` input instead.\n *\n * ```html\n * <form>\n * <my-custom-form-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n * </my-custom-form-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding],\n exportAs: 'ngModel',\n})\nexport class NgModel extends NgControl implements OnChanges, OnDestroy {\n public override readonly control: FormControl = new FormControl();\n\n // At runtime we coerce arbitrary values assigned to the \"disabled\" input to a \"boolean\".\n // This is not reflected in the type of the property because outside of templates, consumers\n // should only deal with booleans. In templates, a string is allowed for convenience and to\n // match the native \"disabled attribute\" semantics which can be observed on input elements.\n // This static member tells the compiler that values of type \"string\" can also be assigned\n // to the input in a template.\n /** @nodoc */\n static ngAcceptInputType_isDisabled: boolean | string;\n\n /** @internal */\n _registered = false;\n\n /**\n * Internal reference to the view model value.\n * @nodoc\n */\n viewModel: any;\n\n /**\n * @description\n * Tracks the name bound to the directive. If a parent form exists, it\n * uses this name as a key to retrieve this control's value.\n */\n @Input() override name: string = '';\n\n /**\n * @description\n * Tracks whether the control is disabled.\n */\n // TODO(issue/24571): remove '!'.\n @Input('disabled') isDisabled!: boolean;\n\n /**\n * @description\n * Tracks the value bound to this directive.\n */\n @Input('ngModel') model: any;\n\n /**\n * @description\n * Tracks the configuration options for this `ngModel` instance.\n *\n * **name**: An alternative to setting the name attribute on the form control element. See\n * the [example](api/forms/NgModel#using-ngmodel-on-a-standalone-control) for using `NgModel`\n * as a standalone control.\n *\n * **standalone**: When set to true, the `ngModel` will not register itself with its parent form,\n * and acts as if it's not in the form. Defaults to false. If no parent form exists, this option\n * has no effect.\n *\n * **updateOn**: Defines the event upon which the form control value and validity update.\n * Defaults to 'change'. Possible values: `'change'` | `'blur'` | `'submit'`.\n *\n */\n // TODO(issue/24571): remove '!'.\n @Input('ngModelOptions') options!: {name?: string; standalone?: boolean; updateOn?: FormHooks};\n\n /**\n * @description\n * Event emitter for producing the `ngModelChange` event after\n * the view model updates.\n */\n @Output('ngModelChange') update = new EventEmitter();\n\n constructor(\n @Optional() @Host() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n @Optional() @Inject(ChangeDetectorRef) private _changeDetectorRef?: ChangeDetectorRef | null,\n @Optional()\n @Inject(CALL_SET_DISABLED_STATE)\n private callSetDisabledState?: SetDisabledStateOption,\n ) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges) {\n this._checkForErrors();\n if (!this._registered || 'name' in changes) {\n if (this._registered) {\n this._checkName();\n if (this.formDirective) {\n // We can't call `formDirective.removeControl(this)`, because the `name` has already been\n // changed. We also can't reset the name temporarily since the logic in `removeControl`\n // is inside a promise and it won't run immediately. We work around it by giving it an\n // object with the same shape instead.\n const oldName = changes['name'].previousValue;\n this.formDirective.removeControl({name: oldName, path: this._getPath(oldName)});\n }\n }\n this._setUpControl();\n }\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n this.formDirective && this.formDirective.removeControl(this);\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n override get path(): string[] {\n return this._getPath(this.name);\n }\n\n /**\n * @description\n * The top-level directive for this control if present, otherwise null.\n */\n get formDirective(): any {\n return this._parent ? this._parent.formDirective : null;\n }\n\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value emitted by `ngModelChange`.\n */\n override viewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n\n private _setUpControl(): void {\n this._setUpdateStrategy();\n this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n this._registered = true;\n }\n\n private _setUpdateStrategy(): void {\n if (this.options && this.options.updateOn != null) {\n this.control._updateOn = this.options.updateOn;\n }\n }\n\n private _isStandalone(): boolean {\n return !this._parent || !!(this.options && this.options.standalone);\n }\n\n private _setUpStandalone(): void {\n setUpControl(this.control, this, this.callSetDisabledState);\n this.control.updateValueAndValidity({emitEvent: false});\n }\n\n private _checkForErrors(): void {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n }\n\n private _checkParentType(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (\n !(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective\n ) {\n throw formGroupNameException();\n } else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n throw modelParentException();\n }\n }\n }\n\n private _checkName(): void {\n if (this.options && this.options.name) this.name = this.options.name;\n\n if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw missingNameException();\n }\n }\n\n private _updateValue(value: any): void {\n resolvedPromise.then(() => {\n this.control.setValue(value, {emitViewToModelChange: false});\n this._changeDetectorRef?.markForCheck();\n });\n }\n\n private _updateDisabled(changes: SimpleChanges) {\n const disabledValue = changes['isDisabled'].currentValue;\n // checking for 0 to avoid breaking change\n const isDisabled = disabledValue !== 0 && booleanAttribute(disabledValue);\n\n resolvedPromise.then(() => {\n if (isDisabled && !this.control.disabled) {\n this.control.disable();\n } else if (!isDisabled && this.control.disabled) {\n this.control.enable();\n }\n\n this._changeDetectorRef?.markForCheck();\n });\n }\n\n private _getPath(controlName: string): string[] {\n return this._parent ? controlPath(controlName, this._parent) : [controlName];\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.dev/license\n */\n\nimport {Directive} from '@angular/core';\n\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\n@Directive({\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: {'novalidate': ''},\n})\nexport class ɵNgNoValidate {}\n\nexport {ɵNgNoValidate as NgNoValidate};\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.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n forwardRef,\n inject,\n Injectable,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Provider,\n Renderer2,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nimport {\n BuiltInControlValueAccessor,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from './control_value_accessor';\nimport {NgControl} from './ng_control';\nimport {CALL_SET_DISABLED_STATE, setDisabledStateDefault} from './shared';\n\nconst RADIO_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioControlValueAccessor),\n multi: true,\n};\n\nfunction throwNameError() {\n throw new RuntimeError(\n RuntimeErrorCode.NAME_AND_FORM_CONTROL_NAME_MUST_MATCH,\n `\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n `,\n );\n}\n\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\n@Injectable({providedIn: 'root'})\nexport class RadioControlRegistry {\n private _accessors: any[] = [];\n\n /**\n * @description\n * Adds a control to the internal registry. For internal use only.\n */\n add(control: NgControl, accessor: RadioControlValueAccessor) {\n this._accessors.push([control, accessor]);\n }\n\n /**\n * @description\n * Removes a control from the internal registry. For internal use only.\n */\n remove(accessor: RadioControlValueAccessor) {\n for (let i = this._accessors.length - 1; i >= 0; --i) {\n if (this._accessors[i][1] === accessor) {\n this._accessors.splice(i, 1);\n return;\n }\n }\n }\n\n /**\n * @description\n * Selects a radio button. For internal use only.\n */\n select(accessor: RadioControlValueAccessor) {\n this._accessors.forEach((c) => {\n if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n c[1].fireUncheck(accessor.value);\n }\n });\n }\n\n private _isSameGroup(\n controlPair: [NgControl, RadioControlValueAccessor],\n accessor: RadioControlValueAccessor,\n ): boolean {\n if (!controlPair[0].control) return false;\n return (\n controlPair[0]._parent === accessor._control._parent && controlPair[1].name === accessor.name\n );\n }\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n host: {'(change)': 'onChange()', '(blur)': 'onTouched()'},\n providers: [RADIO_VALUE_ACCESSOR],\n})\nexport class RadioControlValueAccessor\n extends BuiltInControlValueAccessor\n implements ControlValueAccessor, OnDestroy, OnInit\n{\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _state!: boolean;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _control!: NgControl;\n /** @internal */\n // TODO(issue/24571): remove '!'.\n _fn!: Function;\n\n private setDisabledStateFired = false;\n\n /**\n * The registered callback function called when a change event occurs on the input element.\n * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n * to override the `onChange` function (which expects 1 argument) in the parent\n * `BaseControlValueAccessor` class.\n * @nodoc\n */\n override onChange = () => {};\n\n /**\n * @description\n * Tracks the name of the radio input element.\n */\n // TODO(issue/24571): remove '!'.\n @Input() name!: string;\n\n /**\n * @description\n * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n */\n // TODO(issue/24571): remove '!'.\n @Input() formControlName!: string;\n\n /**\n * @description\n * Tracks the value of the radio input element\n */\n @Input() value: any;\n\n private callSetDisabledState =\n inject(CALL_SET_DISABLED_STATE, {optional: true}) ?? setDisabledStateDefault;\n\n constructor(\n renderer: Renderer2,\n elementRef: ElementRef,\n private _registry: RadioControlRegistry,\n private _injector: Injector,\n ) {\n super(renderer, elementRef);\n }\n\n /** @nodoc */\n ngOnInit(): void {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n this._registry.remove(this);\n }\n\n /**\n * Sets the \"checked\" property value on the radio input element.\n * @nodoc\n */\n writeValue(value: any): void {\n this._state = value === this.value;\n this.setProperty('checked', this._state);\n }\n\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n override registerOnChange(fn: (_: any) => {}): void {\n this._fn = fn;\n this.onChange = () => {\n fn(this.value);\n this._registry.select(this);\n };\n }\n\n /** @nodoc */\n override setDisabledState(isDisabled: boolean): void {\n /**\n * `setDisabledState` is supposed to be called whenever the disabled state of a control changes,\n * including upon control creation. However, a longstanding bug caused the method to not fire\n * when an *enabled* control was attached. This bug was fixed in v15 in #47576.\n *\n * This had a side effect: previously, it was possible to instantiate a reactive form control\n * with `[attr.disabled]=true`, even though the corresponding control was enabled in the\n * model. This resulted in a mismatch between the model and the DOM. Now, because\n * `setDisabledState` is always called, the value in the DOM will be immediately overwritten\n * with the \"correct\" enabled value.\n *\n * However, the fix also created an exceptional case: radio buttons. Because Reactive Forms\n * models the entire group of radio buttons as a single `FormControl`, there is no way to\n * control the disabled state for individual radios, so they can no longer be configured as\n * disabled. Thus, we keep the old behavior for radio buttons, so that `[attr.disabled]`\n * continues to work. Specifically, we drop the first call to `setDisabledState` if `disabled`\n * is `false`, and we are not in legacy mode.\n */\n if (\n this.setDisabledStateFired ||\n isDisabled ||\n this.callSetDisabledState === 'whenDisabledForLegacyCode'\n ) {\n this.setProperty('disabled', isDisabled);\n }\n this.setDisabledStateFired = true;\n }\n\n /**\n * Sets the \"value\" on the radio input element and unchecks it.\n *\n * @param value\n */\n fireUncheck(value: any): void {\n this.writeValue(value);\n }\n\n private _checkName(): void {\n if (\n this.name &&\n this.formControlName &&\n this.name !== this.formControlName &&\n (typeof ngDevMode === 'undefined' || ngDevMode)\n ) {\n throwNameError();\n }\n if (!this.name && this.formControlName) this.name = this.formControlName;\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.dev/license\n */\n\nimport {\n Directive,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n Provider,\n Self,\n SimpleChanges,\n} from '@angular/core';\n\nimport {FormControl} from '../../model/form_control';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {disabledAttrWarning} from '../reactive_errors';\nimport {\n _ngModelWarning,\n CALL_SET_DISABLED_STATE,\n cleanUpControl,\n isPropertyUpdated,\n selectValueAccessor,\n SetDisabledStateOption,\n setUpControl,\n} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nexport const NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken(\n ngDevMode ? 'NgModelWithFormControlWarning' : '',\n);\n\nconst formControlBinding: Provider = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlDirective),\n};\n\n/**\n * @description\n * Synchronizes a standalone `FormControl` instance to a form control element.\n *\n * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives was deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see {@link FormControl}\n * @see {@link AbstractControl}\n *\n * @usageNotes\n *\n * The following example shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})\nexport class FormControlDirective extends NgControl implements OnChanges, OnDestroy {\n /**\n * Internal reference to the view model value.\n * @nodoc\n */\n viewModel: any;\n\n /**\n * @description\n * Tracks the `FormControl` instance bound to the directive.\n */\n // TODO(issue/24571): remove '!'.\n @Input('formControl') form!: FormControl;\n\n /**\n * @description\n * Triggers a warning in dev mode that this input should not be used with reactive forms.\n */\n @Input('disabled')\n set isDisabled(isDisabled: boolean) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(disabledAttrWarning);\n }\n }\n\n // TODO(kara): remove next 4 properties once deprecation period is over\n\n /** @deprecated as of v6 */\n @Input('ngModel') model: any;\n\n /** @deprecated as of v6 */\n @Output('ngModelChange') update = new EventEmitter();\n\n /**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlDirective. Used to support warning config of \"once\".\n *\n * @internal\n */\n static _ngModelWarningSentOnce = false;\n\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n _ngModelWarningSent = false;\n\n constructor(\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n @Optional()\n @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING)\n private _ngModelWarningConfig: string | null,\n @Optional()\n @Inject(CALL_SET_DISABLED_STATE)\n private callSetDisabledState?: SetDisabledStateOption,\n ) {\n super();\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges): void {\n if (this._isControlChanged(changes)) {\n const previousForm = changes['form'].previousValue;\n if (previousForm) {\n cleanUpControl(previousForm, this, /* validateControlPresenceOnChange */ false);\n }\n setUpControl(this.form, this, this.callSetDisabledState);\n this.form.updateValueAndValidity({emitEvent: false});\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n }\n this.form.setValue(this.model);\n this.viewModel = this.model;\n }\n }\n\n /** @nodoc */\n ngOnDestroy() {\n if (this.form) {\n cleanUpControl(this.form, this, /* validateControlPresenceOnChange */ false);\n }\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n override get path(): string[] {\n return [];\n }\n\n /**\n * @description\n * The `FormControl` bound to this directive.\n */\n override get control(): FormControl {\n return this.form;\n }\n\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n override viewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n\n private _isControlChanged(changes: {[key: string]: any}): boolean {\n return changes.hasOwnProperty('form');\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.dev/license\n */\n\nimport {\n computed,\n Directive,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n Provider,\n Self,\n signal,\n SimpleChanges,\n untracked,\n ɵWritable as Writable,\n} from '@angular/core';\n\nimport {FormArray} from '../../model/form_array';\nimport {FormControl, isFormControl} from '../../model/form_control';\nimport {FormGroup} from '../../model/form_group';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {ControlContainer} from '../control_container';\nimport {Form} from '../form_interface';\nimport {missingFormException} from '../reactive_errors';\nimport {\n CALL_SET_DISABLED_STATE,\n cleanUpControl,\n cleanUpFormContainer,\n cleanUpValidators,\n removeListItem,\n SetDisabledStateOption,\n setUpControl,\n setUpFormContainer,\n setUpValidators,\n syncPendingControls,\n} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {FormControlName} from './form_control_name';\nimport {FormArrayName, FormGroupName} from './form_group_name';\nimport {FormResetEvent, FormSubmittedEvent} from '../../model/abstract_model';\n\nconst formDirectiveProvider: Provider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupDirective),\n};\n\n/**\n * @description\n *\n * Binds an existing `FormGroup` or `FormRecord` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`/`FormRecord`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see {@link AbstractControl}\n *\n * @usageNotes\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n selector: '[formGroup]',\n providers: [formDirectiveProvider],\n host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n exportAs: 'ngForm',\n})\nexport class FormGroupDirective extends ControlContainer implements Form, OnChanges, OnDestroy {\n /**\n * @description\n * Reports whether the form submission has been triggered.\n */\n get submitted() {\n return untracked(this._submittedReactive);\n }\n // TODO(atscott): Remove once invalid API usage is cleaned up internally\n private set submitted(value: boolean) {\n this._submittedReactive.set(value);\n }\n /** @internal */\n readonly _submitted = computed(() => this._submittedReactive());\n private readonly _submittedReactive = signal(false);\n\n /**\n * Reference to an old form group input value, which is needed to cleanup\n * old instance in case it was replaced with a new one.\n */\n private _oldForm: FormGroup | undefined;\n\n /**\n * Callback that should be invoked when controls in FormGroup or FormArray collection change\n * (added or removed). This callback triggers corresponding DOM updates.\n */\n private readonly _onCollectionChange = () => this._updateDomValue();\n\n /**\n * @description\n * Tracks the list of added `FormControlName` instances\n */\n directives: FormControlName[] = [];\n\n /**\n * @description\n * Tracks the `FormGroup` bound to this directive.\n */\n @Input('formGroup') form: FormGroup = null!;\n\n /**\n * @description\n * Emits an event when the form submission has been triggered.\n */\n @Output() ngSubmit = new EventEmitter();\n\n constructor(\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n @Optional()\n @Inject(CALL_SET_DISABLED_STATE)\n private callSetDisabledState?: SetDisabledStateOption,\n ) {\n super();\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges): void {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n this._oldForm = this.form;\n }\n }\n\n /** @nodoc */\n ngOnDestroy() {\n if (this.form) {\n cleanUpValidators(this.form, this);\n\n // Currently the `onCollectionChange` callback is rewritten each time the\n // `_registerOnCollectionChange` function is invoked. The implication is that cleanup should\n // happen *only* when the `onCollectionChange` callback was set by this directive instance.\n // Otherwise it might cause overriding a callback of some other directive instances. We should\n // consider updating this logic later to make it similar to how `onChange` callbacks are\n // handled, see https://github.com/angular/angular/issues/39732 for additional info.\n if (this.form._onCollectionChange === this._onCollectionChange) {\n this.form._registerOnCollectionChange(() => {});\n }\n }\n }\n\n /**\n * @description\n * Returns this directive's instance.\n */\n override get formDirective(): Form {\n return this;\n }\n\n /**\n * @description\n * Returns the `FormGroup` bound to this directive.\n */\n override get control(): FormGroup {\n return this.form;\n }\n\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it always an empty array.\n */\n override get path(): string[] {\n return [];\n }\n\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `FormControlName` directive instance.\n */\n addControl(dir: FormControlName): FormControl {\n const ctrl: any = this.form.get(dir.path);\n setUpControl(ctrl, dir, this.callSetDisabledState);\n ctrl.updateValueAndValidity({emitEvent: false});\n this.directives.push(dir);\n return ctrl;\n }\n\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n *\n * @param dir The `FormControlName` directive instance.\n */\n getControl(dir: FormControlName): FormControl {\n return <FormControl>this.form.get(dir.path);\n }\n\n /**\n * @description\n * Removes the `FormControlName` instance from the internal list of directives\n *\n * @param dir The `FormControlName` directive instance.\n */\n removeControl(dir: FormControlName): void {\n cleanUpControl(dir.control || null, dir, /* validateControlPresenceOnChange */ false);\n removeListItem(this.directives, dir);\n }\n\n /**\n * Adds a new `FormGroupName` directive instance to the form.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n addFormGroup(dir: FormGroupName): void {\n this._setUpFormContainer(dir);\n }\n\n /**\n * Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the\n * view.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n removeFormGroup(dir: FormGroupName): void {\n this._cleanUpFormContainer(dir);\n }\n\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n *\n * @param dir The `FormGroupName` directive instance.\n */\n getFormGroup(dir: FormGroupName): FormGroup {\n return <FormGroup>this.form.get(dir.path);\n }\n\n /**\n * Performs the necessary setup when a `FormArrayName` directive instance is added to the view.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n addFormArray(dir: FormArrayName): void {\n this._setUpFormContainer(dir);\n }\n\n /**\n * Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the\n * view.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n removeFormArray(dir: FormArrayName): void {\n this._cleanUpFormContainer(dir);\n }\n\n /**\n * @description\n * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n getFormArray(dir: FormArrayName): FormArray {\n return <FormArray>this.form.get(dir.path);\n }\n\n /**\n * Sets the new value for the provided `FormControlName` directive.\n *\n * @param dir The `FormControlName` directive instance.\n * @param value The new value for the directive's control.\n */\n updateModel(dir: FormControlName, value: any): void {\n const ctrl = <FormControl>this.form.get(dir.path);\n ctrl.setValue(value);\n }\n\n /**\n * @description\n * Method called with the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n onSubmit($event: Event): boolean {\n this._submittedReactive.set(true);\n syncPendingControls(this.form, this.directives);\n this.ngSubmit.emit($event);\n this.form._events.next(new FormSubmittedEvent(this.control));\n\n // Forms with `method=\"dialog\"` have some special behavior that won't reload the page and that\n // shouldn't be prevented. Note that we need to null check the `event` and the `target`, because\n // some internal apps call this method directly with the wrong arguments.\n return ($event?.target as HTMLFormElement | null)?.method === 'dialog';\n }\n\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n onReset(): void {\n this.resetForm();\n }\n\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n resetForm(value: any = undefined): void {\n this.form.reset(value);\n this._submittedReactive.set(false);\n this.form._events.next(new FormResetEvent(this.form));\n }\n\n /** @internal */\n _updateDomValue() {\n this.directives.forEach((dir) => {\n const oldCtrl = dir.control;\n const newCtrl = this.form.get(dir.path);\n if (oldCtrl !== newCtrl) {\n // Note: the value of the `dir.control` may not be defined, for example when it's a first\n // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).\n cleanUpControl(oldCtrl || null, dir);\n\n // Check whether new control at the same location inside the corresponding `FormGroup` is an\n // instance of `FormControl` and perform control setup only if that's the case.\n // Note: we don't need to clear the list of directives (`this.directives`) here, it would be\n // taken care of in the `removeControl` method invoked when corresponding `formControlName`\n // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).\n if (isFormControl(newCtrl)) {\n setUpControl(newCtrl, dir, this.callSetDisabledState);\n (dir as Writable<FormControlName>).control = newCtrl;\n }\n }\n });\n\n this.form._updateTreeValidity({emitEvent: false});\n }\n\n private _setUpFormContainer(dir: FormArrayName | FormGroupName): void {\n const ctrl: any = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n // NOTE: this operation looks unnecessary in case no new validators were added in\n // `setUpFormContainer` call. Consider updating this code to match the logic in\n // `_cleanUpFormContainer` function.\n ctrl.updateValueAndValidity({emitEvent: false});\n }\n\n private _cleanUpFormContainer(dir: FormArrayName | FormGroupName): void {\n if (this.form) {\n const ctrl: any = this.form.get(dir.path);\n if (ctrl) {\n const isControlUpdated = cleanUpFormContainer(ctrl, dir);\n if (isControlUpdated) {\n // Run validity check only in case a control was updated (i.e. view validators were\n // removed) as removing view validators might cause validity to change.\n ctrl.updateValueAndValidity({emitEvent: false});\n }\n }\n }\n }\n\n private _updateRegistrations() {\n this.form._registerOnCollectionChange(this._onCollectionChange);\n if (this._oldForm) {\n this._oldForm._registerOnCollectionChange(() => {});\n }\n }\n\n private _updateValidators() {\n setUpValidators(this.form, this);\n if (this._oldForm) {\n cleanUpValidators(this._oldForm, this);\n }\n }\n\n private _checkFormPresent() {\n if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw missingFormException();\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.dev/license\n */\n\nimport {\n Directive,\n forwardRef,\n Host,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Provider,\n Self,\n SkipSelf,\n} from '@angular/core';\n\nimport {FormArray} from '../../model/form_array';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {arrayParentException, groupParentException} from '../reactive_errors';\nimport {controlPath} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {FormGroupDirective} from './form_group_directive';\n\nconst formGroupNameProvider: Provider = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupName),\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormGroup` or `FormRecord` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` or `FormRecord` to link, and\n * looks for a `FormGroup` or `FormRecord` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the `AbstractControl.get` method to access the\n * associated `FormGroup`\n *\n * ```ts\n * this.form.get('name');\n * ```\n *\n * ### Access individual controls in the group\n *\n * The following example uses the `AbstractControl.get` method to access\n * individual controls within the group using dot syntax.\n *\n * ```ts\n * this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n *\n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})\nexport class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n /**\n * @description\n * Tracks the name of the `FormGroup` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n * Accepts a name as a string or a number.\n * The name in the form of a string is useful for individual forms,\n * while the numerical form allows for form groups to be bound\n * to indices when iterating over groups in a `FormArray`.\n */\n @Input('formGroupName') override name: string | number | null = null;\n\n constructor(\n @Optional() @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n ) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n\n /** @internal */\n override _checkParentType(): void {\n if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw groupParentException();\n }\n }\n}\n\nexport const formArrayNameProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormArrayName),\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see {@link AbstractControl}\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})\nexport class FormArrayName extends ControlContainer implements OnInit, OnDestroy {\n /** @internal */\n _parent: ControlContainer;\n\n /**\n * @description\n * Tracks the name of the `FormArray` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n * Accepts a name as a string or a number.\n * The name in the form of a string is useful for individual forms,\n * while the numerical form allows for form arrays to be bound\n * to indices when iterating over arrays in a `FormArray`.\n */\n @Input('formArrayName') override name: string | number | null = null;\n\n constructor(\n @Optional() @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n ) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n }\n\n /**\n * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n * @throws If the directive does not have a valid parent.\n * @nodoc\n */\n ngOnInit(): void {\n this._checkParentType();\n this.formDirective!.addFormArray(this);\n }\n\n /**\n * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n * @nodoc\n */\n ngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n }\n\n /**\n * @description\n * The `FormArray` bound to this directive.\n */\n override get control(): FormArray {\n return this.formDirective!.getFormArray(this);\n }\n\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n override get formDirective(): FormGroupDirective | null {\n return this._parent ? <FormGroupDirective>this._parent.formDirective : null;\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n override get path(): string[] {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n }\n\n private _checkParentType(): void {\n if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw arrayParentException();\n }\n }\n}\n\nfunction _hasInvalidParent(parent: ControlContainer): boolean {\n return (\n !(parent instanceof FormGroupName) &&\n !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName)\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.dev/license\n */\n\nimport {\n Directive,\n EventEmitter,\n forwardRef,\n Host,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n Provider,\n Self,\n SimpleChanges,\n SkipSelf,\n ɵWritable as Writable,\n} from '@angular/core';\n\nimport {FormControl} from '../../model/form_control';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {\n controlParentException,\n disabledAttrWarning,\n ngModelGroupException,\n} from '../reactive_errors';\nimport {_ngModelWarning, controlPath, isPropertyUpdated, selectValueAccessor} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {NG_MODEL_WITH_FORM_CONTROL_WARNING} from './form_control_directive';\nimport {FormGroupDirective} from './form_group_directive';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nconst controlNameBinding: Provider = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlName),\n};\n\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see {@link FormControl}\n * @see {@link AbstractControl}\n *\n * @usageNotes\n *\n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel is deprecated\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName]', providers: [controlNameBinding]})\nexport class FormControlName extends NgControl implements OnChanges, OnDestroy {\n private _added = false;\n /**\n * Internal reference to the view model value.\n * @internal\n */\n viewModel: any;\n\n /**\n * @description\n * Tracks the `FormControl` instance bound to the directive.\n */\n // TODO(issue/24571): remove '!'.\n override readonly control!: FormControl;\n\n /**\n * @description\n * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n * to a key in the parent `FormGroup` or `FormArray`.\n * Accepts a name as a string or a number.\n * The name in the form of a string is useful for individual forms,\n * while the numerical form allows for form controls to be bound\n * to indices when iterating over controls in a `FormArray`.\n */\n @Input('formControlName') override name: string | number | null = null;\n\n /**\n * @description\n * Triggers a warning in dev mode that this input should not be used with reactive forms.\n */\n @Input('disabled')\n set isDisabled(isDisabled: boolean) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(disabledAttrWarning);\n }\n }\n\n // TODO(kara): remove next 4 properties once deprecation period is over\n\n /** @deprecated as of v6 */\n @Input('ngModel') model: any;\n\n /** @deprecated as of v6 */\n @Output('ngModelChange') update = new EventEmitter();\n\n /**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlName. Used to support warning config of \"once\".\n *\n * @internal\n */\n static _ngModelWarningSentOnce = false;\n\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular FormControlName instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n _ngModelWarningSent = false;\n\n constructor(\n @Optional() @Host() @SkipSelf() parent: ControlContainer,\n @Optional() @Self() @Inject(NG_VALIDATORS) validators: (Validator | ValidatorFn)[],\n @Optional()\n @Self()\n @Inject(NG_ASYNC_VALIDATORS)\n asyncValidators: (AsyncValidator | AsyncValidatorFn)[],\n @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n @Optional()\n @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING)\n private _ngModelWarningConfig: string | null,\n ) {\n super();\n this._parent = parent;\n this._setValidators(validators);\n this._setAsyncValidators(asyncValidators);\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges) {\n if (!this._added) this._setUpControl();\n if (isPropertyUpdated(changes, this.viewModel)) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n }\n this.viewModel = this.model;\n this.formDirective.updateModel(this, this.model);\n }\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n }\n\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n override viewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n override get path(): string[] {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent!);\n }\n\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get formDirective(): any {\n return this._parent ? this._parent.formDirective : null;\n }\n\n private _checkParentType(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (\n !(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective\n ) {\n throw ngModelGroupException();\n } else if (\n !(this._parent instanceof FormGroupName) &&\n !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)\n ) {\n throw controlParentException(this.name);\n }\n }\n }\n\n private _setUpControl() {\n this._checkParentType();\n (this as Writable<this>).control = this.formDirective.addControl(this);\n this._added = true;\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.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Input,\n OnDestroy,\n Optional,\n Provider,\n Renderer2,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nimport {\n BuiltInControlValueAccessor,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from './control_value_accessor';\n\nconst SELECT_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectControlValueAccessor),\n multi: true,\n};\n\nfunction _buildValueString(id: string | null, value: any): string {\n if (id == null) return `${value}`;\n if (value && typeof value === 'object') value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n return valueString.split(':')[0];\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\" [formControl]=\"selectedCountriesControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{country.name}}\n * </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n * return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in IE, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event#browser_compatibility\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n host: {'(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()'},\n providers: [SELECT_VALUE_ACCESSOR],\n})\nexport class SelectControlValueAccessor\n extends BuiltInControlValueAccessor\n implements ControlValueAccessor\n{\n /** @nodoc */\n value: any;\n\n /** @internal */\n _optionMap: Map<string, any> = new Map<string, any>();\n\n /** @internal */\n _idCounter: number = 0;\n\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n @Input()\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new RuntimeError(\n RuntimeErrorCode.COMPAREWITH_NOT_A_FN,\n `compareWith must be a function, but received ${JSON.stringify(fn)}`,\n );\n }\n this._compareWith = fn;\n }\n\n private _compareWith: (o1: any, o2: any) => boolean = Object.is;\n\n /**\n * Sets the \"value\" property on the select element.\n * @nodoc\n */\n writeValue(value: any): void {\n this.value = value;\n const id: string | null = this._getOptionId(value);\n const valueString = _buildValueString(id, value);\n this.setProperty('value', valueString);\n }\n\n /**\n * Registers a function called when the control value changes.\n * @nodoc\n */\n override registerOnChange(fn: (value: any) => any): void {\n this.onChange = (valueString: string) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }\n\n /** @internal */\n _registerOption(): string {\n return (this._idCounter++).toString();\n }\n\n /** @internal */\n _getOptionId(value: any): string | null {\n for (const id of this._optionMap.keys()) {\n if (this._compareWith(this._optionMap.get(id), value)) return id;\n }\n return null;\n }\n\n /** @internal */\n _getOptionValue(valueString: string): any {\n const id: string = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see {@link SelectControlValueAccessor}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class NgSelectOption implements OnDestroy {\n /**\n * @description\n * ID of the option element\n */\n // TODO(issue/24571): remove '!'.\n id!: string;\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n @Optional() @Host() private _select: SelectControlValueAccessor,\n ) {\n if (this._select) this.id = this._select._registerOption();\n }\n\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n @Input('ngValue')\n set ngValue(value: any) {\n if (this._select == null) return;\n this._select._optionMap.set(this.id, value);\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n @Input('value')\n set value(value: any) {\n this._setElementValue(value);\n if (this._select) this._select.writeValue(this._select.value);\n }\n\n /** @internal */\n _setElementValue(value: string): void {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\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.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Input,\n OnDestroy,\n Optional,\n Provider,\n Renderer2,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nimport {\n BuiltInControlValueAccessor,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n} from './control_value_accessor';\n\nconst SELECT_MULTIPLE_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n multi: true,\n};\n\nfunction _buildValueString(id: string, value: any): string {\n if (id == null) return `${value}`;\n if (typeof value === 'string') value = `'${value}'`;\n if (value && typeof value === 'object') value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n return valueString.split(':')[0];\n}\n\n/** Mock interface for HTML Options */\ninterface HTMLOption {\n value: string;\n selected: boolean;\n}\n\n/** Mock interface for HTMLCollection */\nabstract class HTMLCollection {\n // TODO(issue/24571): remove '!'.\n length!: number;\n abstract item(_: number): HTMLOption;\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select\n * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @see {@link SelectControlValueAccessor}\n *\n * @usageNotes\n *\n * ### Using a multi-select control\n *\n * The follow example shows you how to use a multi-select control with a reactive form.\n *\n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{ country.name }}\n * </option>\n * </select>\n * ```\n *\n * ### Customizing option selection\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'},\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR],\n})\nexport class SelectMultipleControlValueAccessor\n extends BuiltInControlValueAccessor\n implements ControlValueAccessor\n{\n /**\n * The current value.\n * @nodoc\n */\n value: any;\n\n /** @internal */\n _optionMap: Map<string, ɵNgSelectMultipleOption> = new Map<string, ɵNgSelectMultipleOption>();\n\n /** @internal */\n _idCounter: number = 0;\n\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n @Input()\n set compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new RuntimeError(\n RuntimeErrorCode.COMPAREWITH_NOT_A_FN,\n `compareWith must be a function, but received ${JSON.stringify(fn)}`,\n );\n }\n this._compareWith = fn;\n }\n\n private _compareWith: (o1: any, o2: any) => boolean = Object.is;\n\n /**\n * Sets the \"value\" property on one or of more of the select's options.\n * @nodoc\n */\n writeValue(value: any): void {\n this.value = value;\n let optionSelectedStateSetter: (opt: ɵNgSelectMultipleOption, o: any) => void;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n } else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }\n\n /**\n * Registers a function called when the control value changes\n * and writes an array of the selected options.\n * @nodoc\n */\n override registerOnChange(fn: (value: any) => any): void {\n this.onChange = (element: HTMLSelectElement) => {\n const selected: Array<any> = [];\n const selectedOptions = element.selectedOptions;\n if (selectedOptions !== undefined) {\n const options = selectedOptions;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade to use `options` when `selectedOptions` property is not available.\n // Note: the `selectedOptions` is available in all supported browsers, but the Domino lib\n // doesn't have it currently, see https://github.com/fgnass/domino/issues/177.\n else {\n const options = element.options;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n if (opt.selected) {\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n this.value = selected;\n fn(selected);\n };\n }\n\n /** @internal */\n _registerOption(value: ɵNgSelectMultipleOption): string {\n const id: string = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n }\n\n /** @internal */\n _getOptionId(value: any): string | null {\n for (const id of this._optionMap.keys()) {\n if (this._compareWith(this._optionMap.get(id)!._value, value)) return id;\n }\n return null;\n }\n\n /** @internal */\n _getOptionValue(valueString: string): any {\n const id: string = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)!._value : valueString;\n }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see {@link SelectMultipleControlValueAccessor}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class ɵNgSelectMultipleOption implements OnDestroy {\n // TODO(issue/24571): remove '!'.\n id!: string;\n /** @internal */\n _value: any;\n\n constructor(\n private _element: ElementRef,\n private _renderer: Renderer2,\n @Optional() @Host() private _select: SelectMultipleControlValueAccessor,\n ) {\n if (this._select) {\n this.id = this._select._registerOption(this);\n }\n }\n\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n @Input('ngValue')\n set ngValue(value: any) {\n if (this._select == null) return;\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n }\n\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n @Input('value')\n set value(value: any) {\n if (this._select) {\n this._value = value;\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n } else {\n this._setElementValue(value);\n }\n }\n\n /** @internal */\n _setElementValue(value: string): void {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n }\n\n /** @internal */\n _setSelected(selected: boolean) {\n this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n }\n}\n\nexport {ɵNgSelectMultipleOption as NgSelectMultipleOption};\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.dev/license\n */\n\nimport {\n booleanAttribute,\n Directive,\n forwardRef,\n Input,\n OnChanges,\n Provider,\n SimpleChanges,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {AbstractControl} from '../model/abstract_model';\nimport {\n emailValidator,\n maxLengthValidator,\n maxValidator,\n minLengthValidator,\n minValidator,\n NG_VALIDATORS,\n nullValidator,\n patternValidator,\n requiredTrueValidator,\n requiredValidator,\n} from '../validators';\n\n/**\n * Method that updates string to integer if not already a number\n *\n * @param value The value to convert to integer.\n * @returns value of parameter converted to number or integer.\n */\nfunction toInteger(value: string | number): number {\n return typeof value === 'number' ? value : parseInt(value, 10);\n}\n\n/**\n * Method that ensures that provided value is a float (and converts it to float if needed).\n *\n * @param value The value to convert to float.\n * @returns value of parameter converted to number or float.\n */\nfunction toFloat(value: string | number): number {\n return typeof value === 'number' ? value : parseFloat(value);\n}\n\n/**\n * @description\n * Defines the map of errors returned from failed validation checks.\n *\n * @publicApi\n */\nexport type ValidationErrors = {\n [key: string]: any;\n};\n\n/**\n * @description\n * An interface implemented by classes that perform synchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom validator\n *\n * The following example implements the `Validator` interface to create a\n * validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors|null {\n * return {'custom': true};\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface Validator {\n /**\n * @description\n * Method that performs synchronous validation against the provided control.\n *\n * @param control The control to validate against.\n *\n * @returns A map of validation errors if validation fails,\n * otherwise null.\n */\n validate(control: AbstractControl): ValidationErrors | null;\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n registerOnValidatorChange?(fn: () => void): void;\n}\n\n/**\n * A base class for Validator-based Directives. The class contains common logic shared across such\n * Directives.\n *\n * For internal use only, this class is not intended for use outside of the Forms package.\n */\n@Directive()\nabstract class AbstractValidatorDirective implements Validator, OnChanges {\n private _validator: ValidatorFn = nullValidator;\n private _onChange!: () => void;\n\n /**\n * A flag that tracks whether this validator is enabled.\n *\n * Marking it `internal` (vs `protected`), so that this flag can be used in host bindings of\n * directive classes that extend this base class.\n * @internal\n */\n _enabled?: boolean;\n\n /**\n * Name of an input that matches directive selector attribute (e.g. `minlength` for\n * `MinLengthDirective`). An input with a given name might contain configuration information (like\n * `minlength='10'`) or a flag that indicates whether validator should be enabled (like\n * `[required]='false'`).\n *\n * @internal\n */\n abstract inputName: string;\n\n /**\n * Creates an instance of a validator (specific to a directive that extends this base class).\n *\n * @internal\n */\n abstract createValidator(input: unknown): ValidatorFn;\n\n /**\n * Performs the necessary input normalization based on a specific logic of a Directive.\n * For example, the function might be used to convert string-based representation of the\n * `minlength` input to an integer value that can later be used in the `Validators.minLength`\n * validator.\n *\n * @internal\n */\n abstract normalizeInput(input: unknown): unknown;\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges): void {\n if (this.inputName in changes) {\n const input = this.normalizeInput(changes[this.inputName].currentValue);\n this._enabled = this.enabled(input);\n this._validator = this._enabled ? this.createValidator(input) : nullValidator;\n if (this._onChange) {\n this._onChange();\n }\n }\n }\n\n /** @nodoc */\n validate(control: AbstractControl): ValidationErrors | null {\n return this._validator(control);\n }\n\n /** @nodoc */\n registerOnValidatorChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n /**\n * @description\n * Determines whether this validator should be active or not based on an input.\n * Base class implementation checks whether an input is defined (if the value is different from\n * `null` and `undefined`). Validator classes that extend this base class can override this\n * function with the logic specific to a particular validator directive.\n */\n enabled(input: unknown): boolean {\n return input != null /* both `null` and `undefined` */;\n }\n}\n\n/**\n * @description\n * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MAX_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxValidator),\n multi: true,\n};\n\n/**\n * A directive which installs the {@link MaxValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `max` attribute.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a max validator\n *\n * The following example shows how to add a max validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel max=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',\n providers: [MAX_VALIDATOR],\n host: {'[attr.max]': '_enabled ? max : null'},\n})\nexport class MaxValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the max bound to this directive.\n */\n @Input() max!: string | number | null;\n /** @internal */\n override inputName = 'max';\n /** @internal */\n override normalizeInput = (input: string | number): number => toFloat(input);\n /** @internal */\n override createValidator = (max: number): ValidatorFn => maxValidator(max);\n}\n\n/**\n * @description\n * Provider which adds `MinValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MIN_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinValidator),\n multi: true,\n};\n\n/**\n * A directive which installs the {@link MinValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `min` attribute.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a min validator\n *\n * The following example shows how to add a min validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel min=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector:\n 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',\n providers: [MIN_VALIDATOR],\n host: {'[attr.min]': '_enabled ? min : null'},\n})\nexport class MinValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the min bound to this directive.\n */\n @Input() min!: string | number | null;\n /** @internal */\n override inputName = 'min';\n /** @internal */\n override normalizeInput = (input: string | number): number => toFloat(input);\n /** @internal */\n override createValidator = (min: number): ValidatorFn => minValidator(min);\n}\n\n/**\n * @description\n * An interface implemented by classes that perform asynchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * import { of } from 'rxjs';\n *\n * @Directive({\n * selector: '[customAsyncValidator]',\n * providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n * validate(control: AbstractControl): Observable<ValidationErrors|null> {\n * return of({'custom': true});\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface AsyncValidator extends Validator {\n /**\n * @description\n * Method that performs async validation against the provided control.\n *\n * @param control The control to validate against.\n *\n * @returns A promise or observable that resolves a map of validation errors\n * if validation fails, otherwise null.\n */\n validate(\n control: AbstractControl,\n ): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;\n}\n\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredValidator),\n multi: true,\n};\n\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxRequiredValidator),\n multi: true,\n};\n\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n selector:\n ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n providers: [REQUIRED_VALIDATOR],\n host: {'[attr.required]': '_enabled ? \"\" : null'},\n})\nexport class RequiredValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the required attribute bound to this directive.\n */\n @Input() required!: boolean | string;\n\n /** @internal */\n override inputName = 'required';\n\n /** @internal */\n override normalizeInput = booleanAttribute;\n\n /** @internal */\n override createValidator = (input: boolean): ValidatorFn => requiredValidator;\n\n /** @nodoc */\n override enabled(input: boolean): boolean {\n return input;\n }\n}\n\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an\n * ngModel binding.\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n selector:\n 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n providers: [CHECKBOX_REQUIRED_VALIDATOR],\n host: {'[attr.required]': '_enabled ? \"\" : null'},\n})\nexport class CheckboxRequiredValidator extends RequiredValidator {\n /** @internal */\n override createValidator = (input: unknown): ValidatorFn => requiredTrueValidator;\n}\n\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const EMAIL_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EmailValidator),\n multi: true,\n};\n\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * The email validation is based on the WHATWG HTML specification with some enhancements to\n * incorporate more RFC rules. More information can be found on the [Validators.email\n * page](api/forms/Validators#email).\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel\n * binding.\n *\n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR],\n})\nexport class EmailValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the email attribute bound to this directive.\n */\n @Input() email!: boolean | string;\n\n /** @internal */\n override inputName = 'email';\n\n /** @internal */\n override normalizeInput = booleanAttribute;\n\n /** @internal */\n override createValidator = (input: number): ValidatorFn => emailValidator;\n\n /** @nodoc */\n override enabled(input: boolean): boolean {\n return input;\n }\n}\n\n/**\n * @description\n * A function that receives a control and synchronously returns a map of\n * validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface ValidatorFn {\n (control: AbstractControl): ValidationErrors | null;\n}\n\n/**\n * @description\n * A function that receives a control and returns a Promise or observable\n * that emits validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface AsyncValidatorFn {\n (\n control: AbstractControl,\n ): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;\n}\n\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MIN_LENGTH_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinLengthValidator),\n multi: true,\n};\n\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: {'[attr.minlength]': '_enabled ? minlength : null'},\n})\nexport class MinLengthValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the minimum length bound to this directive.\n */\n @Input() minlength!: string | number | null;\n\n /** @internal */\n override inputName = 'minlength';\n\n /** @internal */\n override normalizeInput = (input: string | number): number => toInteger(input);\n\n /** @internal */\n override createValidator = (minlength: number): ValidatorFn => minLengthValidator(minlength);\n}\n\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MAX_LENGTH_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxLengthValidator),\n multi: true,\n};\n\n/**\n * A directive that adds maximum length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: {'[attr.maxlength]': '_enabled ? maxlength : null'},\n})\nexport class MaxLengthValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the maximum length bound to this directive.\n */\n @Input() maxlength!: string | number | null;\n\n /** @internal */\n override inputName = 'maxlength';\n\n /** @internal */\n override normalizeInput = (input: string | number): number => toInteger(input);\n\n /** @internal */\n override createValidator = (maxlength: number): ValidatorFn => maxLengthValidator(maxlength);\n}\n\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const PATTERN_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PatternValidator),\n multi: true,\n};\n\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: {'[attr.pattern]': '_enabled ? pattern : null'},\n})\nexport class PatternValidator extends AbstractValidatorDirective {\n /**\n * @description\n * Tracks changes to the pattern bound to this directive.\n */\n @Input()\n pattern!: string | RegExp; // This input is always defined, since the name matches selector.\n\n /** @internal */\n override inputName = 'pattern';\n\n /** @internal */\n override normalizeInput = (input: string | RegExp): string | RegExp => input;\n\n /** @internal */\n override createValidator = (input: string | RegExp): ValidatorFn => patternValidator(input);\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.dev/license\n */\n\nimport {NgModule, Type} from '@angular/core';\n\nimport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nimport {DefaultValueAccessor} from './directives/default_value_accessor';\nimport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nimport {NgForm} from './directives/ng_form';\nimport {NgModel} from './directives/ng_model';\nimport {NgModelGroup} from './directives/ng_model_group';\nimport {NgNoValidate} from './directives/ng_no_validate_directive';\nimport {NumberValueAccessor} from './directives/number_value_accessor';\nimport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nimport {RangeValueAccessor} from './directives/range_value_accessor';\nimport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nimport {FormControlName} from './directives/reactive_directives/form_control_name';\nimport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nimport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nimport {\n NgSelectOption,\n SelectControlValueAccessor,\n} from './directives/select_control_value_accessor';\nimport {\n NgSelectMultipleOption,\n SelectMultipleControlValueAccessor,\n} from './directives/select_multiple_control_value_accessor';\nimport {\n CheckboxRequiredValidator,\n EmailValidator,\n MaxLengthValidator,\n MaxValidator,\n MinLengthValidator,\n MinValidator,\n PatternValidator,\n RequiredValidator,\n} from './directives/validators';\n\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlValueAccessor} from './directives/control_value_accessor';\nexport {DefaultValueAccessor} from './directives/default_value_accessor';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {\n FormControlDirective,\n NG_MODEL_WITH_FORM_CONTROL_WARNING,\n} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {\n NgSelectOption,\n SelectControlValueAccessor,\n} from './directives/select_control_value_accessor';\nexport {\n NgSelectMultipleOption,\n SelectMultipleControlValueAccessor,\n} from './directives/select_multiple_control_value_accessor';\nexport {CALL_SET_DISABLED_STATE} from './directives/shared';\n\nexport const SHARED_FORM_DIRECTIVES: Type<any>[] = [\n NgNoValidate,\n NgSelectOption,\n NgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n MinValidator,\n MaxValidator,\n];\n\nexport const TEMPLATE_DRIVEN_DIRECTIVES: Type<any>[] = [NgModel, NgModelGroup, NgForm];\n\nexport const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[] = [\n FormControlDirective,\n FormGroupDirective,\n FormControlName,\n FormGroupName,\n FormArrayName,\n];\n\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\n@NgModule({\n declarations: SHARED_FORM_DIRECTIVES,\n exports: SHARED_FORM_DIRECTIVES,\n})\nexport class ɵInternalFormsSharedModule {}\n\nexport {ɵInternalFormsSharedModule as InternalFormsSharedModule};\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.dev/license\n */\n\nimport {ɵWritable as Writable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from '../directives/validators';\n\nimport {\n AbstractControl,\n AbstractControlOptions,\n assertAllValuesPresent,\n assertControlPresent,\n pickAsyncValidators,\n pickValidators,\n ɵRawValue,\n ɵTypedOrUntyped,\n ɵValue,\n} from './abstract_model';\n\n/**\n * FormArrayValue extracts the type of `.value` from a FormArray's element type, and wraps it in an\n * array.\n *\n * Angular uses this type internally to support Typed Forms; do not use it directly. The untyped\n * case falls back to any[].\n */\nexport type ɵFormArrayValue<T extends AbstractControl<any>> = ɵTypedOrUntyped<\n T,\n Array<ɵValue<T>>,\n any[]\n>;\n\n/**\n * FormArrayRawValue extracts the type of `.getRawValue()` from a FormArray's element type, and\n * wraps it in an array. The untyped case falls back to any[].\n *\n * Angular uses this type internally to support Typed Forms; do not use it directly.\n */\nexport type ɵFormArrayRawValue<T extends AbstractControl<any>> = ɵTypedOrUntyped<\n T,\n Array<ɵRawValue<T>>,\n any[]\n>;\n\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` accepts one generic argument, which is the type of the controls inside.\n * If you need a heterogenous array, use {@link UntypedFormArray}.\n *\n * `FormArray` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormGroup`, and `FormRecord`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy'),\n * new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nexport class FormArray<TControl extends AbstractControl<any> = any> extends AbstractControl<\n ɵTypedOrUntyped<TControl, ɵFormArrayValue<TControl>, any>,\n ɵTypedOrUntyped<TControl, ɵFormArrayRawValue<TControl>, any>\n> {\n /**\n * Creates a new `FormArray` instance.\n *\n * @param controls An array of child controls. Each child control is given an index\n * where it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n constructor(\n controls: Array<TControl>,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n this.controls = controls;\n this._initObservables();\n this._setUpdateStrategy(validatorOrOpts);\n this._setUpControls();\n this.updateValueAndValidity({\n onlySelf: true,\n // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n // `VALID` or `INVALID`.\n // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n // to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator,\n });\n }\n\n public controls: ɵTypedOrUntyped<TControl, Array<TControl>, Array<AbstractControl<any>>>;\n\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to retrieve the control. If `index` is negative, it will wrap\n * around from the back, and if index is greatly negative (less than `-length`), the result is\n * undefined. This behavior is the same as `Array.at(index)`.\n */\n at(index: number): ɵTypedOrUntyped<TControl, TControl, AbstractControl<any>> {\n return (this.controls as any)[this._adjustIndex(index)];\n }\n\n /**\n * Insert a new `AbstractControl` at the end of the array.\n *\n * @param control Form control to be inserted\n * @param options Specifies whether this FormArray instance should emit events after a new\n * control is added.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * inserted. When false, no events are emitted.\n */\n push(control: TControl, options: {emitEvent?: boolean} = {}): void {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n this._onCollectionChange();\n }\n\n /**\n * Insert a new `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to insert the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), prepends to the array.\n * This behavior is the same as `Array.splice(index, 0, control)`.\n * @param control Form control to be inserted\n * @param options Specifies whether this FormArray instance should emit events after a new\n * control is inserted.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * inserted. When false, no events are emitted.\n */\n insert(index: number, control: TControl, options: {emitEvent?: boolean} = {}): void {\n this.controls.splice(index, 0, control);\n\n this._registerControl(control);\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n }\n\n /**\n * Remove the control at the given `index` in the array.\n *\n * @param index Index in the array to remove the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), removes the first\n * element. This behavior is the same as `Array.splice(index, 1)`.\n * @param options Specifies whether this FormArray instance should emit events after a\n * control is removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * removed. When false, no events are emitted.\n */\n removeAt(index: number, options: {emitEvent?: boolean} = {}): void {\n // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0) adjustedIndex = 0;\n\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => {});\n this.controls.splice(adjustedIndex, 1);\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n }\n\n /**\n * Replace an existing control.\n *\n * @param index Index in the array to replace the control. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), replaces the first\n * element. This behavior is the same as `Array.splice(index, 1, control)`.\n * @param control The `AbstractControl` control to replace the existing control\n * @param options Specifies whether this FormArray instance should emit events after an\n * existing control is replaced with a new one.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control is\n * replaced with a new one. When false, no events are emitted.\n */\n setControl(index: number, control: TControl, options: {emitEvent?: boolean} = {}): void {\n // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0) adjustedIndex = 0;\n\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => {});\n this.controls.splice(adjustedIndex, 1);\n\n if (control) {\n this.controls.splice(adjustedIndex, 0, control);\n this._registerControl(control);\n }\n\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n this._onCollectionChange();\n }\n\n /**\n * Length of the control array.\n */\n get length(): number {\n return this.controls.length;\n }\n\n /**\n * Sets the value of the `FormArray`. It accepts an array that matches\n * the structure of the control.\n *\n * This method performs strict checks, and throws an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n *\n * @usageNotes\n * ### Set the values for the controls in the form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n override setValue(\n value: ɵFormArrayRawValue<TControl>,\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n } = {},\n ): void {\n assertAllValuesPresent(this, false, value);\n value.forEach((newValue: any, index: number) => {\n assertControlPresent(this, false, index);\n this.at(index).setValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and does its best to match the values to the correct\n * controls in the group.\n *\n * It accepts both super-sets and sub-sets of the array without throwing an error.\n *\n * @usageNotes\n * ### Patch the values for controls in a form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n *\n * @param value Array of latest values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when the control\n * value is updated. When false, no events are emitted. The configuration options are passed to\n * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n */\n override patchValue(\n value: ɵFormArrayValue<TControl>,\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n } = {},\n ): void {\n // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n // `patchValue` can be called recursively and inner data structures might have these values,\n // so we just ignore such cases when a field containing FormArray instance receives `null` or\n // `undefined` as a value.\n if (value == null /* both `null` and `undefined` */) return;\n\n value.forEach((newValue, index) => {\n if (this.at(index)) {\n this.at(index).patchValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n }\n });\n this.updateValueAndValidity(options);\n }\n\n /**\n * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n * value of all descendants to null or null maps.\n *\n * You reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state is a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * @usageNotes\n * ### Reset the values in a form array\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * arr.reset(['name', 'last name']);\n *\n * console.log(arr.value); // ['name', 'last name']\n * ```\n *\n * ### Reset the values in a form array and the disabled status for the first control\n *\n * ```\n * arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n *\n * console.log(arr.value); // ['last']\n * console.log(arr.at(0).status); // 'DISABLED'\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n override reset(\n value: ɵTypedOrUntyped<TControl, ɵFormArrayValue<TControl>, any> = [],\n options: {\n onlySelf?: boolean;\n emitEvent?: boolean;\n } = {},\n ): void {\n this._forEachChild((control: AbstractControl, index: number) => {\n control.reset(value[index], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this._updatePristine(options, this);\n this._updateTouched(options, this);\n this.updateValueAndValidity(options);\n }\n\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * Reports all values regardless of disabled status.\n */\n override getRawValue(): ɵFormArrayRawValue<TControl> {\n return this.controls.map((control: AbstractControl) => control.getRawValue());\n }\n\n /**\n * Remove all controls in the `FormArray`.\n *\n * @param options Specifies whether this FormArray instance should emit events after all\n * controls are removed.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges` observables emit events with the latest status and value when all controls\n * in this FormArray instance are removed. When false, no events are emitted.\n *\n * @usageNotes\n * ### Remove all elements from a FormArray\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.length); // 2\n *\n * arr.clear();\n * console.log(arr.length); // 0\n * ```\n *\n * It's a simpler and more efficient alternative to removing all elements one by one:\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n *\n * while (arr.length) {\n * arr.removeAt(0);\n * }\n * ```\n */\n clear(options: {emitEvent?: boolean} = {}): void {\n if (this.controls.length < 1) return;\n this._forEachChild((control) => control._registerOnCollectionChange(() => {}));\n this.controls.splice(0);\n this.updateValueAndValidity({emitEvent: options.emitEvent});\n }\n\n /**\n * Adjusts a negative index by summing it with the length of the array. For very negative\n * indices, the result may remain negative.\n * @internal\n */\n private _adjustIndex(index: number): number {\n return index < 0 ? index + this.length : index;\n }\n\n /** @internal */\n override _syncPendingControls(): boolean {\n let subtreeUpdated = (this.controls as any).reduce((updated: any, child: any) => {\n return child._syncPendingControls() ? true : updated;\n }, false);\n if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n return subtreeUpdated;\n }\n\n /** @internal */\n override _forEachChild(cb: (c: AbstractControl, index: number) => void): void {\n this.controls.forEach((control: AbstractControl, index: number) => {\n cb(control, index);\n });\n }\n\n /** @internal */\n override _updateValue(): void {\n (this as Writable<this>).value = this.controls\n .filter((control) => control.enabled || this.disabled)\n .map((control) => control.value);\n }\n\n /** @internal */\n override _anyControls(condition: (c: AbstractControl) => boolean): boolean {\n return this.controls.some((control) => control.enabled && condition(control));\n }\n\n /** @internal */\n _setUpControls(): void {\n this._forEachChild((control) => this._registerControl(control));\n }\n\n /** @internal */\n override _allControlsDisabled(): boolean {\n for (const control of this.controls) {\n if (control.enabled) return false;\n }\n return this.controls.length > 0 || this.disabled;\n }\n\n private _registerControl(control: AbstractControl) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n }\n\n /** @internal */\n override _find(name: string | number): AbstractControl | null {\n return this.at(name as number) ?? null;\n }\n}\n\ninterface UntypedFormArrayCtor {\n new (\n controls: AbstractControl[],\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): UntypedFormArray;\n\n /**\n * The presence of an explicit `prototype` property provides backwards-compatibility for apps that\n * manually inspect the prototype chain.\n */\n prototype: FormArray<any>;\n}\n\n/**\n * UntypedFormArray is a non-strongly-typed version of `FormArray`, which\n * permits heterogenous controls.\n */\nexport type UntypedFormArray = FormArray<any>;\n\nexport const UntypedFormArray: UntypedFormArrayCtor = FormArray;\n\n/**\n * @description\n * Asserts that the given control is an instance of `FormArray`\n *\n * @publicApi\n */\nexport const isFormArray = (control: unknown): control is FormArray => control instanceof FormArray;\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.dev/license\n */\n\nimport {inject, Injectable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from './directives/validators';\nimport {AbstractControl, AbstractControlOptions, FormHooks} from './model/abstract_model';\nimport {FormArray, UntypedFormArray} from './model/form_array';\nimport {\n FormControl,\n FormControlOptions,\n FormControlState,\n UntypedFormControl,\n} from './model/form_control';\nimport {FormGroup, FormRecord, UntypedFormGroup} from './model/form_group';\n\nfunction isAbstractControlOptions(\n options: AbstractControlOptions | {[key: string]: any} | null | undefined,\n): options is AbstractControlOptions {\n return (\n !!options &&\n ((options as AbstractControlOptions).asyncValidators !== undefined ||\n (options as AbstractControlOptions).validators !== undefined ||\n (options as AbstractControlOptions).updateOn !== undefined)\n );\n}\n\n/**\n * The union of all validator types that can be accepted by a ControlConfig.\n */\ntype ValidatorConfig = ValidatorFn | AsyncValidatorFn | ValidatorFn[] | AsyncValidatorFn[];\n\n/**\n * The compiler may not always be able to prove that the elements of the control config are a tuple\n * (i.e. occur in a fixed order). This slightly looser type is used for inference, to catch cases\n * where the compiler cannot prove order and position.\n *\n * For example, consider the simple case `fb.group({foo: ['bar', Validators.required]})`. The\n * compiler will infer this as an array, not as a tuple.\n */\ntype PermissiveControlConfig<T> = Array<T | FormControlState<T> | ValidatorConfig>;\n\n/**\n * Helper type to allow the compiler to accept [XXXX, { updateOn: string }] as a valid shorthand\n * argument for .group()\n */\ninterface PermissiveAbstractControlOptions extends Omit<AbstractControlOptions, 'updateOn'> {\n updateOn?: string;\n}\n\n/**\n * ControlConfig<T> is a tuple containing a value of type T, plus optional validators and async\n * validators.\n *\n * @publicApi\n */\nexport type ControlConfig<T> = [\n T | FormControlState<T>,\n (ValidatorFn | ValidatorFn[])?,\n (AsyncValidatorFn | AsyncValidatorFn[])?,\n];\n\n/**\n * FormBuilder accepts values in various container shapes, as well as raw values.\n * Element returns the appropriate corresponding model class, given the container T.\n * The flag N, if not never, makes the resulting `FormControl` have N in its type.\n */\nexport type ɵElement<T, N extends null> =\n // The `extends` checks are wrapped in arrays in order to prevent TypeScript from applying type unions\n // through the distributive conditional type. This is the officially recommended solution:\n // https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types\n //\n // Identify FormControl container types.\n [T] extends [FormControl<infer U>]\n ? FormControl<U>\n : // Or FormControl containers that are optional in their parent group.\n [T] extends [FormControl<infer U> | undefined]\n ? FormControl<U>\n : // FormGroup containers.\n [T] extends [FormGroup<infer U>]\n ? FormGroup<U>\n : // Optional FormGroup containers.\n [T] extends [FormGroup<infer U> | undefined]\n ? FormGroup<U>\n : // FormRecord containers.\n [T] extends [FormRecord<infer U>]\n ? FormRecord<U>\n : // Optional FormRecord containers.\n [T] extends [FormRecord<infer U> | undefined]\n ? FormRecord<U>\n : // FormArray containers.\n [T] extends [FormArray<infer U>]\n ? FormArray<U>\n : // Optional FormArray containers.\n [T] extends [FormArray<infer U> | undefined]\n ? FormArray<U>\n : // Otherwise unknown AbstractControl containers.\n [T] extends [AbstractControl<infer U>]\n ? AbstractControl<U>\n : // Optional AbstractControl containers.\n [T] extends [AbstractControl<infer U> | undefined]\n ? AbstractControl<U>\n : // FormControlState object container, which produces a nullable control.\n [T] extends [FormControlState<infer U>]\n ? FormControl<U | N>\n : // A ControlConfig tuple, which produces a nullable control.\n [T] extends [PermissiveControlConfig<infer U>]\n ? FormControl<\n Exclude<U, ValidatorConfig | PermissiveAbstractControlOptions> | N\n >\n : FormControl<T | N>;\n\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a\n * `FormControl`, `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to\n * build complex forms.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class FormBuilder {\n private useNonNullable: boolean = false;\n\n /**\n * @description\n * Returns a FormBuilder in which automatically constructed `FormControl` elements\n * have `{nonNullable: true}` and are non-nullable.\n *\n * **Constructing non-nullable controls**\n *\n * When constructing a control, it will be non-nullable, and will reset to its initial value.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.control('Alex'); // FormControl<string>\n * name.reset();\n * console.log(name); // 'Alex'\n * ```\n *\n * **Constructing non-nullable groups or arrays**\n *\n * When constructing a group or array, all automatically created inner controls will be\n * non-nullable, and will reset to their initial values.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.group({who: 'Alex'}); // FormGroup<{who: FormControl<string>}>\n * name.reset();\n * console.log(name); // {who: 'Alex'}\n * ```\n * **Constructing *nullable* fields on groups or arrays**\n *\n * It is still possible to have a nullable field. In particular, any `FormControl` which is\n * *already* constructed will not be altered. For example:\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * // FormGroup<{who: FormControl<string|null>}>\n * let name = nnfb.group({who: new FormControl('Alex')});\n * name.reset(); console.log(name); // {who: null}\n * ```\n *\n * Because the inner control is constructed explicitly by the caller, the builder has\n * no control over how it is created, and cannot exclude the `null`.\n */\n get nonNullable(): NonNullableFormBuilder {\n const nnfb = new FormBuilder();\n nnfb.useNonNullable = true;\n return nnfb as NonNullableFormBuilder;\n }\n\n /**\n * @description\n * Constructs a new `FormGroup` instance. Accepts a single generic argument, which is an object\n * containing all the keys and corresponding inner control types.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormGroup`. The object should have the\n * `AbstractControlOptions` type and might contain the following fields:\n * * `validators`: A synchronous validator function, or an array of validator functions.\n * * `asyncValidators`: A single async validator or array of async validator functions.\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur'\n * | submit').\n */\n group<T extends {}>(\n controls: T,\n options?: AbstractControlOptions | null,\n ): FormGroup<{[K in keyof T]: ɵElement<T[K], null>}>;\n\n /**\n * @description\n * Constructs a new `FormGroup` instance.\n *\n * @deprecated This API is not typesafe and can result in issues with Closure Compiler renaming.\n * Use the `FormBuilder#group` overload with `AbstractControlOptions` instead.\n * Note that `AbstractControlOptions` expects `validators` and `asyncValidators` to be valid\n * validators. If you have custom validators, make sure their validation function parameter is\n * `AbstractControl` and not a sub-class, such as `FormGroup`. These functions will be called\n * with an object of type `AbstractControl` and that cannot be automatically downcast to a\n * subclass, so TypeScript sees this as an error. For example, change the `(group: FormGroup) =>\n * ValidationErrors|null` signature to be `(group: AbstractControl) => ValidationErrors|null`.\n *\n * @param controls A record of child controls. The key for each child is the name\n * under which the control is registered.\n *\n * @param options Configuration options object for the `FormGroup`. The legacy configuration\n * object consists of:\n * * `validator`: A synchronous validator function, or an array of validator functions.\n * * `asyncValidator`: A single async validator or array of async validator functions\n * Note: the legacy format is deprecated and might be removed in one of the next major versions\n * of Angular.\n */\n group(controls: {[key: string]: any}, options: {[key: string]: any}): FormGroup;\n\n group(\n controls: {[key: string]: any},\n options: AbstractControlOptions | {[key: string]: any} | null = null,\n ): FormGroup {\n const reducedControls = this._reduceControls(controls);\n let newOptions: FormControlOptions = {};\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n newOptions = options;\n } else if (options !== null) {\n // `options` are legacy form group options\n newOptions.validators = (options as any).validator;\n newOptions.asyncValidators = (options as any).asyncValidator;\n }\n return new FormGroup(reducedControls, newOptions);\n }\n\n /**\n * @description\n * Constructs a new `FormRecord` instance. Accepts a single generic argument, which is an object\n * containing all the keys and corresponding inner control types.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormRecord`. The object should have the\n * `AbstractControlOptions` type and might contain the following fields:\n * * `validators`: A synchronous validator function, or an array of validator functions.\n * * `asyncValidators`: A single async validator or array of async validator functions.\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur'\n * | submit').\n */\n record<T>(\n controls: {[key: string]: T},\n options: AbstractControlOptions | null = null,\n ): FormRecord<ɵElement<T, null>> {\n const reducedControls = this._reduceControls(controls);\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormRecord(reducedControls, options) as any;\n }\n\n /** @deprecated Use `nonNullable` instead. */\n control<T>(\n formState: T | FormControlState<T>,\n opts: FormControlOptions & {\n initialValueIsDefault: true;\n },\n ): FormControl<T>;\n\n control<T>(\n formState: T | FormControlState<T>,\n opts: FormControlOptions & {nonNullable: true},\n ): FormControl<T>;\n\n /**\n * @deprecated When passing an `options` argument, the `asyncValidator` argument has no effect.\n */\n control<T>(\n formState: T | FormControlState<T>,\n opts: FormControlOptions,\n asyncValidator: AsyncValidatorFn | AsyncValidatorFn[],\n ): FormControl<T | null>;\n\n control<T>(\n formState: T | FormControlState<T>,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): FormControl<T | null>;\n\n /**\n * @description\n * Constructs a new `FormControl` with the given state, validators and options. Sets\n * `{nonNullable: true}` in the options to get a non-nullable control. Otherwise, the\n * control will be nullable. Accepts a single generic argument, which is the type of the\n * control's value.\n *\n * @param formState Initializes the control with an initial state value, or\n * with an object that contains both a value and a disabled status.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or a `FormControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n * </code-example>\n */\n control<T>(\n formState: T | FormControlState<T>,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): FormControl {\n let newOptions: FormControlOptions = {};\n if (!this.useNonNullable) {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n }\n if (isAbstractControlOptions(validatorOrOpts)) {\n // If the second argument is options, then they are copied.\n newOptions = validatorOrOpts;\n } else {\n // If the other arguments are validators, they are copied into an options object.\n newOptions.validators = validatorOrOpts;\n newOptions.asyncValidators = asyncValidator;\n }\n return new FormControl<T>(formState, {...newOptions, nonNullable: true});\n }\n\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options. Accepts a single generic argument, which is the type of each control\n * inside the array.\n *\n * @param controls An array of child controls or control configs. Each child control is given an\n * index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of such functions, or an\n * `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions.\n */\n array<T>(\n controls: Array<T>,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): FormArray<ɵElement<T, null>> {\n const createdControls = controls.map((c) => this._createControl(c));\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormArray(createdControls, validatorOrOpts, asyncValidator) as any;\n }\n\n /** @internal */\n _reduceControls<T>(controls: {\n [k: string]: T | ControlConfig<T> | FormControlState<T> | AbstractControl<T>;\n }): {[key: string]: AbstractControl} {\n const createdControls: {[key: string]: AbstractControl} = {};\n Object.keys(controls).forEach((controlName) => {\n createdControls[controlName] = this._createControl(controls[controlName]);\n });\n return createdControls;\n }\n\n /** @internal */\n _createControl<T>(\n controls: T | FormControlState<T> | ControlConfig<T> | FormControl<T> | AbstractControl<T>,\n ): FormControl<T> | FormControl<T | null> | AbstractControl<T> {\n if (controls instanceof FormControl) {\n return controls as FormControl<T>;\n } else if (controls instanceof AbstractControl) {\n // A control; just return it\n return controls;\n } else if (Array.isArray(controls)) {\n // ControlConfig Tuple\n const value: T | FormControlState<T> = controls[0];\n const validator: ValidatorFn | ValidatorFn[] | null =\n controls.length > 1 ? controls[1]! : null;\n const asyncValidator: AsyncValidatorFn | AsyncValidatorFn[] | null =\n controls.length > 2 ? controls[2]! : null;\n return this.control<T>(value, validator, asyncValidator);\n } else {\n // T or FormControlState<T>\n return this.control<T>(controls);\n }\n }\n}\n\n/**\n * @description\n * `NonNullableFormBuilder` is similar to {@link FormBuilder}, but automatically constructed\n * {@link FormControl} elements have `{nonNullable: true}` and are non-nullable.\n *\n * @publicApi\n */\n@Injectable({\n providedIn: 'root',\n useFactory: () => inject(FormBuilder).nonNullable,\n})\nexport abstract class NonNullableFormBuilder {\n /**\n * Similar to `FormBuilder#group`, except any implicitly constructed `FormControl`\n * will be non-nullable (i.e. it will have `nonNullable` set to true). Note\n * that already-constructed controls will not be altered.\n */\n abstract group<T extends {}>(\n controls: T,\n options?: AbstractControlOptions | null,\n ): FormGroup<{[K in keyof T]: ɵElement<T[K], never>}>;\n\n /**\n * Similar to `FormBuilder#record`, except any implicitly constructed `FormControl`\n * will be non-nullable (i.e. it will have `nonNullable` set to true). Note\n * that already-constructed controls will not be altered.\n */\n abstract record<T>(\n controls: {[key: string]: T},\n options?: AbstractControlOptions | null,\n ): FormRecord<ɵElement<T, never>>;\n\n /**\n * Similar to `FormBuilder#array`, except any implicitly constructed `FormControl`\n * will be non-nullable (i.e. it will have `nonNullable` set to true). Note\n * that already-constructed controls will not be altered.\n */\n abstract array<T>(\n controls: Array<T>,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): FormArray<ɵElement<T, never>>;\n\n /**\n * Similar to `FormBuilder#control`, except this overridden version of `control` forces\n * `nonNullable` to be `true`, resulting in the control always being non-nullable.\n */\n abstract control<T>(\n formState: T | FormControlState<T>,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): FormControl<T>;\n}\n\n/**\n * UntypedFormBuilder is the same as `FormBuilder`, but it provides untyped controls.\n */\n@Injectable({providedIn: 'root'})\nexport class UntypedFormBuilder extends FormBuilder {\n /**\n * Like `FormBuilder#group`, except the resulting group is untyped.\n */\n override group(\n controlsConfig: {[key: string]: any},\n options?: AbstractControlOptions | null,\n ): UntypedFormGroup;\n\n /**\n * @deprecated This API is not typesafe and can result in issues with Closure Compiler renaming.\n * Use the `FormBuilder#group` overload with `AbstractControlOptions` instead.\n */\n override group(\n controlsConfig: {[key: string]: any},\n options: {[key: string]: any},\n ): UntypedFormGroup;\n\n override group(\n controlsConfig: {[key: string]: any},\n options: AbstractControlOptions | {[key: string]: any} | null = null,\n ): UntypedFormGroup {\n return super.group(controlsConfig, options);\n }\n\n /**\n * Like `FormBuilder#control`, except the resulting control is untyped.\n */\n override control(\n formState: any,\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): UntypedFormControl {\n return super.control(formState, validatorOrOpts, asyncValidator);\n }\n\n /**\n * Like `FormBuilder#array`, except the resulting array is untyped.\n */\n override array(\n controlsConfig: any[],\n validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,\n asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,\n ): UntypedFormArray {\n return super.array(controlsConfig, validatorOrOpts, asyncValidator);\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.dev/license\n */\n\nimport {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {\n InternalFormsSharedModule,\n NG_MODEL_WITH_FORM_CONTROL_WARNING,\n REACTIVE_DRIVEN_DIRECTIVES,\n TEMPLATE_DRIVEN_DIRECTIVES,\n} from './directives';\nimport {\n CALL_SET_DISABLED_STATE,\n setDisabledStateDefault,\n SetDisabledStateOption,\n} from './directives/shared';\n\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Overview](guide/forms)\n * @see [Template-driven Forms Guide](guide/forms)\n *\n * @publicApi\n */\n@NgModule({\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES],\n})\nexport class FormsModule {\n /**\n * @description\n * Provides options for configuring the forms module.\n *\n * @param opts An object of configuration options\n * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n */\n static withConfig(opts: {\n callSetDisabledState?: SetDisabledStateOption;\n }): ModuleWithProviders<FormsModule> {\n return {\n ngModule: FormsModule,\n providers: [\n {\n provide: CALL_SET_DISABLED_STATE,\n useValue: opts.callSetDisabledState ?? setDisabledStateDefault,\n },\n ],\n };\n }\n}\n\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Overview](guide/forms)\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n *\n * @publicApi\n */\n@NgModule({\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES],\n})\nexport class ReactiveFormsModule {\n /**\n * @description\n * Provides options for configuring the reactive forms module.\n *\n * @param opts An object of configuration options\n * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n * binding is used with reactive form directives.\n * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n */\n static withConfig(opts: {\n /** @deprecated as of v6 */ warnOnNgModelWithFormControl?: 'never' | 'once' | 'always';\n callSetDisabledState?: SetDisabledStateOption;\n }): ModuleWithProviders<ReactiveFormsModule> {\n return {\n ngModule: ReactiveFormsModule,\n providers: [\n {\n provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n useValue: opts.warnOnNgModelWithFormControl ?? 'always',\n },\n {\n provide: CALL_SET_DISABLED_STATE,\n useValue: opts.callSetDisabledState ?? setDisabledStateDefault,\n },\n ],\n };\n }\n}\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being an Iterable */\nexport function isIterable(input: any): input is Iterable<any> {\n return isFunction(input?.[Symbol_iterator]);\n}\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Object;\n","import { Observable } from 'rxjs';\n\nimport {\n LoginPostMessage,\n CasFlowLostPasswordResponse,\n PostLostPasswordBy,\n LoginPhaseError,\n} from '@fcom/core-api/login';\nimport { DdsCasAdditionalParams } from '@fcom/core';\n\nimport { RedirectToLoginParams } from './utils';\n\nexport abstract class LoginService {\n /**\n * Returns a stream that emits the status of the CAS SSO session and completes directly afterwards\n * @return {Observable<boolean>}\n */\n abstract isLoggedInSsoSession(): Observable<boolean>;\n\n /**\n * Trigger initialization of login iframe functionality.\n * Will not trigger redirection of browser\n */\n abstract initSsoLoginSession(): void;\n\n /**\n * Handles the login event from the iframe.\n * @param {LoginPostMessage} event\n */\n abstract handleLoginEvent(event: LoginPostMessage): void;\n\n /**\n * Redirects the user to the login page\n */\n abstract redirectToLogin(params?: RedirectToLoginParams): void;\n\n abstract redirectToForgotPassword(params?: RedirectToLoginParams): void;\n\n abstract redirectToCorporateLogin(params?: RedirectToLoginParams): void;\n\n /**\n * Redirects the user to the join page\n */\n abstract redirectToJoin(params?: RedirectToLoginParams): void;\n\n /**\n * Redirects the user to the simplified login page\n */\n abstract redirectToSimplifiedLogin(params?: RedirectToLoginParams): void;\n\n /**\n * Returns link to the change password page with correct params\n * @param {string} userId the AY id of the user thats password we want to change\n */\n abstract createChangePasswordUrl(memberNumber: string): string;\n\n /**\n * Redirects the user's browser to CAS logout page and\n * - if params is provided and set redirect url to the path\n * - if params is not provided and/or is falsy then redirect back to where you were\n */\n abstract logout(params?: RedirectToLoginParams): void;\n\n /**\n * Returns the URL to use for redirect to DDS MMB with CAS login session federated through CASRedirect.action.\n * @param {DdsCasAdditionalParams} additionalParams additional parameters to supply to the CASRedirect url\n */\n abstract getRedirectUrlToMmbWithCasLoginFederation(additionalParams?: DdsCasAdditionalParams): string;\n\n /**\n * Get the trigger that should initialize the login iframe.\n */\n abstract get loginTrigger$(): Observable<string>;\n\n abstract login(user: string, password: string, rememberMe: boolean): void;\n\n abstract login2fa(code: string, submitPin?: boolean): void;\n\n abstract resend2faEmail(): Observable<LoginPhaseError | undefined>;\n\n abstract requestSMS(): void;\n\n abstract postLostPassword(\n sendPasswordBy: PostLostPasswordBy,\n member: string,\n lastName: string\n ): Observable<CasFlowLostPasswordResponse>;\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\nimport { BehaviorSubject, Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { ConfigService, SentryLogger } from '@fcom/core/services';\nimport { mapError, mapErrorForSentry } from '@fcom/core/utils';\n\nimport {\n JoinFinnairPlusErrorResponseData,\n JoinFinnairPlusRequestData,\n JoinFinnairPlusResponseData,\n VerifyAccountTokenResponseData,\n VerifyFinnairPlusResponseData,\n} from '../../interfaces/join-finnair-plus.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class JoinService {\n public joinDialogOpen$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n constructor(\n private http: HttpClient,\n private configService: ConfigService,\n private sentryLogger: SentryLogger\n ) {}\n\n joinFinnairPlus(joinData: JoinFinnairPlusRequestData): Observable<JoinFinnairPlusResponseData> {\n const apiUrl = this.configService.cfg.loyaltyServices.legacy.loyaltyMemberUrl;\n const apiKey = this.configService.cfg.loyaltyServices.legacy.loyaltyMemberApiKey;\n\n const httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n }),\n };\n\n return this.http.post<JoinFinnairPlusResponseData>(apiUrl, joinData, httpOptions).pipe(\n catchError((error: unknown) => {\n this.sentryLogger.error('joinFinnairPlus error', {\n error: mapErrorForSentry(error),\n });\n return throwError(() => mapError<JoinFinnairPlusErrorResponseData>(error));\n })\n );\n }\n\n resendAccountVerificationEmail(memberNumber: string): Observable<VerifyFinnairPlusResponseData> {\n const apiUrl = `${this.configService.cfg.loyaltyServices.legacy.loyaltyMemberResendUrl}`;\n const apiKey = this.configService.cfg.loyaltyServices.legacy.loyaltyMemberApiKey;\n\n const httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n }),\n };\n\n const body = { memberNumber };\n\n return this.http.post<VerifyFinnairPlusResponseData>(apiUrl, body, httpOptions).pipe(\n catchError((error: unknown) => {\n this.sentryLogger.error('resendAccountVerificationEmail error', {\n error: mapErrorForSentry(error),\n });\n return throwError(() => error);\n })\n );\n }\n\n verifyAccountToken(token: string): Observable<VerifyAccountTokenResponseData> {\n const apiUrl = `${this.configService.cfg.loyaltyServices.legacy.loyaltyMemberVerifyUrl}?token=${token}`;\n const apiKey = this.configService.cfg.loyaltyServices.legacy.loyaltyMemberVerifyApiKey;\n\n const httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n }),\n };\n\n return this.http.get<VerifyAccountTokenResponseData>(apiUrl, httpOptions).pipe(\n catchError((error: unknown) => {\n this.sentryLogger.error('verifyAccountToken error', {\n error: mapErrorForSentry(error),\n });\n return throwError(() => mapError<VerifyAccountTokenResponseData>(error));\n })\n );\n }\n}\n","import { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { TagRoundingStyle } from './interfaces';\nimport { IconName } from '../icons';\n\nexport class TaggableComponent {\n castTagRoundingStyle(roundingStyle: string): TagRoundingStyle {\n return (roundingStyle as TagRoundingStyle) ?? TagRoundingStyle.DEFAULT;\n }\n\n castIconName(iconName: string): IconName {\n return iconName as IconName;\n }\n\n castIconCategory(iconCategory: string): IconLibrary {\n return iconCategory as IconLibrary;\n }\n}\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","import { ChangeDetectorRef, Injectable, Pipe, PipeTransform, OnDestroy } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable, of } from 'rxjs';\n\nimport { isPresent } from '@fcom/core/utils';\nimport { CurrencyService } from '@fcom/core';\n\n/**\n * Asynchronous price pipe that supports localizations.\n * Uses currencyService to get points in localized format.\n *\n */\n@Injectable()\n@Pipe({\n name: 'finPoints',\n pure: false,\n})\nexport class PointsPipe implements OnDestroy, PipeTransform {\n private async: AsyncPipe;\n private cached$: Observable<string>;\n private cachedAmount: number;\n\n constructor(\n private ref: ChangeDetectorRef,\n private currencyService: CurrencyService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(amount: number | string, abbreviate?: boolean): string {\n if (!isPresent(amount)) {\n return undefined;\n }\n if (this.valueChanged(amount)) {\n this.updatePoints(amount, abbreviate);\n }\n\n return this.async.transform(this.cached$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n\n private valueChanged(amount: number | string): boolean {\n return !this.cached$ || amount !== this.cachedAmount;\n }\n\n private updatePoints(amount: number | string, abbreviate = false): void {\n if (typeof amount === 'string') {\n const numberAmount = parseFloat(amount);\n this.cachedAmount = numberAmount;\n this.cached$ = amount === '0' ? of('0') : this.currencyService.formatPoints(numberAmount, abbreviate);\n }\n if (typeof amount === 'number') {\n this.cachedAmount = amount;\n this.cached$ = amount === 0 ? of('0') : this.currencyService.formatPoints(amount, abbreviate);\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { CmsArticle, CmsPicture, CmsTaxonomyGeneral, CmsVideo } from '@fcom/core-api';\nimport { isNotBlank } from '@fcom/core/utils';\nimport { type IconName } from '@fcom/ui-components';\n\n@Component({\n selector: 'cms-rich-text',\n template: `\n <fin-rich-text\n [class]=\"'block ' + extraClasses\"\n [title$]=\"title$\"\n [headerLevel]=\"headerLevel\"\n [headerStyles]=\"headerStyles\"\n [media$]=\"media$\"\n [content$]=\"content$\"\n [icons$]=\"icons$\"\n [scaleImage]=\"scaleImage\"\n [styleClasses$]=\"styleClasses$\"\n ></fin-rich-text>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsRichTextComponent implements OnInit {\n @Input()\n content$: Observable<CmsArticle>;\n @Input()\n headerLevel: number;\n @Input()\n headerStyles = [];\n @Input()\n scaleImage = true;\n @Input()\n extraClasses = 'mr-large-b';\n\n title$: Observable<string>;\n media$: Observable<CmsPicture[] | CmsVideo[]>;\n icons$: Observable<{ name: IconName; category?: IconLibrary }[]>;\n styleClasses$: Observable<string[]>;\n\n ngOnInit(): void {\n this.title$ = this.content$.pipe(\n filter((content) => !content.subjectTaxonomyTags.some((tag) => tag === CmsTaxonomyGeneral.NO_TITLE)),\n map((t) => t.teaserTitle),\n filter(isNotBlank)\n );\n\n this.media$ = this.content$.pipe(\n // Mark response explicitly as array of CmsImageData or an Array of CmsVideo but not a mix\n map((content) => content.media as CmsPicture[] | CmsVideo[]),\n filter((media) => media.length > 0)\n );\n\n this.icons$ = this.content$.pipe(\n filter((content) => !!content.localSettings?.iconName),\n map((content) => {\n const names = content.localSettings?.iconName;\n const nameArr = Array.isArray(names) ? names : [names];\n const categories = content.localSettings?.iconCategory;\n const categoryArr = Array.isArray(categories) ? categories : [categories];\n return nameArr.map((name, index) => {\n return {\n name,\n category: categoryArr?.[index] ?? IconLibrary.SVG_LIBRARY,\n };\n });\n })\n );\n\n this.styleClasses$ = this.content$.pipe(\n map((content) => content.subjectTaxonomyTags),\n map((tags) =>\n tags.filter((tag) => {\n return tag.startsWith('cmstyle-');\n })\n )\n );\n }\n}\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\nexport const CASE_NUMBER_PATTERN = /^\\d{8}$/i;\nexport const PRICE_PATTERN = /^\\d+(\\.\\d{1,2})?$/;\nexport const PHONE_NUMBER_PATTERN = /^\\+[0-9\\s]{1,15}$/;\nexport const PHONE_NUMBER_NO_SPACES_PATTERN = /^\\+[0-9]{1,15}$/;\nexport const FLIGHT_NUMBER_PATTERN = /^[A-Za-z]{2}[0-9]{1,4}$/;\nexport const FLIGHT_NUMBER_PATTERN_WITHOUT_AIRLINE_CODE = /^[0-9]{1,4}$/;\nexport const PAYMENT_IFSC_BIK_PATTERN = /^[a-z0-9]{11}$/i;\nexport const PAYMENT_KPP_PATTERN = /^[a-z0-9]{9}$/i;\nexport const PAYMENT_INN_PATTERN = /^[a-z0-9]{10}$/i;\n\nexport const atLeastOneRequired = (controls: string[]): ValidatorFn => {\n return (formGroup: AbstractControl): ValidationErrors | null => {\n const hasAtLeastOneValue = controls.some((control) => {\n return !!formGroup.get(control).value;\n });\n return hasAtLeastOneValue ? null : { atLeastOneRequired: true };\n };\n};\n","/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","import { NgModule } from '@angular/core';\n\nimport { FocusOutDirective } from './focus-out.directive';\n\n@NgModule({\n declarations: [FocusOutDirective],\n exports: [FocusOutDirective],\n})\nexport class FocusOutDirectiveModule {}\n","import { Component } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\n\n@Component({\n selector: 'fin-continue-reading',\n templateUrl: './continue-reading.component.html',\n styleUrls: ['./continue-reading.component.scss'],\n})\nexport class ContinueReadingComponent {\n public readonly inputId: string = `continuereading-${uuid()}`;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n}\n","<div class=\"continue-reading\">\n <input #input type=\"checkbox\" [attr.id]=\"inputId\" class=\"is-vishidden\" aria-hidden=\"true\" />\n\n <div class=\"collapsible\" [attr.aria-hidden]=\"!input.checked\">\n <ng-content></ng-content>\n </div>\n\n <label [attr.for]=\"inputId\" class=\"font-body-1 bold-type nordic-blue-900-text block pr-xsmall\">\n <span class=\"show-when-not-checked\" [attr.aria-hidden]=\"input.checked\">\n <fcom-icon [name]=\"SvgLibraryIcon.CHEVRON_DOWN\" class=\"icon-medium\"></fcom-icon\n ><span class=\"font-body-1 pr-xxsmall-l\">{{ 'readMore' | finLocalization }}</span>\n </span>\n <span class=\"show-when-checked\" [attr.aria-hidden]=\"!input.checked\">\n <fcom-icon [name]=\"SvgLibraryIcon.CHEVRON_UP\" class=\"icon-medium\"></fcom-icon\n ><span class=\"font-body-1 pr-xxsmall-l\">{{ 'readLess' | finLocalization }}</span>\n </span>\n </label>\n</div>\n","export enum SpinnerType {\n ROUND_ARROW,\n}\n","export enum PaymentStatus {\n /** The payment has not been initialized */\n INITIAL,\n\n /** The payment is being verified */\n PENDING_VERIFICATION,\n\n /** The payment is verified */\n VERIFIED,\n\n /** Payment processing failed. This is unrecoverable error situation and the user should be shown technical error page. */\n TECHNICAL_ERROR,\n}\n\nexport interface PaymentState {\n paymentStatus: PaymentStatus;\n redirectionUrl: string;\n paymentIds: string[];\n}\n\nexport enum PaymentFlow {\n BOOKING = 'BOOKING',\n MANAGE_BOOKING = 'MANAGE_BOOKING',\n VOLUNTARY_CHANGE = 'VOLUNTARY_CHANGE',\n CHECK_IN = 'CHECK_IN',\n CHECK_IN_FUNNEL = 'CHECK_IN_FUNNEL',\n}\n\nexport type PaymentServiceName =\n | 'finnaircom'\n | 'web_award'\n | 'web_mmb_ancillary'\n | 'finnairmobileapp_booking'\n | 'finnairmobileapp_award'\n | 'web_change_flow'\n | 'web_corporate_flow'\n | 'web_checkin';\n","import {\n FareFamily,\n FareInformation,\n FinnairBoundFareFamily,\n FinnairBoundItem,\n FinnairItineraryItemFlight,\n FinnairTravelEndpoint,\n} from '@fcom/dapi/api/models';\n\nexport interface FinnairTravelLocation extends FinnairTravelEndpoint {\n cityName?: string;\n name?: string;\n countryCode?: string;\n}\n\nexport interface FinnairBoundItemWithLocation extends FinnairBoundItem {\n departure: FinnairTravelLocation;\n arrival: FinnairTravelLocation;\n}\n\nexport interface ExtendedFareFamily extends FinnairBoundFareFamily {\n benefits: FareFamily;\n fareInformation: Array<FareInformation>;\n selected: boolean;\n disabled?: boolean;\n points?: string;\n badgeType?: FareFamilyBadgeType;\n brandName?: string;\n brandColor?: string;\n highlightedBenefits?: string[];\n isSpecialOffer?: boolean;\n isStartingFromPrice?: boolean;\n}\n\nexport enum SortBy {\n DURATION = 'duration',\n PRICE = 'price',\n ARRIVAL = 'arrival',\n DEPARTURE = 'departure',\n BEST = 'best',\n}\n\nexport enum FareFamilyBadgeType {\n NEW = 'NEW',\n POPULAR = 'POPULAR',\n CMS = 'CMS',\n}\n\nexport interface DimensionsAndDetails {\n extendedFareFamilies: ExtendedFareFamily[];\n cabinClass: string;\n itineraries?: FinnairItineraryItemFlight[][];\n}\n","export enum ChangesNotification {\n LAYOVER_SHORTER = 'layoverShorter',\n LAYOVER_LONGER = 'layoverLonger',\n BOUND_EARLIER = 'boundEarlier',\n BOUND_LATER = 'boundLater',\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { IconsModule } from '../icons';\nimport { NotificationsModule } from '../notifications/notifications.module';\nimport { ImagesModule } from '../images/images.module';\nimport { ButtonModule } from '../buttons/button.module';\nimport { ProductCardComponent } from './product-card/product-card.component';\nimport { TagModule } from '../tag';\n\n@NgModule({\n declarations: [ProductCardComponent],\n imports: [CommonModule, IconsModule, ImagesModule, ButtonModule, NotificationsModule, TagModule, UiTranslateModule],\n exports: [ProductCardComponent],\n})\nexport class ProductsModule {}\n","import { AppState } from '@fcom/core';\nimport { FareFamily, FinnairOrder, TourOperatorCode } from '@fcom/dapi/api/models';\nimport { DapiErrorStatus, IdAndHash, ServicesState } from '@fcom/dapi/interfaces';\nimport { SeatMapState } from '@fcom/common/interfaces/seat-map.interface';\n\nimport { PaymentState } from '../interfaces';\nimport { COMMON_BOOKING_FEATURE_KEY } from './constants';\n\nexport interface PassengerNameRecord {\n recLoc: string;\n lastName?: string;\n firstName?: string;\n tourOperatorCode?: TourOperatorCode | undefined;\n}\n\nexport enum OrderStatus {\n /** The order has not been initialized */\n INITIAL,\n\n /** The order is created, but is waiting for data to be refreshed from server */\n PENDING,\n\n /** The order failed to load from the given location */\n LOAD_ERROR,\n\n /** The order has been created and is ok */\n OK,\n}\n\nexport enum OrderPartStatus {\n OK,\n UPDATING,\n ERROR,\n}\nexport interface UpdatingOrderPart {\n [category: string]: OrderPartStatus;\n}\n\nexport interface OrderState {\n /** The current status of the order. */\n orderStatus: OrderStatus;\n\n /** This is the actual order data from the `GET ${orderUrl}` response. */\n orderData?: FinnairOrder;\n\n /** Error response status */\n orderResponseErrorStatus?: DapiErrorStatus;\n\n orderFetchInformation?: IdAndHash;\n\n isUpdating?: UpdatingOrderPart;\n\n PNR?: PassengerNameRecord;\n\n acceptTerms?: boolean;\n}\n\nexport interface DisruptionState {\n selectedBoundId?: string;\n}\n\nexport interface UpgradeOfferState {\n currentFareFamily?: FareFamily;\n upgradeFareFamily?: FareFamily;\n outboundId?: string;\n inboundId?: string;\n timestamp?: number;\n outboundPrice?: string;\n outboundUpgradePrice?: string;\n inboundPrice?: string;\n inboundUpgradePrice?: string;\n totalUpgradePrice?: number;\n}\n\nexport interface RedirectState {\n pnr: PassengerNameRecord;\n}\n\nexport interface CommonBookingState {\n services?: ServicesState;\n order?: OrderState;\n seatMap?: SeatMapState;\n payment?: PaymentState;\n disruption?: DisruptionState;\n upgradeOffer?: UpgradeOfferState;\n redirect?: RedirectState;\n}\n\nexport interface CommonBookingFeatureState extends AppState {\n readonly [COMMON_BOOKING_FEATURE_KEY]: CommonBookingState;\n}\n\nexport interface QuantityForFragmentAndPassenger {\n [fragmentId: string]: {\n [passengerId: string]: number;\n };\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { SortBy } from '@fcom/common-booking';\nimport { Cabin } from '@fcom/dapi/api/models';\nimport { FlightFilters, FlightTimeOption } from '@fcom/common-booking/interfaces/flight-filters.interface';\nimport { OfferListFetchParams } from '@fcom/common/interfaces';\nimport { FinnairAirBounds } from '@fcom/common/interfaces/booking/offers.interface';\n\nexport const startLoadingOutbounds = createAction('[BoundsActions] LoadStartOutbounds');\nexport const startLoadingInbounds = createAction('[BoundsActions] LoadStartInbounds');\nexport const success = createAction('[BoundsActions] LoadSuccess');\nexport const error = createAction('[BoundsActions] LoadError');\nexport const invalidInput = createAction('[BoundsActions] InvalidInput');\nexport const noFlightsFound = createAction('[BoundsActions] NoFlightsFound');\nexport const reset = createAction('[BoundsActions] Reset');\nexport const resetAllFilters = createAction(\n '[BoundsActions] ResetAllFilters',\n props<{ keepCabin?: boolean; defaultCabin?: Cabin }>()\n);\nexport const setOutbounds = createAction('[BoundsActions] SetOutbounds', props<{ bounds: FinnairAirBounds }>());\nexport const setInbounds = createAction('[BoundsActions] SetInbounds', props<{ bounds: FinnairAirBounds }>());\nexport const setLastRequestParams = createAction(\n '[BoundsActions] SetLastRequestParams',\n props<{ params: OfferListFetchParams }>()\n);\nexport const setOutboundId = createAction('[BoundsActions] SetOutboundId', props<{ outboundId: string }>());\nexport const setOutboundFareFamily = createAction(\n '[BoundsActions] SetOutboundFareFamily',\n props<{ outboundFareFamily: string }>()\n);\nexport const setOutboundAirBoundId = createAction(\n '[BoundsActions] SetOutboundAirBoundId',\n props<{ outboundAirBoundId: string }>()\n);\nexport const setInboundId = createAction('[BoundsActions] SetInboundId', props<{ inboundId: string }>());\nexport const setInboundFareFamily = createAction(\n '[BoundsActions] SetInboundFareFamily',\n props<{ inboundFareFamily: string }>()\n);\nexport const setInboundAirBoundId = createAction(\n '[BoundsActions] SetInboundAirBoundId',\n props<{ inboundAirBoundId: string }>()\n);\nexport const setSortBy = createAction('[BoundsActions] SetSortBy', props<{ sortBy: SortBy }>());\n\nexport const setDepartureTime = createAction(\n '[BoundsActions], SetDepartureTime',\n props<{ departureTime: FlightTimeOption[] }>()\n);\n\nexport const resetDepartureTime = createAction('[BoundsActions], ResetDepartureTime');\n\nexport const setArrivalTime = createAction(\n '[BoundsActions], SetArrivalTime',\n props<{ arrivalTime: FlightTimeOption[] }>()\n);\n\nexport const resetArrivalTime = createAction('[BoundsActions], ResetArrivalTime');\n\nexport const setRefundable = createAction('[BoundsActions], SetRefundable', props<{ refundable: boolean }>());\n\nexport const resetRefundable = createAction('[BoundsActions], ResetRefundable');\n\nexport const setStopsCount = createAction('[BoundsActions], SetStopsCount', props<{ stopsCount: number }>());\n\nexport const resetStopsCount = createAction('[BoundsActions], ResetStopsCount');\n\nexport const setMaxStops = createAction('[BoundsActions], SetMaxStops', props<{ maxStops: number }>());\n\nexport const resetMaxStops = createAction('[BoundsActions], ResetMaxStops');\n\nexport const setCabin = createAction('[BoundsActions], SetCabin', props<{ cabin: Cabin }>());\n\nexport const resetCabin = createAction('[BoundsActions], ResetCabin', props<{ cabin?: Cabin }>());\n\nexport const setAllFilters = createAction('[BoundsActions], SetAllFilters', props<{ filters: FlightFilters }>());\n\nexport const setNextDepartureTime = createAction(\n '[BoundsActions], SetNextDepartureTime',\n props<{ departureTime: FlightTimeOption[] }>()\n);\n\nexport const resetNextDepartureTime = createAction('[BoundsActions], ResetNextDepartureTime');\n\nexport const setNextArrivalTime = createAction(\n '[BoundsActions], SetNextArrivalTime',\n props<{ arrivalTime: FlightTimeOption[] }>()\n);\n\nexport const resetNextArrivalTime = createAction('[BoundsActions], ResetNextArrivalTime');\n\nexport const setAllNextFilters = createAction(\n '[BoundsActions], SetAllNextFilters',\n props<{ nextFilters: FlightFilters }>()\n);\n\nexport const resetAllNextFilters = createAction('[BoundsActions], ResetAllNextFilters');\n\nexport const setOutboundCache = createAction(\n '[BoundsActions], SetOutboundCache',\n props<{\n hash: string;\n createdAt: number;\n bounds: FinnairAirBounds;\n }>()\n);\n\nexport const resetOutboundCache = createAction('[BoundsActions] ResetOutboundCache');\n\nconst all = union({\n startLoadingOutbounds,\n startLoadingInbounds,\n success,\n error,\n invalidInput,\n noFlightsFound,\n reset,\n resetAllFilters,\n setOutbounds,\n setInbounds,\n setLastRequestParams,\n setOutboundId,\n setOutboundFareFamily,\n setOutboundAirBoundId,\n setInboundId,\n setInboundFareFamily,\n setInboundAirBoundId,\n setSortBy,\n setDepartureTime,\n resetDepartureTime,\n setArrivalTime,\n resetArrivalTime,\n setRefundable,\n resetRefundable,\n setStopsCount,\n resetStopsCount,\n setCabin,\n resetCabin,\n setAllFilters,\n setOutboundCache,\n resetOutboundCache,\n setAllNextFilters,\n resetAllNextFilters,\n setMaxStops,\n resetMaxStops,\n setNextArrivalTime,\n resetNextArrivalTime,\n setNextDepartureTime,\n resetNextDepartureTime,\n});\n\nexport type ActionsUnion = typeof all;\n","'use strict';\n\n/** @type {import('.')} */\nvar $defineProperty = Object.defineProperty || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","import { sortBy } from '@fcom/core/utils';\nimport { Offer } from '@fcom/dapi/api/models';\n\nexport const resolvePreselection = (offers: Offer[] = []) => {\n const offersSortedByPrice: Offer[] = sortBy(offers, (offer) => +offer.totalPrice);\n const firstOffer: Offer = offersSortedByPrice[0];\n\n return {\n outboundFareFamily: firstOffer ? firstOffer.outboundFareFamily || '' : '',\n inboundFareFamily: firstOffer ? firstOffer.inboundFareFamily || '' : '',\n outboundFareInformation: firstOffer ? firstOffer.outboundFareInformation || undefined : undefined,\n inboundFareInformation: firstOffer ? firstOffer.inboundFareInformation || undefined : undefined,\n };\n};\n","/* eslint-disable no-underscore-dangle */\nimport { filter } from 'rxjs/operators';\nimport { createSelector, select } from '@ngrx/store';\nimport { pipe } from 'rxjs';\n\nimport { BoundType, PaxAmount, Quotas } from '@fcom/dapi';\nimport { isPresent, isUndefined, LocalDate, unique } from '@fcom/core/utils';\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { Bound, Cabin, FareFamily, FinnairItineraryItem, Offer, OfferList } from '@fcom/dapi/api/models';\nimport { getGtmFlightSelectionDataForFareFamily } from '@fcom/common/utils/gtm.utils';\nimport { GtmFlightSelectionData, GtmPurchaseFlow, OfferListFetchParams } from '@fcom/common/interfaces';\nimport { FlightFilters, FlightTimeOption } from '@fcom/common-booking/interfaces/flight-filters.interface';\nimport { SortBy } from '@fcom/common-booking';\nimport { BookingFeatureState } from '@fcom/common/interfaces/booking/booking-state.interface';\nimport {\n AirOffersState,\n AirOffersStatus,\n BoundFareFamilies,\n BoundInfoWithFareFamilies,\n FareFamilyMap,\n QuotasPerBound,\n} from '@fcom/common/interfaces/booking';\n\nimport {\n effectiveCabinClass,\n getBoundFareFamilies,\n isArrivalTimeInGivenOptions,\n isDepartureTimeInGivenOptions,\n matchesBoundStopCount,\n} from '../../modules/ticket-selection/utils/offer.utils';\nimport { bookingFeatureState } from './booking-feature-state.selector';\nimport { resolvePreselection } from './offer-selector.utils';\n\nconst _airOffersState = createSelector(bookingFeatureState, (_bfs: BookingFeatureState) => _bfs?.offers);\nconst _offerStatus = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.status);\nexport const currentOffersSelector = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.currentOffers);\nconst _offersHash = createSelector(currentOffersSelector, (_o: OfferList) => _o?.hash);\nconst _offersCurrency = createSelector(currentOffersSelector, (_o: OfferList) => _o?.currency);\nconst _searchParameters = createSelector(currentOffersSelector, (_o: OfferList) => _o?.finnairSearchParameters);\nconst _offers = createSelector(currentOffersSelector, (_o: OfferList) => _o?.offers);\n\nconst _boundDepartureTime = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.filters?.departureTime);\nconst _boundArrivalTime = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.filters?.arrivalTime);\nconst _boundStopsCount = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.filters?.stopsCount);\nconst _boundCabin = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.filters?.cabin);\nconst _filters = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.filters);\nexport const offerFilters = (): StateSelector<BookingFeatureState, FlightFilters> => safeSelect(_filters);\n\nconst _filterOffersInbounds = createSelector(\n _airOffersState,\n _boundDepartureTime,\n _boundArrivalTime,\n _boundStopsCount,\n _boundCabin,\n (\n _aos: AirOffersState,\n departureTimes: FlightTimeOption[],\n arrivalTimes: FlightTimeOption[],\n stopsCount: number,\n cabin: Cabin\n ) => {\n if (!_aos?.currentOffers) {\n return _aos?.currentOffers;\n }\n\n const inbounds = filterBounds('inbound', _aos.currentOffers, departureTimes, arrivalTimes, stopsCount, cabin);\n\n return {\n ..._aos.currentOffers,\n inbounds,\n fareFamilies: filterFareFamilies('inbound', _aos.currentOffers, cabin),\n };\n }\n);\n\nconst _filterOffersOutbounds = createSelector(\n _airOffersState,\n _boundDepartureTime,\n _boundArrivalTime,\n _boundStopsCount,\n _boundCabin,\n (\n _aos: AirOffersState,\n departureTimes: FlightTimeOption[],\n arrivalTimes: FlightTimeOption[],\n stopsCount: number,\n cabin: Cabin\n ) => {\n if (!_aos?.currentOffers) {\n return _aos?.currentOffers;\n }\n const outbounds = filterBounds('outbound', _aos.currentOffers, departureTimes, arrivalTimes, stopsCount, cabin);\n\n return {\n ..._aos.currentOffers,\n outbounds,\n fareFamilies: filterFareFamilies('outbound', _aos?.currentOffers, cabin),\n };\n }\n);\n\nexport const outboundsOfferSelector = createSelector(\n _airOffersState,\n (airBoundsState: AirOffersState) => airBoundsState?.currentOffers?.outbounds\n);\nexport const inboundsOfferSelector = createSelector(\n _airOffersState,\n (airBoundsState: AirOffersState) => airBoundsState?.currentOffers?.inbounds\n);\n\nexport const oneWaySelector = createSelector(_searchParameters, (_p) =>\n isPresent(_p) ? _p.itinerary.length === 1 : undefined\n);\nconst _departureDate = createSelector(\n _searchParameters,\n (p) => (p?.itinerary?.[0].departureDate && new LocalDate(p.itinerary[0].departureDate)) || undefined\n);\nconst _returnDate = createSelector(_searchParameters, oneWaySelector, (params, oneway) =>\n oneway\n ? null\n : (params?.itinerary?.[1].departureDate && new LocalDate(params.itinerary[1].departureDate)) || undefined\n);\nconst _lastRequestParams = createSelector(_airOffersState, (_abs: AirOffersState) => _abs?.lastRequestParams);\nconst _serializedLastRequestParams = createSelector(_lastRequestParams, (lastRequestParams: OfferListFetchParams) =>\n JSON.stringify(lastRequestParams)\n);\nexport const fareFamiliesSelector = createSelector(currentOffersSelector, (_o: OfferList) => _o?.fareFamilies);\nexport const selectedOutboundIdSelector = createSelector(\n _airOffersState,\n (_aos: AirOffersState) => _aos?.selectedOutboundId\n);\nexport const selectedInboundIdSelector = createSelector(\n _airOffersState,\n (_aos: AirOffersState) => _aos?.selectedInboundId\n);\nexport const selectedOutboundFareFamilyCodeSelector = createSelector(\n _airOffersState,\n (_aos: AirOffersState) => _aos?.selectedOutboundFareFamilyCode\n);\nexport const selectedInboundFareFamilyCodeSelector = createSelector(\n _airOffersState,\n (_aos: AirOffersState) => _aos?.selectedInboundFareFamilyCode\n);\nexport const selectedSortBySelector = createSelector(_airOffersState, (_aos: AirOffersState) => _aos?.sortBy);\nconst _boundSelectionsDone = createSelector(\n oneWaySelector,\n selectedOutboundIdSelector,\n selectedInboundIdSelector,\n (oneway, outboundId, inboundId) => !!(outboundId && (oneway || inboundId))\n);\n\nconst _offersFilteredByBoundIds = createSelector(\n _offers,\n oneWaySelector,\n selectedOutboundIdSelector,\n selectedInboundIdSelector,\n (offers: Offer[] = [], isOneWay: boolean, outboundId: string, inboundId: string) => {\n const byOutboundIdIfPresent = (o) => !outboundId || o.outboundId === outboundId;\n const byInboundIdIfPresent = (o) => !inboundId || o.inboundId === inboundId;\n const filteredByOutbound = offers.filter(byOutboundIdIfPresent);\n return isOneWay ? filteredByOutbound : filteredByOutbound.filter(byInboundIdIfPresent);\n }\n);\n\nexport const _currentOffer = createSelector(\n _offers,\n oneWaySelector,\n selectedOutboundIdSelector,\n selectedInboundIdSelector,\n selectedOutboundFareFamilyCodeSelector,\n selectedInboundFareFamilyCodeSelector,\n (\n offers: Offer[] = [],\n isOneway: boolean,\n outboundId: string,\n inboundId: string,\n outboundFareFamilyCode: string,\n inboundFareFamilyCode: string\n ) => {\n const outboundMatch = (o) => o.outboundId === outboundId && o.outboundFareFamily === outboundFareFamilyCode;\n const inboundMatch = (o) => o.inboundId === inboundId && o.inboundFareFamily === inboundFareFamilyCode;\n if (isOneway) {\n return offers.find((o) => outboundMatch(o));\n }\n return offers.find((o) => outboundMatch(o) && inboundMatch(o));\n }\n);\n\nconst _fareFamilyPreselection = createSelector(_offersFilteredByBoundIds, resolvePreselection);\n\nconst _quotasForBounds = createSelector(\n currentOffersSelector,\n selectedOutboundIdSelector,\n selectedInboundIdSelector,\n (offerList: OfferList, outboundId, inboundId) => {\n if (!offerList) {\n return undefined;\n }\n const outboundQuotas: Quotas = (offerList?.outbounds?.[outboundId] as any)?.quotas || {};\n const inboundQuotas: Quotas = (offerList?.inbounds?.[inboundId] as any)?.quotas || {};\n return {\n outbound: outboundQuotas,\n inbound: inboundQuotas,\n };\n }\n);\n\n/**\n * Selects true or false dependending whether the selected ticket types have no baggage.\n * Handles both one way and return flights.\n * @param {Offer} offer\n */\nconst _hasZeroBaggageOnEitherFlight = (offer: Offer) =>\n createSelector(\n fareFamiliesSelector,\n oneWaySelector, // TODO: is this really needed here, should be deducible from the offer\n (fareFamilies: FareFamilyMap, isOneWay: boolean) => {\n if (!fareFamilies) {\n return undefined;\n }\n const outboundFareFamily: FareFamily = fareFamilies[offer.outboundFareFamily];\n const outboundBaggage = outboundFareFamily?.checkedBaggage || 0;\n if (isOneWay) {\n return outboundBaggage === 0;\n }\n const inboundFareFamily: FareFamily = fareFamilies[offer.inboundFareFamily];\n const inboundBaggage = inboundFareFamily?.checkedBaggage || 0;\n return outboundBaggage === 0 || inboundBaggage === 0;\n }\n );\n\nconst _outboundSelectionGTMData = (paxAmount: PaxAmount) =>\n createSelector(\n currentOffersSelector,\n selectedOutboundIdSelector,\n selectedOutboundFareFamilyCodeSelector,\n (offerList, outboundId, outboundFareFamilyCode) => {\n const bound = offerList?.outbounds[outboundId];\n const offer = bound\n ? offerList.offers.find((o) => o.outboundId === outboundId && o.outboundFareFamily === outboundFareFamilyCode)\n : undefined;\n\n if (bound && offer) {\n return getGtmFlightSelectionDataForFareFamily(\n bound,\n BoundType.outbound,\n bound.itinerary as FinnairItineraryItem[],\n offerList.fareFamilies[offer.outboundFareFamily]?.brandName,\n offer.outboundPrice,\n offer.outboundPointsPrice,\n offer.outboundFareInformation,\n offerList.currency,\n paxAmount,\n offer.outboundPointsPrice ? GtmPurchaseFlow.AWARD : GtmPurchaseFlow.BOOKING\n );\n }\n\n return undefined;\n }\n );\n\nconst _inboundSelectionGTMData = (paxAmount: PaxAmount) =>\n createSelector(\n currentOffersSelector,\n selectedInboundIdSelector,\n selectedInboundFareFamilyCodeSelector,\n (offerList, boundId, fareFamilyCode) => {\n const bound = offerList?.inbounds?.[boundId];\n const offer = bound\n ? offerList.offers.find((o) => o.inboundId === boundId && o.inboundFareFamily === fareFamilyCode)\n : undefined;\n\n if (bound && offer) {\n return getGtmFlightSelectionDataForFareFamily(\n bound,\n BoundType.inbound,\n bound.itinerary as FinnairItineraryItem[],\n offerList.fareFamilies[offer.inboundFareFamily]?.brandName,\n offer.inboundPrice,\n offer.inboundPointsPrice,\n offer.inboundFareInformation,\n offerList.currency,\n paxAmount,\n offer.inboundPointsPrice ? GtmPurchaseFlow.AWARD : GtmPurchaseFlow.BOOKING\n );\n }\n\n return undefined;\n }\n );\n\nconst _flightSelectionGTMDataForOffers = (\n bound: BoundInfoWithFareFamilies,\n boundType: BoundType,\n paxAmount: PaxAmount\n) =>\n createSelector(currentOffersSelector, (offerList) => {\n return offerList\n ? bound.fareFamilies.map((fareFamily) =>\n getGtmFlightSelectionDataForFareFamily(\n bound,\n boundType,\n bound.itinerary as FinnairItineraryItem[],\n offerList.fareFamilies[fareFamily.fareFamilyCode]?.brandName,\n fareFamily.price,\n fareFamily.points,\n fareFamily.fareInformation,\n offerList.currency,\n paxAmount,\n fareFamily.points ? GtmPurchaseFlow.AWARD : GtmPurchaseFlow.BOOKING\n )\n )\n : undefined;\n });\n\nconst filterBounds = (\n type: 'inbound' | 'outbound',\n offerList: OfferList,\n departureTimes: FlightTimeOption[],\n arrivalTimes: FlightTimeOption[],\n stopsCount: number,\n cabin: Cabin\n): { [key: string]: Bound } => {\n const { fareFamilies, offers } = offerList;\n const boundKey = type === 'inbound' ? 'inbounds' : 'outbounds';\n const bounds = offerList[boundKey];\n\n if (!bounds) {\n return bounds;\n }\n\n return Object.entries(bounds).reduce((filteredBoundObject, [id, bound]) => {\n const shouldKeepBound =\n matchesBoundStopCount(stopsCount, bound.stops) &&\n isArrivalTimeInGivenOptions(arrivalTimes, bound.arrival.dateTime) &&\n isDepartureTimeInGivenOptions(departureTimes, bound.departure.dateTime) &&\n isCabinIncludedInBoundOffer(cabin, fareFamilies, offers, bound, type);\n\n if (shouldKeepBound) {\n return { ...filteredBoundObject, [id]: bound };\n }\n return filteredBoundObject;\n }, {});\n};\n\nconst filterFareFamilies = (\n type: 'inbound' | 'outbound',\n offerList: OfferList,\n cabin: Cabin\n): Record<string, FareFamily> => {\n if (cabin === Cabin.MIXED) {\n return offerList.fareFamilies;\n }\n\n const fareFamilyIdKey: 'inboundFareFamily' | 'outboundFareFamily' = `${type}FareFamily`;\n const fareFamilyInfoKey: 'inboundFareInformation' | 'outboundFareInformation' = `${type}FareInformation`;\n\n return (\n Object.entries(offerList.fareFamilies)\n // Get the cabin classes for the fareFamilyId based on the currentOffer offers lits\n .map(([fareFamilyId, fareFamily]) => {\n const fareFamilyCabinClasses = offerList.offers\n .filter((o) => o[fareFamilyIdKey] === fareFamilyId)\n .flatMap((o) => o[fareFamilyInfoKey].map((info) => info.cabinClass) ?? [])\n .filter(unique);\n\n return {\n fareFamilyId,\n fareFamily,\n fareFamilyCabinClasses,\n };\n })\n // Convert the array to object and exclude the ones that don't contain the cabin\n .reduce<Record<string, FareFamily>>((acc, fi) => {\n if (fi.fareFamilyCabinClasses.includes(cabin)) {\n acc[fi.fareFamilyId] = fi.fareFamily;\n }\n return acc;\n }, {})\n );\n};\n\n/**\n * Selects the current status of the air offers query\n */\nexport const offersStatus = (): StateSelector<BookingFeatureState, AirOffersStatus> => safeSelect(_offerStatus);\n\n/**\n * Selects the current offers from the state. Will not emit if not present.\n */\nexport const currentOffers = (): StateSelector<BookingFeatureState, OfferList> => safeSelect(currentOffersSelector);\n\n/**\n * Filters the current offers outbounds from the state. Will not emit if not present.\n */\nexport const filteredCurrentOffersOutbound = (): StateSelector<BookingFeatureState, OfferList> =>\n safeSelect(_filterOffersOutbounds);\n\n/**\n * Filters the current offers inbound from the state. Will not emit if not present.\n */\nexport const filteredCurrentOffersInbound = (): StateSelector<BookingFeatureState, OfferList> =>\n safeSelect(_filterOffersInbounds);\n\n/**\n * Gets the hash returned with the offers\n */\nexport const offersHash = (): StateSelector<BookingFeatureState, string> => safeSelect(_offersHash);\n/**\n * Gets the currency code used with the offers\n */\nexport const offersCurrency = (): StateSelector<BookingFeatureState, string> => safeSelect(_offersCurrency);\nexport const isOneWayOffers = (): StateSelector<BookingFeatureState, boolean> => safeSelect(oneWaySelector);\n\nexport const offersDepartureDate = (): StateSelector<BookingFeatureState, LocalDate> => safeSelect(_departureDate);\n\nexport const offersReturnDate = (): StateSelector<BookingFeatureState, LocalDate> =>\n pipe(\n select(_returnDate),\n filter((o) => !isUndefined(o))\n );\n\n/**\n * Params of the last request\n */\nexport const offerLastRequestParams = (): StateSelector<BookingFeatureState, OfferListFetchParams> =>\n select(_lastRequestParams);\n\n/**\n * Serialized version of the params of the last request\n */\nexport const offerSerializedLastRequestParams = (): StateSelector<BookingFeatureState, string> =>\n select(_serializedLastRequestParams);\n\n/**\n * Selects the current fareFamilies of offers from the state. Will not emit if not present.\n */\nexport const currentFareFamilies = (): StateSelector<BookingFeatureState, FareFamilyMap> =>\n select(fareFamiliesSelector);\nexport const selectedOutboundId = (): StateSelector<BookingFeatureState, string> => select(selectedOutboundIdSelector);\nexport const selectedOutboundFareFamilyCode = (): StateSelector<BookingFeatureState, string> =>\n select(selectedOutboundFareFamilyCodeSelector);\nexport const selectedInboundId = (): StateSelector<BookingFeatureState, string> => select(selectedInboundIdSelector);\n\nexport const selectedInboundFareFamilyCode = (): StateSelector<BookingFeatureState, string> =>\n select(selectedInboundFareFamilyCodeSelector);\nexport const boundSelectionsDone = (): StateSelector<BookingFeatureState, boolean> => select(_boundSelectionsDone);\n\nexport const offersFilteredByBoundIds = (): StateSelector<BookingFeatureState, Offer[]> =>\n select(_offersFilteredByBoundIds);\n\nexport const currentOffer = (): StateSelector<BookingFeatureState, Offer> => select(_currentOffer);\nexport const fareFamilyPreselection = (): StateSelector<BookingFeatureState, BoundFareFamilies> =>\n select(_fareFamilyPreselection);\n\nexport const quotasForBounds = (): StateSelector<BookingFeatureState, QuotasPerBound> => safeSelect(_quotasForBounds);\n\nexport const hasZeroBaggageOnEitherFlight = (offer: Offer): StateSelector<BookingFeatureState, boolean> =>\n safeSelect(_hasZeroBaggageOnEitherFlight(offer));\n\nexport const selectedTicketSortBy = (): StateSelector<BookingFeatureState, SortBy> => select(selectedSortBySelector);\n\nexport const outboundOffersSelectionGtmData = (\n paxAmount: PaxAmount\n): StateSelector<BookingFeatureState, GtmFlightSelectionData> => safeSelect(_outboundSelectionGTMData(paxAmount));\n\nexport const inboundOffersSelectionGtmData = (\n paxAmount: PaxAmount\n): StateSelector<BookingFeatureState, GtmFlightSelectionData> => safeSelect(_inboundSelectionGTMData(paxAmount));\n\nexport const flightSelectionGtmDataForOffers = (\n bound: BoundInfoWithFareFamilies,\n boundType: BoundType,\n paxAmount: PaxAmount\n): StateSelector<BookingFeatureState, GtmFlightSelectionData[]> =>\n safeSelect(_flightSelectionGTMDataForOffers(bound, boundType, paxAmount));\n\nconst isCabinIncludedInBoundOffer = (\n cabin: Cabin,\n fareFamilies: { [key: string]: FareFamily },\n offers: Offer[],\n bound: Bound,\n type: 'outbound' | 'inbound'\n) => {\n if (cabin && cabin === Cabin.MIXED) {\n return true;\n }\n\n const boundFareFamilies = getBoundFareFamilies(Object.values(fareFamilies), offers, bound, type);\n\n return boundFareFamilies.some((ff) => effectiveCabinClass(ff) === cabin);\n};\n","import { OperatorFunction } from \"../types\";\nimport { map } from \"../operators/map\";\n\nconst { isArray } = Array;\n\nfunction callOrApply<T, R>(fn: ((...values: T[]) => R), args: T|T[]): R {\n return isArray(args) ? fn(...args) : fn(args);\n}\n\n/**\n * Used in several -- mostly deprecated -- situations where we need to \n * apply a list of arguments or a single argument to a result selector.\n */\nexport function mapOneOrManyArgs<T, R>(fn: ((...values: T[]) => R)): OperatorFunction<T|T[], R> {\n return map(args => callOrApply(fn, args))\n}","/* eslint-disable */\nexport enum SubCategory {\n BAGGAGE = 'baggage',\n OVERSIZED_BAGGAGE = 'oversizedBaggage',\n CHECKED_BAGGAGE = 'checkedBaggage',\n CHECKED_BAGGAGE_NON_AY = 'checkedBaggageNonAy',\n CABIN_BAGGAGE = 'cabinBaggage',\n CABIN_BAGGAGE_NON_AY = 'cabinBaggageNonAy',\n CABIN_ITEM = 'cabinItem',\n CABIN_INFANT = 'cabinInfant',\n CABIN_WEIGHT = 'cabinWeight',\n MEAL = 'meal',\n SPECIAL_DIET = 'specialDiet',\n SEAT = 'seat',\n WIFI = 'wifi',\n LOUNGE = 'lounge',\n MEDICAL = 'medical',\n ASSISTANCE = 'assistance',\n PETS = 'pets',\n TRAVEL_COMFORT = 'travelComfort',\n COVER = 'cover',\n OTHER = 'other',\n PET_IN_HOLD = 'petInHold',\n PET_IN_CABIN = 'petInCabin',\n BIKE = 'bike',\n WINDSURFING = 'windsurfing',\n SKIS = 'skis',\n SKI_JUMPING = 'skiJumping',\n SPORTS_MEDIUM = 'sportsMedium',\n SPORTS_LARGE = 'sportsLarge',\n HOCKEY = 'hockey',\n GOLF = 'golf',\n SURF = 'surf',\n TIER_BENEFIT_SPORT_EQUIPMENT = 'tierBenefitSportEquipment',\n TANDEM_BIKE = 'tandemBike',\n VAULTING_POLE = 'vaultingPole',\n SPECIAL_EQUIPMENT = 'specialEquipment',\n MUSICAL_MEDIUM = 'musicalMedium',\n MUSICAL_LARGE = 'musicalLarge',\n MEDIA = 'media',\n HEAVY_OR_LARGE = 'heavyOrLarge',\n FIREARM = 'firearm',\n OXYGEN = 'oxygen',\n APNEA_DEVICE = 'apneaDevice',\n WHEELCHAIR_DRY_CELL = 'wheelchairDryCell',\n WHEELCHAIR_WET_CELL = 'wheelchairWetCell',\n WHEELCHAIR_ASSISTANCE_SEAT = 'wheelchairAssistanceSeat',\n WHEELCHAIR_ASSISTANCE_RAMP = 'wheelchairAssistanceRamp',\n WHEELCHAIR_ASSISTANCE_STEPS = 'wheelchairAssistanceSteps',\n WHEELCHAIR_MANUAL_POWER = 'wheelchairManualPower',\n WHEELCHAIR_ON_BOARD = 'wheelchairOnBoard',\n WHEELCHAIR_LITHIUM_ION = 'wheelchairLithiumIon',\n MOBILITY_AID = 'mobilityAid',\n CHILD_ASSISTANCE = 'childAssistance',\n FRESH_MEAL = 'freshMeal',\n HOT_PRE_ORDER_MEAL = 'hotPreOrderMeal',\n SERVICE_ANIMAL = 'serviceAnimal',\n EMOTIONAL_SUPPORT_ANIMAL = 'emotionalSupportAnimal',\n FAST_TRACK = 'fastTrack',\n PRIORITY_SERVICES = 'priorityServices',\n SAF_LOW = 'safLow',\n SAF_MID = 'safMid',\n SAF_HIGH = 'safHigh'\n}\n\n","import { createAction, props, union } from '@ngrx/store';\n\nimport {\n CasProfile,\n LoginAccessToken,\n LoginPhaseError,\n LoginStep,\n LoginPhaseProfile,\n Profile,\n} from '@fcom/core-api/login';\n\nexport const setAccessToken = createAction('[LoginActions] SetToken', props<{ accessToken: LoginAccessToken }>());\nexport const clearAccessToken = createAction('[LoginActions] ClearToken');\nexport const setProfile = createAction('[LoginActions] SetProfile', props<{ profile: Profile }>());\nexport const setCasProfile = createAction('[LoginActions] SetCasProfile', props<{ casProfile: CasProfile }>());\nexport const setLoginError = createAction('[LoginActions] Error');\nexport const setNotLoggedIn = createAction('[LoginActions] SetNotLoggedIn');\nexport const setLoginPhaseExecutionToken = createAction('[LoginActions] SetExecutionToken', props<{ token: string }>());\n\nexport const setLoginPhaseStep = createAction('[LoginActions] setLoginPhaseStep', props<{ step: LoginStep }>());\nexport const setLoginPhaseProfile = createAction(\n '[LoginActions] SetLoginPhaseProfile',\n props<{ profile: LoginPhaseProfile }>()\n);\nexport const setLoginPhaseError = createAction(\n '[LoginActions] setLoginPhaseError',\n props<{ error: LoginPhaseError }>()\n);\nexport const clearLoginPhase = createAction('[LoginActions] clearLoginPhase');\n\nconst all = union({\n setAccessToken,\n clearAccessToken,\n setProfile,\n setLoginError,\n setNotLoggedIn,\n clearLoginPhase,\n setLoginPhaseStep,\n setLoginPhaseProfile,\n setLoginPhaseError,\n setLoginPhaseExecutionToken,\n setCasProfile,\n});\n\nexport type LoginActionUnion = typeof all;\n","import { createAction, union, props } from '@ngrx/store';\n\nimport { LatLng } from '../interfaces';\n\nexport const setAkamaiGeolocation = createAction('NavigatorActions/SetAkamai', props<{ location: LatLng }>());\nexport const setBrowserGeolocation = createAction('NavigatorActions/SetBrowser', props<{ location: LatLng }>());\nexport const setBrowserGeolocationLoading = createAction('NavigatorActions/SetBrowserLoading');\nexport const removeBrowserGeolocationLoading = createAction('NavigatorActions/RemoveBrowserLoading');\nexport const setServerTime = createAction(\n 'NavigatorActions/SetServerTime',\n props<{ serverMillisFromEpoch: number; timeOffset: number }>()\n);\n\nconst all = union({\n setAkamaiGeolocation,\n setBrowserGeolocation,\n setBrowserGeolocationLoading,\n removeBrowserGeolocationLoading,\n setServerTime,\n});\nexport type NavigatorActionsUnion = typeof all;\n","import { createAction, union, props } from '@ngrx/store';\n\nexport const setValue = createAction('PseudoLocalActions/Set', props<{ key: string; data: any }>());\nexport const destroyValue = createAction('PseudoLocalActions/Destroy', props<{ key: string }>());\n\nconst all = union({ setValue, destroyValue });\nexport type PseudoLocalActionsUnion = typeof all;\n","<div class=\"relative\" data-testid=\"table-container\" *ngIf=\"fareFamiliesWithMappedBenefits?.length > 0\">\n <fin-scroll-handle-container #scrollContainer [elements]=\"tableHeaders\">\n <table class=\"align-left\">\n <caption class=\"is-vishidden\">\n {{\n 'ticketSelection.compareBenefits' | finLocalization\n }}\n </caption>\n <tr>\n <th\n *ngFor=\"let fareFamily of fareFamiliesWithMappedBenefits; let first = first; let last = last\"\n #tableHeader\n scope=\"col\"\n class=\"nordic-blue-50-bg fare-family-table-header ps-medium-x ps-xsmall-y border-left border-top\"\n [ngClass]=\"{\n 'rounded-top-left-large': first && !last,\n 'border-right': last,\n 'rounded-top-right-large': last && !first,\n 'rounded-top-large': last && first,\n }\"\n >\n <div class=\"font-body-1 nordic-blue-900-text\" data-testid=\"brand-name\">\n {{ fareFamily.brandName }}\n </div>\n </th>\n </tr>\n <tr *ngFor=\"let benefitKey of benefitKeys; let lastRow = last; odd as isOdd\" data-testid=\"benefit-row\">\n <ng-container\n *ngFor=\"let fareFamily of fareFamiliesWithMappedBenefits; let firstCell = first; let lastCell = last\"\n >\n <td\n *ngIf=\"fareFamily.benefits[benefitKey]\"\n class=\"ps-medium-x ps-xsmall-y border-left\"\n [ngClass]=\"{\n 'nordic-blue-50-bg': isOdd,\n 'border-bottom': lastRow,\n 'border-right': lastCell,\n 'rounded-bottom-large': lastRow && firstCell && lastCell,\n 'rounded-bottom-left-large': lastRow && firstCell && !lastCell,\n 'rounded-bottom-right-large': lastRow && lastCell && !firstCell,\n }\"\n >\n <div class=\"flex flex--row flex--top\">\n <div class=\"flex-1\">\n <div\n class=\"nordic-blue-900-text bold-type font-body-2 benefitLabel\"\n data-testid=\"benefit-label\"\n [class.heather-700-text]=\"\n showKoreaNotification && (benefitKey === 'rebook' || benefitKey === 'cancel')\n \"\n >\n {{ fareFamily.benefits[benefitKey]?.label }}\n </div>\n <div class=\"nordic-blue-900-text regular-type font-body-2\" data-testid=\"benefit-value\">\n {{ fareFamily.benefits[benefitKey]?.value }}\n </div>\n </div>\n <div class=\"flex--nogrow\" *ngIf=\"showIcons\">\n <fcom-icon\n class=\"icon-medium heather-700-text\"\n [dataTestId]=\"'benefit-icon-' + SvgLibraryIcon.CHECKMARK\"\n [name]=\"SvgLibraryIcon.CHECKMARK\"\n *ngIf=\"fareFamily.benefits[benefitKey]?.isPositive\"\n ></fcom-icon>\n <fcom-icon\n class=\"icon-medium\"\n [dataTestId]=\"'benefit-icon-' + SvgLibraryIcon.CLOSE_DELETE\"\n [name]=\"SvgLibraryIcon.CLOSE_DELETE\"\n *ngIf=\"fareFamily.benefits[benefitKey] && !fareFamily.benefits[benefitKey].isPositive\"\n ></fcom-icon>\n </div>\n </div>\n <ng-container *ngIf=\"fareFamily.benefits[benefitKey]?.children\">\n <div\n class=\"flex flex--row flex--top pr-small-l\"\n *ngFor=\"let childBenefit of fareFamily.benefits[benefitKey].children\"\n >\n <div class=\"flex-1\">\n <div\n class=\"nordic-blue-900-text bold-type font-body-2 benefitLabel\"\n data-testid=\"benefit-label\"\n [class.heather-700-text]=\"\n showKoreaNotification && (benefitKey === 'rebook' || benefitKey === 'cancel')\n \"\n >\n {{ childBenefit.label }}\n </div>\n <div class=\"nordic-blue-900-text regular-type font-body-2\" data-testid=\"benefit-value\">\n {{ childBenefit.value }}\n </div>\n </div>\n <div class=\"flex--nogrow\" *ngIf=\"showIcons\">\n <fcom-icon\n class=\"icon-medium heather-700-text\"\n [dataTestId]=\"'benefit-icon-' + SvgLibraryIcon.CHECKMARK\"\n [name]=\"SvgLibraryIcon.CHECKMARK\"\n *ngIf=\"childBenefit.isPositive\"\n ></fcom-icon>\n <fcom-icon\n class=\"icon-medium\"\n [dataTestId]=\"'benefit-icon-' + SvgLibraryIcon.CLOSE_DELETE\"\n [name]=\"SvgLibraryIcon.CLOSE_DELETE\"\n *ngIf=\"!childBenefit.isPositive\"\n ></fcom-icon>\n </div>\n </div>\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </table>\n </fin-scroll-handle-container>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { unique, uniqueBy } from '@fcom/core/utils';\nimport { FareFamily, TranslatedBenefitRow } from '@fcom/dapi/api/models';\nimport { ScrollHandleContainerComponent } from '@fcom/common/components/scroll-handle-container/scroll-handle-container.component';\n\nexport interface FareFamilyWithMappedBenefits extends FareFamily {\n benefits: {\n [id: string]: TranslatedBenefitRow;\n };\n}\n\n@Component({\n selector: 'fin-fare-family-table',\n styleUrls: ['./fare-family-table.component.scss'],\n templateUrl: './fare-family-table.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FareFamilyTableComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @ViewChild('scrollContainer', { static: false }) scrollContainer: ScrollHandleContainerComponent;\n @ViewChildren('tableHeader', { read: ElementRef }) tableHeaders: QueryList<ElementRef>;\n\n @Input()\n showIcons = true;\n\n @Input()\n set fareFamilies(fareFamilies: FareFamily[]) {\n if (!fareFamilies || !fareFamilies[0]) {\n return;\n }\n\n this.fareFamiliesWithMappedBenefits = fareFamilies\n .map((fareFamily) => ({\n ...fareFamily,\n benefits: fareFamily.translatedBenefitRows.reduce(\n (acc, benefitRow) => ({ ...acc, [benefitRow.key]: benefitRow }),\n {} as { [id: string]: TranslatedBenefitRow }\n ),\n }))\n .filter(uniqueBy((fareFamily) => fareFamily.fareFamilyCode));\n\n const fareFamily = fareFamilies[0];\n const allBenefitKeys = fareFamily.translatedBenefitRows.map((benefitRow) => benefitRow.key);\n\n this.benefitKeys = fareFamily.highlightedBenefitKeys\n ? [...fareFamily.highlightedBenefitKeys, ...allBenefitKeys].filter(unique)\n : allBenefitKeys;\n\n if (this.scrollContainer) {\n this.scrollContainer.updateScrollHandles();\n }\n }\n\n @Input()\n showKoreaNotification: boolean;\n\n public benefitKeys: string[];\n public fareFamiliesWithMappedBenefits: FareFamilyWithMappedBenefits[] = [];\n}\n","import { OnDestroy, Pipe, PipeTransform } from '@angular/core';\n\nimport { Observable, BehaviorSubject, Subscription } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * Performance optimization for *ngFor\n * Converts an Observable<Array<any>> to Array<Observable<any>>.\n * <p>\n * Each observable element of the array is optimized to emit signals\n * only when the value changes.\n * <p>\n * <b>NOTE:</b> The values are compared by reference, not deeply.\n * <p>\n * This allows for rendering optimization since only the necessary\n * parts are re-rendered.\n *\n * @example\n * <pre>\n * <li *ngFor=\"let obs of (myObservableArray | finObsToArray)\">\n * <!-- obs => Observable<any> -->\n * </li>\n * </pre>\n */\n@Pipe({\n name: 'finObsToArray',\n pure: false,\n})\nexport class ObservableToArrayPipe implements OnDestroy, PipeTransform {\n private arr: Array<BehaviorSubject<any>> = [];\n private val: Array<Observable<any>> = [];\n private s: Subscription;\n private cachedInput: any;\n\n transform<T>(input$: Observable<Array<T>>): Array<Observable<T>> {\n if (!this.s || input$ !== this.cachedInput) {\n this.s = this.createSubscription(input$);\n this.cachedInput = input$;\n }\n return this.val;\n }\n\n ngOnDestroy(): void {\n if (this.s) {\n this.s.unsubscribe();\n }\n if (this.arr) {\n this.arr.forEach((e) => e.complete());\n }\n this.arr = undefined;\n this.val = undefined;\n this.s = undefined;\n }\n\n private createSubscription(input$: Observable<Array<any>>): Subscription {\n if (this.s) {\n this.s.unsubscribe();\n }\n let shouldThrow = false;\n const sub = input$.subscribe((d: Array<any>) => {\n if (!Array.isArray(d)) {\n shouldThrow = true;\n }\n if (d.length < this.arr.length) {\n for (let i = this.arr.length - 1; i >= d.length; i--) {\n const obs$ = this.arr[i];\n delete this.arr[i];\n delete this.val[i];\n this.arr.length = this.arr.length - 1;\n this.val.length = this.val.length - 1;\n obs$.complete();\n }\n }\n for (let i = 0; i < d.length; i++) {\n if (!this.arr[i]) {\n this.arr[i] = new BehaviorSubject(d[i]);\n this.val[i] = this.arr[i].pipe(distinctUntilChanged());\n } else {\n this.arr[i].next(d[i]);\n }\n }\n });\n if (shouldThrow) {\n throw new Error('Input should be an observable of array');\n }\n return sub;\n }\n}\n","declare const window: Window;\n\nexport abstract class WindowRef {\n get nativeWindow(): Window {\n throw new Error('unimplemented');\n }\n}\n\nexport class BrowserWindowRef extends WindowRef {\n get nativeWindow(): Window {\n // return the global native browser window object\n return window;\n }\n}\n\nexport class NullWindowRef extends WindowRef {}\n\nexport const WINDOW_PROVIDERS = [{ provide: WindowRef, useClass: BrowserWindowRef }];\n","export const typeGuard = (object: any, ...fields: string[]): boolean => {\n if (!object || !fields) {\n return false;\n }\n return fields.reduce((result, field) => result && field in object, true);\n};\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport const coerceBooleanProperty = (value: unknown): boolean => {\n return value != null && `${String(value)}` !== 'false';\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ConfigService } from '@fcom/core/services';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\n\nimport { OndLocationsRequestBody, OndLocationsResponse, OndPairRequestBody, OndPairResponse } from '../interfaces';\n\nconst RETRY_COUNT = 2;\n\n@Injectable()\nexport class OndMarketingDataService {\n constructor(\n private http: HttpClient,\n private configService: ConfigService,\n private languageService: LanguageService\n ) {}\n\n public fetchLocations(destinationLocationCodes: string[]): Observable<OndLocationsResponse> {\n const body: OndLocationsRequestBody = {\n destinations: destinationLocationCodes,\n lang: this.languageService.langValue,\n };\n\n return this.http\n .post<OndLocationsResponse>(`${this.configService.cfg.ondMarketingOffersUrl}/fetch-locations`, body)\n .pipe(retryWithBackoff(RETRY_COUNT), finShare());\n }\n\n public fetchLocationPairs(body: OndPairRequestBody): Observable<OndPairResponse> {\n return this.http\n .post<OndPairResponse>(`${this.configService.cfg.ondMarketingOffersUrl}/fetch-location-pairs`, body)\n .pipe(finShare());\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\n\nimport { combineLatest, EMPTY, Observable, of } from 'rxjs';\nimport { catchError, distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';\n\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { getBookingStepLink } from '@fcom/common/utils/booking-common.utils';\nimport { ConfigService, SentryLogger, GlobalBookingTravelClass, LocationRouteCffService } from '@fcom/core';\nimport { add, isEmptyObjectOrHasEmptyValues, mapValues, TimeUnit, toISO8601, unique, valuesOf } from '@fcom/core/utils';\nimport { CmsDestination } from '@fcom/core-api';\nimport { DatePriceList, PriceList } from '@fcom/dapi/api/models';\nimport { InstantsearchService } from '@fcom/dapi/api/services';\nimport { finShare } from '@fcom/rx';\n\nimport { OndMarketingDataService } from './ond-marketing-data.service';\nimport { OndLocationsResponse, OndMarketingOffer, OndPairEnhancedResponse, OndPairRequestBody } from '../interfaces';\nimport { constructOndHeadingPath, getCurrentCountry, isCountryCode } from './utils';\n\nexport const OFFERS_CACHE_TIME_IN_MILLIS = 60 * 1000; // 1 minute\n\n@Injectable()\nexport class OndMarketingOffersService {\n private flightsDataCache$: { [key: string]: { expires: number; stream$: Observable<OndMarketingOffer[]> } } = {};\n private offersDataCache$: { [key: string]: { expires: number; stream$: Observable<OndMarketingOffer[]> } } = {};\n private locationsDataCache$: { [key: string]: { expires: number; stream$: Observable<OndLocationsResponse> } } = {};\n\n constructor(\n private sentryLogger: SentryLogger,\n private ondMarketingDataService: OndMarketingDataService,\n private languageService: LanguageService,\n private instantsearchService: InstantsearchService,\n private configService: ConfigService,\n private locationRouteCffService: LocationRouteCffService\n ) {}\n\n fetchLocationPairs(requestBody: OndPairRequestBody): Observable<OndPairEnhancedResponse> {\n return this.ondMarketingDataService.fetchLocationPairs(requestBody).pipe(\n filter((pairs) => !isEmptyObjectOrHasEmptyValues(pairs)),\n switchMap((pairs) => {\n const translationsToFetch = valuesOf(pairs)\n .reduce((locationCodes, pair) => locationCodes.concat(pair.origin, pair.destination), [])\n .filter(unique);\n\n return this.getLocationData(translationsToFetch).pipe(\n map((locations) => {\n return mapValues(pairs, (pair) => {\n return {\n ...pair,\n originCityName: locations[pair.origin]?.cityName,\n originCountryName: locations[pair.origin]?.country,\n originCountryCode: locations[pair.origin]?.countryCode,\n destinationCityName: locations[pair.destination]?.cityName,\n destinationCountryName: locations[pair.destination]?.country,\n destinationCountryCode: locations[pair.destination]?.countryCode,\n };\n });\n })\n );\n }),\n catchError((e: unknown) => this.handleError<OndPairEnhancedResponse>(e, 'Error getting ond location pairs')),\n finShare()\n );\n }\n\n getDestinationLocationCode(content$: Observable<CmsDestination>): Observable<string> {\n return content$.pipe(\n filter<CmsDestination>(Boolean),\n map((content) => content.locationCode),\n filter<string>(Boolean),\n finShare()\n );\n }\n\n getHeading(\n originLocationCode$: Observable<string>,\n destinationLocationCode$: Observable<string>,\n ondOffers$: Observable<OndMarketingOffer[]>,\n headingType: string\n ): Observable<string> {\n return combineLatest([originLocationCode$, destinationLocationCode$, ondOffers$]).pipe(\n switchMap(([originLocationCode, destinationLocationCode, offers]) => {\n const origin = isCountryCode(originLocationCode) ? offers[0]?.originCountryName : offers[0]?.originCityName;\n const destination = isCountryCode(destinationLocationCode)\n ? offers[0]?.destinationCountryName\n : offers[0]?.destinationCityName;\n\n return this.languageService.translate(\n constructOndHeadingPath(headingType, {\n destination: destinationLocationCode,\n origin: originLocationCode,\n }),\n {\n origin,\n destination,\n originLocationCode: originLocationCode,\n destinationLocationCode: destinationLocationCode,\n }\n );\n }),\n distinctUntilChanged(),\n finShare()\n );\n }\n\n getOffersOrFlightData(\n originLocationCode$: Observable<string>,\n destinationLocationCode$: Observable<string>,\n links$: Observable<OndPairEnhancedResponse>\n ): Observable<OndMarketingOffer[]> {\n const destinationLocationCodes$ = destinationLocationCode$.pipe(\n switchMap((locationCode) => {\n if (locationCode) {\n return of([locationCode]);\n } else {\n return links$.pipe(\n map((links) => {\n return valuesOf(links).map((link) => link.destination);\n })\n );\n }\n })\n );\n\n return combineLatest([originLocationCode$, destinationLocationCodes$]).pipe(\n switchMap(([originLocationCode, destinationLocationCodes]) => {\n if (originLocationCode && !isCountryCode(originLocationCode)) {\n return this.getOfferData(destinationLocationCodes, originLocationCode);\n } else {\n return this.getFlightsData(\n [\n isCountryCode(originLocationCode)\n ? originLocationCode\n : getCurrentCountry(this.languageService.langValue),\n ],\n destinationLocationCodes,\n isCountryCode(originLocationCode) ? 'from' : 'to'\n );\n }\n }),\n finShare()\n );\n }\n\n private getFlightsData(\n departureLocationCodes: string[],\n destinationLocationCodes: string[],\n direction?: string\n ): Observable<OndMarketingOffer[]> {\n const cacheKey = departureLocationCodes.join('-') + destinationLocationCodes.join('-') + direction;\n if (!this.flightsDataCache$[cacheKey] || Date.now() >= this.flightsDataCache$[cacheKey].expires) {\n const stream$: Observable<OndMarketingOffer[]> = this.instantsearchService\n .postPricesForFlights(this.configService.cfg.instantSearchUrl, {\n body: {\n departureLocationCodes,\n destinationLocationCodes,\n locale: this.languageService.langValue,\n },\n })\n .pipe(\n map((data) =>\n valuesOf(data.prices)\n .map((destinations) => valuesOf(destinations))\n .flat()\n .map(this.flightPriceMapper)\n ),\n switchMap((offers) => this.enhanceOffersWithTranslations(offers)),\n catchError(() => EMPTY),\n finShare()\n );\n this.flightsDataCache$[cacheKey] = {\n stream$,\n expires: Date.now() + OFFERS_CACHE_TIME_IN_MILLIS,\n };\n }\n\n return this.flightsDataCache$[cacheKey].stream$;\n }\n\n private getOfferData(\n destinationLocationCodes: string[],\n departureLocationCode: string\n ): Observable<OndMarketingOffer[]> {\n const cacheKey = departureLocationCode + destinationLocationCodes.join('-');\n if (!this.offersDataCache$[cacheKey] || Date.now() >= this.offersDataCache$[cacheKey].expires) {\n const stream$: Observable<OndMarketingOffer[]> = this.instantsearchService\n .getPricesForOffers(this.configService.cfg.instantSearchUrl, {\n destinationLocationCodes,\n departureLocationCode,\n departureDate: toISO8601(add(new Date(), 1, TimeUnit.day)),\n numberOfDays: 60,\n lengthOfStay: '3-10',\n travelClasses: [GlobalBookingTravelClass.ECONOMY.toLowerCase()],\n })\n .pipe(\n map((data) =>\n valuesOf(data.prices)\n .map((destinations) => valuesOf(destinations))\n .flat(2)\n .map(this.offersPriceMapper)\n ),\n switchMap((offers) => this.enhanceOffersWithTranslations(offers)),\n catchError((e: unknown) =>\n this.handleError<OndMarketingOffer[]>(e, 'Error getting ond marketing offers data')\n ),\n finShare()\n );\n this.offersDataCache$[cacheKey] = {\n stream$,\n expires: Date.now() + OFFERS_CACHE_TIME_IN_MILLIS,\n };\n }\n\n return this.offersDataCache$[cacheKey].stream$;\n }\n\n private enhanceOffersWithTranslations(offers: OndMarketingOffer[]): Observable<OndMarketingOffer[]> {\n const translationsToFetch = offers\n .reduce(\n (locationCodes, offer) => locationCodes.concat(offer.originLocationCode, offer.destinationLocationCode),\n []\n )\n .filter(unique);\n return this.getLocationData(translationsToFetch).pipe(\n map((locations) => {\n return offers.map((offer) => {\n return {\n ...offer,\n originCityName: locations[offer.originLocationCode]?.cityName,\n originCountryName: locations[offer.originLocationCode]?.country,\n originCountryCode: locations[offer.originLocationCode]?.countryCode,\n destinationCityName: locations[offer.destinationLocationCode]?.cityName,\n destinationCountryName: locations[offer.destinationLocationCode]?.country,\n destinationCountryCode: locations[offer.destinationLocationCode]?.countryCode,\n };\n });\n })\n );\n }\n\n getAirportName(cityName: string, locale: string): Observable<string> {\n if (!cityName || !locale || cityName.length < 3) {\n return of(undefined);\n }\n return this.locationRouteCffService.bestGuessFor(cityName, locale).pipe(\n map((data) => data?.title),\n finShare()\n );\n }\n\n getLocationData(destinationCodeArray: string[]): Observable<OndLocationsResponse | {}> {\n const cacheKey = destinationCodeArray.join('-');\n if (!this.locationsDataCache$[cacheKey] || Date.now() >= this.locationsDataCache$[cacheKey].expires) {\n const stream$ =\n destinationCodeArray.length === 0\n ? of({}).pipe()\n : this.ondMarketingDataService.fetchLocations(destinationCodeArray).pipe(\n catchError((e: unknown) => this.handleError<OndLocationsResponse>(e, 'Error getting ond location data')),\n finShare()\n );\n this.locationsDataCache$[cacheKey] = {\n stream$,\n expires: Date.now() + OFFERS_CACHE_TIME_IN_MILLIS,\n };\n }\n return this.locationsDataCache$[cacheKey].stream$;\n }\n\n private flightPriceMapper = (priceData: PriceList): OndMarketingOffer => {\n const originLocationCode = priceData.from;\n const destinationLocationCode = priceData.to;\n const pricesForEconomy = priceData.travelClassPrices.find((travelClass) => travelClass.travelClass === 'Economy');\n return {\n originLocationCode,\n destinationLocationCode,\n departureDate: pricesForEconomy.fromDate,\n returnDate: pricesForEconomy.toDate,\n price: {\n amount: pricesForEconomy.price.toString(),\n currencyCode: priceData.currency,\n },\n link: getBookingStepLink(this.languageService.langValue, BOOKING_STEPS.ENTRY, {\n origin: originLocationCode,\n destination: destinationLocationCode,\n departureDate: pricesForEconomy.fromDate,\n returnDate: pricesForEconomy.toDate,\n }),\n };\n };\n\n private offersPriceMapper = (priceData: DatePriceList): OndMarketingOffer => {\n const originLocationCode = priceData.from;\n const destinationLocationCode = priceData.to;\n const pricesForEconomy = priceData.travelClassPrices.find((travelClass) => travelClass.travelClass === 'Economy');\n return {\n originLocationCode,\n destinationLocationCode,\n departureDate: priceData.fromDate,\n returnDate: priceData.toDate,\n price: {\n amount: pricesForEconomy.price.toString(),\n currencyCode: priceData.currency,\n },\n link: getBookingStepLink(this.languageService.langValue, BOOKING_STEPS.ENTRY, {\n origin: originLocationCode,\n destination: destinationLocationCode,\n departureDate: priceData.fromDate,\n returnDate: priceData.toDate,\n }),\n };\n };\n\n private handleError<T>(error: unknown, message: string): Observable<T> {\n if (error instanceof HttpErrorResponse && error.error?.error !== 'No location pairs found.') {\n this.sentryLogger.error(message, { error });\n }\n return EMPTY;\n }\n}\n","<div class=\"relative\" [class.has-background]=\"theme === CarouselTheme.HAS_BACKGROUND\">\n <div class=\"button-prev z1 flex flex--start grow\" *ngIf=\"prevButtonVisible\" [class.grey]=\"hasGreyBackground\">\n <button (click)=\"scrollPrev()\" [attr.aria-hidden]=\"!prevButtonAriaLabel\" [attr.aria-label]=\"prevButtonAriaLabel\">\n <fcom-icon\n [class.white-bg]=\"whiteIcon\"\n class=\"flex-1 flex--nogrow nordic-blue-900-text\"\n [name]=\"leftIcon\"\n ></fcom-icon>\n </button>\n </div>\n <div class=\"button-next z1 flex flex--end grow\" *ngIf=\"nextButtonVisible\" [class.grey]=\"hasGreyBackground\">\n <button (click)=\"scrollNext()\" [attr.aria-hidden]=\"!nextButtonAriaLabel\" [attr.aria-label]=\"nextButtonAriaLabel\">\n <fcom-icon\n [class.white-bg]=\"whiteIcon\"\n class=\"flex-1 flex--nogrow nordic-blue-900-text\"\n [name]=\"rightIcon\"\n ></fcom-icon>\n </button>\n </div>\n <div\n #contentWrap\n class=\"content-wrap flex\"\n [ngClass]=\"{\n 'flex--center': align === 'center' && !(prevButtonVisible || nextButtonVisible),\n 'flex--end': align === 'right',\n }\"\n (scroll)=\"onScroll()\"\n >\n <div #content class=\"content\"><ng-content></ng-content></div>\n </div>\n</div>\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostListener,\n Input,\n OnDestroy,\n Optional,\n ViewChild,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { NEVER, Observable, Subscription } from 'rxjs';\n\nimport { SentryLogger } from '@fcom/core';\nimport { unsubscribe } from '@fcom/core/utils/unsubscribe';\n\nimport { CarouselTheme } from './enums';\nimport { type IconName } from '../icons';\n\nconst SCROLL_RATIO_DEFAULT = 0.9;\nexport type carouselAlign = 'left' | 'center' | 'right';\n\n@Component({\n selector: 'fcom-carousel',\n templateUrl: './carousel.component.html',\n styleUrls: ['./carousel.component.scss'],\n})\nexport class CarouselComponent implements AfterViewInit, OnDestroy {\n public readonly CarouselTheme = CarouselTheme;\n\n @ViewChild('content', { static: true })\n content: ElementRef;\n\n @ViewChild('contentWrap', { static: true })\n contentWrap: ElementRef;\n\n @Input()\n leftIcon: IconName = SvgLibraryIcon.CHEVRON_LEFT;\n\n @Input()\n rightIcon: IconName = SvgLibraryIcon.CHEVRON_RIGHT;\n\n @Input()\n align: carouselAlign = 'left';\n\n @Input()\n navigateFullWidth = false;\n\n @Input({ required: true })\n prevButtonAriaLabel: string;\n\n @Input({ required: true })\n nextButtonAriaLabel: string;\n\n @Input()\n hasGreyBackground = false;\n\n @Input()\n whiteIcon = false;\n\n @Input() theme: CarouselTheme = CarouselTheme.DEFAULT;\n\n @Input() contentChanged$: Observable<void> = NEVER;\n\n @Input() initialElementToFocus: string;\n\n prevButtonVisible = false;\n nextButtonVisible = false;\n offset = 0;\n subscription = new Subscription();\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n @Optional() private logger?: SentryLogger\n ) {}\n\n scrollRatio = (): number => (this.navigateFullWidth ? 1 : SCROLL_RATIO_DEFAULT);\n\n @HostListener('window:resize')\n onResize(): void {\n this.updateButtonVisibility();\n }\n\n @HostListener('scroll')\n onScroll(): void {\n this.offset = this.contentWrap.nativeElement.scrollLeft;\n this.updateButtonVisibility();\n }\n\n ngAfterViewInit(): void {\n if (this.content.nativeElement.children && this.content.nativeElement.children.length > 0) {\n setTimeout(() => {\n this.updateButtonVisibility();\n this.changeDetectorRef.detectChanges();\n }, 0);\n } else {\n this.logger?.error('Tried to initialize carousel without content');\n }\n\n this.subscription.add(\n this.contentChanged$.subscribe(() => {\n setTimeout(() => {\n this.updateButtonVisibility();\n this.changeDetectorRef.detectChanges();\n }, 0);\n })\n );\n\n if (this.initialElementToFocus) {\n setTimeout(() => {\n this.scrollToElement(this.initialElementToFocus);\n }, 0);\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n scrollPrev(): void {\n const containerWidth = this.contentWrap.nativeElement.offsetWidth;\n const scrollRatio = this.scrollRatio();\n const newOffset = this.offset > containerWidth ? this.offset - containerWidth * scrollRatio : 0;\n this.contentWrap.nativeElement.scrollLeft = newOffset;\n this.offset = newOffset;\n this.updateButtonVisibility();\n }\n\n scrollNext(): void {\n const containerWidth = this.contentWrap.nativeElement.offsetWidth as number;\n const contentWidth = this.content.nativeElement.children[0].scrollWidth as number;\n const scrollRatio = this.scrollRatio();\n const newOffset =\n contentWidth > containerWidth + this.offset + containerWidth * scrollRatio\n ? this.offset + containerWidth * scrollRatio\n : contentWidth - containerWidth;\n this.contentWrap.nativeElement.scrollLeft = newOffset;\n this.offset = newOffset;\n this.updateButtonVisibility();\n }\n\n scrollToElement(elementId: string): void {\n const elementToScroll = this.content.nativeElement.querySelector(`#${elementId}`);\n if (!elementToScroll) return;\n\n const container = this.contentWrap.nativeElement;\n const elementLeft = elementToScroll.offsetLeft;\n const elementWidth = elementToScroll.offsetWidth;\n const containerWidth = container.offsetWidth;\n const newScrollLeft = elementLeft - containerWidth / 2 + elementWidth / 2;\n\n container.scrollLeft = newScrollLeft;\n this.offset = newScrollLeft;\n this.updateButtonVisibility();\n }\n\n scrollTo(value: number): void {\n this.contentWrap.nativeElement.scrollLeft = value;\n }\n\n private updateButtonVisibility(): void {\n const containerWidth = this.contentWrap.nativeElement.offsetWidth as number;\n const contentWidth = this.content.nativeElement.children[0].scrollWidth as number;\n\n if (contentWidth > containerWidth) {\n if (containerWidth + this.offset >= contentWidth) {\n this.prevButtonVisible = true;\n this.nextButtonVisible = false;\n } else if (this.offset > 0) {\n this.prevButtonVisible = this.nextButtonVisible = true;\n } else {\n this.prevButtonVisible = false;\n this.nextButtonVisible = true;\n }\n } else {\n this.prevButtonVisible = this.nextButtonVisible = false;\n }\n }\n}\n","<a\n *ngIf=\"linkVal\"\n class=\"bold-type\"\n [href]=\"linkVal\"\n [ngClass]=\"{\n 'font-body-1': size === LinkSize.MEDIUM,\n 'font-body-2': size === LinkSize.SMALL,\n light: theme === LinkTheme.LIGHT,\n dark: theme === LinkTheme.DARK,\n disabled,\n }\"\n [attr.rel]=\"rel\"\n [attr.target]=\"target\"\n [attr.aria-label]=\"aria && aria.label\"\n [attr.aria-describedby]=\"aria && aria.describedby\"\n [attr.aria-controls]=\"aria && aria.controls\"\n [attr.aria-disabled]=\"disabled || (aria && aria.disabled)\"\n [attr.aria-selected]=\"aria && aria.selected\"\n (click)=\"handleClick($event)\"\n>\n <ng-container *ngTemplateOutlet=\"linkText\"></ng-container>\n</a>\n<button\n *ngIf=\"!linkVal\"\n class=\"underline bold-type\"\n [ngClass]=\"{\n 'font-body-1': size === LinkSize.MEDIUM,\n 'font-body-2': size === LinkSize.SMALL,\n light: theme === LinkTheme.LIGHT,\n dark: theme === LinkTheme.DARK,\n disabled,\n }\"\n [attr.aria-label]=\"aria && aria.label\"\n [attr.aria-describedby]=\"aria && aria.describedby\"\n [attr.aria-controls]=\"aria && aria.controls\"\n [attr.aria-disabled]=\"disabled || (aria && aria.disabled)\"\n [attr.aria-selected]=\"aria && aria.selected\"\n (click)=\"handleClick($event)\"\n>\n <ng-container *ngTemplateOutlet=\"linkText\"></ng-container>\n</button>\n\n<ng-template #linkText>\n <ng-container *ngIf=\"icon?.position === IconPosition.LEFT\">\n <ng-container *ngTemplateOutlet=\"iconContainer\"></ng-container>\n </ng-container>\n\n <ng-content></ng-content>\n\n <ng-container *ngIf=\"icon?.position === IconPosition.RIGHT\">\n <ng-container *ngTemplateOutlet=\"iconContainer\"></ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #iconContainer>\n <fcom-icon\n [category]=\"icon.category\"\n [name]=\"icon.name\"\n [ngClass]=\"{\n 'ms-xxsmall-r': icon.position === IconPosition.LEFT,\n 'ms-xxsmall-l': icon.position === IconPosition.RIGHT,\n 'icon-medium': size === LinkSize.MEDIUM,\n 'icon-small': size === LinkSize.SMALL,\n }\"\n ></fcom-icon>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { symbolToLangPath, unsubscribe, urlToPathname } from '@fcom/core/utils';\nimport { LanguageService } from '@fcom/ui-translate/services/language.service';\n\nimport { LinkSize, LinkTheme } from './enums';\nimport { IconPosition } from '../icons';\nimport { AriaOptions } from '../interfaces';\nimport { LinkIcon } from './interfaces';\n\n@Component({\n selector: 'fcom-link',\n templateUrl: './link.component.html',\n styleUrl: './link.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkComponent implements OnInit, OnChanges, OnDestroy {\n readonly IconPosition = IconPosition;\n readonly LinkSize = LinkSize;\n readonly LinkTheme = LinkTheme;\n\n /**\n * The size of the link\n */\n @Input() size: LinkSize = LinkSize.MEDIUM;\n\n /**\n * Different themes for dark and light backgrounds\n */\n @Input() theme: LinkTheme = LinkTheme.LIGHT;\n\n /**\n * Url of the link. If missing, component will be rendered as button.\n */\n @Input() href: Observable<string> | string;\n\n /**\n * Flag to indicate whether to convert url to pathName for router\n */\n @Input() external: boolean;\n\n /**\n * Whether to open link in a new tab\n */\n @Input() openInNewTab: boolean;\n\n /**\n * Adds a nofollow rel for the link\n */\n @Input() nofollow: boolean;\n\n /**\n * Flag to disable the button. Doesn't have any effect on regular link.\n */\n @Input() disabled: boolean;\n\n /**\n * ARIA properties\n */\n @Input() aria: AriaOptions;\n\n /**\n * Icon for the link. Sets the default icon for external links.\n */\n @Input()\n get icon(): LinkIcon {\n if (this._icon) {\n return this._icon;\n }\n if (this.external) {\n return {\n name: SvgLibraryIcon.EXTERNAL_TAB,\n category: IconLibrary.SVG_LIBRARY,\n position: IconPosition.RIGHT,\n };\n }\n return undefined;\n }\n set icon(icon: LinkIcon) {\n this._icon = icon;\n }\n\n @Output()\n afterNavigation: EventEmitter<Event> = new EventEmitter();\n @Output()\n beforeNavigation: EventEmitter<Event> = new EventEmitter();\n\n subscription = new Subscription();\n linkVal: string;\n rel: string;\n target: string;\n\n private _icon: LinkIcon;\n\n constructor(\n private languageService: LanguageService,\n private router: Router\n ) {}\n\n ngOnInit(): void {\n if (this.href) {\n this.subscribeToLink(this.href);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.href) {\n this.subscribeToLink(changes.href.currentValue);\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n subscribeToLink(link: Observable<string> | string): void {\n this.subscription = unsubscribe(this.subscription);\n if (link instanceof Observable) {\n this.subscription = link\n .pipe(map((linkStr) => this.legacySiteLinkLocale(linkStr)))\n .subscribe((linkResult) => this.setLinkValue(linkResult));\n } else {\n this.setLinkValue(this.legacySiteLinkLocale(link));\n }\n }\n\n handleClick(event: MouseEvent): void {\n this.beforeNavigation.emit(event);\n if (!(event.ctrlKey || event.metaKey) && !this.external && !event.defaultPrevented && !this.disabled) {\n event.stopPropagation();\n event.preventDefault();\n if (this.linkVal) {\n this.router.navigateByUrl(this.linkVal);\n }\n this.afterNavigation.emit(event);\n }\n }\n\n legacySiteLinkLocale(url = ''): string {\n if (!url) {\n return url;\n }\n const ddsLocale = this.languageService.ddsLocaleValue;\n return symbolToLangPath(url, ddsLocale);\n }\n\n private setLinkValue = (link: string) => {\n this.linkVal = this.toActualLink(link);\n if (this.openInNewTab) {\n this.target = '_blank';\n this.rel = 'noopener';\n }\n if (this.nofollow) {\n this.rel = 'nofollow';\n }\n };\n\n private toActualLink = (l: string): string => (this.external ? l : urlToPathname(l, { preserveQueryParams: true }));\n}\n","import { Subject } from './Subject';\nimport { TimestampProvider } from './types';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * A variant of {@link Subject} that \"replays\" old values to new subscribers by emitting them when they first subscribe.\n *\n * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,\n * `ReplaySubject` \"observes\" values by having them passed to its `next` method. When it observes a value, it will store that\n * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.\n *\n * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in\n * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will\n * error if it has observed an error.\n *\n * There are two main configuration items to be concerned with:\n *\n * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.\n * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.\n *\n * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values\n * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.\n *\n * ### Differences with BehaviorSubject\n *\n * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:\n *\n * 1. `BehaviorSubject` comes \"primed\" with a single value upon construction.\n * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n * @see {@link shareReplay}\n */\nexport class ReplaySubject<T> extends Subject<T> {\n private _buffer: (T | number)[] = [];\n private _infiniteTimeWindow = true;\n\n /**\n * @param _bufferSize The size of the buffer to replay on subscription\n * @param _windowTime The amount of time the buffered items will stay buffered\n * @param _timestampProvider An object with a `now()` method that provides the current timestamp. This is used to\n * calculate the amount of time something has been buffered.\n */\n constructor(\n private _bufferSize = Infinity,\n private _windowTime = Infinity,\n private _timestampProvider: TimestampProvider = dateTimestampProvider\n ) {\n super();\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n\n next(value: T): void {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber<T>): Subscription {\n this._throwIfClosed();\n this._trimBuffer();\n\n const subscription = this._innerSubscribe(subscriber);\n\n const { _infiniteTimeWindow, _buffer } = this;\n // We use a copy here, so reentrant code does not mutate our array while we're\n // emitting it to a new subscriber.\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i] as T);\n }\n\n this._checkFinalizedStatuses(subscriber);\n\n return subscription;\n }\n\n private _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n // If we don't have an infinite buffer size, and we're over the length,\n // use splice to truncate the old buffer values off. Note that we have to\n // double the size for instances where we're not using an infinite time window\n // because we're storing the values and the timestamps in the same array.\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n\n // Now, if we're not in an infinite time window, remove all values where the time is\n // older than what is allowed.\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n // Search the array for the first timestamp that isn't expired and\n // truncate the buffer up to that point.\n for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\n/** @type {import('./functionApply')} */\nmodule.exports = Function.prototype.apply;\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { TimetableFlights } from '../models/timetable-flights';\n\n\n/**\n * Timetable resources\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TimetableService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation getTimetableForRoute\n */\n static readonly GetTimetableForRoutePath = '/api/timetable';\n\n /**\n * getTimetableForRoute.\n *\n * Return a flight timetable for the specified route and departure date\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getTimetableForRoute()` instead.\n *\n * This method doesn't expect any request body.\n */\n getTimetableForRoute$Response(rootUrl: string, params: {\n\n /**\n * IATA code for airport, city or country\n */\n originLocationCode: string;\n\n /**\n * IATA code for airport, city or country\n */\n destinationLocationCode: string;\n\n /**\n * Flight date (yyyy-MM-dd)\n */\n departureDate: string;\n\n /**\n * Number of days to return, starting from departure date. Range: 1-35.\n */\n numberOfDays?: number;\n\n /**\n * Search direct flights only\n */\n directFlights?: boolean;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<TimetableFlights>> {\n const rb = new DapiRequestBuilder(rootUrl, TimetableService.GetTimetableForRoutePath, 'get');\n\n if (params) {\n rb.query('originLocationCode', params.originLocationCode, {});\n rb.query('destinationLocationCode', params.destinationLocationCode, {});\n rb.query('departureDate', params.departureDate, {});\n rb.query('numberOfDays', params.numberOfDays, {});\n rb.query('directFlights', params.directFlights, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<TimetableFlights>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getTimetableForRoute.\n *\n * Return a flight timetable for the specified route and departure date\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getTimetableForRoute$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getTimetableForRoute(rootUrl: string, params: {\n\n /**\n * IATA code for airport, city or country\n */\n originLocationCode: string;\n\n /**\n * IATA code for airport, city or country\n */\n destinationLocationCode: string;\n\n /**\n * Flight date (yyyy-MM-dd)\n */\n departureDate: string;\n\n /**\n * Number of days to return, starting from departure date. Range: 1-35.\n */\n numberOfDays?: number;\n\n /**\n * Search direct flights only\n */\n directFlights?: boolean;\n },\n context?: HttpContext\n\n): Observable<TimetableFlights> {\n return this.getTimetableForRoute$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<TimetableFlights>) => r.body as TimetableFlights)\n );\n }\n\n}\n","import type { AbstractControl, AbstractControlOptions } from '@angular/forms';\n\nexport enum FormStatus {\n INITIAL,\n LOADING,\n COMPLETE,\n ERROR,\n REFUND_CASE_NOT_SUPPORTED,\n INITIALIZING,\n INITIALIZING_ERROR,\n PRECONDITION_REQUIRED,\n}\n\nexport enum AnalyticsFormStatus {\n SUCCESS = 'success',\n ERROR = 'error',\n SEND_ATTEMPT = 'send-attempt',\n START = 'start',\n PRECONDITION_REQUIRED = 'precondition-required',\n}\n\nexport enum ReactiveFormStatus {\n INVALID = 'INVALID',\n}\n\nexport type FormConfig = Record<string, [string, AbstractControlOptions['validators']?]>;\n\nexport enum FormInputType {\n INPUT = 'input',\n TEXTAREA = 'textarea',\n SELECT = 'select',\n}\n\nexport interface CheckboxOption {\n label: string;\n id: string;\n}\n\nexport type CheckboxOptionList = CheckboxOption[];\n\nexport type FormValue<T extends AbstractControl> = T extends AbstractControl<infer TValue, any> ? TValue : never;\nexport type FormRawValue<T extends AbstractControl> =\n T extends AbstractControl<any, infer TRawValue> ? TRawValue : never;\n","export enum PrefillProfileData {\n FIRST_NAME = 'firstname',\n LAST_NAME = 'lastname',\n FIRST_LAST_NAME = 'firstLastName',\n MEMBER_NUMBER = 'memberNumber',\n PARSED_MOBILE_PHONE = 'parsedMobilePhone',\n EMAIL = 'email',\n STREET_ADDRESS = 'streetAddress',\n CITY = 'city',\n POSTAL_CODE = 'postalCode',\n STATE_OR_PROVINCE = 'stateOrProvince',\n COUNTRY = 'country',\n LANGUAGE = 'lang',\n}\n","import { TimestampProvider } from '../types';\n\ninterface DateTimestampProvider extends TimestampProvider {\n delegate: TimestampProvider | undefined;\n}\n\nexport const dateTimestampProvider: DateTimestampProvider = {\n now() {\n // Use the variable rather than `this` so that the function can be called\n // without being bound to the provider.\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n","'use strict';\n\n/** @type {import('./abs')} */\nmodule.exports = Math.abs;\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CallerType } from '../models/caller-type';\nimport { SeatmapModel } from '../models/seatmap-model';\nimport { SeatmapSvgAndControlData } from '../models/seatmap-svg-and-control-data';\nimport { StandaloneSeatmapParams } from '../models/standalone-seatmap-params';\n\n\n/**\n * Seatmap related resources\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SeatmapService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation getSeatmapFromCart\n */\n static readonly GetSeatmapFromCartPath = '/api/seatmap';\n\n /**\n * getSeatmapByCart.\n *\n * Gets the seatmap from cart as SVG and control data as JSON for a flight\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getSeatmapFromCart()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapFromCart$Response(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n hash?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<SeatmapSvgAndControlData>> {\n const rb = new DapiRequestBuilder(rootUrl, SeatmapService.GetSeatmapFromCartPath, 'get');\n\n if (params) {\n rb.query('cartId', params.cartId, {});\n rb.query('orderId', params.orderId, {});\n rb.query('flightId', params.flightId, {});\n rb.query('currencyCode', params.currencyCode, {});\n rb.query('departureDateTime', params.departureDateTime, {});\n rb.query('version', params.version, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.header('Caller', params.Caller, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<SeatmapSvgAndControlData>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getSeatmapByCart.\n *\n * Gets the seatmap from cart as SVG and control data as JSON for a flight\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getSeatmapFromCart$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapFromCart(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n hash?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<SeatmapSvgAndControlData> {\n return this.getSeatmapFromCart$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<SeatmapSvgAndControlData>) => r.body as SeatmapSvgAndControlData)\n );\n }\n\n /**\n * Path part for operation getStandaloneSeatmap\n */\n static readonly GetStandaloneSeatmapPath = '/api/seatmap';\n\n /**\n * getStandaloneSeatmap.\n *\n * Return the seat map for a given flight as SVG and control data as JSON\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getStandaloneSeatmap()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n getStandaloneSeatmap$Response(rootUrl: string, params: {\n Caller?: CallerType;\n body: StandaloneSeatmapParams\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<SeatmapSvgAndControlData>> {\n const rb = new DapiRequestBuilder(rootUrl, SeatmapService.GetStandaloneSeatmapPath, 'post');\n\n if (params) {\n rb.header('Caller', params.Caller, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<SeatmapSvgAndControlData>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getStandaloneSeatmap.\n *\n * Return the seat map for a given flight as SVG and control data as JSON\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getStandaloneSeatmap$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n getStandaloneSeatmap(rootUrl: string, params: {\n Caller?: CallerType;\n body: StandaloneSeatmapParams\n },\n context?: HttpContext\n\n): Observable<SeatmapSvgAndControlData> {\n return this.getStandaloneSeatmap$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<SeatmapSvgAndControlData>) => r.body as SeatmapSvgAndControlData)\n );\n }\n\n /**\n * Path part for operation getSeatmapFromOrder\n */\n static readonly GetSeatmapFromOrderPath = '/api/seatmap/by-order';\n\n /**\n * getSeatmapFromOrder.\n *\n * Gets the seatmap from order as SVG and control data as JSON\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getSeatmapFromOrder()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapFromOrder$Response(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n hash?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<SeatmapSvgAndControlData>> {\n const rb = new DapiRequestBuilder(rootUrl, SeatmapService.GetSeatmapFromOrderPath, 'get');\n\n if (params) {\n rb.query('cartId', params.cartId, {});\n rb.query('orderId', params.orderId, {});\n rb.query('flightId', params.flightId, {});\n rb.query('currencyCode', params.currencyCode, {});\n rb.query('departureDateTime', params.departureDateTime, {});\n rb.query('version', params.version, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.header('Caller', params.Caller, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<SeatmapSvgAndControlData>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getSeatmapFromOrder.\n *\n * Gets the seatmap from order as SVG and control data as JSON\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getSeatmapFromOrder$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapFromOrder(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n hash?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<SeatmapSvgAndControlData> {\n return this.getSeatmapFromOrder$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<SeatmapSvgAndControlData>) => r.body as SeatmapSvgAndControlData)\n );\n }\n\n /**\n * Path part for operation getSeatmapJson\n */\n static readonly GetSeatmapJsonPath = '/api/seatmap/json';\n\n /**\n * getSeatmapJson.\n *\n * Gets the seatmap as JSON for a flight\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getSeatmapJson()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapJson$Response(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<SeatmapModel>> {\n const rb = new DapiRequestBuilder(rootUrl, SeatmapService.GetSeatmapJsonPath, 'get');\n\n if (params) {\n rb.query('cartId', params.cartId, {});\n rb.query('orderId', params.orderId, {});\n rb.query('flightId', params.flightId, {});\n rb.query('currencyCode', params.currencyCode, {});\n rb.query('departureDateTime', params.departureDateTime, {});\n rb.query('version', params.version, {});\n rb.query('locale', params.locale, {});\n rb.header('Caller', params.Caller, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<SeatmapModel>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getSeatmapJson.\n *\n * Gets the seatmap as JSON for a flight\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getSeatmapJson$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapJson(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<SeatmapModel> {\n return this.getSeatmapJson$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<SeatmapModel>) => r.body as SeatmapModel)\n );\n }\n\n /**\n * Path part for operation getSeatmapSvg\n */\n static readonly GetSeatmapSvgPath = '/api/seatmap/svg';\n\n /**\n * getSeatmapSvg.\n *\n * Gets the seatmap as SVG for a flight\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `getSeatmapSvg()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapSvg$Response(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<string>> {\n const rb = new DapiRequestBuilder(rootUrl, SeatmapService.GetSeatmapSvgPath, 'get');\n\n if (params) {\n rb.query('cartId', params.cartId, {});\n rb.query('orderId', params.orderId, {});\n rb.query('flightId', params.flightId, {});\n rb.query('currencyCode', params.currencyCode, {});\n rb.query('departureDateTime', params.departureDateTime, {});\n rb.query('version', params.version, {});\n rb.query('locale', params.locale, {});\n rb.header('Caller', params.Caller, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'blob',\n accept: 'image/svg+xml',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<string>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * getSeatmapSvg.\n *\n * Gets the seatmap as SVG for a flight\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `getSeatmapSvg$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n getSeatmapSvg(rootUrl: string, params: {\n cartId?: string;\n orderId?: string;\n flightId: string;\n currencyCode?: string;\n departureDateTime?: string;\n version?: number;\n locale?: string;\n Caller?: CallerType;\n },\n context?: HttpContext\n\n): Observable<string> {\n return this.getSeatmapSvg$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<string>) => r.body as string)\n );\n }\n\n}\n","'use strict';\n\n/** @type {import('./round')} */\nmodule.exports = Math.round;\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nvar quotes = {\n __proto__: null,\n 'double': '\"',\n single: \"'\"\n};\nvar quoteREs = {\n __proto__: null,\n 'double': /([\"\\\\])/g,\n single: /(['\\\\])/g\n};\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (\n (typeof globalThis !== 'undefined' && obj === globalThis)\n || (typeof global !== 'undefined' && obj === global)\n ) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var style = opts.quoteStyle || defaultStyle;\n var quoteChar = quotes[style];\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction canTrustToString(obj) {\n return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));\n}\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n var quoteRE = quoteREs[opts.quoteStyle || 'single'];\n quoteRE.lastIndex = 0;\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, quoteRE, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","export enum ToggleSwitchStatus {\n UNCHECKED = 'UNCHECKED',\n CHECKED = 'CHECKED',\n ACTIVE = 'ACTIVE',\n}\n","import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\n/**\n * A simple Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * <span class=\"informal\">Just emits 'complete', and nothing else.</span>\n *\n * ![](empty.png)\n *\n * A simple Observable that only emits the complete notification. It can be used\n * for composing with other Observables, such as in a {@link mergeMap}.\n *\n * ## Examples\n *\n * Log complete notification\n *\n * ```ts\n * import { EMPTY } from 'rxjs';\n *\n * EMPTY.subscribe({\n * next: () => console.log('Next'),\n * complete: () => console.log('Complete!')\n * });\n *\n * // Outputs\n * // Complete!\n * ```\n *\n * Emit the number 7, then complete\n *\n * ```ts\n * import { EMPTY, startWith } from 'rxjs';\n *\n * const result = EMPTY.pipe(startWith(7));\n * result.subscribe(x => console.log(x));\n *\n * // Outputs\n * // 7\n * ```\n *\n * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'`\n *\n * ```ts\n * import { interval, mergeMap, of, EMPTY } from 'rxjs';\n *\n * const interval$ = interval(1000);\n * const result = interval$.pipe(\n * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY),\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1, print a, b, c (each on its own)\n * // if x % 2 is not equal to 1, nothing will be output\n * ```\n *\n * @see {@link Observable}\n * @see {@link NEVER}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport const EMPTY = new Observable<never>((subscriber) => subscriber.complete());\n\n/**\n * @param scheduler A {@link SchedulerLike} to use for scheduling\n * the emission of the complete notification.\n * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8.\n */\nexport function empty(scheduler?: SchedulerLike) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\n\nfunction emptyScheduled(scheduler: SchedulerLike) {\n return new Observable<never>((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { PaxDetailsFormData } from '@fcom/dapi/interfaces';\n\nexport const setPaxDetails = createAction(\n '[PaxDetailsActions] SetPaxDetails',\n props<{ passengers: PaxDetailsFormData[] }>()\n);\nexport const setSinglePaxDetails = createAction(\n '[PaxDetailsActions] SetSinglePaxDetails',\n props<{ passenger: PaxDetailsFormData }>()\n);\nexport const reset = createAction('[PaxDetailsActions] Reset');\nexport const setCorporateCode = createAction(\n '[PaxDetailsActions] SetCorporateCode',\n props<{ corporateCode: string }>()\n);\nexport const setAdditionalEmails = createAction(\n '[PaxDetailsActions] SetAdditionalEmails',\n props<{ additionalEmails: string[] }>()\n);\n\nconst all = union({ setPaxDetails, setSinglePaxDetails, reset, setCorporateCode, setAdditionalEmails });\n\nexport type ActionsUnion = typeof all;\n","import { Observable } from '../Observable';\nimport { EmptyError } from '../util/EmptyError';\nimport { OperatorFunction, TruthyTypesOf } from '../types';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\n\nexport function first<T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;\nexport function first<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;\nexport function first<T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<T, TruthyTypesOf<T> | D>;\nexport function first<T, S extends T>(\n predicate: (value: T, index: number, source: Observable<T>) => value is S,\n defaultValue?: S\n): OperatorFunction<T, S>;\nexport function first<T, S extends T, D>(\n predicate: (value: T, index: number, source: Observable<T>) => value is S,\n defaultValue: D\n): OperatorFunction<T, S | D>;\nexport function first<T, D = T>(\n predicate: (value: T, index: number, source: Observable<T>) => boolean,\n defaultValue?: D\n): OperatorFunction<T, T | D>;\n\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * <span class=\"informal\">Emits only the first value. Or emits only the first\n * value that passes some test.</span>\n *\n * ![](first.png)\n *\n * If called with no arguments, `first` emits the first value of the source\n * Observable, then completes. If called with a `predicate` function, `first`\n * emits the first value of the source that matches the specified condition. Emits an error\n * notification if `defaultValue` was not provided and a matching element is not found.\n *\n * ## Examples\n *\n * Emit only the first click that happens on the DOM\n *\n * ```ts\n * import { fromEvent, first } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first());\n * result.subscribe(x => console.log(x));\n * ```\n *\n * Emits the first click that happens on a DIV\n *\n * ```ts\n * import { fromEvent, first } from 'rxjs';\n *\n * const div = document.createElement('div');\n * div.style.cssText = 'width: 200px; height: 200px; background: #09c;';\n * document.body.appendChild(div);\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(first(ev => (<HTMLElement>ev.target).tagName === 'DIV'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link take}\n * @see {@link last}\n *\n * @throws {EmptyError} Delivers an `EmptyError` to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n * This is how `first()` is different from `take(1)` which completes instead.\n *\n * @param predicate An optional function called with each item to test for condition\n * matching.\n * @param defaultValue The default value emitted in case no valid value was found on\n * the source.\n * @return A function that returns an Observable that emits the first item that\n * matches the condition.\n */\nexport function first<T, D>(\n predicate?: ((value: T, index: number, source: Observable<T>) => boolean) | null,\n defaultValue?: D\n): OperatorFunction<T, T | D> {\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable<T>) =>\n source.pipe(\n predicate ? filter((v, i) => predicate(v, i, source)) : identity,\n take(1),\n hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError())\n );\n}\n","export enum ChatStatus {\n INITIAL,\n LOADING,\n COMPLETE,\n ERROR,\n}\n\n/**\n * ServiceQueueId is our term, Salesforce uses term \"SNAP_IN_NAME\" for the same.\n *\n * This Id determines the customer service queue the customer ends up in, there is a separate\n * queue for each language, as they are handled by different call center providers (RTGS, SGS, TLL)\n *\n * We use this identifier also as a key to the language, buttonId and eswLiveAgentDevName\n * that are set to .settings and .init()'s parameters\n */\nexport type ChatServiceQueueId =\n | 'RTGS_FINNISH'\n | 'RGTS_SWEDISH' // intentional to use the typoed id in salesforce\n | 'RTGS_ENGLISH'\n | 'SGS_CHINESE'\n | 'Chatbot_EN'\n | 'Chatbot_EN_SGS' // chatbot for SGS en\n | 'SGS_FRENCH'\n | 'SGS_GERMAN'\n | 'SGS_ITALIAN'\n | 'SGS_JAPANESE'\n | 'SGS_KOREAN'\n | 'SGS_RUSSIAN'\n | 'SGS_SPANISH'\n | 'SGS_CHINESE_HK'\n | 'Chatbot_FTH';\n\n/**\n * Only buttonId, eswLiveAgentDevName and language change from one language to another, other than that\n * the settings are always the same for all chats\n */\nexport interface ChatServiceQueueSpecificConfig {\n buttonId: string;\n eswLiveAgentDevName: string;\n language: string;\n}\n\n/**\n * Service Queue specific configurations (including settings like buttonId) based on the Service Queue Id (like \"SGS_CHINESE\")\n */\nexport type ChatServiceQueueConfig = { [serviceQueueId in ChatServiceQueueId]: ChatServiceQueueSpecificConfig };\n\nexport type ChatServiceConfig = {\n chatServiceQueueConfig: ChatServiceQueueConfig;\n chatInitParamsConfig: ChatInitParamsConfig;\n chatDefaultLanguage: string;\n};\n\n/**\n * The chat initialization configuration parameters that only change based on the environment but not from one language (service queue) to another.\n */\nexport type ChatInitParamsConfig = {\n baseCoreURL: string; // 1st parameter for salesforce chat .init() that is an URL\n communityEndpointURL: string; // 2nd parameter for salesforce chat .init() that is an URL\n gslbBaseURL: string; // 3rd parameter for salesforce chat .init() that is an URL\n orgId: string; // 4th parameter for salesforce chat .init()\n baseLiveAgentContentURL: string;\n deploymentId: string;\n baseLiveAgentURL: string;\n};\n\nexport interface PrechatFields {\n firstName: string;\n lastName: string;\n email: string;\n subject?: string;\n bookingReference?: string;\n}\n\nexport interface LiveagentChatFields {\n FirstName: string;\n LastName: string;\n Email: string;\n Subject?: string;\n Booking_Reference__c: string;\n Finnair_Plus_Number__c?: string;\n Case_Member_Tier__c?: string;\n}\n\nexport interface SplitTrafficChatFields {\n FirstName_c: string;\n LastName_c: string;\n Email_c: string;\n Subject_c?: string;\n WebSite_Country?: string;\n WebSite_Language?: string;\n Booking_Reference?: string;\n hiddenFields?: SplitTrafficAdditionalChatFields;\n}\n\nexport interface SplitTrafficAdditionalChatFields {\n Finnair_Plus_Number_c?: string;\n Case_Member_Tier_c?: string;\n AuthenticatedUser?: string;\n}\n\n/**\n * HelpButton Status\n */\nexport enum HelpButtonStatus {\n VISIBLE = 'visible', // Help Button is visible\n CLICKED = 'clicked', // Help Button is clicked\n USER_FORM = 'user-form', // Step before chat to the form user should fill in before intiating chat\n CHAT = 'chat', // SF Chat is waiting until open\n HIDDEN = 'hidden', // Help Button is not visible when SF Chat is open\n}\n\nexport type AgentforceChatQueueId = 'DEFAULT';\n\nexport type AgentforceQueueConfig = {\n deploymentId: string;\n buttonId: string;\n agentUrl: string;\n};\n\nexport type AgentforceChatConfig = {\n chatScriptSrcURL: string;\n scrt2URL: string;\n queueConfigs: {\n [queueId in AgentforceChatQueueId]: AgentforceQueueConfig;\n };\n};\n","<div\n fcomTrapFocus\n role=\"dialog\"\n [attr.aria-label]=\"'chat.preChatAriaLabel' | finLocalization\"\n class=\"chatPosition fixed chatWindow white-bg\"\n>\n <div class=\"chatWrapper relative\">\n <header class=\"chatHeader grid-col-12 no-row-gap grid-max-width white-bg\">\n <div class=\"col-f\">\n <div class=\"fill flex ps-small-y\">\n <div class=\"flex-1 flex--basis0 flex flex--start flex--self-center\"></div>\n\n <div class=\"flex-1 flex flex--center flex--self-center\">\n <fcom-icon\n class=\"finnair-emblem\"\n [category]=\"IconLibrary.CUSTOM\"\n [name]=\"CustomIcon.FINNAIR_EMBLEM\"\n ></fcom-icon>\n </div>\n\n <div class=\"flex-1 flex--basis0 flex flex--end flex--self-center align-right\">\n <button\n (click)=\"chatToggle.emit(HelpButtonStatus.VISIBLE)\"\n [attr.title]=\"'actions.minimize' | finLocalization\"\n [attr.aria-label]=\"'actions.minimize' | finLocalization\"\n class=\"link-hover ms-small-r focus-inset\"\n #minimize\n >\n <fcom-icon\n [dataTestId]=\"'icon-' + SvgLibraryIcon.MINIMISE_CHAT\"\n [name]=\"SvgLibraryIcon.MINIMISE_CHAT\"\n ></fcom-icon>\n </button>\n <button\n (click)=\"chatToggle.emit(HelpButtonStatus.VISIBLE)\"\n [attr.title]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n class=\"link-hover focus-inset\"\n >\n <fcom-icon\n [dataTestId]=\"'icon-' + SvgLibraryIcon.CLOSE_DELETE\"\n [name]=\"SvgLibraryIcon.CLOSE_DELETE\"\n ></fcom-icon>\n </button>\n </div>\n </div>\n </div>\n </header>\n <div *ngIf=\"!startUserForm\" class=\"chatBody pre-chat-body\">\n <h3>{{ 'chat.welcomeMessage' | finLocalization }}</h3>\n\n <p class=\"font-body-1 light-type pr-medium-b pr-xsmall-t\">\n {{ 'chat.subtitle' | finLocalization }}\n <a\n *ngIf=\"(loginStatus$ | async) === LoginStatus.NOT_LOGGED_IN\"\n data-testid=\"chat-login-link\"\n class=\"bold-type pre-chat-link\"\n href=\"#\"\n (click)=\"handleLogin($event)\"\n >\n {{ 'chat.subtitleLoginText' | finLocalization }}\n </a>\n </p>\n\n <fcom-button\n *ngIf=\"!usePreChatForm\"\n [text]=\"'chat.buttonHeading' | finLocalization\"\n [icon]=\"{ name: SvgLibraryIcon.CHAT, position: IconPosition.LEFT }\"\n [mode]=\"ButtonMode.FILL\"\n (clickBtn)=\"startChat.emit()\"\n data-testid=\"chat-start-chat\"\n [title]=\"'actions.startChat' | finLocalization\"\n [aria]=\"{ label: 'actions.startChat' | finLocalization }\"\n ></fcom-button>\n\n <fcom-button\n *ngIf=\"usePreChatForm\"\n data-testid=\"user-chat-form-start-btn\"\n [text]=\"'chat.buttonHeading' | finLocalization\"\n [icon]=\"{ category: IconLibrary.SVG_LIBRARY, name: SvgLibraryIcon.CHAT, position: IconPosition.LEFT }\"\n [mode]=\"ButtonMode.FILL\"\n (clickBtn)=\"openUserForm()\"\n [title]=\"'actions.startChat' | finLocalization\"\n [aria]=\"{ label: 'actions.startChat' | finLocalization }\"\n ></fcom-button>\n\n <fin-expand\n *ngFor=\"let item of availableAccordions$ | async; let index = index\"\n [id]=\"chatExpandKey + '-' + index\"\n [key]=\"chatExpandKey\"\n [clearSelectionOnDestroy]=\"true\"\n class=\"block\"\n [ngClass]=\"index === 0 ? 'ps-medium-t' : ''\"\n [finElemTracker]=\"chatExpandKey + '-' + index\"\n [finElemContext]=\"GaContext.CHAT\"\n [finElemType]=\"ElementTypes.ACCORDION\"\n #expand\n >\n <div class=\"trigger flex flex--center ps-small-t ps-small-b\">\n <div class=\"flex flex-1 flex--middle mr-xsmall-r\">\n <span class=\"font-heading-5 bold-type\" [innerHTML]=\"item.teaserTitle\"></span>\n </div>\n <fcom-icon\n [dataTestId]=\"'icon-' + SvgLibraryIcon.CHEVRON_DOWN\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n class=\"flex-1 flex--nogrow rotate icon-medium\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n ></fcom-icon>\n </div>\n <div class=\"content\">\n <div *ngIf=\"expand.isOpen$ | async\" class=\"font-body-1 pr-small-t\" [innerHTML]=\"item.teaserText\"></div>\n </div>\n </fin-expand>\n </div>\n\n <fin-chat-user-form *ngIf=\"startUserForm\"></fin-chat-user-form>\n </div>\n</div>\n","import { Component, OnInit, Output, EventEmitter, ViewChild, ElementRef, Input } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { map, Observable } from 'rxjs';\n\nimport { ButtonMode, IconPosition } from '@fcom/ui-components';\nimport { CmsContent, CMSelectionRules } from '@fcom/core-api';\nimport { ElementActions, ElementTypes, FragmentService, GaContext } from '@fcom/common';\nimport { LoginService } from '@fcom/common/login';\nimport { AppState, ConfigService } from '@fcom/core';\nimport { LoginStatus, LoginStep } from '@fcom/core-api/login';\nimport { loginStatus } from '@fcom/core/selectors';\nimport { finShare } from '@fcom/rx';\nimport { stopPropagation } from '@fcom/core/utils';\nimport { LoginActions } from '@fcom/core/actions';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport { HelpButtonStatus } from '../../interfaces';\n\n@Component({\n selector: 'fin-pre-chat',\n templateUrl: 'pre-chat.component.html',\n styleUrls: ['pre-chat.component.scss'],\n})\nexport class PreChatComponent implements OnInit {\n readonly ButtonMode = ButtonMode;\n readonly chatExpandKey = 'chat-expand';\n readonly CustomIcon = CustomIcon;\n readonly ElementTypes = ElementTypes;\n readonly GaContext = GaContext;\n readonly HelpButtonStatus = HelpButtonStatus;\n readonly IconLibrary = IconLibrary;\n readonly IconPosition = IconPosition;\n readonly LoginStatus = LoginStatus;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n usePreChatForm: boolean = false;\n\n @Output()\n chatToggle: EventEmitter<HelpButtonStatus> = new EventEmitter();\n\n @Output()\n startChat: EventEmitter<boolean> = new EventEmitter();\n\n @ViewChild('minimize', { static: false })\n minimizeButton: ElementRef;\n\n availableAccordions$: Observable<CmsContent[]>;\n loginStatus$: Observable<LoginStatus>;\n loginDialogIsEnabled = false;\n\n startUserForm = false;\n\n constructor(\n private fragmentService: FragmentService,\n private store$: Store<AppState>,\n private loginService: LoginService,\n private configService: ConfigService,\n private route: Router,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.availableAccordions$ = this.fragmentService\n .getFragment<CMSelectionRules>('fragments.chatPreScreen.url')\n .pipe(map((collection): CmsContent[] => collection.items));\n setTimeout((): void => {\n this.minimizeButton.nativeElement.focus();\n }, 0);\n\n this.loginStatus$ = this.store$.pipe(loginStatus(), finShare());\n\n // check first if enableLoginDialog is true, then check if disabled on page\n if (this.configService.cfg.enableLoginDialog) {\n this.loginDialogIsEnabled = !this.checkIfLoginDialogDisabled(this.route.url);\n }\n }\n\n handleLogin = (e: MouseEvent): void => {\n stopPropagation(e);\n\n if (this.loginDialogIsEnabled) {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n this.trackElement('open-login-modal');\n } else {\n this.loginService.redirectToLogin();\n this.trackElement('redirect-to-login-link');\n }\n };\n\n // if url is included, loginDialog should be disabled\n private checkIfLoginDialogDisabled(pathUrl: string): boolean {\n return ['compensation-wizard'].some((page): boolean => pathUrl.includes(page));\n }\n\n openUserForm(): void {\n this.trackElement('chat-with-us-button');\n this.startUserForm = !this.startUserForm;\n }\n\n public trackElement(label: string, type: ElementTypes = ElementTypes.BUTTON): void {\n this.gtmService.trackElement(\n `${label.replaceAll(' ', '-').toLocaleLowerCase()}`,\n GaContext.CHAT,\n type,\n undefined,\n ElementActions.CLICK\n );\n }\n}\n","import { Injectable, Inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { Subject } from 'rxjs';\n\nimport { PrechatFields } from '../interfaces';\n\n/*\nAs the SalesForce chat is provided as an external JavaScript snippet and instructed to be loaded with a <script> tag,\nwe load it by injecting it to the document head.\n*/\n\ninterface Scripts {\n [src: string]: {\n loaded: boolean;\n };\n}\n\ninterface HTMLScriptElementWithReady extends HTMLScriptElement {\n readyState: 'loaded' | 'complete' | any;\n onreadystatechange: any;\n}\n\n@Injectable()\nexport class SalesforceChatService {\n private scripts: Scripts = {};\n public openChat$: Subject<PrechatFields> = new Subject<PrechatFields>();\n\n constructor(@Inject(DOCUMENT) private document: Document) {}\n\n load(...scripts: string[]): Promise<any[]> {\n const promises: any[] = [];\n scripts.forEach((script) => promises.push(this.loadScript(script)));\n return Promise.all(promises);\n }\n\n private loadScript(src: string) {\n return new Promise((resolve, reject) => {\n if (!this.scripts[src]) {\n if (document.querySelector(`script[src=\"${src}\"]`)) {\n this.scripts[src] = { loaded: true };\n } else {\n this.scripts[src] = { loaded: false };\n }\n }\n\n if (!this.scripts[src].loaded) {\n const script: HTMLScriptElementWithReady = this.document.createElement('script') as HTMLScriptElementWithReady;\n script.type = 'text/javascript';\n script.src = src;\n\n const resolveLoaded = (srcUrl: string) => {\n this.scripts[srcUrl].loaded = true;\n resolve({ src: srcUrl, loaded: true });\n };\n\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState === 'loaded' || script.readyState === 'complete') {\n script.onreadystatechange = null;\n resolveLoaded(src);\n }\n };\n } else {\n script.onload = () => {\n resolveLoaded(src);\n };\n }\n script.onerror = (_error: any) => {\n reject({ src, loaded: false });\n };\n document.getElementsByTagName('head')[0].appendChild(script);\n } else {\n resolve({ src, loaded: true });\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { WindowRef } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services';\n\nimport { ChatServiceConfig, ChatServiceQueueId } from '../interfaces';\n\n/**\n * Init values in this file and in /cfg/chat.js were provided to Finnair by Fluido\n *\n * The way the Salesforce Chat config is built is a little complicated:\n * -There's a bunch of settings (Settings below) and then\n * -There's a set of parameters that are given to the .init() function.\n * - Part of these change based on the chat environment\n * - Part of these change based on the service queue config (chat language) chosen\n * - Part of them don't change (isOfflineSupportEnabled)\n * - Some of them are inside the 5th parameter of the .init (we call it InitParamsSubConfig) while others are direct unnamed params for .init() (we call them paramA, paramB, paramD).\n */\n\n/**\n * Settings that go to document.embedded_svc.settings\n *\n * Settings described in https://resources.docs.salesforce.com/218/latest/en-us/sfdc/pdf/snapins_web_dev_guide.pdf\n * Settings marked with UNDOCUMENTED were reverse-engineered from source of esw.min.js and liveagent.esw.min.js\n *\n */\ntype Settings = {\n displayHelpButton: boolean; // display the default chat button\n language: string; // For example 'en' or 'en-US', no underscores\n storageDomain: string;\n enabledFeatures: string[];\n entryFeature: string; // default \"FieldService\"\n loadingText?: string;\n disabledMinimizedText?: string; // Defaults to Agent Offline\n defaultMinimizedText?: string; // Defaults to Chat with an Expert\n targetElement?: HTMLElement; // UNDOCUMENTED, default document.body\n extraPrechatInfo?: unknown;\n prepopulatedPrechatFields?: unknown;\n extraPrechatFormDetails?: unknown;\n offlineSupportMinimizedText?: string; // Defaults to Contact Us\n devMode?: boolean; // UNDOCUMENTED\n externalScripts?: string[];\n externalStyles?: string[];\n // These are supported but we don't currently use them, so they are commented out:\n // avatarImgURL?: string;\n // prechatBackgroundImgURL?: string;\n // waitingStateBackgroundImgURL?: string;\n // smallCompanyLogoImgURL?: string;\n // appendHelpButton: boolean; // UNDOCUMENTED\n // isExternalPage: boolean; // UNDOCUMENTED\n // elementForOnlineDisplay: void 0; // UNDOCUMENTED\n // elementForOfflineDisplay: void 0; // UNDOCUMENTED\n // showIcon: void 0; // UNDOCUMENTED\n // linkAction: { feature: void 0, name: void 0, valid: !1 }; // UNDOCUMENTED\n // linkActionParameters: {}; // UNDOCUMENTED\n // useCustomAuthentication: boolean; // UNDOCUMENTED, default !1\n // allowGuestUsers: boolean; // UNDOCUMENTED, default !1\n // requireSLDS: boolean; // UNDOUMENTED, default !1\n};\n\n/**\n * Settings that are provided to document.embedded_svc.init() as the last argument\n */\ntype InitParamsSubConfig = {\n baseLiveAgentContentURL: string;\n deploymentId: string;\n buttonId: string;\n baseLiveAgentURL: string;\n eswLiveAgentDevName: string;\n isOfflineSupportEnabled: boolean;\n};\n\n/**\n * Parameters that go to document.embedded_svc.init() function's params\n */\ntype InitParams = [string, string, string, string, ChatServiceQueueId, InitParamsSubConfig];\n\n/**\n * Our SalesforceChatConfigInterface consists of the main settings and the parameters that are put into the init() call\n * when the chat is booting.\n */\ninterface SalesforceChatConfigInterface {\n settings: Settings;\n initParams: InitParams;\n}\n\n/**\n * Mapping from our langValue (like master-en) to chat's Service queue id\n */\nexport const LOCALE_TO_SERVICE_QUEUE_ID: { [langValue: string]: ChatServiceQueueId } = {\n _DEFAULT: 'Chatbot_EN_SGS',\n _DEFAULT_PREPROD: 'Chatbot_EN',\n 'fi-fi': 'RTGS_FINNISH',\n 'fi-sv': 'RGTS_SWEDISH', // intentional to use the typoed id in salesforce\n 'ca-fr': 'SGS_FRENCH',\n 'fr-fr': 'SGS_FRENCH',\n 'ch-fr': 'SGS_FRENCH',\n 'at-de': 'SGS_GERMAN',\n 'de-de': 'SGS_GERMAN',\n 'ch-de': 'SGS_GERMAN',\n 'it-it': 'SGS_ITALIAN',\n 'es-es': 'SGS_SPANISH',\n 'cn-zh': 'SGS_CHINESE',\n 'kr-ko': 'SGS_KOREAN',\n 'jp-ja': 'SGS_JAPANESE',\n 'hk-zh': 'SGS_CHINESE_HK',\n 'ru-ru': 'SGS_RUSSIAN',\n _DARKSITE: 'Chatbot_FTH',\n};\n\n/**\n *\n */\nexport class SalesforceChatConfig implements SalesforceChatConfigInterface {\n gslbBaseURL: string = null;\n serviceQueueId: ChatServiceQueueId;\n settings: Settings = {\n displayHelpButton: false,\n language: '',\n storageDomain: 'finnair.com',\n enabledFeatures: ['LiveAgent'],\n entryFeature: 'LiveAgent',\n loadingText: '...', // Defaults to Loading\n devMode: false,\n extraPrechatInfo: [\n {\n entityFieldMaps: [\n { doCreate: false, doFind: false, fieldName: 'LastName', isExactMatch: true, label: 'Last Name' },\n { doCreate: false, doFind: false, fieldName: 'FirstName', isExactMatch: true, label: 'First Name' },\n { doCreate: false, doFind: true, fieldName: 'Email', isExactMatch: true, label: 'Email' },\n ],\n entityName: 'Contact',\n saveToTranscript: 'Contact',\n showOnCreate: false,\n },\n {\n entityName: 'Account',\n showOnCreate: false,\n saveToTranscript: 'Account',\n entityFieldMaps: [\n { isExactMatch: true, fieldName: 'PersonEmail', doCreate: false, doFind: true, label: 'Email' },\n ],\n },\n ],\n prepopulatedPrechatFields: {},\n extraPrechatFormDetails: [\n {\n label: 'Site Origin',\n value: this.windowRef.nativeWindow.location.href,\n transcriptFields: ['SiteOrigin__c'],\n },\n ],\n };\n initParams: InitParams = [\n null, // baseCoreURL in /cfg/chat.js INIT_PARAMS\n null, // communityEndpointURL in /cfg/chat.js INIT_PARAMS\n null, // gslbBaseURL in /cfg/chat.js INIT_PARAMS\n null, // orgId in /cfg/chat.js INIT_PARAMS\n null, // set based on serviceQueueId\n {\n baseLiveAgentContentURL: null, // baseLiveAgentContentURL in /cfg/chat.js INIT_PARAMS\n deploymentId: null, // deploymentId in /cfg/chat.js INIT_PARAMS\n buttonId: null, // set based on serviceQueueId\n baseLiveAgentURL: null, // baseLiveAgentURL in /cfg/chat.js INIT_PARAMS\n eswLiveAgentDevName: null, // set based on serviceQueueId\n isOfflineSupportEnabled: true,\n },\n ];\n defaultChatLanguage: string = '_DEFAULT';\n\n constructor(\n private windowRef: WindowRef,\n private csc: ChatServiceConfig,\n private isDarkSite: boolean\n ) {\n this.initParams[0] = csc.chatInitParamsConfig.baseCoreURL;\n this.initParams[1] = csc.chatInitParamsConfig.communityEndpointURL;\n this.initParams[2] = csc.chatInitParamsConfig.gslbBaseURL;\n this.initParams[3] = csc.chatInitParamsConfig.orgId;\n this.initParams[5].baseLiveAgentContentURL = csc.chatInitParamsConfig.baseLiveAgentContentURL;\n this.initParams[5].deploymentId = csc.chatInitParamsConfig.deploymentId;\n this.initParams[5].baseLiveAgentURL = csc.chatInitParamsConfig.baseLiveAgentURL;\n\n this.defaultChatLanguage = csc.chatDefaultLanguage;\n }\n\n /**\n * Given serviceQueueId, set chat UI's language, service queue id, button id and eswLiveAgentDevName.\n */\n setServiceQueueId(serviceQueueId: ChatServiceQueueId): void {\n this.serviceQueueId = serviceQueueId;\n\n if (serviceQueueId !== null) {\n this.settings.language = this.csc.chatServiceQueueConfig[serviceQueueId].language;\n this.initParams[4] = serviceQueueId;\n this.initParams[5].buttonId = this.csc.chatServiceQueueConfig[serviceQueueId].buttonId;\n this.initParams[5].eswLiveAgentDevName = this.csc.chatServiceQueueConfig[serviceQueueId].eswLiveAgentDevName;\n\n // Enable Ultimate.ai chatbot: Sisu FI (prod, preprod), Sisu EN-FI (prod, preprod) and Sisu EN SGS (prod, preprod)\n const chatbotEnabledChatButtonIds: string[] = [\n '5731o000000GsW4',\n '5731q00000000Ns',\n '5731o0000004IiY',\n '5733N000000009w',\n '5731o000000GsWT',\n '5733N00000000Az',\n '573UB0000007HXB',\n ];\n if (chatbotEnabledChatButtonIds.includes(this.csc.chatServiceQueueConfig[serviceQueueId].buttonId)) {\n this.enableChatBot();\n } else {\n this.disableChatBot();\n }\n }\n }\n\n /**\n * Given site lang (\"fi-sv\"), set serviceQueueId\n */\n setLanguage(langValue: string): void {\n const chatLanguage: string = this.isDarkSite ? '_DARKSITE' : langValue;\n this.setServiceQueueId(\n LOCALE_TO_SERVICE_QUEUE_ID[chatLanguage] || LOCALE_TO_SERVICE_QUEUE_ID[this.defaultChatLanguage]\n );\n }\n\n setTargetElement(targetElement: HTMLElement): void {\n this.settings.targetElement = targetElement;\n }\n\n private enableChatBot(): void {\n this.settings.externalScripts = ['CustomEvents_AddButtons'];\n this.settings.externalStyles = ['CustomEvents_AddButtons_Stylesheet'];\n }\n\n private disableChatBot(): void {\n if (this.settings.externalScripts) {\n delete this.settings.externalScripts;\n }\n if (this.settings.externalStyles) {\n delete this.settings.externalStyles;\n }\n }\n}\n\n/**\n * Service that provides configurations to boot up the chat. Same instance of the Service\n * can provide multiple different configuration classes.\n * @class SalesforceChatConfigService\n */\n@Injectable()\nexport class SalesforceChatConfigService {\n scriptSrcURL: string;\n /** Configurations specific to CHAT_ENV */\n private chatServiceConfig: ChatServiceConfig;\n isDarkSite = false;\n\n constructor(\n private configService: ConfigService,\n private windowRef: WindowRef,\n private router: Router\n ) {\n this.scriptSrcURL = this.configService.cfg.chatScriptSrcURL;\n this.chatServiceConfig = this.configService.cfg.chat;\n this.isDarkSite = this.isDarkSiteChecker(this.router.url);\n }\n\n /**\n * returns a new SalesforceChatConfig that can be customized by calling its .setLanguage\n * that calls .setServiceQueueId with the Service Queue Id of that language\n */\n get config(): SalesforceChatConfig {\n return new SalesforceChatConfig(this.windowRef, this.chatServiceConfig, this.isDarkSite);\n }\n\n isDarkSiteChecker(pathUrl: string): boolean {\n const pathArr: string[] = ['emergency-in-operations', 'operational-emergency'];\n\n return pathArr.some((path): boolean => pathUrl.includes(path));\n }\n}\n","import { ElementRef, Injectable, OnDestroy } from '@angular/core';\n\nimport {\n BehaviorSubject,\n combineLatest,\n from,\n fromEvent,\n Observable,\n skip,\n Subject,\n Subscription,\n switchMap,\n take,\n} from 'rxjs';\n\nimport { ConfigService, mapErrorForSentry, SentryLogger, WindowRef } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare } from '@fcom/rx';\n\nimport {\n AgentforceChatConfig,\n ChatServiceQueueId,\n HelpButtonStatus,\n LiveagentChatFields,\n SplitTrafficChatFields,\n} from '../interfaces';\nimport { SalesforceChatService } from './salesforce-chat.service';\nimport { SalesforceChatConfig, SalesforceChatConfigService } from './salesforce-chat-config.service';\n\nexport interface EmbeddedSvc {\n settings: { [key: string]: unknown };\n init: (...InitParams) => void;\n bootstrapEmbeddedService: () => void;\n addEventHandler: (eventName: string, callback: () => void) => void;\n}\n\nexport interface EmbeddedBootstrapSvc {\n settings: { [key: string]: unknown };\n init: (deploymentId: string, buttonId: string, agentUrl: string, options: { scrt2URL: string }) => void;\n prechatAPI: {\n setHiddenPrechatFields?: (formData: SplitTrafficChatFields) => void;\n };\n utilAPI: {\n launchChat: () => Promise<void>;\n };\n userVerificationAPI: {\n clearSession: (eventName: boolean) => Promise<void>;\n };\n}\n\ntype EntityFieldMap = {\n doCreate: boolean;\n doFind: boolean;\n fieldName: string;\n isExactMatch: boolean;\n label: string;\n};\n\ntype EntityInfo = {\n entityName: string;\n saveToTranscript: string;\n showOnCreate: boolean;\n entityFieldMaps: EntityFieldMap[];\n};\n\nexport const AGENTFORCE_EXTRAPRECHATINFO: EntityInfo[] = [\n {\n entityName: 'Contact',\n saveToTranscript: 'Contact',\n showOnCreate: false,\n entityFieldMaps: [\n { doCreate: false, doFind: false, fieldName: 'LastName', isExactMatch: true, label: 'Last Name' },\n { doCreate: false, doFind: false, fieldName: 'FirstName', isExactMatch: true, label: 'First Name' },\n { doCreate: false, doFind: true, fieldName: 'Email', isExactMatch: true, label: 'Email' },\n ],\n },\n {\n entityName: 'Account',\n showOnCreate: false,\n saveToTranscript: 'Account',\n entityFieldMaps: [{ isExactMatch: true, fieldName: 'PersonEmail', doCreate: false, doFind: true, label: 'Email' }],\n },\n {\n entityName: 'Case',\n showOnCreate: true,\n saveToTranscript: 'CaseId',\n entityFieldMaps: [\n {\n doCreate: true,\n doFind: false,\n fieldName: 'Chat_FirstName__c',\n isExactMatch: true,\n label: 'Chat First Name',\n },\n {\n doCreate: true,\n doFind: false,\n fieldName: 'Chat_LastName__c',\n isExactMatch: true,\n label: 'Chat Last Name',\n },\n { doCreate: true, doFind: false, fieldName: 'Chat_Email__c', isExactMatch: true, label: 'Chat Email' },\n {\n doCreate: true,\n doFind: false,\n fieldName: 'Booking_Reference__c',\n isExactMatch: true,\n label: 'Booking Reference',\n },\n {\n doCreate: true,\n doFind: false,\n fieldName: 'Finnair_Plus_Number__c',\n isExactMatch: true,\n label: 'Finnair Plus Number',\n },\n {\n doCreate: true,\n doFind: false,\n fieldName: 'Case_Member_Tier__c',\n isExactMatch: true,\n label: 'Case Member Tier',\n },\n { doCreate: true, doFind: false, fieldName: 'Status', isExactMatch: false, label: 'Status' },\n { doCreate: true, doFind: false, fieldName: 'Origin', isExactMatch: false, label: 'Origin' },\n { doCreate: true, doFind: false, fieldName: 'RecordType', isExactMatch: false, label: 'RecordType' },\n ],\n },\n];\n\n// Sites using these queues, will be using the agentforce split/doorbell solution\nexport const ALLOWED_SERVICE_QUEUE_AGENTFORCE: ChatServiceQueueId[] = ['Chatbot_EN', 'Chatbot_EN_SGS'];\n\n@Injectable()\nexport class AgentforceChatService implements OnDestroy {\n private subscription = new Subscription();\n chatButtonState$: BehaviorSubject<HelpButtonStatus> = new BehaviorSubject(HelpButtonStatus.VISIBLE);\n liveAgentChatTriggered$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n messagingForWebTriggered$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n openLegacyChat$: Subject<LiveagentChatFields> = new Subject<LiveagentChatFields>();\n openWebMessagingChat$: Subject<SplitTrafficChatFields> = new Subject<SplitTrafficChatFields>();\n\n embeddedSvc: EmbeddedSvc;\n embeddedSvcBootstrap: EmbeddedBootstrapSvc;\n agentforceConfig?: AgentforceChatConfig;\n\n constructor(\n private languageService: LanguageService,\n private sfChatService: SalesforceChatService,\n private sfChatConfigService: SalesforceChatConfigService,\n private windowRef: WindowRef,\n private configService: ConfigService,\n private sentryLogger: SentryLogger\n ) {\n this.agentforceConfig = this.configService.cfg.agentforceChat;\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n\n checkAllowedLocales(langValue: string): boolean {\n const config: SalesforceChatConfig = this.sfChatConfigService.config;\n config.setLanguage(langValue);\n return ALLOWED_SERVICE_QUEUE_AGENTFORCE.includes(config.serviceQueueId);\n }\n\n liveAgentChat(user: LiveagentChatFields, target: ElementRef): void {\n const config: SalesforceChatConfig = this.sfChatConfigService.config;\n this.sfChatService\n .load(this.sfChatConfigService.scriptSrcURL)\n .then((): void => {\n this.embeddedSvc = this.windowRef.nativeWindow['embedded_svc'];\n })\n .finally((): void => {\n if (!this.embeddedSvc) {\n // Salesforce script failed to load/initialize, we don't have base settings, so unable to boot.\n return;\n }\n\n // config the settings we need for doorbell liveagent chat\n config.settings.extraPrechatInfo = AGENTFORCE_EXTRAPRECHATINFO;\n\n // set the user data we send to salesforce for the chat & case creation\n // test new fields, if there is not an appropriate field to map to, case will not create\n config.settings.extraPrechatFormDetails = [\n { label: 'First Name', value: user.FirstName, name: 'FirstName' }, // for loading window 'Hello, first name' greeting\n { label: 'Chat First Name', value: user.FirstName, name: 'Chat_FirstName__c' },\n { label: 'Chat Last Name', value: user.LastName, name: 'Chat_LastName__c' },\n { label: 'Chat Email', value: user.Email, name: 'Chat_Email__c' },\n { label: 'Booking Reference', value: user.Booking_Reference__c, name: 'Booking_Reference__c' },\n { label: 'Email', value: user.Email, name: 'Email' },\n {\n label: 'Site Origin',\n value: this.windowRef.nativeWindow.location.href,\n transcriptFields: ['SiteOrigin__c'],\n },\n ...(user.Finnair_Plus_Number__c\n ? [\n { label: 'Finnair Plus Number', value: user.Finnair_Plus_Number__c, name: 'Finnair_Plus_Number__c' },\n { label: 'Case Member Tier', value: user.Case_Member_Tier__c, name: 'Case_Member_Tier__c' },\n ]\n : []),\n ];\n\n this.subscription.add(\n combineLatest([this.languageService.lang, this.languageService.localizations]).subscribe(\n ([langValue, translations]): void => {\n config.setLanguage(langValue);\n\n if (!config.serviceQueueId) {\n return;\n }\n\n config.setTargetElement(target.nativeElement);\n\n if (translations.chat) {\n config.settings.defaultMinimizedText = translations.chat.defaultMinimizedText;\n config.settings.disabledMinimizedText = translations.chat.defaultMinimizedText;\n config.settings.offlineSupportMinimizedText = translations.chat.defaultMinimizedText;\n } else {\n delete config.settings.disabledMinimizedText;\n delete config.settings.defaultMinimizedText;\n delete config.settings.offlineSupportMinimizedText;\n }\n\n // when chat is fully expanded and visible\n this.embeddedSvc.addEventHandler('afterMaximize', (): void => {\n this.chatButtonState$.next(HelpButtonStatus.HIDDEN);\n });\n\n // when chat is closed (X is clicked)\n this.embeddedSvc.addEventHandler('afterDestroy', (): void => {\n this.chatButtonState$.next(HelpButtonStatus.VISIBLE);\n });\n\n this.embeddedSvc.settings = { ...this.embeddedSvc.settings, ...config.settings };\n this.embeddedSvc.init(...config.initParams);\n\n if (this.liveAgentChatTriggered$.value) {\n this.embeddedSvc.bootstrapEmbeddedService();\n return;\n }\n\n // onSettingsCallCompleted is triggered after init, used to signal when to launch\n // bootstrapEmbeddedService(), which starts the chat.\n // event is only triggered once and persists. So listener checks this and lanches from above if statement with true\n this.embeddedSvc.addEventHandler('onSettingsCallCompleted', (): void => {\n this.liveAgentChatTriggered$.next(true);\n this.embeddedSvc.bootstrapEmbeddedService();\n });\n }\n )\n );\n });\n }\n\n webMessagingChat(formData: SplitTrafficChatFields, target: ElementRef): void {\n this.sfChatService\n .load(this.agentforceConfig.chatScriptSrcURL)\n .then((): void => {\n this.embeddedSvcBootstrap = this.windowRef.nativeWindow['embeddedservice_bootstrap'];\n })\n .catch((error: unknown): void => {\n this.sentryLogger.error('Error loading Messaging for Web chat:', { error: mapErrorForSentry(error) });\n })\n .finally((): void => {\n if (!this.embeddedSvcBootstrap) {\n return;\n }\n\n const messageReady$: Observable<Event> = fromEvent(\n this.windowRef.nativeWindow,\n 'onEmbeddedMessagingReady'\n ).pipe(finShare());\n\n // set the user data sent to salesforce\n this.subscription.add(\n messageReady$\n .pipe(take(1))\n .subscribe((): void => this.embeddedSvcBootstrap.prechatAPI.setHiddenPrechatFields(formData))\n );\n\n // close chat\n this.subscription.add(\n messageReady$\n .pipe(\n skip(1),\n switchMap((): Observable<void> => from(this.embeddedSvcBootstrap.userVerificationAPI.clearSession(true)))\n )\n .subscribe((): void => this.chatButtonState$.next(HelpButtonStatus.VISIBLE))\n );\n\n // chat has finished initializing, creates button in the background, this is when we simulate the user click to auto-launch the chat for the user.\n this.subscription.add(\n fromEvent(this.windowRef.nativeWindow, 'onEmbeddedMessagingButtonCreated')\n .pipe(\n take(1), // prevent auto re-launch on close\n switchMap((): Observable<void> => from(this.embeddedSvcBootstrap.utilAPI.launchChat()))\n )\n .subscribe((): void => {\n this.chatButtonState$.next(HelpButtonStatus.HIDDEN);\n this.messagingForWebTriggered$.next(true);\n })\n );\n\n // maximise chat\n this.subscription.add(\n fromEvent(this.windowRef.nativeWindow, 'onEmbeddedMessagingWindowMaximized').subscribe((): void =>\n this.chatButtonState$.next(HelpButtonStatus.HIDDEN)\n )\n );\n\n this.embeddedSvcBootstrap.settings.shouldShowParticipantChgEvntInConvHist = true; // SHA disable transfer alerts\n this.embeddedSvcBootstrap.settings.devMode = false;\n this.embeddedSvcBootstrap.settings.language = 'en';\n this.embeddedSvcBootstrap.settings.chatButtonPosition = '0.4rem, 0.4rem';\n this.embeddedSvcBootstrap.settings.hideChatButtonOnLoad = true;\n this.embeddedSvcBootstrap.settings.targetElement = target.nativeElement;\n\n this.embeddedSvcBootstrap.init(\n this.agentforceConfig.queueConfigs.DEFAULT.deploymentId,\n this.agentforceConfig.queueConfigs.DEFAULT.buttonId,\n this.agentforceConfig.queueConfigs.DEFAULT.agentUrl,\n {\n scrt2URL: this.agentforceConfig.scrt2URL,\n }\n );\n });\n }\n\n startWebMessagingChat(formData: SplitTrafficChatFields): void {\n if (this.embeddedSvcBootstrap) {\n this.embeddedSvcBootstrap.prechatAPI.setHiddenPrechatFields(formData);\n // Allows chat to launch on re-submission after user has ended the conversation\n this.chatButtonState$.next(HelpButtonStatus.CHAT);\n this.embeddedSvcBootstrap.utilAPI.launchChat();\n }\n }\n}\n","<div (finMutationObserver)=\"onDomChange($event)\" #target></div>\n<ng-container *ngIf=\"chatButtonState$ | async as helpButtonStatus\">\n <fin-pre-chat\n *ngIf=\"helpButtonStatus === HelpButtonStatus.CLICKED\"\n (chatToggle)=\"chatTrigger($event)\"\n (startChat)=\"startChat()\"\n [usePreChatForm]=\"agentforceLocaleAllowed\"\n ></fin-pre-chat>\n\n <button\n *ngIf=\"helpButtonStatus === HelpButtonStatus.VISIBLE\"\n id=\"chat-help-button\"\n (click)=\"chatTrigger(HelpButtonStatus.CLICKED)\"\n class=\"fixed flex flex--center nordic-blue-900-bg white-text ps-small-x ps-xsmall-y bold-type font-body-1 align-left rounded-left-large\"\n [class.dirty]=\"dirty$ | async\"\n tabindex=\"0\"\n [attr.aria-label]=\"'chat.defaultMinimizedText' | finLocalization\"\n >\n <fcom-icon\n class=\"flex--nogrow icon-medium white-text\"\n [dataTestId]=\"'icon-' + SvgLibraryIcon.CHAT\"\n [name]=\"SvgLibraryIcon.CHAT\"\n role=\"presentation\"\n ></fcom-icon>\n <span class=\"dn-tablet-down ms-xsmall-l\">{{ 'chat.defaultMinimizedText' | finLocalization }}</span>\n </button>\n\n <div\n *ngIf=\"helpButtonStatus === HelpButtonStatus.CHAT\"\n id=\"chat-help-loading\"\n class=\"fixed flex flex--center nordic-blue-900-bg white-text ps-small-x ps-xsmall-y bold-type font-body-1 align-left rounded-left-large\"\n >\n <fcom-loader [loaderType]=\"LoaderTheme.BUTTON\" [color]=\"LoaderColor.WHITE\"></fcom-loader>\n </div>\n</ng-container>\n","import { Component, ElementRef, HostBinding, Inject, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, NEVER, Observable, Subscription, zip } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap, take } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { LoaderColor, LoaderTheme } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { AppState, ConfigService, NativeBridgeService } from '@fcom/core';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { WindowRef } from '@fcom/core/providers/window';\nimport { CmsDataService } from '@fcom/core/services';\nimport { profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors/login.selector';\nimport { ElementActions, ElementTypes, GaContext, MediaQueryService } from '@fcom/common';\nimport { finShare } from '@fcom/rx';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport { ChatStatus, HelpButtonStatus, LiveagentChatFields, PrechatFields } from '../../interfaces';\nimport { SalesforceChatConfig, SalesforceChatConfigService } from '../../services/salesforce-chat-config.service';\nimport { SalesforceChatService } from '../../services/salesforce-chat.service';\nimport { AgentforceChatService } from '../../services/agentforce-chat.service';\n\n// The class of the div for \"All agents are busy or offline, please try again later\" message\n// that we replace with our custom HTML\nconst OFFLINE_DIALOG_CLASS_NAME = 'embeddedServiceLiveAgentStateOfflineSupportDefaultUI';\nconst MODAL_OPEN_CLASS_NAME = 'modal-open';\n\n@Component({\n selector: 'fin-chat',\n templateUrl: 'chat.component.html',\n styleUrls: ['chat.component.scss'],\n})\nexport class ChatComponent implements OnInit, OnDestroy {\n private subscription = new Subscription();\n private allAgentsAreBusyOrOfflineSubscription = new Subscription();\n\n readonly HelpButtonStatus = HelpButtonStatus;\n readonly LoaderTheme = LoaderTheme;\n readonly LoaderColor = LoaderColor;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n chatStatus: ChatStatus = ChatStatus.INITIAL;\n embeddedSvc: {\n settings: { [key: string]: unknown };\n // eslint-disable-next-line @typescript-eslint/ban-types\n init: Function;\n // eslint-disable-next-line @typescript-eslint/ban-types\n bootstrapEmbeddedService: Function;\n // eslint-disable-next-line @typescript-eslint/ban-types\n addEventHandler: Function;\n };\n chatButtonState$: BehaviorSubject<HelpButtonStatus>;\n openChatTrigger$: BehaviorSubject<HelpButtonStatus> = new BehaviorSubject(HelpButtonStatus.VISIBLE);\n dirty$: Observable<boolean>;\n agentforceLocaleAllowed = true;\n\n @ViewChild('target', { static: true }) target: ElementRef;\n\n // This is to set the mask all chat content in Hotjar sessions\n @HostBinding('attr.data-hj-suppress') maskHotJar = '';\n\n constructor(\n private cmsDataService: CmsDataService,\n private languageService: LanguageService,\n private salesforceChatConfigService: SalesforceChatConfigService,\n private salesforceChatService: SalesforceChatService,\n private store$: Store<AppState>,\n private windowRef: WindowRef,\n private mediaQueryService: MediaQueryService,\n private route: ActivatedRoute,\n private readonly renderer: Renderer2,\n @Inject(DOCUMENT) private document: Document,\n private gtmService: GtmService,\n private configService: ConfigService,\n private afChatService: AgentforceChatService,\n private nativeBridgeService: NativeBridgeService\n ) {}\n\n ngOnInit(): void {\n // Disable chat in app\n if (this.nativeBridgeService.isInsideNativeWebView) {\n return;\n }\n this.chatButtonState$ = this.afChatService.chatButtonState$;\n this.agentforceLocaleAllowed = this.configService.cfg.enableSplitChat\n ? this.afChatService.checkAllowedLocales(this.languageService.langValue)\n : false;\n\n // Check if feature flag is not enabled\n // OR load the old chat if the new chat is enabled and the site is not in English\n if (!this.configService.cfg.enableSplitChat || !this.agentforceLocaleAllowed) {\n this.initChat(this.salesforceChatConfigService.scriptSrcURL);\n\n this.subscription.add(\n this.salesforceChatService.openChat$\n .pipe(filter(() => !!this.embeddedSvc))\n .subscribe((fields: PrechatFields) => {\n this.embeddedSvc.settings.prepopulatedPrechatFields = {\n FirstName: fields.firstName,\n LastName: fields.lastName,\n Email: fields.email,\n Subject: fields.subject,\n Booking_Reference__c: fields.bookingReference,\n };\n this.startChat();\n })\n );\n }\n\n if (this.agentforceLocaleAllowed) {\n this.subscription.add(\n this.afChatService.openLegacyChat$.subscribe((fields: LiveagentChatFields): void => {\n this.afChatService.liveAgentChat(fields, this.target);\n })\n );\n\n // refresh the page to so that legacy chat is booted up on service queue change\n this.subscription.add(\n this.languageService.lang.subscribe((langValue): void => {\n if (!this.afChatService.checkAllowedLocales(langValue)) {\n window.location.reload();\n }\n })\n );\n\n this.subscription.add(\n combineLatest([\n this.afChatService.openWebMessagingChat$,\n this.afChatService.messagingForWebTriggered$,\n ]).subscribe(([fields, hasBeenTriggered]): void => {\n if (hasBeenTriggered) {\n this.afChatService.startWebMessagingChat(fields);\n return;\n }\n\n this.afChatService.webMessagingChat(fields, this.target);\n })\n );\n }\n\n // Mimic the same behavior from the old SF chat button when chat button is\n // clicked once then it is visible always and everywhere until refresh of the page\n this.dirty$ = this.afChatService.chatButtonState$.pipe(\n filter((helpButtonStatus) => helpButtonStatus !== HelpButtonStatus.VISIBLE),\n map((helpButtonStatus) => helpButtonStatus !== HelpButtonStatus.VISIBLE),\n take(1),\n finShare()\n );\n\n this.subscription.add(\n // prevent from scrolling page when chat and prechat screens are open in mobile\n combineLatest([this.mediaQueryService.isBreakpoint$('mobile'), this.afChatService.chatButtonState$])\n .pipe(\n map(([isMobile, openChatTrigger]) => isMobile && openChatTrigger !== HelpButtonStatus.VISIBLE),\n distinctUntilChanged()\n )\n .subscribe((shouldSetModalOpen) => {\n if (shouldSetModalOpen) {\n this.renderer.addClass(this.document.body, MODAL_OPEN_CLASS_NAME);\n } else {\n this.renderer.removeClass(this.document.body, MODAL_OPEN_CLASS_NAME);\n }\n })\n );\n\n this.subscription.add(\n this.route.queryParams\n .pipe(\n take(1),\n filter((params) => params.openChat?.toLowerCase() === 'true')\n )\n .subscribe(() => {\n this.chatTrigger(HelpButtonStatus.CLICKED);\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n unsubscribe(this.allAgentsAreBusyOrOfflineSubscription);\n }\n\n chat(): void {\n if (!this.embeddedSvc) {\n // Salesforce script failed to load/initialize, we don't have base settings, so unable to boot.\n this.chatStatus = ChatStatus.ERROR;\n return;\n }\n this.chatStatus = ChatStatus.LOADING;\n const config: SalesforceChatConfig = this.salesforceChatConfigService.config;\n\n // HACK. Salesforce Chat is unable to reboot with a new serviceQueue (language, buttonId) after\n // it has been booted, so we have to reload the whole page whenever language changes.\n this.subscription.add(\n this.languageService.lang.subscribe(() => {\n if (this.embeddedSvc.settings.buttonId) {\n window.location.reload();\n }\n })\n );\n\n this.subscription.add(\n combineLatest([\n zip(this.languageService.lang, this.languageService.localizations),\n this.store$.pipe(profileOrUndefinedIfNotLoggedIn()),\n ]).subscribe(([[langValue, translations], profile]) => {\n // Call config.setLanguage to set configuration based on language,\n // serviceQueueId is set by that if Chat is enabled for that language\n config.setLanguage(langValue);\n\n if (config.serviceQueueId) {\n config.setTargetElement(this.target.nativeElement);\n\n // If the user is logged in, pass information to pre-chat form\n if (profile) {\n config.settings.prepopulatedPrechatFields = {\n FirstName: profile.firstname,\n LastName: profile.lastname,\n Email: profile.email,\n Subject: '',\n Finnair_Plus_Number__c: profile.memberNumber,\n Case_Member_Tier__c: profile.tier,\n };\n }\n if (translations.chat) {\n config.settings.defaultMinimizedText = translations.chat.defaultMinimizedText;\n config.settings.disabledMinimizedText = translations.chat.defaultMinimizedText;\n config.settings.offlineSupportMinimizedText = translations.chat.defaultMinimizedText;\n } else {\n delete config.settings.disabledMinimizedText;\n delete config.settings.defaultMinimizedText;\n delete config.settings.offlineSupportMinimizedText;\n }\n\n // when chat is fully expanded and visible\n this.embeddedSvc.addEventHandler('afterMaximize', () => {\n this.afChatService.chatButtonState$.next(HelpButtonStatus.HIDDEN);\n });\n\n // when chat is closed (X is clicked)\n this.embeddedSvc.addEventHandler('afterDestroy', () => {\n this.afChatService.chatButtonState$.next(HelpButtonStatus.VISIBLE);\n });\n\n //this might be where I was going wrong! Needs to happen earlier?\n this.embeddedSvc.settings = { ...this.embeddedSvc.settings, ...config.settings };\n this.embeddedSvc.init(...config.initParams);\n\n this.chatStatus = ChatStatus.COMPLETE;\n\n // TODO: add masking class via javascript?\n }\n })\n );\n }\n /*\n Ask our service to load SalesForce's external .js file. That .js file adds an object to window.embedded_svc.\n Store that reference and then boot up the chat with this.chat()\n */\n initChat(scriptSrcURL: string): void {\n this.salesforceChatService\n .load(scriptSrcURL)\n .then(() => {\n this.embeddedSvc = this.windowRef.nativeWindow['embedded_svc'];\n this.chat();\n })\n .catch((_error) => {\n this.chatStatus = ChatStatus.ERROR;\n });\n }\n\n /*\n * Listens to events of MutationObserver (finMutationObserver) and replaces the basic unlocalized\n * \"All agents are offline or busy\" message with a Finnair custom message that contains chat's service\n * hours and information that the US site's chat is open 24/7\n */\n onDomChange($event: any): void {\n const addedNodes: NodeList = $event.addedNodes;\n addedNodes.forEach((node: Element) => {\n if (node.classList?.contains(OFFLINE_DIALOG_CLASS_NAME)) {\n // The \"All agents are busy or offline\" message appeared, replace it\n // with a HTML fragment from CMS\n this.subscription.remove(this.allAgentsAreBusyOrOfflineSubscription);\n this.allAgentsAreBusyOrOfflineSubscription = this.languageService\n .translate('fragments.chatAgentsBusyOrOffline.url')\n .pipe(\n filter((v) => !!v),\n switchMap((url) => (!url ? NEVER : this.cmsDataService.getFragmentJson(url))),\n filter((s: any) => s.detailText),\n map((s: any) => s.detailText),\n take(1)\n )\n .subscribe((detailTextHtml: string) => {\n node.innerHTML = detailTextHtml;\n });\n this.subscription.add(this.allAgentsAreBusyOrOfflineSubscription);\n }\n });\n }\n\n chatTrigger(shouldOpen: HelpButtonStatus): void {\n this.afChatService.chatButtonState$.next(shouldOpen);\n\n if (shouldOpen === HelpButtonStatus.CLICKED) {\n this.trackElement('open-chat-button');\n }\n }\n\n startChat(): void {\n this.embeddedSvc.bootstrapEmbeddedService();\n this.afChatService.chatButtonState$.next(HelpButtonStatus.CHAT);\n this.trackElement('start-chatting-chat-button');\n }\n\n private trackElement(label: string): void {\n this.gtmService.trackElement(`${label}`, GaContext.CHAT, ElementTypes.BUTTON, undefined, ElementActions.CLICK);\n }\n}\n","<div class=\"chatBody\">\n <div class=\"ps-medium\" #formContainer>\n <form\n class=\"flex flex--column\"\n [formGroup]=\"reactiveForm\"\n [finFormErrorFocus]=\"reactiveForm\"\n (ngSubmit)=\"onSubmit()\"\n >\n <p>{{ 'chatUserForm.intro' | finLocalization }}</p>\n\n <div class=\"flex flex--column input-fields\">\n <fcom-text-input\n [parentForm]=\"reactiveForm\"\n [controlName]=\"SalesforceChatFormControl.FIRST_NAME\"\n [translationPrefix]=\"'chatUserForm.firstName'\"\n [displayMargin]=\"false\"\n ></fcom-text-input>\n\n <fcom-text-input\n [parentForm]=\"reactiveForm\"\n [controlName]=\"SalesforceChatFormControl.LAST_NAME\"\n [translationPrefix]=\"'chatUserForm.lastName'\"\n [displayMargin]=\"false\"\n ></fcom-text-input>\n\n <fcom-text-input\n [parentForm]=\"reactiveForm\"\n [controlName]=\"SalesforceChatFormControl.EMAIL\"\n [translationPrefix]=\"'chatUserForm.emailAddress'\"\n [displayMargin]=\"false\"\n ></fcom-text-input>\n\n <fcom-radio-item-group\n [options]=\"[{ value: SalesforceChatFormHasBookingRefQ.YES }, { value: SalesforceChatFormHasBookingRefQ.NO }]\"\n [parentForm]=\"reactiveForm\"\n [controlName]=\"SalesforceChatFormControl.HAS_BOOKING_REFERENCE_Q\"\n [translationPrefix]=\"'chatUserForm.bookingRefQ'\"\n [isHorizontal]=\"true\"\n [isRequired]=\"true\"\n ></fcom-radio-item-group>\n\n @if (selectedBookingRef === SalesforceChatFormHasBookingRefQ.YES) {\n <fcom-text-input\n [parentForm]=\"reactiveForm\"\n [controlName]=\"SalesforceChatFormControl.BOOKING_REFERENCE\"\n [translationPrefix]=\"'chatUserForm.bookingReference'\"\n [placeHolder]=\"'chatUserForm.bookingReference.placeholder'\"\n [displayMargin]=\"false\"\n ></fcom-text-input>\n }\n </div>\n\n <fcom-button\n [type]=\"ButtonType.SUBMIT\"\n [text]=\"'chatUserForm.submitText' | finLocalization\"\n [mode]=\"ButtonMode.FILL\"\n [size]=\"ButtonSize.LARGE\"\n [loading]=\"loading$ | async\"\n ></fcom-button>\n </form>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, Validators, type UntypedFormGroup } from '@angular/forms';\n\nimport { BehaviorSubject, Subscription, take } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { ConfigService, PNR_PATTERN, type AppState } from '@fcom/core';\nimport { EMAIL_REGEX, NAME_PATTERN } from '@fcom/core/utils';\nimport { type Profile } from '@fcom/core-api/login';\nimport { ButtonMode, ButtonSize, ButtonType, TextInputType } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport {\n PrechatFields,\n SplitTrafficChatFields,\n SplitTrafficAdditionalChatFields,\n AgentforceChatConfig,\n LiveagentChatFields,\n HelpButtonStatus,\n} from '../../interfaces';\nimport { AgentforceChatService } from '../../services/agentforce-chat.service';\n\nexport enum SalesforceChatFormControl {\n FIRST_NAME = 'firstName',\n LAST_NAME = 'lastName',\n EMAIL = 'email',\n HAS_BOOKING_REFERENCE_Q = 'bookingRefQ',\n BOOKING_REFERENCE = 'bookingReference',\n}\n\nexport interface SalesforceChatForm {\n [SalesforceChatFormControl.FIRST_NAME]: string;\n [SalesforceChatFormControl.LAST_NAME]: string;\n [SalesforceChatFormControl.EMAIL]: string;\n [SalesforceChatFormControl.HAS_BOOKING_REFERENCE_Q]: string;\n [SalesforceChatFormControl.BOOKING_REFERENCE]: string;\n}\n\nexport enum SalesforceChatFormHasBookingRefQ {\n YES = 'yesBookingReference',\n NO = 'noBookingReference',\n}\n\n@Component({\n selector: 'fin-chat-user-form',\n templateUrl: './chat-user-form.component.html',\n styleUrl: './chat-user-form.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChatUserFormComponent implements OnInit, OnDestroy {\n readonly ButtonType = ButtonType;\n readonly ButtonMode = ButtonMode;\n readonly ButtonSize = ButtonSize;\n readonly SalesforceChatFormControl = SalesforceChatFormControl;\n readonly textareaLimit50 = 50;\n readonly TextInputType = TextInputType;\n readonly SalesforceChatFormHasBookingRefQ = SalesforceChatFormHasBookingRefQ;\n\n private subscriptions: Subscription = new Subscription();\n\n agentforceConfig?: AgentforceChatConfig;\n hiddenFields: SplitTrafficAdditionalChatFields;\n reactiveForm: UntypedFormGroup;\n\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n liveAgentChatEnabled = false;\n\n constructor(\n private fb: UntypedFormBuilder,\n private store$: Store<AppState>,\n private languageService: LanguageService,\n private configService: ConfigService,\n private afChatService: AgentforceChatService,\n private gtmService: GtmService\n ) {\n this.agentforceConfig = this.configService.cfg.agentforceChat;\n }\n\n ngOnInit(): void {\n this.subscriptions.add(\n this.store$.pipe(profileOrUndefinedIfNotLoggedIn(), take(1)).subscribe((profile: Profile): void => {\n this.createForm(profile);\n this.addFormWatcher();\n this.hiddenFields = this.setHiddenFields(profile);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n }\n\n get selectedBookingRef(): SalesforceChatFormHasBookingRefQ {\n return this.reactiveForm.controls[SalesforceChatFormControl.HAS_BOOKING_REFERENCE_Q].value ?? null;\n }\n\n createForm(profile?: Profile): void {\n this.reactiveForm = this.fb.group({\n [SalesforceChatFormControl.FIRST_NAME]: [\n profile?.firstname || '',\n [Validators.required, Validators.pattern(NAME_PATTERN), Validators.maxLength(this.textareaLimit50)],\n ],\n [SalesforceChatFormControl.LAST_NAME]: [\n profile?.lastname || '',\n [Validators.required, Validators.pattern(NAME_PATTERN), Validators.maxLength(this.textareaLimit50)],\n ],\n [SalesforceChatFormControl.EMAIL]: [profile?.email || '', [Validators.required, Validators.pattern(EMAIL_REGEX)]],\n [SalesforceChatFormControl.HAS_BOOKING_REFERENCE_Q]: this.fb.control(\n '' as SalesforceChatFormHasBookingRefQ,\n Validators.required\n ),\n [SalesforceChatFormControl.BOOKING_REFERENCE]: ['', [Validators.pattern(PNR_PATTERN), Validators.maxLength(6)]],\n });\n }\n\n addFormWatcher(): void {\n this.subscriptions.add(\n this.reactiveForm.controls[SalesforceChatFormControl.HAS_BOOKING_REFERENCE_Q].valueChanges.subscribe(\n (value): void => {\n value === SalesforceChatFormHasBookingRefQ.YES\n ? this.enableBookingReference()\n : this.disableBookingReference();\n }\n )\n );\n }\n\n private enableBookingReference(): void {\n this.reactiveForm.controls[SalesforceChatFormControl.BOOKING_REFERENCE].setValidators([\n Validators.pattern(PNR_PATTERN),\n Validators.maxLength(6),\n Validators.required,\n ]);\n this.reactiveForm.get([SalesforceChatFormControl.BOOKING_REFERENCE]).reset();\n this.reactiveForm.controls[SalesforceChatFormControl.BOOKING_REFERENCE].enable();\n this.liveAgentChatEnabled = true;\n }\n\n private disableBookingReference(): void {\n this.liveAgentChatEnabled = false;\n this.reactiveForm.controls[SalesforceChatFormControl.BOOKING_REFERENCE].setValidators(null);\n this.reactiveForm.get([SalesforceChatFormControl.BOOKING_REFERENCE]).reset();\n }\n\n setHiddenFields(profile: Profile): SplitTrafficAdditionalChatFields {\n if (profile) {\n return {\n Finnair_Plus_Number_c: profile.memberNumber,\n Case_Member_Tier_c: profile.tier,\n AuthenticatedUser: 'true', // Must be a string\n };\n }\n return {\n AuthenticatedUser: 'false', // Must be a string\n };\n }\n\n liveAgentChatData = (formData: PrechatFields, profile?: Profile): LiveagentChatFields => {\n return {\n FirstName: formData.firstName,\n LastName: formData.lastName,\n Email: formData.email,\n Booking_Reference__c: formData.bookingReference,\n ...(profile\n ? {\n Finnair_Plus_Number__c: profile.memberNumber,\n Case_Member_Tier__c: profile.tier,\n }\n : {}),\n };\n };\n\n webMessagingChatData = (formData: PrechatFields): SplitTrafficChatFields => {\n return {\n FirstName_c: formData.firstName,\n LastName_c: formData.lastName,\n Email_c: formData.email,\n ...this.hiddenFields,\n WebSite_Country: this.languageService.ddsLocaleValue.countrySite.toLowerCase(),\n WebSite_Language: this.languageService.langKeyValue,\n };\n };\n\n onSubmit(): void {\n const formData: PrechatFields = this.reactiveForm.value;\n\n if (!this.reactiveForm.valid) {\n this.reactiveForm.markAllAsTouched();\n this.reactiveForm.updateValueAndValidity();\n\n return;\n }\n\n this.afChatService.chatButtonState$.next(HelpButtonStatus.CHAT);\n this.loading$.next(true);\n\n // Direct user with a booking reference to liveagent chat.\n if (this.liveAgentChatEnabled) {\n this.trackElement('start-the-chat_booking');\n this.afChatService.openLegacyChat$.next(this.liveAgentChatData(formData));\n\n return;\n }\n\n this.trackElement('start-the-chat');\n this.afChatService.openWebMessagingChat$.next(this.webMessagingChatData(formData));\n }\n\n private trackElement(label: string): void {\n this.gtmService.trackElement(label, GaContext.CHAT, ElementTypes.BUTTON, undefined, ElementActions.CLICK);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { ButtonModule, IconsModule, LoaderModule, TrapFocusModule, UiComponentsModule } from '@fcom/ui-components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { ComponentsModule, FragmentService } from '@fcom/common';\nimport { GtmModule } from '@fcom/common/gtm';\n\nimport { PreChatComponent } from './components/pre-chat/pre-chat.component';\nimport { SalesforceChatService } from './services/salesforce-chat.service';\nimport { SalesforceChatConfigService } from './services/salesforce-chat-config.service';\nimport { ChatComponent } from './components/chat/chat.component';\nimport { ChatGlobalVisibilityComponent } from './components/chat-global-visibility/chat-global-visibility.component';\nimport { ChatUserFormComponent } from './components/chat-user-form/chat-user-form.component';\nimport { AgentforceChatService } from './services/agentforce-chat.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ComponentsModule,\n DirectiveModule,\n UiTranslateModule,\n ButtonModule,\n IconsModule,\n TrapFocusModule,\n LoaderModule,\n GtmModule,\n ReactiveFormsModule,\n UiComponentsModule,\n ],\n declarations: [ChatComponent, PreChatComponent, ChatGlobalVisibilityComponent, ChatUserFormComponent],\n exports: [ChatComponent, ChatGlobalVisibilityComponent],\n providers: [SalesforceChatService, SalesforceChatConfigService, FragmentService, AgentforceChatService],\n})\nexport class ChatModule {}\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * Component that only contains the global styles (ViewEncapsulation.None) that are used to hide the chat in certain sections\n * of the site and to raise the Chat button in certain sections of the site so that it doesn't float on top of critical information\n *\n * All styles for the inside of the chat button and chat dialog are encapsulated within the chat.component and are not here.\n */\n@Component({\n selector: 'fin-chat-global-visibility',\n template: '',\n styleUrls: ['chat-global-visibility.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ChatGlobalVisibilityComponent {}\n","/* eslint-disable no-underscore-dangle */\nimport { HttpParams } from '@angular/common/http';\n\nimport { createSelector, select } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { entrySet, isPresent } from '@fcom/core/utils';\nimport {\n IdAndHash,\n CartPartStatus,\n CartState,\n CartStatus,\n UpdatingCartPart,\n CartFareRules,\n} from '@fcom/dapi/interfaces';\nimport { Category, FinnairCart, FinnairItineraryItemFlight } from '@fcom/dapi/api/models';\nimport { BookingFeatureState } from '@fcom/common/interfaces/booking';\nimport { mapFlightsFromCartData } from '@fcom/common/utils/map-flights-from-cart-data';\n\nimport { bookingFeatureState } from './booking-feature-state.selector';\n\nexport const cartUrlToIdAndHash = (url: string): IdAndHash => {\n const [urlPath, queryPart] = url.split('?');\n const hash = new HttpParams({ fromString: queryPart }).get('hash');\n const id = urlPath.split('/').filter(Boolean).slice(-1)[0];\n return { id, hash };\n};\n\nconst _cartState = createSelector(bookingFeatureState, (_bfs: BookingFeatureState) => _bfs?.cart);\nconst _cartUrl = createSelector(_cartState, (_cs: CartState) => _cs?.cartUrl);\nexport const cartDataSelector = createSelector(_cartState, (_cs: CartState) => _cs?.cartData);\nexport const cartStatusSelector = createSelector(_cartState, (_cs: CartState) => _cs?.cartStatus);\nconst _cartIdAndHash = createSelector(_cartUrl, (url) => (url ? cartUrlToIdAndHash(url) : undefined));\nconst _cartFirstFlightDepartureDate = createSelector(cartDataSelector, (cd) => cd?.bounds[0]?.departure.dateTime);\nconst _cartLastFlightArrivalDate = createSelector(\n cartDataSelector,\n (cd) => (cd?.bounds[1] || cd?.bounds[0])?.arrival.dateTime\n);\nconst _cartFlights = createSelector(cartDataSelector, (cd): FinnairItineraryItemFlight[] => mapFlightsFromCartData(cd));\nconst _cartBoundsTitle = createSelector(cartDataSelector, (cd) => {\n if (!cd) {\n return undefined;\n }\n if (!isPresent(cd.bounds[1])) {\n return `${cd.bounds[0].departure.locationCode}–${cd.bounds[0].arrival.locationCode}`;\n }\n // TODO: this is actually wrong for open jaw trips\n return `${cd.bounds[0].departure.locationCode}–${cd.bounds[0].arrival.locationCode}–${cd.bounds[0].departure.locationCode}`;\n});\nconst _cartDirty = createSelector(_cartState, (_cs: CartState) => !!_cs?.dirty);\nconst _acceptTerms = createSelector(_cartState, (_cs: CartState) => !!_cs?.acceptTerms);\n\nexport const cartState = (): StateSelector<BookingFeatureState, CartState> => safeSelect(_cartState);\nexport const cartUrl = (): StateSelector<BookingFeatureState, string> => safeSelect(_cartUrl);\nexport const cartData = (): StateSelector<BookingFeatureState, FinnairCart> => safeSelect(cartDataSelector);\nexport const cartStatus = (): StateSelector<BookingFeatureState, CartStatus> => safeSelect(cartStatusSelector);\n\n/**\n * Selects current cart id and hash.\n * @return [currentCartId, currentCartHash]\n */\nexport const cartIdAndHash = (): StateSelector<BookingFeatureState, IdAndHash> => safeSelect(_cartIdAndHash);\n\n/**\n * Selects the first flight's departure date time as string from the Cart data.\n * Emits only after cart data is present.\n */\nexport const cartFirstFlightDepartureDate = (): StateSelector<BookingFeatureState, string> =>\n safeSelect(_cartFirstFlightDepartureDate);\n\n/**\n * Selects the last flight's arrival date time as string from the Cart data.\n * Emits only after cart data is present.\n */\nexport const cartLastFlightArrivalDate = (): StateSelector<BookingFeatureState, string> =>\n safeSelect(_cartLastFlightArrivalDate);\n\n/**\n * Selects all flight's from the Cart data.\n * Emits only after cart data is present.\n */\nexport const cartFlights = (): StateSelector<BookingFeatureState, FinnairItineraryItemFlight[]> =>\n safeSelect(_cartFlights);\n\nexport const cartFlight = (flightId: string): StateSelector<BookingFeatureState, FinnairItineraryItemFlight> =>\n safeSelect(\n createSelector(_cartFlights, (_flights: FinnairItineraryItemFlight[]) =>\n _flights.find((flight) => flight.id === flightId)\n )\n );\n\nconst _cartPartStatusForCategory = (category: Category) =>\n createSelector(\n createSelector(_cartState, (_cs: CartState) => _cs?.isUpdating),\n createSelector(_cartIdAndHash, (c) => c?.id),\n (updating: UpdatingCartPart = {}, currentCartId: string) => {\n const updates: CartPartStatus[] = entrySet(updating)\n .filter((entry) => entry.key.indexOf(category) !== -1 && entry.key.indexOf(currentCartId) !== -1)\n .map((e) => e.value);\n return updates.length > 0\n ? updates.reduce(\n (current, update) =>\n update === CartPartStatus.ERROR\n ? update\n : current !== CartPartStatus.ERROR && update === CartPartStatus.UPDATING\n ? update\n : current,\n CartPartStatus.OK\n )\n : CartPartStatus.OK;\n }\n );\n\nexport const cartPartStatusForCategory =\n (category: Category) =>\n (state$: Observable<BookingFeatureState>): Observable<CartPartStatus> =>\n state$.pipe(select(_cartPartStatusForCategory(category))).pipe(startWith(CartPartStatus.OK));\n\nexport const cartBoundsTitle = (): StateSelector<BookingFeatureState, string> => safeSelect(_cartBoundsTitle);\n\n/**\n * Is cart in dirty state\n * When in dirty state we should do ancillary updates to backend otherwise we could skip them\n */\nexport const isCartDirty = (): StateSelector<BookingFeatureState, boolean> => safeSelect(_cartDirty);\n\nexport const acceptTerms = (): StateSelector<BookingFeatureState, boolean> => safeSelect(_acceptTerms);\n\nconst _fareRules = createSelector(_cartState, (_cs: CartState) => _cs?.fareRules);\nexport const fareRules = (): StateSelector<BookingFeatureState, CartFareRules> => select(_fareRules);\n","import { FinnairCart } from '@fcom/dapi/api/models/finnair-cart';\nimport { FinnairItineraryItemFlight } from '@fcom/dapi/api/models/finnair-itinerary-item-flight';\nimport { isFlight } from '@fcom/common-booking/utils/common-booking.utils';\n\nexport const mapFlightsFromCartData = (cd: FinnairCart): FinnairItineraryItemFlight[] =>\n cd?.bounds.reduce((all, b) => all.concat(...b.itinerary.filter(isFlight)), []) ?? [];\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { BehaviorSubject, Observable, ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, take, takeUntil } from 'rxjs/operators';\n\nimport { SentryLogger, mapErrorForSentry } from '@fcom/core';\nimport { finShare, triggerWhenPreviousCompletes } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\n@Injectable()\nexport class QueueService implements OnDestroy {\n private currentOffer$: Subject<string> = new BehaviorSubject('unknown_or_refreshed_page');\n private currentQueue$: Observable<Subject<Observable<any>>> = new ReplaySubject(1);\n private currentCancelPayment$ = new Subject<void>();\n public cancelServiceAvailability$ = new Subject<void>();\n\n private subscriptions = new Subscription();\n\n constructor(private sentryLogger: SentryLogger) {\n this.currentQueue$ = this.currentOffer$.pipe(\n distinctUntilChanged(),\n map(() => new Subject<Observable<any>>()),\n finShare()\n );\n this.subscriptions.add(\n this.currentQueue$.pipe(switchMap((queue) => queue.pipe(triggerWhenPreviousCompletes()))).subscribe()\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n sendToQueue(actionName: string, obs$: Observable<any>, cancelStream$: Observable<any>): void {\n let canceledBeforeTrigger = false;\n const subscription = new Subscription();\n subscription.add(cancelStream$.subscribe(() => (canceledBeforeTrigger = true)));\n\n this.subscriptions.add(\n this.currentQueue$.pipe(take(1)).subscribe((queue) => {\n const task$ = new Observable((o) => {\n try {\n if (canceledBeforeTrigger) {\n o.complete();\n } else {\n subscription.add(\n // eslint-disable-next-line rxjs/no-nested-subscribe\n obs$.subscribe({\n complete: () => o.complete(),\n error: () => o.complete(),\n })\n );\n }\n } catch (error) {\n this.sentryLogger.error('Queueing action failed', {\n actionName,\n error: mapErrorForSentry(error),\n });\n o.error(error);\n // eslint-disable-next-line rxjs/no-redundant-notify\n o.complete();\n }\n return () => {\n o.complete();\n unsubscribe(subscription);\n };\n }).pipe(takeUntil(cancelStream$));\n queue.next(task$);\n })\n );\n }\n\n public startQueue(queueId: string): void {\n this.currentOffer$.next(queueId);\n }\n\n public cancelOngoingPayment(): void {\n return this.currentCancelPayment$.next();\n }\n\n get cancelPayment(): Subject<void> {\n return this.currentCancelPayment$;\n }\n\n /**\n * Replays any event from the stream after this method is called.\n * Completes the stream after the first event.\n */\n toCancelEvent = <T>(obs$: Observable<T>): Observable<T> => obs$.pipe(finShare());\n}\n","import { Directive, EventEmitter, Output, AfterViewInit, ElementRef, NgZone, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n@Directive({\n selector: '[finAfterViewInit]',\n})\nexport class AfterViewInitDirective implements AfterViewInit {\n @Output() finAfterViewInit: EventEmitter<ElementRef> = new EventEmitter<ElementRef>();\n\n constructor(\n private elementRef: ElementRef,\n private ngZone: NgZone,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngAfterViewInit(): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n setTimeout(() => {\n this.ngZone.run(() => {\n this.finAfterViewInit.emit(this.elementRef);\n });\n }, 0);\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Params, Router } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, pairwise, ReplaySubject, Subscription, filter } from 'rxjs';\nimport { distinctUntilChanged, map, take } from 'rxjs/operators';\n\nimport { globalBookingLocations, globalBookingRouteType } from '@fcom/common/store/selectors/global-booking.selectors';\nimport { GlobalBookingTravelClass, isNotEmpty } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { getBookingStepLink } from '@fcom/common/utils/booking-common.utils';\nimport {\n LocationPair,\n GlobalBookingActions,\n globalBookingPaxAmount,\n globalBookingSelections,\n GlobalBookingState,\n globalBookingTravelClasses,\n globalBookingTripType,\n globalBookingFlights,\n} from '@fcom/common/store';\nimport { FlightSegment, OfferListFetchParams, Step } from '@fcom/common/interfaces';\nimport { TripType } from '@fcom/core/interfaces';\nimport { GlobalBookingFlight } from '@fcom/common/store/store.interface';\nimport { PaxAmount } from '@fcom/dapi';\nimport { LocationsService } from '@fcom/locations';\nimport { finShare, snapshot } from '@fcom/rx';\nimport { equals, unique, unsubscribe } from '@fcom/core/utils';\nimport { Location, LocationRouteType } from '@fcom/core-api/interfaces';\nimport { AVAILABLE_TRIP_TYPES, GLOBAL_BOOKING_WIDGET_EXPANDER_KEY } from '@fcom/booking-widget/constants';\nimport { BOOKING_STEPS, BOOKING_STEPS_ARRAY } from '@fcom/common/config/booking-config';\nimport { BookingQueryParams } from '@fcom/common/interfaces/booking/booking-step.interface';\nimport { BookingAndAppState, TravelClasses } from '@fcom/common/interfaces/booking';\nimport { createParamsForStep } from '@fcom/common/utils/create-params-for-step';\nimport { ExpanderStatus, WidgetTab } from '@fcom/booking-widget/interfaces';\nimport { BookingWidgetActions } from '@fcom/booking-widget/store/actions';\nimport { PseudoLocalActions } from '@fcom/core/actions';\n\nimport { BookingActions, CartActions } from '../store/actions';\nimport { bookingStep, lastRequestParams, offerLastRequestParams, selectFareFamiliesBrands } from '../store/selectors';\n\nexport interface StepChangeSignature {\n onSuccessPost?: (step: Step) => any;\n\n /**\n * If this is set to true, will not call router.navigate\n */\n skipRouteChange?: boolean;\n}\n\nexport interface SetStepSignature extends StepChangeSignature {\n step: Step;\n locale?: string;\n}\n\ninterface TranslationKeyFareFamilyBransDictiounaryItem {\n translationKey: string;\n brandNames: string[];\n}\n\nconst noop = () => {};\n\n@Injectable()\nexport class BookingService implements OnDestroy {\n private readonly globalBookingFlights$: Observable<GlobalBookingFlight[]>;\n private readonly step$: Observable<Step>;\n private readonly previousStep$: ReplaySubject<Step> = new ReplaySubject(2);\n private readonly paxAmount$: Observable<PaxAmount>;\n private readonly tripType$: Observable<TripType>;\n private readonly travelClasses$: Observable<TravelClasses>;\n private readonly routeType$: Observable<LocationRouteType>;\n\n private readonly shortHaulFlightWeights = {\n 'fragments.lightTicketWarning': 20,\n 'fragments.superLightTicketWarning': 30,\n 'fragments.businessLightTicketWarning': 10,\n };\n\n private readonly longHaulFlightWeights = {\n 'fragments.lightTicketWarning': 20,\n 'fragments.superLightTicketWarning': 10,\n 'fragments.businessLightTicketWarning': 30,\n };\n\n private readonly superLightFareFamiliesDictionary: TranslationKeyFareFamilyBransDictiounaryItem[] = [\n {\n translationKey: 'fragments.lightTicketWarning',\n brandNames: [\n 'Economy Light',\n 'Economy Campaign Light',\n 'Economy Light Corporate',\n 'Premium Economy Light',\n 'Premium Economy Light Corporate',\n 'Premium Economy Campaign Light',\n 'Premium Economy Campaign Light Corporate',\n ],\n },\n {\n translationKey: 'fragments.superLightTicketWarning',\n brandNames: ['Economy Superlight', 'Economy Superlight Campaign', 'Economy Superlight Corporate'],\n },\n {\n translationKey: 'fragments.businessLightTicketWarning',\n brandNames: ['Business Campaign Light', 'Business Light Corporate', 'Business Light'],\n },\n ];\n\n private subscriptions = new Subscription();\n\n constructor(\n private store$: Store<BookingAndAppState>,\n private languageService: LanguageService,\n private locationsService: LocationsService,\n private router: Router\n ) {\n this.step$ = this.store$.pipe(bookingStep());\n this.step$\n .pipe(\n distinctUntilChanged((prev, curr) => prev.id === curr.id),\n pairwise(),\n map(([previousStep]) => previousStep)\n )\n // eslint-disable-next-line rxjs/no-ignored-subscription\n .subscribe((step) => this.previousStep$.next(step));\n this.paxAmount$ = this.store$.pipe(globalBookingPaxAmount());\n this.tripType$ = this.store$.pipe(globalBookingTripType());\n this.travelClasses$ = this.store$.pipe(globalBookingTravelClasses());\n this.globalBookingFlights$ = this.store$.pipe(globalBookingFlights());\n this.routeType$ = this.store$.pipe(globalBookingRouteType());\n\n this.fetchLocationInformationBasedOnSelections();\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n get step(): Observable<Step> {\n return this.step$;\n }\n\n get currentStep(): Step {\n return snapshot(this.store$.pipe(bookingStep()));\n }\n\n get previousStep(): Observable<Step> {\n return this.previousStep$.asObservable();\n }\n\n get globalBookingSelections(): GlobalBookingState {\n return snapshot(this.store$.pipe(globalBookingSelections()));\n }\n\n get locations(): Observable<GlobalBookingFlight[]> {\n // TODO: clear (in reducer) and fetch locations if missing, e.g., when changing language\n // see https://github.com/FinnairOyj/finnair-com-ux/issues/2208\n // TODO 2023-10-27: is the above still valid after moving locations from booking to common?\n return this.globalBookingFlights$;\n }\n\n get paxAmount(): Observable<PaxAmount> {\n return this.paxAmount$;\n }\n\n get travelClasses(): Observable<TravelClasses> {\n return this.travelClasses$.pipe(finShare());\n }\n\n get tripType(): Observable<TripType> {\n return this.tripType$.pipe(finShare());\n }\n\n get offerListParams(): OfferListFetchParams {\n return snapshot(this.store$.pipe(lastRequestParams())) ?? snapshot(this.store$.pipe(offerLastRequestParams()));\n }\n\n get routeType(): Observable<LocationRouteType> {\n return this.routeType$.pipe(finShare());\n }\n\n setRouteType(routeType: LocationRouteType): void {\n this.store$.dispatch(GlobalBookingActions.setRouteType({ routeType }));\n }\n\n setFlights(flights: GlobalBookingState['flights']): void {\n this.store$.dispatch(\n GlobalBookingActions.setFlights({\n flights,\n })\n );\n }\n\n setFlightsFromLocationsCodes(flightSearch: FlightSegment[]): void {\n this.subscriptions.add(\n this.getLocationsFromFlights(flightSearch).subscribe((locations) => {\n this.setFlights(\n flightSearch.map((flight) => ({\n origin: locations[flight.origin],\n destination: locations[flight.destination],\n departureDate: flight.departureDate,\n }))\n );\n })\n );\n }\n\n getLocationsFromFlights(flightSearch: FlightSegment[]): Observable<{ [locationCode: string]: Location }> {\n const uniqueListOfLocations = flightSearch\n .reduce((arr, flight) => {\n if (!arr.includes(flight.origin)) {\n arr.push(flight.origin);\n }\n\n if (!arr.includes(flight.destination)) {\n arr.push(flight.destination);\n }\n\n return arr;\n }, [])\n .filter(Boolean);\n\n return this.locationsService.triggerLocationFetchAll(uniqueListOfLocations).pipe(take(1));\n }\n\n setStep({ step, onSuccessPost = noop, skipRouteChange = false, locale }: SetStepSignature): void {\n this.goToStep({ step, skipRouteChange, onSuccessPost, locale });\n }\n\n prevStep(): void {\n const nextStep = this.currentStepIndex - 1;\n\n if (nextStep >= 0 && this.currentStepIndex !== this.getStepIndex(BOOKING_STEPS.PURCHASE_SUCCESS)) {\n this.setStep({\n step: BOOKING_STEPS_ARRAY[nextStep],\n });\n }\n }\n\n nextStep(): void {\n const nextStep = this.currentStepIndex + 1;\n\n if (nextStep < BOOKING_STEPS_ARRAY.length) {\n this.setStep({\n step: BOOKING_STEPS_ARRAY[nextStep],\n });\n }\n }\n\n isFirstStep(): Observable<boolean> {\n return this.step.pipe(map((s) => s.id === BOOKING_STEPS.ENTRY.id));\n }\n\n setPaxAmount(paxAmount: PaxAmount): void {\n if (!equals(paxAmount, snapshot(this.store$.pipe(globalBookingPaxAmount())))) {\n this.store$.dispatch(GlobalBookingActions.setPaxAmount({ paxAmount }));\n }\n }\n\n setActiveTab(tab: WidgetTab): void {\n this.store$.dispatch(BookingWidgetActions.setActiveTab({ activeTab: tab }));\n }\n\n increasePaxAmountField(field: string, value: number): void {\n this.store$.dispatch(GlobalBookingActions.increasePaxAmountField({ field, increment: value }));\n }\n\n decreasePaxAmountField(field: string, value: number): void {\n this.store$.dispatch(GlobalBookingActions.decreasePaxAmountField({ field, decrement: value }));\n }\n\n setTripType(tripType: TripType): void {\n if (tripType !== snapshot(this.store$.pipe(globalBookingTripType()))) {\n this.store$.dispatch(GlobalBookingActions.setTripType({ tripType }));\n }\n }\n\n selectTravelClass(travelClass: GlobalBookingTravelClass): void {\n this.store$.dispatch(GlobalBookingActions.setTravelClass({ travelClass }));\n }\n\n updateTripTypeBasedOnQueryParams(queryParams: Params): void {\n const tripType = queryParams[BookingQueryParams?.tripType];\n\n if (tripType && AVAILABLE_TRIP_TYPES.includes(tripType)) {\n this.setTripType(tripType);\n }\n }\n\n getContentUrlTranslationKeySuperLightModalWindow(isShortHaulFlight: boolean): string {\n const selectedFareFamiliesBrands = snapshot(this.store$.pipe(selectFareFamiliesBrands()));\n\n return this.superLightFareFamiliesDictionary\n .filter((dictionary) => {\n if (selectedFareFamiliesBrands.filter((brand) => dictionary.brandNames.includes(brand)).length > 0) {\n return dictionary;\n }\n })\n .reduce((prev, current) => {\n const weights = isShortHaulFlight ? this.shortHaulFlightWeights : this.longHaulFlightWeights;\n return weights[prev.translationKey] > weights[current.translationKey] ? prev : current;\n }, {} as TranslationKeyFareFamilyBransDictiounaryItem)?.translationKey;\n }\n\n setGlobalBookingWidgetExpanderStatus(expandStatus: ExpanderStatus): void {\n this.store$.dispatch(\n PseudoLocalActions.setValue({\n key: GLOBAL_BOOKING_WIDGET_EXPANDER_KEY,\n data: `${GLOBAL_BOOKING_WIDGET_EXPANDER_KEY}-${expandStatus}`,\n })\n );\n }\n\n private get currentStepIndex(): number {\n return this.getStepIndex(this.currentStep);\n }\n\n private goToStep({ step, onSuccessPost = noop, skipRouteChange = false, locale }: SetStepSignature): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n // Check if returning to flight selection or earlier from a later phase\n const isClearCart =\n step.phase <= BOOKING_STEPS.FLIGHT_SELECTION.phase && this.currentStep && this.currentStep.phase > step.phase;\n\n if (!skipRouteChange) {\n this.router\n .navigateByUrl(\n getBookingStepLink(\n locale || this.languageService.langValue,\n step,\n createParamsForStep(step, this.globalBookingSelections, this.offerListParams)\n )\n )\n .then((b) => {\n if (b) {\n this.store$.dispatch(BookingActions.setStep({ step }));\n resolve();\n } else {\n reject();\n }\n })\n .catch(reject)\n .finally(() => {\n if (isClearCart) {\n // Clear cart if returning to flight selection or earlier from a later phase\n this.store$.dispatch(CartActions.reset());\n }\n });\n } else {\n if (isClearCart) {\n // Clear cart if returning to flight selection or earlier from a later phase\n this.store$.dispatch(CartActions.reset());\n }\n this.store$.dispatch(BookingActions.setStep({ step }));\n resolve();\n }\n })\n .then(() => onSuccessPost(step))\n .catch((_error) => {});\n }\n\n private getStepIndex(step: Step): number {\n return BOOKING_STEPS_ARRAY.findIndex((s) => s.id === step.id);\n }\n\n private fetchLocationInformationBasedOnSelections() {\n this.subscriptions.add(\n this.store$\n .pipe(\n globalBookingLocations(),\n filter((locations: LocationPair[]) => !!locations?.length),\n distinctUntilChanged((prev, next) =>\n next.every(\n (loc, i) =>\n loc?.origin?.locationCode === prev?.[i]?.origin?.locationCode &&\n loc?.destination?.locationCode === prev?.[i]?.destination?.locationCode\n )\n ),\n map((locations) =>\n locations\n .flatMap((location) => [location.origin?.locationCode, location.destination?.locationCode])\n .filter(unique)\n .filter(Boolean)\n ),\n filter(isNotEmpty)\n )\n .subscribe((locationCodes: string[]) => {\n locationCodes.forEach((code) => {\n this.locationsService.triggerLocationFetch(code);\n });\n })\n );\n }\n}\n","import { OfferListFetchParams, Step } from '../interfaces';\nimport { GlobalBookingState } from '../store';\nimport { BOOKING_STEPS } from '../config/booking-config';\n\nexport const createParamsForStep = (\n step: Step,\n globalBooking: GlobalBookingState,\n offerListParams: OfferListFetchParams\n): { json?: string } => {\n if (step.id !== BOOKING_STEPS.FLIGHT_SELECTION.id) {\n return null;\n }\n\n /**\n * If the session has expired and there is no longer a search query in the store then don't try\n * and encode any \"initialState\" data into the url.\n **/\n if (!globalBooking?.flights?.[0]?.origin) {\n return null;\n }\n\n const flightSelectionParams = {\n flights: globalBooking?.flights?.map((globalBookingFlight) => ({\n origin: globalBookingFlight.origin?.locationCode,\n destination: globalBookingFlight.destination?.locationCode,\n departureDate: globalBookingFlight.departureDate,\n })),\n cabin: globalBooking?.travelClasses?.selected,\n adults: globalBooking?.paxAmount?.adults,\n c15s: globalBooking?.paxAmount?.c15s,\n children: globalBooking?.paxAmount?.children,\n infants: globalBooking?.paxAmount?.infants,\n directFlights: offerListParams?.directFlights,\n isAward: offerListParams?.isAward || null,\n };\n\n return {\n json: encodeURIComponent(JSON.stringify(flightSelectionParams)),\n };\n};\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, Observable, of, PartialObserver, Subscription } from 'rxjs';\nimport { share, switchMap, take, tap, delay } from 'rxjs/operators';\n\nimport { SentryLogger } from '@fcom/core';\nimport { TripType, OfferListFetchParams } from '@fcom/common/interfaces';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { retryWithBackoff, snapshot } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\nimport {\n FinnairAirBoundsRequest,\n FinnairAirBoundsRequestItinerary,\n FinnairAirBoundsRequestTravelers,\n FinnairAirBoundsResponse,\n} from '@fcom/dapi/api/models';\nimport { OffersService } from '@fcom/dapi/api/services';\nimport { InstantSearchMonitoring } from '@fcom/booking-widget/interfaces/store.interface';\nimport { instantSearchMonitoring } from '@fcom/booking-widget/store/selectors/booking-widget.selector';\nimport { BookingWidgetAndAppState } from '@fcom/booking-widget/store/selectors/booking-widget-feature-state.selector';\nimport { stringHashCode } from '@fcom/core/utils/utils';\nimport { AirOffersStatus, BookingAppState } from '@fcom/common/interfaces/booking';\nimport { BookingWidgetActions } from '@fcom/booking-widget/store/actions';\nimport { NotificationWarning } from '@fcom/booking-widget/interfaces';\nimport { globalBookingTripType } from '@fcom/common/store';\n\nimport { BoundsActions } from '../../../store/actions';\nimport {\n airBoundsRequest,\n boundsStatus,\n lastRequestParams,\n outboundCache,\n selectedCheapestOffer,\n serializedLastRequestParams,\n} from '../../../store/selectors';\nimport { mapAirBoundIdToBound, mapCityNameAndAirportToBounds } from '../../../utils';\n\nexport interface PreSelectionParams {\n departureFlightNumbers?: string;\n returnFlightNumbers?: string;\n departureFareFamily?: string;\n returnFareFamily?: string;\n}\n\nexport type TicketSelectionParams = OfferListFetchParams & PreSelectionParams;\n\nconst NO_FLIGHTS_STATUSES: string[] = ['NO_FLIGHTS_FOUND', 'NO_FLIGHTS_LEFT_FOR_TODAY'];\nconst DENIED_BY_AKAMAI = /You don't have permission to access/;\n\n@Injectable()\nexport class BookingAirBoundsService implements OnDestroy {\n static NUMBER_OF_RETRIES = 1;\n NUMBER_OF_ONE_WAY_FLIGHT = 1;\n\n private subscription: Subscription;\n tripType$: Observable<TripType>;\n _preselectedBoundId$: BehaviorSubject<string> = new BehaviorSubject(null);\n\n constructor(\n private configService: ConfigService,\n private store$: Store<BookingAppState>,\n private bookingWidgetStore$: Store<BookingWidgetAndAppState>,\n private sentryLogger: SentryLogger,\n private offersService: OffersService\n ) {\n this.tripType$ = this.store$.pipe(globalBookingTripType());\n }\n\n get preselectedBoundId$(): Observable<string> {\n return this._preselectedBoundId$.asObservable();\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n setPreselectedBoundId(boundId: string): void {\n this._preselectedBoundId$.next(boundId);\n }\n\n resetPreselectedBoundId(): void {\n if (this._preselectedBoundId$.getValue()) {\n this._preselectedBoundId$.next(null);\n }\n }\n\n /**\n * Triggers bound fetching for the given parameters. Stores the result\n * in the state tree under {@link AirBoundsState}\n */\n triggerFetchBounds(params: TicketSelectionParams, isRefecth = false): void {\n if (this.subscription) {\n this.subscription = unsubscribe(this.subscription);\n }\n const serialized: string = snapshot(this.store$.pipe(serializedLastRequestParams()));\n const boundStatus: AirOffersStatus = snapshot(this.store$.pipe(boundsStatus()));\n const instantSearchMonitoringData: InstantSearchMonitoring = snapshot(\n this.bookingWidgetStore$.pipe(instantSearchMonitoring())\n );\n\n const currentParamsSerialized = JSON.stringify(params);\n const outboundCacheHash = String(stringHashCode(currentParamsSerialized));\n\n // TODO: we need to fetch bounds again when they expire, even if the params stay the same\n if (!isRefecth && boundStatus === AirOffersStatus.OK && serialized === currentParamsSerialized) {\n return;\n }\n\n this.store$.dispatch(BoundsActions.startLoadingOutbounds());\n this.store$.dispatch(BoundsActions.setLastRequestParams({ params }));\n\n this.subscription = this.store$\n .pipe(outboundCache(outboundCacheHash, Date.now()))\n .pipe(\n take(1),\n switchMap((cache) => {\n const bodyParams = this.createRequest(params);\n if (params.flights.length === this.NUMBER_OF_ONE_WAY_FLIGHT) {\n Object.assign(bodyParams, instantSearchMonitoringData);\n }\n if (cache && !isRefecth) {\n return of(cache).pipe(delay(0));\n }\n\n return this.getBounds(bodyParams).pipe(\n retryWithBackoff(BookingAirBoundsService.NUMBER_OF_RETRIES),\n tap((bounds) => {\n if (!bounds) {\n return;\n }\n this.store$.dispatch(\n BoundsActions.setOutboundCache({\n hash: outboundCacheHash,\n createdAt: Date.now(),\n bounds,\n })\n );\n })\n );\n })\n )\n .subscribe(this.handleBoundResponse(BoundsActions.setOutbounds));\n }\n\n /**\n * Retrieves the return bounds for a given outbound id.\n *\n * @param selectedOutboundId the selected outbound id\n * @param selectedFareFamilyCode the selected outbound fare family code\n */\n getReturnBounds(selectedOutboundId: string, selectedFareFamilyCode: string): void {\n const originalRequest: FinnairAirBoundsRequest = snapshot(this.store$.pipe(airBoundsRequest()));\n const isSelectedCheapestOffer: boolean = snapshot(this.store$.pipe(selectedCheapestOffer()));\n const instantSearchMonitoringData: InstantSearchMonitoring = snapshot(\n this.bookingWidgetStore$.pipe(instantSearchMonitoring())\n );\n\n if (isSelectedCheapestOffer) {\n Object.assign(originalRequest, instantSearchMonitoringData);\n }\n\n const itineraries = [\n Object.assign({}, originalRequest.itineraries[0], { isRequestedBound: false }),\n Object.assign({}, originalRequest.itineraries[1], { isRequestedBound: true }),\n ];\n if (this.subscription) {\n this.subscription = unsubscribe(this.subscription);\n }\n this.store$.dispatch(BoundsActions.startLoadingInbounds());\n this.subscription = this.getBounds(\n Object.assign({}, originalRequest, {\n itineraries,\n selectedBound: { id: selectedOutboundId, fareFamilyCode: selectedFareFamilyCode },\n })\n )\n .pipe(retryWithBackoff(BookingAirBoundsService.NUMBER_OF_RETRIES))\n .subscribe(this.handleBoundResponse(BoundsActions.setInbounds));\n }\n\n /**\n * Dispatch action to set bound id if conditions met\n *\n * @param action kind of action\n * @param requestParams params from last request\n * @param bounds received bounds\n */\n handleFlightPreSelection(\n action: typeof BoundsActions.setOutbounds | typeof BoundsActions.setInbounds,\n bounds: FinnairAirBoundsResponse\n ): void {\n const requestParams = this.getLastRequestParams();\n const isValidParams = this.validateFlightPreSelectionParams(requestParams);\n const isTwoWay =\n isValidParams &&\n requestParams.flights?.length === 2 &&\n Boolean(requestParams.departureFlightNumbers) &&\n Boolean(requestParams.returnFlightNumbers);\n\n if (\n isValidParams &&\n action === BoundsActions.setOutbounds &&\n ((!isTwoWay && requestParams.departureFlightNumbers) || isTwoWay)\n ) {\n this.preSelectOutboundIfFound(bounds, requestParams);\n } else if (isValidParams && action === BoundsActions.setInbounds && isTwoWay) {\n this.preSelectInboundIfFound(bounds, requestParams);\n }\n }\n\n /**\n * Get last request params from store\n *\n * @returns {TicketSelectionParams} object\n */\n getLastRequestParams(): TicketSelectionParams {\n return snapshot(this.store$.pipe(lastRequestParams()));\n }\n\n /**\n * Get flight bounds for a certain date.\n *\n * @param params the search parameters to use\n * @returns {Observable<FinnairAirBoundsResponse>} the fetched bounds\n */\n private getBounds(params: FinnairAirBoundsRequest): Observable<FinnairAirBoundsResponse> {\n return this.offersService\n .findAirBounds(this.configService.cfg.offersUrl, {\n body: params,\n })\n .pipe(share());\n }\n\n private buildItineraries(params: OfferListFetchParams): FinnairAirBoundsRequestItinerary[] {\n const { directFlights, flights } = params;\n return flights.map((f, index) => ({\n directFlights,\n departureLocationCode: f.origin,\n destinationLocationCode: f.destination,\n departureDate: f.departureDate.toString(),\n isRequestedBound: index === 0,\n }));\n }\n\n /**\n * Create air bounds request from query parameters.\n *\n * @param params the search params used to create the request\n * @param params.locale the locale to send with the request\n * @param params.origin the IATA code of the destination to fly to\n * @param params.destination the IATA code of the departure location\n * @param params.directFlights\n * @param params.cabin the travel class to query\n * @param params.paxAmount passenger amounts\n * @param params.departureDate the date of departure\n * @param params.returnDate the date of return, leave undefined for one-way trips\n * @param params.promoCode given discount code to apply\n * @returns {FinnairAirBoundsRequest} the request object to use\n */\n private createRequest(params: OfferListFetchParams): FinnairAirBoundsRequest {\n const { cabin, locale, paxAmount, promoCode } = params;\n const itineraries = this.buildItineraries(params);\n return {\n locale,\n cabin,\n travelers: {\n adults: paxAmount.adults,\n children: paxAmount.children,\n c15s: paxAmount.c15s,\n infants: paxAmount.infants,\n } as unknown as FinnairAirBoundsRequestTravelers,\n itineraries,\n promoCode,\n };\n }\n\n private handleBoundResponse(\n action: typeof BoundsActions.setOutbounds | typeof BoundsActions.setInbounds\n ): PartialObserver<FinnairAirBoundsResponse> {\n return {\n next: (data) => {\n if (NO_FLIGHTS_STATUSES.indexOf(data.status) !== -1) {\n this.store$.dispatch(BoundsActions.noFlightsFound());\n this.store$.dispatch(\n BookingWidgetActions.setNotificationWarning({\n key: NotificationWarning.NO_FLIGHTS,\n isActive: true,\n })\n );\n } else {\n this.store$.dispatch(action({ bounds: mapCityNameAndAirportToBounds(data) }));\n\n this.handleFlightPreSelection(action, data);\n }\n this.subscription = unsubscribe(this.subscription);\n },\n error: (error: HttpErrorResponse) => {\n const status: string = error?.error?.status;\n\n if (status === 'INVALID_INPUT') {\n this.store$.dispatch(BoundsActions.invalidInput());\n } else {\n if (!DENIED_BY_AKAMAI.test(error.error)) {\n this.sentryLogger.error(`Error fetching bounds: ${error.status} ${error.statusText}`, { error });\n }\n this.store$.dispatch(BoundsActions.error());\n }\n this.subscription = unsubscribe(this.subscription);\n },\n complete: () => {\n this.subscription = unsubscribe(this.subscription);\n },\n };\n }\n\n private isValidFlightNumberFormat(value: string): boolean {\n // expects that the first 2 Characters are upper case letters\n // followed by 2 to 4 digits\n // ex. AY123\n return /^([A-Z]{2})(\\d{2,4})$/.test(value);\n }\n\n private validateFlightPreSelectionParams(requestParams: TicketSelectionParams | undefined): boolean {\n if (!requestParams) {\n return false;\n }\n\n const { departureFlightNumbers, returnFlightNumbers } = requestParams;\n\n return [departureFlightNumbers, returnFlightNumbers].every((item) => {\n return item ? item.split(',').every((token) => this.isValidFlightNumberFormat(token.toUpperCase())) : true;\n });\n }\n\n private preSelectOutboundIfFound(bounds: FinnairAirBoundsResponse, requestParams: TicketSelectionParams): void {\n const { departureFlightNumbers, departureFareFamily } = requestParams;\n const airBoundId = mapAirBoundIdToBound(\n bounds,\n departureFlightNumbers.toUpperCase(),\n departureFareFamily?.toUpperCase()\n );\n if (airBoundId) {\n this.store$.dispatch(BoundsActions.setOutboundAirBoundId({ outboundAirBoundId: airBoundId }));\n }\n }\n\n private preSelectInboundIfFound(bounds: FinnairAirBoundsResponse, requestParams: TicketSelectionParams): void {\n const { returnFlightNumbers, returnFareFamily } = requestParams;\n const airBoundId = mapAirBoundIdToBound(bounds, returnFlightNumbers.toUpperCase(), returnFareFamily?.toUpperCase());\n if (airBoundId) {\n this.store$.dispatch(BoundsActions.setInboundAirBoundId({ inboundAirBoundId: airBoundId }));\n }\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, Subscription } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\nimport { SentryLogger } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { retryWithBackoff, snapshot } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { FinnairRequestItineraryItem, FinnairSearchParameters, OfferList } from '@fcom/dapi/api/models';\nimport { OffersService } from '@fcom/dapi/api/services';\nimport { OfferListFetchParams } from '@fcom/common/interfaces';\nimport { AirOffersStatus, BookingAppState } from '@fcom/common/interfaces/booking';\n\nimport { OffersActions } from '../../../store/actions';\nimport { offerSerializedLastRequestParams, offersStatus } from '../../../store/selectors';\n\n@Injectable()\nexport class BookingOfferListService implements OnDestroy {\n static NUMBER_OF_RETRIES = 3;\n\n private subscription: Subscription;\n\n constructor(\n private configService: ConfigService,\n private store$: Store<BookingAppState>,\n private sentryLogger: SentryLogger,\n private offersService: OffersService\n ) {}\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n /**\n * Triggers offer fetching for the given parameters. Stores the result\n * in the state tree under {@link AirOffersState}\n */\n triggerFetchOffers(params: OfferListFetchParams): void {\n if (this.subscription) {\n this.subscription = unsubscribe(this.subscription);\n }\n const serialized: string = snapshot(this.store$.pipe(offerSerializedLastRequestParams()));\n const offerStatus: AirOffersStatus = snapshot(this.store$.pipe(offersStatus()));\n const currentParamsSerialized = JSON.stringify(params);\n\n // TODO: we need to fetch offers again when they expires, even if the params stay the same\n if (offerStatus === AirOffersStatus.OK && serialized === currentParamsSerialized) {\n return;\n }\n\n this.store$.dispatch(OffersActions.startLoading());\n this.store$.dispatch(OffersActions.offerSetLastRequestParams({ params }));\n this.subscription = this.getOffersForLocation(params)\n .pipe(retryWithBackoff(BookingOfferListService.NUMBER_OF_RETRIES))\n .subscribe({\n next: (data: OfferList) => {\n if (['NO_FLIGHTS_FOUND', 'NO_FLIGHTS_LEFT_FOR_TODAY'].indexOf(data.status) !== -1) {\n this.store$.dispatch(OffersActions.noFlightsFound());\n } else {\n this.store$.dispatch(OffersActions.setOffers({ offers: data }));\n }\n this.subscription = unsubscribe(this.subscription);\n },\n // eslint-disable-next-line rxjs/no-implicit-any-catch\n error: (error: HttpErrorResponse) => {\n const status: string = error?.error?.status;\n\n if (status === 'INVALID_INPUT') {\n this.store$.dispatch(OffersActions.invalidInput());\n } else {\n this.sentryLogger.error('Error fetching offers', { error });\n this.store$.dispatch(OffersActions.error());\n }\n this.subscription = unsubscribe(this.subscription);\n },\n complete: () => {\n this.subscription = unsubscribe(this.subscription);\n },\n });\n }\n\n /**\n * Get flight offers for a certain day.\n *\n * @param locale the locale to send with the request\n * @param cabin the travel class to query\n * @param paxAmount passenger amounts\n * @param flights an array of origin, destination, departureDate\n * @param directFlights whether to search for only direct flights or also with connections\n * @param isAward should we fetch award flow offers\n * @returns {Observable<OfferList>} the fetched offers\n */\n getOffersForLocation({\n locale,\n cabin,\n paxAmount,\n directFlights,\n isAward,\n flights,\n }: OfferListFetchParams): Observable<OfferList> {\n const itinerary: FinnairRequestItineraryItem[] = flights.map((f, index) => ({\n departureLocationCode: f.origin,\n destinationLocationCode: f.destination,\n departureDate: f.departureDate.toString(),\n isRequestedBound: index === 0,\n }));\n\n const params: FinnairSearchParameters = {\n itinerary,\n adults: paxAmount.adults,\n children: paxAmount.children,\n c15s: paxAmount.c15s,\n infants: paxAmount.infants,\n cabin,\n directFlights,\n locale,\n ...(isAward && { isAward }),\n };\n\n return this.offersService.findOfferList(this.configService.cfg.offersUrl, { body: params }).pipe(share());\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\n\nimport { select, Store } from '@ngrx/store';\nimport { combineLatest, filter, map, Observable, share, Subscription, switchMap, take } from 'rxjs';\n\nimport { OfferListFetchParams } from '@fcom/common/interfaces';\nimport { ConfigService, SentryLogger, unsubscribe } from '@fcom/core/index';\nimport { OffersMultiService } from '@fcom/dapi/api/services';\nimport {\n BookingAppState,\n MultiCityOffer,\n MultiCityState,\n MultiCityStatus,\n OffersPerBound,\n UFOInfo,\n} from '@fcom/common/interfaces/booking';\nimport { retryWithBackoff, snapshot } from '@fcom/rx';\nimport {\n Bound,\n Cabin,\n FareInformation,\n FinnairBoundItem,\n FinnairCabinClass,\n FinnairLocation,\n ItineraryItemFlight,\n ItineraryItemLayover,\n MultiOfferList,\n StatusCode,\n} from '@fcom/dapi/api/models';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { isFlight } from '@fcom/common-booking/utils/common-booking.utils';\nimport { globalBookingFlights } from '@fcom/common/store';\n\nimport { BoundsActions, MultiCityActions } from '../../../store/actions';\nimport { BookingQueueService } from '../../../services';\nimport {\n selectMultiCity,\n selectMultiCityAvailableFareFamilies,\n selectMultiCityFareFamiliesPerCabin,\n selectMultiCityRequestedMoreFlightOfferIds,\n selectMultiCitySelectedFareFamily,\n selectMultiCitySelectedItinerary,\n} from '../../../store/selectors';\nimport { BUS_AIRCRAFT_CODE } from '../interfaces';\nimport { convertOfferListFetchParamsToFinnairSearchParameters, sortByPriceAndDeparture } from '../../../utils';\n\n@Injectable()\nexport class BookingMultiCityService implements OnDestroy {\n static NUMBER_OF_RETRIES = 3;\n static ITINERARY_SEGMENT_ID_REGEX = /SEG-.+?-/;\n\n offers$: Observable<MultiCityState>;\n selectedItinerary$: Observable<string[]>;\n selectedFareFamily$: Observable<string>;\n\n private subscriptions = new Subscription();\n locations$: Observable<{ [key: string]: FinnairLocation }>;\n\n constructor(\n private configService: ConfigService,\n private offersMultiService: OffersMultiService,\n private store$: Store<BookingAppState>,\n private sentryLogger: SentryLogger,\n private bookingQueueService: BookingQueueService,\n private languageService: LanguageService\n ) {\n this.offers$ = this.store$.pipe(select(selectMultiCity), filter(Boolean));\n this.selectedItinerary$ = this.store$.pipe(select(selectMultiCitySelectedItinerary));\n this.selectedFareFamily$ = this.store$.pipe(select(selectMultiCitySelectedFareFamily));\n this.locations$ = this.offers$.pipe(map((offers) => offers.locations));\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n fetchMultiCityOffers(params: OfferListFetchParams): void {\n this.store$.dispatch(MultiCityActions.reset());\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.PENDING }));\n\n this.subscriptions.add(\n this.offersMultiService\n .findMultiOfferList(this.configService.cfg.offersUrl, {\n body: convertOfferListFetchParamsToFinnairSearchParameters(params),\n })\n .pipe(share(), retryWithBackoff(BookingMultiCityService.NUMBER_OF_RETRIES))\n .subscribe({\n next: (data: MultiOfferList) => {\n if (data.status === StatusCode.NO_FLIGHTS_FOUND || data.status === StatusCode.NO_FLIGHTS_LEFT_FOR_TODAY) {\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.NO_OFFERS }));\n return;\n }\n\n const offers = {\n ...data,\n statusCode: data.status,\n offers: data.offers.map((offer) => {\n return {\n ...offer,\n hash: this.getUniqueHashIdentifier(data.hash),\n fullId: data.offerIdPrefix + offer.offerId,\n itinerary: offer.itinerary.map((itineraryId) => {\n return this.getUniqueBoundId(data.bounds[itineraryId]);\n }),\n };\n }),\n bounds: this.mergeDuplicatedBounds(data.bounds),\n hashMap: {\n [this.getUniqueHashIdentifier(data.hash)]: data.hash,\n },\n };\n\n delete offers.offerIdPrefix;\n delete offers.hash;\n delete offers.status;\n\n this.store$.dispatch(\n MultiCityActions.setMultiCityOffers({\n offers: offers as unknown as MultiCityState,\n })\n );\n this.store$.dispatch(BoundsActions.setLastRequestParams({ params }));\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.READY }));\n },\n error: (error: HttpErrorResponse) => {\n this.sentryLogger.error('Error fetching multi-city offers', { error });\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.ERROR }));\n },\n })\n );\n }\n\n fetchMultiCityMoreFlights(offer: MultiCityOffer, currentBound: number): void {\n const requestedMoreFlightOfferIds = snapshot(this.store$.pipe(select(selectMultiCityRequestedMoreFlightOfferIds)));\n\n /**\n * We request more flights for an offer and bound id and we want to avoid repeat calls to the\n * API. We could store this as an object with the 2 params separate, but that makes the\n * comparison more complex.\n */\n if (requestedMoreFlightOfferIds.includes(`${offer.fullId}|${currentBound}`)) {\n return;\n }\n\n this.store$.dispatch(\n MultiCityActions.addRequestedMoreFlightOfferIds({\n offerId: `${offer.fullId}|${currentBound}`,\n })\n );\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.PENDING_MORE_FLIGHTS }));\n\n this.subscriptions.add(\n this.offers$\n .pipe(\n take(1),\n switchMap((offers) => {\n return this.offersMultiService.findMoreFlights(this.configService.cfg.offersUrl, {\n hash: offers.hashMap[offer.hash],\n body: {\n airOfferId: offer.offerId,\n boundIndex: currentBound + 1,\n },\n });\n }),\n share(),\n retryWithBackoff(BookingMultiCityService.NUMBER_OF_RETRIES)\n )\n .subscribe({\n next: (data: MultiOfferList) => {\n this.store$.dispatch(\n MultiCityActions.addMultiCityOffers({\n offers: data.offers.map((offerData) => {\n return {\n ...offerData,\n hash: this.getUniqueHashIdentifier(data.hash),\n fullId: data.offerIdPrefix + offerData.offerId,\n itinerary: offerData.itinerary.map((itineraryId) => {\n return this.getUniqueBoundId(data.bounds[itineraryId]);\n }),\n };\n }),\n bounds: this.mergeDuplicatedBounds(data.bounds),\n locations: data.locations,\n hashMap: {\n [this.getUniqueHashIdentifier(data.hash)]: data.hash,\n },\n })\n );\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.READY }));\n },\n error: (error: HttpErrorResponse) => {\n this.sentryLogger.error('Error fetching multi-city more-flights', { error });\n this.store$.dispatch(MultiCityActions.setStatus({ status: MultiCityStatus.READY }));\n },\n })\n );\n }\n\n createCart(selectedOffer: MultiCityOffer): void {\n this.subscriptions.add(\n this.offers$.pipe(take(1)).subscribe((offers) => {\n const locale = this.languageService.localeValue;\n\n this.bookingQueueService.queueCartCreate(selectedOffer.offerId, locale, offers.hashMap[selectedOffer.hash]);\n })\n );\n }\n\n /**\n * Converts an array of multi-city offers into unique available itineraries per bound.\n *\n * For example, when we display bound 1 to the user. There may be 5 unique flights displayed, but\n * 100 actual offers. This means there is many offers that match to each displayed option.\n */\n getOffersPerBounds(): Observable<OffersPerBound[][]> {\n return combineLatest([\n this.store$.pipe(globalBookingFlights()),\n this.offers$,\n this.store$.pipe(select(selectMultiCitySelectedItinerary)),\n this.store$.pipe(select(selectMultiCitySelectedFareFamily)),\n this.store$.pipe(select(selectMultiCityAvailableFareFamilies)),\n this.store$.pipe(select(selectMultiCityFareFamiliesPerCabin)),\n ]).pipe(\n map(([flights, offers, selectedItinerary, selectedFareFamily, availableFareFamilies, ffCabin]) => {\n return flights.map((_flight, index) => {\n return offers.offers.reduce((uniqueFlights: OffersPerBound[], offer) => {\n if (uniqueFlights.some((uniqueFlight) => uniqueFlight.itineraryId === offer.itinerary[index])) {\n return uniqueFlights;\n }\n\n const matchingOffers = offers.offers.filter((listOffer) => {\n const hasMatchingFareFamily = Object.values(listOffer.offerItems[0].fareFamilyCodePerBound).includes(\n selectedFareFamily\n );\n\n return (\n hasMatchingFareFamily &&\n listOffer.itinerary.every((itineraryId, j) => {\n return (\n (!selectedItinerary[j] || itineraryId === selectedItinerary[j]) &&\n offer.itinerary[index] === listOffer.itinerary[index]\n );\n })\n );\n });\n\n if (index !== selectedItinerary.length || !matchingOffers.length || !selectedFareFamily) {\n return uniqueFlights;\n }\n\n const cheapestMatchingOffer = this.findCheapestOffer(matchingOffers);\n\n const filteredFareFamily = availableFareFamilies.find((ff) => ff.fareFamilyCode === selectedFareFamily);\n\n uniqueFlights.push({\n itineraryId: cheapestMatchingOffer.offer.itinerary[index],\n cheapestOffer: cheapestMatchingOffer.offer,\n fareFamily: {\n ...filteredFareFamily,\n totalPrice: cheapestMatchingOffer.price,\n },\n boundInfo: this.getUFOInfo(offers, cheapestMatchingOffer.offer, index, selectedFareFamily, ffCabin),\n });\n\n return uniqueFlights.sort(sortByPriceAndDeparture);\n }, []);\n });\n })\n );\n }\n\n findCheapestOffer(offers: MultiCityOffer[]): { price: string; offer: MultiCityOffer } {\n if (!offers.length) {\n return;\n }\n\n const initialCheapestPrice = offers[0].offerItems[0].totalPrice;\n\n return offers.reduce(\n (match, offer) => {\n const price = Number(offer.offerItems[0].totalPrice);\n\n return price < Number(match.price) ? { price: String(price), offer } : match;\n },\n { price: initialCheapestPrice, offer: offers[0] }\n );\n }\n\n getCabinForFareFamily(fareFamilyCode: string, cabins: Partial<Record<Cabin, string[]>>): Cabin | FinnairCabinClass {\n return Object.keys(cabins).reduce<Cabin>((acc, cabin: Cabin) => {\n if (cabins[cabin].includes(fareFamilyCode)) {\n return cabin;\n }\n\n return acc;\n }, null);\n }\n\n getCurrency(): Observable<string> {\n return this.offers$.pipe(map((offers) => offers.currency));\n }\n\n private mergeDuplicatedBounds(bounds: { [key: string]: Bound }) {\n return Object.keys(bounds).reduce((newBounds, boundId) => {\n newBounds[this.getUniqueBoundId(bounds[boundId])] = bounds[boundId];\n\n return newBounds;\n }, {});\n }\n\n private getUFOInfo(\n offers: MultiCityState,\n offer: MultiCityOffer,\n boundIndex: number,\n ffCode: string,\n cabins: Partial<Record<Cabin, string[]>>\n ): UFOInfo {\n const matchingBound = {\n ...offers.bounds[offer.itinerary[boundIndex]],\n itinerary: offers.bounds[offer.itinerary[boundIndex]].itinerary.map((item) => ({\n ...item,\n bookingClass: this.getFareInformation(offer, item)?.bookingClass,\n cabinClass: this.getFareInformation(offer, item)?.cabinClass,\n })) as unknown as Bound['itinerary'],\n };\n\n const cabinClass = this.getCabinForFareFamily(ffCode, cabins) as FinnairCabinClass;\n\n return {\n departure: {\n city: offers.locations[matchingBound.departure.locationCode].cityName,\n airportCode: matchingBound.departure.locationCode,\n airport: offers.locations[matchingBound.departure.locationCode].name,\n dateTime: matchingBound.departure.dateTime,\n },\n arrival: {\n city: offers.locations[matchingBound.arrival.locationCode].cityName,\n airportCode: matchingBound.arrival.locationCode,\n airport: offers.locations[matchingBound.arrival.locationCode].name,\n dateTime: matchingBound.arrival.dateTime,\n },\n tails: matchingBound.operatingAirlineCodes,\n duration: matchingBound.duration,\n airlines: matchingBound.uniqueAirlineNames,\n bound: matchingBound as unknown as FinnairBoundItem,\n stops: matchingBound.stops,\n itinerary: matchingBound.itinerary,\n cabinClass,\n isByBusOnly: matchingBound.itinerary\n .filter(isFlight)\n .flatMap((flight) => flight.aircraft?.code)\n .every((aircraftCode) => aircraftCode?.toUpperCase() === BUS_AIRCRAFT_CODE),\n itineraryWithDifferentCabinClass: this.containsOnlyOneCabin(matchingBound.itinerary, cabinClass),\n };\n }\n\n getFareInformation(offer: MultiCityOffer, item: ItineraryItemFlight): FareInformation | undefined {\n return Object.values(offer.offerItems[0].fareInformationPerBound).reduce<FareInformation | undefined>(\n (acc, fareInfos) =>\n acc ??\n fareInfos.find(\n (fi) =>\n fi.segmentId.replace(BookingMultiCityService.ITINERARY_SEGMENT_ID_REGEX, '') ===\n item.id?.replace(BookingMultiCityService.ITINERARY_SEGMENT_ID_REGEX, '')\n ),\n undefined\n );\n }\n\n containsOnlyOneCabin(\n itinerary: (ItineraryItemFlight | ItineraryItemLayover)[],\n cabinClass: FinnairCabinClass\n ): ItineraryItemFlight[] {\n return itinerary.filter((item) => isFlight(item) && item.cabinClass !== cabinClass);\n }\n\n getUniqueHashIdentifier(hash: string): string {\n return hash.substring(hash.length - 12);\n }\n\n getUniqueBoundId(bound: Bound): string {\n function isFlight(itinerary: ItineraryItemFlight | ItineraryItemLayover): itinerary is ItineraryItemFlight {\n return (<ItineraryItemFlight>itinerary).id !== undefined;\n }\n return bound.itinerary\n .map((itinerary) => {\n return isFlight(itinerary)\n ? itinerary.id.replace(BookingMultiCityService.ITINERARY_SEGMENT_ID_REGEX, '')\n : 'layover';\n })\n .join('|');\n }\n}\n","/* eslint-disable */\n// .___________. __ __ __ _______. __ _______.\n// | || | | | | | / | | | / |\n// `---| |----`| |__| | | | | (----` | | | (----`\n// | | | __ | | | \\ \\ | | \\ \\\n// | | | | | | | | .----) | | | .----) |\n// |__| |__| |__| |__| |_______/ |__| |_______/\n//\n// .__ __. ______ .___________. .___________. __ __ _______\n// | \\ | | / __ \\ | | | || | | | | ____|\n// | \\| | | | | | `---| |----` `---| |----`| |__| | | |__\n// | . ` | | | | | | | | | | __ | | __|\n// | |\\ | | `--' | | | | | | | | | | |____\n// |__| \\__| \\______/ |__| |__| |__| |__| |_______|\n//\n// .______ __ ___ ______ _______\n// | _ \\ | | / \\ / || ____|\n// | |_) | | | / ^ \\ | ,----'| |__\n// | ___/ | | / /_\\ \\ | | | __|\n// | | | `----./ _____ \\ | `----.| |____\n// | _| |_______/__/ \\__\\ \\______||_______|\n//\n// ____ ____ ______ __ __ ___ .______ _______\n// \\ \\ / / / __ \\ | | | | / \\ | _ \\ | ____|\n// \\ \\/ / | | | | | | | | / ^ \\ | |_) | | |__\n// \\_ _/ | | | | | | | | / /_\\ \\ | / | __|\n// | | | `--' | | `--' | / _____ \\ | |\\ \\----.| |____\n// |__| \\______/ \\______/ /__/ \\__\\ | _| `._____||_______|\n//\n// __ ______ ______ __ ___ __ .__ __. _______\n// | | / __ \\ / __ \\ | |/ / | | | \\ | | / _____|\n// | | | | | | | | | | | ' / | | | \\| | | | __\n// | | | | | | | | | | | < | | | . ` | | | |_ |\n// | `----.| `--' | | `--' | | . \\ | | | |\\ | | |__| |\n// |_______| \\______/ \\______/ |__|\\__\\ |__| |__| \\__| \\______|\n//\n// _______ ______ .______\n// | ____| / __ \\ | _ \\\n// | |__ | | | | | |_) |\n// | __| | | | | | /\n// | | | `--' | | |\\ \\----.\n// |__| \\______/ | _| `._____|\n//\n// __ _______ ____ ____ ______ __ __\n// | | | ____| \\ \\ / / / __ \\ | | | |\n// | | | |__ \\ \\/ / | | | | | | | |\n// | | | __| \\_ _/ | | | | | | | |\n// | | | | | | | `--' | | `--' |\n// |__| |__| |__| \\______/ \\______/\n//\n// ___ .______ _______ ___ _______ _______ __ .__ __. _______\n// / \\ | _ \\ | ____| / \\ | \\ | \\ | | | \\ | | / _____|\n// / ^ \\ | |_) | | |__ / ^ \\ | .--. || .--. || | | \\| | | | __\n// / /_\\ \\ | / | __| / /_\\ \\ | | | || | | || | | . ` | | | |_ |\n// / _____ \\ | |\\ \\----.| |____ / _____ \\ | '--' || '--' || | | |\\ | | |__| |\n// /__/ \\__\\ | _| `._____||_______| /__/ \\__\\ |_______/ |_______/ |__| |__| \\__| \\______|\n//\n// .__ __. ___________ __ ____\n// | \\ | | | ____\\ \\ / \\ / /\n// | \\| | | |__ \\ \\/ \\/ /\n// | . ` | | __| \\ /\n// | |\\ | | |____ \\ /\\ /\n// |__| \\__| |_______| \\__/ \\__/\n//\n// .___________..______ ___ .__ __. _______. __ ___ .___________. __ ______ .__ __. _______.\n// | || _ \\ / \\ | \\ | | / || | / \\ | || | / __ \\ | \\ | | / |\n// `---| |----`| |_) | / ^ \\ | \\| | | (----`| | / ^ \\ `---| |----`| | | | | | | \\| | | (----`\n// | | | / / /_\\ \\ | . ` | \\ \\ | | / /_\\ \\ | | | | | | | | | . ` | \\ \\\n// | | | |\\ \\----./ _____ \\ | |\\ | .----) | | `----./ _____ \\ | | | | | `--' | | |\\ | .----) |\n// |__| | _| `._____/__/ \\__\\ |__| \\__| |_______/ |_______/__/ \\__\\ |__| |__| \\______/ |__| \\__| |_______/\n//\n// =====================================================================================================================\n// | DO NOT CHANGE THESE VALUES! THESE ARE ALREADY IMPORTED TO CMS. |\n// | WHEN THEY ARE TRANSLATED AND COPIED TO TEST CONTENT, THEY WILL BE REMOVED FROM HERE. |\n// =====================================================================================================================\nimport * as globalLocalizationEn from './step2-in-translation/globalLocalizationEn.json';\nimport * as bookingLocalizationEn from './step2-in-translation/bookingLocalizationEn.json';\nimport * as mmbLocalizationEn from './step2-in-translation/mmbLocalizationEn.json';\nimport * as reaccommodationLocalizationEn from './step2-in-translation/reaccommodationLocalizationEn.json';\nimport * as loyaltyLocalizationEn from './step2-in-translation/loyaltyLocalizationEn.json';\nimport * as serviceformsLocalizationEn from './step2-in-translation/serviceformsLocalizationEn.json';\nimport * as refundsLocalizationEn from './step2-in-translation/refundsLocalizationEn.json';\nimport * as corporateLocalizationEn from './step2-in-translation/corporateLocalizationEn.json';\nimport * as travelReadyLocalizationEn from './step2-in-translation/travelReadyLocalizationEn.json';\nimport * as globalLocalizationFiFi from './step2-in-translation/globalLocalizationFiFi.json';\nimport * as bookingLocalizationFiFi from './step2-in-translation/bookingLocalizationFiFi.json';\nimport * as mmbLocalizationFiFi from './step2-in-translation/mmbLocalizationFiFi.json';\nimport * as reaccommodationLocalizationFiFi from './step2-in-translation/reaccommodationLocalizationFiFi.json';\nimport * as loyaltyLocalizationFiFi from './step2-in-translation/loyaltyLocalizationFiFi.json';\nimport * as serviceformsLocalizationFiFi from './step2-in-translation/serviceformsLocalizationFiFi.json';\nimport * as refundsLocalizationFiFi from './step2-in-translation/refundsLocalizationFiFi.json';\nimport * as corporateLocalizationFiFi from './step2-in-translation/corporateLocalizationFiFi.json';\nimport * as travelReadyLocalizationFiFi from './step2-in-translation/travelReadyLocalizationFiFi.json';\n\nexport const inTranslation = {\n globalLocalizationEn,\n bookingLocalizationEn,\n mmbLocalizationEn,\n reaccommodationLocalizationEn,\n loyaltyLocalizationEn,\n serviceformsLocalizationEn,\n refundsLocalizationEn,\n corporateLocalizationEn,\n travelReadyLocalizationEn,\n globalLocalizationFiFi,\n bookingLocalizationFiFi,\n mmbLocalizationFiFi,\n reaccommodationLocalizationFiFi,\n loyaltyLocalizationFiFi,\n serviceformsLocalizationFiFi,\n refundsLocalizationFiFi,\n corporateLocalizationFiFi,\n travelReadyLocalizationFiFi,\n};\n/* eslint-enable */\n","/* eslint-disable */\n\n// =====================================================================================================================\n// | ADD YOUR NEW AND CHANGED TRANSLATIONS HERE IN FINNISH AND ENGLISH. |\n// | TEXTS IN THIS FILE WERE NOT CHECKED WITH COPYWRITERS YET, ONLY FOR DEMO PURPOSES. |\n// | ONLY ADD LABELS HERE THAT ARE NOT YET VISIBLE FOR THE END USERS. YOU SHOULD |\n// | REVIEW ALL TEXTS WITH A COPYWRITER BEFORE THEY ARE MADE AVAILABLE FOR USERS. |\n// =====================================================================================================================\n\nimport * as globalLocalizationEn from './localization-wip/globalLocalizationEn.json';\nimport * as bookingLocalizationEn from './localization-wip/bookingLocalizationEn.json';\nimport * as mmbLocalizationEn from './localization-wip/mmbLocalizationEn.json';\nimport * as reaccommodationLocalizationEn from './localization-wip/reaccommodationLocalizationEn.json';\nimport * as loyaltyLocalizationEn from './localization-wip/loyaltyLocalizationEn.json';\nimport * as serviceformsLocalizationEn from './localization-wip/serviceformsLocalizationEn.json';\nimport * as refundsLocalizationEn from './localization-wip/refundsLocalizationEn.json';\nimport * as corporateLocalizationEn from './localization-wip/corporateLocalizationEn.json';\nimport * as travelReadyLocalizationEn from './localization-wip/travelReadyLocalizationEn.json';\nimport * as globalLocalizationFiFi from './localization-wip/globalLocalizationFiFi.json';\nimport * as bookingLocalizationFiFi from './localization-wip/bookingLocalizationFiFi.json';\nimport * as mmbLocalizationFiFi from './localization-wip/mmbLocalizationFiFi.json';\nimport * as reaccommodationLocalizationFiFi from './localization-wip/reaccommodationLocalizationFiFi.json';\nimport * as loyaltyLocalizationFiFi from './localization-wip/loyaltyLocalizationFiFi.json';\nimport * as serviceformsLocalizationFiFi from './localization-wip/serviceformsLocalizationFiFi.json';\nimport * as refundsLocalizationFiFi from './localization-wip/refundsLocalizationFiFi.json';\nimport * as corporateLocalizationFiFi from './localization-wip/corporateLocalizationFiFi.json';\nimport * as travelReadyLocalizationFiFi from './localization-wip/travelReadyLocalizationFiFi.json';\n\nexport const workInProgress = {\n globalLocalizationEn,\n bookingLocalizationEn,\n mmbLocalizationEn,\n reaccommodationLocalizationEn,\n loyaltyLocalizationEn,\n serviceformsLocalizationEn,\n refundsLocalizationEn,\n corporateLocalizationEn,\n travelReadyLocalizationEn,\n globalLocalizationFiFi,\n bookingLocalizationFiFi,\n mmbLocalizationFiFi,\n reaccommodationLocalizationFiFi,\n loyaltyLocalizationFiFi,\n serviceformsLocalizationFiFi,\n refundsLocalizationFiFi,\n corporateLocalizationFiFi,\n travelReadyLocalizationFiFi,\n};\n/* eslint-enable */\n","import { mergeDeepMany } from '@fcom/core/utils';\n\nimport { inTranslation } from './localization-step2-in-translation';\nimport { workInProgress } from './localization-wip';\n// =====================================================================================================================\n// | ADD YOUR NEW AND CHANGED TRANSLATIONS HERE IN FINNISH AND ENGLISH. |\n// | TEXTS IN THIS FILE SHOULD ALREADY BE APPROVED BY COPYWRITERS AND CAN BE COPIED TO THE CMS. |\n// =====================================================================================================================\nimport * as globalLocalizationEnNext from './localization/globalLocalizationEn.json';\nimport * as bookingLocalizationEnNext from './localization/bookingLocalizationEn.json';\nimport * as mmbLocalizationEnNext from './localization/mmbLocalizationEn.json';\nimport * as reaccommodationLocalizationEnNext from './localization/reaccommodationLocalizationEn.json';\nimport * as loyaltyLocalizationEnNext from './localization/loyaltyLocalizationEn.json';\nimport * as serviceformsLocalizationEnNext from './localization/serviceformsLocalizationEn.json';\nimport * as refundsLocalizationEnNext from './localization/refundsLocalizationEn.json';\nimport * as corporateLocalizationEnNext from './localization/corporateLocalizationEn.json';\nimport * as travelReadyLocalizationEnNext from './localization/travelReadyLocalizationEn.json';\nimport * as globalLocalizationFiFiNext from './localization/globalLocalizationFiFi.json';\nimport * as bookingLocalizationFiFiNext from './localization/bookingLocalizationFiFi.json';\nimport * as mmbLocalizationFiFiNext from './localization/mmbLocalizationFiFi.json';\nimport * as reaccommodationLocalizationFiFiNext from './localization/reaccommodationLocalizationFiFi.json';\nimport * as loyaltyLocalizationFiFiNext from './localization/loyaltyLocalizationFiFi.json';\nimport * as serviceformsLocalizationFiFiNext from './localization/serviceformsLocalizationFiFi.json';\nimport * as refundsLocalizationFiFiNext from './localization/refundsLocalizationFiFi.json';\nimport * as corporateLocalizationFiFiNext from './localization/corporateLocalizationFiFi.json';\nimport * as travelReadyLocalizationFiFiNext from './localization/travelReadyLocalizationFiFi.json';\n\nexport default {\n globalLocalizationEnNext,\n bookingLocalizationEnNext,\n mmbLocalizationEnNext,\n reaccommodationLocalizationEnNext,\n loyaltyLocalizationEnNext,\n serviceformsLocalizationEnNext,\n refundsLocalizationEnNext,\n corporateLocalizationEnNext,\n travelReadyLocalizationEnNext,\n globalLocalizationFiFiNext,\n bookingLocalizationFiFiNext,\n mmbLocalizationFiFiNext,\n reaccommodationLocalizationFiFiNext,\n loyaltyLocalizationFiFiNext,\n serviceformsLocalizationFiFiNext,\n refundsLocalizationFiFiNext,\n corporateLocalizationFiFiNext,\n travelReadyLocalizationFiFiNext,\n};\nexport const localization = {\n en: mergeDeepMany(inTranslation.globalLocalizationEn, globalLocalizationEnNext, workInProgress.globalLocalizationEn),\n 'fi-fi': mergeDeepMany(\n inTranslation.globalLocalizationFiFi,\n globalLocalizationFiFiNext,\n workInProgress.globalLocalizationFiFi\n ),\n};\n\nexport const bookingLocalization = {\n en: mergeDeepMany(\n inTranslation.bookingLocalizationEn,\n bookingLocalizationEnNext,\n workInProgress.bookingLocalizationEn\n ),\n 'fi-fi': mergeDeepMany(\n inTranslation.bookingLocalizationFiFi,\n bookingLocalizationFiFiNext,\n workInProgress.bookingLocalizationFiFi\n ),\n};\n\nexport const featureLocalizations = {\n en: {\n MMB: mergeDeepMany(inTranslation.mmbLocalizationEn, mmbLocalizationEnNext, workInProgress.mmbLocalizationEn),\n REACCOMMODATION: mergeDeepMany(\n inTranslation.reaccommodationLocalizationEn,\n reaccommodationLocalizationEnNext,\n workInProgress.reaccommodationLocalizationEn\n ),\n LOYALTY: mergeDeepMany(\n inTranslation.loyaltyLocalizationEn,\n loyaltyLocalizationEnNext,\n workInProgress.loyaltyLocalizationEn\n ),\n SERVICE_FORMS: mergeDeepMany(\n inTranslation.serviceformsLocalizationEn,\n serviceformsLocalizationEnNext,\n workInProgress.serviceformsLocalizationEn\n ),\n REFUNDS: mergeDeepMany(\n inTranslation.refundsLocalizationEn,\n refundsLocalizationEnNext,\n workInProgress.refundsLocalizationEn\n ),\n CORPORATE: mergeDeepMany(\n inTranslation.corporateLocalizationEn,\n corporateLocalizationEnNext,\n workInProgress.corporateLocalizationEn\n ),\n TRAVEL_READY: mergeDeepMany(\n inTranslation.travelReadyLocalizationEn,\n travelReadyLocalizationEnNext,\n workInProgress.travelReadyLocalizationEn\n ),\n },\n 'fi-fi': {\n MMB: mergeDeepMany(inTranslation.mmbLocalizationFiFi, mmbLocalizationFiFiNext, workInProgress.mmbLocalizationFiFi),\n REACCOMMODATION: mergeDeepMany(\n inTranslation.reaccommodationLocalizationFiFi,\n reaccommodationLocalizationFiFiNext,\n workInProgress.reaccommodationLocalizationFiFi\n ),\n LOYALTY: mergeDeepMany(\n inTranslation.loyaltyLocalizationFiFi,\n loyaltyLocalizationFiFiNext,\n workInProgress.loyaltyLocalizationFiFi\n ),\n SERVICE_FORMS: mergeDeepMany(\n inTranslation.serviceformsLocalizationFiFi,\n serviceformsLocalizationFiFiNext,\n workInProgress.serviceformsLocalizationFiFi\n ),\n REFUNDS: mergeDeepMany(\n inTranslation.refundsLocalizationFiFi,\n refundsLocalizationFiFiNext,\n workInProgress.refundsLocalizationFiFi\n ),\n CORPORATE: mergeDeepMany(\n inTranslation.corporateLocalizationFiFi,\n corporateLocalizationFiFiNext,\n workInProgress.corporateLocalizationFiFi\n ),\n TRAVEL_READY: mergeDeepMany(\n inTranslation.travelReadyLocalizationFiFi,\n travelReadyLocalizationFiFiNext,\n workInProgress.travelReadyLocalizationFiFi\n ),\n },\n};\n","import { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { mergeDeepMany } from '@fcom/core/utils';\nimport { safeMap } from '@fcom/rx';\n\nimport { bookingLocalization, featureLocalizations, localization } from './localization';\nimport { I18nKey } from '../cms/cms-data.service';\n\n@Injectable()\nexport class LocalizationProvider {\n constructor() {}\n\n /* istanbul ignore next */\n triggerLazyLocalizations(_key: I18nKey): void {\n /* no-op */\n }\n\n getLocalizations(lang$: Observable<string>): Observable<any> {\n return lang$.pipe(\n map((l: string) => (l === 'fi-fi' ? 'fi-fi' : 'en')),\n safeMap((l: string) => mergeDeepMany(localization[l], bookingLocalization[l], featureLocalizations[l]) || {})\n );\n }\n}\n","export enum TagTheme {\n DEFAULT = 'default',\n ACTIVE = 'active',\n WHITE = 'white',\n SUSTAINABILITY = 'sustainability',\n SUCCESS = 'success',\n WARNING = 'warning',\n ALERT = 'alert',\n POPULAR = 'popular',\n}\n\nexport enum TagRoundingStyle {\n DEFAULT = 'default',\n CHIP = 'chip',\n}\n","import { Category } from '@fcom/dapi/api/models';\n\nexport const BOUND_BASED_CATEGORIES = [\n Category.BAGGAGE,\n Category.SPORT,\n Category.PET,\n Category.CABIN_BAGGAGE,\n Category.SAF,\n];\nexport const isBoundBasedCategory = (category: Category): boolean => BOUND_BASED_CATEGORIES.includes(category);\nexport const isJourneyBasedCategory = (category: Category): boolean => [Category.COVER].includes(category);\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { DrawerComponent } from './drawer.component';\nimport { ClickOutsideDirectiveModule } from '../../directives/click-outside/click-outside-directive.module';\nimport { TrapFocusModule } from '../../directives/trap-focus/trap-focus.module';\nimport { ButtonModule } from '../buttons';\n\n@NgModule({\n declarations: [DrawerComponent],\n imports: [CommonModule, IconsModule, UiTranslateModule, ClickOutsideDirectiveModule, TrapFocusModule, ButtonModule],\n exports: [DrawerComponent],\n})\nexport class DrawerModule {}\n","export const REFUNDS_FEATURE_KEY = 'refunds';\n","<div class=\"pagination flex flex--row border-bottom border-left border-right rounded-bottom-large\">\n <div class=\"text ps-medium-y ps-xsmall-x\" *ngIf=\"textBeforePages\">{{ textBeforePages }}</div>\n <fin-select-input\n class=\"change-pagination-count-select ps-xxsmall-t ps-xsmall-x\"\n [parentForm]=\"reactiveForm\"\n [controlName]=\"'paginationCount'\"\n [options]=\"options\"\n [disableLabel]=\"true\"\n [disableSelectOption]=\"true\"\n data-text-input\n ></fin-select-input>\n <div class=\"page-count ps-medium-y ps-xsmall-x\">\n {{ startIndex === 0 ? startIndex + 1 : startIndex }}-{{ endIndex > totalItems ? totalItems : endIndex }} /\n {{ totalItems }}\n </div>\n <div class=\"page-selector ps-medium-y ps-xsmall-x\">\n <fcom-icon\n dataTestId=\"pagination-prev\"\n class=\"icon-small ms-small-r\"\n [ngClass]=\"{\n 'nordic-blue-100-text': currentPage === FIRST_PAGE,\n 'link-hover': currentPage !== FIRST_PAGE,\n }\"\n [name]=\"SvgLibraryIcon.CHEVRON_LEFT\"\n (click)=\"prevPagination()\"\n ></fcom-icon>\n <fcom-icon\n dataTestId=\"pagination-next\"\n class=\"icon-small ms-small-l\"\n [ngClass]=\"{\n 'nordic-blue-100-text': currentPage === totalPages,\n 'link-hover': currentPage !== totalPages,\n }\"\n [name]=\"SvgLibraryIcon.CHEVRON_RIGHT\"\n (click)=\"nextPagination()\"\n ></fcom-icon>\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Subscription } from 'rxjs';\n\nimport { SelectOption } from '@fcom/common';\nimport { unsubscribe } from '@fcom/core/utils/unsubscribe';\n\nexport interface PageIndexes {\n startIndex: number;\n endIndex: number;\n}\n\n@Component({\n selector: 'fcom-pagination',\n templateUrl: './pagination.component.html',\n styleUrls: ['./pagination.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaginationComponent implements OnInit, OnDestroy, OnChanges {\n @Input()\n totalItems: number;\n\n @Input()\n textBeforePages: string;\n\n @Input()\n itemsPerPageOptions?: number[] = [4, 8, 16];\n\n @Input({ required: true })\n get itemsPerPage(): number {\n return this._itemsPerPage;\n }\n set itemsPerPage(value: number) {\n this._itemsPerPage = value;\n this.itemsPerPageChange.emit(this._itemsPerPage);\n }\n\n @Output()\n itemsPerPageChange = new EventEmitter<number>();\n\n @Output()\n indexesChange = new EventEmitter<PageIndexes>();\n\n options: SelectOption[] = [];\n totalPages: number;\n currentPage = 1;\n startIndex: number;\n endIndex: number;\n reactiveForm: UntypedFormGroup;\n\n private subscriptions: Subscription = new Subscription();\n private _itemsPerPage: number;\n\n readonly FIRST_PAGE = 1;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n constructor(private fb: UntypedFormBuilder) {}\n\n ngOnInit(): void {\n this.options = this.itemsPerPageOptions.map((value) => ({\n name: `${value}`,\n value: `${value}`,\n }));\n\n this.createForm();\n\n this.totalPages = Math.ceil(this.totalItems / this._itemsPerPage);\n this.setIndexes(this.FIRST_PAGE, true);\n this.subscriptions.add(\n this.reactiveForm.get('paginationCount').valueChanges.subscribe((value) => {\n this.itemsPerPage = +value;\n this.reset();\n })\n );\n }\n\n public reset(): void {\n this.totalPages = Math.ceil(this.totalItems / this._itemsPerPage);\n this.changePage(this.FIRST_PAGE);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.itemsPerPage && !changes.itemsPerPage.firstChange) {\n this.reactiveForm.get('paginationCount').setValue(changes.itemsPerPage.currentValue);\n }\n if (!changes.totalItems?.firstChange) {\n this.reset();\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n private createForm(): void {\n this.reactiveForm = this.fb.group({\n paginationCount: [this.options[0].value],\n });\n }\n\n prevPagination(): void {\n this.changePage(this.currentPage - 1);\n }\n\n nextPagination(): void {\n this.changePage(this.currentPage + 1);\n }\n\n private changePage(newPageNumber: number): void {\n if (newPageNumber < this.FIRST_PAGE) {\n newPageNumber = this.FIRST_PAGE;\n } else if (newPageNumber > this.totalPages) {\n newPageNumber = this.totalPages;\n }\n\n this.currentPage = newPageNumber;\n this.setIndexes(newPageNumber);\n }\n\n private setIndexes(currentPage: number, initial = false): void {\n if (!this._itemsPerPage) {\n return;\n }\n this.startIndex = (currentPage - 1) * this._itemsPerPage;\n this.endIndex = this.startIndex + this._itemsPerPage;\n if (!initial) {\n this.indexesChange.emit({\n startIndex: this.startIndex,\n endIndex: this.endIndex,\n });\n }\n }\n}\n","import { isFunction } from './isFunction';\n\nexport function isAsyncIterable<T>(obj: any): obj is AsyncIterable<T> {\n return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]);\n}\n","<ng-container *ngIf=\"disruptions\" data-elastic-exclude>\n <ng-container *ngFor=\"let item of getMappedDisruptions(); trackBy: disruptionItemId\">\n <fcom-notification\n *ngIf=\"!item.hidden\"\n class=\"border-bottom\"\n [horizontal]=\"true\"\n [layout]=\"NotificationLayout.EDGE_TO_EDGE\"\n [theme]=\"item.level\"\n [linkText]=\"item.linkText || (item.linkUrl ? ('readMore' | finLocalization) : null)\"\n [linkUrl]=\"item.linkUrl\"\n [isClosable]=\"isGlobalBanner ? showGlobalBannerClose(item) : true\"\n (linkClick)=\"onLinkClick($event, item)\"\n (closeClick)=\"onClose(item)\"\n >\n {{ item.text }}\n </fcom-notification>\n </ng-container>\n</ng-container>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { select, Store } from '@ngrx/store';\n\nimport { NotificationLayout, NotificationTheme } from '@fcom/ui-components';\nimport { CmsCollection, CmsTeaser, CmsViewType } from '@fcom/core-api';\nimport { getViewedNotifications, NotificationActions } from '@fcom/common/store';\nimport { AppState } from '@fcom/core';\nimport { TestVariant } from '@fcom/common';\n\ninterface DisruptionMessage {\n id: number;\n level: NotificationTheme;\n text: string;\n linkText: string;\n linkUrl: string;\n hidden: boolean;\n linkInNewTab: boolean;\n}\n\n/**\n * There is 4 levels of disruptions for Finnair 1-4, we only show level 2 and up on the homepage.\n */\nconst disruptionLevelMap = {\n [CmsViewType.DISRUPTION_LEVEL_1]: NotificationTheme.SUCCESS,\n [CmsViewType.DISRUPTION_LEVEL_2]: NotificationTheme.INFO,\n [CmsViewType.DISRUPTION_LEVEL_3]: NotificationTheme.WARNING,\n [CmsViewType.DISRUPTION_LEVEL_4]: NotificationTheme.ALERT,\n};\n\n@Component({\n selector: 'cms-disruptions',\n templateUrl: './cms-disruptions.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsDisruptionsComponent implements OnInit, OnDestroy {\n @Input()\n disruptions: CmsCollection;\n\n @Input()\n showLevelOne = false;\n\n @Input()\n testVariant: TestVariant = TestVariant.A;\n\n @Input()\n isGlobalBanner = false;\n\n viewedNotifications: number[] = [];\n\n readonly NotificationLayout = NotificationLayout;\n\n private destroyed$ = new Subject();\n\n constructor(\n private cdr: ChangeDetectorRef,\n private store$: Store<AppState>\n ) {}\n\n getMappedDisruptions(): DisruptionMessage[] {\n if (!this.disruptions || !this.disruptions.items) {\n return [];\n }\n\n return this.disruptions.items\n .map((item: CmsTeaser): DisruptionMessage => {\n if (!disruptionLevelMap[item.viewTypeName]) {\n return null;\n }\n\n return {\n id: item.contentId,\n level: disruptionLevelMap[item.viewTypeName],\n text: item.teaserTitle,\n linkText: item.linkText ?? item.target?.teaserTitle ?? '',\n linkUrl: item.target?.url,\n hidden: this.viewedNotifications.includes(item.contentId),\n linkInNewTab: item.target?.openInNewTab,\n };\n })\n .filter(Boolean);\n }\n\n onClose(item: DisruptionMessage): void {\n this.store$.dispatch(NotificationActions.setViewedNotification({ id: item.id }));\n }\n\n /**\n * For links that want to open in a new tab override the default behavior and manually open in\n * new tab/window.\n */\n onLinkClick(event: Event, item: DisruptionMessage): void {\n if (item.linkInNewTab) {\n event.preventDefault();\n window.open(item.linkUrl, '_blank');\n }\n }\n\n /**\n * Used by angular to track items in the *ngFor loop and reduce DOM manipulations\n */\n disruptionItemId(_i: number, item: DisruptionMessage): number {\n return item.id;\n }\n\n ngOnInit(): void {\n this.store$\n .pipe(select(getViewedNotifications))\n .pipe(takeUntil(this.destroyed$))\n .subscribe((notificationIds) => {\n this.viewedNotifications = notificationIds;\n this.cdr.markForCheck();\n });\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next(true);\n }\n\n showGlobalBannerClose(item: DisruptionMessage): boolean {\n return item.level === NotificationTheme.SUCCESS || item.level === NotificationTheme.INFO;\n }\n}\n","<ng-container *ngFor=\"let passengerFormGroup of passengerFormGroups; let i = index; let first = first; let last = last\">\n <fin-passenger-info-renewed\n *ngIf=\"extendedPassengers$ | async as extendedPassengers\"\n [passengerFormGroup]=\"passengerFormGroup\"\n [extendedPassenger]=\"extendedPassengers[i]\"\n [availableDays]=\"availableDays[i]\"\n [allFrequentFlyerCards$]=\"allFrequentFlyerCards$\"\n [profileType$]=\"profileType$\"\n [selectableLeadPassengers$]=\"selectableLeadPassengers$\"\n [showEdit]=\"showEdit\"\n [controlData$]=\"controlData$\"\n [isMainPax]=\"i === 0\"\n [isEditButtonDisabled$]=\"isSaving$\"\n [isEditButtonLoading$]=\"(travelerIdBeingModified$ | async) === extendedPassengers[i].id | finToObservable\"\n [paxIndex]=\"i + 1\"\n [ngClass]=\"{\n 'pr-small-b': first,\n 'pr-small-y': !first,\n 'border-bottom-dashed': !last,\n }\"\n (handleSave)=\"handleSave($event)\"\n (backToPaxDetails)=\"backToPaxDetails()\"\n data-hj-suppress\n ></fin-passenger-info-renewed>\n</ng-container>\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { UntypedFormBuilder } from '@angular/forms';\n\nimport {\n BehaviorSubject,\n Observable,\n Subscription,\n combineLatest,\n distinctUntilChanged,\n map,\n startWith,\n switchMap,\n take,\n} from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { CartStatus } from '@fcom/dapi';\nimport { AppConstants } from '@fcom/booking/app-constants';\nimport { ElementActions, ElementTypes, GaContext, SelectOption } from '@fcom/common/interfaces';\nimport { ProfileType } from '@fcom/core-api/login';\nimport {\n ControlData,\n FinnairCart,\n FinnairFrequentFlyerCardItem,\n FinnairOrder,\n FinnairPassengerCode,\n FinnairPassengerItem,\n} from '@fcom/dapi/api/models';\nimport { PaxDetailsFormData } from '@fcom/dapi/interfaces';\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { ButtonTheme, IconPosition, ModalButtons, NotificationTheme } from '@fcom/ui-components';\nimport { getAirlineNameByCode, rangeFrom, unsubscribe } from '@fcom/core/utils';\nimport { setSinglePaxDetails } from '@fcom/booking/store/actions/pax-details.actions';\nimport { BookingAppState, PaxDetailsState } from '@fcom/common/interfaces/booking';\nimport { snapshot } from '@fcom/rx';\nimport { cartStatus, paxDetails } from '@fcom/booking/store/selectors';\nimport { BookingQueueService, BookingService } from '@fcom/booking/services';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport { PassengerDetails, PassengerFormService, PaxFormFields, PrefillSource } from '../../services';\n\n@Component({\n selector: 'fin-passenger-info-list',\n templateUrl: './passenger-info-list.component.html',\n styleUrls: ['./passenger-info-list.component.scss'],\n})\nexport class PassengerInfoListComponent implements OnInit, OnDestroy {\n readonly FinnairPassengerCode = FinnairPassengerCode;\n readonly ButtonTheme = ButtonTheme;\n readonly IconPosition = IconPosition;\n readonly ModalButtons = ModalButtons;\n readonly FIELDS = PaxFormFields;\n readonly NotificationTheme = NotificationTheme;\n public readonly C = AppConstants;\n\n public readonly TRACKING_CONTEXT = GaContext.BOOKING_FLOW;\n\n private subscription: Subscription = new Subscription();\n\n @Input()\n passengers$: Observable<FinnairPassengerItem[]>;\n\n @Input()\n cartData$: Observable<FinnairCart | FinnairOrder>;\n\n @Input()\n showEdit = false;\n\n @Input()\n isOrder: boolean;\n\n @Input()\n isSaving$: Observable<boolean>;\n\n @Input()\n allFrequentFlyerCards$: Observable<FinnairFrequentFlyerCardItem[]>;\n\n @Input()\n controlData$: Observable<ControlData>;\n\n @Input()\n profileType$: Observable<ProfileType>;\n\n extendedPassengers$: Observable<\n (FinnairPassengerItem & {\n paxTypeKey: string;\n cards: (FinnairFrequentFlyerCardItem & { airlineName: string })[];\n })[]\n >;\n\n travelerIdBeingModified$: BehaviorSubject<string> = new BehaviorSubject('');\n\n infantTravelingWithLocked$: Observable<boolean>;\n frequentFlyerAirlines$: Observable<SelectOption[]>;\n\n availableDays: { days$: Observable<number[]>; months: number[]; years: number[] }[];\n passengerFormGroups: PassengerDetails[];\n selectableLeadPassengers$: Observable<SelectOption[]>;\n\n constructor(\n private passengerFormService: PassengerFormService,\n private fb: UntypedFormBuilder,\n private store$: Store<BookingAppState>,\n private bookingQueueService: BookingQueueService,\n private languageService: LanguageService,\n private bookingService: BookingService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.extendedPassengers$ = this.passengers$.pipe(\n map((passengers) =>\n passengers.map((passenger) => ({\n ...passenger,\n paxTypeKey: asPaxTypeKey(passenger.passengerTypeCode).toLowerCase(),\n passengerTypeCode: passenger.passengerTypeCode,\n cards: (passenger.frequentFlyerCards ?? []).map((card) => ({\n ...card,\n airlineName: getAirlineNameByCode(card?.companyCode),\n })),\n }))\n )\n );\n\n this.subscription.add(\n this.passengers$\n .pipe(\n take(1),\n switchMap((passengers) =>\n combineLatest(\n passengers.map((passenger) => {\n return this.passengerFormService.createPassengerFormGroup(passenger.id, this.isOrder, [\n 'joinFinnairPlus',\n 'frequentFlyerCard',\n 'travelling',\n ]);\n })\n )\n ),\n switchMap((passengerFormGroups) => {\n return combineLatest(\n passengerFormGroups.map((passengerFormGroup) => {\n return this.passengerFormService.prefillData(passengerFormGroup, [\n this.isOrder ? PrefillSource.ORDER : PrefillSource.CART,\n ]);\n })\n );\n })\n )\n .subscribe((passengerFormGroups) => {\n this.availableDays = passengerFormGroups.map((passengerFormGroup) => ({\n days$: passengerFormGroup.availableDays$,\n months: rangeFrom(1, 12),\n years: passengerFormGroup.years,\n }));\n passengerFormGroups.forEach((passengerFormGroup, i) =>\n passengerFormGroup.group.addControl('number', this.fb.control(i + 1))\n );\n\n this.passengerFormGroups = passengerFormGroups;\n\n this.setupTravellingWithSelectOptions(passengerFormGroups);\n })\n );\n\n this.subscription.add(\n this.store$.pipe(cartStatus()).subscribe((status) => {\n if (status === CartStatus.OK || status === CartStatus.LOAD_ERROR) {\n this.travelerIdBeingModified$.next('');\n }\n })\n );\n }\n\n private setupTravellingWithSelectOptions(selectableLeadPassengers: PassengerDetails[]) {\n this.selectableLeadPassengers$ = combineLatest(\n selectableLeadPassengers.map((pax) => this.createPassengerOption(pax))\n );\n }\n\n private createPassengerOption(pax: PassengerDetails) {\n return pax.group.valueChanges.pipe(\n startWith(pax.group.value),\n distinctUntilChanged(),\n switchMap((ad) => this.getTranslatedName(ad)),\n map((name) => ({ name, value: pax.group.value.id }))\n );\n }\n\n private getTranslatedName(paxDetails: PaxDetailsFormData) {\n const params = {\n ...paxDetails,\n firstName: paxDetails.firstName || '',\n lastName: paxDetails.lastName || '',\n };\n\n return this.languageService.translate('paxDetails.travellingWith', params);\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n handleSave(paxData: PaxDetailsFormData): void {\n this.travelerIdBeingModified$.next(paxData.travelerId);\n this.store$.dispatch(setSinglePaxDetails({ passenger: paxData }));\n\n const passengerFormDetails: PaxDetailsState = snapshot(this.store$.pipe(paxDetails()));\n this.bookingQueueService.queuePassengersAndCorporateCodeUpdate(passengerFormDetails);\n }\n\n backToPaxDetails(): void {\n this.bookingService.setStep({ step: BOOKING_STEPS.PAXDETAILS });\n\n this.gtmService.trackElement(\n 'review-page-back-to-pax-details-button',\n GaContext.BOOKING_FLOW,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n }\n}\n","<div\n class=\"bound-container flex flex--align-start flex--space-between nowrap flex--middle pr-xsmall-y pr-small-x border rounded-large grey-50-bg\"\n [class.active]=\"active\"\n [class.shadow-highlight]=\"active\"\n [class.disabled]=\"disabled\"\n data-testid=\"bound-container\"\n>\n <div class=\"font-body-2 ms-xsmall-r\" data-testid=\"bound-container-title\">\n <!--\n -->{{ label + ' ' + (date | finDateFormat: 'DATE')\n }}<!--\n --></div>\n\n <div class=\"bound-container__details font-body-1 flex flex-1 flex--end fill\" data-testid=\"bound-container-details\">\n <ng-container *ngIf=\"bound\">\n <div class=\"truncate-wrapper flex\">\n <span class=\"medium-type\">{{\n (bound.departure.dateTime | finTime) + ' ' + (bound.departure.dateTime | finDateFormat: 'E')\n }}</span>\n <span class=\"city-name ms-xsmall-l truncate overflow-hidden\">{{\n bound.departure.cityName || bound.departure.name || bound.departure.locationCode\n }}</span>\n <span class=\"ms-xsmall-l\">{{ '-' }}</span>\n </div>\n <div class=\"truncate-wrapper flex\">\n <span class=\"medium-type ms-xsmall-l\">{{\n (bound.arrival.dateTime | finTime) + ' ' + (bound.arrival.dateTime | finDateFormat: 'E')\n }}</span>\n <span class=\"city-name ms-xsmall-l truncate overflow-hidden\">{{\n bound.arrival.cityName || bound.arrival.name || bound.arrival.locationCode\n }}</span>\n <fcom-icon\n class=\"flex--nogrow icon-small ms-xsmall-l heather-700-text\"\n [name]=\"SvgLibraryIcon.CHECKMARK\"\n ></fcom-icon>\n </div>\n </ng-container>\n <div *ngIf=\"!bound\" class=\"font-body-2 nordic-blue-900-text\">\n {{ 'ticketSelection.noFlightSelected' | finLocalization }}\n </div>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { LocalDate } from '@fcom/core/utils';\n\nimport { FinnairBoundItemWithLocation } from '../../../interfaces';\n@Component({\n selector: 'fin-bound-container',\n templateUrl: './bound-container.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./bound-container.component.scss'],\n})\nexport class BoundContainerComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n bound: FinnairBoundItemWithLocation;\n @Input()\n label: string;\n @Input()\n date: string | LocalDate;\n @Input()\n active: boolean;\n @Input()\n disabled: boolean;\n}\n","import { DOCUMENT } from '@angular/common';\nimport { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable, NgZone } from '@angular/core';\n\nimport { EMPTY, merge, Observable, of, ReplaySubject, Subject } from 'rxjs';\nimport { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators';\n\nimport { ProfileType } from '@fcom/core-api/login';\nimport { isDeepEqual, SentryLogger, WindowRef } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { replaceURIFormat } from '@fcom/core/utils';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\n\nimport { Consent, ConsentData, ConsentGroup, ConsentStatus, ConsentTextId, ConsentTextsGroup } from '../../interfaces';\nimport { GtmService } from '../../gtm';\n\nexport const FINNAIR_COOKIE_SNIPPET = 'finnairCookieSnippet';\n\nexport enum ConsentTokenType {\n CAT = 'CAT',\n Bearer = 'Bearer',\n}\n\nexport interface ConsentToken {\n token: string;\n type?: ConsentTokenType;\n}\n\n@Injectable()\nexport class ConsentService {\n cookieConsents$: Observable<ConsentGroup>;\n\n private readonly cookieConsentsSavedToStorage$ = new ReplaySubject<boolean>(1);\n private cookieSnippetLoaded$ = new Subject<boolean>();\n private MARKETING_CONSENT = 'fplus-marketing';\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n private http: HttpClient,\n private configService: ConfigService,\n private gtmService: GtmService,\n private sentryLogger: SentryLogger,\n private languageService: LanguageService,\n private ngZone: NgZone,\n private windowRef: WindowRef\n ) {\n this.cookieConsents$ = merge(this.cookieSnippetLoaded$, this.cookieConsentsSavedToStorage$).pipe(\n switchMap(() => this.getCookieConsents()),\n distinctUntilChanged(isDeepEqual),\n finShare()\n );\n }\n\n private getAuthHeaderValue(token: ConsentToken) {\n return token?.type === ConsentTokenType.CAT ? `CAT ${token.token}` : `Bearer ${token.token}`;\n }\n\n getMarketingConsents(token: ConsentToken, type: ProfileType): Observable<ConsentGroup | undefined> {\n if (type === ProfileType.FINNAIR_ACCOUNT) {\n return of(undefined);\n }\n\n const headers = new HttpHeaders().append('Authorization', this.getAuthHeaderValue(token));\n return this.languageService.locale.pipe(\n switchMap((locale: string) =>\n this.http\n .get(\n `${this.configService.cfg.consentApiUrl}v2/consents?locale=${locale}&consentGroup=${this.MARKETING_CONSENT}`,\n {\n headers,\n }\n )\n .pipe(\n retryWithBackoff(1),\n map((consentGroups: ConsentGroup[]) =>\n consentGroups.find((group) => group.consentGroup === this.MARKETING_CONSENT)\n ),\n catchError((e: HttpErrorResponse) => {\n this.handleError(e);\n throw e; // Throw the error after handling it\n })\n )\n )\n );\n }\n\n getMarketingConsentTexts(): Observable<ConsentTextsGroup> {\n return this.languageService.locale.pipe(\n switchMap((locale: string) =>\n this.http\n .get(\n `${this.configService.cfg.consentApiUrl}v1/texts?locale=${locale}&consentGroup=${this.MARKETING_CONSENT}`\n )\n .pipe(\n retryWithBackoff(1),\n map((consentTextsGroups: ConsentTextsGroup[]) => consentTextsGroups[0]),\n catchError((e: HttpErrorResponse) => this.handleError(e))\n )\n )\n );\n }\n\n sendConsents(token: ConsentToken, consents: Consent[], source?: string): Observable<ConsentGroup | unknown> {\n const headers = new HttpHeaders().append('Authorization', this.getAuthHeaderValue(token));\n\n return this.http\n .post(\n `${this.configService.cfg.consentApiUrl}v1/consents`,\n {\n consents,\n locale: this.languageService.localeValue,\n source: source || this.document.location.hostname,\n },\n { headers }\n )\n .pipe(catchError((e: HttpErrorResponse) => this.handlePostError(e)));\n }\n\n setCookieConsents(consentData: ConsentData): void {\n try {\n this.ngZone.run(() => {\n this.windowRef.nativeWindow[FINNAIR_COOKIE_SNIPPET]?.setConsents(consentData);\n });\n } catch (e) {\n this.sentryLogger.warn('Setting consents failed!', e);\n }\n\n this.gtmService.setConsents(consentData);\n this.cookieConsentsSavedToStorage$.next(true);\n }\n\n getCookieConsentStatusById(consentId: ConsentTextId): Observable<boolean> {\n return this.cookieConsents$.pipe(\n map((cg: ConsentGroup) => cg?.consents?.find((c) => c.consentTextId === consentId)),\n map((c: Consent) => c?.consentStatus !== ConsentStatus.WITHDRAWN && c?.consentStatus === ConsentStatus.ACCEPTED)\n );\n }\n\n getCookieIdFromSnippet(): string {\n return this.windowRef.nativeWindow[FINNAIR_COOKIE_SNIPPET]?.getOrGenerateFinnairCookieId();\n }\n\n injectCookieSnippet(): void {\n const cookieSnippetScript: HTMLScriptElement = this.document.createElement('script');\n cookieSnippetScript.setAttribute('async', '');\n cookieSnippetScript.src = replaceURIFormat(this.configService.cfg.cookieSnippetUrl, {\n locale: this.languageService.localeValue,\n });\n cookieSnippetScript.onload = () => {\n this.cookieSnippetLoaded$.next(true);\n };\n this.document.body.appendChild(cookieSnippetScript);\n }\n\n private getCookieConsents(): Observable<ConsentGroup> {\n return new Observable<ConsentGroup>((observer) => {\n try {\n this.ngZone.run(() => {\n this.windowRef.nativeWindow[FINNAIR_COOKIE_SNIPPET]?.getConsents((consentGroups) => {\n observer.next(consentGroups);\n observer.complete();\n });\n });\n } catch (e) {\n observer.error(e);\n // eslint-disable-next-line rxjs/no-redundant-notify\n observer.complete();\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n return function dispose() {};\n });\n }\n\n private handleError(error: HttpErrorResponse): Observable<never> {\n if (error.status !== 403) {\n this.sentryLogger.error('Error getting marketing consent data', { error });\n }\n return EMPTY;\n }\n\n private handlePostError(error: HttpErrorResponse): Observable<ConsentGroup> {\n if (error.status !== 403) {\n this.sentryLogger.error('Error sending marketing consent data to consent api', { error });\n }\n return EMPTY;\n }\n}\n","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { LocationRouteType } from '@fcom/core-api';\nimport { FinnairCabinClass, TranslatedBenefitRow } from '@fcom/dapi/api/models';\n\nexport const BENEFITS_ICON_MAP: Record<string, SvgLibraryIcon> = {\n checkedBaggage: SvgLibraryIcon.CHECKED_BAGGAGE,\n cabinBaggage: SvgLibraryIcon.CARRY_ON_BAG,\n seatSelection: SvgLibraryIcon.SEAT_OR_ECONOMY,\n rebook: SvgLibraryIcon.MMB_TICKET_CHANGES,\n cancel: SvgLibraryIcon.TICKET_REFUND,\n nameChange: SvgLibraryIcon.SINGLE_PAX,\n plusPoints: SvgLibraryIcon.FINNAIR_PLUS,\n loungeAccess: SvgLibraryIcon.LOUNGE,\n prioritySecurity: SvgLibraryIcon.PRIORITY_SECURITY,\n priorityCheckIn: SvgLibraryIcon.CHECK_IN,\n wifiAccess: SvgLibraryIcon.WIFI,\n cabinBaggageWithWeight: SvgLibraryIcon.CARRY_ON_BAGGAGE,\n cabinBagWithAmount: SvgLibraryIcon.CARRY_ON_BAG_TROLLEY,\n smallBag: SvgLibraryIcon.BACKPACK,\n carryOnBag: SvgLibraryIcon.CARRY_ON_BAGGAGE,\n checkedBaggageWithAmountAndWeightSingular: SvgLibraryIcon.CHECKED_BAGGAGE,\n checkedBaggageWithAmountAndWeightPlural: SvgLibraryIcon.CHECKED_BAGGAGE,\n checkedBaggageWithWeight: SvgLibraryIcon.CHECKED_BAGGAGE,\n};\n\nexport const BENEFITS = {\n checkedBaggage: 'checkedBaggage',\n cabinBaggage: 'cabinBaggage',\n seatSelection: 'seatSelection',\n rebook: 'rebook',\n cancel: 'cancel',\n nameChange: 'nameChange',\n plusPoints: 'plusPoints',\n loungeAccess: 'loungeAccess',\n prioritySecurity: 'prioritySecurity',\n priorityCheckIn: 'priorityCheckIn',\n wifiAccess: 'wifiAccess',\n};\n\nexport const koreanColoredBenefits: (keyof typeof BENEFITS_ICON_MAP)[] = ['rebook', 'cancel'];\n\nexport const shouldDisplayBenefit = (benefit: TranslatedBenefitRow): boolean => {\n return (\n (benefit.isPositive && benefit.key !== BENEFITS.plusPoints && benefit.key !== BENEFITS.nameChange) ||\n benefit.key === BENEFITS.cancel ||\n benefit.key === BENEFITS.rebook\n );\n};\n\nconst economyChanges = {\n shortHaul: {\n [LocationRouteType.DEFAULT]: [],\n [LocationRouteType.AJB]: [],\n [LocationRouteType.SJB]: [],\n },\n longHaul: {\n [LocationRouteType.DEFAULT]: [],\n [LocationRouteType.AJB]: [],\n [LocationRouteType.SJB]: [],\n },\n};\n\nexport const CHANGED_BENEFITS_BY_CLASS = {\n [FinnairCabinClass.BUSINESS]: {\n shortHaul: {\n [LocationRouteType.DEFAULT]: [\n 'cabinBaggageWithWeight',\n 'smallBag',\n 'cabinBagWithAmount',\n 'checkedBaggageWithAmountAndWeightSingular',\n 'checkedBaggageWithAmountAndWeightPlural',\n ],\n [LocationRouteType.AJB]: [],\n [LocationRouteType.SJB]: [],\n },\n longHaul: {\n [LocationRouteType.DEFAULT]: [\n 'cabinBaggageWithWeight',\n 'smallBag',\n 'cabinBagWithAmount',\n 'checkedBaggageWithAmountAndWeightSingular',\n 'checkedBaggageWithAmountAndWeightPlural',\n ],\n [LocationRouteType.AJB]: ['cabinBaggageWithWeight', 'smallBag', 'cabinBagWithAmount'],\n [LocationRouteType.SJB]: ['cabinBaggageWithWeight', 'smallBag', 'cabinBagWithAmount'],\n },\n },\n [FinnairCabinClass.ECONOMY]: economyChanges,\n [FinnairCabinClass.ECOPREMIUM]: economyChanges,\n [FinnairCabinClass.FIRST]: economyChanges,\n};\n","import { Scheduler } from '../Scheduler';\nimport { Subscription } from '../Subscription';\nimport { SchedulerAction } from '../types';\n\n/**\n * A unit of work to be executed in a `scheduler`. An action is typically\n * created from within a {@link SchedulerLike} and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action<T> extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n */\nexport class Action<T> extends Subscription {\n constructor(scheduler: Scheduler, work: (this: SchedulerAction<T>, state?: T) => void) {\n super();\n }\n /**\n * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param state Some contextual data that the `work` function uses when called by the\n * Scheduler.\n * @param delay Time to wait before executing the work, where the time unit is implicit\n * and defined by the Scheduler.\n * @return A subscription in order to be able to unsubscribe the scheduled work.\n */\n public schedule(state?: T, delay: number = 0): Subscription {\n return this;\n }\n}\n","import type { TimerHandle } from './timerHandle';\ntype SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearIntervalFunction = (handle: TimerHandle) => void;\n\ninterface IntervalProvider {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n delegate:\n | {\n setInterval: SetIntervalFunction;\n clearInterval: ClearIntervalFunction;\n }\n | undefined;\n}\n\nexport const intervalProvider: IntervalProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setInterval(handler: () => void, timeout?: number, ...args) {\n const { delegate } = intervalProvider;\n if (delegate?.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return (delegate?.clearInterval || clearInterval)(handle as any);\n },\n delegate: undefined,\n};\n","import { Action } from './Action';\nimport { SchedulerAction } from '../types';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncAction<T> extends Action<T> {\n public id: TimerHandle | undefined;\n public state?: T;\n // @ts-ignore: Property has no initializer and is not definitely assigned\n public delay: number;\n protected pending: boolean = false;\n\n constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction<T>, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (this.closed) {\n return this;\n }\n\n // Always replace the current state with the new state.\n this.state = state;\n\n const id = this.id;\n const scheduler = this.scheduler;\n\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay);\n\n return this;\n }\n\n protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n\n protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined {\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n\n return undefined;\n }\n\n /**\n * Immediately executes this action and the `work` it contains.\n */\n public execute(state: T, delay: number): any {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n\n protected _execute(state: T, _delay: number): any {\n let errored: boolean = false;\n let errorValue: any;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n // HACK: Since code elsewhere is relying on the \"truthiness\" of the\n // return here, we can't have it return \"\" or 0 or false.\n // TODO: Clean this up when we refactor schedulers mid-version-8 or so.\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n\n this.work = this.state = this.scheduler = null!;\n this.pending = false;\n\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n\n this.delay = null!;\n super.unsubscribe();\n }\n }\n}\n","import { Component, Output, EventEmitter } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fin-flight-filters-empty-state',\n templateUrl: './flight-filters-empty-state.component.html',\n styleUrls: ['./flight-filters-empty-state.component.scss'],\n})\nexport class FlightFiltersEmptyStateComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Output()\n clearAllFilters: EventEmitter<void> = new EventEmitter();\n}\n","<div class=\"empty-and-loading-state flex flex--column flex--center ms-large\">\n <fcom-icon class=\"icon-xxlarge\" [name]=\"SvgLibraryIcon.FLIGHTS_UNAVAILABLE\"></fcom-icon>\n <h2 class=\"font-heading-3 ms-xxsmall-b ms-medium-t\">\n {{ 'flightFilters.noFilterResults.title' | finLocalization }}\n </h2>\n <p class=\"ms-medium-b\">{{ 'flightFilters.noFilterResults.subtitle' | finLocalization }}</p>\n <fcom-button [text]=\"'flightFilters.clearAll' | finLocalization\" (clickBtn)=\"clearAllFilters.emit()\" />\n</div>\n","<div class=\"dates-selector-root relative fill grow\" [class.separator]=\"!showSingular && (isOneway$ | async) === false\">\n <ng-container *ngIf=\"!showSingular\">\n <fin-booking-widget-selector\n [disabled]=\"disabled\"\n (click)=\"openModal()\"\n [double]=\"\n (isOneway$ | async) === false\n ? {\n first: {\n label: 'bookingSearch.boundSelection.departureDate' | finLocalization,\n placeholder: 'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization,\n filled: (travelDates$ | async)?.['departureDate'] !== undefined,\n },\n second: {\n label: 'bookingSearch.boundSelection.returnDate' | finLocalization,\n placeholder: 'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization,\n filled: (travelDates$ | async)?.['returnDate'] !== undefined,\n },\n }\n : undefined\n \"\n [label]=\"'bookingSearch.boundSelection.departureDate' | finLocalization\"\n [placeholder]=\"'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization\"\n [filled]=\"(travelDates$ | async)?.['departureDate'] !== undefined\"\n [attr.data-testid]=\"'travel-dates-selector-both'\"\n >\n <span\n *ngIf=\"(isOneway$ | async) === true && (travelDates$ | async)?.['departureDate'] as selectedDate\"\n data-testid=\"departure-date\"\n >{{ selectedDate | finDateFormat: 'FULL_NO_YEAR' }}</span\n >\n <span first *ngIf=\"(travelDates$ | async)?.['departureDate'] as selectedDate\" data-testid=\"departure-date\">{{\n selectedDate | finDateFormat: 'FULL_NO_YEAR'\n }}</span>\n <div\n separator\n *ngIf=\"(isOneway$ | async) === false && showSeparator\"\n class=\"flex flex--center flex--self-center absolute white-bg date-spacer ps-xxsmall z1\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.MINUS\"></fcom-icon>\n </div>\n <span second *ngIf=\"(travelDates$ | async)?.['returnDate'] as selectedDate\" data-testid=\"return-date\">{{\n selectedDate | finDateFormat: 'FULL_NO_YEAR'\n }}</span>\n </fin-booking-widget-selector>\n </ng-container>\n <fin-booking-widget-selector\n *ngIf=\"showSingular as departureOrReturn\"\n [disabled]=\"disabled\"\n (click)=\"openModal()\"\n [label]=\"'bookingSearch.boundSelection.' + departureOrReturn | finLocalization\"\n [placeholder]=\"'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization\"\n [filled]=\"!!(travelDates$ | async)?.[departureOrReturn]\"\n [attr.data-testid]=\"'travel-dates-selector-' + departureOrReturn\"\n >\n <span *ngIf=\"(travelDates$ | async)?.[departureOrReturn] as selectedDate\" data-testid=\"departure-date\">{{\n selectedDate | finDateFormat: 'FULL_NO_YEAR'\n }}</span>\n </fin-booking-widget-selector>\n</div>\n\n<fcom-modal\n [open]=\"modalOpen$ | async\"\n [fitToContent]=\"true\"\n [buttons]=\"null\"\n [fullHeight]=\"true\"\n [extraWide]=\"true\"\n [roundedContent]=\"true\"\n (close)=\"closePriceCalendar()\"\n data-testid=\"travel-dates-modal\"\n>\n <fin-price-calendar\n *ngIf=\"modalOpen$ | async\"\n [openWithParams$]=\"priceCalendarParams$\"\n [showAddReturn]=\"showAddReturn\"\n [showSubtitle]=\"showSubtitle\"\n [disabledDateRanges$]=\"disabledDateRanges$\"\n [showFlexibleDatesSelection]=\"showFlexibleDatesSelection\"\n [showTripPriceFrom]=\"showTripPriceFrom\"\n [enableNewSearchAutomatically]=\"enableNewSearchAutomatically\"\n [isSearchEnabled]=\"isSearchEnabled\"\n [ctaLabel]=\"'actions.done' | finLocalization\"\n [type]=\"priceCalendarType\"\n [enablePreFlightSearchTracking]=\"priceCalendarType === PriceCalendarType.PRICES\"\n [showEnhancedCalendar$]=\"showEnhancedCalendar$\"\n (modalClose)=\"closePriceCalendar()\"\n (ctaClicked)=\"priceCalendarCTAClicked($event)\"\n (addReturnClicked)=\"addReturnClicked()\"\n (travelDatesChanged)=\"travelDatesChanged($event)\"\n (cancelSelection)=\"cancelSelection.emit()\"\n (startSearch)=\"startSearch.emit()\"\n ></fin-price-calendar>\n</fcom-modal>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { BehaviorSubject, filter, map, Observable, of, Subscription, withLatestFrom } from 'rxjs';\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport {\n GlobalBookingTripDates,\n MultivariateTestId,\n PriceCalendarCTAParams,\n PriceCalendarParams,\n TestVariant,\n} from '@fcom/common';\nimport { LocalDate, unsubscribe } from '@fcom/core/utils';\nimport { ButtonMode, ButtonSize, ButtonTheme, DateRange } from '@fcom/ui-components';\nimport { GlobalBookingTravelClass, TripType } from '@fcom/core';\nimport { PaxAmount } from '@fcom/dapi';\nimport { LocationPair } from '@fcom/common/store';\nimport {\n PriceCalendarComponent,\n PriceCalendarType,\n} from '@fcom/common/components/price-calendar/price-calendar.component';\nimport { finShare } from '@fcom/rx';\nimport { MultivariateTestService } from '@fcom/common/multivariate-test/services/multivariate-test.service';\n\n@Component({\n selector: 'fin-travel-dates-selector',\n templateUrl: 'travel-dates-selector.component.html',\n styleUrls: ['./travel-dates-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TravelDatesSelectorComponent implements OnInit, OnDestroy {\n readonly ButtonMode = ButtonMode;\n readonly ButtonSize = ButtonSize;\n readonly ButtonTheme = ButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TripType = TripType;\n readonly PriceCalendarType = PriceCalendarType;\n\n @Input()\n priceCalendarType: PriceCalendarType = PriceCalendarType.PRICES;\n\n @Input()\n tripType$: Observable<TripType> = of(undefined);\n\n @Input()\n travelClass$: Observable<GlobalBookingTravelClass> = of(undefined);\n\n @Input()\n paxAmount$: Observable<PaxAmount> = of(undefined);\n\n @Input()\n locations$: Observable<LocationPair> = of(undefined);\n\n @Input()\n disabled = false;\n\n @Input()\n previousFlightDepartureDate$: Observable<LocalDate> = of(null);\n\n @Input()\n travelDates$: Observable<GlobalBookingTripDates>;\n\n @Input()\n isOneway$: Observable<boolean> = of(false);\n\n @Input()\n flexibleDates = false;\n\n @Input()\n showFlexibleDatesSelection = true;\n\n @Input()\n showTripPriceFrom = true;\n\n @Input()\n showPerAdultPrice = true;\n\n @Input()\n showSingular?: keyof GlobalBookingTripDates;\n\n @Input()\n showSeparator = true;\n\n @Input()\n showAddReturn = false;\n\n @Input()\n showSubtitle = false;\n\n @Input()\n enableNewSearchAutomatically = false;\n\n @Input()\n isSearchEnabled = false;\n\n @Output()\n setTravelDates = new EventEmitter<GlobalBookingTripDates>();\n\n @Output()\n setFlexibleDates = new EventEmitter<boolean>();\n\n @Output()\n addReturn = new EventEmitter<void>();\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n @Output()\n cancelSelection = new EventEmitter<void>();\n\n @ViewChild(PriceCalendarComponent)\n private priceCalendar: PriceCalendarComponent;\n\n subscription = new Subscription();\n\n modalOpen$ = new BehaviorSubject<boolean>(false);\n disabledDateRanges$: Observable<DateRange[]>;\n\n priceCalendarParams$: BehaviorSubject<PriceCalendarParams> = new BehaviorSubject(null);\n showEnhancedCalendar$: Observable<boolean>;\n\n constructor(private multivariateTestService: MultivariateTestService) {}\n\n ngOnInit(): void {\n this.showEnhancedCalendar$ = this.multivariateTestService\n .getTestVariant(MultivariateTestId.ENHANCED_CALENDAR_STYLING)\n .pipe(\n map(({ variant }) => variant === TestVariant.B),\n finShare()\n );\n\n this.subscription.add(\n this.modalOpen$\n .pipe(\n filter(Boolean),\n withLatestFrom(\n this.tripType$,\n this.travelClass$,\n this.paxAmount$,\n this.locations$,\n this.travelDates$,\n this.isOneway$\n ),\n map(([, tripType, travelClass, paxAmount, { origin, destination }, travelDates, isOneway]) => {\n return {\n origin: origin?.locationCode,\n destination: destination?.locationCode,\n tripType: isOneway ? TripType.ONEWAY : tripType,\n travelClass,\n paxAmount,\n initialTravelDates: travelDates,\n };\n })\n )\n .subscribe((params) => this.priceCalendarParams$.next(params))\n );\n\n this.disabledDateRanges$ = this.previousFlightDepartureDate$.pipe(\n map((departureDate: LocalDate) => (departureDate ? [[LocalDate.now(), departureDate.minusDays(1)]] : []))\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n openModal(): void {\n this.modalOpen$.next(true);\n }\n\n closePriceCalendar(): void {\n if (this.enableNewSearchAutomatically) {\n this.cancelSelection.emit();\n this.priceCalendar.startSearchWithSelectedDates(true);\n }\n this.modalOpen$.next(false);\n }\n\n priceCalendarCTAClicked(event: PriceCalendarCTAParams): void {\n this.setFlexibleDates.emit(event.flexibleDates);\n this.closePriceCalendar();\n }\n\n addReturnClicked(): void {\n this.addReturn.emit();\n }\n\n travelDatesChanged(travelDates: GlobalBookingTripDates): void {\n this.setTravelDates.emit(travelDates);\n }\n}\n","export type DdsLanguageType =\n | 'CN'\n | 'DE'\n | 'DK'\n | 'ET'\n | 'ES'\n | 'FI'\n | 'FR'\n | 'GB'\n | 'IT'\n | 'JP'\n | 'KO'\n | 'NO'\n | 'PL'\n | 'RU'\n | 'SE';\nexport type DdsCountrySiteType =\n | 'INT'\n | 'AT'\n | 'AU'\n | 'BE'\n | 'CA'\n | 'CH'\n | 'CN'\n | 'CZ'\n | 'DE'\n | 'DK'\n | 'EE'\n | 'ES'\n | 'FI'\n | 'FR'\n | 'GB'\n | 'HK'\n | 'HU'\n | 'IE'\n | 'IL'\n | 'IN'\n | 'IS'\n | 'IT'\n | 'JP'\n | 'KR'\n | 'LT'\n | 'LV'\n | 'NL'\n | 'NO'\n | 'PL'\n | 'RU'\n | 'SE'\n | 'SG'\n | 'TH'\n | 'US';\n\nexport interface DdsLanguage {\n countrySite: DdsCountrySiteType;\n language: DdsLanguageType;\n}\n\nexport enum DdsServiceCard {\n BOOKING = '1',\n MANAGE_MY_BOOKING = '2',\n}\n\nexport enum DdsPageType {\n responsiveDeepLink = 'RDPL',\n finnairLoyaltyProfile = 'RPLS',\n updateFinnairLoyaltyProfile = 'FPUP',\n}\n\nexport type DdsCasBaseParams = {\n /**\n * Four-letter code of DDS page\n */\n PAGE: DdsPageType;\n LANGUAGE: DdsLanguageType;\n COUNTRY_SITE: DdsCountrySiteType;\n};\n\nexport interface DdsCasAdditionalParams {\n DEEPLINK?: boolean;\n SERVICECARD?: DdsServiceCard;\n PREFILLED_INPUT?: string;\n 'update-profile-tab'?: string;\n}\n\nexport type DdsCasRedirectParams = DdsCasBaseParams & DdsCasAdditionalParams;\n","export interface MaintenanceConfigResponse {\n [key: string]: boolean;\n}\n\nexport enum MaintenanceConfigFeature {\n ONE_UPGRADE = 'disableOneUpgrade',\n}\n","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nexport enum GlobalBookingTravelClass {\n ECONOMY = 'ECONOMY',\n ECOPREMIUM = 'ECOPREMIUM',\n BUSINESS = 'BUSINESS',\n FIRST = 'FIRST',\n MIXED = 'MIXED',\n}\n\nexport type GlobalBookingTravelClassValue = keyof typeof GlobalBookingTravelClass;\n\nexport type GlobalBookingTravelClassDataMap = {\n [k in GlobalBookingTravelClassValue]: {\n icon: string;\n translationKey: string;\n };\n};\n\nexport const COMMON_BOOKING_TRAVEL_CLASSES: GlobalBookingTravelClassDataMap = {\n FIRST: {\n translationKey: 'travelClass.first',\n icon: SvgLibraryIcon.BUSINESS_CLASS,\n },\n BUSINESS: {\n translationKey: 'travelClass.business',\n icon: SvgLibraryIcon.BUSINESS_CLASS,\n },\n ECONOMY: {\n translationKey: 'travelClass.economy',\n icon: SvgLibraryIcon.SEAT_OR_ECONOMY,\n },\n ECOPREMIUM: {\n translationKey: 'travelClass.ecopremium',\n icon: SvgLibraryIcon.SEAT_OR_ECONOMY,\n },\n MIXED: {\n translationKey: 'travelClass.mixed',\n icon: SvgLibraryIcon.SEAT_OR_ECONOMY,\n },\n};\n","<div class=\"nordic-blue-900-bg\" id=\"booking-header-summary-section\" role=\"region\">\n <div class=\"relative\">\n <div\n data-id=\"status-bar-location-container\"\n class=\"col-1-12 overflow-hidden flex flex--middle flex--wrap white-text\"\n >\n <fin-booking-header-summary-item\n [isClickable]=\"isClickable\"\n (clickAction)=\"openBookingWidget()\"\n *ngIf=\"bookingSummary.tripType !== TripType.MULTICITY && (this.isMobile$ | async) === false\"\n customClasses=\"pr-xxsmall-r border-right ms-xxsmall-l white-text flex\"\n type=\"trip-type\"\n >\n <span class=\"content\">\n {{ 'tripCard.tripType.' + bookingSummary.tripType | finLocalization }}\n </span>\n </fin-booking-header-summary-item>\n <fin-booking-header-summary-item\n (clickAction)=\"openBookingWidget()\"\n [isClickable]=\"isClickable\"\n customClasses=\"{{\n bookingSummary.tripType === TripType.MULTICITY ? 'pr-xxsmall-r' : 'pr-xxsmall-x'\n }} border-right flex\"\n type=\"location\"\n >\n <span class=\"content\">\n <span>\n {{\n bookingSummary.tripType === TripType.MULTICITY\n ? ('tripCard.tripType.complex' | finLocalization)\n : bookingSummary.locations?.[0].originLocationCode\n }}\n </span>\n <span class=\"flex--nogrow ps-xxsmall-x\">\n <fcom-icon\n class=\"icon-small\"\n [name]=\"\n bookingSummary.tripType === TripType.RETURN\n ? SvgLibraryIcon.RETURN_TRIP\n : SvgLibraryIcon.AIRCRAFT_HORIZONTAL\n \"\n ></fcom-icon>\n </span>\n <span>\n {{\n bookingSummary.tripType === TripType.MULTICITY\n ? (isMobile$ | async)\n ? bookingSummary.locations.length\n : ('bookingWidget.numberOfFlights'\n | finLocalization: { numberOfFlights: bookingSummary.locations.length })\n : bookingSummary.locations?.[0].destinationLocationCode\n }}\n </span>\n </span>\n </fin-booking-header-summary-item>\n <fin-booking-header-summary-item\n (clickAction)=\"openBookingWidget()\"\n [isClickable]=\"isClickable\"\n customClasses=\"pr-xxsmall-x border-right flex\"\n type=\"pax-amount\"\n >\n <span class=\"content\">\n <fcom-icon\n class=\"icon-small\"\n [name]=\"bookingSummary.paxAmount !== 1 ? SvgLibraryIcon.MULTI_PAX : SvgLibraryIcon.SINGLE_PAX\"\n ></fcom-icon>\n\n {{ bookingSummary.paxAmount }}\n </span>\n </fin-booking-header-summary-item>\n <fin-booking-header-summary-item\n (clickAction)=\"openBookingWidget()\"\n [isClickable]=\"isClickable\"\n customClasses=\"pr-xxsmall-l ms-xxsmall-r flex\"\n type=\"date\"\n >\n <span class=\"content\">\n {{\n bookingSummary.dates?.returnDate\n ? (bookingSummary.dates?.departureDate | finDateFormat: 'DATE_SHORT') +\n ' - ' +\n (bookingSummary.dates?.returnDate | finDateFormat: 'DATE_SHORT')\n : (bookingSummary.dates?.departureDate | finDateFormat: 'FULL_NO_YEAR')\n }}\n </span>\n </fin-booking-header-summary-item>\n </div>\n </div>\n</div>\n","import { Component, ChangeDetectionStrategy, Input, OnInit, Output, EventEmitter } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { BookingHeaderSummary } from '@fcom/common/interfaces';\nimport { MediaQueryService } from '@fcom/common/services';\nimport { TripType } from '@fcom/core/interfaces';\n\n@Component({\n selector: 'fin-booking-header-summary',\n templateUrl: './booking-header-summary.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BookingHeaderSummaryComponent implements OnInit {\n readonly TripType = TripType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n isMobile$: Observable<boolean>;\n\n @Input() bookingSummary: BookingHeaderSummary;\n @Input() isClickable: boolean = false;\n @Output() modifySearch: EventEmitter<void> = new EventEmitter();\n\n constructor(private mediaQueryService: MediaQueryService) {}\n\n ngOnInit(): void {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n }\n\n openBookingWidget(): void {\n this.modifySearch.emit();\n }\n}\n","<fieldset\n *ngIf=\"i18n\"\n class=\"border-none file-wrapper\"\n [ngClass]=\"{ 'grey-600-text': fieldDisabled }\"\n [formGroup]=\"parentForm\"\n>\n <legend class=\"font-heading-4 bold-type medium-type ms-medium-b\" data-testid=\"file-uploader-label\">\n {{ labelAttach }}\n <span *ngIf=\"fieldRequired\" data-testid=\"asterisk\">*</span>\n </legend>\n <dl class=\"flex font-body-1 gap-4 mr-xsmall-b\" *ngIf=\"maxAttachments\">\n <dt data-testid=\"max-attachments-label\">{{ i18n.maxAttachments }}:</dt>\n <dd class=\"bold-type\" data-testid=\"max-attachments-value\">{{ maxAttachments }}</dd>\n </dl>\n <dl class=\"flex font-body-1 gap-4 mr-xsmall-b\" *ngIf=\"maxSizeInBytes\">\n <dt data-testid=\"max-file-size-label\">{{ i18n.maxFileSize }}:</dt>\n <dd class=\"bold-type\" data-testid=\"max-file-size-value\">{{ maxSizeMb }} {{ i18n.megaBytes }}</dd>\n </dl>\n <dl class=\"flex flex--half gap-4 font-body-1 mr-small-b\" *ngIf=\"filesSupported.length\">\n <dt data-testid=\"files-supported-label\">{{ i18n.filesSupported }}:</dt>\n <dd class=\"bold-type\" data-testid=\"files-supported-list\">{{ filesSupported }}</dd>\n </dl>\n\n <label class=\"dn-mobile\" [for]=\"idOrControlName\" [class.disabled]=\"fieldDisabled\">\n <div\n class=\"drop-area font-body-1 medium-type border border-dashed rounded-large align-center ps-large\"\n [ngClass]=\"{\n 'error error-900-border': containsErrors,\n 'grey-100-bg': fieldDisabled || isUploading,\n 'nordic-blue-25-bg': dragInProgress$ | async,\n 'nordic-blue-400-border': !fieldDisabled && !containsErrors,\n }\"\n data-testid=\"drop-area\"\n (drop)=\"onDrop($event)\"\n (dragover)=\"onDragOver($event)\"\n (dragenter)=\"onDragEnter(true)\"\n (dragleave)=\"onDragEnter(false)\"\n >\n <span class=\"block\">{{ i18n.dragAndDrop }}</span>\n <span>{{ i18n.or }} </span>\n <span class=\"underline\">{{ i18n.browseFiles }}</span>\n </div>\n\n <input\n data-testid=\"file-uploader-input\"\n (cancel)=\"onCancel($event)\"\n (change)=\"onChange($event)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event)\"\n (click)=\"onClick()\"\n class=\"is-vishidden\"\n [attr.accept]=\"acceptValues\"\n [attr.aria-required]=\"fieldRequired\"\n [disabled]=\"fieldDisabled || isUploading\"\n [id]=\"idOrControlName\"\n [multiple]=\"multiple\"\n [name]=\"controlName\"\n type=\"file\"\n #fileInput\n />\n </label>\n\n <div class=\"dn-tablet-up\">\n <fcom-button\n class=\"mr-xsmall-b\"\n data-testid=\"open-file-selector\"\n [disabled]=\"fieldDisabled || isUploading\"\n [mode]=\"ButtonMode.FILL_MOBILE\"\n [icon]=\"{ name: SvgLibraryIcon.UPLOAD, position: IconPosition.LEFT }\"\n [text]=\"labelAttach\"\n (click)=\"openFileSelector()\"\n ></fcom-button>\n </div>\n\n <ng-container *ngIf=\"attachmentsWithErrors()?.length\">\n <div class=\"error error-900-text pr-xxsmall-t\" data-testid=\"error-message\">\n @for (attachmentError of attachmentErrorKeys(); track $index) {\n <p class=\"flex font-body-1\" [attr.data-testid]=\"'attachment-error-' + attachmentError\">\n <fcom-icon class=\"icon-medium ms-small-r\" [name]=\"SvgLibraryIcon.ALERT_TRIANGLE\"></fcom-icon>\n @switch (attachmentError) {\n @case (AttachmentError.DUPLICATE) {\n <span\n [innerHTML]=\"\n i18n.errors[fileErrors()[attachmentError]?.length === 1 ? 'duplicateSingle' : 'duplicateMultiple']\n | finMsgFormat: { files: fileErrorLabels()[attachmentError] }\n | finSafe: 'html'\n \"\n ></span>\n }\n @case (AttachmentError.EXTENSION) {\n <span\n [innerHTML]=\"\n i18n.errors[\n fileErrors()[attachmentError]?.length === 1 ? 'invalidFileTypeSingle' : 'invalidFileTypeMultiple'\n ]\n | finMsgFormat: { files: fileErrorLabels()[attachmentError] }\n | finSafe: 'html'\n \"\n ></span>\n }\n @case (AttachmentError.MALWARE) {\n <span\n [innerHTML]=\"\n i18n.errors[fileErrors()[attachmentError]?.length === 1 ? 'malwareSingle' : 'malwareMultiple']\n | finMsgFormat: { files: fileErrorLabels()[attachmentError] }\n | finSafe: 'html'\n \"\n ></span>\n }\n @case (AttachmentError.MAX_ATTACHMENTS) {\n <span\n [innerHTML]=\"i18n.errors.maxAttachments | finMsgFormat: { maxAttachments } | finSafe: 'html'\"\n ></span>\n }\n @case (AttachmentError.MAX_SIZE) {\n <span\n [innerHTML]=\"\n i18n.errors[\n fileErrors()[attachmentError]?.length === 1 ? 'invalidFileSizeSingle' : 'invalidFileSizeMultiple'\n ]\n | finMsgFormat: { files: fileErrorLabels()[attachmentError] }\n | finSafe: 'html'\n \"\n ></span>\n }\n @default {\n <span\n [innerHTML]=\"\n i18n.errors.unknown | finMsgFormat: { files: fileErrorLabels()[attachmentError] } | finSafe: 'html'\n \"\n ></span>\n }\n }\n </p>\n } @empty {\n <p class=\"font-body-1\">{{ labelRequired }}</p>\n }\n </div>\n </ng-container>\n\n <fcom-attachment-list [attachments]=\"attachments\" (fileDeleted)=\"deleteAttachment($event)\"></fcom-attachment-list>\n</fieldset>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n signal,\n ViewChild,\n type OnChanges,\n type OnDestroy,\n type OnInit,\n type Signal,\n type WritableSignal,\n} from '@angular/core';\nimport { Validators, type AbstractControl, type FormControlStatus, type UntypedFormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, Subscription, type Observable, type Subject } from 'rxjs';\n\nimport { IntlJoinPipe } from '@fcom/common/pipes/intl-join.pipe';\nimport { SentryLogger } from '@fcom/core/services';\nimport { stopPropagation, unsubscribe } from '@fcom/core/utils';\n\nimport { ButtonMode } from '../../buttons';\nimport { IconPosition } from '../../icons';\nimport { AttachmentError, AttachmentStatus, type Attachment, type FileUploaderI18n } from '../../interfaces';\nimport { ATTACHMENT_ALLOWED_FILE_EXTENSIONS } from '../constants';\nimport type { AttachmentResponse } from '../interfaces';\nimport { attachmentStatusValidator } from './file-uploader-validators';\n\nconst ONE_MB_IN_BYTES = 1048576;\n\ntype AttachmentErrors = Record<AttachmentError, string[]>;\ntype FileErrors = Record<AttachmentError, string>;\n\n@Component({\n selector: 'fcom-file-uploader',\n templateUrl: './file-uploader.component.html',\n styleUrls: ['./file-uploader.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [IntlJoinPipe],\n})\nexport class FileUploaderComponent implements OnChanges, OnInit, OnDestroy {\n readonly AttachmentError = AttachmentError;\n readonly ButtonMode = ButtonMode;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() allowedFileTypes: string[] = ATTACHMENT_ALLOWED_FILE_EXTENSIONS;\n @Input() customAttachLabel = '';\n @Input() customRequiredLabel = '';\n @Input() disabled = false;\n @Input() id: string;\n @Input({ required: true }) maxAttachments: number;\n @Input({ required: true }) maxSizeInBytes: number;\n @Input() uploadService: (file: File) => Observable<AttachmentResponse>;\n @Input({ required: true }) controlName: string;\n @Input({ required: true }) i18n: FileUploaderI18n;\n @Input({ required: true }) parentForm: UntypedFormGroup;\n\n @Output() fileDeleted: EventEmitter<Attachment> = new EventEmitter<Attachment>();\n @Output() filesUpdated: EventEmitter<Attachment[]> = new EventEmitter<Attachment[]>();\n\n @ViewChild('fileInput') fileInput: ElementRef<HTMLInputElement>;\n\n attachmentsWithErrors: WritableSignal<Attachment[]> = signal<Attachment[]>([]);\n dragInProgress$: Subject<boolean> = new BehaviorSubject<boolean>(false);\n idOrControlName: string;\n maxSizeMb: number | undefined;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private intlJoin: IntlJoinPipe,\n private sentryLogger: SentryLogger\n ) {}\n\n private lastEventTimeStamp: null | number = null;\n private subscriptions: Subscription = new Subscription();\n\n /**\n * Transforms an array of allowed file types to a string\n * for the `accept` property of the file input.\n *\n * @example ['gif', 'jpg', 'png']\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept MDN documentation} for more information.\n * @returns {string} `'.gif,.jpg,.png'`\n */\n get acceptValues(): string {\n return this.allowedFileTypes.length ? `.${this.allowedFileTypes.join(',.')}` : '';\n }\n\n get attachments(): Attachment[] {\n return this.ctrlField.value\n ? this.ctrlField.value.sort((a: Attachment, b: Attachment): number => a?.file.name.localeCompare(b.file.name))\n : this.ctrlField.value || [];\n }\n\n get containsErrors(): boolean {\n return (\n this.ctrlField.touched &&\n this.ctrlField.invalid &&\n (Boolean(this.attachmentsWithErrors().length) || (this.ctrlField.errors?.required && !this.attachments.length))\n );\n }\n\n get ctrlField(): AbstractControl<Attachment[]> {\n return this.parentForm.get(this.controlName);\n }\n\n get fieldDisabled(): boolean {\n return (\n this.disabled || this.ctrlField.disabled || this.attachments.length >= this.maxAttachments || this.isUploading\n );\n }\n\n get fieldRequired(): boolean {\n return this.ctrlField.hasValidator(Validators.required);\n }\n\n get filesSupported(): string {\n return this.intlJoin.transform(this.allowedFileTypes);\n }\n\n get isUploading(): boolean {\n return this.attachments.some((a: Attachment): boolean => a.status === AttachmentStatus.UPLOADING);\n }\n\n get labelAttach(): string {\n return this.customAttachLabel || (this.multiple ? this.i18n.attachFiles : this.i18n.attachFile);\n }\n\n get labelRequired(): string {\n return this.customRequiredLabel || (this.multiple ? this.i18n.errors.requiredMultiple : this.i18n.errors.required);\n }\n\n get multiple(): boolean {\n return this.maxAttachments > 1;\n }\n\n /**\n * Used to determine which error notice to show in the\n * template when looping over the existing attachment errors.\n *\n * @example\n * ```ts\n * console.log(this.attachmentErrorKeys());\n * // Output:\n * [AttachmentError.DUPLICATE, AttachmentError.EXTENSION, AttachmentError.MAX_ATTACHMENTS, AttachmentError.MAX_SIZE, AttachmentError.MALWARE, AttachmentError.UNKNOWN]\n * ```\n * @returns An array of attachment errors.\n */\n readonly attachmentErrorKeys: Signal<AttachmentError[]> = computed<AttachmentError[]>(\n (): AttachmentError[] => Object.keys(this.fileErrors()) as AttachmentError[]\n );\n\n /**\n * @example\n * ```ts\n * console.log(this.fileErrors());\n * // Output:\n * {\n * [AttachmentError.DUPLICATE]: ['file.jpg'],\n * [AttachmentError.EXTENSION]: ['file1.jpg', 'file2.png'],\n * [AttachmentError.MAX_ATTACHMENTS]: ['file.jpg'],\n * [AttachmentError.MAX_SIZE]: ['file.jpg'],\n * [AttachmentError.MALWARE]: ['file1.exe', 'file2.exe', 'file3.exe']\n * [AttachmentError.UNKNOWN]: ['file1.jpg', 'file2.png', 'file3.exe']\n * }\n * ```\n * @returns An object with attachment errors as keys and an array of file names as values.\n */\n readonly fileErrors: Signal<AttachmentErrors> = computed<AttachmentErrors>(\n (): AttachmentErrors =>\n this.attachmentsWithErrors()\n .sort((a: Attachment, b: Attachment): number => a?.status?.localeCompare(b?.status))\n .sort((a: Attachment, b: Attachment): number => a?.file.name.localeCompare(b.file.name))\n .reduce((accumulator: AttachmentErrors, currentValue: Attachment): AttachmentErrors => {\n accumulator[currentValue.error] = [...(accumulator[currentValue.error] || []), currentValue.file.name];\n return accumulator;\n }, {} as AttachmentErrors)\n );\n /**\n * @example English\n * ```ts\n * console.log(this.fileErrorLabels());\n * {\n * [AttachmentError.DUPLICATE]: 'file.jpg',\n * [AttachmentError.EXTENSION]: 'file1.jpg and file2.png',\n * [AttachmentError.MAX_SIZE]: 'file.jpg',\n * [AttachmentError.MALWARE]: 'file1.exe, file2.exe and file3.exe'\n * [AttachmentError.UNKNOWN]: 'file1.jpg, file2.png and file3.exe'\n * }\n * ```\n * @returns An object with attachment errors as keys and a localized string of file names as values.\n */\n readonly fileErrorLabels: Signal<FileErrors> = computed<FileErrors>(\n (): FileErrors =>\n Object.keys(this.fileErrors()).reduce((accumulator: FileErrors, key: string): FileErrors => {\n accumulator[key] = this.intlJoin.transform(this.fileErrors()[key]);\n return accumulator;\n }, {} as FileErrors)\n );\n\n ngOnChanges(): void {\n this.initValidators();\n }\n\n ngOnInit(): void {\n this.idOrControlName = this.id || this.controlName;\n this.maxSizeMb = this.maxSizeInBytes ? +(this.maxSizeInBytes / ONE_MB_IN_BYTES).toFixed(1) : undefined;\n\n this.initValidators();\n\n this.subscriptions.add(\n this.ctrlField.valueChanges.subscribe((updatedAttachments: Attachment[]): void => {\n if (!updatedAttachments) {\n return;\n }\n this.filesUpdated.emit(updatedAttachments);\n if (this.uploadService) {\n this.uploadAttachments(updatedAttachments.filter((attachment: Attachment): boolean => !attachment.status));\n }\n this.ctrlField.markAsTouched();\n this.ctrlField.updateValueAndValidity({ emitEvent: false });\n this.cdr.markForCheck();\n })\n );\n\n this.subscriptions.add(\n this.parentForm.statusChanges.subscribe((value: FormControlStatus): void => {\n if ('INVALID' === value && this.ctrlField.errors?.required && !this.ctrlField.touched) {\n this.ctrlField.markAllAsTouched();\n }\n this.cdr.markForCheck();\n })\n );\n\n this.cdr.markForCheck();\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n deleteAttachment(attachment: Attachment): void {\n if (!attachment) {\n return;\n }\n this.ctrlField.setValue(\n this.ctrlField.value.filter((a: Attachment): boolean => a.file.name !== attachment.file.name)\n );\n this.fileDeleted.emit(attachment);\n }\n\n onDragEnter(enable: boolean): void {\n if (this.fieldDisabled) {\n return;\n }\n this.dragInProgress$.next(enable);\n }\n\n onCancel(event: Event): void {\n // Prevent triggering error when no files are returned from the input\n // and some already exist in the attachment list\n if (this.attachments.length) {\n stopPropagation(event);\n return;\n }\n this.ctrlField.markAsTouched();\n }\n\n onChange(event: Event): void {\n if (event.timeStamp === this.lastEventTimeStamp) {\n this.lastEventTimeStamp = null;\n return;\n } else {\n this.lastEventTimeStamp = event.timeStamp;\n }\n const target: HTMLInputElement = event.target as HTMLInputElement;\n this.removeErrors();\n this.validateFiles(target.files);\n }\n\n /**\n * Fixes bug on Chrome where the cancel event gets fired instead of the change event.\n * @see {@link https://stackoverflow.com/q/42355858}\n */\n @HostListener('click', ['$event'])\n onClick(): void {\n this.removeErrors();\n this.fileInput.nativeElement.value = null;\n this.fileInput.nativeElement.click();\n }\n\n onDragOver(event: DragEvent): void {\n stopPropagation(event);\n if (this.fieldDisabled) {\n event.dataTransfer.dropEffect = 'none';\n event.dataTransfer.effectAllowed = 'none';\n }\n }\n\n onDrop(event: DragEvent): void {\n if (this.fieldDisabled) {\n return;\n }\n stopPropagation(event);\n this.dragInProgress$.next(false);\n this.removeErrors();\n const files: FileList = event?.dataTransfer?.files;\n this.validateFiles(files);\n }\n\n openFileSelector(): void {\n if (this.disabled) {\n return;\n }\n this.removeErrors();\n this.fileInput.nativeElement.click();\n }\n\n private errorCallback(attachment: Attachment, errorMessage: unknown): void {\n const error: AttachmentError =\n 'MALICIOUS_CONTENT_DETECTED' === errorMessage ? AttachmentError.MALWARE : AttachmentError.UNKNOWN;\n this.updateAttachmentDetails(attachment, { error, status: AttachmentStatus.ERROR });\n this.ctrlField.updateValueAndValidity();\n this.sentryLogger.warn('Failed to upload attachment:', { error: errorMessage });\n }\n\n private fileEquals(a: File, b: File): boolean {\n return a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;\n }\n\n private initValidators(): void {\n this.ctrlField.addValidators(attachmentStatusValidator());\n }\n\n private removeErrors(): void {\n this.attachmentsWithErrors.set([]);\n this.ctrlField.setErrors(null, { emitEvent: false });\n this.ctrlField.updateValueAndValidity();\n }\n\n private removeDuplicates(acc: Attachment[], attachment: Attachment): Attachment[] {\n return acc.some((a: Attachment): boolean => a.file.name === attachment.file.name) ? acc : acc.concat(attachment);\n }\n\n private setAttachments(newAttachments: Attachment[]): void {\n const newAttachmentsWithErrors: Attachment[] = newAttachments.filter(\n (a: Attachment): boolean => a.status === AttachmentStatus.ERROR\n );\n this.attachmentsWithErrors.update((existingAttachmentsWithErrors: Attachment[]): Attachment[] =>\n [...newAttachmentsWithErrors, ...existingAttachmentsWithErrors].reduce(this.removeDuplicates, [])\n );\n const newAttachmentsWithoutErrors: Attachment[] = [...newAttachments, ...this.attachments].filter(\n (a: Attachment): boolean => a.status !== AttachmentStatus.ERROR && a.status !== AttachmentStatus.UPLOADING\n );\n this.ctrlField.setValue(newAttachmentsWithoutErrors.reduce(this.removeDuplicates, []));\n this.cdr.markForCheck();\n }\n\n private updateAttachmentDetails(attachment: Attachment, details: Partial<Attachment>): void {\n if (!attachment) {\n return;\n }\n const updatedAttachments: Attachment[] = this.attachments.some((a: Attachment): boolean =>\n this.fileEquals(a.file, attachment.file)\n )\n ? this.attachments.map(\n (a: Attachment): Attachment => (this.fileEquals(a.file, attachment.file) ? { ...attachment, ...details } : a)\n )\n : [...this.attachments, { ...attachment, ...details }];\n this.setAttachments(updatedAttachments);\n }\n\n private uploadAttachment(attachment: Attachment): void {\n this.subscriptions.add(\n this.uploadService(attachment.file).subscribe({\n next: (response: AttachmentResponse): void => this.uploadCallback(attachment, response),\n error: (error: unknown): void => this.errorCallback(attachment, error),\n })\n );\n }\n\n private uploadAttachments(attachmentsToUpload: Attachment[]): void {\n if (!attachmentsToUpload.length) {\n return;\n }\n const updatedAttachments: Attachment[] = this.attachments.map(\n (attachment: Attachment): Attachment => ({\n ...attachment,\n status: attachment.status || AttachmentStatus.UPLOADING,\n })\n );\n this.ctrlField.setValue(updatedAttachments);\n for (const attachment of attachmentsToUpload) {\n this.uploadAttachment(attachment);\n }\n }\n\n private uploadCallback(attachment: Attachment, response: AttachmentResponse): void {\n const fileId = response?.attachmentId;\n if (fileId) {\n this.updateAttachmentDetails(attachment, { status: AttachmentStatus.READY, fileId });\n } else {\n this.updateAttachmentDetails(attachment, { status: AttachmentStatus.ERROR });\n }\n }\n\n private validateFile(file: File): Attachment {\n const attachment: Attachment = { file };\n const fileExtension: string = file.name.split('.').pop();\n if (this.attachments.map((a: Attachment): string => a.file.name).includes(file?.name)) {\n attachment.error = AttachmentError.DUPLICATE;\n attachment.status = AttachmentStatus.ERROR;\n }\n if (\n !this.allowedFileTypes.includes('*') &&\n !this.allowedFileTypes.map((type: string): string => type.toLowerCase()).includes(fileExtension.toLowerCase())\n ) {\n attachment.error = AttachmentError.EXTENSION;\n attachment.status = AttachmentStatus.ERROR;\n }\n if (file.size > this.maxSizeInBytes) {\n attachment.error = AttachmentError.MAX_SIZE;\n attachment.status = AttachmentStatus.ERROR;\n }\n return attachment;\n }\n\n private validateFiles(files: FileList): void {\n const totalLength: number = this.attachments.length + files.length;\n const exceedsMaxAttachments: boolean = totalLength > this.maxAttachments;\n if (exceedsMaxAttachments) {\n this.setAttachments(\n Array.from(files).map(\n (file: File): Attachment => ({ error: AttachmentError.MAX_ATTACHMENTS, file, status: AttachmentStatus.ERROR })\n )\n );\n } else {\n this.setAttachments(Array.from(files).map((file: File): Attachment => this.validateFile(file)));\n }\n }\n}\n","import { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\n\nimport { AttachmentError, AttachmentStatus, type Attachment } from '../../interfaces';\n\n/**\n * Validates attachment statuses based on files used with the `fcom-file-uploader` component.\n * @example Validation error:\n * ```ts\n * {\n * [AttachmentError.UPLOADING]: {\n * value: [{ error: AttachmentError.UPLOADING, file: 'file.pdf', status: AttachmentStatus.UPLOADING }]\n * }\n * }\n * ```\n * @returns `null` or :\n * - `uploading` validation error with an array of files not matching the extensions given.\n */\nexport const attachmentStatusValidator = (): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n if (!control.value) {\n return null;\n }\n const attachmentsStillUploading: Attachment[] = control.value\n .filter(Boolean)\n .filter((attachment: Attachment): boolean => attachment.status === AttachmentStatus.UPLOADING);\n const errors: ValidationErrors = {};\n if (attachmentsStillUploading.length) {\n errors[AttachmentError.UPLOADING] = { value: attachmentsStillUploading };\n }\n return Object.keys(errors).length ? errors : null;\n };\n};\n","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nexport { _asyncToGenerator as default };","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { Category } from '../api/models';\n\nexport const asServicePriceKey = (category: Category | string): string => {\n switch (category) {\n case Category.SEAT:\n return 'seats';\n case Category.MEAL:\n return 'meals';\n case Category.WIFI:\n return 'wifi';\n case Category.LOUNGE:\n return 'lounge';\n case Category.BAGGAGE:\n return 'baggage';\n case Category.COVER:\n return 'cover';\n default:\n return '';\n }\n};\n\nexport const asCartId = (category: Category | string): string => {\n switch (category) {\n case Category.MEAL:\n return 'meals';\n case Category.SEAT:\n return 'seats';\n default:\n return category;\n }\n};\n\nexport enum AdditionalCategories {\n TICKETS = 'tickets',\n TIER = 'tier',\n}\n\nconst categoryIcons: Record<AdditionalCategories[number] | Category[number], SvgLibraryIcon> = {\n [Category.SEAT]: SvgLibraryIcon.SEAT_OR_ECONOMY,\n [Category.BAGGAGE]: SvgLibraryIcon.CHECKED_IN_BAGGAGE,\n [Category.CABIN_BAGGAGE]: SvgLibraryIcon.CARRY_ON_BAG,\n [Category.MEAL]: SvgLibraryIcon.FOOD,\n [Category.WIFI]: SvgLibraryIcon.WIFI,\n [Category.LOUNGE]: SvgLibraryIcon.LOUNGE,\n [Category.COVER]: SvgLibraryIcon.INSURANCE,\n [Category.SAF]: SvgLibraryIcon.SAF,\n [Category.PET]: SvgLibraryIcon.PET,\n [Category.SPORT]: SvgLibraryIcon.BIKE,\n [Category.SPECIAL]: SvgLibraryIcon.EXTRA_CHECK_IN_BAGGAGE,\n [Category.FIREARM]: SvgLibraryIcon.FIRE_ARMS,\n [Category.MEDIC]: SvgLibraryIcon.MEDICAL_ASSISTANCE,\n [Category.SPECIAL_NEED]: SvgLibraryIcon.PERSON_SPECIAL_ASSIST,\n [Category.CHILD]: SvgLibraryIcon.CHILD,\n [Category.OTHER]: SvgLibraryIcon.INFO,\n [AdditionalCategories.TIER]: SvgLibraryIcon.FINNAIR_PLUS,\n [AdditionalCategories.TICKETS]: SvgLibraryIcon.FLIGHT_STATUS,\n};\n\nexport const getIconForServiceCategory = (category: Category | string): SvgLibraryIcon =>\n (categoryIcons[category] ?? categoryIcons.other) as SvgLibraryIcon;\n","import { isNotBlank } from '@fcom/core/utils';\n\nimport { FinnairPassengerCode, FinnairPassengerItem } from '../api/models';\n\nexport const asPaxTypeKey = (type: FinnairPassengerCode | string) => {\n switch (type) {\n case FinnairPassengerCode.ADT:\n return 'ADULT';\n case FinnairPassengerCode.CHD:\n return 'CHILD';\n case FinnairPassengerCode.C_15:\n return 'C15';\n case FinnairPassengerCode.INF:\n return 'INFANT';\n default:\n return 'ADULT';\n }\n};\n\nexport const asPaxSortId = (type: FinnairPassengerCode): number => {\n switch (type) {\n case FinnairPassengerCode.ADT:\n return 1;\n case FinnairPassengerCode.C_15:\n return 5;\n case FinnairPassengerCode.CHD:\n return 6;\n case FinnairPassengerCode.INF:\n return 7;\n default:\n return 1;\n }\n};\n\nexport const isAdult = (passenger: FinnairPassengerItem): boolean =>\n passenger.passengerTypeCode === FinnairPassengerCode.ADT;\n\nconst safeNumberString = (value: string): string => {\n return value && isNaN(Number(value)) ? '' : value;\n};\n\nexport const safePhonePrefix = (countryCodeParameter: string, areaCodeParameter: string): string => {\n const safeCountryCode = countryCodeParameter || '';\n const safeAreaCode = safeNumberString(areaCodeParameter);\n return isNotBlank(safeCountryCode) && isNotBlank(safeAreaCode) ? `${safeCountryCode}|${safeAreaCode}` : '';\n};\n","import { LatLng } from '@fcom/core';\n\nconst hashParametersFromUrl = (): Record<string, string> => {\n return window.location.hash\n .substring(1)\n .split(';')\n .map((keyVal) => keyVal.split('='))\n .reduce((obj, valuesArr) => {\n obj[valuesArr[0]] = valuesArr[1];\n return obj;\n }, {});\n};\n\nexport const parseGeolocationFromUrlHash = (): LatLng => {\n try {\n const params = hashParametersFromUrl();\n const lng = parseFloat(params.lng);\n const lat = parseFloat(params.lat);\n\n return !isNaN(lng) && !isNaN(lat) ? { lng, lat } : undefined;\n } catch (e) {\n return undefined;\n }\n};\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { ToggleSwitchStatus } from './interfaces';\n\n@Component({\n selector: 'fcom-toggle-switch',\n templateUrl: './toggle-switch.component.html',\n styleUrls: ['./toggle-switch.component.scss'],\n})\nexport class ToggleSwitchComponent {\n readonly ToggleSwitchStatus = ToggleSwitchStatus;\n\n /** Name of the toggle switch*/\n @Input()\n name: string;\n\n /** There are three different toggle switch status,the switch actions will also go with following follow\n * CHECKED-> ACTIVE -> UNCHECKED, UNCHECKED -> ACTIVE-> CHECKED\n * ACTIVE: clear button without grey overlay, it is always checked\n * CHECKED: button turns green with grey overlay\n * UNCHECKED: button turns grey\n */\n @Input()\n status: ToggleSwitchStatus;\n\n /** Disable the switch to do further actions*/\n @Input()\n disabled = false;\n\n @Input()\n labelledBy?: string;\n\n /** Emit the switch status*/\n @Output()\n statusChange: EventEmitter<{ name: string; status: ToggleSwitchStatus }> = new EventEmitter();\n\n handleStatusChange(event: Event, name: string, status: ToggleSwitchStatus): void {\n /* Stopping propagation is to stop div.switch element from firing another click event.\n * Note: even with this stopPropagation fix this component fires an event twice when interacted by clicking (keyboard interaction fires once).\n */\n event.stopPropagation();\n\n /*if the switch status is already CHECKED,\n preventDefault to make sure the button not directly turn from CHECKED TO UNCHECKED.*/\n if (status === ToggleSwitchStatus.CHECKED) {\n event.preventDefault();\n }\n\n if (!this.disabled) {\n this.statusChange.emit({ name, status });\n }\n }\n}\n","<div\n class=\"switch\"\n [class.selected]=\"status === ToggleSwitchStatus.CHECKED\"\n (click)=\"handleStatusChange($event, name, status)\"\n>\n <input\n type=\"checkbox\"\n [name]=\"name\"\n [checked]=\"status === ToggleSwitchStatus.ACTIVE || status === ToggleSwitchStatus.CHECKED\"\n (click)=\"handleStatusChange($event, name, status)\"\n [disabled]=\"disabled\"\n [attr.aria-labelledby]=\"labelledBy\"\n />\n <span [ngClass]=\"{ disabled: disabled }\" class=\"slider round\"></span>\n</div>\n","export enum AspectRatios {\n 'ORIGINAL' = 'original',\n '1x1' = 'portrait_ratio1x1',\n '3x4' = 'portrait_ratio3x4',\n '4x3' = 'landscape_ratio4x3',\n '16x9' = 'landscape_ratio16x9',\n '21x9' = 'landscape_ratio21x9',\n}\n\nexport enum FetchPriorityEnum {\n 'low' = 'low',\n 'high' = 'high',\n 'auto' = 'auto',\n}\n","export enum TabTheme {\n DEFAULT = 'default',\n CLASSIC = 'classic',\n CHIPS = 'chips',\n}\n\nexport enum TabLayoutType {\n DEFAULT = 'default',\n IN_MODAL = 'in-modal',\n STRETCH = 'stretch',\n HAS_BACKGROUND = 'has-background',\n}\n\nexport enum TabIconPosition {\n TOP = 'top',\n LEFT = 'left',\n}\n","import { Injectable } from '@angular/core';\n\nimport { Attributes, IntersectionObserverHooks } from 'ng-lazyload-image';\n\nimport { CmsImageData, StaticPicture } from '@fcom/core-api';\nimport { buildUrl } from '@fcom/core/utils';\nimport { THUMBNAIL_WIDTH } from '@fcom/ui-components';\n\nimport {\n ASPECT_RATIO_PROPERTY_MAP,\n AspectRatioString,\n CmsAspectRatio,\n FALLBACK_WIDTH,\n IMAGE_WIDTHS,\n ResponsiveImageData,\n SrcAndWidth,\n} from '../../interfaces';\n\nexport const isStaticPicture = (o: any): o is StaticPicture => !!o && (!!o.fullSizeUrl || !!o.thumbnailSrc);\nexport const isCmsImageData = (o: any): o is CmsImageData => !!o && !!o.responsiveImageLinksData;\n\nexport function toCmsAspectRatio(s: AspectRatioString): CmsAspectRatio {\n return ASPECT_RATIO_PROPERTY_MAP[s];\n}\n\nexport function mapToResponsiveImage(pic: CmsImageData | StaticPicture, aspect: CmsAspectRatio): ResponsiveImageData {\n if (isStaticPicture(pic)) {\n return {\n fallbackSrc: pic.fullSizeUrl,\n thumbnailSrc: pic.thumbnailSrc,\n srcSet: [],\n };\n }\n\n const images = pic.responsiveImageLinksData[aspect];\n const widestWidth = getWidestImageWidth(images);\n\n const srcSet = IMAGE_WIDTHS.map((width) => {\n return {\n width,\n src: buildUrl(images[widestWidth], { imwidth: width }),\n };\n });\n\n return {\n fallbackSrc: buildUrl(images[FALLBACK_WIDTH], { imwidth: FALLBACK_WIDTH }),\n thumbnailSrc: buildUrl(images[FALLBACK_WIDTH], { imwidth: THUMBNAIL_WIDTH }),\n srcSet,\n };\n}\n\nexport function getWidestImageWidth(imageWidthMap: object): number {\n return Object.keys(imageWidthMap)\n .map((key) => +key)\n .filter(Boolean)\n .reduce((widest: number, width: number): number => (widest <= width ? width : widest), 0);\n}\n\nexport function toSrcSetString(srcSet: SrcAndWidth[]): string {\n return srcSet.map(({ src, width }) => `${src} ${width}w`).join(', ');\n}\n\nfunction isImageElement(element: HTMLImageElement | HTMLDivElement): element is HTMLImageElement {\n return element.nodeName.toLowerCase() === 'img';\n}\n\nexport function getSrc(img: HTMLImageElement) {\n // Return the loaded src. Default loadImage returns the entire srcSet, which breaks setting the background-image url\n\n return typeof img.currentSrc !== 'undefined' ? img.currentSrc : img.src;\n}\n@Injectable()\nexport class LazyLoadImageHooks extends IntersectionObserverHooks {\n /**\n * Override loadImage function if div element and useSrcset so that a promise\n * to the loaded src is returned instead of a promise to the srcset string\n */\n loadImage(attributes: Attributes): Promise<string> {\n if (!isImageElement(attributes.element) && attributes.useSrcset) {\n const img = new Image();\n if ('srcset' in img && 'sizes' in img) {\n img.sizes = '100vw';\n img.srcset = attributes.imagePath;\n } else {\n (img as HTMLImageElement).src = attributes.imagePath;\n }\n\n if (attributes.decode && img.decode) {\n return img.decode().then(() => getSrc(img));\n }\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(getSrc(img));\n img.onerror = () => reject(null);\n });\n }\n return super.loadImage(attributes) as Promise<string>;\n }\n}\n","import { Type } from '@angular/core';\nimport { ActivatedRouteSnapshot, NavigationEnd, Event } from '@angular/router';\n\nexport const recurseLangParam = (route: ActivatedRouteSnapshot): string => {\n let r = route;\n while (r) {\n const lang = r.params['lang'];\n if (lang) {\n return lang;\n }\n r = r.parent;\n }\n return undefined;\n};\n\n/**\n * Checked if the router state event rendered a component\n */\nexport const isComponentRenderedByRouter = <T>(state: ActivatedRouteSnapshot, comp: Type<T>): boolean => {\n let route = state.firstChild;\n while (route) {\n if (route.component === comp || route?.data?.componentType === comp) {\n return true;\n }\n route = route.firstChild;\n }\n return false;\n};\n\nexport const isNavigationEvent = (event: Event): event is NavigationEnd => event instanceof NavigationEnd;\n","import { BoundFareFamily, MultiCityOffer } from '@fcom/common/interfaces/booking';\nimport { isNotBlank, sortBy } from '@fcom/core/utils';\nimport { LocationRouteCffData, RouteCffField } from '@fcom/core-api/index';\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { Cabin, FinnairCart, FinnairOrder } from '@fcom/dapi/api/models';\nimport { LocationUtil } from '@fcom/dapi/interfaces';\nimport { hasPartiallyUNBoundInBooking, isFlight } from '@fcom/common-booking/utils/common-booking.utils';\n\nconst travelClassToCffMap: { [key in GlobalBookingTravelClass]?: RouteCffField } = {\n [GlobalBookingTravelClass.ECONOMY]: 'cffEconomy',\n [GlobalBookingTravelClass.ECOPREMIUM]: 'cffPremiumEconomy',\n [GlobalBookingTravelClass.BUSINESS]: 'cffBusiness',\n [GlobalBookingTravelClass.MIXED]: 'cffMixed',\n};\n\nexport const getBookingDestinationSummary = (order: FinnairOrder | FinnairCart): LocationUtil[] => {\n return order.bounds.reduce<LocationUtil[]>((locations, bound) => {\n const disruptedItinerary = bound.disruptedBound?.disruptedBound?.itinerary;\n\n if (hasPartiallyUNBoundInBooking(order as FinnairOrder) && disruptedItinerary?.length > 0) {\n const disruptedFlights = disruptedItinerary.filter(isFlight);\n\n if (disruptedFlights.length > 1) {\n return [\n ...locations,\n {\n code: disruptedFlights[0].departure.locationCode,\n name: getCityName(disruptedFlights[0].departure.locationCode, order.locations),\n },\n {\n code: disruptedFlights[disruptedFlights.length - 1].arrival.locationCode,\n name: getCityName(disruptedFlights[disruptedFlights.length - 1].arrival.locationCode, order.locations),\n },\n ];\n }\n }\n\n return [\n ...locations,\n {\n code: bound.departure.locationCode,\n name: getCityName(bound.departure.locationCode, order.locations),\n },\n {\n code: bound.arrival.locationCode,\n name: getCityName(bound.arrival.locationCode, order.locations),\n },\n ];\n }, []);\n};\n\nexport const getCityName = (locationCode: string, locations: FinnairOrder['locations']): string => {\n const location = locations[locationCode];\n\n if (location?.cityName) {\n return location.cityName;\n }\n\n if (location && locations[location.cityCode]) {\n return locations[location.cityCode].cityName;\n }\n\n return '';\n};\n\n/**\n * Sorts the given array of FinnairBoundGroupWithLocation based on the lowest fare family price.\n *\n * @param results The array of FinnairBoundGroupWithLocation to sort.\n * @returns The sorted array of FinnairBoundGroupWithLocation.\n */\nexport const sortByPrice = <T extends { fareFamilies?: { price: string }[] }>(results: T[]): T[] => {\n return sortBy(\n results.filter((result) => result.fareFamilies && result.fareFamilies.length !== 0),\n (el) => {\n return el.fareFamilies\n .map((ff) => ff.price)\n .reduce<number>((min, price) => {\n const numericPrice = parseInt(price, 10);\n return !min || numericPrice < min ? numericPrice : min;\n }, null);\n }\n );\n};\n\nconst travelClassAvailableForRoute = (\n travelClass: GlobalBookingTravelClass,\n routeCffData: LocationRouteCffData\n): boolean => {\n const cffkey = travelClassToCffMap[travelClass];\n return isNotBlank(routeCffData?.[cffkey]);\n};\n\nexport const mapCffsToTravelClasses = (routeCffData: LocationRouteCffData): GlobalBookingTravelClass[] =>\n Object.values(GlobalBookingTravelClass).filter((travelClass) =>\n travelClassAvailableForRoute(travelClass, routeCffData)\n );\n\nexport const mapLocationRouteCffDataToCabin = (obj: LocationRouteCffData): Cabin[] => {\n const keys = ['cffMixed', 'cffEconomy', 'cffPremiumEconomy', 'cffBusiness', 'cffFirst'];\n\n // Define a mapping object for category strings to Cabin values\n const categoryToCabin: { [key: string]: Cabin } = {\n MIXED: Cabin.MIXED,\n ECONOMY: Cabin.ECONOMY,\n PREMIUMECONOMY: Cabin.ECOPREMIUM,\n BUSINESS: Cabin.BUSINESS,\n FIRST: Cabin.FIRST,\n };\n\n return keys.reduce((result: Cabin[], key: string) => {\n if (Object.prototype.hasOwnProperty.call(obj, key) && key.startsWith('cff') && obj[key]) {\n const category = (key.replace('cff', '').charAt(0).toUpperCase() + key.slice(4)).toUpperCase();\n const cabin = categoryToCabin[category];\n if (cabin) {\n result.push(cabin);\n }\n }\n return result;\n }, []);\n};\n\nexport const getFareFamiliesLowestPriceOrPoints = (\n fareFamilies: BoundFareFamily[],\n isAward: boolean\n): number | null | undefined => {\n return fareFamilies?.reduce<number>((min, ff) => {\n const numericPrice = isAward ? parseInt(ff.points) : parseFloat(ff.price);\n return !min || numericPrice < min ? numericPrice : min;\n }, null);\n};\n\nexport const findCheapestMultiCityOffer = (offers: MultiCityOffer[]): { price: string; offer: MultiCityOffer } => {\n const initialCheapestPrice = offers[0].offerItems[0].totalPrice;\n\n return offers.reduce(\n (match, offer) => {\n const price = Number(offer.offerItems[0].totalPrice);\n\n return price < Number(match.price) ? { price: String(price), offer } : match;\n },\n { price: initialCheapestPrice, offer: offers[0] }\n );\n};\n","import { Observable } from '../Observable';\nimport { ObservableInput, ObservableInputTuple, SchedulerLike } from '../types';\nimport { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\n\nexport function merge<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A[number]>;\nexport function merge<A extends readonly unknown[]>(...sourcesAndConcurrency: [...ObservableInputTuple<A>, number?]): Observable<A[number]>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function merge<A extends readonly unknown[]>(\n ...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike?]\n): Observable<A[number]>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function merge<A extends readonly unknown[]>(\n ...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple<A>, number?, SchedulerLike?]\n): Observable<A[number]>;\n\n/**\n * Creates an output Observable which concurrently emits all values from every\n * given input Observable.\n *\n * <span class=\"informal\">Flattens multiple Observables together by blending\n * their values into one Observable.</span>\n *\n * ![](merge.png)\n *\n * `merge` subscribes to each given input Observable (as arguments), and simply\n * forwards (without doing any transformation) all the values from all the input\n * Observables to the output Observable. The output Observable only completes\n * once all input Observables have completed. Any error delivered by an input\n * Observable will be immediately emitted on the output Observable.\n *\n * ## Examples\n *\n * Merge together two Observables: 1s interval and clicks\n *\n * ```ts\n * import { merge, fromEvent, interval } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const timer = interval(1000);\n * const clicksOrTimer = merge(clicks, timer);\n * clicksOrTimer.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // timer will emit ascending values, one every second(1000ms) to console\n * // clicks logs MouseEvents to console every time the \"document\" is clicked\n * // Since the two streams are merged you see these happening\n * // as they occur.\n * ```\n *\n * Merge together 3 Observables, but run only 2 concurrently\n *\n * ```ts\n * import { interval, take, merge } from 'rxjs';\n *\n * const timer1 = interval(1000).pipe(take(10));\n * const timer2 = interval(2000).pipe(take(6));\n * const timer3 = interval(500).pipe(take(10));\n *\n * const concurrent = 2; // the argument\n * const merged = merge(timer1, timer2, timer3, concurrent);\n * merged.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // - First timer1 and timer2 will run concurrently\n * // - timer1 will emit a value every 1000ms for 10 iterations\n * // - timer2 will emit a value every 2000ms for 6 iterations\n * // - after timer1 hits its max iteration, timer2 will\n * // continue, and timer3 will start to run concurrently with timer2\n * // - when timer2 hits its max iteration it terminates, and\n * // timer3 will continue to emit a value every 500ms until it is complete\n * ```\n *\n * @see {@link mergeAll}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n *\n * @param args `ObservableInput`s to merge together. If the last parameter\n * is of type number, `merge` will use it to limit number of concurrently\n * subscribed `ObservableInput`s. If the last parameter is {@link SchedulerLike},\n * it will be used for scheduling the emission of values.\n * @return An Observable that emits items that are the result of every input Observable.\n */\nexport function merge(...args: (ObservableInput<unknown> | number | SchedulerLike)[]): Observable<unknown> {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args as ObservableInput<unknown>[];\n return !sources.length\n ? // No source provided\n EMPTY\n : sources.length === 1\n ? // One source? Just return it.\n innerFrom(sources[0])\n : // Merge all sources\n mergeAll(concurrent)(from(sources, scheduler));\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\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.dev/license\n */\n\n/**\n * A comparison function which can determine if two values are equal.\n */\nexport type ValueEqualityFn<T> = (a: T, b: T) => boolean;\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nexport function defaultEquals<T>(a: T, b: T) {\n return Object.is(a, b);\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.dev/license\n */\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer: ReactiveNode | null = null;\nlet inNotificationPhase = false;\n\ntype Version = number & {__brand: 'Version'};\n\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch: Version = 1 as Version;\n\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nexport const SIGNAL = /* @__PURE__ */ Symbol('SIGNAL');\n\nexport function setActiveConsumer(consumer: ReactiveNode | null): ReactiveNode | null {\n const prev = activeConsumer;\n activeConsumer = consumer;\n return prev;\n}\n\nexport function getActiveConsumer(): ReactiveNode | null {\n return activeConsumer;\n}\n\nexport function isInNotificationPhase(): boolean {\n return inNotificationPhase;\n}\n\nexport interface Reactive {\n [SIGNAL]: ReactiveNode;\n}\n\nexport function isReactive(value: unknown): value is Reactive {\n return (value as Partial<Reactive>)[SIGNAL] !== undefined;\n}\n\nexport const REACTIVE_NODE: ReactiveNode = {\n version: 0 as Version,\n lastCleanEpoch: 0 as Version,\n dirty: false,\n producerNode: undefined,\n producerLastReadVersion: undefined,\n producerIndexOfThis: undefined,\n nextProducerIndex: 0,\n liveConsumerNode: undefined,\n liveConsumerIndexOfThis: undefined,\n consumerAllowSignalWrites: false,\n consumerIsAlwaysLive: false,\n producerMustRecompute: () => false,\n producerRecomputeValue: () => {},\n consumerMarkedDirty: () => {},\n consumerOnSignalRead: () => {},\n};\n\n/**\n * A producer and/or consumer which participates in the reactive graph.\n *\n * Producer `ReactiveNode`s which are accessed when a consumer `ReactiveNode` is the\n * `activeConsumer` are tracked as dependencies of that consumer.\n *\n * Certain consumers are also tracked as \"live\" consumers and create edges in the other direction,\n * from producer to consumer. These edges are used to propagate change notifications when a\n * producer's value is updated.\n *\n * A `ReactiveNode` may be both a producer and consumer.\n */\nexport interface ReactiveNode {\n /**\n * Version of the value that this node produces.\n *\n * This is incremented whenever a new value is produced by this node which is not equal to the\n * previous value (by whatever definition of equality is in use).\n */\n version: Version;\n\n /**\n * Epoch at which this node is verified to be clean.\n *\n * This allows skipping of some polling operations in the case where no signals have been set\n * since this node was last read.\n */\n lastCleanEpoch: Version;\n\n /**\n * Whether this node (in its consumer capacity) is dirty.\n *\n * Only live consumers become dirty, when receiving a change notification from a dependency\n * producer.\n */\n dirty: boolean;\n\n /**\n * Producers which are dependencies of this consumer.\n *\n * Uses the same indices as the `producerLastReadVersion` and `producerIndexOfThis` arrays.\n */\n producerNode: ReactiveNode[] | undefined;\n\n /**\n * `Version` of the value last read by a given producer.\n *\n * Uses the same indices as the `producerNode` and `producerIndexOfThis` arrays.\n */\n producerLastReadVersion: Version[] | undefined;\n\n /**\n * Index of `this` (consumer) in each producer's `liveConsumers` array.\n *\n * This value is only meaningful if this node is live (`liveConsumers.length > 0`). Otherwise\n * these indices are stale.\n *\n * Uses the same indices as the `producerNode` and `producerLastReadVersion` arrays.\n */\n producerIndexOfThis: number[] | undefined;\n\n /**\n * Index into the producer arrays that the next dependency of this node as a consumer will use.\n *\n * This index is zeroed before this node as a consumer begins executing. When a producer is read,\n * it gets inserted into the producers arrays at this index. There may be an existing dependency\n * in this location which may or may not match the incoming producer, depending on whether the\n * same producers were read in the same order as the last computation.\n */\n nextProducerIndex: number;\n\n /**\n * Array of consumers of this producer that are \"live\" (they require push notifications).\n *\n * `liveConsumerNode.length` is effectively our reference count for this node.\n */\n liveConsumerNode: ReactiveNode[] | undefined;\n\n /**\n * Index of `this` (producer) in each consumer's `producerNode` array.\n *\n * Uses the same indices as the `liveConsumerNode` array.\n */\n liveConsumerIndexOfThis: number[] | undefined;\n\n /**\n * Whether writes to signals are allowed when this consumer is the `activeConsumer`.\n *\n * This is used to enforce guardrails such as preventing writes to writable signals in the\n * computation function of computed signals, which is supposed to be pure.\n */\n consumerAllowSignalWrites: boolean;\n\n readonly consumerIsAlwaysLive: boolean;\n\n /**\n * Tracks whether producers need to recompute their value independently of the reactive graph (for\n * example, if no initial value has been computed).\n */\n producerMustRecompute(node: unknown): boolean;\n producerRecomputeValue(node: unknown): void;\n consumerMarkedDirty(node: unknown): void;\n\n /**\n * Called when a signal is read within this consumer.\n */\n consumerOnSignalRead(node: unknown): void;\n}\n\ninterface ConsumerNode extends ReactiveNode {\n producerNode: NonNullable<ReactiveNode['producerNode']>;\n producerIndexOfThis: NonNullable<ReactiveNode['producerIndexOfThis']>;\n producerLastReadVersion: NonNullable<ReactiveNode['producerLastReadVersion']>;\n}\n\ninterface ProducerNode extends ReactiveNode {\n liveConsumerNode: NonNullable<ReactiveNode['liveConsumerNode']>;\n liveConsumerIndexOfThis: NonNullable<ReactiveNode['liveConsumerIndexOfThis']>;\n}\n\n/**\n * Called by implementations when a producer's signal is read.\n */\nexport function producerAccessed(node: ReactiveNode): void {\n if (inNotificationPhase) {\n throw new Error(\n typeof ngDevMode !== 'undefined' && ngDevMode\n ? `Assertion error: signal read during notification phase`\n : '',\n );\n }\n\n if (activeConsumer === null) {\n // Accessed outside of a reactive context, so nothing to record.\n return;\n }\n\n activeConsumer.consumerOnSignalRead(node);\n\n // This producer is the `idx`th dependency of `activeConsumer`.\n const idx = activeConsumer.nextProducerIndex++;\n\n assertConsumerNode(activeConsumer);\n\n if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {\n // There's been a change in producers since the last execution of `activeConsumer`.\n // `activeConsumer.producerNode[idx]` holds a stale dependency which will be be removed and\n // replaced with `this`.\n //\n // If `activeConsumer` isn't live, then this is a no-op, since we can replace the producer in\n // `activeConsumer.producerNode` directly. However, if `activeConsumer` is live, then we need\n // to remove it from the stale producer's `liveConsumer`s.\n if (consumerIsLive(activeConsumer)) {\n const staleProducer = activeConsumer.producerNode[idx];\n producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);\n\n // At this point, the only record of `staleProducer` is the reference at\n // `activeConsumer.producerNode[idx]` which will be overwritten below.\n }\n }\n\n if (activeConsumer.producerNode[idx] !== node) {\n // We're a new dependency of the consumer (at `idx`).\n activeConsumer.producerNode[idx] = node;\n\n // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a\n // placeholder value.\n activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer)\n ? producerAddLiveConsumer(node, activeConsumer, idx)\n : 0;\n }\n activeConsumer.producerLastReadVersion[idx] = node.version;\n}\n\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nexport function producerIncrementEpoch(): void {\n epoch++;\n}\n\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nexport function producerUpdateValueVersion(node: ReactiveNode): void {\n if (consumerIsLive(node) && !node.dirty) {\n // A live consumer will be marked dirty by producers, so a clean state means that its version\n // is guaranteed to be up-to-date.\n return;\n }\n\n if (!node.dirty && node.lastCleanEpoch === epoch) {\n // Even non-live consumers can skip polling if they previously found themselves to be clean at\n // the current epoch, since their dependencies could not possibly have changed (such a change\n // would've increased the epoch).\n return;\n }\n\n if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n // None of our producers report a change since the last time they were read, so no\n // recomputation of our value is necessary, and we can consider ourselves clean.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n return;\n }\n\n node.producerRecomputeValue(node);\n\n // After recomputing the value, we're no longer dirty.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n}\n\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nexport function producerNotifyConsumers(node: ReactiveNode): void {\n if (node.liveConsumerNode === undefined) {\n return;\n }\n\n // Prevent signal reads when we're updating the graph\n const prev = inNotificationPhase;\n inNotificationPhase = true;\n try {\n for (const consumer of node.liveConsumerNode) {\n if (!consumer.dirty) {\n consumerMarkDirty(consumer);\n }\n }\n } finally {\n inNotificationPhase = prev;\n }\n}\n\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nexport function producerUpdatesAllowed(): boolean {\n return activeConsumer?.consumerAllowSignalWrites !== false;\n}\n\nexport function consumerMarkDirty(node: ReactiveNode): void {\n node.dirty = true;\n producerNotifyConsumers(node);\n node.consumerMarkedDirty?.(node);\n}\n\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nexport function consumerBeforeComputation(node: ReactiveNode | null): ReactiveNode | null {\n node && (node.nextProducerIndex = 0);\n return setActiveConsumer(node);\n}\n\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nexport function consumerAfterComputation(\n node: ReactiveNode | null,\n prevConsumer: ReactiveNode | null,\n): void {\n setActiveConsumer(prevConsumer);\n\n if (\n !node ||\n node.producerNode === undefined ||\n node.producerIndexOfThis === undefined ||\n node.producerLastReadVersion === undefined\n ) {\n return;\n }\n\n if (consumerIsLive(node)) {\n // For live consumers, we need to remove the producer -> consumer edge for any stale producers\n // which weren't dependencies after the recomputation.\n for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n\n // Truncate the producer tracking arrays.\n // Perf note: this is essentially truncating the length to `node.nextProducerIndex`, but\n // benchmarking has shown that individual pop operations are faster.\n while (node.producerNode.length > node.nextProducerIndex) {\n node.producerNode.pop();\n node.producerLastReadVersion.pop();\n node.producerIndexOfThis.pop();\n }\n}\n\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nexport function consumerPollProducersForChange(node: ReactiveNode): boolean {\n assertConsumerNode(node);\n\n // Poll producers for change.\n for (let i = 0; i < node.producerNode.length; i++) {\n const producer = node.producerNode[i];\n const seenVersion = node.producerLastReadVersion[i];\n\n // First check the versions. A mismatch means that the producer's value is known to have\n // changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n\n // The producer's version is the same as the last time we read it, but it might itself be\n // stale. Force the producer to recompute its version (calculating a new value if necessary).\n producerUpdateValueVersion(producer);\n\n // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n // versions still match then it has not changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Disconnect this consumer from the graph.\n */\nexport function consumerDestroy(node: ReactiveNode): void {\n assertConsumerNode(node);\n if (consumerIsLive(node)) {\n // Drop all connections from the graph to this node.\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n\n // Truncate all the arrays to drop all connection from this node to the graph.\n node.producerNode.length =\n node.producerLastReadVersion.length =\n node.producerIndexOfThis.length =\n 0;\n if (node.liveConsumerNode) {\n node.liveConsumerNode.length = node.liveConsumerIndexOfThis!.length = 0;\n }\n}\n\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(\n node: ReactiveNode,\n consumer: ReactiveNode,\n indexOfThis: number,\n): number {\n assertProducerNode(node);\n if (node.liveConsumerNode.length === 0 && isConsumerNode(node)) {\n // When going from 0 to 1 live consumers, we become a live consumer to our producers.\n for (let i = 0; i < node.producerNode.length; i++) {\n node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i);\n }\n }\n node.liveConsumerIndexOfThis.push(indexOfThis);\n return node.liveConsumerNode.push(consumer) - 1;\n}\n\n/**\n * Remove the live consumer at `idx`.\n */\nfunction producerRemoveLiveConsumerAtIndex(node: ReactiveNode, idx: number): void {\n assertProducerNode(node);\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode && idx >= node.liveConsumerNode.length) {\n throw new Error(\n `Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`,\n );\n }\n\n if (node.liveConsumerNode.length === 1 && isConsumerNode(node)) {\n // When removing the last live consumer, we will no longer be live. We need to remove\n // ourselves from our producers' tracking (which may cause consumer-producers to lose\n // liveness as well).\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n\n // Move the last value of `liveConsumers` into `idx`. Note that if there's only a single\n // live consumer, this is a no-op.\n const lastIdx = node.liveConsumerNode.length - 1;\n node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];\n node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];\n\n // Truncate the array.\n node.liveConsumerNode.length--;\n node.liveConsumerIndexOfThis.length--;\n\n // If the index is still valid, then we need to fix the index pointer from the producer to this\n // consumer, and update it from `lastIdx` to `idx` (accounting for the move above).\n if (idx < node.liveConsumerNode.length) {\n const idxProducer = node.liveConsumerIndexOfThis[idx];\n const consumer = node.liveConsumerNode[idx];\n assertConsumerNode(consumer);\n consumer.producerIndexOfThis[idxProducer] = idx;\n }\n}\n\nfunction consumerIsLive(node: ReactiveNode): boolean {\n return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0;\n}\n\nfunction assertConsumerNode(node: ReactiveNode): asserts node is ConsumerNode {\n node.producerNode ??= [];\n node.producerIndexOfThis ??= [];\n node.producerLastReadVersion ??= [];\n}\n\nfunction assertProducerNode(node: ReactiveNode): asserts node is ProducerNode {\n node.liveConsumerNode ??= [];\n node.liveConsumerIndexOfThis ??= [];\n}\n\nfunction isConsumerNode(node: ReactiveNode): node is ConsumerNode {\n return node.producerNode !== undefined;\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.dev/license\n */\n\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n producerAccessed,\n producerUpdateValueVersion,\n REACTIVE_NODE,\n ReactiveNode,\n SIGNAL,\n} from './graph';\n\n/**\n * A computation, which derives a value from a declarative reactive expression.\n *\n * `Computed`s are both producers and consumers of reactivity.\n */\nexport interface ComputedNode<T> extends ReactiveNode {\n /**\n * Current value of the computation, or one of the sentinel values above (`UNSET`, `COMPUTING`,\n * `ERROR`).\n */\n value: T;\n\n /**\n * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n * be re-thrown.\n */\n error: unknown;\n\n /**\n * The computation function which will produce a new value.\n */\n computation: () => T;\n\n equal: ValueEqualityFn<T>;\n}\n\nexport type ComputedGetter<T> = (() => T) & {\n [SIGNAL]: ComputedNode<T>;\n};\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nexport function createComputed<T>(computation: () => T): ComputedGetter<T> {\n const node: ComputedNode<T> = Object.create(COMPUTED_NODE);\n node.computation = computation;\n\n const computed = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === ERRORED) {\n throw node.error;\n }\n\n return node.value;\n };\n (computed as ComputedGetter<T>)[SIGNAL] = node;\n return computed as unknown as ComputedGetter<T>;\n}\n\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET: any = /* @__PURE__ */ Symbol('UNSET');\n\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING: any = /* @__PURE__ */ Symbol('COMPUTING');\n\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED: any = /* @__PURE__ */ Symbol('ERRORED');\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n\n producerMustRecompute(node: ComputedNode<unknown>): boolean {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n\n producerRecomputeValue(node: ComputedNode<unknown>): void {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error('Detected cycle in computations.');\n }\n\n const oldValue = node.value;\n node.value = COMPUTING;\n\n const prevConsumer = consumerBeforeComputation(node);\n let newValue: unknown;\n try {\n newValue = node.computation();\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n\n if (\n oldValue !== UNSET &&\n oldValue !== ERRORED &&\n newValue !== ERRORED &&\n node.equal(oldValue, newValue)\n ) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n\n node.value = newValue;\n node.version++;\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.dev/license\n */\n\nfunction defaultThrowError(): never {\n throw new Error();\n}\n\nlet throwInvalidWriteToSignalErrorFn = defaultThrowError;\n\nexport function throwInvalidWriteToSignalError() {\n throwInvalidWriteToSignalErrorFn();\n}\n\nexport function setThrowInvalidWriteToSignalError(fn: () => never): void {\n throwInvalidWriteToSignalErrorFn = fn;\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.dev/license\n */\n\nimport {defaultEquals, ValueEqualityFn} from './equality';\nimport {throwInvalidWriteToSignalError} from './errors';\nimport {\n producerAccessed,\n producerIncrementEpoch,\n producerNotifyConsumers,\n producerUpdatesAllowed,\n REACTIVE_NODE,\n ReactiveNode,\n SIGNAL,\n} from './graph';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn: (() => void) | null = null;\n\nexport interface SignalNode<T> extends ReactiveNode {\n value: T;\n equal: ValueEqualityFn<T>;\n}\n\nexport type SignalBaseGetter<T> = (() => T) & {readonly [SIGNAL]: unknown};\n\n// Note: Closure *requires* this to be an `interface` and not a type, which is why the\n// `SignalBaseGetter` type exists to provide the correct shape.\nexport interface SignalGetter<T> extends SignalBaseGetter<T> {\n readonly [SIGNAL]: SignalNode<T>;\n}\n\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nexport function createSignal<T>(initialValue: T): SignalGetter<T> {\n const node: SignalNode<T> = Object.create(SIGNAL_NODE);\n node.value = initialValue;\n const getter = (() => {\n producerAccessed(node);\n return node.value;\n }) as SignalGetter<T>;\n (getter as any)[SIGNAL] = node;\n return getter;\n}\n\nexport function setPostSignalSetFn(fn: (() => void) | null): (() => void) | null {\n const prev = postSignalSetFn;\n postSignalSetFn = fn;\n return prev;\n}\n\nexport function signalGetFn<T>(this: SignalNode<T>): T {\n producerAccessed(this);\n return this.value;\n}\n\nexport function signalSetFn<T>(node: SignalNode<T>, newValue: T) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n\n if (!node.equal(node.value, newValue)) {\n node.value = newValue;\n signalValueChanged(node);\n }\n}\n\nexport function signalUpdateFn<T>(node: SignalNode<T>, updater: (value: T) => T): void {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n\n signalSetFn(node, updater(node.value));\n}\n\nexport function runPostSignalSetFn(): void {\n postSignalSetFn?.();\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const SIGNAL_NODE: SignalNode<unknown> = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n equal: defaultEquals,\n value: undefined,\n };\n})();\n\nfunction signalValueChanged<T>(node: SignalNode<T>): void {\n node.version++;\n producerIncrementEpoch();\n producerNotifyConsumers(node);\n postSignalSetFn?.();\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.dev/license\n */\n\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerDestroy,\n consumerMarkDirty,\n consumerPollProducersForChange,\n isInNotificationPhase,\n REACTIVE_NODE,\n ReactiveNode,\n SIGNAL,\n} from './graph';\n\n/**\n * A cleanup function that can be optionally registered from the watch logic. If registered, the\n * cleanup logic runs before the next watch execution.\n */\nexport type WatchCleanupFn = () => void;\n\n/**\n * A callback passed to the watch function that makes it possible to register cleanup logic.\n */\nexport type WatchCleanupRegisterFn = (cleanupFn: WatchCleanupFn) => void;\n\nexport interface Watch {\n notify(): void;\n\n /**\n * Execute the reactive expression in the context of this `Watch` consumer.\n *\n * Should be called by the user scheduling algorithm when the provided\n * `schedule` hook is called by `Watch`.\n */\n run(): void;\n\n cleanup(): void;\n\n /**\n * Destroy the watcher:\n * - disconnect it from the reactive graph;\n * - mark it as destroyed so subsequent run and notify operations are noop.\n */\n destroy(): void;\n\n [SIGNAL]: WatchNode;\n}\nexport interface WatchNode extends ReactiveNode {\n hasRun: boolean;\n fn: ((onCleanup: WatchCleanupRegisterFn) => void) | null;\n schedule: ((watch: Watch) => void) | null;\n cleanupFn: WatchCleanupFn;\n ref: Watch;\n}\n\nexport function createWatch(\n fn: (onCleanup: WatchCleanupRegisterFn) => void,\n schedule: (watch: Watch) => void,\n allowSignalWrites: boolean,\n): Watch {\n const node: WatchNode = Object.create(WATCH_NODE);\n if (allowSignalWrites) {\n node.consumerAllowSignalWrites = true;\n }\n\n node.fn = fn;\n node.schedule = schedule;\n\n const registerOnCleanup = (cleanupFn: WatchCleanupFn) => {\n node.cleanupFn = cleanupFn;\n };\n\n function isWatchNodeDestroyed(node: WatchNode) {\n return node.fn === null && node.schedule === null;\n }\n\n function destroyWatchNode(node: WatchNode) {\n if (!isWatchNodeDestroyed(node)) {\n consumerDestroy(node); // disconnect watcher from the reactive graph\n node.cleanupFn();\n\n // nullify references to the integration functions to mark node as destroyed\n node.fn = null;\n node.schedule = null;\n node.cleanupFn = NOOP_CLEANUP_FN;\n }\n }\n\n const run = () => {\n if (node.fn === null) {\n // trying to run a destroyed watch is noop\n return;\n }\n\n if (isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n }\n\n node.dirty = false;\n if (node.hasRun && !consumerPollProducersForChange(node)) {\n return;\n }\n node.hasRun = true;\n\n const prevConsumer = consumerBeforeComputation(node);\n try {\n node.cleanupFn();\n node.cleanupFn = NOOP_CLEANUP_FN;\n node.fn(registerOnCleanup);\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n };\n\n node.ref = {\n notify: () => consumerMarkDirty(node),\n run,\n cleanup: () => node.cleanupFn(),\n destroy: () => destroyWatchNode(node),\n [SIGNAL]: node,\n };\n\n return node.ref;\n}\n\nconst NOOP_CLEANUP_FN: WatchCleanupFn = () => {};\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE: Partial<WatchNode> = /* @__PURE__ */ (() => {\n return {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: false,\n consumerMarkedDirty: (node: WatchNode) => {\n if (node.schedule !== null) {\n node.schedule(node.ref);\n }\n },\n hasRun: false,\n cleanupFn: NOOP_CLEANUP_FN,\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.dev/license\n */\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nexport const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.dev/errors';\n\n/**\n * URL for the XSS security documentation.\n */\nexport const XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\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.dev/license\n */\n\nimport {ERROR_DETAILS_PAGE_BASE_URL} from './error_details_base_url';\n\n/**\n * The list of error codes used in runtime code of the `core` package.\n * Reserved error code range: 100-999.\n *\n * Note: the minus sign denotes the fact that a particular code has a detailed guide on\n * angular.io. This extra annotation is needed to avoid introducing a separate set to store\n * error codes which have guides, which might leak into runtime code.\n *\n * Full list of available error guides can be found at https://angular.dev/errors.\n *\n * Error code ranges per package:\n * - core (this package): 100-999\n * - forms: 1000-1999\n * - common: 2000-2999\n * - animations: 3000-3999\n * - router: 4000-4999\n * - platform-browser: 5000-5500\n */\nexport const enum RuntimeErrorCode {\n // Change Detection Errors\n EXPRESSION_CHANGED_AFTER_CHECKED = -100,\n RECURSIVE_APPLICATION_REF_TICK = 101,\n INFINITE_CHANGE_DETECTION = 103,\n\n // Dependency Injection Errors\n CYCLIC_DI_DEPENDENCY = -200,\n PROVIDER_NOT_FOUND = -201,\n INVALID_FACTORY_DEPENDENCY = 202,\n MISSING_INJECTION_CONTEXT = -203,\n INVALID_INJECTION_TOKEN = 204,\n INJECTOR_ALREADY_DESTROYED = 205,\n PROVIDER_IN_WRONG_CONTEXT = 207,\n MISSING_INJECTION_TOKEN = 208,\n INVALID_MULTI_PROVIDER = -209,\n MISSING_DOCUMENT = 210,\n\n // Template Errors\n MULTIPLE_COMPONENTS_MATCH = -300,\n EXPORT_NOT_FOUND = -301,\n PIPE_NOT_FOUND = -302,\n UNKNOWN_BINDING = 303,\n UNKNOWN_ELEMENT = 304,\n TEMPLATE_STRUCTURE_ERROR = 305,\n INVALID_EVENT_BINDING = 306,\n HOST_DIRECTIVE_UNRESOLVABLE = 307,\n HOST_DIRECTIVE_NOT_STANDALONE = 308,\n DUPLICATE_DIRECTIVE = 309,\n HOST_DIRECTIVE_COMPONENT = 310,\n HOST_DIRECTIVE_UNDEFINED_BINDING = 311,\n HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,\n MULTIPLE_MATCHING_PIPES = 313,\n UNINITIALIZED_LET_ACCESS = 314,\n\n // Bootstrap Errors\n MULTIPLE_PLATFORMS = 400,\n PLATFORM_NOT_FOUND = 401,\n MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,\n BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,\n PLATFORM_ALREADY_DESTROYED = 404,\n ASYNC_INITIALIZERS_STILL_RUNNING = 405,\n APPLICATION_REF_ALREADY_DESTROYED = 406,\n RENDERER_NOT_FOUND = 407,\n PROVIDED_BOTH_ZONE_AND_ZONELESS = 408,\n\n // Hydration Errors\n HYDRATION_NODE_MISMATCH = -500,\n HYDRATION_MISSING_SIBLINGS = -501,\n HYDRATION_MISSING_NODE = -502,\n UNSUPPORTED_PROJECTION_DOM_NODES = -503,\n INVALID_SKIP_HYDRATION_HOST = -504,\n MISSING_HYDRATION_ANNOTATIONS = -505,\n HYDRATION_STABLE_TIMEDOUT = -506,\n MISSING_SSR_CONTENT_INTEGRITY_MARKER = -507,\n\n // Signal Errors\n SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,\n REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,\n ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT = -602,\n\n // Styling Errors\n\n // Declarations Errors\n\n // i18n Errors\n INVALID_I18N_STRUCTURE = 700,\n MISSING_LOCALE_DATA = 701,\n\n // Defer errors (750-799 range)\n DEFER_LOADING_FAILED = 750,\n\n // standalone errors\n IMPORT_PROVIDERS_FROM_STANDALONE = 800,\n\n // JIT Compilation Errors\n // Other\n INVALID_DIFFER_INPUT = 900,\n NO_SUPPORTING_DIFFER_FACTORY = 901,\n VIEW_ALREADY_ATTACHED = 902,\n INVALID_INHERITANCE = 903,\n UNSAFE_VALUE_IN_RESOURCE_URL = 904,\n UNSAFE_VALUE_IN_SCRIPT = 905,\n MISSING_GENERATED_DEF = 906,\n TYPE_IS_NOT_STANDALONE = 907,\n MISSING_ZONEJS = 908,\n UNEXPECTED_ZONE_STATE = 909,\n UNSAFE_IFRAME_ATTRS = -910,\n VIEW_ALREADY_DESTROYED = 911,\n COMPONENT_ID_COLLISION = -912,\n IMAGE_PERFORMANCE_WARNING = -913,\n UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE = 914,\n\n // Signal integration errors\n REQUIRED_INPUT_NO_VALUE = -950,\n REQUIRED_QUERY_NO_VALUE = -951,\n REQUIRED_MODEL_NO_VALUE = 952,\n\n // Output()\n OUTPUT_REF_DESTROYED = 953,\n\n // Repeater errors\n LOOP_TRACK_DUPLICATE_KEYS = -955,\n LOOP_TRACK_RECREATE = -956,\n\n // Runtime dependency tracker errors\n RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,\n RUNTIME_DEPS_ORPHAN_COMPONENT = 1001,\n}\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nexport class RuntimeError<T extends number = RuntimeErrorCode> extends Error {\n constructor(\n public code: T,\n message: null | false | string,\n ) {\n super(formatRuntimeError<T>(code, message));\n }\n}\n\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nexport function formatRuntimeError<T extends number = RuntimeErrorCode>(\n code: T,\n message: null | false | string,\n): string {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n const fullCode = `NG0${Math.abs(code)}`;\n\n let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\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.dev/license\n */\n\nimport {SIGNAL_NODE, SignalNode, signalSetFn} from '@angular/core/primitives/signals';\n\nexport const REQUIRED_UNSET_VALUE = /* @__PURE__ */ Symbol('InputSignalNode#UNSET');\n\n/**\n * Reactive node type for an input signal. An input signal extends a signal.\n * There are special properties to enable transforms and required inputs.\n */\nexport interface InputSignalNode<T, TransformT> extends SignalNode<T> {\n /**\n * User-configured transform that will run whenever a new value is applied\n * to the input signal node.\n */\n transformFn: ((value: TransformT) => T) | undefined;\n\n /**\n * Applies a new value to the input signal. Expects transforms to be run\n * manually before.\n *\n * This function is called by the framework runtime code whenever a binding\n * changes. The value can in practice be anything at runtime, but for typing\n * purposes we assume it's a valid `T` value. Type-checking will enforce that.\n */\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const INPUT_SIGNAL_NODE: InputSignalNode<unknown, unknown> = /* @__PURE__ */ (() => {\n return {\n ...SIGNAL_NODE,\n transformFn: undefined,\n\n applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T) {\n signalSetFn(node, value);\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.dev/license\n */\n\nimport {producerAccessed, SIGNAL} from '@angular/core/primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Signal} from '../../render3/reactivity/api';\n\nimport {INPUT_SIGNAL_NODE, InputSignalNode, REQUIRED_UNSET_VALUE} from './input_signal_node';\n\n/**\n * @developerPreview\n *\n * Options for signal inputs.\n */\nexport interface InputOptions<T, TransformT> {\n /** Optional public name for the input. By default, the class field name is used. */\n alias?: string;\n /**\n * Optional transform that runs whenever a new value is bound. Can be used to\n * transform the input value before the input is updated.\n *\n * The transform function can widen the type of the input. For example, consider\n * an input for `disabled`. In practice, as the component author, you want to only\n * deal with a boolean, but users may want to bind a string if they just use the\n * attribute form to bind to the input via `<my-dir input>`. A transform can then\n * handle such string values and convert them to `boolean`. See: {@link booleanAttribute}.\n */\n transform?: (v: TransformT) => T;\n}\n\n/**\n * Signal input options without the transform option.\n *\n * @developerPreview\n */\nexport type InputOptionsWithoutTransform<T> =\n // Note: We still keep a notion of `transform` for auto-completion.\n Omit<InputOptions<T, T>, 'transform'> & {transform?: undefined};\n/**\n * Signal input options with the transform option required.\n *\n * @developerPreview\n */\nexport type InputOptionsWithTransform<T, TransformT> = Required<\n Pick<InputOptions<T, TransformT>, 'transform'>\n> &\n InputOptions<T, TransformT>;\n\nexport const ɵINPUT_SIGNAL_BRAND_READ_TYPE = /* @__PURE__ */ Symbol();\nexport const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE = /* @__PURE__ */ Symbol();\n\n/**\n * `InputSignalWithTransform` represents a special `Signal` for a\n * directive/component input with a `transform` function.\n *\n * Signal inputs with transforms capture an extra generic for their transform write\n * type. Transforms can expand the accepted bound values for an input while ensuring\n * value retrievals of the signal input are still matching the generic input type.\n *\n * ```ts\n * class MyDir {\n * disabled = input(false, {\n * transform: (v: string|boolean) => convertToBoolean(v),\n * }); // InputSignalWithTransform<boolean, string|boolean>\n *\n * click() {\n * this.disabled() // always returns a `boolean`.\n * }\n * }\n * ```\n *\n * @see {@link InputSignal} for additional information.\n *\n * @developerPreview\n */\nexport interface InputSignalWithTransform<T, TransformT> extends Signal<T> {\n [SIGNAL]: InputSignalNode<T, TransformT>;\n [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;\n [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;\n}\n\n/**\n * `InputSignal` represents a special `Signal` for a directive/component input.\n *\n * An input signal is similar to a non-writable signal except that it also\n * carries additional type-information for transforms, and that Angular internally\n * updates the signal whenever a new value is bound.\n *\n * @see {@link InputOptionsWithTransform} for inputs with transforms.\n *\n * @developerPreview\n */\nexport interface InputSignal<T> extends InputSignalWithTransform<T, T> {}\n\n/**\n * Creates an input signal.\n *\n * @param initialValue The initial value.\n * Can be set to {@link REQUIRED_UNSET_VALUE} for required inputs.\n * @param options Additional options for the input. e.g. a transform, or an alias.\n */\nexport function createInputSignal<T, TransformT>(\n initialValue: T,\n options?: InputOptions<T, TransformT>,\n): InputSignalWithTransform<T, TransformT> {\n const node: InputSignalNode<T, TransformT> = Object.create(INPUT_SIGNAL_NODE);\n\n node.value = initialValue;\n\n // Perf note: Always set `transformFn` here to ensure that `node` always\n // has the same v8 class shape, allowing monomorphic reads on input signals.\n node.transformFn = options?.transform;\n\n function inputValueFn() {\n // Record that someone looked at this signal.\n producerAccessed(node);\n\n if (node.value === REQUIRED_UNSET_VALUE) {\n throw new RuntimeError(\n RuntimeErrorCode.REQUIRED_INPUT_NO_VALUE,\n ngDevMode && 'Input is required but no value is available yet.',\n );\n }\n\n return node.value;\n }\n\n (inputValueFn as any)[SIGNAL] = node;\n\n if (ngDevMode) {\n inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;\n }\n\n return inputValueFn as InputSignalWithTransform<T, TransformT>;\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.dev/license\n */\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects<T>(fn: () => T): T {\n return {toString: fn}.toString() as unknown as T;\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.dev/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {noSideEffects} from './closure';\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n /**\n * Invoke as decorator.\n */\n <T extends Type<any>>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;\n // Standard (non-experimental) Decorator signature that avoids direct usage of\n // any TS 5.0+ specific types.\n (target: unknown, context: unknown): void;\n}\n\nexport const ANNOTATIONS = '__annotations__';\nexport const PARAMETERS = '__parameters__';\nexport const PROP_METADATA = '__prop__metadata__';\n\n/**\n * @suppress {globalThis}\n */\nexport function makeDecorator<T>(\n name: string,\n props?: (...args: any[]) => any,\n parentClass?: any,\n additionalProcessing?: (type: Type<T>) => void,\n typeFn?: (type: Type<T>, ...args: any[]) => void,\n): {new (...args: any[]): any; (...args: any[]): any; (...args: any[]): (cls: any) => any} {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function DecoratorFactory(\n this: unknown | typeof DecoratorFactory,\n ...args: any[]\n ): (cls: Type<T>) => any {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this as typeof DecoratorFactory;\n }\n\n const annotationInstance = new (DecoratorFactory as any)(...args);\n return function TypeDecorator(cls: Type<T>) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS)\n ? (cls as any)[ANNOTATIONS]\n : (Object.defineProperty(cls, ANNOTATIONS, {value: []}) as any)[ANNOTATIONS];\n annotations.push(annotationInstance);\n\n if (additionalProcessing) additionalProcessing(cls);\n\n return cls;\n };\n }\n\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n DecoratorFactory.prototype.ngMetadataName = name;\n (DecoratorFactory as any).annotationCls = DecoratorFactory;\n return DecoratorFactory as any;\n });\n}\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n return function ctor(this: any, ...args: any[]) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\n\nexport function makeParamDecorator(\n name: string,\n props?: (...args: any[]) => any,\n parentClass?: any,\n): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(\n this: unknown | typeof ParamDecoratorFactory,\n ...args: any[]\n ): any {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new (<any>ParamDecoratorFactory)(...args);\n\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n\n function ParamDecorator(cls: any, unusedKey: any, index: number): any {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS)\n ? (cls as any)[PARAMETERS]\n : Object.defineProperty(cls, PARAMETERS, {value: []})[PARAMETERS];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n (<any>ParamDecoratorFactory).annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\n\nexport function makePropDecorator(\n name: string,\n props?: (...args: any[]) => any,\n parentClass?: any,\n additionalProcessing?: (target: any, name: string, ...args: any[]) => void,\n): any {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n\n function PropDecoratorFactory(\n this: unknown | typeof PropDecoratorFactory,\n ...args: any[]\n ): any {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n\n const decoratorInstance = new (<any>PropDecoratorFactory)(...args);\n\n function PropDecorator(target: any, name: string) {\n // target is undefined with standard decorators. This case is not supported and will throw\n // if this decorator is used in JIT mode with standard decorators.\n if (target === undefined) {\n throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n }\n\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA)\n ? (constructor as any)[PROP_METADATA]\n : Object.defineProperty(constructor, PROP_METADATA, {value: {}})[PROP_METADATA];\n meta[name] = (meta.hasOwnProperty(name) && meta[name]) || [];\n meta[name].unshift(decoratorInstance);\n\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n\n return PropDecorator;\n }\n\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n\n PropDecoratorFactory.prototype.ngMetadataName = name;\n (<any>PropDecoratorFactory).annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\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.dev/license\n */\n\nconst _global: any = globalThis;\n\n/**\n * Attention: whenever providing a new value, be sure to add an\n * entry into the corresponding `....externs.js` file,\n * so that closure won't use that global for its purposes.\n */\nexport {_global as global};\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.dev/license\n */\n\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === (getClosureSafeProperty as any)) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nexport function fillProperties(target: Record<string, unknown>, source: Record<string, unknown>) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\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.dev/license\n */\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n\n if (res == null) {\n return '' + res;\n }\n\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nexport function concatStringsWithSpace(before: string | null, after: string | null): string {\n return before == null || before === ''\n ? after === null\n ? ''\n : after\n : after == null || after === ''\n ? before\n : before + ' ' + after;\n}\n\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns ellipsed string with ... in the middle\n */\nexport function truncateMiddle(str: string, maxLength = 100): string {\n if (!str || maxLength < 1 || str.length <= maxLength) return str;\n if (maxLength == 1) return str.substring(0, 1) + '...';\n\n const halfLimit = Math.round(maxLength / 2);\n return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\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.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\n/**\n * An interface that a function passed into `forwardRef` has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn {\n (): any;\n}\n\nconst __forward_ref__ = getClosureSafeProperty({__forward_ref__: getClosureSafeProperty});\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```ts\n * @Component({\n * standalone: true,\n * imports: [ChildComponent],\n * selector: 'app-parent',\n * template: `<app-child [hideParent]=\"hideParent\"></app-child>`,\n * })\n * export class ParentComponent {\n * @Input() hideParent: boolean;\n * }\n *\n *\n * @Component({\n * standalone: true,\n * imports: [CommonModule, forwardRef(() => ParentComponent)],\n * selector: 'app-child',\n * template: `<app-parent *ngIf=\"!hideParent\"></app-parent>`,\n * })\n * export class ChildComponent {\n * @Input() hideParent: boolean;\n * }\n * ```\n *\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n (<any>forwardRefFn).__forward_ref__ = forwardRef;\n (<any>forwardRefFn).toString = function () {\n return stringify(this());\n };\n return <Type<any>>(<any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see {@link forwardRef}\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n return isForwardRef(type) ? type() : type;\n}\n\n/** Checks whether a function is wrapped by a `forwardRef`. */\nexport function isForwardRef(fn: any): fn is () => any {\n return (\n typeof fn === 'function' &&\n fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef\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.dev/license\n */\n\nimport {Type} from '../../interface/type';\nimport {getClosureSafeProperty} from '../../util/property';\n\nimport {\n ClassProvider,\n ConstructorProvider,\n EnvironmentProviders,\n ExistingProvider,\n FactoryProvider,\n StaticClassProvider,\n ValueProvider,\n} from './provider';\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * @codeGenApi\n * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is\n * deployed to npm, and should be treated as public api.\n\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular injector:\n * - `InjectorType` such as `NgModule`,\n * - `'root'` the root injector\n * - `'any'` all injectors.\n * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n * `providers`.\n */\n providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value: T | undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @codeGenApi\n */\nexport interface ɵɵInjectorDef<T> {\n // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n // class they are decorating (to add the ɵprov property for example).\n providers: (\n | Type<any>\n | ValueProvider\n | ExistingProvider\n | FactoryProvider\n | ConstructorProvider\n | StaticClassProvider\n | ClassProvider\n | EnvironmentProviders\n | any[]\n )[];\n\n imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n /**\n * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n */\n ɵprov: unknown;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorTypes` can be used to configure a `StaticInjector`.\n *\n * This is an opaque type whose structure is highly version dependent. Do not rely on any\n * properties.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n ɵfac?: unknown;\n ɵinj: unknown;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n ngModule: InjectorType<T>;\n providers?: (\n | Type<any>\n | ValueProvider\n | ExistingProvider\n | FactoryProvider\n | ConstructorProvider\n | StaticClassProvider\n | ClassProvider\n | EnvironmentProviders\n | any[]\n )[];\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵdefineInjectable<T>(opts: {\n token: unknown;\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n factory: () => T;\n}): unknown {\n return {\n token: opts.token,\n providedIn: (opts.providedIn as any) || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nexport const defineInjectable = ɵɵdefineInjectable;\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjector(options: {providers?: any[]; imports?: any[]}): unknown {\n return {providers: options.providers || [], imports: options.imports || []};\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\n\nexport function isInjectable(type: any): boolean {\n return getInjectableDef(type) !== null;\n}\n\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T> | null {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n\n if (def) {\n ngDevMode &&\n console.warn(\n `DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`,\n );\n return def;\n } else {\n return null;\n }\n}\n\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T> | null {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF))\n ? (type as any)[NG_INJ_DEF]\n : null;\n}\n\nexport const NG_PROV_DEF = getClosureSafeProperty({ɵprov: getClosureSafeProperty});\nexport const NG_INJ_DEF = getClosureSafeProperty({ɵinj: getClosureSafeProperty});\n\n// We need to keep these around so we can read off old defs if new defs are unavailable\nexport const NG_INJECTABLE_DEF = getClosureSafeProperty({ngInjectableDef: getClosureSafeProperty});\nexport const NG_INJECTOR_DEF = getClosureSafeProperty({ngInjectorDef: getClosureSafeProperty});\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.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {assertLessThan} from '../util/assert';\n\nimport {ɵɵdefineInjectable} from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n * </div>\n *\n * <code-example format=\"typescript\" language=\"typescript\" path=\"injection-token/src/main.ts\"\n * region=\"InjectionToken\"></code-example>\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the [`inject`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n /** @internal */\n readonly ngMetadataName = 'InjectionToken';\n\n readonly ɵprov: unknown;\n\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(\n protected _desc: string,\n options?: {\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;\n factory: () => T;\n },\n ) {\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n (this as any).__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n\n /**\n * @internal\n */\n get multi(): InjectionToken<Array<T>> {\n return this as InjectionToken<Array<T>>;\n }\n\n toString(): string {\n return `InjectionToken ${this._desc}`;\n }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> {\n ɵprov: unknown;\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.dev/license\n */\n\nimport {Type} from '../../interface/type';\n\n/**\n * Configures the `Injector` to return a value for a token.\n * Base for `ValueProvider` decorator.\n *\n * @publicApi\n */\nexport interface ValueSansProvider {\n /**\n * The value to inject.\n */\n useValue: any;\n}\n\n/**\n * Configures the `Injector` to return a value for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ValueProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ValueProvider extends ValueSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * Base for `StaticClassProvider` decorator.\n *\n * @publicApi\n */\nexport interface StaticClassSansProvider {\n /**\n * An optional class to instantiate for the `token`. By default, the `provide`\n * class is instantiated.\n */\n useClass: Type<any>;\n\n /**\n * A list of `token`s to be resolved by the injector. The list of values is then\n * used as arguments to the `useClass` constructor.\n */\n deps: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface StaticClassProvider extends StaticClassSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * ```ts\n * @Injectable(SomeModule, {deps: []})\n * class MyService {}\n * ```\n *\n * @publicApi\n */\nexport interface ConstructorSansProvider {\n /**\n * A list of `token`s to be resolved by the injector.\n */\n deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ConstructorProvider extends ConstructorSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: Type<any>;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see {@link ExistingProvider}\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @publicApi\n */\nexport interface ExistingSansProvider {\n /**\n * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)\n */\n useExisting: any;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ExistingProvider extends ExistingSansProvider {\n /**\n * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n *\n * @see {@link FactoryProvider}\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @publicApi\n */\nexport interface FactorySansProvider {\n /**\n * A function to invoke to create a value for this `token`. The function is invoked with\n * resolved values of `token`s in the `deps` field.\n */\n useFactory: Function;\n\n /**\n * A list of `token`s to be resolved by the injector. The list of values is then\n * used as arguments to the `useFactory` function.\n */\n deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}\n *\n * Dependencies can also be marked as optional:\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface FactoryProvider extends FactorySansProvider {\n /**\n * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Describes how an `Injector` should be configured as static (that is, without reflection).\n * A static provider provides tokens to an injector for various types of dependencies.\n *\n * @see {@link Injector.create()}\n * @see [Dependency Injection Guide](guide/di/dependency-injection-providers).\n *\n * @publicApi\n */\nexport type StaticProvider =\n | ValueProvider\n | ExistingProvider\n | StaticClassProvider\n | ConstructorProvider\n | FactoryProvider\n | any[];\n\n/**\n * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.\n *\n * Create an instance by invoking the `new` operator and supplying additional arguments.\n * This form is a short form of `TypeProvider`;\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='TypeProvider'}\n *\n * @publicApi\n */\nexport interface TypeProvider extends Type<any> {}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useClass` function.\n * Base for `ClassProvider` decorator.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @publicApi\n */\nexport interface ClassSansProvider {\n /**\n * Class to instantiate for the `token`.\n */\n useClass: Type<any>;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ClassProvider extends ClassSansProvider {\n /**\n * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n */\n provide: any;\n\n /**\n * When true, injector returns an array of instances. This is useful to allow multiple\n * providers spread across many files to provide configuration information to a common token.\n */\n multi?: boolean;\n}\n\n/**\n * Describes how the `Injector` should be configured.\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n *\n * @see {@link StaticProvider}\n *\n * @publicApi\n */\nexport type Provider =\n | TypeProvider\n | ValueProvider\n | ClassProvider\n | ConstructorProvider\n | ExistingProvider\n | FactoryProvider\n | any[];\n\n/**\n * Encapsulated `Provider`s that are only accepted during creation of an `EnvironmentInjector` (e.g.\n * in an `NgModule`).\n *\n * Using this wrapper type prevents providers which are only designed to work in\n * application/environment injectors from being accidentally included in\n * `@Component.providers` and ending up in a component injector.\n *\n * This wrapper type prevents access to the `Provider`s inside.\n *\n * @see {@link makeEnvironmentProviders}\n * @see {@link importProvidersFrom}\n *\n * @publicApi\n */\nexport type EnvironmentProviders = {\n ɵbrand: 'EnvironmentProviders';\n};\n\nexport interface InternalEnvironmentProviders extends EnvironmentProviders {\n ɵproviders: (Provider | EnvironmentProviders)[];\n\n /**\n * If present, indicates that the `EnvironmentProviders` were derived from NgModule providers.\n *\n * This is used to produce clearer error messages.\n */\n ɵfromNgModule?: true;\n}\n\nexport function isEnvironmentProviders(\n value: Provider | EnvironmentProviders | InternalEnvironmentProviders,\n): value is InternalEnvironmentProviders {\n return value && !!(value as InternalEnvironmentProviders).ɵproviders;\n}\n\n/**\n * Describes a function that is used to process provider lists (such as provider\n * overrides).\n */\nexport type ProcessProvidersFunction = (providers: Provider[]) => Provider[];\n\n/**\n * A wrapper around an NgModule that associates it with providers\n * Usage without a generic type is deprecated.\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<T> {\n ngModule: Type<T>;\n providers?: Array<Provider | EnvironmentProviders>;\n}\n\n/**\n * Providers that were imported from NgModules via the `importProvidersFrom` function.\n *\n * These providers are meant for use in an application injector (or other environment injectors) and\n * should not be used in component injectors.\n *\n * This type cannot be directly implemented. It's returned from the `importProvidersFrom` function\n * and serves to prevent the extracted NgModule providers from being used in the wrong contexts.\n *\n * @see {@link importProvidersFrom}\n *\n * @publicApi\n * @deprecated replaced by `EnvironmentProviders`\n */\nexport type ImportedNgModuleProviders = EnvironmentProviders;\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.dev/license\n */\n\nimport {getClosureSafeProperty} from '../util/property';\n\nexport const NG_COMP_DEF = getClosureSafeProperty({ɵcmp: getClosureSafeProperty});\nexport const NG_DIR_DEF = getClosureSafeProperty({ɵdir: getClosureSafeProperty});\nexport const NG_PIPE_DEF = getClosureSafeProperty({ɵpipe: getClosureSafeProperty});\nexport const NG_MOD_DEF = getClosureSafeProperty({ɵmod: getClosureSafeProperty});\nexport const NG_FACTORY_DEF = getClosureSafeProperty({ɵfac: getClosureSafeProperty});\n\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nexport const NG_ELEMENT_ID = getClosureSafeProperty({__NG_ELEMENT_ID__: getClosureSafeProperty});\n\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nexport const NG_ENV_ID = getClosureSafeProperty({__NG_ENV_ID__: getClosureSafeProperty});\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.dev/license\n */\n\nimport {Type} from '../../interface/type';\nimport {NG_COMP_DEF} from '../fields';\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nexport function renderStringify(value: any): string {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n *\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n\n return renderStringify(value);\n}\n\n/**\n * Used to stringify a `Type` and including the file path and line number in which it is defined, if\n * possible, for better debugging experience.\n *\n * Important! This function contains a megamorphic read and should only be used for error messages.\n */\nexport function debugStringifyTypeForError(type: Type<any>): string {\n // TODO(pmvald): Do some refactoring so that we can use getComponentDef here without creating\n // circular deps.\n let componentDef = (type as any)[NG_COMP_DEF] || null;\n if (componentDef !== null && componentDef.debugInfo) {\n return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n }\n\n return stringifyForError(type);\n}\n\n// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param\n// debugInfo here without creating circular deps.\nfunction stringifyTypeFromDebugInfo(debugInfo: any): string {\n if (!debugInfo.filePath || !debugInfo.lineNumber) {\n return debugInfo.className;\n } else {\n return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\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.dev/license\n */\n\nimport type {ProviderToken} from '../di';\nimport {isEnvironmentProviders} from '../di/interface/provider';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {stringifyForError} from './util/stringify_utils';\n\n/** Called when directives inject each other (creating a circular dependency) */\nexport function throwCyclicDependencyError(token: string, path?: string[]): never {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(\n RuntimeErrorCode.CYCLIC_DI_DEPENDENCY,\n ngDevMode ? `Circular dependency in DI detected for ${token}${depPath}` : token,\n );\n}\n\nexport function throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(\n ngModuleType?: Type<unknown>,\n providers?: any[],\n provider?: any,\n): never {\n if (ngModuleType && providers) {\n const providerDetail = providers.map((v) => (v == provider ? '?' + provider + '?' : '...'));\n throw new Error(\n `Invalid provider for the NgModule '${stringify(\n ngModuleType,\n )}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`,\n );\n } else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`,\n );\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`,\n );\n }\n } else {\n throw new Error('Invalid provider');\n }\n}\n\n/** Throws an error when a token is not found in DI. */\nexport function throwProviderNotFoundError(\n token: ProviderToken<unknown>,\n injectorName?: string,\n): never {\n const errorMessage =\n ngDevMode &&\n `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;\n throw new RuntimeError(RuntimeErrorCode.PROVIDER_NOT_FOUND, errorMessage);\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.dev/license\n */\n\n/**\n * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`\n * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).\n * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.\n */\nexport const enum DecoratorFlags {\n Inject = -1,\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for [`inject`](api/core/inject) instead.\n */\nexport enum InjectFlags {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n}\n\n/**\n * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a\n * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can\n * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum\n * above). The benefit of inlining is that we can use these flags at the top level without affecting\n * tree-shaking (see \"no-toplevel-property-access\" tslint rule for more info).\n * Keep this enum in sync with `InjectFlags` enum above.\n */\nexport const enum InternalInjectFlags {\n /** Check self and check parent injector if needed */\n Default = 0b0000,\n\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n Host = 0b0001,\n\n /** Don't ascend to ancestors of the node requesting injection. */\n Self = 0b0010,\n\n /** Skip the node that is requesting injection. */\n SkipSelf = 0b0100,\n\n /** Inject `defaultValue` instead if token not found. */\n Optional = 0b1000,\n\n /**\n * This token is being injected into a pipe.\n *\n * This flag is intentionally not in the public facing `InjectFlags` because it is only added by\n * the compiler and is not a developer applicable flag.\n */\n ForPipe = 0b10000,\n}\n\n/**\n * Type of the options argument to [`inject`](api/core/inject).\n *\n * @publicApi\n */\nexport interface InjectOptions {\n /**\n * Use optional injection, and return `null` if the requested token is not found.\n */\n optional?: boolean;\n\n /**\n * Start injection at the parent of the current injector.\n */\n skipSelf?: boolean;\n\n /**\n * Only query the current injector for the token, and don't fall back to the parent injector if\n * it's not found.\n */\n self?: boolean;\n\n /**\n * Stop injection at the host component's injector. Only relevant when injecting from an element\n * injector, and a no-op for environment injectors.\n */\n host?: boolean;\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.dev/license\n */\n\nimport {throwProviderNotFoundError} from '../render3/errors_di';\nimport {assertNotEqual} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {getInjectableDef, ɵɵInjectableDeclaration} from './interface/defs';\nimport {InjectFlags} from './interface/injector';\nimport {ProviderToken} from './provider_token';\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation:\n | (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null)\n | undefined;\nexport function getInjectImplementation() {\n return _injectImplementation;\n}\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n impl: (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null) | undefined,\n): (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null) | undefined {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nexport function injectRootLimpMode<T>(\n token: ProviderToken<T>,\n notFoundValue: T | undefined,\n flags: InjectFlags,\n): T | null {\n const injectableDef: ɵɵInjectableDeclaration<T> | null = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined\n ? (injectableDef.value = injectableDef.factory())\n : injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(token, 'Injector');\n}\n\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nexport function assertInjectImplementationNotEqual(\n fn: <T>(token: ProviderToken<T>, flags?: InjectFlags) => T | null,\n) {\n ngDevMode &&\n assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\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.dev/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {emitInjectEvent} from '../render3/debug/injector_profiler';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {getInjectImplementation, injectRootLimpMode} from './inject_switch';\nimport type {Injector} from './injector';\nimport {\n DecoratorFlags,\n InjectFlags,\n InjectOptions,\n InternalInjectFlags,\n} from './interface/injector';\nimport {ProviderToken} from './provider_token';\nimport type {HostAttributeToken} from './host_attribute_token';\n\nconst _THROW_IF_NOT_FOUND = {};\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector | undefined | null = undefined;\n\nexport function getCurrentInjector(): Injector | undefined | null {\n return _currentInjector;\n}\n\nexport function setCurrentInjector(\n injector: Injector | null | undefined,\n): Injector | undefined | null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nexport function injectInjectorOnly<T>(token: ProviderToken<T>): T;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;\nexport function injectInjectorOnly<T>(\n token: ProviderToken<T>,\n flags = InjectFlags.Default,\n): T | null {\n if (_currentInjector === undefined) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n ngDevMode &&\n `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`,\n );\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n const value = _currentInjector.get(\n token,\n flags & InjectFlags.Optional ? null : undefined,\n flags,\n );\n ngDevMode && emitInjectEvent(token as Type<unknown>, value, flags);\n return value;\n }\n}\n\n/**\n * Generated instruction: injects a token from the currently active injector.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this\n * instruction)\n *\n * @see inject\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵinject<T>(token: ProviderToken<T>): T;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;\nexport function ɵɵinject(token: HostAttributeToken): string;\nexport function ɵɵinject(token: HostAttributeToken, flags?: InjectFlags): string | null;\nexport function ɵɵinject<T>(\n token: ProviderToken<T> | HostAttributeToken,\n flags?: InjectFlags,\n): string | null;\nexport function ɵɵinject<T>(\n token: ProviderToken<T> | HostAttributeToken,\n flags = InjectFlags.Default,\n): T | null {\n return (getInjectImplementation() || injectInjectorOnly)(\n resolveForwardRef(token as Type<T>),\n flags,\n );\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactoryDep(index: number): never {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY,\n ngDevMode &&\n `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`,\n );\n}\n\n/**\n * @param token A token that represents a dependency that should be injected.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param flags Control how injection is executed. The flags correspond to injection strategies that\n * can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n * @deprecated prefer an options object instead of `InjectFlags`\n */\nexport function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n * `@Optional`.\n * @returns the injected value if operation is successful.\n * @throws if called outside of a supported context, or if the token is not found.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions & {optional?: false}): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n * `@Optional`.\n * @returns the injected value if operation is successful, `null` if the token is not\n * found and optional injection has been requested.\n * @throws if called outside of a supported context, or if the token is not found and optional\n * injection was not requested.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists.\n * @throws If called outside of a supported context or the attribute does not exist.\n *\n * @publicApi\n */\nexport function inject(token: HostAttributeToken): string;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists, otherwise `null`.\n * @throws If called outside of a supported context.\n *\n * @publicApi\n */\nexport function inject(token: HostAttributeToken, options: {optional: true}): string | null;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists.\n * @throws If called outside of a supported context or the attribute does not exist.\n *\n * @publicApi\n */\nexport function inject(token: HostAttributeToken, options: {optional: false}): string;\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It\n * can be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport function inject<T>(\n token: ProviderToken<T> | HostAttributeToken,\n flags: InjectFlags | InjectOptions = InjectFlags.Default,\n) {\n // The `as any` here _shouldn't_ be necessary, but without it JSCompiler\n // throws a disambiguation error due to the multiple signatures.\n return ɵɵinject(token as any, convertToBitFlags(flags));\n}\n\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nexport function convertToBitFlags(\n flags: InjectOptions | InjectFlags | undefined,\n): InjectFlags | undefined {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return (InternalInjectFlags.Default | // comment to force a line break in the formatter\n ((flags.optional && InternalInjectFlags.Optional) as number) |\n ((flags.host && InternalInjectFlags.Host) as number) |\n ((flags.self && InternalInjectFlags.Self) as number) |\n ((flags.skipSelf && InternalInjectFlags.SkipSelf) as number)) as InjectFlags;\n}\n\nexport function injectArgs(types: (ProviderToken<any> | any[])[]): any[] {\n const args: any[] = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode && 'Arguments array must have arguments.',\n );\n }\n let type: Type<any> | undefined = undefined;\n let flags: InjectFlags = InjectFlags.Default;\n\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === DecoratorFlags.Inject) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n\n args.push(ɵɵinject(type!, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nexport function attachInjectFlag(decorator: any, flag: InternalInjectFlags | DecoratorFlags): any {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nexport function getInjectFlag(token: any): number | undefined {\n return token[DI_DECORATOR_FLAG];\n}\n\nexport function catchInjectorError(\n e: any,\n token: any,\n injectorErrorName: string,\n source: string | null,\n): never {\n const tokenPath: any[] = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\n\nexport function formatError(\n text: string,\n obj: any,\n injectorErrorName: string,\n source: string | null = null,\n): string {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = <string[]>[];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(\n key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)),\n );\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(\n NEW_LINE,\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.dev/license\n */\n\nimport {makeParamDecorator} from '../util/decorators';\n\nimport {attachInjectFlag} from './injector_compatibility';\nimport {DecoratorFlags, InternalInjectFlags} from './interface/injector';\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n /**\n * Parameter decorator on a dependency parameter of a class constructor\n * that specifies a custom provider of the dependency.\n *\n * @usageNotes\n * The following example shows a class constructor that specifies a\n * custom provider of a dependency using the parameter decorator.\n *\n * When `@Inject()` is not present, the injector uses the type annotation of the\n * parameter as the provider.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"InjectWithoutDecorator\">\n * </code-example>\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection\n *\n */\n (token: any): any;\n new (token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n /**\n * A DI token that maps to the dependency to be injected.\n */\n token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = attachInjectFlag(\n // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n makeParamDecorator('Inject', (token: any) => ({token})),\n // tslint:disable-next-line: no-toplevel-property-access\n DecoratorFlags.Inject,\n);\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which marks the parameter as being an optional dependency.\n * The DI framework provides `null` if the dependency is not found.\n *\n * Can be used together with other parameter decorators\n * that modify how dependency injection operates.\n *\n * @usageNotes\n *\n * The following code allows the possibility of a `null` result:\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Optional\">\n * </code-example>\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection.\n */\n (): any;\n new (): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Optional'), InternalInjectFlags.Optional);\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the local injector.\n *\n * Resolution works upward through the injector hierarchy, so the children\n * of this class must configure their own providers or be prepared for a `null` result.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved\n * by the local injector when instantiating the class itself, but not\n * when instantiating a child.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Self\">\n * </code-example>\n *\n * @see {@link SkipSelf}\n * @see {@link Optional}\n *\n */\n (): any;\n new (): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Self'), InternalInjectFlags.Self);\n\n/**\n * Type of the `SkipSelf` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n /**\n * Parameter decorator to be used on constructor parameters,\n * which tells the DI framework to start dependency resolution from the parent injector.\n * Resolution works upward through the injector hierarchy, so the local injector\n * is not checked for a provider.\n *\n * @usageNotes\n *\n * In the following example, the dependency can be resolved when\n * instantiating a child, but not when instantiating the class itself.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"SkipSelf\">\n * </code-example>\n *\n * @see [Dependency Injection guide](guide/di/di-in-action#skip).\n * @see {@link Self}\n * @see {@link Optional}\n *\n */\n (): any;\n new (): SkipSelf;\n}\n\n/**\n * Type of the `SkipSelf` metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('SkipSelf'), InternalInjectFlags.SkipSelf);\n\n/**\n * Type of the `Host` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface HostDecorator {\n /**\n * Parameter decorator on a view-provider parameter of a class constructor\n * that tells the DI framework to resolve the view by checking injectors of child\n * elements, and stop when reaching the host element of the current component.\n *\n * @usageNotes\n *\n * The following shows use with the `@Optional` decorator, and allows for a `null` result.\n *\n * <code-example path=\"core/di/ts/metadata_spec.ts\" region=\"Host\">\n * </code-example>\n *\n * For an extended example, see [\"Dependency Injection\n * Guide\"](guide/di/di-in-action#optional).\n */\n (): any;\n new (): Host;\n}\n\n/**\n * Type of the Host metadata.\n *\n * @publicApi\n */\nexport interface Host {}\n\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Host: HostDecorator =\n // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n // tslint:disable-next-line: no-toplevel-property-access\n attachInjectFlag(makeParamDecorator('Host'), InternalInjectFlags.Host);\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.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\nimport {NG_FACTORY_DEF} from './fields';\n\n/**\n * Definition of what a factory function should look like.\n */\nexport type FactoryFn<T> = {\n /**\n * Subclasses without an explicit constructor call through to the factory of their base\n * definition, providing it with their own constructor to instantiate.\n */\n <U extends T>(t?: Type<U>): U;\n\n /**\n * If no constructor to instantiate is provided, an instance of type T itself is created.\n */\n (t?: undefined): T;\n};\n\nexport function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;\nexport function getFactoryDef<T>(type: any): FactoryFn<T> | null;\nexport function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T> | null {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\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.dev/license\n */\n\nimport {assertEqual, assertLessThanOrEqual} from './assert';\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nexport function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA) as any;\n valueB = identityAccessor(valueB) as any;\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[]): any[] {\n return list.flat(Number.POSITIVE_INFINITY);\n}\n\nexport function deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void {\n input.forEach((value) => (Array.isArray(value) ? deepForEach(value, fn) : fn(value)));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\n\nexport function removeFromArray(arr: any[], index: number): any {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\n\nexport function newArray<T = any>(size: number): T[];\nexport function newArray<T>(size: number, value: T): T[];\nexport function newArray<T>(size: number, value?: T): T[] {\n const list: T[] = [];\n for (let i = 0; i < size; i++) {\n list.push(value!);\n }\n return list;\n}\n\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nexport function arraySplice(array: any[], index: number, count: number): void {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nexport function arrayInsert(array: any[], index: number, value: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nexport function arrayInsert2(array: any[], index: number, value1: any, value2: any): void {\n ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nexport function arrayIndexOfSorted(array: string[], value: string): number {\n return _arrayIndexOfSorted(array, value, 0);\n}\n\n/**\n * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.\n *\n * `KeyValueArray` provides a very efficient way of iterating over its contents. For small\n * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance\n * characteristics that of a `Map` with significantly better memory footprint.\n *\n * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched\n * for retrieval.\n *\n * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.\n */\nexport interface KeyValueArray<VALUE> extends Array<VALUE | string> {\n __brand__: 'array-map';\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nexport function keyValueArraySet<V>(\n keyValueArray: KeyValueArray<V>,\n key: string,\n value: V,\n): number {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nexport function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V | undefined {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1] as V;\n }\n return undefined;\n}\n\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nexport function keyValueArrayIndexOf<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n return _arrayIndexOfSorted(keyValueArray as string[], key, 1);\n}\n\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nexport function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array: string[], value: string, shift: number): number {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + ((end - start) >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return middle << shift;\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\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.dev/license\n */\nimport {initNgDevMode} from './ng_dev_mode';\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: never = {} as never;\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY);\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.dev/license\n */\n\nimport {InjectionToken} from './injection_token';\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * Note: As opposed to the `APP_INITIALIZER` token, the `ENVIRONMENT_INITIALIZER` functions are not awaited,\n * hence they should not be `async`.\n *\n * @publicApi\n */\nexport const ENVIRONMENT_INITIALIZER = new InjectionToken<ReadonlyArray<() => void>>(\n ngDevMode ? 'ENVIRONMENT_INITIALIZER' : '',\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.dev/license\n */\n\nimport {InjectionToken} from './injection_token';\nimport type {Injector} from './injector';\nimport {InjectorMarkers} from './injector_marker';\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n ngDevMode ? 'INJECTOR' : '',\n // Disable tslint because this is const enum which gets inlined not top level prop access.\n // tslint:disable-next-line: no-toplevel-property-access\n InjectorMarkers.Injector as any, // Special value used by Ivy to identify `Injector`.\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.dev/license\n */\n\nimport {Type} from '../interface/type';\n\nimport {InjectionToken} from './injection_token';\n\nexport const INJECTOR_DEF_TYPES = new InjectionToken<ReadonlyArray<Type<unknown>>>(\n ngDevMode ? 'INJECTOR_DEF_TYPES' : '',\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.dev/license\n */\n\nimport {stringify} from '../util/stringify';\nimport type {Injector} from './injector';\nimport {THROW_IF_NOT_FOUND} from './injector_compatibility';\n\nexport class NullInjector implements Injector {\n get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\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.dev/license\n */\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see [Change detection usage](/api/core/ChangeDetectorRef?tab=usage-notes)\n * @see [Skipping component subtrees](/best-practices/skipping-subtrees)\n *\n * @publicApi\n */\nexport enum ChangeDetectionStrategy {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n OnPush = 0,\n\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n Default = 1,\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.dev/license\n */\n\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nexport enum ViewEncapsulation {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n *\n * This is the default option.\n */\n Emulated = 0,\n\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n\n /**\n * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n None = 2,\n\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ShadowDom = 3,\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.dev/license\n */\n\n/** Flags describing an input for a directive. */\nexport enum InputFlags {\n None = 0,\n SignalBased = 1 << 0,\n HasDecoratorInputTransform = 1 << 1,\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.dev/license\n */\n\nimport {assertNotEqual} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nexport function classIndexOf(\n className: string,\n classToSearch: string,\n startingIndex: number,\n): number {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= CharCode.SPACE) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (\n foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= CharCode.SPACE\n ) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\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.dev/license\n */\nimport {CharCode} from '../../util/char_code';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {TAttributes} from '../interfaces/node';\nimport {CssSelector} from '../interfaces/projection';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nexport function setUpAttributes(renderer: Renderer, native: RElement, attrs: TAttributes): number {\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== AttributeMarker.NamespaceURI) {\n break;\n }\n\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n\n const namespaceURI = attrs[i++] as string;\n const attrName = attrs[i++] as string;\n const attrVal = attrs[i++] as string;\n ngDevMode && ngDevMode.rendererSetAttribute++;\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n } else {\n // attrName is string;\n const attrName = value as string;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n } else {\n renderer.setAttribute(native, attrName, attrVal as string);\n }\n i++;\n }\n }\n\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nexport function isNameOnlyAttributeMarker(marker: string | AttributeMarker | CssSelector) {\n return (\n marker === AttributeMarker.Bindings ||\n marker === AttributeMarker.Template ||\n marker === AttributeMarker.I18n\n );\n}\n\nexport function isAnimationProp(name: string): boolean {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === CharCode.AT_SIGN;\n}\n\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nexport function mergeHostAttrs(\n dst: TAttributes | null,\n src: TAttributes | null,\n): TAttributes | null {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker: AttributeMarker = AttributeMarker.ImplicitAttributes;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === AttributeMarker.NamespaceURI) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (\n srcMarker === AttributeMarker.ImplicitAttributes ||\n srcMarker === AttributeMarker.Styles\n ) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, src[++i] as string);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item as string, null, null);\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nexport function mergeHostAttribute(\n dst: TAttributes,\n marker: AttributeMarker,\n key1: string,\n key2: string | null,\n value: string | null,\n): void {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === AttributeMarker.ImplicitAttributes) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value!;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, 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.dev/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {AttributeMarker} from './interfaces/attribute_marker';\nimport {TAttributes, TNode, TNodeType} from './interfaces/node';\nimport {CssSelector, CssSelectorList, SelectorFlags} from './interfaces/projection';\nimport {classIndexOf} from './styling/class_differ';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\n\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param tNode static data of the node to match\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(\n tNode: TNode,\n attrs: TAttributes,\n cssClassToMatch: string,\n isProjectionMode: boolean,\n): boolean {\n ngDevMode &&\n assertEqual(\n cssClassToMatch,\n cssClassToMatch.toLowerCase(),\n 'Class name expected to be lowercase.',\n );\n let i = 0;\n if (isProjectionMode) {\n for (; i < attrs.length && typeof attrs[i] === 'string'; i += 2) {\n // Search for an implicit `class` attribute and check if its value matches `cssClassToMatch`.\n if (\n attrs[i] === 'class' &&\n classIndexOf((attrs[i + 1] as string).toLowerCase(), cssClassToMatch, 0) !== -1\n ) {\n return true;\n }\n }\n } else if (isInlineTemplate(tNode)) {\n // Matching directives (i.e. when not matching for projection mode) should not consider the\n // class bindings that are present on inline templates, as those class bindings only target\n // the root node of the template, not the template itself.\n return false;\n }\n\n // Resume the search for classes after the `Classes` marker.\n i = attrs.indexOf(AttributeMarker.Classes, i);\n if (i > -1) {\n // We found the classes section. Start searching for the class.\n let item: TAttributes[number];\n while (++i < attrs.length && typeof (item = attrs[i]) === 'string') {\n if (item.toLowerCase() === cssClassToMatch) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nexport function isInlineTemplate(tNode: TNode): boolean {\n return tNode.type === TNodeType.Container && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(\n tNode: TNode,\n currentSelector: string,\n isProjectionMode: boolean,\n): boolean {\n const tagNameToCompare =\n tNode.type === TNodeType.Container && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param tNode static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nexport function isNodeMatchingSelector(\n tNode: TNode,\n selector: CssSelector,\n isProjectionMode: boolean,\n): boolean {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode: SelectorFlags = SelectorFlags.ELEMENT;\n const nodeAttrs = tNode.attrs;\n\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0;\n\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = (current as number) | (mode & SelectorFlags.NOT);\n continue;\n }\n\n if (skipToNextSelector) continue;\n\n if (mode & SelectorFlags.ELEMENT) {\n mode = SelectorFlags.ATTRIBUTE | (mode & SelectorFlags.NOT);\n if (\n (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode)) ||\n (current === '' && selector.length === 1)\n ) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else if (mode & SelectorFlags.CLASS) {\n if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = selector[++i];\n const attrIndexInNode = findAttrIndexInNode(\n current,\n nodeAttrs,\n isInlineTemplate(tNode),\n isProjectionMode,\n );\n\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n\n if (selectorAttrValue !== '') {\n let nodeAttrValue: string;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode &&\n assertNotEqual(\n nodeAttrs![attrIndexInNode],\n AttributeMarker.NamespaceURI,\n 'We do not match directives on namespaced attributes',\n );\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = (nodeAttrs![attrIndexInNode + 1] as string).toLowerCase();\n }\n\n if (mode & SelectorFlags.ATTRIBUTE && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n\n return isPositive(mode) || skipToNextSelector;\n}\n\nfunction isPositive(mode: SelectorFlags): boolean {\n return (mode & SelectorFlags.NOT) === 0;\n}\n\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(\n name: string,\n attrs: TAttributes | null,\n isInlineTemplate: boolean,\n isProjectionMode: boolean,\n): number {\n if (attrs === null) return -1;\n\n let i = 0;\n\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (\n maybeAttrName === AttributeMarker.Bindings ||\n maybeAttrName === AttributeMarker.I18n\n ) {\n bindingsMode = true;\n } else if (\n maybeAttrName === AttributeMarker.Classes ||\n maybeAttrName === AttributeMarker.Styles\n ) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === AttributeMarker.Template) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === AttributeMarker.NamespaceURI) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\n\nexport function isNodeMatchingSelectorList(\n tNode: TNode,\n selector: CssSelectorList,\n isProjectionMode: boolean = false,\n): boolean {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getProjectAsAttrValue(tNode: TNode): CssSelector | null {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(AttributeMarker.ProjectAs);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1] as CssSelector;\n }\n }\n return null;\n}\n\nfunction getNameOnlyMarkerIndex(nodeAttrs: TAttributes) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\n\nfunction matchTemplateAttribute(attrs: TAttributes, name: string): number {\n let i = attrs.indexOf(AttributeMarker.Template);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\n\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nexport function isSelectorInSelectorList(selector: CssSelector, list: CssSelectorList): boolean {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\n\nfunction maybeWrapInNotSelector(isNegativeMode: boolean, chunk: string): string {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\n\nfunction stringifyCSSSelector(selector: CssSelector): string {\n let result = selector[0] as string;\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & SelectorFlags.ATTRIBUTE) {\n const attrValue = selector[++i] as string;\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & SelectorFlags.CLASS) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & SelectorFlags.ELEMENT) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nexport function stringifyCSSSelectorList(selectorList: CssSelectorList): string {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nexport function extractAttrsAndClassesFromSelector(selector: CssSelector): {\n attrs: string[];\n classes: string[];\n} {\n const attrs: string[] = [];\n const classes: string[] = [];\n let i = 1;\n let mode = SelectorFlags.ATTRIBUTE;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === SelectorFlags.ATTRIBUTE) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i] as string);\n }\n } else if (mode === SelectorFlags.CLASS) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n return {attrs, classes};\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.dev/license\n */\n\nimport {ChangeDetectionStrategy} from '../change_detection/constants';\nimport {formatRuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type, Writable} from '../interface/type';\nimport {NgModuleDef} from '../metadata/ng_module_def';\nimport {SchemaMetadata} from '../metadata/schema';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../util/empty';\nimport {initNgDevMode} from '../util/ng_dev_mode';\nimport {stringify} from '../util/stringify';\n\nimport {NG_COMP_DEF, NG_DIR_DEF, NG_MOD_DEF, NG_PIPE_DEF} from './fields';\nimport type {\n ComponentDef,\n ComponentDefFeature,\n ComponentTemplate,\n ContentQueriesFunction,\n DependencyTypeList,\n DirectiveDef,\n DirectiveDefFeature,\n DirectiveDefListOrFactory,\n HostBindingsFunction,\n InputTransformFunction,\n PipeDef,\n PipeDefListOrFactory,\n TypeOrFactory,\n ViewQueriesFunction,\n} from './interfaces/definition';\nimport {InputFlags} from './interfaces/input_flags';\nimport type {TAttributes, TConstantsOrFactory} from './interfaces/node';\nimport {CssSelectorList} from './interfaces/projection';\nimport {stringifyCSSSelectorList} from './node_selector_matcher';\n\n/**\n * Map of inputs for a given directive/component.\n *\n * Given:\n * ```\n * class MyComponent {\n * @Input()\n * publicInput1: string;\n *\n * @Input('publicInput2')\n * declaredInput2: string;\n *\n * @Input({transform: (value: boolean) => value ? 1 : 0})\n * transformedInput3: number;\n *\n * signalInput = input(3);\n * }\n * ```\n *\n * is described as:\n * ```\n * {\n * publicInput1: 'publicInput1',\n * declaredInput2: [InputFlags.None, 'declaredInput2', 'publicInput2'],\n * transformedInput3: [\n * InputFlags.None,\n * 'transformedInput3',\n * 'transformedInput3',\n * (value: boolean) => value ? 1 : 0\n * ],\n * signalInput: [InputFlags.SignalBased, \"signalInput\"],\n * }\n * ```\n *\n * Which the minifier may translate to:\n * ```\n * {\n * minifiedPublicInput1: 'publicInput1',\n * minifiedDeclaredInput2: [InputFlags.None, 'publicInput2', 'declaredInput2'],\n * minifiedTransformedInput3: [\n * InputFlags.None,\n * 'transformedInput3',\n * 'transformedInput3',\n * (value: boolean) => value ? 1 : 0\n * ],\n * minifiedSignalInput: [InputFlags.SignalBased, \"signalInput\"],\n * }\n * ```\n *\n * This allows the render to re-construct the minified, public, and declared names\n * of properties.\n *\n * NOTE:\n * - Because declared and public name are usually same we only generate the array\n * `['declared', 'public']` format when they differ, or there is a transform.\n * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has\n * inconsistent behavior in that it uses declared names rather than minified or public.\n */\ntype DirectiveInputs<T> = {\n [P in keyof T]?: // Basic case. Mapping minified name to public name.\n | string\n // Complex input when there are flags, or differing public name and declared name, or there\n // is a transform. Such inputs are not as common, so the array form is only generated then.\n | [\n flags: InputFlags,\n publicName: string,\n declaredName?: string,\n transform?: InputTransformFunction,\n ];\n};\n\ninterface DirectiveDefinition<T> {\n /**\n * Directive type, needed to configure the injector.\n */\n type: Type<T>;\n\n /** The selectors that will be used to match nodes to this directive. */\n selectors?: CssSelectorList;\n\n /**\n * A map of input names.\n */\n inputs?: DirectiveInputs<T>;\n\n /**\n * A map of output names.\n *\n * The format is in: `{[actualPropertyName: string]:string}`.\n *\n * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.\n *\n * This allows the render to re-construct the minified and non-minified names\n * of properties.\n */\n outputs?: {[P in keyof T]?: string};\n\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}\n */\n features?: DirectiveDefFeature[];\n\n /**\n * Function executed by the parent template to allow child directive to apply host bindings.\n */\n hostBindings?: HostBindingsFunction<T>;\n\n /**\n * The number of bindings in this directive `hostBindings` (including pure fn bindings).\n *\n * Used to calculate the length of the component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n hostVars?: number;\n\n /**\n * Assign static attribute values to a host element.\n *\n * This property will assign static attribute values as well as class and style\n * values to a host element. Since attribute values can consist of different types of values,\n * the `hostAttrs` array must include the values in the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n */\n hostAttrs?: TAttributes;\n\n /**\n * Function to create instances of content queries associated with a given directive.\n */\n contentQueries?: ContentQueriesFunction<T>;\n\n /**\n * Additional set of instructions specific to view query processing. This could be seen as a\n * set of instructions to be inserted into the template function.\n */\n viewQuery?: ViewQueriesFunction<T> | null;\n\n /**\n * Defines the name that can be used in the template to assign this directive to a variable.\n *\n * See: {@link Directive.exportAs}\n */\n exportAs?: string[];\n\n /**\n * Whether this directive/component is standalone.\n */\n standalone?: boolean;\n\n /**\n * Whether this directive/component is signal-based.\n */\n signals?: boolean;\n}\n\ninterface ComponentDefinition<T> extends Omit<DirectiveDefinition<T>, 'features'> {\n /**\n * The number of nodes, local refs, and pipes in this component template.\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the binding start index.\n */\n decls: number;\n\n /**\n * The number of bindings in this component template (including pure fn bindings).\n *\n * Used to calculate the length of this component's LView array, so we\n * can pre-fill the array and set the host binding start index.\n */\n vars: number;\n\n /**\n * Template function use for rendering DOM.\n *\n * This function has following structure.\n *\n * ```\n * function Template<T>(ctx:T, creationMode: boolean) {\n * if (creationMode) {\n * // Contains creation mode instructions.\n * }\n * // Contains binding update instructions\n * }\n * ```\n *\n * Common instructions are:\n * Creation mode instructions:\n * - `elementStart`, `elementEnd`\n * - `text`\n * - `container`\n * - `listener`\n *\n * Binding update instructions:\n * - `bind`\n * - `elementAttribute`\n * - `elementProperty`\n * - `elementClass`\n * - `elementStyle`\n *\n */\n template: ComponentTemplate<T>;\n\n /**\n * Constants for the nodes in the component's view.\n * Includes attribute arrays, local definition arrays etc.\n */\n consts?: TConstantsOrFactory;\n\n /**\n * An array of `ngContent[selector]` values that were found in the template.\n */\n ngContentSelectors?: string[];\n /**\n * A list of optional features to apply.\n *\n * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}\n */\n features?: ComponentDefFeature[];\n\n /**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n */\n encapsulation?: ViewEncapsulation;\n\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n *\n * see: animation\n */\n data?: {[kind: string]: any};\n\n /**\n * A set of styles that the component needs to be present for component to render correctly.\n */\n styles?: string[];\n\n /**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n */\n changeDetection?: ChangeDetectionStrategy;\n\n /**\n * Registry of directives, components, and pipes that may be found in this component's view.\n *\n * This property is either an array of types or a function that returns the array of types. This\n * function may be necessary to support forward declarations.\n */\n dependencies?: TypeOrFactory<DependencyTypeList>;\n\n /**\n * The set of schemas that declare elements to be allowed in the component's template.\n */\n schemas?: SchemaMetadata[] | null;\n}\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyComponent {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nexport function ɵɵdefineComponent<T>(\n componentDefinition: ComponentDefinition<T>,\n): ComponentDef<any> {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n\n const baseDef = getNgDirectiveDef(componentDefinition as DirectiveDefinition<T>);\n const def: Writable<ComponentDef<T>> = {\n ...baseDef,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n template: componentDefinition.template,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null!, // assigned in noSideEffects\n pipeDefs: null!, // assigned in noSideEffects\n dependencies: (baseDef.standalone && componentDefinition.dependencies) || null,\n getStandaloneInjector: null,\n signals: componentDefinition.signals ?? false,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n id: '',\n };\n\n initFeatures(def);\n const dependencies = componentDefinition.dependencies;\n def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */ true);\n def.id = getComponentId(def);\n\n return def;\n });\n}\n\nexport function extractDirectiveDef(type: Type<any>): DirectiveDef<any> | ComponentDef<any> | null {\n return getComponentDef(type) || getDirectiveDef(type);\n}\n\nfunction nonNull<T>(value: T | null): value is T {\n return value !== null;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵdefineNgModule<T>(def: {\n /** Token representing the module. Used by DI. */\n type: T;\n\n /** List of components to bootstrap. */\n bootstrap?: Type<any>[] | (() => Type<any>[]);\n\n /** List of components, directives, and pipes declared by this module. */\n declarations?: Type<any>[] | (() => Type<any>[]);\n\n /** List of modules or `ModuleWithProviders` imported by this module. */\n imports?: Type<any>[] | (() => Type<any>[]);\n\n /**\n * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this\n * module.\n */\n exports?: Type<any>[] | (() => Type<any>[]);\n\n /** The set of schemas that declare elements to be allowed in the NgModule. */\n schemas?: SchemaMetadata[] | null;\n\n /** Unique ID for the module that is used with `getModuleFactory`. */\n id?: string | null;\n}): unknown {\n return noSideEffects(() => {\n const res: NgModuleDef<T> = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res;\n });\n}\n\n/**\n * Converts binding objects from the `DirectiveDefinition` into more efficient\n * lookup dictionaries that are optimized for the framework runtime.\n *\n * This function converts inputs or output directive information into new objects\n * where the public name conveniently maps to the minified internal field name.\n *\n * For inputs, the input flags are additionally persisted into the new data structure,\n * so that those can be quickly retrieved when needed.\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n *\n * inputSignal = input(3);\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * inputSignal: [InputFlags.SignalBased, 'inputSignal'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * minifiedInputSignal: [InputFlags.SignalBased, 'inputSignal'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName + isSignal if needed)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * 'inputSignal': ['minifiedInputSignal', InputFlags.SignalBased],\n * }\n * ```\n *\n * Optionally the function can take `declaredInputs` which will result\n * in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * 'inputSignal': 'inputSignal',\n * }\n * ```\n *\n\n */\nfunction parseAndConvertBindingsForDefinition<T>(\n obj: DirectiveDefinition<T>['outputs'] | undefined,\n): Record<keyof T, string>;\nfunction parseAndConvertBindingsForDefinition<T>(\n obj: DirectiveInputs<T> | undefined,\n declaredInputs: Record<string, string>,\n): Record<keyof T, string | [minifiedName: string, flags: InputFlags]>;\n\nfunction parseAndConvertBindingsForDefinition<T>(\n obj: undefined | DirectiveInputs<T> | DirectiveDefinition<T>['outputs'],\n declaredInputs?: Record<string, string>,\n): Record<keyof T, string | [minifiedName: string, flags: InputFlags]> {\n if (obj == null) return EMPTY_OBJ as any;\n const newLookup: any = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n const value = obj[minifiedKey]!;\n let publicName: string;\n let declaredName: string;\n let inputFlags = InputFlags.None;\n\n if (Array.isArray(value)) {\n inputFlags = value[0];\n publicName = value[1];\n declaredName = value[2] ?? publicName; // declared name might not be set to save bytes.\n } else {\n publicName = value;\n declaredName = value;\n }\n\n // For inputs, capture the declared name, or if some flags are set.\n if (declaredInputs) {\n // Perf note: An array is only allocated for the input if there are flags.\n newLookup[publicName] =\n inputFlags !== InputFlags.None ? [minifiedKey, inputFlags] : minifiedKey;\n declaredInputs[publicName] = declaredName as string;\n } else {\n newLookup[publicName] = minifiedKey;\n }\n }\n }\n return newLookup;\n}\n\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdefineDirective<T>(\n directiveDefinition: DirectiveDefinition<T>,\n): DirectiveDef<any> {\n return noSideEffects(() => {\n const def = getNgDirectiveDef(directiveDefinition);\n initFeatures(def);\n\n return def;\n });\n}\n\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nexport function ɵɵdefinePipe<T>(pipeDef: {\n /** Name of the pipe. Used for matching pipes in template to pipe defs. */\n name: string;\n\n /** Pipe class reference. Needed to extract pipe lifecycle hooks. */\n type: Type<T>;\n\n /** Whether the pipe is pure. */\n pure?: boolean;\n\n /**\n * Whether the pipe is standalone.\n */\n standalone?: boolean;\n}): unknown {\n return <PipeDef<T>>{\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null,\n };\n}\n\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n\nexport function getComponentDef<T>(type: any): ComponentDef<T> | null {\n return type[NG_COMP_DEF] || null;\n}\n\nexport function getDirectiveDef<T>(type: any): DirectiveDef<T> | null {\n return type[NG_DIR_DEF] || null;\n}\n\nexport function getPipeDef<T>(type: any): PipeDef<T> | null {\n return type[NG_PIPE_DEF] || null;\n}\n\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See [this guide](guide/components/importing) for additional information:\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nexport function isStandalone(type: Type<unknown>): boolean {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n return def !== null ? def.standalone : false;\n}\n\nexport function getNgModuleDef<T>(type: any, throwNotFound: true): NgModuleDef<T>;\nexport function getNgModuleDef<T>(type: any): NgModuleDef<T> | null;\nexport function getNgModuleDef<T>(type: any, throwNotFound?: boolean): NgModuleDef<T> | null {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\n\nfunction getNgDirectiveDef<T>(directiveDefinition: DirectiveDefinition<T>): DirectiveDef<T> {\n const declaredInputs: Record<string, string> = {};\n\n return {\n type: directiveDefinition.type,\n providersResolver: null,\n factory: null,\n hostBindings: directiveDefinition.hostBindings || null,\n hostVars: directiveDefinition.hostVars || 0,\n hostAttrs: directiveDefinition.hostAttrs || null,\n contentQueries: directiveDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputTransforms: null,\n inputConfig: directiveDefinition.inputs || EMPTY_OBJ,\n exportAs: directiveDefinition.exportAs || null,\n standalone: directiveDefinition.standalone === true,\n signals: directiveDefinition.signals === true,\n selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n viewQuery: directiveDefinition.viewQuery || null,\n features: directiveDefinition.features || null,\n setInput: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n inputs: parseAndConvertBindingsForDefinition(directiveDefinition.inputs, declaredInputs),\n outputs: parseAndConvertBindingsForDefinition(directiveDefinition.outputs),\n debugInfo: null,\n };\n}\n\nfunction initFeatures<T>(definition: DirectiveDef<T> | ComponentDef<T>): void {\n definition.features?.forEach((fn) => fn(definition));\n}\n\nexport function extractDefListOrFactory(\n dependencies: TypeOrFactory<DependencyTypeList> | undefined,\n pipeDef: false,\n): DirectiveDefListOrFactory | null;\nexport function extractDefListOrFactory(\n dependencies: TypeOrFactory<DependencyTypeList> | undefined,\n pipeDef: true,\n): PipeDefListOrFactory | null;\nexport function extractDefListOrFactory(\n dependencies: TypeOrFactory<DependencyTypeList> | undefined,\n pipeDef: boolean,\n): unknown {\n if (!dependencies) {\n return null;\n }\n\n const defExtractor = pipeDef ? getPipeDef : extractDirectiveDef;\n\n return () =>\n (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map((dep) => defExtractor(dep))\n .filter(nonNull);\n}\n\n/**\n * A map that contains the generated component IDs and type.\n */\nexport const GENERATED_COMP_IDS = new Map<string, Type<unknown>>();\n\n/**\n * A method can returns a component ID from the component definition using a variant of DJB2 hash\n * algorithm.\n */\nfunction getComponentId<T>(componentDef: ComponentDef<T>): string {\n let hash = 0;\n\n // We cannot rely solely on the component selector as the same selector can be used in different\n // modules.\n //\n // `componentDef.style` is not used, due to it causing inconsistencies. Ex: when server\n // component styles has no sourcemaps and browsers do.\n //\n // Example:\n // https://github.com/angular/components/blob/d9f82c8f95309e77a6d82fd574c65871e91354c2/src/material/core/option/option.ts#L248\n // https://github.com/angular/components/blob/285f46dc2b4c5b127d356cb7c4714b221f03ce50/src/material/legacy-core/option/option.ts#L32\n\n const hashSelectors = [\n componentDef.selectors,\n componentDef.ngContentSelectors,\n componentDef.hostVars,\n componentDef.hostAttrs,\n componentDef.consts,\n componentDef.vars,\n componentDef.decls,\n componentDef.encapsulation,\n componentDef.standalone,\n componentDef.signals,\n componentDef.exportAs,\n JSON.stringify(componentDef.inputs),\n JSON.stringify(componentDef.outputs),\n // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not\n // match in the server and browser bundles.\n Object.getOwnPropertyNames(componentDef.type.prototype),\n !!componentDef.contentQueries,\n !!componentDef.viewQuery,\n ].join('|');\n\n for (const char of hashSelectors) {\n hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n }\n\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n\n const compId = 'c' + hash;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (GENERATED_COMP_IDS.has(compId)) {\n const previousCompDefType = GENERATED_COMP_IDS.get(compId)!;\n if (previousCompDefType !== componentDef.type) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.COMPONENT_ID_COLLISION,\n `Component ID generation collision detected. Components '${\n previousCompDefType.name\n }' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(\n componentDef.selectors,\n )}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`,\n ),\n );\n }\n } else {\n GENERATED_COMP_IDS.set(compId, componentDef.type);\n }\n }\n\n return compId;\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {getComponentDef} from '../render3/definition';\nimport {getFactoryDef} from '../render3/definition_factory';\nimport {throwCyclicDependencyError, throwInvalidProviderError} from '../render3/errors_di';\nimport {stringifyForError} from '../render3/util/stringify_utils';\nimport {deepForEach} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {getClosureSafeProperty} from '../util/property';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nimport {ɵɵinject as inject} from './injector_compatibility';\nimport {getInjectorDef, InjectorType, InjectorTypeWithProviders} from './interface/defs';\nimport {\n ClassProvider,\n ConstructorProvider,\n EnvironmentProviders,\n ExistingProvider,\n FactoryProvider,\n ImportedNgModuleProviders,\n InternalEnvironmentProviders,\n isEnvironmentProviders,\n ModuleWithProviders,\n Provider,\n StaticClassProvider,\n TypeProvider,\n ValueProvider,\n} from './interface/provider';\nimport {INJECTOR_DEF_TYPES} from './internal_tokens';\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n */\nexport function makeEnvironmentProviders(\n providers: (Provider | EnvironmentProviders)[],\n): EnvironmentProviders {\n return {\n ɵproviders: providers,\n } as unknown as EnvironmentProviders;\n}\n\n/**\n * A source of providers for the `importProvidersFrom` function.\n *\n * @publicApi\n */\nexport type ImportProvidersSource =\n | Type<unknown>\n | ModuleWithProviders<unknown>\n | Array<ImportProvidersSource>;\n\ntype WalkProviderTreeVisitor = (\n provider: SingleProvider,\n container: Type<unknown> | InjectorType<unknown>,\n) => void;\n\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nexport function importProvidersFrom(...sources: ImportProvidersSource[]): EnvironmentProviders {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true,\n } as InternalEnvironmentProviders;\n}\n\nexport function internalImportProvidersFrom(\n checkForStandaloneCmp: boolean,\n ...sources: ImportProvidersSource[]\n): Provider[] {\n const providersOut: SingleProvider[] = [];\n const dedup = new Set<Type<unknown>>(); // already seen types\n let injectorTypesWithProviders: InjectorTypeWithProviders<unknown>[] | undefined;\n\n const collectProviders: WalkProviderTreeVisitor = (provider) => {\n providersOut.push(provider);\n };\n\n deepForEach(sources, (source) => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(\n RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE,\n `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(\n source,\n )}\"`,\n );\n }\n }\n\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source as Type<unknown> | InjectorTypeWithProviders<unknown>;\n if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n }\n\n return providersOut;\n}\n\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(\n typesWithProviders: InjectorTypeWithProviders<unknown>[],\n visitor: WalkProviderTreeVisitor,\n): void {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {ngModule, providers} = typesWithProviders[i];\n deepForEachProvider(\n providers! as Array<Provider | InternalEnvironmentProviders>,\n (provider) => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n visitor(provider, ngModule);\n },\n );\n }\n}\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\nexport type SingleProvider =\n | TypeProvider\n | ValueProvider\n | ClassProvider\n | ConstructorProvider\n | ExistingProvider\n | FactoryProvider\n | StaticClassProvider;\n\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\nexport function walkProviderTree(\n container: Type<unknown> | InjectorTypeWithProviders<unknown>,\n visitor: WalkProviderTreeVisitor,\n parents: Type<unknown>[],\n dedup: Set<Type<unknown>>,\n): container is InjectorTypeWithProviders<unknown> {\n container = resolveForwardRef(container);\n if (!container) return false;\n\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType: Type<unknown> | null = null;\n\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule: Type<unknown> | undefined = (container as InjectorTypeWithProviders<any>)\n .ngModule as Type<unknown> | undefined;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule!;\n } else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n } else if (cmpDef && !cmpDef.standalone) {\n return false;\n } else {\n defType = container as Type<unknown>;\n }\n\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n\n if (cmpDef.dependencies) {\n const deps =\n typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, visitor, parents, dedup);\n }\n }\n } else if (injDef) {\n // First, include providers from any imports.\n if (injDef.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedup.add(defType);\n\n let importTypesWithProviders: InjectorTypeWithProviders<any>[] | undefined;\n try {\n deepForEach(injDef.imports, (imported) => {\n if (walkProviderTree(imported, visitor, parents, dedup)) {\n importTypesWithProviders ||= [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n }\n }\n\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType!());\n\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n\n // Provider to create `defType` using its factory.\n visitor({provide: defType, useFactory: factory, deps: EMPTY_ARRAY}, defType);\n\n // Make this `defType` available to an internal logic that calculates injector scope.\n visitor({provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true}, defType);\n\n // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.\n visitor(\n {provide: ENVIRONMENT_INITIALIZER, useValue: () => inject(defType!), multi: true},\n defType,\n );\n }\n\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers as Array<SingleProvider | InternalEnvironmentProviders>;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container as InjectorType<any>;\n deepForEachProvider(defProviders, (provider) => {\n ngDevMode && validateProvider(provider as SingleProvider, defProviders, injectorType);\n visitor(provider, injectorType);\n });\n }\n } else {\n // Should not happen, but just in case.\n return false;\n }\n\n return (\n defType !== container && (container as InjectorTypeWithProviders<any>).providers !== undefined\n );\n}\n\nfunction validateProvider(\n provider: SingleProvider,\n providers: Array<SingleProvider | InternalEnvironmentProviders>,\n containerType: Type<unknown>,\n): void {\n if (\n isTypeProvider(provider) ||\n isValueProvider(provider) ||\n isFactoryProvider(provider) ||\n isExistingProvider(provider)\n ) {\n return;\n }\n\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(\n provider && ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide),\n );\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\n\nfunction deepForEachProvider(\n providers: Array<Provider | InternalEnvironmentProviders>,\n fn: (provider: SingleProvider) => void,\n): void {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n } else {\n fn(provider);\n }\n }\n}\n\nexport const USE_VALUE = getClosureSafeProperty<ValueProvider>({\n provide: String,\n useValue: getClosureSafeProperty,\n});\n\nexport function isValueProvider(value: SingleProvider): value is ValueProvider {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\n\nexport function isExistingProvider(value: SingleProvider): value is ExistingProvider {\n return !!(value && (value as ExistingProvider).useExisting);\n}\n\nexport function isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n return !!(value as StaticClassProvider | ClassProvider).useClass;\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.dev/license\n */\n\nimport {InjectionToken} from './injection_token';\n\nexport type InjectorScope = 'root' | 'platform' | 'environment';\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const INJECTOR_SCOPE = new InjectionToken<InjectorScope | null>(\n ngDevMode ? 'Set Injector scope.' : '',\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.dev/license\n */\n\nimport '../util/ng_dev_mode';\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {OnDestroy} from '../interface/lifecycle_hooks';\nimport {Type} from '../interface/type';\nimport {\n emitInstanceCreatedByInjectorEvent,\n emitProviderConfiguredEvent,\n InjectorProfilerContext,\n runInInjectorProfilerContext,\n setInjectorProfilerContext,\n} from '../render3/debug/injector_profiler';\nimport {FactoryFn, getFactoryDef} from '../render3/definition_factory';\nimport {\n throwCyclicDependencyError,\n throwInvalidProviderError,\n throwMixedMultiProviderError,\n} from '../render3/errors_di';\nimport {NG_ENV_ID} from '../render3/fields';\nimport {newArray} from '../util/array_utils';\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport {resolveForwardRef} from './forward_ref';\nimport {ENVIRONMENT_INITIALIZER} from './initializer_token';\nimport {setInjectImplementation} from './inject_switch';\nimport {InjectionToken} from './injection_token';\nimport type {Injector} from './injector';\nimport {\n catchInjectorError,\n convertToBitFlags,\n injectArgs,\n NG_TEMP_TOKEN_PATH,\n setCurrentInjector,\n THROW_IF_NOT_FOUND,\n ɵɵinject,\n} from './injector_compatibility';\nimport {INJECTOR} from './injector_token';\nimport {\n getInheritedInjectableDef,\n getInjectableDef,\n InjectorType,\n ɵɵInjectableDeclaration,\n} from './interface/defs';\nimport {InjectFlags, InjectOptions} from './interface/injector';\nimport {\n ClassProvider,\n ConstructorProvider,\n EnvironmentProviders,\n InternalEnvironmentProviders,\n isEnvironmentProviders,\n Provider,\n StaticClassProvider,\n TypeProvider,\n} from './interface/provider';\nimport {INJECTOR_DEF_TYPES} from './internal_tokens';\nimport {NullInjector} from './null_injector';\nimport {\n isExistingProvider,\n isFactoryProvider,\n isTypeProvider,\n isValueProvider,\n SingleProvider,\n} from './provider_collection';\nimport {ProviderToken} from './provider_token';\nimport {INJECTOR_SCOPE, InjectorScope} from './scope';\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector | undefined = undefined;\n\nexport function getNullInjector(): Injector {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n factory: (() => T) | undefined;\n value: T | {};\n multi: any[] | undefined;\n}\n\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nexport abstract class EnvironmentInjector implements Injector {\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: undefined,\n options: InjectOptions & {\n optional?: false;\n },\n ): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: null | undefined,\n options: InjectOptions,\n ): T | null;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n * @deprecated use object-based flags (`InjectOptions`) instead.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * Runs the given function in the context of this `EnvironmentInjector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject\n * dependencies from this injector. Note that `inject` is only usable synchronously, and cannot be\n * used in any asynchronous callbacks or after any `await` points.\n *\n * @param fn the closure to be run in the context of this injector\n * @returns the return value of the function, if any\n * @deprecated use the standalone function `runInInjectionContext` instead\n */\n abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;\n\n abstract destroy(): void;\n\n /**\n * @internal\n */\n abstract onDestroy(callback: () => void): () => void;\n}\n\nexport class R3Injector extends EnvironmentInjector {\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n private records = new Map<ProviderToken<any>, Record<any> | null>();\n\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n private _ngOnDestroyHooks = new Set<OnDestroy>();\n\n private _onDestroyHooks: Array<() => void> = [];\n\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed(): boolean {\n return this._destroyed;\n }\n private _destroyed = false;\n\n private injectorDefTypes: Set<Type<unknown>>;\n\n constructor(\n providers: Array<Provider | EnvironmentProviders>,\n readonly parent: Injector,\n readonly source: string | null,\n readonly scopes: Set<InjectorScope>,\n ) {\n super();\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers as Array<Provider | InternalEnvironmentProviders>, (provider) =>\n this.processProvider(provider),\n );\n\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE) as Record<InjectorScope | null>;\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value as InjectorScope);\n }\n\n this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, InjectFlags.Self));\n }\n\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n override destroy(): void {\n this.assertNotDestroyed();\n\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n const prevConsumer = setActiveConsumer(null);\n try {\n // Call all the lifecycle hooks.\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n const onDestroyHooks = this._onDestroyHooks;\n // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n this._onDestroyHooks = [];\n for (const hook of onDestroyHooks) {\n hook();\n }\n } finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n setActiveConsumer(prevConsumer);\n }\n }\n\n override onDestroy(callback: () => void): () => void {\n this.assertNotDestroyed();\n this._onDestroyHooks.push(callback);\n return () => this.removeOnDestroy(callback);\n }\n\n override runInContext<ReturnT>(fn: () => ReturnT): ReturnT {\n this.assertNotDestroyed();\n\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n\n let prevInjectContext: InjectorProfilerContext | undefined;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({injector: this, token: null});\n }\n\n try {\n return fn();\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n }\n }\n\n override get<T>(\n token: ProviderToken<T>,\n notFoundValue: any = THROW_IF_NOT_FOUND,\n flags: InjectFlags | InjectOptions = InjectFlags.Default,\n ): T {\n this.assertNotDestroyed();\n\n if (token.hasOwnProperty(NG_ENV_ID)) {\n return (token as any)[NG_ENV_ID](this);\n }\n\n flags = convertToBitFlags(flags) as InjectFlags;\n\n // Set the injection context.\n let prevInjectContext: InjectorProfilerContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({injector: this, token: token as Type<T>});\n }\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record: Record<T> | undefined | null = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token as Type<T>, () => {\n emitProviderConfiguredEvent(token as TypeProvider);\n });\n }\n\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue =\n flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e: any) {\n if (e.name === 'NullInjectorError') {\n const path: any[] = (e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []);\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n }\n }\n\n /** @internal */\n resolveInjectorInitializers() {\n const prevConsumer = setActiveConsumer(null);\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext: InjectorProfilerContext | undefined;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({injector: this, token: null});\n }\n\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof initializers}). ` +\n 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.',\n );\n }\n for (const initializer of initializers) {\n initializer();\n }\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n setActiveConsumer(prevConsumer);\n }\n }\n\n override toString() {\n const tokens: string[] = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n\n assertNotDestroyed(): void {\n if (this._destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n ngDevMode && 'Injector has already been destroyed.',\n );\n }\n }\n\n /**\n * Process a `SingleProvider` and add it.\n */\n private processProvider(provider: SingleProvider): void {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token: any = isTypeProvider(provider)\n ? provider\n : resolveForwardRef(provider && provider.provide);\n\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider);\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n // Emit InjectorProfilerEventType.Create if provider is a value provider because\n // these are the only providers that do not go through the value hydration logic\n // where this event would normally be emitted from.\n if (isValueProvider(provider)) {\n emitInstanceCreatedByInjectorEvent(provider.useValue);\n }\n\n emitProviderConfiguredEvent(provider);\n });\n }\n\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord!.multi!);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi!.push(provider);\n } else {\n if (ngDevMode) {\n const existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n }\n this.records.set(token, record);\n }\n\n private hydrate<T>(token: ProviderToken<T>, record: Record<T>): T {\n const prevConsumer = setActiveConsumer(null);\n try {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token as Type<T>, () => {\n record.value = record.factory!();\n emitInstanceCreatedByInjectorEvent(record.value);\n });\n } else {\n record.value = record.factory!();\n }\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value as T;\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n\n private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || this.scopes.has(providedIn);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n\n private removeOnDestroy(callback: () => void): void {\n const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n if (destroyCBIdx !== -1) {\n this._onDestroyHooks.splice(destroyCBIdx, 1);\n }\n }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: ProviderToken<any>): FactoryFn<any> {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n if (factory !== null) {\n return factory;\n }\n\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`,\n );\n }\n\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n\n // There was no way to resolve a factory for this token.\n throw new RuntimeError(RuntimeErrorCode.INVALID_INJECTION_TOKEN, ngDevMode && 'unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, '?').join(\n ', ',\n )}).`,\n );\n }\n\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token as Type<any>);\n } else {\n return () => new (token as Type<any>)();\n }\n}\n\nfunction providerToRecord(provider: SingleProvider): Record<any> {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory: (() => any) | undefined = providerToFactory(provider);\n return makeRecord(factory, NOT_YET);\n }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(\n provider: SingleProvider,\n ngModuleType?: InjectorType<any>,\n providers?: any[],\n): () => any {\n let factory: (() => any) | undefined = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else {\n const classRef = resolveForwardRef(\n provider &&\n ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide),\n );\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new classRef(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\n\nfunction makeRecord<T>(\n factory: (() => T) | undefined,\n value: T | {},\n multi: boolean = false,\n): Record<T> {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\n\nfunction hasDeps(\n value: ClassProvider | ConstructorProvider | StaticClassProvider,\n): value is ClassProvider & {deps: any[]} {\n return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n return (\n value !== null &&\n typeof value === 'object' &&\n typeof (value as OnDestroy).ngOnDestroy === 'function'\n );\n}\n\nfunction couldBeInjectableType(value: any): value is ProviderToken<any> {\n return (\n typeof value === 'function' || (typeof value === 'object' && value instanceof InjectionToken)\n );\n}\n\nfunction forEachSingleProvider(\n providers: Array<Provider | EnvironmentProviders>,\n fn: (provider: SingleProvider) => void,\n): void {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n } else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n } else {\n fn(provider as SingleProvider);\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {\n InjectorProfilerContext,\n setInjectorProfilerContext,\n} from '../render3/debug/injector_profiler';\n\nimport {getInjectImplementation, setInjectImplementation} from './inject_switch';\nimport type {Injector} from './injector';\nimport {getCurrentInjector, setCurrentInjector} from './injector_compatibility';\nimport {R3Injector} from './r3_injector';\n\n/**\n * Runs the given function in the [context](guide/di/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n * is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nexport function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT {\n if (injector instanceof R3Injector) {\n injector.assertNotDestroyed();\n }\n\n let prevInjectorProfilerContext: InjectorProfilerContext;\n if (ngDevMode) {\n prevInjectorProfilerContext = setInjectorProfilerContext({injector, token: null});\n }\n const prevInjector = setCurrentInjector(injector);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n } finally {\n setCurrentInjector(prevInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext!);\n setInjectImplementation(previousInjectImplementation);\n }\n}\n\n/**\n * Whether the current stack frame is inside an injection context.\n */\nexport function isInInjectionContext(): boolean {\n return getInjectImplementation() !== undefined || getCurrentInjector() != null;\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/di/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nexport function assertInInjectionContext(debugFn: Function): void {\n // Taking a `Function` instead of a string name here prevents the unminified name of the function\n // from being retained in the bundle regardless of minification.\n if (!isInInjectionContext()) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n ngDevMode &&\n debugFn.name +\n '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`',\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.dev/license\n */\n\nimport type {ChangeDetectionScheduler} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {TDeferBlockDetails} from '../../defer/interfaces';\nimport type {Injector} from '../../di/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {DehydratedView} from '../../hydration/interfaces';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {Sanitizer} from '../../sanitization/sanitizer';\nimport type {AfterRenderManager} from '../after_render/manager';\nimport type {ReactiveLViewConsumer} from '../reactive_lview_consumer';\nimport type {EffectScheduler} from '../reactivity/effect';\n\nimport {LContainer} from './container';\nimport {\n ComponentDef,\n ComponentTemplate,\n DirectiveDef,\n DirectiveDefList,\n HostBindingsFunction,\n PipeDef,\n PipeDefList,\n ViewQueriesFunction,\n} from './definition';\nimport {I18nUpdateOpCodes, TI18n, TIcu} from './i18n';\nimport {TConstants, TNode} from './node';\nimport type {LQueries, TQueries} from './query';\nimport {Renderer, RendererFactory} from './renderer';\nimport {RElement} from './renderer_dom';\nimport {TStylingKey, TStylingRange} from './styling';\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nexport const HOST = 0;\nexport const TVIEW = 1;\n\n// Shared with LContainer\nexport const FLAGS = 2;\nexport const PARENT = 3;\nexport const NEXT = 4;\nexport const T_HOST = 5;\n// End shared with LContainer\n\nexport const HYDRATION = 6;\nexport const CLEANUP = 7;\nexport const CONTEXT = 8;\nexport const INJECTOR = 9;\nexport const ENVIRONMENT = 10;\nexport const RENDERER = 11;\nexport const CHILD_HEAD = 12;\nexport const CHILD_TAIL = 13;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nexport const DECLARATION_VIEW = 14;\nexport const DECLARATION_COMPONENT_VIEW = 15;\nexport const DECLARATION_LCONTAINER = 16;\nexport const PREORDER_HOOK_FLAGS = 17;\nexport const QUERIES = 18;\nexport const ID = 19;\nexport const EMBEDDED_VIEW_INJECTOR = 20;\nexport const ON_DESTROY_HOOKS = 21;\nexport const EFFECTS_TO_SCHEDULE = 22;\nexport const REACTIVE_TEMPLATE_CONSUMER = 23;\n\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nexport const HEADER_OFFSET = 25;\n\n// This interface replaces the real LView interface if it is an arg or a\n// return value of a public instruction. This ensures we don't need to expose\n// the actual interface, which should be kept private.\nexport interface OpaqueViewState {\n '__brand__': 'Brand for OpaqueViewState that nothing will match';\n}\n\n/**\n * `LView` stores all of the information needed to process the instructions as\n * they are invoked from the template. Each embedded view and component view has its\n * own `LView`. When processing a particular view, we set the `viewData` to that\n * `LView`. When that view is done processing, the `viewData` is set back to\n * whatever the original `viewData` was before (the parent `LView`).\n *\n * Keeping separate state for each view facilities view insertion / deletion, so we\n * don't have to edit the data array based on which views are present.\n */\nexport interface LView<T = unknown> extends Array<any> {\n /**\n * The node into which this `LView` is inserted.\n */\n [HOST]: RElement | null;\n\n /**\n * The static data for this view. We need a reference to this so we can easily walk up the\n * node tree in DI and get the TView.data array associated with a node (where the\n * directive defs are stored).\n */\n readonly [TVIEW]: TView;\n\n /** Flags for this view. See LViewFlags for more info. */\n [FLAGS]: LViewFlags;\n\n /**\n * This may store an {@link LView} or {@link LContainer}.\n *\n * `LView` - The parent view. This is needed when we exit the view and must restore the previous\n * LView. Without this, the render method would have to keep a stack of\n * views as it is recursively rendering templates.\n *\n * `LContainer` - The current view is part of a container, and is an embedded view.\n */\n [PARENT]: LView | LContainer | null;\n\n /**\n *\n * The next sibling LView or LContainer.\n *\n * Allows us to propagate between sibling view states that aren't in the same\n * container. Embedded views already have a node.next, but it is only set for\n * views in the same container. We need a way to link component views and views\n * across containers as well.\n */\n [NEXT]: LView | LContainer | null;\n\n /** Queries active for this view - nodes from a view are reported to those queries. */\n [QUERIES]: LQueries | null;\n\n /**\n * Store the `TNode` of the location where the current `LView` is inserted into.\n *\n * Given:\n * ```\n * <div>\n * <ng-template><span></span></ng-template>\n * </div>\n * ```\n *\n * We end up with two `TView`s.\n * - `parent` `TView` which contains `<div><!-- anchor --></div>`\n * - `child` `TView` which contains `<span></span>`\n *\n * Typically the `child` is inserted into the declaration location of the `parent`, but it can be\n * inserted anywhere. Because it can be inserted anywhere it is not possible to store the\n * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.\n *\n * So to determine where is our insertion parent we would execute:\n * ```\n * const parentLView = lView[PARENT];\n * const parentTNode = lView[T_HOST];\n * const insertionParent = parentLView[parentTNode.index];\n * ```\n *\n *\n * If `null`, this is the root view of an application (root component is in this view) and it has\n * no parents.\n */\n [T_HOST]: TNode | null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This context array stores both listener functions wrapped with\n * their context and output subscription instances for a particular view.\n *\n * These change per LView instance, so they cannot be stored on TView. Instead,\n * TView.cleanup saves an index to the necessary context in this array.\n *\n * After `LView` is created it is possible to attach additional instance specific functions at the\n * end of the `lView[CLEANUP]` because we know that no more `T` level cleanup functions will be\n * added here.\n */\n [CLEANUP]: any[] | null;\n\n /**\n * - For dynamic views, this is the context with which to render the template (e.g.\n * `NgForContext`), or `{}` if not defined explicitly.\n * - For root view of the root component it's a reference to the component instance itself.\n * - For components, the context is a reference to the component instance itself.\n * - For inline views, the context is null.\n */\n [CONTEXT]: T;\n\n /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */\n readonly [INJECTOR]: Injector | null;\n\n /**\n * Contextual data that is shared across multiple instances of `LView` in the same application.\n */\n [ENVIRONMENT]: LViewEnvironment;\n\n /** Renderer to be used for this view. */\n [RENDERER]: Renderer;\n\n /**\n * Reference to the first LView or LContainer beneath this LView in\n * the hierarchy.\n *\n * Necessary to store this so views can traverse through their nested views\n * to remove listeners and call onDestroy callbacks.\n */\n [CHILD_HEAD]: LView | LContainer | null;\n\n /**\n * The last LView or LContainer beneath this LView in the hierarchy.\n *\n * The tail allows us to quickly add a new state to the end of the view list\n * without having to propagate starting from the first child.\n */\n [CHILD_TAIL]: LView | LContainer | null;\n\n /**\n * View where this view's template was declared.\n *\n * The template for a dynamically created view may be declared in a different view than\n * it is inserted. We already track the \"insertion view\" (view where the template was\n * inserted) in LView[PARENT], but we also need access to the \"declaration view\"\n * (view where the template was declared). Otherwise, we wouldn't be able to call the\n * view's template function with the proper contexts. Context should be inherited from\n * the declaration view tree, not the insertion view tree.\n *\n * Example (AppComponent template):\n *\n * <ng-template #foo></ng-template> <-- declared here -->\n * <some-comp [tpl]=\"foo\"></some-comp> <-- inserted inside this component -->\n *\n * The <ng-template> above is declared in the AppComponent template, but it will be passed into\n * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,\n * but the insertion view would be SomeComp. When we are removing views, we would want to\n * traverse through the insertion view to clean up listeners. When we are calling the\n * template function during change detection, we need the declaration view to get inherited\n * context.\n */\n [DECLARATION_VIEW]: LView | null;\n\n /**\n * Points to the declaration component view, used to track transplanted `LView`s.\n *\n * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas\n * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as\n * `DECLARATION_VIEW`.\n *\n * Example:\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"true\">\n * <ng-template #myTmpl>...</ng-template>\n * </div>\n * </#VIEW>\n * ```\n * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas\n * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.\n *\n * The reason for this is that all embedded views are always check-always whereas the component\n * view can be check-always or on-push. When we have a transplanted view it is important to\n * determine if we have transplanted a view from check-always declaration to on-push insertion\n * point. In such a case the transplanted view needs to be added to the `LContainer` in the\n * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion\n * point.) (Any transplanted views which are intra Component are of no interest because the CD\n * strategy of declaration and insertion will always be the same, because it is the same\n * component.)\n *\n * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and\n * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same\n * component `LView`. Transplanted views are a subset of moved views, and we use\n * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.\n *\n * Example showing intra component `LView` movement.\n * ```\n * <#VIEW #myComp>\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * </#VIEW>\n * ```\n * The `thenBlock` and `elseBlock` is moved but not transplanted.\n *\n * Example showing inter component `LView` movement (transplanted view).\n * ```\n * <#VIEW #myComp>\n * <ng-template #myTmpl>...</ng-template>\n * <insertion-component [template]=\"myTmpl\"></insertion-component>\n * </#VIEW>\n * ```\n * In the above example `myTmpl` is passed into a different component. If `insertion-component`\n * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be\n * marked as containing transplanted views and those views need to be CD as part of the\n * declaration CD.\n *\n *\n * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where\n * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match\n * (it has been transplanted across components.)\n *\n * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the\n * simplest / most common case).\n *\n * see also:\n * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem\n * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.\n * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted\n * - `LView[DECLARATION_LCONTAINER]` similar problem for queries\n * - `LContainer[MOVED_VIEWS]` similar problem for queries\n */\n [DECLARATION_COMPONENT_VIEW]: LView;\n\n /**\n * A declaration point of embedded views (ones instantiated based on the content of a\n * <ng-template>), null for other types of views.\n *\n * We need to track all embedded views created from a given declaration point so we can prepare\n * query matches in a proper order (query matches are ordered based on their declaration point and\n * _not_ the insertion point).\n */\n [DECLARATION_LCONTAINER]: LContainer | null;\n\n /**\n * More flags for this view. See PreOrderHookFlags for more info.\n */\n [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;\n\n /** Unique ID of the view. Used for `__ngContext__` lookups in the `LView` registry. */\n [ID]: number;\n\n /**\n * A container related to hydration annotation information that's associated with this LView.\n */\n [HYDRATION]: DehydratedView | null;\n\n /**\n * Optional injector assigned to embedded views that takes\n * precedence over the element and module injectors.\n */\n readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;\n\n /**\n * Effect scheduling operations that need to run during this views's update pass.\n */\n [EFFECTS_TO_SCHEDULE]: Array<() => void> | null;\n\n /**\n * A collection of callbacks functions that are executed when a given LView is destroyed. Those\n * are user defined, LView-specific destroy callbacks that don't have any corresponding TView\n * entries.\n */\n [ON_DESTROY_HOOKS]: Array<() => void> | null;\n\n /**\n * The `Consumer` for this `LView`'s template so that signal reads can be tracked.\n *\n * This is initially `null` and gets assigned a consumer after template execution\n * if any signals were read.\n */\n [REACTIVE_TEMPLATE_CONSUMER]: ReactiveLViewConsumer | null;\n}\n\n/**\n * Contextual data that is shared across multiple instances of `LView` in the same application.\n */\nexport interface LViewEnvironment {\n /** Factory to be used for creating Renderer. */\n rendererFactory: RendererFactory;\n\n /** An optional custom sanitizer. */\n sanitizer: Sanitizer | null;\n\n /** Container for reactivity system `effect`s. */\n inlineEffectRunner: EffectScheduler | null;\n\n /** Scheduler for change detection to notify when application state changes. */\n changeDetectionScheduler: ChangeDetectionScheduler | null;\n}\n\n/** Flags associated with an LView (saved in LView[FLAGS]) */\nexport const enum LViewFlags {\n /** The state of the init phase on the first 2 bits */\n InitPhaseStateIncrementer = 0b00000000001,\n InitPhaseStateMask = 0b00000000011,\n\n /**\n * Whether or not the view is in creationMode.\n *\n * This must be stored in the view rather than using `data` as a marker so that\n * we can properly support embedded views. Otherwise, when exiting a child view\n * back into the parent view, `data` will be defined and `creationMode` will be\n * improperly reported as false.\n */\n CreationMode = 1 << 2,\n\n /**\n * Whether or not this LView instance is on its first processing pass.\n *\n * An LView instance is considered to be on its \"first pass\" until it\n * has completed one creation mode run and one update mode run. At this\n * time, the flag is turned off.\n */\n FirstLViewPass = 1 << 3,\n\n /** Whether this view has default change detection strategy (checks always) or onPush */\n CheckAlways = 1 << 4,\n\n /** Whether there are any i18n blocks inside this LView. */\n HasI18n = 1 << 5,\n\n /** Whether or not this view is currently dirty (needing check) */\n Dirty = 1 << 6,\n\n /** Whether or not this view is currently attached to change detection tree. */\n Attached = 1 << 7,\n\n /** Whether or not this view is destroyed. */\n Destroyed = 1 << 8,\n\n /** Whether or not this view is the root view */\n IsRoot = 1 << 9,\n\n /**\n * Whether this moved LView was needs to be refreshed. Similar to the Dirty flag, but used for\n * transplanted and signal views where the parent/ancestor views are not marked dirty as well.\n * i.e. \"Refresh just this view\". Used in conjunction with the HAS_CHILD_VIEWS_TO_REFRESH\n * flag.\n */\n RefreshView = 1 << 10,\n\n /** Indicates that the view **or any of its ancestors** have an embedded view injector. */\n HasEmbeddedViewInjector = 1 << 11,\n\n /** Indicates that the view was created with `signals: true`. */\n SignalView = 1 << 12,\n\n /**\n * Indicates that this LView has a view underneath it that needs to be refreshed during change\n * detection. This flag indicates that even if this view is not dirty itself, we still need to\n * traverse its children during change detection.\n */\n HasChildViewsToRefresh = 1 << 13,\n\n /**\n * This is the count of the bits the 1 was shifted above (base 10)\n */\n IndexWithinInitPhaseShift = 14,\n\n /**\n * Index of the current init phase on last 21 bits\n */\n IndexWithinInitPhaseIncrementer = 1 << IndexWithinInitPhaseShift,\n\n // Subtracting 1 gives all 1s to the right of the initial shift\n // So `(1 << 3) - 1` would give 3 1s: 1 << 3 = 0b01000, subtract 1 = 0b00111\n IndexWithinInitPhaseReset = (1 << IndexWithinInitPhaseShift) - 1,\n}\n\n/**\n * Possible states of the init phase:\n * - 00: OnInit hooks to be run.\n * - 01: AfterContentInit hooks to be run\n * - 10: AfterViewInit hooks to be run\n * - 11: All init hooks have been run\n */\nexport const enum InitPhaseState {\n OnInitHooksToBeRun = 0b00,\n AfterContentInitHooksToBeRun = 0b01,\n AfterViewInitHooksToBeRun = 0b10,\n InitPhaseCompleted = 0b11,\n}\n\n/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */\nexport const enum PreOrderHookFlags {\n /**\n The index of the next pre-order hook to be called in the hooks array, on the first 16\n bits\n */\n IndexOfTheNextPreOrderHookMaskMask = 0b01111111111111111,\n\n /**\n * The number of init hooks that have already been called, on the last 16 bits\n */\n NumberOfInitHooksCalledIncrementer = 0b010000000000000000,\n NumberOfInitHooksCalledShift = 16,\n NumberOfInitHooksCalledMask = 0b11111111111111110000000000000000,\n}\n\n/**\n * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.\n *\n * In order to invoke `HostBindingsFunction` we need:\n * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.\n * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will\n * become the context for the `HostBindingsFunction` invocation.)\n * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally\n * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to\n * it.\n * 4. `HostBindingsFunction`: A host binding function to execute.\n *\n * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.\n *\n * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);\n * 2. `directiveIdx`\n * 3. `bindingRootIdx`\n * 4. `HostBindingsFunction` is passed in as is.\n *\n * The `HostBindingOpCodes` array contains:\n * - negative number to select the element index.\n * - followed by 1 or more of:\n * - a number to select the directive index\n * - a number to select the bindingRoot index\n * - and a function to invoke.\n *\n * ## Example\n *\n * ```\n * const hostBindingOpCodes = [\n * ~30, // Select element 30\n * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;\n * // directiveIdx = 40; bindingRootIdx = 45;\n * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30\n * // directiveIdx = 50; bindingRootIdx = 55;\n * ]\n * ```\n *\n * ## Pseudocode\n * ```\n * const hostBindingOpCodes = tView.hostBindingOpCodes;\n * if (hostBindingOpCodes === null) return;\n * for (let i = 0; i < hostBindingOpCodes.length; i++) {\n * const opCode = hostBindingOpCodes[i] as number;\n * if (opCode < 0) {\n * // Negative numbers are element indexes.\n * setSelectedIndex(~opCode);\n * } else {\n * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n * const directiveIdx = opCode;\n * const bindingRootIndx = hostBindingOpCodes[++i] as number;\n * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n * const context = lView[directiveIdx];\n * hostBindingFn(RenderFlags.Update, context);\n * }\n * }\n * ```\n *\n */\nexport interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {\n __brand__: 'HostBindingOpCodes';\n debug?: string[];\n}\n\n/**\n * Explicitly marks `TView` as a specific type in `ngDevMode`\n *\n * It is useful to know conceptually what time of `TView` we are dealing with when\n * debugging an application (even if the runtime does not need it.) For this reason\n * we store this information in the `ngDevMode` `TView` and than use it for\n * better debugging experience.\n */\nexport const enum TViewType {\n /**\n * Root `TView` is the used to bootstrap components into. It is used in conjunction with\n * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`\n * so that other components can be loaded into it.\n */\n Root = 0,\n\n /**\n * `TView` associated with a Component. This would be the `TView` directly associated with the\n * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)\n */\n Component = 1,\n\n /**\n * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`\n * can have zero or more `Embedded` `TView`s.\n */\n Embedded = 2,\n}\n\n/**\n * The static data for an LView (shared between all templates of a\n * given type).\n *\n * Stored on the `ComponentDef.tView`.\n */\nexport interface TView {\n /**\n * Type of `TView` (`Root`|`Component`|`Embedded`).\n */\n type: TViewType;\n\n /**\n * This is a blueprint used to generate LView instances for this TView. Copying this\n * blueprint is faster than creating a new LView from scratch.\n */\n blueprint: LView;\n\n /**\n * The template function used to refresh the view of dynamically created views\n * and components. Will be null for inline views.\n */\n template: ComponentTemplate<{}> | null;\n\n /**\n * A function containing query-related instructions.\n */\n viewQuery: ViewQueriesFunction<{}> | null;\n\n /**\n * A `TNode` representing the declaration location of this `TView` (not part of this TView).\n */\n declTNode: TNode | null;\n\n // FIXME(misko): Why does `TView` not have `declarationTView` property?\n\n /** Whether or not this template has been processed in creation mode. */\n firstCreatePass: boolean;\n\n /**\n * Whether or not this template has been processed in update mode (e.g. change detected)\n *\n * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling\n * instructions. (Mainly to build up a linked list of styling priority order.)\n *\n * Typically this function gets cleared after first execution. If exception is thrown then this\n * flag can remain turned un until there is first successful (no exception) pass. This means that\n * individual styling instructions keep track of if they have already been added to the linked\n * list to prevent double adding.\n */\n firstUpdatePass: boolean;\n\n /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */\n data: TData;\n\n /**\n * The binding start index is the index at which the data array\n * starts to store bindings only. Saving this value ensures that we\n * will begin reading bindings at the correct point in the array when\n * we are in update mode.\n *\n * -1 means that it has not been initialized.\n */\n bindingStartIndex: number;\n\n /**\n * The index where the \"expando\" section of `LView` begins. The expando\n * section contains injectors, directive instances, and host binding values.\n * Unlike the \"decls\" and \"vars\" sections of `LView`, the length of this\n * section cannot be calculated at compile-time because directives are matched\n * at runtime to preserve locality.\n *\n * We store this start index so we know where to start checking host bindings\n * in `setHostBindings`.\n */\n expandoStartIndex: number;\n\n /**\n * Whether or not there are any static view queries tracked on this view.\n *\n * We store this so we know whether or not we should do a view query\n * refresh after creation mode to collect static query results.\n */\n staticViewQueries: boolean;\n\n /**\n * Whether or not there are any static content queries tracked on this view.\n *\n * We store this so we know whether or not we should do a content query\n * refresh after creation mode to collect static query results.\n */\n staticContentQueries: boolean;\n\n /**\n * A reference to the first child node located in the view.\n */\n firstChild: TNode | null;\n\n /**\n * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`\n *\n * See `HostBindingOpCodes` for encoding details.\n */\n hostBindingOpCodes: HostBindingOpCodes | null;\n\n /**\n * Full registry of directives and components that may be found in this view.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n directiveRegistry: DirectiveDefList | null;\n\n /**\n * Full registry of pipes that may be found in this view.\n *\n * The property is either an array of `PipeDefs`s or a function which returns the array of\n * `PipeDefs`s. The function is necessary to be able to support forward declarations.\n *\n * It's necessary to keep a copy of the full def list on the TView so it's possible\n * to render template functions without a host component.\n */\n pipeRegistry: PipeDefList | null;\n\n /**\n * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in\n * creation mode.\n *\n * This array has a flat structure and contains TNode indices, directive indices (where an\n * instance can be found in `LView`) and hook functions. TNode index is followed by the directive\n * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is\n * not repeated and the next lifecycle hook information is stored right after the previous hook\n * function. This is done so that at runtime the system can efficiently iterate over all of the\n * functions to invoke without having to make any decisions/lookups.\n */\n preOrderHooks: HookData | null;\n\n /**\n * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.\n *\n * This array has the same structure as the `preOrderHooks` one.\n */\n preOrderCheckHooks: HookData | null;\n\n /**\n * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed\n * for this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentHooks: HookData | null;\n\n /**\n * Array of ngAfterContentChecked hooks that should be executed for this view in update\n * mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n contentCheckHooks: HookData | null;\n\n /**\n * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for\n * this view in creation mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewHooks: HookData | null;\n\n /**\n * Array of ngAfterViewChecked hooks that should be executed for this view in\n * update mode.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n viewCheckHooks: HookData | null;\n\n /**\n * Array of ngOnDestroy hooks that should be executed when this view is destroyed.\n *\n * Even indices: Directive index\n * Odd indices: Hook function\n */\n destroyHooks: DestroyHookData | null;\n\n /**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a native DOM listener or output subscription being stored:\n * 1st index is: event name `name = tView.cleanup[i+0]`\n * 2nd index is: index of native element or a function that retrieves global target (window,\n * document or body) reference based on the native element:\n * `typeof idxOrTargetGetter === 'function'`: global target getter function\n * `typeof idxOrTargetGetter === 'number'`: index of native element\n *\n * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`\n * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`\n * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean\n * `typeof useCaptureOrIndx == 'number':\n * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`\n * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`\n *\n * If it's an output subscription or query list destroy hook:\n * 1st index is: output unsubscribe function / query list destroy function\n * 2nd index is: index of function context in LView.cleanupInstances[]\n * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`\n */\n cleanup: any[] | null;\n\n /**\n * A list of element indices for child components that will need to be\n * refreshed when the current view has finished its check. These indices have\n * already been adjusted for the HEADER_OFFSET.\n *\n */\n components: number[] | null;\n\n /**\n * A collection of queries tracked in a given view.\n */\n queries: TQueries | null;\n\n /**\n * An array of indices pointing to directives with content queries alongside with the\n * corresponding query index. Each entry in this array is a tuple of:\n * - index of the first content query index declared by a given directive;\n * - index of a directive.\n *\n * We are storing those indexes so we can refresh content queries as part of a view refresh\n * process.\n */\n contentQueries: number[] | null;\n\n /**\n * Set of schemas that declare elements to be allowed inside the view.\n */\n schemas: SchemaMetadata[] | null;\n\n /**\n * Array of constants for the view. Includes attribute arrays, local definition arrays etc.\n * Used for directive matching, attribute bindings, local definitions and more.\n */\n consts: TConstants | null;\n\n /**\n * Indicates that there was an error before we managed to complete the first create pass of the\n * view. This means that the view is likely corrupted and we should try to recover it.\n */\n incompleteFirstPass: boolean;\n\n /**\n * Unique id of this TView for hydration purposes:\n * - TViewType.Embedded: a unique id generated during serialization on the server\n * - TViewType.Component: an id generated based on component properties\n * (see `getComponentId` function for details)\n */\n ssrId: string | null;\n}\n\n/** Single hook callback function. */\nexport type HookFn = () => void;\n\n/**\n * Information necessary to call a hook. E.g. the callback that\n * needs to invoked and the index at which to find its context.\n */\nexport type HookEntry = number | HookFn;\n\n/**\n * Array of hooks that should be executed for a view and their directive indices.\n *\n * For each node of the view, the following data is stored:\n * 1) Node index (optional)\n * 2) A series of number/function pairs where:\n * - even indices are directive indices\n * - odd indices are hook functions\n *\n * Special cases:\n * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)\n */\nexport type HookData = HookEntry[];\n\n/**\n * Array of destroy hooks that should be executed for a view and their directive indices.\n *\n * The array is set up as a series of number/function or number/(number|function)[]:\n * - Even indices represent the context with which hooks should be called.\n * - Odd indices are the hook functions themselves. If a value at an odd index is an array,\n * it represents the destroy hooks of a `multi` provider where:\n * - Even indices represent the index of the provider for which we've registered a destroy hook,\n * inside of the `multi` provider array.\n * - Odd indices are the destroy hook functions.\n * For example:\n * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`\n * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`\n *\n * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,\n * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`\n * have an `ngOnDestroy` hook.\n */\nexport type DestroyHookData = (HookEntry | HookData)[];\n\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n *\n * Each pipe's definition is stored here at the same index as its pipe instance in\n * the data array.\n *\n * Each host property's name is stored here at the same index as its value in the\n * data array.\n *\n * Each property binding name is stored here at the same index as its value in\n * the data array. If the binding is an interpolation, the static string values\n * are stored parallel to the dynamic values. Example:\n *\n * id=\"prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix\"\n *\n * LView | TView.data\n *------------------------\n * v0 value | 'a'\n * v1 value | 'b'\n * v2 value | id � prefix � suffix\n *\n * Injector bloom filters are also stored here.\n */\nexport type TData = (\n | TNode\n | PipeDef<any>\n | DirectiveDef<any>\n | ComponentDef<any>\n | number\n | TStylingRange\n | TStylingKey\n | ProviderToken<any>\n | TI18n\n | I18nUpdateOpCodes\n | TIcu\n | null\n | string\n | TDeferBlockDetails\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.dev/license\n */\n\nimport {DehydratedContainerView} from '../../hydration/interfaces';\n\nimport {TNode} from './node';\nimport {RComment, RElement} from './renderer_dom';\nimport {FLAGS, HOST, LView, NEXT, PARENT, T_HOST} from './view';\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nexport const TYPE = 1;\n\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n\n// FLAGS, PARENT, NEXT, and T_HOST are indices 2, 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n\nexport const DEHYDRATED_VIEWS = 6;\nexport const NATIVE = 7;\nexport const VIEW_REFS = 8;\nexport const MOVED_VIEWS = 9;\n\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nexport const CONTAINER_HEADER_OFFSET = 10;\n\n/**\n * The state associated with a container.\n *\n * This is an array so that its structure is closer to LView. This helps\n * when traversing the view tree (which is a mix of containers and component\n * views), so we can jump to viewOrContainer[NEXT] in the same way regardless\n * of type.\n */\nexport interface LContainer extends Array<any> {\n /**\n * The host element of this LContainer.\n *\n * The host could be an LView if this container is on a component node.\n * In that case, the component LView is its HOST.\n */\n readonly [HOST]: RElement | RComment | LView;\n\n /**\n * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an\n * efficient way. The value is always set to `true`\n */\n [TYPE]: true;\n\n /** Flags for this container. See LContainerFlags for more info. */\n [FLAGS]: LContainerFlags;\n\n /**\n * Access to the parent view is necessary so we can propagate back\n * up from inside a container to parent[NEXT].\n */\n [PARENT]: LView;\n\n /**\n * This allows us to jump from a container to a sibling container or component\n * view with the same parent, so we can remove listeners efficiently.\n */\n [NEXT]: LView | LContainer | null;\n\n /**\n * A collection of views created based on the underlying `<ng-template>` element but inserted into\n * a different `LContainer`. We need to track views created from a given declaration point since\n * queries collect matches from the embedded view declaration point and _not_ the insertion point.\n */\n [MOVED_VIEWS]: LView[] | null;\n\n /**\n * Pointer to the `TNode` which represents the host of the container.\n */\n [T_HOST]: TNode;\n\n /** The comment element that serves as an anchor for this LContainer. */\n [NATIVE]: RComment;\n\n /**\n * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.\n *\n * This is lazily initialized by `ViewContainerRef` when the first view is inserted.\n *\n * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and\n * doing so creates circular dependency.\n */\n [VIEW_REFS]: unknown[] | null;\n\n /**\n * Array of dehydrated views within this container.\n *\n * This information is used during the hydration process on the client.\n * The hydration logic tries to find a matching dehydrated view, \"claim\" it\n * and use this information to do further matching. After that, this \"claimed\"\n * view is removed from the list. The remaining \"unclaimed\" views are\n * \"garbage-collected\" later on, i.e. removed from the DOM once the hydration\n * logic finishes.\n */\n [DEHYDRATED_VIEWS]: DehydratedContainerView[] | null;\n}\n\n/** Flags associated with an LContainer (saved in LContainer[FLAGS]) */\nexport enum LContainerFlags {\n None = 0,\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n HasTransplantedViews = 1 << 1,\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.dev/license\n */\n\nimport {LContainer, TYPE} from './container';\nimport {ComponentDef, DirectiveDef} from './definition';\nimport {TNode, TNodeFlags, TNodeType} from './node';\nimport {RNode} from './renderer_dom';\nimport {FLAGS, LView, LViewFlags} from './view';\n\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLView(value: RNode | LView | LContainer | {} | null): value is LView {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function isLContainer(value: RNode | LView | LContainer | {} | null): value is LContainer {\n return Array.isArray(value) && value[TYPE] === true;\n}\n\nexport function isContentQueryHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.hasContentQuery) !== 0;\n}\n\nexport function isComponentHost(tNode: TNode): boolean {\n return tNode.componentOffset > -1;\n}\n\nexport function isDirectiveHost(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.isDirectiveHost) === TNodeFlags.isDirectiveHost;\n}\n\nexport function isComponentDef<T>(def: DirectiveDef<T>): def is ComponentDef<T> {\n return !!(def as ComponentDef<T>).template;\n}\n\nexport function isRootView(target: LView): boolean {\n return (target[FLAGS] & LViewFlags.IsRoot) !== 0;\n}\n\nexport function isProjectionTNode(tNode: TNode): boolean {\n return (tNode.type & TNodeType.Projection) === TNodeType.Projection;\n}\n\nexport function hasI18n(lView: LView): boolean {\n return (lView[FLAGS] & LViewFlags.HasI18n) === LViewFlags.HasI18n;\n}\n\nexport function isDestroyed(lView: LView): boolean {\n return (lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\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.dev/license\n */\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see {@link OnChanges}\n *\n * @publicApi\n */\nexport class SimpleChange {\n constructor(\n public previousValue: any,\n public currentValue: any,\n public firstChange: boolean,\n ) {}\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange(): boolean {\n return this.firstChange;\n }\n}\n\n/**\n * A hashtable of changes represented by {@link SimpleChange} objects stored\n * at the declared property name they belong to on a Directive or Component. This is\n * the type passed to the `ngOnChanges` hook.\n *\n * @see {@link OnChanges}\n *\n * @publicApi\n */\nexport interface SimpleChanges {\n [propName: string]: SimpleChange;\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.dev/license\n */\n\nimport {InputSignalNode} from '../authoring/input/input_signal_node';\n\nexport function applyValueToInputField<T>(\n instance: T,\n inputSignalNode: null | InputSignalNode<unknown, unknown>,\n privateName: string,\n value: unknown,\n) {\n if (inputSignalNode !== null) {\n inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n } else {\n (instance as any)[privateName] = 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.dev/license\n */\n\nimport {InputSignalNode} from '../../authoring/input/input_signal_node';\nimport {OnChanges} from '../../interface/lifecycle_hooks';\nimport {SimpleChange, SimpleChanges} from '../../interface/simple_change';\nimport {assertString} from '../../util/assert';\nimport {EMPTY_OBJ} from '../../util/empty';\nimport {applyValueToInputField} from '../apply_value_input_field';\nimport {DirectiveDef, DirectiveDefFeature} from '../interfaces/definition';\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature {\n return NgOnChangesFeatureImpl;\n}\n\nexport function NgOnChangesFeatureImpl<T>(definition: DirectiveDef<T>) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\n(ɵɵNgOnChangesFeature as DirectiveDefFeature).ngInherit = true;\n\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook(this: OnChanges) {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n\n if (current) {\n const previous = simpleChangesStore!.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore!.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore!.current = null;\n this.ngOnChanges(current);\n }\n}\n\nfunction ngOnChangesSetInput<T>(\n this: DirectiveDef<T>,\n instance: T,\n inputSignalNode: null | InputSignalNode<unknown, unknown>,\n value: unknown,\n publicName: string,\n privateName: string,\n): void {\n const declaredName = (this.declaredInputs as {[key: string]: string})[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore =\n getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, {previous: EMPTY_OBJ, current: null});\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(\n previousChange && previousChange.currentValue,\n value,\n previous === EMPTY_OBJ,\n );\n\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n}\n\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n\nfunction getSimpleChangesStore(instance: any): null | NgSimpleChangesStore {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\n\nfunction setSimpleChangesStore(instance: any, store: NgSimpleChangesStore): NgSimpleChangesStore {\n return (instance[SIMPLE_CHANGES_STORE] = store);\n}\n\n/**\n * Data structure which is monkey-patched on the component instance and used by `ngOnChanges`\n * life-cycle hook to track previous input values.\n */\ninterface NgSimpleChangesStore {\n previous: SimpleChanges;\n current: SimpleChanges | null;\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.dev/license\n */\n\nimport {type Profiler} from './profiler_types';\n\nlet profilerCallback: Profiler | null = null;\n\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nexport const setProfiler = (profiler: Profiler | null) => {\n profilerCallback = profiler;\n};\n\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nexport const profiler: Profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\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.dev/license\n */\n\nexport const SVG_NAMESPACE = 'svg';\nexport const MATH_ML_NAMESPACE = 'math';\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.dev/license\n */\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {\n assertDefined,\n assertGreaterThan,\n assertGreaterThanOrEqual,\n assertIndexInRange,\n assertLessThan,\n} from '../../util/assert';\nimport {assertLView, assertTNode, assertTNodeForLView} from '../assert';\nimport {LContainer, TYPE} from '../interfaces/container';\nimport {TConstants, TNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {\n DECLARATION_VIEW,\n ENVIRONMENT,\n FLAGS,\n HEADER_OFFSET,\n HOST,\n LView,\n LViewFlags,\n ON_DESTROY_HOOKS,\n PARENT,\n PREORDER_HOOK_FLAGS,\n PreOrderHookFlags,\n REACTIVE_TEMPLATE_CONSUMER,\n TData,\n TView,\n} from '../interfaces/view';\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapRNode(value: RNode | LView | LContainer): RNode {\n while (Array.isArray(value)) {\n value = value[HOST] as any;\n }\n return value as RNode;\n}\n\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nexport function unwrapLView(value: RNode | LView | LContainer): LView | null {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value as LView;\n value = value[HOST] as any;\n }\n return null;\n}\n\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nexport function getNativeByIndex(index: number, lView: LView): RNode {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNode(tNode: TNode, lView: LView): RNode {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node: RNode = unwrapRNode(lView[tNode.index]);\n return node;\n}\n\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nexport function getNativeByTNodeOrNull(tNode: TNode | null, lView: LView): RNode | null {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode!, lView);\n const node: RNode | null = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n\n// fixme(misko): The return Type should be `TNode|null`\nexport function getTNode(tView: TView, index: number): TNode {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index] as TNode;\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n\n/** Retrieves a value from any `LView` or `TData`. */\nexport function load<T>(view: LView | TData, index: number): T {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\n\nexport function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n\n/** Checks whether a given view is in creation mode */\nexport function isCreationMode(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.CreationMode) === LViewFlags.CreationMode;\n}\n\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nexport function viewAttachedToChangeDetector(view: LView): boolean {\n return (view[FLAGS] & LViewFlags.Attached) === LViewFlags.Attached;\n}\n\n/** Returns a boolean for whether the view is attached to a container. */\nexport function viewAttachedToContainer(view: LView): boolean {\n return isLContainer(view[PARENT]);\n}\n\n/** Returns a constant from `TConstants` instance. */\nexport function getConstant<T>(consts: TConstants | null, index: null | undefined): null;\nexport function getConstant<T>(consts: TConstants, index: number): T | null;\nexport function getConstant<T>(\n consts: TConstants | null,\n index: number | null | undefined,\n): T | null;\nexport function getConstant<T>(\n consts: TConstants | null,\n index: number | null | undefined,\n): T | null {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts!, index);\n return consts![index] as unknown as T;\n}\n\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nexport function resetPreOrderHookFlags(lView: LView) {\n lView[PREORDER_HOOK_FLAGS] = 0 as PreOrderHookFlags;\n}\n\n/**\n * Adds the `RefreshView` flag from the lView and updates HAS_CHILD_VIEWS_TO_REFRESH flag of\n * parents.\n */\nexport function markViewForRefresh(lView: LView) {\n if (lView[FLAGS] & LViewFlags.RefreshView) {\n return;\n }\n lView[FLAGS] |= LViewFlags.RefreshView;\n if (viewAttachedToChangeDetector(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n\n/**\n * Walks up the LView hierarchy.\n * @param nestingLevel Number of times to walk up in hierarchy.\n * @param currentView View from which to start the lookup.\n */\nexport function walkUpViews(nestingLevel: number, currentView: LView): LView {\n while (nestingLevel > 0) {\n ngDevMode &&\n assertDefined(\n currentView[DECLARATION_VIEW],\n 'Declaration view should be defined if nesting level is greater than 0.',\n );\n currentView = currentView[DECLARATION_VIEW]!;\n nestingLevel--;\n }\n return currentView;\n}\n\nexport function requiresRefreshOrTraversal(lView: LView) {\n return !!(\n lView[FLAGS] & (LViewFlags.RefreshView | LViewFlags.HasChildViewsToRefresh) ||\n lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty\n );\n}\n\n/**\n * Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the\n * parents above.\n */\nexport function updateAncestorTraversalFlagsOnAttach(lView: LView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.ViewAttached);\n if (lView[FLAGS] & LViewFlags.Dirty) {\n lView[FLAGS] |= LViewFlags.RefreshView;\n }\n if (requiresRefreshOrTraversal(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n\n/**\n * Ensures views above the given `lView` are traversed during change detection even when they are\n * not dirty.\n *\n * This is done by setting the `HAS_CHILD_VIEWS_TO_REFRESH` flag up to the root, stopping when the\n * flag is already `true` or the `lView` is detached.\n */\nexport function markAncestorsForTraversal(lView: LView) {\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.MarkAncestorsForTraversal);\n let parent = getLViewParent(lView);\n while (parent !== null) {\n // We stop adding markers to the ancestors once we reach one that already has the marker. This\n // is to avoid needlessly traversing all the way to the root when the marker already exists.\n if (parent[FLAGS] & LViewFlags.HasChildViewsToRefresh) {\n break;\n }\n\n parent[FLAGS] |= LViewFlags.HasChildViewsToRefresh;\n if (!viewAttachedToChangeDetector(parent)) {\n break;\n }\n parent = getLViewParent(parent);\n }\n}\n\n/**\n * Stores a LView-specific destroy callback.\n */\nexport function storeLViewOnDestroy(lView: LView, onDestroyCallback: () => void) {\n if ((lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_DESTROYED,\n ngDevMode && 'View has already been destroyed.',\n );\n }\n if (lView[ON_DESTROY_HOOKS] === null) {\n lView[ON_DESTROY_HOOKS] = [];\n }\n lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\n\n/**\n * Removes previously registered LView-specific destroy callback.\n */\nexport function removeLViewOnDestroy(lView: LView, onDestroyCallback: () => void) {\n if (lView[ON_DESTROY_HOOKS] === null) return;\n\n const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n if (destroyCBIdx !== -1) {\n lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n }\n}\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nexport function getLViewParent(lView: LView): LView | null {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\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.dev/license\n */\n\nimport {InjectFlags} from '../di/interface/injector';\nimport {\n assertDefined,\n assertEqual,\n assertGreaterThanOrEqual,\n assertLessThan,\n assertNotEqual,\n throwError,\n} from '../util/assert';\n\nimport {assertLViewOrUndefined, assertTNodeForLView, assertTNodeForTView} from './assert';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode, TNodeType} from './interfaces/node';\nimport {\n CONTEXT,\n DECLARATION_VIEW,\n HEADER_OFFSET,\n LView,\n OpaqueViewState,\n T_HOST,\n TData,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {getTNode, walkUpViews} from './util/view_utils';\n\n/**\n *\n */\ninterface LFrame {\n /**\n * Parent LFrame.\n *\n * This is needed when `leaveView` is called to restore the previous state.\n */\n parent: LFrame;\n\n /**\n * Child LFrame.\n *\n * This is used to cache existing LFrames to relieve the memory pressure.\n */\n child: LFrame | null;\n\n /**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\n lView: LView;\n\n /**\n * Current `TView` associated with the `LFrame.lView`.\n *\n * One can get `TView` from `lFrame[TVIEW]` however because it is so common it makes sense to\n * store it in `LFrame` for perf reasons.\n */\n tView: TView;\n\n /**\n * Used to set the parent property when nodes are created and track query results.\n *\n * This is used in conjunction with `isParent`.\n */\n currentTNode: TNode | null;\n\n /**\n * If `isParent` is:\n * - `true`: then `currentTNode` points to a parent node.\n * - `false`: then `currentTNode` points to previous node (sibling).\n */\n isParent: boolean;\n\n /**\n * Index of currently selected element in LView.\n *\n * Used by binding instructions. Updated as part of advance instruction.\n */\n selectedIndex: number;\n\n /**\n * Current pointer to the binding index.\n */\n bindingIndex: number;\n\n /**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\n contextLView: LView | null;\n\n /**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can then attach patch data `LView` to only those elements. We know that those\n * are the only places where the patch data could change, this way we will save on number\n * of places where tha patching occurs.\n */\n elementDepthCount: number;\n\n /**\n * Current namespace to be used when creating elements\n */\n currentNamespace: string | null;\n\n /**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\n bindingRootIndex: number;\n\n /**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\n currentQueryIndex: number;\n\n /**\n * When host binding is executing this points to the directive index.\n * `TView.data[currentDirectiveIndex]` is `DirectiveDef`\n * `LView[currentDirectiveIndex]` is directive instance.\n */\n currentDirectiveIndex: number;\n\n /**\n * Are we currently in i18n block as denoted by `ɵɵelementStart` and `ɵɵelementEnd`.\n *\n * This information is needed because while we are in i18n block all elements must be pre-declared\n * in the translation. (i.e. `Hello �#2�World�/#2�!` pre-declares element at `�#2�` location.)\n * This allocates `TNodeType.Placeholder` element at location `2`. If translator removes `�#2�`\n * from translation than the runtime must also ensure tha element at `2` does not get inserted\n * into the DOM. The translation does not carry information about deleted elements. Therefor the\n * only way to know that an element is deleted is that it was not pre-declared in the translation.\n *\n * This flag works by ensuring that elements which are created without pre-declaration\n * (`TNodeType.Placeholder`) are not inserted into the DOM render tree. (It does mean that the\n * element still gets instantiated along with all of its behavior [directives])\n */\n inI18n: boolean;\n}\n\n/**\n * All implicit instruction state is stored here.\n *\n * It is useful to have a single object where all of the state is stored as a mental model\n * (rather it being spread across many different variables.)\n *\n * PERF NOTE: Turns out that writing to a true global variable is slower than\n * having an intermediate object with properties.\n */\ninterface InstructionState {\n /**\n * Current `LFrame`\n *\n * `null` if we have not called `enterView`\n */\n lFrame: LFrame;\n\n /**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` then we need to prevent the runtime from matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\n bindingsEnabled: boolean;\n\n /**\n * Stores the root TNode that has the 'ngSkipHydration' attribute on it for later reference.\n *\n * Example:\n * ```\n * <my-comp ngSkipHydration>\n * Should reference this root node\n * </my-comp>\n * ```\n */\n skipHydrationRootTNode: TNode | null;\n}\n\nconst instructionState: InstructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n skipHydrationRootTNode: null,\n};\n\nexport enum CheckNoChangesMode {\n Off,\n Exhaustive,\n OnlyDirtyViews,\n}\n\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _checkNoChangesMode: CheckNoChangesMode = 0; /* CheckNoChangesMode.Off */\n\n/**\n * Flag used to indicate that we are in the middle running change detection on a view\n *\n * @see detectChangesInViewWhileDirty\n */\nlet _isRefreshingViews = false;\n\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nexport function specOnlyIsInstructionStateEmpty(): boolean {\n return instructionState.lFrame.parent === null;\n}\n\nexport function getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\n\nexport function increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\n\nexport function decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\n\nexport function getBindingsEnabled(): boolean {\n return instructionState.bindingsEnabled;\n}\n\n/**\n * Returns true if currently inside a skip hydration block.\n * @returns boolean\n */\nexport function isInSkipHydrationBlock(): boolean {\n return instructionState.skipHydrationRootTNode !== null;\n}\n\n/**\n * Returns true if this is the root TNode of the skip hydration block.\n * @param tNode the current TNode\n * @returns boolean\n */\nexport function isSkipHydrationRootTNode(tNode: TNode): boolean {\n return instructionState.skipHydrationRootTNode === tNode;\n}\n\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵenableBindings(): void {\n instructionState.bindingsEnabled = true;\n}\n\n/**\n * Sets a flag to specify that the TNode is in a skip hydration block.\n * @param tNode the current TNode\n */\nexport function enterSkipHydrationBlock(tNode: TNode): void {\n instructionState.skipHydrationRootTNode = tNode;\n}\n\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nexport function ɵɵdisableBindings(): void {\n instructionState.bindingsEnabled = false;\n}\n\n/**\n * Clears the root skip hydration node when leaving a skip hydration block.\n */\nexport function leaveSkipHydrationBlock(): void {\n instructionState.skipHydrationRootTNode = null;\n}\n\n/**\n * Return the current `LView`.\n */\nexport function getLView<T>(): LView<T> {\n return instructionState.lFrame.lView as LView<T>;\n}\n\n/**\n * Return the current `TView`.\n */\nexport function getTView(): TView {\n return instructionState.lFrame.tView;\n}\n\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nexport function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T {\n instructionState.lFrame.contextLView = viewToRestore as any as LView;\n return (viewToRestore as any as LView)[CONTEXT] as unknown as T;\n}\n\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nexport function ɵɵresetView<T>(value?: T): T | undefined {\n instructionState.lFrame.contextLView = null;\n return value;\n}\n\nexport function getCurrentTNode(): TNode | null {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === TNodeType.Placeholder) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\n\nexport function getCurrentTNodePlaceholderOk(): TNode | null {\n return instructionState.lFrame.currentTNode;\n}\n\nexport function getCurrentParentTNode(): TNode | null {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode!.parent;\n}\n\nexport function setCurrentTNode(tNode: TNode | null, isParent: boolean) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\n\nexport function isCurrentTNodeParent(): boolean {\n return instructionState.lFrame.isParent;\n}\n\nexport function setCurrentTNodeAsNotParent(): void {\n instructionState.lFrame.isParent = false;\n}\n\nexport function getContextLView(): LView {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView!;\n}\n\nexport function isInCheckNoChangesMode(): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n return _checkNoChangesMode !== CheckNoChangesMode.Off;\n}\n\nexport function isExhaustiveCheckNoChanges(): boolean {\n !ngDevMode && throwError('Must never be called in production mode');\n return _checkNoChangesMode === CheckNoChangesMode.Exhaustive;\n}\n\nexport function setIsInCheckNoChangesMode(mode: CheckNoChangesMode): void {\n !ngDevMode && throwError('Must never be called in production mode');\n _checkNoChangesMode = mode;\n}\n\nexport function isRefreshingViews(): boolean {\n return _isRefreshingViews;\n}\n\nexport function setIsRefreshingViews(mode: boolean): void {\n _isRefreshingViews = mode;\n}\n\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nexport function getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\n\nexport function getBindingIndex(): number {\n return instructionState.lFrame.bindingIndex;\n}\n\nexport function setBindingIndex(value: number): number {\n return (instructionState.lFrame.bindingIndex = value);\n}\n\nexport function nextBindingIndex(): number {\n return instructionState.lFrame.bindingIndex++;\n}\n\nexport function incrementBindingIndex(count: number): number {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n\nexport function isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\n\nexport function setInI18nBlock(isInI18nBlock: boolean): void {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nexport function setBindingRootForHostBindings(\n bindingRootIndex: number,\n currentDirectiveIndex: number,\n) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nexport function getCurrentDirectiveIndex(): number {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nexport function setCurrentDirectiveIndex(currentDirectiveIndex: number): void {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nexport function getCurrentDirectiveDef(tData: TData): DirectiveDef<any> | null {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : (tData[currentDirectiveIndex] as DirectiveDef<any>);\n}\n\nexport function getCurrentQueryIndex(): number {\n return instructionState.lFrame.currentQueryIndex;\n}\n\nexport function setCurrentQueryIndex(value: number): void {\n instructionState.lFrame.currentQueryIndex = value;\n}\n\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView: LView): TNode | null {\n const tView = lView[TVIEW];\n\n // Return the declaration parent for embedded views\n if (tView.type === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === TViewType.Component) {\n return lView[T_HOST];\n }\n\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nexport function enterDI(lView: LView, tNode: TNode, flags: InjectFlags) {\n ngDevMode && assertLViewOrUndefined(lView);\n\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n\n let parentTNode = tNode as TNode | null;\n let parentLView = lView;\n\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode!.parent as TNode | null;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW]!;\n\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (TNodeType.Element | TNodeType.ElementContainer)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = (instructionState.lFrame = allocLFrame());\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n\n return true;\n}\n\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nexport function enterView(newView: LView): void {\n ngDevMode && assertNotEqual(newView[0], newView[1] as any, '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild!;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\n\nfunction createLFrame(parent: LFrame | null): LFrame {\n const lFrame: LFrame = {\n currentTNode: null,\n isParent: true,\n lView: null!,\n tView: null!,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent!,\n child: null,\n inI18n: false,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight(): LFrame {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null!;\n oldLFrame.lView = null!;\n return oldLFrame;\n}\n\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nexport const leaveDI: () => void = leaveViewLight;\n\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nexport function leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null!;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\n\nexport function nextContextImpl<T = any>(level: number): T {\n const contextLView = (instructionState.lFrame.contextLView = walkUpViews(\n level,\n instructionState.lFrame.contextLView!,\n ));\n return contextLView[CONTEXT] as unknown as T;\n}\n\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nexport function getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nexport function setSelectedIndex(index: number) {\n ngDevMode &&\n index !== -1 &&\n assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode &&\n assertLessThan(\n index,\n instructionState.lFrame.lView.length,\n \"Can't set index passed end of LView\",\n );\n instructionState.lFrame.selectedIndex = index;\n}\n\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nexport function getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nexport function ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nexport function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\n\nexport function getNamespace(): string | null {\n return instructionState.lFrame.currentNamespace;\n}\n\nlet _wasLastNodeCreated = true;\n\n/**\n * Retrieves a global flag that indicates whether the most recent DOM node\n * was created or hydrated.\n */\nexport function wasLastNodeCreated(): boolean {\n return _wasLastNodeCreated;\n}\n\n/**\n * Sets a global flag to indicate whether the most recent DOM node\n * was created or hydrated.\n */\nexport function lastNodeWasCreated(flag: boolean): void {\n _wasLastNodeCreated = flag;\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {\n AfterContentChecked,\n AfterContentInit,\n AfterViewChecked,\n AfterViewInit,\n DoCheck,\n OnChanges,\n OnDestroy,\n OnInit,\n} from '../interface/lifecycle_hooks';\nimport {assertDefined, assertEqual, assertNotEqual} from '../util/assert';\n\nimport {assertFirstCreatePass} from './assert';\nimport {NgOnChangesFeatureImpl} from './features/ng_onchanges_feature';\nimport {DirectiveDef} from './interfaces/definition';\nimport {TNode} from './interfaces/node';\nimport {\n FLAGS,\n HookData,\n InitPhaseState,\n LView,\n LViewFlags,\n PREORDER_HOOK_FLAGS,\n PreOrderHookFlags,\n TView,\n} from './interfaces/view';\nimport {profiler} from './profiler';\nimport {ProfilerEvent} from './profiler_types';\nimport {isInCheckNoChangesMode} from './state';\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nexport function registerPreOrderHooks(\n directiveIndex: number,\n directiveDef: DirectiveDef<any>,\n tView: TView,\n): void {\n ngDevMode && assertFirstCreatePass(tView);\n const {ngOnChanges, ngOnInit, ngDoCheck} = directiveDef.type.prototype as OnChanges &\n OnInit &\n DoCheck;\n\n if (ngOnChanges as Function | undefined) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n }\n\n if (ngOnInit) {\n (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n }\n\n if (ngDoCheck) {\n (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);\n }\n}\n\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nexport function registerPostOrderHooks(tView: TView, tNode: TNode): void {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks: AfterContentInit &\n AfterContentChecked &\n AfterViewInit &\n AfterViewChecked &\n OnDestroy = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy,\n } = lifecycleHooks;\n\n if (ngAfterContentInit) {\n (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n }\n\n if (ngAfterContentChecked) {\n (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n }\n\n if (ngAfterViewInit) {\n (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n }\n\n if (ngAfterViewChecked) {\n (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n }\n\n if (ngOnDestroy != null) {\n (tView.destroyHooks ??= []).push(i, ngOnDestroy);\n }\n }\n}\n\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeCheckHooks(lView: LView, hooks: HookData, nodeIndex?: number | null) {\n callHooks(lView, hooks, InitPhaseState.InitPhaseCompleted, nodeIndex);\n}\n\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nexport function executeInitAndCheckHooks(\n lView: LView,\n hooks: HookData,\n initPhase: InitPhaseState,\n nodeIndex?: number | null,\n) {\n ngDevMode &&\n assertNotEqual(\n initPhase,\n InitPhaseState.InitPhaseCompleted,\n 'Init pre-order hooks should not be called more than once',\n );\n if ((lView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\n\nexport function incrementInitPhaseFlags(lView: LView, initPhase: InitPhaseState): void {\n ngDevMode &&\n assertNotEqual(\n initPhase,\n InitPhaseState.InitPhaseCompleted,\n 'Init hooks phase should not be incremented after all init hooks have been run.',\n );\n let flags = lView[FLAGS];\n if ((flags & LViewFlags.InitPhaseStateMask) === initPhase) {\n flags &= LViewFlags.IndexWithinInitPhaseReset;\n flags += LViewFlags.InitPhaseStateIncrementer;\n lView[FLAGS] = flags;\n }\n}\n\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(\n currentView: LView,\n arr: HookData,\n initPhase: InitPhaseState,\n currentNodeIndex: number | null | undefined,\n): void {\n ngDevMode &&\n assertEqual(\n isInCheckNoChangesMode(),\n false,\n 'Hooks should never be run when in check no changes mode.',\n );\n const startIndex =\n currentNodeIndex !== undefined\n ? currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask\n : 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1] as number | (() => void);\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i] as number;\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = (arr[i] as number) < 0;\n if (isInitHook) {\n currentView[PREORDER_HOOK_FLAGS] += PreOrderHookFlags.NumberOfInitHooksCalledIncrementer;\n }\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & PreOrderHookFlags.NumberOfInitHooksCalledMask) +\n i +\n 2;\n }\n i++;\n }\n }\n}\n\n/**\n * Executes a single lifecycle hook, making sure that:\n * - it is called in the non-reactive context;\n * - profiling data are registered.\n */\nfunction callHookInternal(directive: any, hook: () => void) {\n profiler(ProfilerEvent.LifecycleHookStart, directive, hook);\n const prevConsumer = setActiveConsumer(null);\n try {\n hook.call(directive);\n } finally {\n setActiveConsumer(prevConsumer);\n profiler(ProfilerEvent.LifecycleHookEnd, directive, hook);\n }\n}\n\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView: LView, initPhase: InitPhaseState, arr: HookData, i: number) {\n const isInitHook = (arr[i] as number) < 0;\n const hook = arr[i + 1] as () => void;\n const directiveIndex = isInitHook ? -arr[i] : (arr[i] as number);\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> LViewFlags.IndexWithinInitPhaseShift;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (\n indexWithintInitPhase <\n currentView[PREORDER_HOOK_FLAGS] >> PreOrderHookFlags.NumberOfInitHooksCalledShift &&\n (currentView[FLAGS] & LViewFlags.InitPhaseStateMask) === initPhase\n ) {\n currentView[FLAGS] += LViewFlags.IndexWithinInitPhaseIncrementer;\n callHookInternal(directive, hook);\n }\n } else {\n callHookInternal(directive, hook);\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.dev/license\n */\n\nimport {InjectFlags} from '../../di/interface/injector';\nimport {ProviderToken} from '../../di/provider_token';\nimport {assertDefined, assertEqual} from '../../util/assert';\n\nimport {TDirectiveHostNode} from './node';\nimport {LView, TData} from './view';\n\n/**\n * Offsets of the `NodeInjector` data structure in the expando.\n *\n * `NodeInjector` is stored in both `LView` as well as `TView.data`. All storage requires 9 words.\n * First 8 are reserved for bloom filter and the 9th is reserved for the associated `TNode` as well\n * as parent `NodeInjector` pointer. All indexes are starting with `index` and have an offset as\n * shown.\n *\n * `LView` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + PARENT: Index to the parent injector. See `RelativeInjectorLocation`\n * `const parent = lView[index + NodeInjectorOffset.PARENT]`\n * ```\n *\n * `TViewData` layout:\n * ```\n * index + 0: cumulative bloom filter\n * index + 1: cumulative bloom filter\n * index + 2: cumulative bloom filter\n * index + 3: cumulative bloom filter\n * index + 4: cumulative bloom filter\n * index + 5: cumulative bloom filter\n * index + 6: cumulative bloom filter\n * index + 7: cumulative bloom filter\n * index + 8: cumulative bloom filter\n * index + TNODE: TNode associated with this `NodeInjector`\n * `const tNode = tView.data[index + NodeInjectorOffset.TNODE]`\n * ```\n */\nexport const enum NodeInjectorOffset {\n TNODE = 8,\n PARENT = 8,\n BLOOM_SIZE = 8,\n SIZE = 9,\n}\n\n/**\n * Represents a relative location of parent injector.\n *\n * The interfaces encodes number of parents `LView`s to traverse and index in the `LView`\n * pointing to the parent injector.\n */\nexport type RelativeInjectorLocation = number & {\n __brand__: 'RelativeInjectorLocationFlags';\n};\n\nexport const enum RelativeInjectorLocationFlags {\n InjectorIndexMask = 0b111111111111111,\n ViewOffsetShift = 16,\n NO_PARENT = -1,\n}\n\nexport const NO_PARENT_INJECTOR = -1 as RelativeInjectorLocation;\n\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nexport class NodeInjectorFactory {\n /**\n * The inject implementation to be activated when using the factory.\n */\n injectImpl: null | (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T);\n\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n resolving = false;\n\n /**\n * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n */\n canSeeViewProviders: boolean;\n\n /**\n * An array of factories to use in case of `multi` provider.\n */\n multi?: Array<() => any>;\n\n /**\n * Number of `multi`-providers which belong to the component.\n *\n * This is needed because when multiple components and directives declare the `multi` provider\n * they have to be concatenated in the correct order.\n *\n * Example:\n *\n * If we have a component and directive active an a single element as declared here\n * ```\n * component:\n * providers: [ {provide: String, useValue: 'component', multi: true} ],\n * viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ],\n *\n * directive:\n * providers: [ {provide: String, useValue: 'directive', multi: true} ],\n * ```\n *\n * Then the expected results are:\n *\n * ```\n * providers: ['component', 'directive']\n * viewProviders: ['component', 'componentView', 'directive']\n * ```\n *\n * The way to think about it is that the `viewProviders` have been inserted after the component\n * but before the directives, which is why we need to know how many `multi`s have been declared by\n * the component.\n */\n componentProviders?: number;\n\n /**\n * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n * See `providerFactory`.\n */\n index?: number;\n\n /**\n * Because the same `multi` provider can be declared in `providers` and `viewProviders` it is\n * possible for `viewProviders` to shadow the `providers`. For this reason we store the\n * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n *\n * Example:\n *\n * Given:\n * ```\n * providers: [ {provide: String, useValue: 'all', multi: true} ],\n * viewProviders: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n * ```\n *\n * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n * of view injection. We further have to make sure that the shared instances (in our case\n * `all`) are the exact same instance in both the content as well as the view injection. (We\n * have to make sure that we don't double instantiate.) For this reason the `viewProviders`\n * `Factory` has a pointer to the shadowed `providers` factory so that it can instantiate the\n * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n * ['all', 'viewOnly']`).\n */\n providerFactory?: NodeInjectorFactory | null;\n\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n public factory: (\n this: NodeInjectorFactory,\n _: undefined,\n /**\n * array where injectables tokens are stored. This is used in\n * case of an error reporting to produce friendlier errors.\n */\n tData: TData,\n /**\n * array where existing instances of injectables are stored. This is used in case\n * of multi shadow is needed. See `multi` field documentation.\n */\n lView: LView,\n /**\n * The TNode of the same element injector.\n */\n tNode: TDirectiveHostNode,\n ) => any,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider: boolean,\n injectImplementation: null | (<T>(token: ProviderToken<T>, flags?: InjectFlags) => T),\n ) {\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\n\nexport function isFactory(obj: any): obj is NodeInjectorFactory {\n return obj instanceof NodeInjectorFactory;\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.dev/license\n */\n\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n// mod1\n// /\n// el1 mod2\n// \\ /\n// el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nexport const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\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.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {convertToBitFlags} from '../di/injector_compatibility';\nimport {InjectFlags, InjectOptions} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR} from '../view/provider_flags';\n\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nexport class ChainedInjector implements Injector {\n constructor(\n public injector: Injector,\n public parentInjector: Injector,\n ) {}\n\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags | InjectOptions): T {\n flags = convertToBitFlags(flags);\n const value = this.injector.get<T | typeof NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR>(\n token,\n NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR,\n flags,\n );\n\n if (\n value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === (NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as unknown as T)\n ) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value as T;\n }\n\n return this.parentInjector.get(token, notFoundValue, flags);\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.dev/license\n */\n\nimport {type Injector} from '../../di/injector';\nimport {assertGreaterThan, assertNotEqual, assertNumber} from '../../util/assert';\nimport {ChainedInjector} from '../chained_injector';\nimport {\n NO_PARENT_INJECTOR,\n RelativeInjectorLocation,\n RelativeInjectorLocationFlags,\n} from '../interfaces/injector';\nimport {DECLARATION_VIEW, HEADER_OFFSET, LView} from '../interfaces/view';\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nexport function hasParentInjector(parentLocation: RelativeInjectorLocation): boolean {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\n\nexport function getParentInjectorIndex(parentLocation: RelativeInjectorLocation): number {\n if (ngDevMode) {\n assertNumber(parentLocation, 'Number expected');\n assertNotEqual(parentLocation as any, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & RelativeInjectorLocationFlags.InjectorIndexMask;\n\n assertGreaterThan(\n parentInjectorIndex,\n HEADER_OFFSET,\n 'Parent injector must be pointing past HEADER_OFFSET.',\n );\n }\n return parentLocation & RelativeInjectorLocationFlags.InjectorIndexMask;\n}\n\nexport function getParentInjectorViewOffset(parentLocation: RelativeInjectorLocation): number {\n return parentLocation >> RelativeInjectorLocationFlags.ViewOffsetShift;\n}\n\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nexport function getParentInjectorView(location: RelativeInjectorLocation, startView: LView): LView {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW]!;\n viewOffset--;\n }\n return parentView;\n}\n\n/**\n * Detects whether an injector is an instance of a `ChainedInjector`,\n * created based on the `OutletInjector`.\n */\nexport function isRouterOutletInjector(currentInjector: Injector): boolean {\n return (\n currentInjector instanceof ChainedInjector &&\n typeof (currentInjector.injector as any).__ngOutletInjector === 'function'\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.dev/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {injectRootLimpMode, setInjectImplementation} from '../di/inject_switch';\nimport {Injector} from '../di/injector';\nimport {convertToBitFlags} from '../di/injector_compatibility';\nimport {InjectorMarkers} from '../di/injector_marker';\nimport {InjectFlags, InjectOptions} from '../di/interface/injector';\nimport {ProviderToken} from '../di/provider_token';\nimport {Type} from '../interface/type';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../util/assert';\nimport {noSideEffects} from '../util/closure';\n\nimport {assertDirectiveDef, assertNodeInjector, assertTNodeForLView} from './assert';\nimport {\n emitInstanceCreatedByInjectorEvent,\n InjectorProfilerContext,\n runInInjectorProfilerContext,\n setInjectorProfilerContext,\n} from './debug/injector_profiler';\nimport {getFactoryDef} from './definition_factory';\nimport {throwCyclicDependencyError, throwProviderNotFoundError} from './errors_di';\nimport {NG_ELEMENT_ID, NG_FACTORY_DEF} from './fields';\nimport {registerPreOrderHooks} from './hooks';\nimport {AttributeMarker} from './interfaces/attribute_marker';\nimport {ComponentDef, DirectiveDef} from './interfaces/definition';\nimport {\n isFactory,\n NO_PARENT_INJECTOR,\n NodeInjectorFactory,\n NodeInjectorOffset,\n RelativeInjectorLocation,\n RelativeInjectorLocationFlags,\n} from './interfaces/injector';\nimport {\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeProviderIndexes,\n TNodeType,\n} from './interfaces/node';\nimport {isComponentDef, isComponentHost} from './interfaces/type_checks';\nimport {\n DECLARATION_COMPONENT_VIEW,\n DECLARATION_VIEW,\n EMBEDDED_VIEW_INJECTOR,\n FLAGS,\n INJECTOR,\n LView,\n LViewFlags,\n T_HOST,\n TData,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {enterDI, getCurrentTNode, getLView, leaveDI} from './state';\nimport {isNameOnlyAttributeMarker} from './util/attrs_utils';\nimport {\n getParentInjectorIndex,\n getParentInjectorView,\n hasParentInjector,\n} from './util/injector_utils';\nimport {stringifyForError} from './util/stringify_utils';\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\n\nexport function setIncludeViewProviders(v: boolean): boolean {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\n\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nexport function bloomAdd(\n injectorIndex: number,\n tView: TView,\n type: ProviderToken<any> | string,\n): void {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id: number | undefined;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = (type as any)[NG_ELEMENT_ID];\n }\n\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = (type as any)[NG_ELEMENT_ID] = nextNgElementId++;\n }\n\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n (tView.data as number[])[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nexport function getOrCreateNodeInjectorForNode(\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n lView: LView,\n): number {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data as any;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < NodeInjectorOffset.BLOOM_SIZE; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n\n lView[injectorIndex + NodeInjectorOffset.PARENT] = parentLoc;\n return injectorIndex;\n}\n\nfunction insertBloom(arr: any[], footer: TNode | null): void {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\n\nexport function getInjectorIndex(tNode: TNode, lView: LView): number {\n if (\n tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + NodeInjectorOffset.PARENT] === null\n ) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nexport function getParentInjectorLocation(tNode: TNode, lView: LView): RelativeInjectorLocation {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex as RelativeInjectorLocation; // ViewOffset is 0\n }\n\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode: TNode | null = null;\n let lViewCursor: LView | null = lView;\n\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode!, lViewCursor[DECLARATION_VIEW]!);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return (parentTNode.injectorIndex |\n (declarationViewOffset <<\n RelativeInjectorLocationFlags.ViewOffsetShift)) as RelativeInjectorLocation;\n }\n }\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nexport function diPublicInInjector(\n injectorIndex: number,\n tView: TView,\n token: ProviderToken<any>,\n): void {\n bloomAdd(injectorIndex, tView, token);\n}\n\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nexport function injectAttributeImpl(tNode: TNode, attrNameToInject: string): string | null {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n\n // Skip namespaced attributes\n if (value === AttributeMarker.NamespaceURI) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1] as string;\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\n\nfunction notFoundValueOrThrow<T>(\n notFoundValue: T | null,\n token: ProviderToken<T>,\n flags: InjectFlags,\n): T | null {\n if (flags & InjectFlags.Optional || notFoundValue !== undefined) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector<T>(\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags,\n notFoundValue?: any,\n): T | null {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow<T>(notFoundValue, token, flags);\n}\n\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nexport function getOrCreateInjectable<T>(\n tNode: TDirectiveHostNode | null,\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags = InjectFlags.Default,\n notFoundValue?: any,\n): T | null {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (\n lView[FLAGS] & LViewFlags.HasEmbeddedViewInjector &&\n // The token must be present on the current node injector when the `Self`\n // flag is set, so the lookup on embedded view injector(s) can be skipped.\n !(flags & InjectFlags.Self)\n ) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(\n tNode,\n lView,\n token,\n flags,\n NOT_FOUND,\n );\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n}\n\n/**\n * Returns the value associated to the given token from the node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingNodeInjector<T>(\n tNode: TDirectiveHostNode,\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags,\n notFoundValue?: any,\n) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return flags & InjectFlags.Host\n ? notFoundValueOrThrow<T>(notFoundValue, token, flags)\n : lookupTokenUsingModuleInjector<T>(lView, token, flags, notFoundValue);\n }\n try {\n let value: unknown;\n\n if (ngDevMode) {\n runInInjectorProfilerContext(\n new NodeInjector(getCurrentTNode() as TElementNode, getLView()),\n token as Type<T>,\n () => {\n value = bloomHash(flags);\n\n if (value != null) {\n emitInstanceCreatedByInjectorEvent(value);\n }\n },\n );\n } else {\n value = bloomHash(flags);\n }\n\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView: TView | null = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode: TNode | null =\n flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation =\n injectorIndex === -1\n ? getParentInjectorLocation(tNode, lView)\n : lView[injectorIndex + NodeInjectorOffset.PARENT];\n\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode &&\n assertTNodeForLView(tView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode, lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance: T | {} | null = searchTokensOnInjector<T>(\n injectorIndex,\n lView,\n token,\n previousTView,\n flags,\n hostTElementNode,\n );\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + NodeInjectorOffset.PARENT];\n if (\n parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(\n flags,\n lView[TVIEW].data[injectorIndex + NodeInjectorOffset.TNODE] === hostTElementNode,\n ) &&\n bloomHasToken(bloomHash, injectorIndex, lView)\n ) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n\n return notFoundValue;\n}\n\nfunction searchTokensOnInjector<T>(\n injectorIndex: number,\n lView: LView,\n token: ProviderToken<T>,\n previousTView: TView | null,\n flags: InjectFlags,\n hostTElementNode: TNode | null,\n) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + NodeInjectorOffset.TNODE] as TNode;\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders =\n previousTView == null\n ? // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n isComponentHost(tNode) && includeViewProviders\n : // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n previousTView != currentTView && (tNode.type & TNodeType.AnyRNode) !== 0;\n\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n\n const injectableIdx = locateDirectiveOrProvider(\n tNode,\n currentTView,\n token,\n canAccessViewProviders,\n isHostSpecialCase,\n );\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode as TElementNode);\n } else {\n return NOT_FOUND;\n }\n}\n\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nexport function locateDirectiveOrProvider<T>(\n tNode: TNode,\n tView: TView,\n token: ProviderToken<T> | string,\n canAccessViewProviders: boolean,\n isHostSpecialCase: boolean | number,\n): number | null {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n\n const injectablesStart = nodeProviderIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount =\n nodeProviderIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n const startingIndex = canAccessViewProviders\n ? injectablesStart\n : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i] as ProviderToken<any> | DirectiveDef<any> | string;\n if (\n (i < directivesStart && token === providerTokenOrDef) ||\n (i >= directivesStart && (providerTokenOrDef as DirectiveDef<any>).type === token)\n ) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart] as DirectiveDef<any>;\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nexport function getNodeInjectable(\n lView: LView,\n tView: TView,\n index: number,\n tNode: TDirectiveHostNode,\n): any {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory: NodeInjectorFactory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n\n let prevInjectContext: InjectorProfilerContext | undefined;\n if (ngDevMode) {\n // tData indexes mirror the concrete instances in its corresponding LView.\n // lView[index] here is either the injectable instace itself or a factory,\n // therefore tData[index] is the constructor of that injectable or a\n // definition object that contains the constructor in a `.type` field.\n const token =\n (tData[index] as DirectiveDef<unknown> | ComponentDef<unknown>).type || tData[index];\n const injector = new NodeInjector(tNode, lView);\n prevInjectContext = setInjectorProfilerContext({injector, token});\n }\n\n const previousInjectImplementation = factory.injectImpl\n ? setInjectImplementation(factory.injectImpl)\n : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode &&\n assertEqual(\n success,\n true,\n \"Because flags do not contain `SkipSelf' we expect this to always succeed.\",\n );\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n\n ngDevMode && emitInstanceCreatedByInjectorEvent(value);\n\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index] as DirectiveDef<any>, tView);\n }\n } finally {\n ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n\n previousInjectImplementation !== null &&\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nexport function bloomHashBitOrFactory(\n token: ProviderToken<any> | string,\n): number | Function | undefined {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId: number | undefined =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? (token as any)[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode &&\n assertEqual(tokenId, InjectorMarkers.Injector, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\n\nexport function bloomHasToken(\n bloomHash: number,\n injectorIndex: number,\n injectorView: LView | TData,\n) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags: InjectFlags, isFirstHostTNode: boolean): boolean | number {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\n\nexport function getNodeInjectorLView(nodeInjector: NodeInjector): LView {\n return (nodeInjector as any)._lView as LView;\n}\n\nexport function getNodeInjectorTNode(\n nodeInjector: NodeInjector,\n): TElementNode | TContainerNode | TElementContainerNode | null {\n return (nodeInjector as any)._tNode as\n | TElementNode\n | TContainerNode\n | TElementContainerNode\n | null;\n}\n\nexport class NodeInjector implements Injector {\n constructor(\n private _tNode: TElementNode | TContainerNode | TElementContainerNode | null,\n private _lView: LView,\n ) {}\n\n get(token: any, notFoundValue?: any, flags?: InjectFlags | InjectOptions): any {\n return getOrCreateInjectable(\n this._tNode,\n this._lView,\n token,\n convertToBitFlags(flags),\n notFoundValue,\n );\n }\n}\n\n/** Creates a `NodeInjector` for the current node. */\nexport function createNodeInjector(): Injector {\n return new NodeInjector(getCurrentTNode()! as TDirectiveHostNode, getLView()) as any;\n}\n\n/**\n * @codeGenApi\n */\nexport function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n\n parent = Object.getPrototypeOf(parent);\n }\n\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return (t: Type<T>) => new t();\n });\n}\n\nfunction getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null) | null {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf<T>(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef<T>(type);\n}\n\n/**\n * Returns a value from the closest embedded or node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingEmbeddedInjector<T>(\n tNode: TDirectiveHostNode,\n lView: LView,\n token: ProviderToken<T>,\n flags: InjectFlags,\n notFoundValue?: any,\n) {\n let currentTNode: TDirectiveHostNode | null = tNode;\n let currentLView: LView | null = lView;\n\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (\n currentTNode !== null &&\n currentLView !== null &&\n currentLView[FLAGS] & LViewFlags.HasEmbeddedViewInjector &&\n !(currentLView[FLAGS] & LViewFlags.IsRoot)\n ) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(\n currentTNode,\n currentLView,\n token,\n flags | InjectFlags.Self,\n NOT_FOUND,\n );\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode: TElementNode | TContainerNode | null = currentTNode.parent;\n\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(\n token,\n NOT_FOUND as T | {},\n flags,\n );\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n\n currentTNode = parentTNode;\n }\n\n return notFoundValue;\n}\n\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView: LView): TElementNode | TElementContainerNode | null {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n\n // The parent pointer differs based on `TView.type`.\n if (tViewType === TViewType.Embedded) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode as TElementContainerNode;\n } else if (tViewType === TViewType.Component) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n return lView[T_HOST] as TElementNode;\n }\n\n return null;\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.dev/license\n */\nimport {injectAttributeImpl} from '../di';\nimport {getCurrentTNode} from '../state';\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nexport function ɵɵinjectAttribute(attrNameToInject: string): string | null {\n return injectAttributeImpl(getCurrentTNode()!, attrNameToInject);\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.dev/license\n */\n\nimport {EMPTY_ARRAY} from '../util/empty';\nimport {stringify} from '../util/stringify';\n\nimport type {Injector} from './injector';\nimport type {Provider, StaticProvider} from './interface/provider';\nimport {importProvidersFrom} from './provider_collection';\nimport {getNullInjector, R3Injector} from './r3_injector';\nimport {InjectorScope} from './scope';\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n */\nexport function createInjector(\n defType: /* InjectorType<any> */ any,\n parent: Injector | null = null,\n additionalProviders: Array<Provider | StaticProvider> | null = null,\n name?: string,\n): Injector {\n const injector = createInjectorWithoutInjectorInstances(\n defType,\n parent,\n additionalProviders,\n name,\n );\n injector.resolveInjectorInitializers();\n return injector;\n}\n\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nexport function createInjectorWithoutInjectorInstances(\n defType: /* InjectorType<any> */ any,\n parent: Injector | null = null,\n additionalProviders: Array<Provider | StaticProvider> | null = null,\n name?: string,\n scopes = new Set<InjectorScope>(),\n): R3Injector {\n const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\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.dev/license\n */\n\nimport {createInjector} from './create_injector';\nimport {THROW_IF_NOT_FOUND, ɵɵinject} from './injector_compatibility';\nimport {InjectorMarkers} from './injector_marker';\nimport {INJECTOR} from './injector_token';\nimport {ɵɵdefineInjectable} from './interface/defs';\nimport {InjectFlags, InjectOptions} from './interface/injector';\nimport {Provider, StaticProvider} from './interface/provider';\nimport {NullInjector} from './null_injector';\nimport {ProviderToken} from './provider_token';\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/di/dependency-injection-providers) that associate\n * dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).\n *\n * @see [DI Providers](guide/di/dependency-injection-providers).\n * @see {@link StaticProvider}\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nexport abstract class Injector {\n static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n static NULL: Injector = /* @__PURE__ */ new NullInjector();\n\n /**\n * Internal note on the `options?: InjectOptions|InjectFlags` override of the `get`\n * method: consider dropping the `InjectFlags` part in one of the major versions.\n * It can **not** be done in minor/patch, since it's breaking for custom injectors\n * that only implement the old `InjectorFlags` interface.\n */\n\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: undefined,\n options: InjectOptions & {\n optional?: false;\n },\n ): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue: null | undefined,\n options: InjectOptions,\n ): T | null;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n */\n abstract get<T>(\n token: ProviderToken<T>,\n notFoundValue?: T,\n options?: InjectOptions | InjectFlags,\n ): T;\n /**\n * Retrieves an instance from the injector based on the provided token.\n * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n * @deprecated use object-based flags (`InjectOptions`) instead.\n */\n abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n /**\n * @deprecated from v4.0.0 use ProviderToken<T>\n * @suppress {duplicate}\n */\n abstract get(token: any, notFoundValue?: any): any;\n\n /**\n * @deprecated from v5 use the new signature Injector.create(options)\n */\n static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n /**\n * Creates a new injector instance that provides one or more dependencies,\n * according to a given type or types of `StaticProvider`.\n *\n * @param options An object with the following properties:\n * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).\n * * `parent`: (optional) A parent injector.\n * * `name`: (optional) A developer-defined identifying name for the new injector.\n *\n * @returns The new injector instance.\n *\n */\n static create(options: {\n providers: Array<Provider | StaticProvider>;\n parent?: Injector;\n name?: string;\n }): Injector;\n\n static create(\n options:\n | StaticProvider[]\n | {providers: Array<Provider | StaticProvider>; parent?: Injector; name?: string},\n parent?: Injector,\n ): Injector {\n if (Array.isArray(options)) {\n return createInjector({name: ''}, parent, options, '');\n } else {\n const name = options.name ?? '';\n return createInjector({name}, options.parent, options.providers, name);\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n });\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__ = InjectorMarkers.Injector;\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {getCurrentTNode} from '../render3/state';\n\nimport {InjectionToken} from './injection_token';\nimport {InjectFlags} from './interface/injector';\n\n/**\n * A token that can be used to inject the tag name of the host node.\n *\n * @usageNotes\n * ### Injecting a tag name that is known to exist\n * ```typescript\n * @Directive()\n * class MyDir {\n * tagName: string = inject(HOST_TAG_NAME);\n * }\n * ```\n *\n * ### Optionally injecting a tag name\n * ```typescript\n * @Directive()\n * class MyDir {\n * tagName: string | null = inject(HOST_TAG_NAME, {optional: true});\n * }\n * ```\n * @publicApi\n */\nexport const HOST_TAG_NAME = new InjectionToken<string>(ngDevMode ? 'HOST_TAG_NAME' : '');\n\n// HOST_TAG_NAME should be resolved at the current node, similar to e.g. ElementRef,\n// so we manually specify __NG_ELEMENT_ID__ here, instead of using a factory.\n// tslint:disable-next-line:no-toplevel-property-access\n(HOST_TAG_NAME as any).__NG_ELEMENT_ID__ = (flags: InjectFlags) => {\n const tNode = getCurrentTNode();\n if (tNode === null) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n 'HOST_TAG_NAME can only be injected in directives and components ' +\n 'during construction time (in a class constructor or as a class field initializer)',\n );\n }\n if (tNode.type & TNodeType.Element) {\n return tNode.value;\n }\n if (flags & InjectFlags.Optional) {\n return null;\n }\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INJECTION_TOKEN,\n ngDevMode &&\n `HOST_TAG_NAME was used on ${getDevModeNodeName(\n tNode,\n )} which doesn't have an underlying element in the DOM. ` +\n `This is invalid, and so the dependency should be marked as optional.`,\n );\n};\n\nfunction getDevModeNodeName(tNode: TNode) {\n if (tNode.type & TNodeType.ElementContainer) {\n return 'an <ng-container>';\n } else if (tNode.type & TNodeType.Container) {\n return 'an <ng-template>';\n } else if (tNode.type & TNodeType.LetDeclaration) {\n return 'an @let declaration';\n } else {\n return 'a node';\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.dev/license\n */\n\nexport const ERROR_ORIGINAL_ERROR = 'ngOriginalError';\n\nexport function wrappedError(message: string, originalError: any): Error {\n const msg = `${message} caused by: ${\n originalError instanceof Error ? originalError.message : originalError\n }`;\n const error = Error(msg);\n (error as any)[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\nexport function getOriginalError(error: Error): Error {\n return (error as any)[ERROR_ORIGINAL_ERROR];\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.dev/license\n */\n\nexport const SCHEDULE_IN_ROOT_ZONE_DEFAULT = true;\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.dev/license\n */\n\nimport {EnvironmentInjector} from '../di';\nimport {LView} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {removeLViewOnDestroy, storeLViewOnDestroy} from '../render3/util/view_utils';\n\n/**\n * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.\n * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`\n * is injected in a component or directive, the callbacks run when that component or\n * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.\n *\n * @publicApi\n */\nexport abstract class DestroyRef {\n // Here the `DestroyRef` acts primarily as a DI token. There are (currently) types of objects that\n // can be returned from the injector when asking for this token:\n // - `NodeInjectorDestroyRef` when retrieved from a node injector;\n // - `EnvironmentInjector` when retrieved from an environment injector\n\n /**\n * Registers a destroy callback in a given lifecycle scope. Returns a cleanup function that can\n * be invoked to unregister the callback.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * const destroyRef = inject(DestroyRef);\n *\n * // register a destroy callback\n * const unregisterFn = destroyRef.onDestroy(() => doSomethingOnDestroy());\n *\n * // stop the destroy callback from executing if needed\n * unregisterFn();\n * ```\n */\n abstract onDestroy(callback: () => void): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => DestroyRef = injectDestroyRef;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ENV_ID__: (injector: EnvironmentInjector) => DestroyRef = (injector) => injector;\n}\n\nclass NodeInjectorDestroyRef extends DestroyRef {\n constructor(private _lView: LView) {\n super();\n }\n\n override onDestroy(callback: () => void): () => void {\n storeLViewOnDestroy(this._lView, callback);\n return () => removeLViewOnDestroy(this._lView, callback);\n }\n}\n\nfunction injectDestroyRef(): DestroyRef {\n return new NodeInjectorDestroyRef(getLView());\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.dev/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {inject} from './di/injector_compatibility';\nimport {ɵɵdefineInjectable} from './di/interface/defs';\nimport {OnDestroy} from './interface/lifecycle_hooks';\n\n/**\n * Internal implementation of the pending tasks service.\n */\nexport class PendingTasks implements OnDestroy {\n private taskId = 0;\n private pendingTasks = new Set<number>();\n private get _hasPendingTasks() {\n return this.hasPendingTasks.value;\n }\n hasPendingTasks = new BehaviorSubject<boolean>(false);\n\n add(): number {\n if (!this._hasPendingTasks) {\n this.hasPendingTasks.next(true);\n }\n const taskId = this.taskId++;\n this.pendingTasks.add(taskId);\n return taskId;\n }\n\n remove(taskId: number): void {\n this.pendingTasks.delete(taskId);\n if (this.pendingTasks.size === 0 && this._hasPendingTasks) {\n this.hasPendingTasks.next(false);\n }\n }\n\n ngOnDestroy(): void {\n this.pendingTasks.clear();\n if (this._hasPendingTasks) {\n this.hasPendingTasks.next(false);\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: PendingTasks,\n providedIn: 'root',\n factory: () => new PendingTasks(),\n });\n}\n\n/**\n * Experimental service that keeps track of pending tasks contributing to the stableness of Angular\n * application. While several existing Angular services (ex.: `HttpClient`) will internally manage\n * tasks influencing stability, this API gives control over stability to library and application\n * developers for specific cases not covered by Angular internals.\n *\n * The concept of stability comes into play in several important scenarios:\n * - SSR process needs to wait for the application stability before serializing and sending rendered\n * HTML;\n * - tests might want to delay assertions until the application becomes stable;\n *\n * @usageNotes\n * ```typescript\n * const pendingTasks = inject(ExperimentalPendingTasks);\n * const taskCleanup = pendingTasks.add();\n * // do work that should block application's stability and then:\n * taskCleanup();\n * ```\n *\n * This API is experimental. Neither the shape, nor the underlying behavior is stable and can change\n * in patch versions. We will iterate on the exact API based on the feedback and our understanding\n * of the problem and solution space.\n *\n * @publicApi\n * @experimental\n */\nexport class ExperimentalPendingTasks {\n private internalPendingTasks = inject(PendingTasks);\n /**\n * Adds a new task that should block application's stability.\n * @returns A cleanup function that removes a task when called.\n */\n add(): () => void {\n const taskId = this.internalPendingTasks.add();\n return () => this.internalPendingTasks.remove(taskId);\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: ExperimentalPendingTasks,\n providedIn: 'root',\n factory: () => new ExperimentalPendingTasks(),\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\nimport {PartialObserver, Subject, Subscription} from 'rxjs';\n\nimport {OutputRef} from './authoring/output/output_ref';\nimport {isInInjectionContext} from './di/contextual';\nimport {inject} from './di/injector_compatibility';\nimport {DestroyRef} from './linker/destroy_ref';\nimport {PendingTasks} from './pending_tasks';\n\n/**\n * Use in components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @publicApi\n */\nexport interface EventEmitter<T> extends Subject<T>, OutputRef<T> {\n /**\n * @internal\n */\n __isAsync: boolean;\n\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param [isAsync=false] When true, deliver events asynchronously.\n *\n */\n new (isAsync?: boolean): EventEmitter<T>;\n\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n emit(value?: T): void;\n\n /**\n * Registers handlers for events emitted by this instance.\n * @param next When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(\n next?: (value: T) => void,\n error?: (error: any) => void,\n complete?: () => void,\n ): Subscription;\n /**\n * Registers handlers for events emitted by this instance.\n * @param observerOrNext When supplied, a custom handler for emitted events, or an observer\n * object.\n * @param error When supplied, a custom handler for an error notification from this emitter.\n * @param complete When supplied, a custom handler for a completion notification from this\n * emitter.\n */\n subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;\n}\n\nclass EventEmitter_ extends Subject<any> implements OutputRef<any> {\n __isAsync: boolean; // tslint:disable-line\n destroyRef: DestroyRef | undefined = undefined;\n private readonly pendingTasks: PendingTasks | undefined = undefined;\n\n constructor(isAsync: boolean = false) {\n super();\n this.__isAsync = isAsync;\n\n // Attempt to retrieve a `DestroyRef` and `PendingTasks` optionally.\n // For backwards compatibility reasons, this cannot be required.\n if (isInInjectionContext()) {\n // `DestroyRef` is optional because it is not available in all contexts.\n // But it is useful to properly complete the `EventEmitter` if used with `outputToObservable`\n // when the component/directive is destroyed. (See `outputToObservable` for more details.)\n this.destroyRef = inject(DestroyRef, {optional: true}) ?? undefined;\n this.pendingTasks = inject(PendingTasks, {optional: true}) ?? undefined;\n }\n }\n\n emit(value?: any) {\n const prevConsumer = setActiveConsumer(null);\n try {\n super.next(value);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n\n override subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription {\n let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext as PartialObserver<unknown>;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.bind(observer);\n }\n\n if (this.__isAsync) {\n errorFn = this.wrapInTimeout(errorFn);\n\n if (nextFn) {\n nextFn = this.wrapInTimeout(nextFn);\n }\n\n if (completeFn) {\n completeFn = this.wrapInTimeout(completeFn);\n }\n }\n\n const sink = super.subscribe({next: nextFn, error: errorFn, complete: completeFn});\n\n if (observerOrNext instanceof Subscription) {\n observerOrNext.add(sink);\n }\n\n return sink;\n }\n\n private wrapInTimeout(fn: (value: unknown) => any) {\n return (value: unknown) => {\n const taskId = this.pendingTasks?.add();\n setTimeout(() => {\n fn(value);\n if (taskId !== undefined) {\n this.pendingTasks?.remove(taskId);\n }\n });\n };\n }\n}\n\n/**\n * @publicApi\n */\nexport const EventEmitter: {\n new (isAsync?: boolean): EventEmitter<any>;\n new <T>(isAsync?: boolean): EventEmitter<T>;\n readonly prototype: EventEmitter<any>;\n} = EventEmitter_ as any;\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.dev/license\n */\n\nexport function noop(...args: any[]): any {\n // Do nothing.\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.dev/license\n */\n\nimport {noop} from './noop';\n\n/**\n * Gets a scheduling function that runs the callback after the first of setTimeout and\n * requestAnimationFrame resolves.\n *\n * - `requestAnimationFrame` ensures that change detection runs ahead of a browser repaint.\n * This ensures that the create and update passes of a change detection always happen\n * in the same frame.\n * - When the browser is resource-starved, `rAF` can execute _before_ a `setTimeout` because\n * rendering is a very high priority process. This means that `setTimeout` cannot guarantee\n * same-frame create and update pass, when `setTimeout` is used to schedule the update phase.\n * - While `rAF` gives us the desirable same-frame updates, it has two limitations that\n * prevent it from being used alone. First, it does not run in background tabs, which would\n * prevent Angular from initializing an application when opened in a new tab (for example).\n * Second, repeated calls to requestAnimationFrame will execute at the refresh rate of the\n * hardware (~16ms for a 60Hz display). This would cause significant slowdown of tests that\n * are written with several updates and asserts in the form of \"update; await stable; assert;\".\n * - Both `setTimeout` and `rAF` are able to \"coalesce\" several events from a single user\n * interaction into a single change detection. Importantly, this reduces view tree traversals when\n * compared to an alternative timing mechanism like `queueMicrotask`, where change detection would\n * then be interleaves between each event.\n *\n * By running change detection after the first of `setTimeout` and `rAF` to execute, we get the\n * best of both worlds.\n *\n * @returns a function to cancel the scheduled callback\n */\nexport function scheduleCallbackWithRafRace(callback: Function): () => void {\n let timeoutId: number;\n let animationFrameId: number;\n function cleanup() {\n callback = noop;\n try {\n if (animationFrameId !== undefined && typeof cancelAnimationFrame === 'function') {\n cancelAnimationFrame(animationFrameId);\n }\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n }\n } catch {\n // Clearing/canceling can fail in tests due to the timing of functions being patched and unpatched\n // Just ignore the errors - we protect ourselves from this issue by also making the callback a no-op.\n }\n }\n timeoutId = setTimeout(() => {\n callback();\n cleanup();\n }) as unknown as number;\n if (typeof requestAnimationFrame === 'function') {\n animationFrameId = requestAnimationFrame(() => {\n callback();\n cleanup();\n });\n }\n\n return () => cleanup();\n}\n\nexport function scheduleCallbackWithMicrotask(callback: Function): () => void {\n queueMicrotask(() => callback());\n\n return () => {\n callback = noop;\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.dev/license\n */\n\nimport {SCHEDULE_IN_ROOT_ZONE_DEFAULT} from '../change_detection/scheduling/flags';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {EventEmitter} from '../event_emitter';\nimport {scheduleCallbackWithRafRace} from '../util/callback_scheduler';\nimport {noop} from '../util/noop';\n\nimport {AsyncStackTaggingZoneSpec} from './async-stack-tagging';\n\n// The below is needed as otherwise a number of targets fail in G3 due to:\n// ERROR - [JSC_UNDEFINED_VARIABLE] variable Zone is undeclared\ndeclare const Zone: any;\n\nconst isAngularZoneProperty = 'isAngularZone';\nexport const angularZoneInstanceIdProperty = isAngularZoneProperty + '_ID';\n\nlet ngZoneInstanceId = 0;\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NgZone {\n readonly hasPendingMacrotasks: boolean = false;\n readonly hasPendingMicrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n constructor(options: {\n enableLongStackTrace?: boolean;\n shouldCoalesceEventChangeDetection?: boolean;\n shouldCoalesceRunChangeDetection?: boolean;\n }) {\n const {\n enableLongStackTrace = false,\n shouldCoalesceEventChangeDetection = false,\n shouldCoalesceRunChangeDetection = false,\n scheduleInRootZone = SCHEDULE_IN_ROOT_ZONE_DEFAULT,\n } = options as InternalNgZoneOptions;\n\n if (typeof Zone == 'undefined') {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_ZONEJS,\n ngDevMode && `In this configuration Angular requires Zone.js`,\n );\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n // AsyncStackTaggingZoneSpec provides `linked stack traces` to show\n // where the async operation is scheduled. For more details, refer\n // to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/\n // And we only import this AsyncStackTaggingZoneSpec in development mode,\n // in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.\n if (ngDevMode) {\n self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\n }\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any)());\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection =\n !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.callbackScheduled = false;\n self.scheduleInRootZone = scheduleInRootZone;\n forkInnerZoneWithAngularBehavior(self);\n }\n\n /**\n This method checks whether the method call happens within an Angular Zone instance.\n */\n static isInAngularZone(): boolean {\n // Zone needs to be checked, because this method might be called even when NoopNgZone is used.\n return typeof Zone !== 'undefined' && Zone.current.get(isAngularZoneProperty) === true;\n }\n\n /**\n Assures that the method is called within the Angular Zone, otherwise throws an error.\n */\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_ZONE_STATE,\n ngDevMode && 'Expected to be in Angular Zone, but it is not!',\n );\n }\n }\n\n /**\n Assures that the method is called outside of the Angular Zone, otherwise throws an error.\n */\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_ZONE_STATE,\n ngDevMode && 'Expected to not be in Angular Zone, but it is!',\n );\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn);\n }\n}\n\nconst EMPTY_PAYLOAD = {};\n\nexport interface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n _hasPendingMicrotasks: boolean;\n\n hasPendingMacrotasks: boolean;\n hasPendingMicrotasks: boolean;\n callbackScheduled: boolean;\n /**\n * A flag to indicate if NgZone is currently inside\n * checkStable and to prevent re-entry. The flag is\n * needed because it is possible to invoke the change\n * detection from within change detection leading to\n * incorrect behavior.\n *\n * For detail, please refer here,\n * https://github.com/angular/angular/pull/40540\n */\n isCheckStableRunning: boolean;\n isStable: boolean;\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling it in an animation frame. So in the case above,\n * the change detection will only be trigged once.\n */\n shouldCoalesceEventChangeDetection: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loops trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n shouldCoalesceRunChangeDetection: boolean;\n\n /**\n * Whether to schedule the coalesced change detection in the root zone\n */\n scheduleInRootZone: boolean;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction delayChangeDetectionForEvents(zone: NgZonePrivate) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.callbackScheduled) {\n return;\n }\n zone.callbackScheduled = true;\n function scheduleCheckStable() {\n scheduleCallbackWithRafRace(() => {\n zone.callbackScheduled = false;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n });\n }\n if (zone.scheduleInRootZone) {\n Zone.root.run(() => {\n scheduleCheckStable();\n });\n } else {\n zone._outer.run(() => {\n scheduleCheckStable();\n });\n }\n updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n const instanceId = ngZoneInstanceId++;\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{\n [isAngularZoneProperty]: true,\n [angularZoneInstanceIdProperty]: instanceId,\n [angularZoneInstanceIdProperty + instanceId]: true,\n },\n onInvokeTask: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n task: Task,\n applyThis: any,\n applyArgs: any,\n ): any => {\n // Prevent triggering change detection when the flag is detected.\n if (shouldBeIgnoredByZone(applyArgs)) {\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if (\n (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection\n ) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onInvoke: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n callback: Function,\n applyThis: any,\n applyArgs?: any[],\n source?: string,\n ): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (\n zone.shouldCoalesceRunChangeDetection &&\n // Do not delay change detection when the task is the scheduler's tick.\n // We need to synchronously trigger the stability logic so that the\n // zone-based scheduler can prevent a duplicate ApplicationRef.tick\n // by first checking if the scheduler tick is running. This does seem a bit roundabout,\n // but we _do_ still want to trigger all the correct events when we exit the zone.run\n // (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which\n // relies on these events happening after change detection runs).\n // Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate\n // but is added here as well to prevent reads of applyArgs when not necessary\n !zone.callbackScheduled &&\n !isSchedulerTick(applyArgs)\n ) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onHasTask: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n hasTaskState: HasTaskState,\n ) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n },\n });\n}\n\nfunction updateMicroTaskStatus(zone: NgZonePrivate) {\n if (\n zone._hasPendingMicrotasks ||\n ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n zone.callbackScheduled === true)\n ) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nexport class NoopNgZone implements NgZone {\n readonly hasPendingMicrotasks = false;\n readonly hasPendingMacrotasks = false;\n readonly isStable = true;\n readonly onUnstable = new EventEmitter<any>();\n readonly onMicrotaskEmpty = new EventEmitter<any>();\n readonly onStable = new EventEmitter<any>();\n readonly onError = new EventEmitter<any>();\n\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T {\n return fn.apply(applyThis, applyArgs);\n }\n\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return fn();\n }\n\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T {\n return fn.apply(applyThis, applyArgs);\n }\n}\n\nfunction shouldBeIgnoredByZone(applyArgs: unknown): boolean {\n return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');\n}\n\nfunction isSchedulerTick(applyArgs: unknown): boolean {\n return hasApplyArgsData(applyArgs, '__scheduler_tick__');\n}\n\nfunction hasApplyArgsData(applyArgs: unknown, key: string) {\n if (!Array.isArray(applyArgs)) {\n return false;\n }\n\n // We should only ever get 1 arg passed through to invokeTask.\n // Short circuit here incase that behavior changes.\n if (applyArgs.length !== 1) {\n return false;\n }\n\n return applyArgs[0]?.data?.[key] === true;\n}\n\n// Set of options recognized by the NgZone.\nexport interface InternalNgZoneOptions {\n enableLongStackTrace?: boolean;\n shouldCoalesceEventChangeDetection?: boolean;\n shouldCoalesceRunChangeDetection?: boolean;\n scheduleInRootZone?: boolean;\n}\n\nexport function getNgZone(\n ngZoneToUse: NgZone | 'zone.js' | 'noop' = 'zone.js',\n options: InternalNgZoneOptions,\n): NgZone {\n if (ngZoneToUse === 'noop') {\n return new NoopNgZone();\n }\n if (ngZoneToUse === 'zone.js') {\n return new NgZone(options);\n }\n return ngZoneToUse;\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.dev/license\n */\n\nimport {inject, InjectionToken} from './di';\nimport {getOriginalError} from './util/errors';\nimport {NgZone} from './zone';\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nexport class ErrorHandler {\n /**\n * @internal\n */\n _console: Console = console;\n\n handleError(error: any): void {\n const originalError = this._findOriginalError(error);\n\n this._console.error('ERROR', error);\n if (originalError) {\n this._console.error('ORIGINAL ERROR', originalError);\n }\n }\n\n /** @internal */\n _findOriginalError(error: any): Error | null {\n let e = error && getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n\n return e || null;\n }\n}\n\n/**\n * `InjectionToken` used to configure how to call the `ErrorHandler`.\n *\n * `NgZone` is provided by default today so the default (and only) implementation for this\n * is calling `ErrorHandler.handleError` outside of the Angular zone.\n */\nexport const INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken<(e: any) => void>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'internal error handler' : '',\n {\n providedIn: 'root',\n factory: () => {\n const zone = inject(NgZone);\n const userErrorHandler = inject(ErrorHandler);\n return (e: unknown) => zone.runOutsideAngular(() => userErrorHandler.handleError(e));\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.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\n\nimport {\n createInputSignal,\n InputOptions,\n InputOptionsWithoutTransform,\n InputOptionsWithTransform,\n InputSignal,\n InputSignalWithTransform,\n} from './input_signal';\nimport {REQUIRED_UNSET_VALUE} from './input_signal_node';\n\nexport function inputFunction<ReadT, WriteT>(\n initialValue?: ReadT,\n opts?: InputOptions<ReadT, WriteT>,\n): InputSignalWithTransform<ReadT | undefined, WriteT> {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(initialValue, opts);\n}\n\nexport function inputRequiredFunction<ReadT, WriteT = ReadT>(\n opts?: InputOptions<ReadT, WriteT>,\n): InputSignalWithTransform<ReadT, WriteT> {\n ngDevMode && assertInInjectionContext(input);\n return createInputSignal(REQUIRED_UNSET_VALUE as never, opts);\n}\n\n/**\n * The `input` function allows declaration of inputs in directives and\n * components.\n *\n * The function exposes an API for also declaring required inputs via the\n * `input.required` function.\n *\n * @developerPreview\n * @docsPrivate Ignored because `input` is the canonical API entry.\n */\nexport interface InputFunction {\n /**\n * Initializes an input of type `T` with an initial value of `undefined`.\n * Angular will implicitly use `undefined` as initial value.\n */\n <T>(): InputSignal<T | undefined>;\n /** Declares an input of type `T` with an explicit initial value. */\n <T>(initialValue: T, opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;\n /**\n * Declares an input of type `T` with an initial value and a transform\n * function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T`.\n */\n <T, TransformT>(\n initialValue: T,\n opts: InputOptionsWithTransform<T, TransformT>,\n ): InputSignalWithTransform<T, TransformT>;\n\n /**\n * Initializes a required input.\n *\n * Consumers of your directive/component need to bind to this\n * input. If unset, a compile time error will be reported.\n *\n * @developerPreview\n */\n required: {\n /** Declares a required input of type `T`. */\n <T>(opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;\n /**\n * Declares a required input of type `T` with a transform function.\n *\n * The input accepts values of type `TransformT` and the given\n * transform function will transform the value to type `T`.\n */\n <T, TransformT>(\n opts: InputOptionsWithTransform<T, TransformT>,\n ): InputSignalWithTransform<T, TransformT>;\n };\n}\n\n/**\n * The `input` function allows declaration of Angular inputs in directives\n * and components.\n *\n * There are two variants of inputs that can be declared:\n *\n * 1. **Optional inputs** with an initial value.\n * 2. **Required inputs** that consumers need to set.\n *\n * By default, the `input` function will declare optional inputs that\n * always have an initial value. Required inputs can be declared\n * using the `input.required()` function.\n *\n * Inputs are signals. The values of an input are exposed as a `Signal`.\n * The signal always holds the latest value of the input that is bound\n * from the parent.\n *\n * @usageNotes\n * To use signal-based inputs, import `input` from `@angular/core`.\n *\n * ```\n * import {input} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `input` or `input.required`.\n *\n * ```ts\n * @Component({\n * ...\n * })\n * export class UserProfileComponent {\n * firstName = input<string>(); // Signal<string|undefined>\n * lastName = input.required<string>(); // Signal<string>\n * age = input(0) // Signal<number>\n * }\n * ```\n *\n * Inside your component template, you can display values of the inputs\n * by calling the signal.\n *\n * ```html\n * <span>{{firstName()}}</span>\n * ```\n *\n * @developerPreview\n * @initializerApiFunction\n */\nexport const input: InputFunction = (() => {\n // Note: This may be considered a side-effect, but nothing will depend on\n // this assignment, unless this `input` constant export is accessed. It's a\n // self-contained side effect that is local to the user facing`input` export.\n (inputFunction as any).required = inputRequiredFunction;\n return inputFunction as typeof inputFunction & {required: typeof inputRequiredFunction};\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.dev/license\n */\n\nimport {TNode} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getNativeByTNode} from '../render3/util/view_utils';\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nexport function injectElementRef(): ElementRef {\n return createElementRef(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nexport function createElementRef(tNode: TNode, lView: LView): ElementRef {\n return new ElementRef(getNativeByTNode(tNode, lView) as RElement);\n}\n\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nexport class ElementRef<T = any> {\n /**\n * <div class=\"callout is-critical\">\n * <header>Use with caution</header>\n * <p>\n * Use this API as the last resort when direct access to DOM is needed. Use templating and\n * data-binding provided by Angular instead. Alternatively you can take a look at\n * {@link Renderer2} which provides an API that can be safely used.\n * </p>\n * </div>\n */\n public nativeElement: T;\n\n constructor(nativeElement: T) {\n this.nativeElement = nativeElement;\n }\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ElementRef = injectElementRef;\n}\n\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nexport function unwrapElementRef<T, R>(value: T | ElementRef<R>): T | R {\n return value instanceof ElementRef ? value.nativeElement : value;\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.dev/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {EventEmitter} from '../event_emitter';\nimport {Writable} from '../interface/type';\nimport {arrayEquals, flatten} from '../util/array_utils';\n\nfunction symbolIterator<T>(this: QueryList<T>): Iterator<T> {\n // @ts-expect-error accessing a private member\n return this._results[Symbol.iterator]();\n}\n\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nexport class QueryList<T> implements Iterable<T> {\n public readonly dirty = true;\n private _onDirty?: () => void = undefined;\n private _results: Array<T> = [];\n private _changesDetected: boolean = false;\n private _changes: EventEmitter<QueryList<T>> | undefined = undefined;\n\n readonly length: number = 0;\n readonly first: T = undefined!;\n readonly last: T = undefined!;\n\n /**\n * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n */\n get changes(): Observable<any> {\n return (this._changes ??= new EventEmitter());\n }\n\n /**\n * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n * the same result)\n */\n constructor(private _emitDistinctChangesOnly: boolean = false) {\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [Symbol.iterator](): Iterator<T> { ... }\n const proto = QueryList.prototype;\n if (!proto[Symbol.iterator]) proto[Symbol.iterator] = symbolIterator;\n }\n\n /**\n * Returns the QueryList entry at `index`.\n */\n get(index: number): T | undefined {\n return this._results[index];\n }\n\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n map<U>(fn: (item: T, index: number, array: T[]) => U): U[] {\n return this._results.map(fn);\n }\n\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S): S[];\n filter(predicate: (value: T, index: number, array: readonly T[]) => unknown): T[];\n filter(fn: (item: T, index: number, array: T[]) => boolean): T[] {\n return this._results.filter(fn);\n }\n\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined {\n return this._results.find(fn);\n }\n\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U {\n return this._results.reduce(fn, init);\n }\n\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n forEach(fn: (item: T, index: number, array: T[]) => void): void {\n this._results.forEach(fn);\n }\n\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n some(fn: (value: T, index: number, array: T[]) => boolean): boolean {\n return this._results.some(fn);\n }\n\n /**\n * Returns a copy of the internal results list as an Array.\n */\n toArray(): T[] {\n return this._results.slice();\n }\n\n toString(): string {\n return this._results.toString();\n }\n\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The query results to store\n * @param identityAccessor Optional function for extracting stable object identity from a value\n * in the array. This function is executed for each element of the query result list while\n * comparing current query list with the new one (provided as a first argument of the `reset`\n * function) to detect if the lists are different. If the function is not provided, elements\n * are compared as is (without any pre-processing).\n */\n reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void {\n (this as {dirty: boolean}).dirty = false;\n const newResultFlat = flatten(resultsTree);\n if ((this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor))) {\n this._results = newResultFlat;\n (this as Writable<this>).length = newResultFlat.length;\n (this as Writable<this>).last = newResultFlat[this.length - 1];\n (this as Writable<this>).first = newResultFlat[0];\n }\n }\n\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n notifyOnChanges(): void {\n if (this._changes !== undefined && (this._changesDetected || !this._emitDistinctChangesOnly))\n this._changes.emit(this);\n }\n\n /** @internal */\n onDirty(cb: () => void) {\n this._onDirty = cb;\n }\n\n /** internal */\n setDirty() {\n (this as {dirty: boolean}).dirty = true;\n this._onDirty?.();\n }\n\n /** internal */\n destroy(): void {\n if (this._changes !== undefined) {\n this._changes.complete();\n this._changes.unsubscribe();\n }\n }\n\n // The implementation of `Symbol.iterator` should be declared here, but this would cause\n // tree-shaking issues with `QueryList. So instead, it's added in the constructor (see comments\n // there) and this declaration is left here to ensure that TypeScript considers QueryList to\n // implement the Iterable interface. This is required for template type-checking of NgFor loops\n // over QueryLists to work correctly, since QueryList must be assignable to NgIterable.\n [Symbol.iterator]!: () => Iterator<T>;\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.dev/license\n */\n\nimport {TNode, TNodeFlags} from '../render3/interfaces/node';\nimport {RElement} from '../render3/interfaces/renderer_dom';\n\n/**\n * The name of an attribute that can be added to the hydration boundary node\n * (component host node) to disable hydration for the content within that boundary.\n */\nexport const SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\n\n/** Lowercase name of the `ngSkipHydration` attribute used for case-insensitive comparisons. */\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\n\n/**\n * Helper function to check if a given TNode has the 'ngSkipHydration' attribute.\n */\nexport function hasSkipHydrationAttrOnTNode(tNode: TNode): boolean {\n const attrs = tNode.mergedAttrs;\n if (attrs === null) return false;\n // only ever look at the attribute name and skip the values\n for (let i = 0; i < attrs.length; i += 2) {\n const value = attrs[i];\n // This is a marker, which means that the static attributes section is over,\n // so we can exit early.\n if (typeof value === 'number') return false;\n if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Helper function to check if a given RElement has the 'ngSkipHydration' attribute.\n */\nexport function hasSkipHydrationAttrOnRElement(rNode: RElement): boolean {\n return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\n\n/**\n * Checks whether a TNode has a flag to indicate that it's a part of\n * a skip hydration block.\n */\nexport function hasInSkipHydrationBlockFlag(tNode: TNode): boolean {\n return (tNode.flags & TNodeFlags.inSkipHydrationBlock) === TNodeFlags.inSkipHydrationBlock;\n}\n\n/**\n * Helper function that determines if a given node is within a skip hydration block\n * by navigating up the TNode tree to see if any parent nodes have skip hydration\n * attribute.\n */\nexport function isInSkipHydrationBlock(tNode: TNode): boolean {\n if (hasInSkipHydrationBlockFlag(tNode)) {\n return true;\n }\n let currentTNode: TNode | null = tNode.parent;\n while (currentTNode) {\n if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent;\n }\n return false;\n}\n\n/**\n * Check if an i18n block is in a skip hydration section by looking at a parent TNode\n * to determine if this TNode is in a skip hydration section or the TNode has\n * the `ngSkipHydration` attribute.\n */\nexport function isI18nInSkipHydrationBlock(parentTNode: TNode): boolean {\n return (\n hasInSkipHydrationBlockFlag(parentTNode) ||\n hasSkipHydrationAttrOnTNode(parentTNode) ||\n isInSkipHydrationBlock(parentTNode)\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.dev/license\n */\n\nimport {assertNumber} from '../../util/assert';\n\nimport {ID, LView} from './view';\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map<number, LView>();\n\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n\n/** Gets a unique ID that can be assigned to an LView. */\nexport function getUniqueLViewId(): number {\n return uniqueIdCounter++;\n}\n\n/** Starts tracking an LView. */\nexport function registerLView(lView: LView): void {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n\n/** Gets an LView by its unique ID. */\nexport function getLViewById(id: number): LView | null {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n\n/** Stops tracking an LView. */\nexport function unregisterLView(lView: LView): void {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\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.dev/license\n */\nimport '../util/ng_dev_mode';\n\nimport {assertDefined, assertDomNode} from '../util/assert';\nimport {EMPTY_ARRAY} from '../util/empty';\n\nimport {assertLView} from './assert';\nimport {LContext} from './interfaces/context';\nimport {getLViewById, registerLView} from './interfaces/lview_tracking';\nimport {TNode} from './interfaces/node';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {isLView} from './interfaces/type_checks';\nimport {CONTEXT, HEADER_OFFSET, HOST, ID, LView, TVIEW} from './interfaces/view';\nimport {getComponentLViewByIndex, unwrapRNode} from './util/view_utils';\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nexport function getLContext(target: any): LContext | null {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (isLView(mpValue)) {\n const lView: LView = mpValue!;\n let nodeIndex: number;\n let component: any = undefined;\n let directives: any[] | null | undefined = undefined;\n\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n } else {\n nodeIndex = findViaNativeElement(lView, target as RElement);\n if (nodeIndex == -1) {\n return null;\n }\n }\n\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context: LContext =\n existingCtx && !Array.isArray(existingCtx)\n ? existingCtx\n : createLContext(lView, nodeIndex, native);\n\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target as RElement;\n ngDevMode && assertDomNode(rElement);\n\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement as any;\n while ((parent = parent.parentNode)) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? (parentContext as LView) : parentContext.lView;\n\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return (mpValue as LContext) || null;\n}\n\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView: LView, nodeIndex: number, native: RNode): LContext {\n return new LContext(lView[ID], nodeIndex, native);\n}\n\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nexport function getComponentViewByInstance(componentInstance: {}): LView {\n let patchedData = readPatchedData(componentInstance);\n let lView: LView;\n\n if (isLView(patchedData)) {\n const contextLView: LView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST] as RElement);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = patchedData as unknown as LContext;\n const contextLView = context.lView!;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\nexport function attachLViewId(target: any, data: LView) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readLView(target: any): LView | null {\n const data = readPatchedData(target);\n if (isLView(data)) {\n return data;\n }\n return data ? data.lView : null;\n}\n\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nexport function attachPatchData(target: any, data: LView | LContext) {\n ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n } else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n}\n\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nexport function readPatchedData(target: any): LView | LContext | null {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return typeof data === 'number' ? getLViewById(data) : data || null;\n}\n\nexport function readPatchedLView<T>(target: any): LView<T> | null {\n const value = readPatchedData(target);\n if (value) {\n return (isLView(value) ? value : value.lView) as LView<T>;\n }\n return null;\n}\n\nexport function isComponentInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\n\nexport function isDirectiveInstance(instance: any): boolean {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView: LView, target: RElement): number {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode: TNode): TNode | null {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView: LView, componentInstance: {}): number {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView: LView, directiveInstance: {}): number {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n\n/**\n * Returns a list of directives applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nexport function getDirectivesAtNodeIndex(nodeIndex: number, lView: LView): any[] | null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n const results: any[] = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\n\nexport function getComponentAtNodeIndex(nodeIndex: number, lView: LView): {} | null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n const {directiveStart, componentOffset} = tNode;\n return componentOffset > -1 ? lView[directiveStart + componentOffset] : null;\n}\n\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nexport function discoverLocalRefs(lView: LView, nodeIndex: number): {[key: string]: any} | null {\n const tNode = lView[TVIEW].data[nodeIndex] as TNode;\n if (tNode && tNode.localNames) {\n const result: {[key: string]: any} = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n\n return null;\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.dev/license\n */\n\nimport {assertDefined} from '../../util/assert';\nimport {assertLView} from '../assert';\nimport {readPatchedLView} from '../context_discovery';\nimport {LContainer} from '../interfaces/container';\nimport {isLContainer, isLView} from '../interfaces/type_checks';\nimport {CHILD_HEAD, CONTEXT, FLAGS, LView, LViewFlags, NEXT, PARENT} from '../interfaces/view';\n\nimport {getLViewParent} from './view_utils';\n\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nexport function getRootView<T>(componentOrLView: LView | {}): LView<T> {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView)!;\n while (lView && !(lView[FLAGS] & LViewFlags.IsRoot)) {\n lView = getLViewParent(lView)!;\n }\n ngDevMode && assertLView(lView);\n return lView as LView<T>;\n}\n\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nexport function getRootContext<T>(viewOrComponent: LView<T> | {}): T {\n const rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT] as T;\n}\n\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nexport function getFirstLContainer(lView: LView): LContainer | null {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nexport function getNextLContainer(container: LContainer): LContainer | null {\n return getNearestLContainer(container[NEXT]);\n}\n\nfunction getNearestLContainer(viewOrContainer: LContainer | LView | null) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer as LContainer | null;\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\n\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser` and `Server`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT: Document | undefined = undefined;\n\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nexport function setDocument(document: Document | undefined): void {\n DOCUMENT = document;\n}\n\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nexport function getDocument(): Document {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_DOCUMENT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`,\n );\n\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API.\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.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {getDocument} from '../render3/interfaces/document';\n\n/**\n * A DI token representing a string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated} is being used.\n *\n * The token is needed in cases when multiple applications are bootstrapped on a page\n * (for example, using `bootstrapApplication` calls). In this case, ensure that those applications\n * have different `APP_ID` value setup. For example:\n *\n * ```\n * bootstrapApplication(ComponentA, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-a' },\n * // ... other providers ...\n * ]\n * });\n *\n * bootstrapApplication(ComponentB, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-b' },\n * // ... other providers ...\n * ]\n * });\n * ```\n *\n * By default, when there is only one application bootstrapped, you don't need to provide the\n * `APP_ID` token (the `ng` will be used as an app ID).\n *\n * @publicApi\n */\nexport const APP_ID = new InjectionToken<string>(ngDevMode ? 'AppId' : '', {\n providedIn: 'root',\n factory: () => DEFAULT_APP_ID,\n});\n\n/** Default value of the `APP_ID` token. */\nconst DEFAULT_APP_ID = 'ng';\n\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nexport const PLATFORM_INITIALIZER = new InjectionToken<ReadonlyArray<() => void>>(\n ngDevMode ? 'Platform Initializer' : '',\n);\n\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nexport const PLATFORM_ID = new InjectionToken<Object>(ngDevMode ? 'Platform ID' : '', {\n providedIn: 'platform',\n factory: () => 'unknown', // set a default platform name, when none set explicitly\n});\n\n/**\n * A DI token that indicates the root directory of\n * the application\n * @publicApi\n * @deprecated\n */\nexport const PACKAGE_ROOT_URL = new InjectionToken<string>(\n ngDevMode ? 'Application Packages Root URL' : '',\n);\n\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n\n/**\n * A [DI token](api/core/InjectionToken) that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nexport const ANIMATION_MODULE_TYPE = new InjectionToken<'NoopAnimations' | 'BrowserAnimations'>(\n ngDevMode ? 'AnimationModuleType' : '',\n);\n\n// TODO(crisbeto): link to CSP guide here.\n/**\n * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that\n * Angular will apply when inserting inline styles. If not provided, Angular will look up its value\n * from the `ngCspNonce` attribute of the application root node.\n *\n * @publicApi\n */\nexport const CSP_NONCE = new InjectionToken<string | null>(ngDevMode ? 'CSP nonce' : '', {\n providedIn: 'root',\n factory: () => {\n // Ideally we wouldn't have to use `querySelector` here since we know that the nonce will be on\n // the root node, but because the token value is used in renderers, it has to be available\n // *very* early in the bootstrapping process. This should be a fairly shallow search, because\n // the app won't have been added to the DOM yet. Some approaches that were considered:\n // 1. Find the root node through `ApplicationRef.components[i].location` - normally this would\n // be enough for our purposes, but the token is injected very early so the `components` array\n // isn't populated yet.\n // 2. Find the root `LView` through the current `LView` - renderers are a prerequisite to\n // creating the `LView`. This means that no `LView` will have been entered when this factory is\n // invoked for the root component.\n // 3. Have the token factory return `() => string` which is invoked when a nonce is requested -\n // the slightly later execution does allow us to get an `LView` reference, but the fact that\n // it is a function means that it could be executed at *any* time (including immediately) which\n // may lead to weird bugs.\n // 4. Have the `ComponentFactory` read the attribute and provide it to the injector under the\n // hood - has the same problem as #1 and #2 in that the renderer is used to query for the root\n // node and the nonce value needs to be available when the renderer is created.\n return getDocument().body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') || null;\n },\n});\n\n/**\n * A configuration object for the image-related options. Contains:\n * - breakpoints: An array of integer breakpoints used to generate\n * srcsets for responsive images.\n * - disableImageSizeWarning: A boolean value. Setting this to true will\n * disable console warnings about oversized images.\n * - disableImageLazyLoadWarning: A boolean value. Setting this to true will\n * disable console warnings about LCP images configured with `loading=\"lazy\"`.\n * Learn more about the responsive image configuration in [the NgOptimizedImage\n * guide](guide/image-optimization).\n * Learn more about image warning options in [the related error page](errors/NG0913).\n * @publicApi\n */\nexport type ImageConfig = {\n breakpoints?: number[];\n placeholderResolution?: number;\n disableImageSizeWarning?: boolean;\n disableImageLazyLoadWarning?: boolean;\n};\n\nexport const IMAGE_CONFIG_DEFAULTS: ImageConfig = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n placeholderResolution: 30,\n disableImageSizeWarning: false,\n disableImageLazyLoadWarning: false,\n};\n\n/**\n * Injection token that configures the image optimized image functionality.\n * See {@link ImageConfig} for additional information about parameters that\n * can be used.\n *\n * @see {@link NgOptimizedImage}\n * @see {@link ImageConfig}\n * @publicApi\n */\nexport const IMAGE_CONFIG = new InjectionToken<ImageConfig>(ngDevMode ? 'ImageConfig' : '', {\n providedIn: 'root',\n factory: () => IMAGE_CONFIG_DEFAULTS,\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.dev/license\n */\n\nimport {APP_ID, PLATFORM_ID} from './application/application_tokens';\nimport {inject} from './di/injector_compatibility';\nimport {ɵɵdefineInjectable} from './di/interface/defs';\nimport {getDocument} from './render3/interfaces/document';\n\n/**\n * A type-safe key to use with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport type StateKey<T> = string & {\n __not_a_string: never;\n __value_type?: T;\n};\n\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport function makeStateKey<T = void>(key: string): StateKey<T> {\n return key as StateKey<T>;\n}\n\nfunction initTransferState(): TransferState {\n const transferState = new TransferState();\n if (inject(PLATFORM_ID) === 'browser') {\n transferState.store = retrieveTransferredState(getDocument(), inject(APP_ID));\n }\n\n return transferState;\n}\n\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * The `TransferState` is available as an injectable token.\n * On the client, just inject this token using DI and use it, it will be lazily initialized.\n * On the server it's already included if `renderApplication` function is used. Otherwise, import\n * the `ServerTransferStateModule` module to make the `TransferState` available.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nexport class TransferState {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: TransferState,\n providedIn: 'root',\n factory: initTransferState,\n });\n\n /** @internal */\n store: Record<string, unknown | undefined> = {};\n\n private onSerializeCallbacks: {[k: string]: () => unknown | undefined} = {};\n\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n get<T>(key: StateKey<T>, defaultValue: T): T {\n return this.store[key] !== undefined ? (this.store[key] as T) : defaultValue;\n }\n\n /**\n * Set the value corresponding to a key.\n */\n set<T>(key: StateKey<T>, value: T): void {\n this.store[key] = value;\n }\n\n /**\n * Remove a key from the store.\n */\n remove<T>(key: StateKey<T>): void {\n delete this.store[key];\n }\n\n /**\n * Test whether a key exists in the store.\n */\n hasKey<T>(key: StateKey<T>): boolean {\n return this.store.hasOwnProperty(key);\n }\n\n /**\n * Indicates whether the state is empty.\n */\n get isEmpty(): boolean {\n return Object.keys(this.store).length === 0;\n }\n\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n onSerialize<T>(key: StateKey<T>, callback: () => T): void {\n this.onSerializeCallbacks[key] = callback;\n }\n\n /**\n * Serialize the current state of the store to JSON.\n */\n toJson(): string {\n // Call the onSerialize callbacks and put those values into the store.\n for (const key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n } catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n\n // Escape script tag to avoid break out of <script> tag in serialized output.\n // Encoding of `<` is the same behaviour as G3 script_builders.\n return JSON.stringify(this.store).replace(/</g, '\\\\u003C');\n }\n}\n\nfunction retrieveTransferredState(\n doc: Document,\n appId: string,\n): Record<string, unknown | undefined> {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n const script = doc.getElementById(appId + '-state');\n if (script?.textContent) {\n try {\n // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n // Decoding of `<` is done of the box by browsers and node.js, same behaviour as G3\n // script_builders.\n return JSON.parse(script.textContent) as {};\n } catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n\n return {};\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.dev/license\n */\n\nimport type {I18nICUNode} from '../render3/interfaces/i18n';\nimport {RNode} from '../render3/interfaces/renderer_dom';\n\n/** Encodes that the node lookup should start from the host node of this component. */\nexport const REFERENCE_NODE_HOST = 'h';\n\n/** Encodes that the node lookup should start from the document body node. */\nexport const REFERENCE_NODE_BODY = 'b';\n\n/**\n * Describes navigation steps that the runtime logic need to perform,\n * starting from a given (known) element.\n */\nexport enum NodeNavigationStep {\n FirstChild = 'f',\n NextSibling = 'n',\n}\n\n/**\n * Keys within serialized view data structure to represent various\n * parts. See the `SerializedView` interface below for additional information.\n */\nexport const ELEMENT_CONTAINERS = 'e';\nexport const TEMPLATES = 't';\nexport const CONTAINERS = 'c';\nexport const MULTIPLIER = 'x';\nexport const NUM_ROOT_NODES = 'r';\nexport const TEMPLATE_ID = 'i'; // as it's also an \"id\"\nexport const NODES = 'n';\nexport const DISCONNECTED_NODES = 'd';\nexport const I18N_DATA = 'l';\n\n/**\n * Represents element containers within this view, stored as key-value pairs\n * where key is an index of a container in an LView (also used in the\n * `elementContainerStart` instruction), the value is the number of root nodes\n * in this container. This information is needed to locate an anchor comment\n * node that goes after all container nodes.\n */\nexport interface SerializedElementContainers {\n [key: number]: number;\n}\n\n/**\n * Serialized data structure that contains relevant hydration\n * annotation information that describes a given hydration boundary\n * (e.g. a component).\n */\nexport interface SerializedView {\n /**\n * Serialized information about <ng-container>s.\n */\n [ELEMENT_CONTAINERS]?: SerializedElementContainers;\n\n /**\n * Serialized information about templates.\n * Key-value pairs where a key is an index of the corresponding\n * `template` instruction and the value is a unique id that can\n * be used during hydration to identify that template.\n */\n [TEMPLATES]?: Record<number, string>;\n\n /**\n * Serialized information about view containers.\n * Key-value pairs where a key is an index of the corresponding\n * LContainer entry within an LView, and the value is a list\n * of serialized information about views within this container.\n */\n [CONTAINERS]?: Record<number, SerializedContainerView[]>;\n\n /**\n * Serialized information about nodes in a template.\n * Key-value pairs where a key is an index of the corresponding\n * DOM node in an LView and the value is a path that describes\n * the location of this node (as a set of navigation instructions).\n */\n [NODES]?: Record<number, string>;\n\n /**\n * A list of ids which represents a set of nodes disconnected\n * from the DOM tree at the serialization time, but otherwise\n * present in the internal data structures.\n *\n * This information is used to avoid triggering the hydration\n * logic for such nodes and instead use a regular \"creation mode\".\n */\n [DISCONNECTED_NODES]?: number[];\n\n /**\n * Serialized information about i18n blocks in a template.\n * Key-value pairs where a key is an index of the corresponding\n * i18n entry within an LView, and the value is a list of\n * active ICU cases.\n */\n [I18N_DATA]?: Record<number, number[]>;\n}\n\n/**\n * Serialized data structure that contains relevant hydration\n * annotation information about a view that is a part of a\n * ViewContainer collection.\n */\nexport interface SerializedContainerView extends SerializedView {\n /**\n * Unique id that represents a TView that was used to create\n * a given instance of a view:\n * - TViewType.Embedded: a unique id generated during serialization on the server\n * - TViewType.Component: an id generated based on component properties\n * (see `getComponentId` function for details)\n */\n [TEMPLATE_ID]: string;\n\n /**\n * Number of root nodes that belong to this view.\n * This information is needed to effectively traverse the DOM tree\n * and identify segments that belong to different views.\n */\n [NUM_ROOT_NODES]: number;\n\n /**\n * Number of times this view is repeated.\n * This is used to avoid serializing and sending the same hydration\n * information about similar views (for example, produced by *ngFor).\n */\n [MULTIPLIER]?: number;\n}\n\n/**\n * An object that contains hydration-related information serialized\n * on the server, as well as the necessary references to segments of\n * the DOM, to facilitate the hydration process for a given hydration\n * boundary on the client.\n */\nexport interface DehydratedView {\n /**\n * The readonly hydration annotation data.\n */\n data: Readonly<SerializedView>;\n\n /**\n * A reference to the first child in a DOM segment associated\n * with a given hydration boundary.\n *\n * Once a view becomes hydrated, the value is set to `null`, which\n * indicates that further detaching/attaching view actions should result\n * in invoking corresponding DOM actions (attaching DOM nodes action is\n * skipped when we hydrate, since nodes are already in the DOM).\n */\n firstChild: RNode | null;\n\n /**\n * Stores references to first nodes in DOM segments that\n * represent either an <ng-container> or a view container.\n */\n segmentHeads?: {[index: number]: RNode | null};\n\n /**\n * An instance of a Set that represents nodes disconnected from\n * the DOM tree at the serialization time, but otherwise present\n * in the internal data structures.\n *\n * The Set is based on the `SerializedView[DISCONNECTED_NODES]` data\n * and is needed to have constant-time lookups.\n *\n * If the value is `null`, it means that there were no disconnected\n * nodes detected in this view at serialization time.\n */\n disconnectedNodes?: Set<number> | null;\n\n /**\n * A mapping from a view to the first child to begin claiming nodes.\n *\n * This mapping is generated by an i18n block, and is the source of\n * truth for the nodes inside of it.\n */\n i18nNodes?: Map<number, RNode | null>;\n\n /**\n * A mapping from the index of an ICU node to dehydrated data for it.\n *\n * This information is used during the hydration process on the client.\n * ICU cases that were active during server-side rendering will be added\n * to the map. The hydration logic will \"claim\" matching cases, removing\n * them from the map. The remaining entries are \"unclaimed\", and will be\n * removed from the DOM during hydration cleanup.\n */\n dehydratedIcuData?: Map<number, DehydratedIcuData>;\n}\n\n/**\n * An object that contains hydration-related information serialized\n * on the server, as well as the necessary references to segments of\n * the DOM, to facilitate the hydration process for a given view\n * inside a view container (either an embedded view or a view created\n * for a component).\n */\nexport interface DehydratedContainerView extends DehydratedView {\n data: Readonly<SerializedContainerView>;\n}\n\n/**\n * An object that contains information about a dehydrated ICU case,\n * to facilitate cleaning up ICU cases that were active during\n * server-side rendering, but not during hydration.\n */\nexport interface DehydratedIcuData {\n /**\n * The case index that this data represents.\n */\n case: number;\n\n /**\n * A reference back to the AST for the ICU node. This allows the\n * AST to be used to clean up dehydrated nodes.\n */\n node: I18nICUNode;\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.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport type {ViewRef} from '../linker/view_ref';\nimport {getComponent} from '../render3/util/discovery_utils';\nimport {LContainer} from '../render3/interfaces/container';\nimport {getDocument} from '../render3/interfaces/document';\nimport {RElement, RNode} from '../render3/interfaces/renderer_dom';\nimport {isRootView} from '../render3/interfaces/type_checks';\nimport {HEADER_OFFSET, LView, TVIEW, TViewType} from '../render3/interfaces/view';\nimport {makeStateKey, TransferState} from '../transfer_state';\nimport {assertDefined} from '../util/assert';\nimport type {HydrationContext} from './annotate';\n\nimport {\n CONTAINERS,\n DehydratedView,\n DISCONNECTED_NODES,\n ELEMENT_CONTAINERS,\n MULTIPLIER,\n NUM_ROOT_NODES,\n SerializedContainerView,\n SerializedElementContainers,\n SerializedView,\n} from './interfaces';\n\n/**\n * The name of the key used in the TransferState collection,\n * where hydration information is located.\n */\nconst TRANSFER_STATE_TOKEN_ID = '__nghData__';\n\n/**\n * Lookup key used to reference DOM hydration data (ngh) in `TransferState`.\n */\nexport const NGH_DATA_KEY = makeStateKey<Array<SerializedView>>(TRANSFER_STATE_TOKEN_ID);\n\n/**\n * The name of the attribute that would be added to host component\n * nodes and contain a reference to a particular slot in transferred\n * state that contains the necessary hydration info for this component.\n */\nexport const NGH_ATTR_NAME = 'ngh';\n\n/**\n * Marker used in a comment node to ensure hydration content integrity\n */\nexport const SSR_CONTENT_INTEGRITY_MARKER = 'nghm';\n\nexport const enum TextNodeMarker {\n /**\n * The contents of the text comment added to nodes that would otherwise be\n * empty when serialized by the server and passed to the client. The empty\n * node is lost when the browser parses it otherwise. This comment node will\n * be replaced during hydration in the client to restore the lost empty text\n * node.\n */\n EmptyNode = 'ngetn',\n\n /**\n * The contents of the text comment added in the case of adjacent text nodes.\n * When adjacent text nodes are serialized by the server and sent to the\n * client, the browser loses reference to the amount of nodes and assumes\n * just one text node. This separator is replaced during hydration to restore\n * the proper separation and amount of text nodes that should be present.\n */\n Separator = 'ngtns',\n}\n\n/**\n * Reference to a function that reads `ngh` attribute value from a given RNode\n * and retrieves hydration information from the TransferState using that value\n * as an index. Returns `null` by default, when hydration is not enabled.\n *\n * @param rNode Component's host element.\n * @param injector Injector that this component has access to.\n * @param isRootView Specifies whether we trying to read hydration info for the root view.\n */\nlet _retrieveHydrationInfoImpl: typeof retrieveHydrationInfoImpl = () => null;\n\nexport function retrieveHydrationInfoImpl(\n rNode: RElement,\n injector: Injector,\n isRootView = false,\n): DehydratedView | null {\n let nghAttrValue = rNode.getAttribute(NGH_ATTR_NAME);\n if (nghAttrValue == null) return null;\n\n // For cases when a root component also acts as an anchor node for a ViewContainerRef\n // (for example, when ViewContainerRef is injected in a root component), there is a need\n // to serialize information about the component itself, as well as an LContainer that\n // represents this ViewContainerRef. Effectively, we need to serialize 2 pieces of info:\n // (1) hydration info for the root component itself and (2) hydration info for the\n // ViewContainerRef instance (an LContainer). Each piece of information is included into\n // the hydration data (in the TransferState object) separately, thus we end up with 2 ids.\n // Since we only have 1 root element, we encode both bits of info into a single string:\n // ids are separated by the `|` char (e.g. `10|25`, where `10` is the ngh for a component view\n // and 25 is the `ngh` for a root view which holds LContainer).\n const [componentViewNgh, rootViewNgh] = nghAttrValue.split('|');\n nghAttrValue = isRootView ? rootViewNgh : componentViewNgh;\n if (!nghAttrValue) return null;\n\n // We've read one of the ngh ids, keep the remaining one, so that\n // we can set it back on the DOM element.\n const rootNgh = rootViewNgh ? `|${rootViewNgh}` : '';\n const remainingNgh = isRootView ? componentViewNgh : rootNgh;\n\n let data: SerializedView = {};\n // An element might have an empty `ngh` attribute value (e.g. `<comp ngh=\"\" />`),\n // which means that no special annotations are required. Do not attempt to read\n // from the TransferState in this case.\n if (nghAttrValue !== '') {\n const transferState = injector.get(TransferState, null, {optional: true});\n if (transferState !== null) {\n const nghData = transferState.get(NGH_DATA_KEY, []);\n\n // The nghAttrValue is always a number referencing an index\n // in the hydration TransferState data.\n data = nghData[Number(nghAttrValue)];\n\n // If the `ngh` attribute exists and has a non-empty value,\n // the hydration info *must* be present in the TransferState.\n // If there is no data for some reasons, this is an error.\n ngDevMode && assertDefined(data, 'Unable to retrieve hydration info from the TransferState.');\n }\n }\n const dehydratedView: DehydratedView = {\n data,\n firstChild: rNode.firstChild ?? null,\n };\n\n if (isRootView) {\n // If there is hydration info present for the root view, it means that there was\n // a ViewContainerRef injected in the root component. The root component host element\n // acted as an anchor node in this scenario. As a result, the DOM nodes that represent\n // embedded views in this ViewContainerRef are located as siblings to the host node,\n // i.e. `<app-root /><#VIEW1><#VIEW2>...<!--container-->`. In this case, the current\n // node becomes the first child of this root view and the next sibling is the first\n // element in the DOM segment.\n dehydratedView.firstChild = rNode;\n\n // We use `0` here, since this is the slot (right after the HEADER_OFFSET)\n // where a component LView or an LContainer is located in a root LView.\n setSegmentHead(dehydratedView, 0, rNode.nextSibling);\n }\n\n if (remainingNgh) {\n // If we have only used one of the ngh ids, store the remaining one\n // back on this RNode.\n rNode.setAttribute(NGH_ATTR_NAME, remainingNgh);\n } else {\n // The `ngh` attribute is cleared from the DOM node now\n // that the data has been retrieved for all indices.\n rNode.removeAttribute(NGH_ATTR_NAME);\n }\n\n // Note: don't check whether this node was claimed for hydration,\n // because this node might've been previously claimed while processing\n // template instructions.\n ngDevMode && markRNodeAsClaimedByHydration(rNode, /* checkIfAlreadyClaimed */ false);\n ngDevMode && ngDevMode.hydratedComponents++;\n\n return dehydratedView;\n}\n\n/**\n * Sets the implementation for the `retrieveHydrationInfo` function.\n */\nexport function enableRetrieveHydrationInfoImpl() {\n _retrieveHydrationInfoImpl = retrieveHydrationInfoImpl;\n}\n\n/**\n * Retrieves hydration info by reading the value from the `ngh` attribute\n * and accessing a corresponding slot in TransferState storage.\n */\nexport function retrieveHydrationInfo(\n rNode: RElement,\n injector: Injector,\n isRootView = false,\n): DehydratedView | null {\n return _retrieveHydrationInfoImpl(rNode, injector, isRootView);\n}\n\n/**\n * Retrieves the necessary object from a given ViewRef to serialize:\n * - an LView for component views\n * - an LContainer for cases when component acts as a ViewContainerRef anchor\n * - `null` in case of an embedded view\n */\nexport function getLNodeForHydration(viewRef: ViewRef): LView | LContainer | null {\n // Reading an internal field from `ViewRef` instance.\n let lView = (viewRef as any)._lView as LView;\n const tView = lView[TVIEW];\n // A registered ViewRef might represent an instance of an\n // embedded view, in which case we do not need to annotate it.\n if (tView.type === TViewType.Embedded) {\n return null;\n }\n // Check if it's a root view and if so, retrieve component's\n // LView from the first slot after the header.\n if (isRootView(lView)) {\n lView = lView[HEADER_OFFSET];\n }\n\n return lView;\n}\n\nfunction getTextNodeContent(node: Node): string | undefined {\n return node.textContent?.replace(/\\s/gm, '');\n}\n\n/**\n * Restores text nodes and separators into the DOM that were lost during SSR\n * serialization. The hydration process replaces empty text nodes and text\n * nodes that are immediately adjacent to other text nodes with comment nodes\n * that this method filters on to restore those missing nodes that the\n * hydration process is expecting to be present.\n *\n * @param node The app's root HTML Element\n */\nexport function processTextNodeMarkersBeforeHydration(node: HTMLElement) {\n const doc = getDocument();\n const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, {\n acceptNode(node) {\n const content = getTextNodeContent(node);\n const isTextNodeMarker =\n content === TextNodeMarker.EmptyNode || content === TextNodeMarker.Separator;\n return isTextNodeMarker ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;\n },\n });\n let currentNode: Comment;\n // We cannot modify the DOM while using the commentIterator,\n // because it throws off the iterator state.\n // So we collect all marker nodes first and then follow up with\n // applying the changes to the DOM: either inserting an empty node\n // or just removing the marker if it was used as a separator.\n const nodes = [];\n while ((currentNode = commentNodesIterator.nextNode() as Comment)) {\n nodes.push(currentNode);\n }\n for (const node of nodes) {\n if (node.textContent === TextNodeMarker.EmptyNode) {\n node.replaceWith(doc.createTextNode(''));\n } else {\n node.remove();\n }\n }\n}\n\n/**\n * Internal type that represents a claimed node.\n * Only used in dev mode.\n */\nexport enum HydrationStatus {\n Hydrated = 'hydrated',\n Skipped = 'skipped',\n Mismatched = 'mismatched',\n}\n\nexport type HydrationInfo =\n | {\n status: HydrationStatus.Hydrated | HydrationStatus.Skipped;\n }\n | {\n status: HydrationStatus.Mismatched;\n actualNodeDetails: string | null;\n expectedNodeDetails: string | null;\n };\n\nconst HYDRATION_INFO_KEY = '__ngDebugHydrationInfo__';\n\nexport type HydratedNode = {\n [HYDRATION_INFO_KEY]?: HydrationInfo;\n};\n\nfunction patchHydrationInfo(node: RNode, info: HydrationInfo) {\n (node as HydratedNode)[HYDRATION_INFO_KEY] = info;\n}\n\nexport function readHydrationInfo(node: RNode): HydrationInfo | null {\n return (node as HydratedNode)[HYDRATION_INFO_KEY] ?? null;\n}\n\n/**\n * Marks a node as \"claimed\" by hydration process.\n * This is needed to make assessments in tests whether\n * the hydration process handled all nodes.\n */\nexport function markRNodeAsClaimedByHydration(node: RNode, checkIfAlreadyClaimed = true) {\n if (!ngDevMode) {\n throw new Error(\n 'Calling `markRNodeAsClaimedByHydration` in prod mode ' +\n 'is not supported and likely a mistake.',\n );\n }\n if (checkIfAlreadyClaimed && isRNodeClaimedForHydration(node)) {\n throw new Error('Trying to claim a node, which was claimed already.');\n }\n patchHydrationInfo(node, {status: HydrationStatus.Hydrated});\n ngDevMode.hydratedNodes++;\n}\n\nexport function markRNodeAsSkippedByHydration(node: RNode) {\n if (!ngDevMode) {\n throw new Error(\n 'Calling `markRNodeAsSkippedByHydration` in prod mode ' +\n 'is not supported and likely a mistake.',\n );\n }\n patchHydrationInfo(node, {status: HydrationStatus.Skipped});\n ngDevMode.componentsSkippedHydration++;\n}\n\nexport function markRNodeAsHavingHydrationMismatch(\n node: RNode,\n expectedNodeDetails: string | null = null,\n actualNodeDetails: string | null = null,\n) {\n if (!ngDevMode) {\n throw new Error(\n 'Calling `markRNodeAsMismatchedByHydration` in prod mode ' +\n 'is not supported and likely a mistake.',\n );\n }\n\n // The RNode can be a standard HTMLElement (not an Angular component or directive)\n // The devtools component tree only displays Angular components & directives\n // Therefore we attach the debug info to the closest component/directive\n while (node && !getComponent(node as Element)) {\n node = node?.parentNode as RNode;\n }\n\n if (node) {\n patchHydrationInfo(node, {\n status: HydrationStatus.Mismatched,\n expectedNodeDetails,\n actualNodeDetails,\n });\n }\n}\n\nexport function isRNodeClaimedForHydration(node: RNode): boolean {\n return readHydrationInfo(node)?.status === HydrationStatus.Hydrated;\n}\n\nexport function setSegmentHead(\n hydrationInfo: DehydratedView,\n index: number,\n node: RNode | null,\n): void {\n hydrationInfo.segmentHeads ??= {};\n hydrationInfo.segmentHeads[index] = node;\n}\n\nexport function getSegmentHead(hydrationInfo: DehydratedView, index: number): RNode | null {\n return hydrationInfo.segmentHeads?.[index] ?? null;\n}\n\n/**\n * Returns the size of an <ng-container>, using either the information\n * serialized in `ELEMENT_CONTAINERS` (element container size) or by\n * computing the sum of root nodes in all dehydrated views in a given\n * container (in case this `<ng-container>` was also used as a view\n * container host node, e.g. <ng-container *ngIf>).\n */\nexport function getNgContainerSize(hydrationInfo: DehydratedView, index: number): number | null {\n const data = hydrationInfo.data;\n let size = data[ELEMENT_CONTAINERS]?.[index] ?? null;\n // If there is no serialized information available in the `ELEMENT_CONTAINERS` slot,\n // check if we have info about view containers at this location (e.g.\n // `<ng-container *ngIf>`) and use container size as a number of root nodes in this\n // element container.\n if (size === null && data[CONTAINERS]?.[index]) {\n size = calcSerializedContainerSize(hydrationInfo, index);\n }\n return size;\n}\n\nexport function isSerializedElementContainer(\n hydrationInfo: DehydratedView,\n index: number,\n): boolean {\n return hydrationInfo.data[ELEMENT_CONTAINERS]?.[index] !== undefined;\n}\n\nexport function getSerializedContainerViews(\n hydrationInfo: DehydratedView,\n index: number,\n): SerializedContainerView[] | null {\n return hydrationInfo.data[CONTAINERS]?.[index] ?? null;\n}\n\n/**\n * Computes the size of a serialized container (the number of root nodes)\n * by calculating the sum of root nodes in all dehydrated views in this container.\n */\nexport function calcSerializedContainerSize(hydrationInfo: DehydratedView, index: number): number {\n const views = getSerializedContainerViews(hydrationInfo, index) ?? [];\n let numNodes = 0;\n for (let view of views) {\n numNodes += view[NUM_ROOT_NODES] * (view[MULTIPLIER] ?? 1);\n }\n return numNodes;\n}\n\n/**\n * Attempt to initialize the `disconnectedNodes` field of the given\n * `DehydratedView`. Returns the initialized value.\n */\nexport function initDisconnectedNodes(hydrationInfo: DehydratedView): Set<number> | null {\n // Check if we are processing disconnected info for the first time.\n if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n }\n return hydrationInfo.disconnectedNodes;\n}\n\n/**\n * Checks whether a node is annotated as \"disconnected\", i.e. not present\n * in the DOM at serialization time. We should not attempt hydration for\n * such nodes and instead, use a regular \"creation mode\".\n */\nexport function isDisconnectedNode(hydrationInfo: DehydratedView, index: number): boolean {\n // Check if we are processing disconnected info for the first time.\n if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n }\n return !!initDisconnectedNodes(hydrationInfo)?.has(index);\n}\n\n/**\n * Helper function to prepare text nodes for serialization by ensuring\n * that seperate logical text blocks in the DOM remain separate after\n * serialization.\n */\nexport function processTextNodeBeforeSerialization(context: HydrationContext, node: RNode) {\n // Handle cases where text nodes can be lost after DOM serialization:\n // 1. When there is an *empty text node* in DOM: in this case, this\n // node would not make it into the serialized string and as a result,\n // this node wouldn't be created in a browser. This would result in\n // a mismatch during the hydration, where the runtime logic would expect\n // a text node to be present in live DOM, but no text node would exist.\n // Example: `<span>{{ name }}</span>` when the `name` is an empty string.\n // This would result in `<span></span>` string after serialization and\n // in a browser only the `span` element would be created. To resolve that,\n // an extra comment node is appended in place of an empty text node and\n // that special comment node is replaced with an empty text node *before*\n // hydration.\n // 2. When there are 2 consecutive text nodes present in the DOM.\n // Example: `<div>Hello <ng-container *ngIf=\"true\">world</ng-container></div>`.\n // In this scenario, the live DOM would look like this:\n // <div>#text('Hello ') #text('world') #comment('container')</div>\n // Serialized string would look like this: `<div>Hello world<!--container--></div>`.\n // The live DOM in a browser after that would be:\n // <div>#text('Hello world') #comment('container')</div>\n // Notice how 2 text nodes are now \"merged\" into one. This would cause hydration\n // logic to fail, since it'd expect 2 text nodes being present, not one.\n // To fix this, we insert a special comment node in between those text nodes, so\n // serialized representation is: `<div>Hello <!--ngtns-->world<!--container--></div>`.\n // This forces browser to create 2 text nodes separated by a comment node.\n // Before running a hydration process, this special comment node is removed, so the\n // live DOM has exactly the same state as it was before serialization.\n\n // Collect this node as required special annotation only when its\n // contents is empty. Otherwise, such text node would be present on\n // the client after server-side rendering and no special handling needed.\n const el = node as HTMLElement;\n const corruptedTextNodes = context.corruptedTextNodes;\n if (el.textContent === '') {\n corruptedTextNodes.set(el, TextNodeMarker.EmptyNode);\n } else if (el.nextSibling?.nodeType === Node.TEXT_NODE) {\n corruptedTextNodes.set(el, TextNodeMarker.Separator);\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.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\n\n/**\n * Internal token that specifies whether DOM reuse logic\n * during hydration is enabled.\n */\nexport const IS_HYDRATION_DOM_REUSE_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_HYDRATION_DOM_REUSE_ENABLED' : '',\n);\n\n// By default (in client rendering mode), we remove all the contents\n// of the host element and render an application after that.\nexport const PRESERVE_HOST_CONTENT_DEFAULT = false;\n\n/**\n * Internal token that indicates whether host element content should be\n * retained during the bootstrap.\n */\nexport const PRESERVE_HOST_CONTENT = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'PRESERVE_HOST_CONTENT' : '',\n {\n providedIn: 'root',\n factory: () => PRESERVE_HOST_CONTENT_DEFAULT,\n },\n);\n\n/**\n * Internal token that indicates whether hydration support for i18n\n * is enabled.\n */\nexport const IS_I18N_HYDRATION_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_I18N_HYDRATION_ENABLED' : '',\n);\n\n/**\n * Internal token that indicates whether event replay support for SSR\n * is enabled.\n */\nexport const IS_EVENT_REPLAY_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_EVENT_REPLAY_ENABLED' : '',\n);\n\nexport const EVENT_REPLAY_ENABLED_DEFAULT = false;\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.dev/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\n\nimport {\n TrustedHTML,\n TrustedScript,\n TrustedScriptURL,\n TrustedTypePolicy,\n TrustedTypePolicyFactory,\n} from './trusted_type_defs';\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: TrustedTypePolicy | null | undefined;\n\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(): TrustedTypePolicy | null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy('angular', {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => s,\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/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\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 the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nexport function trustedHTMLFromString(html: string): TrustedHTML | string {\n return getPolicy()?.createHTML(html) || html;\n}\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 */\nexport function trustedScriptFromString(script: string): TrustedScript | string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\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 the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function trustedScriptURLFromString(url: string): TrustedScriptURL | string {\n return getPolicy()?.createScriptURL(url) || url;\n}\n\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\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 development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nexport function newTrustedFunctionForDev(...args: string[]): Function {\n if (typeof ngDevMode === 'undefined') {\n throw new Error('newTrustedFunctionForDev should never be called in production');\n }\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\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\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)) as Function;\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\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\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 * @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.dev/license\n */\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n\nimport {global} from '../global';\nimport {\n TrustedHTML,\n TrustedScript,\n TrustedScriptURL,\n TrustedTypePolicy,\n TrustedTypePolicyFactory,\n} from './trusted_type_defs';\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: TrustedTypePolicy | null | undefined;\n\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(): TrustedTypePolicy | null {\n if (policy === undefined) {\n policy = null;\n if (global.trustedTypes) {\n try {\n policy = (global.trustedTypes as TrustedTypePolicyFactory).createPolicy(\n 'angular#unsafe-bypass',\n {\n createHTML: (s: string) => s,\n createScript: (s: string) => s,\n createScriptURL: (s: string) => 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/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\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 passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedHTMLFromStringBypass(html: string): TrustedHTML | string {\n return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\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 passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptFromStringBypass(script: string): TrustedScript | string {\n return getPolicy()?.createScript(script) || script;\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\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 passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nexport function trustedScriptURLFromStringBypass(url: string): TrustedScriptURL | string {\n return getPolicy()?.createScriptURL(url) || url;\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.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\n\nexport const enum BypassType {\n Url = 'URL',\n Html = 'HTML',\n ResourceUrl = 'ResourceURL',\n Script = 'Script',\n Style = 'Style',\n}\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\nabstract class SafeValueImpl implements SafeValue {\n constructor(public changingThisBreaksApplicationSecurity: string) {}\n\n abstract getTypeName(): string;\n\n toString() {\n return (\n `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n ` (see ${XSS_SECURITY_URL})`\n );\n }\n}\n\nclass SafeHtmlImpl extends SafeValueImpl implements SafeHtml {\n override getTypeName() {\n return BypassType.Html;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl implements SafeStyle {\n override getTypeName() {\n return BypassType.Style;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl implements SafeScript {\n override getTypeName() {\n return BypassType.Script;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl implements SafeUrl {\n override getTypeName() {\n return BypassType.Url;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {\n override getTypeName() {\n return BypassType.ResourceUrl;\n }\n}\n\nexport function unwrapSafeValue(value: SafeValue): string;\nexport function unwrapSafeValue<T>(value: T): T;\nexport function unwrapSafeValue<T>(value: T | SafeValue): T {\n return value instanceof SafeValueImpl\n ? (value.changingThisBreaksApplicationSecurity as any as T)\n : (value as any as T);\n}\n\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.Html,\n): value is SafeHtml;\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.ResourceUrl,\n): value is SafeResourceUrl;\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.Script,\n): value is SafeScript;\nexport function allowSanitizationBypassAndThrow(\n value: any,\n type: BypassType.Style,\n): value is SafeStyle;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType.Url): value is SafeUrl;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean;\nexport function allowSanitizationBypassAndThrow(value: any, type: BypassType): boolean {\n const actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === BypassType.ResourceUrl && type === BypassType.Url) return true;\n throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\n }\n return actualType === type;\n}\n\nexport function getSanitizationBypassType(value: any): BypassType | null {\n return (value instanceof SafeValueImpl && (value.getTypeName() as BypassType)) || null;\n}\n\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustHtml(trustedHtml: string): SafeHtml {\n return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustStyle(trustedStyle: string): SafeStyle {\n return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustScript(trustedScript: string): SafeScript {\n return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustUrl(trustedUrl: string): SafeUrl {\n return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nexport function bypassSanitizationTrustResourceUrl(trustedResourceUrl: string): SafeResourceUrl {\n return new SafeResourceUrlImpl(trustedResourceUrl);\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.dev/license\n */\n\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nexport function getInertBodyHelper(defaultDoc: Document): InertBodyHelper {\n const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n\nexport interface InertBodyHelper {\n /**\n * Get an inert DOM element containing DOM created from the dirty HTML string provided.\n */\n getInertBodyElement: (html: string) => HTMLElement | null;\n}\n\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper implements InertBodyHelper {\n constructor(private inertDocumentHelper: InertBodyHelper) {}\n\n getInertBodyElement(html: string): HTMLElement | null {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n // in `html` from consuming the otherwise explicit `</body>` tag.\n html = '<body><remove></remove>' + html;\n try {\n const body = new window.DOMParser().parseFromString(\n trustedHTMLFromString(html) as string,\n 'text/html',\n ).body as HTMLBodyElement;\n if (body === null) {\n // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n // becomes available in the following tick of the JS engine. In that case we fall back to\n // the `inertDocumentHelper` instead.\n return this.inertDocumentHelper.getInertBodyElement(html);\n }\n body.firstChild?.remove();\n return body;\n } catch {\n return null;\n }\n }\n}\n\n/**\n * Use an HTML5 `template` element to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper implements InertBodyHelper {\n private inertDocument: Document;\n\n constructor(private defaultDoc: Document) {\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n }\n\n getInertBodyElement(html: string): HTMLElement | null {\n const templateEl = this.inertDocument.createElement('template');\n templateEl.innerHTML = trustedHTMLFromString(html) as string;\n return templateEl;\n }\n}\n\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nexport function isDOMParserAvailable() {\n try {\n return !!new window.DOMParser().parseFromString(\n trustedHTMLFromString('') as string,\n 'text/html',\n );\n } catch {\n return false;\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.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\n\n/**\n * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if:\n * (1) Either a protocol that is not javascript:, and that has valid characters\n * (alphanumeric or [+-.]).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\\/?#]*(?:[\\/?#]|$))/i;\nexport function _sanitizeUrl(url: string): string {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN)) return url;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n }\n\n return 'unsafe:' + url;\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.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\nimport {TrustedHTML} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString} from '../util/security/trusted_types';\n\nimport {getInertBodyHelper, InertBodyHelper} from './inert_body';\nimport {_sanitizeUrl} from './url_sanitizer';\n\nfunction tagSet(tags: string): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const t of tags.split(',')) res[t] = true;\n return res;\n}\n\nfunction merge(...sets: {[k: string]: boolean}[]): {[k: string]: boolean} {\n const res: {[k: string]: boolean} = {};\n for (const s of sets) {\n for (const v in s) {\n if (s.hasOwnProperty(v)) res[v] = true;\n }\n }\n return res;\n}\n\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n);\n\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(\n OPTIONAL_END_TAG_BLOCK_ELEMENTS,\n tagSet(\n 'address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul',\n ),\n);\n\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(\n OPTIONAL_END_TAG_INLINE_ELEMENTS,\n tagSet(\n 'a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video',\n ),\n);\n\nexport const VALID_ELEMENTS = merge(\n VOID_ELEMENTS,\n BLOCK_ELEMENTS,\n INLINE_ELEMENTS,\n OPTIONAL_END_TAG_ELEMENTS,\n);\n\n// Attributes that have href and hence need to be sanitized\nexport const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n\nconst HTML_ATTRS = tagSet(\n 'abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width',\n);\n\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet(\n 'aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext',\n);\n\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\n\nexport const VALID_ATTRS = merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n public sanitizedSomething = false;\n private buf: string[] = [];\n\n sanitizeChildren(el: Element): string {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n let current: Node = el.firstChild!;\n let traverseContent = true;\n let parentNodes = [];\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current as Element);\n } else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue!);\n } else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n // Push current node to the parent stack before entering its content.\n parentNodes.push(current);\n current = getFirstChild(current)!;\n continue;\n }\n while (current) {\n // Leaving the element.\n // Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current as Element);\n }\n\n let next = getNextSibling(current)!;\n\n if (next) {\n current = next;\n break;\n }\n\n // There was no next sibling, walk up to the parent node (extract it from the stack).\n current = parentNodes.pop()!;\n }\n }\n return this.buf.join('');\n }\n\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n private startElement(element: Element): boolean {\n const tagName = getNodeName(element).toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n const elAttrs = element.attributes;\n for (let i = 0; i < elAttrs.length; i++) {\n const elAttr = elAttrs.item(i);\n const attrName = elAttr!.name;\n const lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n let value = elAttr!.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower]) value = _sanitizeUrl(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n }\n\n private endElement(current: Element) {\n const tagName = getNodeName(current).toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n }\n\n private chars(chars: string) {\n this.buf.push(encodeEntities(chars));\n }\n}\n\n/**\n * Verifies whether a given child node is a descendant of a given parent node.\n * It may not be the case when properties like `.firstChild` are clobbered and\n * accessing `.firstChild` results in an unexpected node returned.\n */\nfunction isClobberedElement(parentNode: Node, childNode: Node): boolean {\n return (\n (parentNode.compareDocumentPosition(childNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) !==\n Node.DOCUMENT_POSITION_CONTAINED_BY\n );\n}\n\n/**\n * Retrieves next sibling node and makes sure that there is no\n * clobbering of the `nextSibling` property happening.\n */\nfunction getNextSibling(node: Node): Node | null {\n const nextSibling = node.nextSibling;\n // Make sure there is no `nextSibling` clobbering: navigating to\n // the next sibling and going back to the previous one should result\n // in the original node.\n if (nextSibling && node !== nextSibling.previousSibling) {\n throw clobberedElementError(nextSibling);\n }\n return nextSibling;\n}\n\n/**\n * Retrieves first child node and makes sure that there is no\n * clobbering of the `firstChild` property happening.\n */\nfunction getFirstChild(node: Node): Node | null {\n const firstChild = node.firstChild;\n if (firstChild && isClobberedElement(node, firstChild)) {\n throw clobberedElementError(firstChild);\n }\n return firstChild;\n}\n\n/** Gets a reasonable nodeName, even for clobbered nodes. */\nexport function getNodeName(node: Node): string {\n const nodeName = node.nodeName;\n // If the property is clobbered, assume it is an `HTMLFormElement`.\n return typeof nodeName === 'string' ? nodeName : 'FORM';\n}\n\nfunction clobberedElementError(node: Node) {\n return new Error(\n `Failed to sanitize html because the element is clobbered: ${(node as Element).outerHTML}`,\n );\n}\n\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value: string) {\n return value\n .replace(/&/g, '&')\n .replace(SURROGATE_PAIR_REGEXP, function (match: string) {\n const hi = match.charCodeAt(0);\n const low = match.charCodeAt(1);\n return '&#' + ((hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match: string) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n\nlet inertBodyHelper: InertBodyHelper;\n\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nexport function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string {\n let inertBodyElement: HTMLElement | null = null;\n try {\n inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n let mXSSAttempts = 5;\n let parsedHtml = unsafeHtml;\n\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement!.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n\n const sanitizer = new SanitizingHtmlSerializer();\n const safeHtml = sanitizer.sanitizeChildren(\n (getTemplateContent(inertBodyElement!) as Element) || inertBodyElement,\n );\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n }\n\n return trustedHTMLFromString(safeHtml);\n } finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent.firstChild) {\n parent.firstChild.remove();\n }\n }\n }\n}\n\nexport function getTemplateContent(el: Node): Node | null {\n return 'content' in (el as any) /** Microsoft/TypeScript#21517 */ && isTemplateElement(el)\n ? el.content\n : null;\n}\nfunction isTemplateElement(el: Node): el is HTMLTemplateElement {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\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.dev/license\n */\n\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nexport enum SecurityContext {\n NONE = 0,\n HTML = 1,\n STYLE = 2,\n SCRIPT = 3,\n URL = 4,\n RESOURCE_URL = 5,\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.dev/license\n */\n\nimport {XSS_SECURITY_URL} from '../error_details_base_url';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {getDocument} from '../render3/interfaces/document';\nimport {ENVIRONMENT} from '../render3/interfaces/view';\nimport {getLView} from '../render3/state';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {TrustedHTML, TrustedScript, TrustedScriptURL} from '../util/security/trusted_type_defs';\nimport {trustedHTMLFromString, trustedScriptURLFromString} from '../util/security/trusted_types';\nimport {\n trustedHTMLFromStringBypass,\n trustedScriptFromStringBypass,\n trustedScriptURLFromStringBypass,\n} from '../util/security/trusted_types_bypass';\n\nimport {allowSanitizationBypassAndThrow, BypassType, unwrapSafeValue} from './bypass';\nimport {_sanitizeHtml as _sanitizeHtml} from './html_sanitizer';\nimport {Sanitizer} from './sanitizer';\nimport {SecurityContext} from './security';\nimport {_sanitizeUrl as _sanitizeUrl} from './url_sanitizer';\n\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, BypassType.Html)) {\n return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml));\n }\n return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeStyle(unsafeStyle: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, BypassType.Style)) {\n return unwrapSafeValue(unsafeStyle);\n }\n return renderStringify(unsafeStyle);\n}\n\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrl(unsafeUrl: any): string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, BypassType.Url)) {\n return unwrapSafeValue(unsafeUrl);\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptURLFromStringBypass(\n sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '',\n );\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, BypassType.ResourceUrl)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL,\n ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`,\n );\n}\n\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string {\n const sanitizer = getSanitizer();\n if (sanitizer) {\n return trustedScriptFromStringBypass(\n sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '',\n );\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, BypassType.Script)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new RuntimeError(\n RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT,\n ngDevMode && 'unsafe value used in a script context',\n );\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n // is an array with a `raw` property that is also an array. The associated\n // template literal has no interpolation if and only if the length of the\n // TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n }\n return trustedHTMLFromString(html[0]);\n}\n\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nexport function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string {\n // The following runtime check ensures that the function was called as a\n // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n // TemplateStringsArray is an array with a `raw` property that is also an\n // array. The associated template literal has no interpolation if and only if\n // the length of the TemplateStringsArray is 1.\n if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n }\n return trustedScriptURLFromString(url[0]);\n}\n\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nexport function getUrlSanitizer(tag: string, prop: string) {\n if (\n (prop === 'src' &&\n (tag === 'embed' ||\n tag === 'frame' ||\n tag === 'iframe' ||\n tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))\n ) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n}\n\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nexport function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\n\nexport function validateAgainstEventProperties(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage =\n `Binding to event property '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...` +\n `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n ` current module.`;\n throw new RuntimeError(RuntimeErrorCode.INVALID_EVENT_BINDING, errorMessage);\n }\n}\n\nexport function validateAgainstEventAttributes(name: string) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage =\n `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new RuntimeError(RuntimeErrorCode.INVALID_EVENT_BINDING, errorMessage);\n }\n}\n\nfunction getSanitizer(): Sanitizer | null {\n const lView = getLView();\n return lView && lView[ENVIRONMENT].sanitizer;\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.dev/license\n */\n\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/g;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nexport function escapeCommentText(value: string): string {\n return value.replace(COMMENT_DISALLOWED, (text) =>\n text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED),\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.dev/license\n */\n\nimport {PLATFORM_ID} from '../../application/application_tokens';\nimport {Injector} from '../../di';\nimport {inject} from '../../di/injector_compatibility';\nimport {RElement} from '../interfaces/renderer_dom';\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveWindow(element: RElement & {ownerDocument: Document}) {\n return element.ownerDocument.defaultView;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveDocument(element: RElement & {ownerDocument: Document}) {\n return element.ownerDocument;\n}\n\n/**\n *\n * @codeGenApi\n */\nexport function ɵɵresolveBody(element: RElement & {ownerDocument: Document}) {\n return element.ownerDocument.body;\n}\n\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nexport const INTERPOLATION_DELIMITER = `�`;\n\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nexport function maybeUnwrapFn<T>(value: T | (() => T)): T {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}\n\n/**\n * Detects whether the code is invoked in a browser.\n * Later on, this check should be replaced with a tree-shakable\n * flag (e.g. `!isServer`).\n */\nexport function isPlatformBrowser(injector?: Injector): boolean {\n return (injector ?? inject(Injector)).get(PLATFORM_ID) === 'browser';\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.dev/license\n */\n\nimport {ViewEncapsulation} from '../metadata/view';\n\n/**\n * Used by `RendererFactory2` to associate custom rendering data and styles\n * with a rendering implementation.\n * @publicApi\n */\nexport interface RendererType2 {\n /**\n * A unique identifying string for the new renderer, used when creating\n * unique styles for encapsulation.\n */\n id: string;\n /**\n * The view encapsulation type, which determines how styles are applied to\n * DOM elements. One of\n * - `Emulated` (default): Emulate native scoping of styles.\n * - `Native`: Use the native encapsulation mechanism of the renderer.\n * - `ShadowDom`: Use modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * create a ShadowRoot for component's host element.\n * - `None`: Do not provide any template or style encapsulation.\n */\n encapsulation: ViewEncapsulation;\n /**\n * Defines CSS styles to be stored on a renderer instance.\n */\n styles: string[];\n /**\n * Defines arbitrary developer-defined data to be stored on a renderer instance.\n * This is useful for renderers that delegate to other renderers.\n */\n data: {[kind: string]: any};\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nexport enum RendererStyleFlags2 {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n Important = 1 << 0,\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n DashCase = 1 << 1,\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.dev/license\n */\n\n/**\n * @fileoverview\n *\n * This file provides mechanism by which code relevant to the `TIcuContainerNode` is only loaded if\n * ICU is present in the template.\n */\n\nimport {TIcuContainerNode} from '../interfaces/node';\nimport {RNode} from '../interfaces/renderer_dom';\nimport {LView} from '../interfaces/view';\n\nlet _icuContainerIterate: (\n tIcuContainerNode: TIcuContainerNode,\n lView: LView,\n) => () => RNode | null;\n\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nexport function icuContainerIterate(\n tIcuContainerNode: TIcuContainerNode,\n lView: LView,\n): () => RNode | null {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nexport function ensureIcuContainerVisitorLoaded(\n loader: () => (tIcuContainerNode: TIcuContainerNode, lView: LView) => () => RNode | null,\n) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\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.dev/license\n */\n\nimport {\n consumerDestroy,\n getActiveConsumer,\n setActiveConsumer,\n} from '@angular/core/primitives/signals';\n\nimport {NotificationSource} from '../change_detection/scheduling/zoneless_scheduling';\nimport {hasInSkipHydrationBlockFlag} from '../hydration/skip_hydration';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {RendererStyleFlags2} from '../render/api_flags';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {\n assertDefined,\n assertEqual,\n assertFunction,\n assertNotReactive,\n assertNumber,\n assertString,\n} from '../util/assert';\nimport {escapeCommentText} from '../util/dom';\n\nimport {\n assertLContainer,\n assertLView,\n assertParentView,\n assertProjectionSlots,\n assertTNodeForLView,\n} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {\n CONTAINER_HEADER_OFFSET,\n LContainer,\n LContainerFlags,\n MOVED_VIEWS,\n NATIVE,\n} from './interfaces/container';\nimport {ComponentDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {unregisterLView} from './interfaces/lview_tracking';\nimport {\n TElementNode,\n TIcuContainerNode,\n TNode,\n TNodeFlags,\n TNodeType,\n TProjectionNode,\n} from './interfaces/node';\nimport {Renderer} from './interfaces/renderer';\nimport {RComment, RElement, RNode, RTemplate, RText} from './interfaces/renderer_dom';\nimport {isLContainer, isLView} from './interfaces/type_checks';\nimport {\n CHILD_HEAD,\n CLEANUP,\n DECLARATION_COMPONENT_VIEW,\n DECLARATION_LCONTAINER,\n DestroyHookData,\n ENVIRONMENT,\n FLAGS,\n HookData,\n HookFn,\n HOST,\n LView,\n LViewFlags,\n NEXT,\n ON_DESTROY_HOOKS,\n PARENT,\n QUERIES,\n REACTIVE_TEMPLATE_CONSUMER,\n RENDERER,\n T_HOST,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {profiler} from './profiler';\nimport {ProfilerEvent} from './profiler_types';\nimport {setUpAttributes} from './util/attrs_utils';\nimport {\n getLViewParent,\n getNativeByTNode,\n unwrapRNode,\n updateAncestorTraversalFlagsOnAttach,\n} from './util/view_utils';\n\nconst enum WalkTNodeTreeAction {\n /** node create in the native environment. Run on initial creation. */\n Create = 0,\n\n /**\n * node insert in the native environment.\n * Run when existing node has been detached and needs to be re-attached.\n */\n Insert = 1,\n\n /** node detach from the native environment */\n Detach = 2,\n\n /** node destruction using the renderer's API */\n Destroy = 3,\n}\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(\n action: WalkTNodeTreeAction,\n renderer: Renderer,\n parent: RElement | null,\n lNodeToHandle: RNode | LContainer | LView,\n beforeNode?: RNode | null,\n) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer: LContainer | undefined;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST]!;\n }\n const rNode: RNode = unwrapRNode(lNodeToHandle);\n\n if (action === WalkTNodeTreeAction.Create && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === WalkTNodeTreeAction.Insert && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === WalkTNodeTreeAction.Detach) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === WalkTNodeTreeAction.Destroy) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode!(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\n\nexport function createTextNode(renderer: Renderer, value: string): RText {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return renderer.createText(value);\n}\n\nexport function updateTextNode(renderer: Renderer, rNode: RText, value: string): void {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\n\nexport function createCommentNode(renderer: Renderer, value: string): RComment {\n ngDevMode && ngDevMode.rendererCreateComment++;\n return renderer.createComment(escapeCommentText(value));\n}\n\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nexport function createElementNode(\n renderer: Renderer,\n name: string,\n namespace: string | null,\n): RElement {\n ngDevMode && ngDevMode.rendererCreateElement++;\n return renderer.createElement(name, namespace);\n}\n\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nexport function removeViewFromDOM(tView: TView, lView: LView): void {\n detachViewFromDOM(tView, lView);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nexport function addViewToDOM(\n tView: TView,\n parentTNode: TNode,\n renderer: Renderer,\n lView: LView,\n parentNativeNode: RElement,\n beforeNode: RNode | null,\n): void {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Insert, parentNativeNode, beforeNode);\n}\n\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nexport function detachViewFromDOM(tView: TView, lView: LView) {\n // When we remove a view from the DOM, we need to rerun afterRender hooks\n // We don't necessarily needs to run change detection. DOM removal only requires\n // change detection if animations are enabled (this notification is handled by animations).\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.ViewDetachedFromDOM);\n applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, null, null);\n}\n\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nexport function destroyViewTree(rootView: LView): void {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n\n while (lViewOrLContainer) {\n let next: LView | LContainer | null = null;\n\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView: LView | undefined = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer![NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer![NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nexport function insertView(tView: TView, lView: LView, lContainer: LContainer, index: number) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n\n lView[PARENT] = lContainer;\n\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n\n updateAncestorTraversalFlagsOnAttach(lView);\n // Sets the attached flag\n lView[FLAGS] |= LViewFlags.Attached;\n}\n\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer or attached directly to ApplicationRef.\n */\nexport function trackMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const parent = lView[PARENT]!;\n ngDevMode && assertDefined(parent, 'missing parent');\n if (isLView(parent)) {\n declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n } else {\n const insertedComponentLView = parent[PARENT]![DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n }\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\n\nexport function detachMovedView(declarationContainer: LContainer, lView: LView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(\n declarationContainer[MOVED_VIEWS],\n 'A projected view should belong to a non-empty projected views collection',\n );\n const movedViews = declarationContainer[MOVED_VIEWS]!;\n const declarationViewIndex = movedViews.indexOf(lView);\n movedViews.splice(declarationViewIndex, 1);\n}\n\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nexport function detachView(lContainer: LContainer, removeIndex: number): LView | undefined {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT] as LView;\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);\n\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~LViewFlags.Attached;\n }\n return viewToDetach;\n}\n\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nexport function destroyLView(tView: TView, lView: LView) {\n if (!(lView[FLAGS] & LViewFlags.Destroyed)) {\n const renderer = lView[RENDERER];\n\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, WalkTNodeTreeAction.Destroy, null, null);\n }\n\n destroyViewTree(lView);\n }\n}\n\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView: TView, lView: LView): void {\n if (lView[FLAGS] & LViewFlags.Destroyed) {\n return;\n }\n\n const prevConsumer = setActiveConsumer(null);\n try {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~LViewFlags.Attached;\n\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= LViewFlags.Destroyed;\n\n lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);\n\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === TViewType.Component) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n\n // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView: TView, lView: LView): void {\n ngDevMode && assertNotReactive(processCleanups.name);\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP]!;\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n // 2 at the end of this block).\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n // Destroy anything whose teardown is a function call (e.g. QueryList, ModelSignal).\n lCleanup[targetIdx]();\n } else {\n // Subscription\n lCleanup[-targetIdx].unsubscribe();\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n lView[CLEANUP] = null;\n }\n const destroyHooks = lView[ON_DESTROY_HOOKS];\n if (destroyHooks !== null) {\n // Reset the ON_DESTROY_HOOKS array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n lView[ON_DESTROY_HOOKS] = null;\n for (let i = 0; i < destroyHooks.length; i++) {\n const destroyHooksFn = destroyHooks[i];\n ngDevMode && assertFunction(destroyHooksFn, 'Expecting destroy hook to be a function.');\n destroyHooksFn();\n }\n }\n}\n\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView: TView, lView: LView): void {\n ngDevMode && assertNotReactive(executeOnDestroys.name);\n let destroyHooks: DestroyHookData | null;\n\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i] as number];\n\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1] as HookFn | HookData;\n\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j] as number];\n const hook = toCall[j + 1] as HookFn;\n profiler(ProfilerEvent.LifecycleHookStart, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, callContext, hook);\n }\n }\n } else {\n profiler(ProfilerEvent.LifecycleHookStart, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(ProfilerEvent.LifecycleHookEnd, context, toCall);\n }\n }\n }\n }\n }\n}\n\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nexport function getParentRElement(tView: TView, tNode: TNode, lView: LView): RElement | null {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nexport function getClosestRElement(\n tView: TView,\n tNode: TNode | null,\n lView: LView,\n): RElement | null {\n let parentTNode: TNode | null = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent. Also skip let declarations since they don't have a\n // corresponding DOM node at all.\n while (\n parentTNode !== null &&\n parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu | TNodeType.LetDeclaration)\n ) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, TNodeType.AnyRNode | TNodeType.Container);\n const {componentOffset} = parentTNode;\n if (componentOffset > -1) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const {encapsulation} = tView.data[\n parentTNode.directiveStart + componentOffset\n ] as ComponentDef<unknown>;\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (\n encapsulation === ViewEncapsulation.None ||\n encapsulation === ViewEncapsulation.Emulated\n ) {\n return null;\n }\n }\n\n return getNativeByTNode(parentTNode, lView) as RElement;\n }\n}\n\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nexport function nativeInsertBefore(\n renderer: Renderer,\n parent: RElement,\n child: RNode,\n beforeNode: RNode | null,\n isMove: boolean,\n): void {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\n\nfunction nativeAppendChild(renderer: Renderer, parent: RElement, child: RNode): void {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\n\nfunction nativeAppendOrInsertBefore(\n renderer: Renderer,\n parent: RElement,\n child: RNode,\n beforeNode: RNode | null,\n isMove: boolean,\n) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n\n/**\n * Returns a native parent of a given native node.\n */\nexport function nativeParentNode(renderer: Renderer, node: RNode): RElement | null {\n return renderer.parentNode(node);\n}\n\n/**\n * Returns a native sibling of a given native node.\n */\nexport function nativeNextSibling(renderer: Renderer, node: RNode): RNode | null {\n return renderer.nextSibling(node);\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n): RNode | null {\n return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nexport function getInsertInFrontOfRNodeWithNoI18n(\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n): RNode | null {\n if (parentTNode.type & (TNodeType.ElementContainer | TNodeType.Icu)) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n}\n\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n: (\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n) => RNode | null = getInsertInFrontOfRNodeWithNoI18n;\n\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore: (\n renderer: Renderer,\n childTNode: TNode,\n lView: LView,\n childRNode: RNode | RNode[],\n parentRElement: RElement | null,\n) => void;\n\nexport function setI18nHandling(\n getInsertInFrontOfRNodeWithI18n: (\n parentTNode: TNode,\n currentTNode: TNode,\n lView: LView,\n ) => RNode | null,\n processI18nInsertBefore: (\n renderer: Renderer,\n childTNode: TNode,\n lView: LView,\n childRNode: RNode | RNode[],\n parentRElement: RElement | null,\n ) => void,\n) {\n _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n _processI18nInsertBefore = processI18nInsertBefore;\n}\n\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nexport function appendChild(\n tView: TView,\n lView: LView,\n childRNode: RNode | RNode[],\n childTNode: TNode,\n): void {\n const parentRNode = getParentRElement(tView, childTNode, lView);\n const renderer = lView[RENDERER];\n const parentTNode: TNode = childTNode.parent || lView[T_HOST]!;\n const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n if (parentRNode != null) {\n if (Array.isArray(childRNode)) {\n for (let i = 0; i < childRNode.length; i++) {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n }\n } else {\n nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n }\n }\n\n _processI18nInsertBefore !== undefined &&\n _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\n}\n\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nexport function getFirstNativeNode(lView: LView, tNode: TNode | null): RNode | null {\n if (tNode !== null) {\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode |\n TNodeType.AnyContainer |\n TNodeType.Icu |\n TNodeType.Projection |\n TNodeType.LetDeclaration,\n );\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.AnyRNode) {\n return getNativeByTNode(tNode, lView);\n } else if (tNodeType & TNodeType.Container) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n } else if (tNodeType & TNodeType.ElementContainer) {\n const elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n } else {\n const rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n } else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n } else if (tNodeType & TNodeType.LetDeclaration) {\n return getFirstNativeNode(lView, tNode.next);\n } else if (tNodeType & TNodeType.Icu) {\n let nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode | null = nextRNode();\n // If the ICU container has no nodes, than we use the ICU anchor as the node.\n return rNode || unwrapRNode(lView[tNode.index]);\n } else {\n const projectionNodes = getProjectionNodes(lView, tNode);\n if (projectionNodes !== null) {\n if (Array.isArray(projectionNodes)) {\n return projectionNodes[0];\n }\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n ngDevMode && assertParentView(parentView);\n return getFirstNativeNode(parentView!, projectionNodes);\n } else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n\n return null;\n}\n\nexport function getProjectionNodes(lView: LView, tNode: TNode | null): TNode | RNode[] | null {\n if (tNode !== null) {\n const componentView = lView[DECLARATION_COMPONENT_VIEW];\n const componentHost = componentView[T_HOST] as TElementNode;\n const slotIdx = tNode.projection as number;\n ngDevMode && assertProjectionSlots(lView);\n return componentHost.projection![slotIdx];\n }\n return null;\n}\n\nexport function getBeforeNodeForView(\n viewIndexInContainer: number,\n lContainer: LContainer,\n): RNode | null {\n const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n const lView = lContainer[nextViewIndex] as LView;\n const firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n\n return lContainer[NATIVE];\n}\n\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nexport function nativeRemoveNode(renderer: Renderer, rNode: RNode, isHostElement?: boolean): void {\n ngDevMode && ngDevMode.rendererRemoveNode++;\n renderer.removeChild(null, rNode, isHostElement);\n}\n\n/**\n * Clears the contents of a given RElement.\n *\n * @param rElement the native RElement to be cleared\n */\nexport function clearElementContents(rElement: RElement): void {\n rElement.textContent = '';\n}\n\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n tNode: TNode | null,\n lView: LView,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n isProjection: boolean,\n) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n\n // Let declarations don't have corresponding DOM nodes so we skip over them.\n if (tNode.type === TNodeType.LetDeclaration) {\n tNode = tNode.next;\n continue;\n }\n\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu,\n );\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === WalkTNodeTreeAction.Create) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= TNodeFlags.isProjected;\n }\n }\n if ((tNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached) {\n if (tNodeType & TNodeType.ElementContainer) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode | null;\n while ((rNode = nextRNode())) {\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n } else if (tNodeType & TNodeType.Projection) {\n applyProjectionRecursive(\n renderer,\n action,\n lView,\n tNode as TProjectionNode,\n parentRElement,\n beforeNode,\n );\n } else {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.Container);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\n\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param parentRElement parent DOM element for insertion (Removal does not need it).\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(\n tView: TView,\n lView: LView,\n renderer: Renderer,\n action: WalkTNodeTreeAction.Destroy,\n parentRElement: null,\n beforeNode: null,\n): void;\nfunction applyView(\n tView: TView,\n lView: LView,\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n): void;\nfunction applyView(\n tView: TView,\n lView: LView,\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n): void {\n applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false);\n}\n\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nexport function applyProjection(tView: TView, lView: LView, tProjectionNode: TProjectionNode) {\n const renderer = lView[RENDERER];\n const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n const parentTNode = tProjectionNode.parent || lView[T_HOST]!;\n let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n applyProjectionRecursive(\n renderer,\n WalkTNodeTreeAction.Create,\n lView,\n tProjectionNode,\n parentRNode,\n beforeNode,\n );\n}\n\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n lView: LView,\n tProjectionNode: TProjectionNode,\n parentRElement: RElement | null,\n beforeNode: RNode | null,\n) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST] as TElementNode;\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n const nodeToProjectOrRNodes = componentNode.projection![tProjectionNode.projection]!;\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n const rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n }\n } else {\n let nodeToProject: TNode | null = nodeToProjectOrRNodes;\n const projectedComponentLView = componentLView[PARENT] as LView;\n // If a parent <ng-content> is located within a skip hydration block,\n // annotate an actual node that is being projected with the same flag too.\n if (hasInSkipHydrationBlockFlag(tProjectionNode)) {\n nodeToProject.flags |= TNodeFlags.inSkipHydrationBlock;\n }\n applyNodes(\n renderer,\n action,\n nodeToProject,\n projectedComponentLView,\n parentRElement,\n beforeNode,\n true,\n );\n }\n}\n\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(\n renderer: Renderer,\n action: WalkTNodeTreeAction,\n lContainer: LContainer,\n parentRElement: RElement | null,\n beforeNode: RNode | null | undefined,\n) {\n ngDevMode && assertLContainer(lContainer);\n const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n const native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor\n // node (comment in the DOM) that will be different from the LContainer's host node. In this\n // particular case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I\n // don't see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode);\n }\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lView = lContainer[i] as LView;\n applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor);\n }\n}\n\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nexport function applyStyling(\n renderer: Renderer,\n isClassBased: boolean,\n rNode: RElement,\n prop: string,\n value: any,\n) {\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer.removeClass(rNode, prop);\n } else {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer.addClass(rNode, prop);\n }\n } else {\n let flags = prop.indexOf('-') === -1 ? undefined : (RendererStyleFlags2.DashCase as number);\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer.removeStyle(rNode, prop, flags);\n } else {\n // A value is important if it ends with `!important`. The style\n // parser strips any semicolons at the end of the value.\n const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n\n if (isImportant) {\n // !important has to be stripped from the value for it to be valid.\n value = value.slice(0, -10);\n flags! |= RendererStyleFlags2.Important;\n }\n\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer.setStyle(rNode, prop, value, flags);\n }\n }\n}\n\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectStyle(renderer: Renderer, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, \"'newValue' should be a string\");\n renderer.setAttribute(element, 'style', newValue);\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nexport function writeDirectClass(renderer: Renderer, element: RElement, newValue: string) {\n ngDevMode && assertString(newValue, \"'newValue' should be a string\");\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n } else {\n renderer.setAttribute(element, 'class', newValue);\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\n}\n\n/** Sets up the static DOM attributes on an `RNode`. */\nexport function setupStaticAttributes(renderer: Renderer, element: RElement, tNode: TNode) {\n const {mergedAttrs, classes, styles} = tNode;\n\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, element, mergedAttrs);\n }\n\n if (classes !== null) {\n writeDirectClass(renderer, element, classes);\n }\n\n if (styles !== null) {\n writeDirectStyle(renderer, element, styles);\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.dev/license\n */\n\nexport interface NO_CHANGE {\n // This is a brand that ensures that this type can never match anything else\n __brand__: 'NO_CHANGE';\n}\n\n/** A special value which designates that a value has not changed. */\nexport const NO_CHANGE: NO_CHANGE =\n typeof ngDevMode === 'undefined' || ngDevMode ? {__brand__: 'NO_CHANGE'} : ({} as NO_CHANGE);\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.dev/license\n */\nimport {assertGreaterThan} from '../../util/assert';\nimport {assertIndexInDeclRange} from '../assert';\nimport {executeCheckHooks, executeInitAndCheckHooks} from '../hooks';\nimport {FLAGS, InitPhaseState, LView, LViewFlags, TVIEW, TView} from '../interfaces/view';\nimport {\n getLView,\n getSelectedIndex,\n getTView,\n isInCheckNoChangesMode,\n setSelectedIndex,\n} from '../state';\n\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nexport function ɵɵadvance(delta: number = 1): void {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(\n getTView(),\n getLView(),\n getSelectedIndex() + delta,\n !!ngDevMode && isInCheckNoChangesMode(),\n );\n}\n\nexport function selectIndexInternal(\n tView: TView,\n lView: LView,\n index: number,\n checkNoChangesMode: boolean,\n) {\n ngDevMode && assertIndexInDeclRange(lView[TVIEW], index);\n\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n const hooksInitPhaseCompleted =\n (lView[FLAGS] & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, index);\n }\n }\n }\n\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵadvance` instruction.\n setSelectedIndex(index);\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.dev/license\n */\nimport {InjectFlags, resolveForwardRef} from '../../di';\nimport {assertInjectImplementationNotEqual} from '../../di/inject_switch';\nimport {ɵɵinject} from '../../di/injector_compatibility';\nimport {ProviderToken} from '../../di/provider_token';\nimport {Type} from '../../interface/type';\nimport {emitInjectEvent} from '../debug/injector_profiler';\nimport {getOrCreateInjectable} from '../di';\nimport {TDirectiveHostNode} from '../interfaces/node';\nimport {getCurrentTNode, getLView} from '../state';\n\n/**\n * Returns the value associated to the given token from the injectors.\n *\n * `directiveInject` is intended to be used for directive, component and pipe factories.\n * All other injection use `inject` which does not walk the node injector tree.\n *\n * Usage example (in factory function):\n *\n * ```ts\n * class SomeDirective {\n * constructor(directive: DirectiveA) {}\n *\n * static ɵdir = ɵɵdefineDirective({\n * type: SomeDirective,\n * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))\n * });\n * }\n * ```\n * @param token the type or token to inject\n * @param flags Injection flags\n * @returns the value from the injector or `null` when not found\n *\n * @codeGenApi\n */\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;\nexport function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;\nexport function ɵɵdirectiveInject<T>(\n token: ProviderToken<T>,\n flags = InjectFlags.Default,\n): T | null {\n const lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView === null) {\n // Verify that we will not get into infinite loop.\n ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n return ɵɵinject(token, flags);\n }\n const tNode = getCurrentTNode();\n const value = getOrCreateInjectable<T>(\n tNode as TDirectiveHostNode,\n lView,\n resolveForwardRef(token),\n flags,\n );\n ngDevMode && emitInjectEvent(token as Type<unknown>, value, flags);\n return value;\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactory(): never {\n const msg = ngDevMode\n ? `This constructor was not compatible with Dependency Injection.`\n : 'invalid';\n throw new Error(msg);\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.dev/license\n */\n\nimport {setActiveConsumer, SIGNAL} from '@angular/core/primitives/signals';\n\nimport {InputSignalWithTransform} from '../../authoring/input/input_signal';\nimport {InputSignalNode} from '../../authoring/input/input_signal_node';\nimport {applyValueToInputField} from '../apply_value_input_field';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {InputFlags} from '../interfaces/input_flags';\n\nexport function writeToDirectiveInput<T>(\n def: DirectiveDef<T>,\n instance: T,\n publicName: string,\n privateName: string,\n flags: InputFlags,\n value: unknown,\n) {\n const prevConsumer = setActiveConsumer(null);\n try {\n // If we know we are dealing with a signal input, we cache its reference\n // in a tree-shakable way. The input signal node can then be used for\n // value transform execution or actual value updates without introducing\n // additional megamorphic accesses for accessing the instance field.\n let inputSignalNode: InputSignalNode<unknown, unknown> | null = null;\n if ((flags & InputFlags.SignalBased) !== 0) {\n const field = (instance as any)[privateName] as InputSignalWithTransform<unknown, unknown>;\n inputSignalNode = field[SIGNAL];\n }\n\n // If there is a signal node and a transform, run it before potentially\n // delegating to features like `NgOnChanges`.\n if (inputSignalNode !== null && inputSignalNode.transformFn !== undefined) {\n value = inputSignalNode.transformFn(value);\n }\n // If there is a decorator input transform, run it.\n if ((flags & InputFlags.HasDecoratorInputTransform) !== 0) {\n value = def.inputTransforms![privateName]!.call(instance, value);\n }\n\n if (def.setInput !== null) {\n def.setInput(instance, inputSignalNode, value, publicName, privateName);\n } else {\n applyValueToInputField(instance, inputSignalNode, privateName, value);\n }\n } finally {\n setActiveConsumer(prevConsumer);\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {Injector} from '../../di/injector';\nimport {ErrorHandler} from '../../error_handler';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DehydratedView} from '../../hydration/interfaces';\nimport {hasSkipHydrationAttrOnRElement} from '../../hydration/skip_hydration';\nimport {PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT} from '../../hydration/tokens';\nimport {processTextNodeMarkersBeforeHydration} from '../../hydration/utils';\nimport {DoCheck, OnChanges, OnInit} from '../../interface/lifecycle_hooks';\nimport {Writable} from '../../interface/type';\nimport {SchemaMetadata} from '../../metadata/schema';\nimport {ViewEncapsulation} from '../../metadata/view';\nimport {\n validateAgainstEventAttributes,\n validateAgainstEventProperties,\n} from '../../sanitization/sanitization';\nimport {\n assertDefined,\n assertEqual,\n assertGreaterThan,\n assertGreaterThanOrEqual,\n assertIndexInRange,\n assertNotEqual,\n assertNotSame,\n assertSame,\n assertString,\n} from '../../util/assert';\nimport {escapeCommentText} from '../../util/dom';\nimport {normalizeDebugBindingName, normalizeDebugBindingValue} from '../../util/ng_reflect';\nimport {stringify} from '../../util/stringify';\nimport {applyValueToInputField} from '../apply_value_input_field';\nimport {\n assertFirstCreatePass,\n assertFirstUpdatePass,\n assertLView,\n assertNoDuplicateDirectives,\n assertTNodeForLView,\n assertTNodeForTView,\n} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {getFactoryDef} from '../definition_factory';\nimport {diPublicInInjector, getNodeInjectable, getOrCreateNodeInjectorForNode} from '../di';\nimport {throwMultipleComponentError} from '../errors';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {\n ComponentDef,\n ComponentTemplate,\n DirectiveDef,\n DirectiveDefListOrFactory,\n HostBindingsFunction,\n HostDirectiveBindingMap,\n HostDirectiveDefs,\n PipeDefListOrFactory,\n RenderFlags,\n ViewQueriesFunction,\n} from '../interfaces/definition';\nimport {NodeInjectorFactory} from '../interfaces/injector';\nimport {InputFlags} from '../interfaces/input_flags';\nimport {getUniqueLViewId} from '../interfaces/lview_tracking';\nimport {\n InitialInputData,\n InitialInputs,\n LocalRefExtractor,\n NodeInputBindings,\n NodeOutputBindings,\n TAttributes,\n TConstantsOrFactory,\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TIcuContainerNode,\n TLetDeclarationNode,\n TNode,\n TNodeFlags,\n TNodeType,\n TProjectionNode,\n} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RComment, RElement, RNode, RText} from '../interfaces/renderer_dom';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {TStylingRange} from '../interfaces/styling';\nimport {isComponentDef, isComponentHost, isContentQueryHost} from '../interfaces/type_checks';\nimport {\n CHILD_HEAD,\n CHILD_TAIL,\n CLEANUP,\n CONTEXT,\n DECLARATION_COMPONENT_VIEW,\n DECLARATION_VIEW,\n EMBEDDED_VIEW_INJECTOR,\n ENVIRONMENT,\n FLAGS,\n HEADER_OFFSET,\n HOST,\n HostBindingOpCodes,\n HYDRATION,\n ID,\n INJECTOR,\n LView,\n LViewEnvironment,\n LViewFlags,\n NEXT,\n PARENT,\n RENDERER,\n T_HOST,\n TData,\n TVIEW,\n TView,\n TViewType,\n} from '../interfaces/view';\nimport {assertPureTNodeType, assertTNodeType} from '../node_assert';\nimport {clearElementContents, updateTextNode} from '../node_manipulation';\nimport {isInlineTemplate, isNodeMatchingSelectorList} from '../node_selector_matcher';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {\n getBindingsEnabled,\n getCurrentDirectiveIndex,\n getCurrentParentTNode,\n getCurrentTNodePlaceholderOk,\n getSelectedIndex,\n isCurrentTNodeParent,\n isInCheckNoChangesMode,\n isInI18nBlock,\n isInSkipHydrationBlock,\n setBindingRootForHostBindings,\n setCurrentDirectiveIndex,\n setCurrentQueryIndex,\n setCurrentTNode,\n setSelectedIndex,\n} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {INTERPOLATION_DELIMITER} from '../util/misc_utils';\nimport {renderStringify} from '../util/stringify_utils';\nimport {\n getComponentLViewByIndex,\n getNativeByIndex,\n getNativeByTNode,\n resetPreOrderHookFlags,\n unwrapLView,\n} from '../util/view_utils';\n\nimport {selectIndexInternal} from './advance';\nimport {ɵɵdirectiveInject} from './di';\nimport {handleUnknownPropertyError, isPropertyValid, matchingSchemas} from './element_validation';\nimport {writeToDirectiveInput} from './write_to_directive_input';\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nexport function processHostBindingOpCodes(tView: TView, lView: LView): void {\n const hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) return;\n try {\n for (let i = 0; i < hostBindingOpCodes.length; i++) {\n const opCode = hostBindingOpCodes[i] as number;\n if (opCode < 0) {\n // Negative numbers are element indexes.\n setSelectedIndex(~opCode);\n } else {\n // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n const directiveIdx = opCode;\n const bindingRootIndx = hostBindingOpCodes[++i] as number;\n const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;\n setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n const context = lView[directiveIdx];\n hostBindingFn(RenderFlags.Update, context);\n }\n }\n } finally {\n setSelectedIndex(-1);\n }\n}\n\nexport function createLView<T>(\n parentLView: LView | null,\n tView: TView,\n context: T | null,\n flags: LViewFlags,\n host: RElement | null,\n tHostNode: TNode | null,\n environment: LViewEnvironment | null,\n renderer: Renderer | null,\n injector: Injector | null,\n embeddedViewInjector: Injector | null,\n hydrationInfo: DehydratedView | null,\n): LView<T> {\n const lView = tView.blueprint.slice() as LView;\n lView[HOST] = host;\n lView[FLAGS] =\n flags |\n LViewFlags.CreationMode |\n LViewFlags.Attached |\n LViewFlags.FirstLViewPass |\n LViewFlags.Dirty;\n if (\n embeddedViewInjector !== null ||\n (parentLView && parentLView[FLAGS] & LViewFlags.HasEmbeddedViewInjector)\n ) {\n lView[FLAGS] |= LViewFlags.HasEmbeddedViewInjector;\n }\n resetPreOrderHookFlags(lView);\n ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[ENVIRONMENT] = (environment || (parentLView && parentLView[ENVIRONMENT]))!;\n ngDevMode && assertDefined(lView[ENVIRONMENT], 'LViewEnvironment is required');\n lView[RENDERER] = (renderer || (parentLView && parentLView[RENDERER]))!;\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[INJECTOR as any] = injector || (parentLView && parentLView[INJECTOR]) || null;\n lView[T_HOST] = tHostNode;\n lView[ID] = getUniqueLViewId();\n lView[HYDRATION] = hydrationInfo;\n lView[EMBEDDED_VIEW_INJECTOR as any] = embeddedViewInjector;\n\n ngDevMode &&\n assertEqual(\n tView.type == TViewType.Embedded ? parentLView !== null : true,\n true,\n 'Embedded views must have parentLView',\n );\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == TViewType.Embedded ? parentLView![DECLARATION_COMPONENT_VIEW] : lView;\n return lView as LView<T>;\n}\n\n/**\n * Create and stores the TNode, and hooks it up to the tree.\n *\n * @param tView The current `TView`.\n * @param index The index at which the TNode should be saved (null if view, since they are not\n * saved).\n * @param type The type of TNode to create\n * @param native The native element for this node, if applicable\n * @param name The tag name of the associated native element, if applicable\n * @param attrs Any attrs for the native element, if applicable\n */\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Element | TNodeType.Text,\n name: string | null,\n attrs: TAttributes | null,\n): TElementNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Container,\n name: string | null,\n attrs: TAttributes | null,\n): TContainerNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Projection,\n name: null,\n attrs: TAttributes | null,\n): TProjectionNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.ElementContainer,\n name: string | null,\n attrs: TAttributes | null,\n): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.Icu,\n name: null,\n attrs: TAttributes | null,\n): TElementContainerNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType.LetDeclaration,\n name: null,\n attrs: null,\n): TLetDeclarationNode;\nexport function getOrCreateTNode(\n tView: TView,\n index: number,\n type: TNodeType,\n name: string | null,\n attrs: TAttributes | null,\n): TElementNode &\n TContainerNode &\n TElementContainerNode &\n TProjectionNode &\n TIcuContainerNode &\n TLetDeclarationNode {\n ngDevMode &&\n index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n // Keep this function short, so that the VM will inline it.\n ngDevMode && assertPureTNodeType(type);\n let tNode = tView.data[index] as TNode;\n if (tNode === null) {\n tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n if (isInI18nBlock()) {\n // If we are in i18n block then all elements should be pre declared through `Placeholder`\n // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n // removed, so we mark it as detached.\n tNode.flags |= TNodeFlags.isDetached;\n }\n } else if (tNode.type & TNodeType.Placeholder) {\n tNode.type = type;\n tNode.value = name;\n tNode.attrs = attrs;\n const parent = getCurrentParentTNode();\n tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n ngDevMode && assertTNodeForTView(tNode, tView);\n ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n }\n setCurrentTNode(tNode, true);\n return tNode as TElementNode &\n TContainerNode &\n TElementContainerNode &\n TProjectionNode &\n TIcuContainerNode;\n}\n\nexport function createTNodeAtIndex(\n tView: TView,\n index: number,\n type: TNodeType,\n name: string | null,\n attrs: TAttributes | null,\n) {\n const currentTNode = getCurrentTNodePlaceholderOk();\n const isParent = isCurrentTNodeParent();\n const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places.\n const tNode = (tView.data[index] = createTNode(\n tView,\n parent as TElementNode | TContainerNode,\n type,\n index,\n name,\n attrs,\n ));\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\n if (currentTNode !== null) {\n if (isParent) {\n // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n if (currentTNode.child == null && tNode.parent !== null) {\n // We are in the same view, which means we are adding content node to the parent view.\n currentTNode.child = tNode;\n }\n } else {\n if (currentTNode.next === null) {\n // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n // to break the links which i18n created.\n currentTNode.next = tNode;\n tNode.prev = currentTNode;\n }\n }\n }\n return tNode;\n}\n\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nexport function allocExpando(\n tView: TView,\n lView: LView,\n numSlotsToAlloc: number,\n initialValue: any,\n): number {\n if (numSlotsToAlloc === 0) return -1;\n if (ngDevMode) {\n assertFirstCreatePass(tView);\n assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n assertEqual(\n tView.data.length,\n tView.blueprint.length,\n 'Expecting Blueprint to be same size as TView',\n );\n assertFirstUpdatePass(tView);\n }\n const allocIdx = lView.length;\n for (let i = 0; i < numSlotsToAlloc; i++) {\n lView.push(initialValue);\n tView.blueprint.push(initialValue);\n tView.data.push(null);\n }\n return allocIdx;\n}\n\nexport function executeTemplate<T>(\n tView: TView,\n lView: LView<T>,\n templateFn: ComponentTemplate<T>,\n rf: RenderFlags,\n context: T,\n) {\n const prevSelectedIndex = getSelectedIndex();\n const isUpdatePhase = rf & RenderFlags.Update;\n try {\n setSelectedIndex(-1);\n if (isUpdatePhase && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n }\n\n const preHookType = isUpdatePhase\n ? ProfilerEvent.TemplateUpdateStart\n : ProfilerEvent.TemplateCreateStart;\n profiler(preHookType, context as unknown as {});\n templateFn(rf, context);\n } finally {\n setSelectedIndex(prevSelectedIndex);\n\n const postHookType = isUpdatePhase\n ? ProfilerEvent.TemplateUpdateEnd\n : ProfilerEvent.TemplateCreateEnd;\n profiler(postHookType, context as unknown as {});\n }\n}\n\n//////////////////////////\n//// Element\n//////////////////////////\n\nexport function executeContentQueries(tView: TView, tNode: TNode, lView: LView) {\n if (isContentQueryHost(tNode)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const def = tView.data[directiveIndex] as DirectiveDef<any>;\n if (def.contentQueries) {\n const directiveInstance = lView[directiveIndex];\n ngDevMode &&\n assertDefined(\n directiveIndex,\n 'Incorrect reference to a directive defining a content query',\n );\n def.contentQueries(RenderFlags.Create, directiveInstance, directiveIndex);\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\n/**\n * Creates directive instances.\n */\nexport function createDirectivesInstances(tView: TView, lView: LView, tNode: TDirectiveHostNode) {\n if (!getBindingsEnabled()) return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\n}\n\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nexport function saveResolvedLocalsInData(\n viewData: LView,\n tNode: TDirectiveHostNode,\n localRefExtractor: LocalRefExtractor = getNativeByTNode,\n): void {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n let localIndex = tNode.index + 1;\n for (let i = 0; i < localNames.length; i += 2) {\n const index = localNames[i + 1] as number;\n const value =\n index === -1\n ? localRefExtractor(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n viewData,\n )\n : viewData[index];\n viewData[localIndex++] = value;\n }\n }\n}\n\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nexport function getOrCreateComponentTView(def: ComponentDef<any>): TView {\n const tView = def.tView;\n\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfully since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n // Declaration node here is null since this function is called when we dynamically create a\n // component and hence there is no declaration.\n const declTNode = null;\n return (def.tView = createTView(\n TViewType.Component,\n declTNode,\n def.template,\n def.decls,\n def.vars,\n def.directiveDefs,\n def.pipeDefs,\n def.viewQuery,\n def.schemas,\n def.consts,\n def.id,\n ));\n }\n\n return tView;\n}\n\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nexport function createTView(\n type: TViewType,\n declTNode: TNode | null,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n directives: DirectiveDefListOrFactory | null,\n pipes: PipeDefListOrFactory | null,\n viewQuery: ViewQueriesFunction<any> | null,\n schemas: SchemaMetadata[] | null,\n constsOrFactory: TConstantsOrFactory | null,\n ssrId: string | null,\n): TView {\n ngDevMode && ngDevMode.tView++;\n const bindingStartIndex = HEADER_OFFSET + decls;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n const initialViewLength = bindingStartIndex + vars;\n const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n const tView = (blueprint[TVIEW as any] = {\n type: type,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n declTNode: declTNode,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n hostBindingOpCodes: null,\n firstCreatePass: true,\n firstUpdatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n consts: consts,\n incompleteFirstPass: false,\n ssrId,\n });\n if (ngDevMode) {\n // For performance reasons it is important that the tView retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tView);\n }\n return tView;\n}\n\nfunction createViewBlueprint(bindingStartIndex: number, initialViewLength: number): LView {\n const blueprint = [];\n\n for (let i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n\n return blueprint as LView;\n}\n\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param renderer the renderer used to locate the element.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n * @param injector Root view injector instance.\n */\nexport function locateHostElement(\n renderer: Renderer,\n elementOrSelector: RElement | string,\n encapsulation: ViewEncapsulation,\n injector: Injector,\n): RElement {\n // Note: we use default value for the `PRESERVE_HOST_CONTENT` here even though it's a\n // tree-shakable one (providedIn:'root'). This code path can be triggered during dynamic\n // component creation (after calling ViewContainerRef.createComponent) when an injector\n // instance can be provided. The injector instance might be disconnected from the main DI\n // tree, thus the `PRESERVE_HOST_CONTENT` would not be able to instantiate. In this case, the\n // default value will be used.\n const preserveHostContent = injector.get(PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT);\n\n // When using native Shadow DOM, do not clear host element to allow native slot\n // projection.\n const preserveContent = preserveHostContent || encapsulation === ViewEncapsulation.ShadowDom;\n const rootElement = renderer.selectRootElement(elementOrSelector, preserveContent);\n applyRootElementTransform(rootElement as HTMLElement);\n return rootElement;\n}\n\n/**\n * Applies any root element transformations that are needed. If hydration is enabled,\n * this will process corrupted text nodes.\n *\n * @param rootElement the app root HTML Element\n */\nexport function applyRootElementTransform(rootElement: HTMLElement) {\n _applyRootElementTransformImpl(rootElement as HTMLElement);\n}\n\n/**\n * Reference to a function that applies transformations to the root HTML element\n * of an app. When hydration is enabled, this processes any corrupt text nodes\n * so they are properly hydratable on the client.\n *\n * @param rootElement the app root HTML Element\n */\nlet _applyRootElementTransformImpl: typeof applyRootElementTransformImpl = () => null;\n\n/**\n * Processes text node markers before hydration begins. This replaces any special comment\n * nodes that were added prior to serialization are swapped out to restore proper text\n * nodes before hydration.\n *\n * @param rootElement the app root HTML Element\n */\nexport function applyRootElementTransformImpl(rootElement: HTMLElement) {\n if (hasSkipHydrationAttrOnRElement(rootElement)) {\n // Handle a situation when the `ngSkipHydration` attribute is applied\n // to the root node of an application. In this case, we should clear\n // the contents and render everything from scratch.\n clearElementContents(rootElement as RElement);\n } else {\n processTextNodeMarkersBeforeHydration(rootElement);\n }\n}\n\n/**\n * Sets the implementation for the `applyRootElementTransform` function.\n */\nexport function enableApplyRootElementTransformImpl() {\n _applyRootElementTransformImpl = applyRootElementTransformImpl;\n}\n\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nexport function storeCleanupWithContext(\n tView: TView,\n lView: LView,\n context: any,\n cleanupFn: Function,\n): void {\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n // Historically the `storeCleanupWithContext` was used to register both framework-level and\n // user-defined cleanup callbacks, but over time those two types of cleanups were separated.\n // This dev mode checks assures that user-level cleanup callbacks are _not_ stored in data\n // structures reserved for framework-specific hooks.\n ngDevMode &&\n assertDefined(\n context,\n 'Cleanup context is mandatory when registering framework-level destroy hooks',\n );\n lCleanup.push(context);\n\n if (tView.firstCreatePass) {\n getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n } else {\n // Make sure that no new framework-level cleanup functions are registered after the first\n // template pass is done (and TView data structures are meant to fully constructed).\n if (ngDevMode) {\n Object.freeze(getOrCreateTViewCleanup(tView));\n }\n }\n}\n\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs\n * @param tParent Parent `TNode`\n * @param type The type of the node\n * @param index The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @returns the TNode object\n */\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Container,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TContainerNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Element | TNodeType.Text,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TElementNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.ElementContainer,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TElementContainerNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Icu,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TIcuContainerNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.Projection,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TProjectionNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType.LetDeclaration,\n index: number,\n tagName: null,\n attrs: null,\n): TLetDeclarationNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType,\n index: number,\n tagName: string | null,\n attrs: TAttributes | null,\n): TNode;\nexport function createTNode(\n tView: TView,\n tParent: TElementNode | TContainerNode | null,\n type: TNodeType,\n index: number,\n value: string | null,\n attrs: TAttributes | null,\n): TNode {\n ngDevMode &&\n index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n // `view_engine_compatibility` for additional context.\n assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n ngDevMode && assertNotSame(attrs, undefined, \"'undefined' is not valid value for 'attrs'\");\n ngDevMode && ngDevMode.tNode++;\n ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n let injectorIndex = tParent ? tParent.injectorIndex : -1;\n let flags = 0;\n if (isInSkipHydrationBlock()) {\n flags |= TNodeFlags.inSkipHydrationBlock;\n }\n const tNode = {\n type,\n index,\n insertBeforeIndex: null,\n injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n componentOffset: -1,\n propertyBindings: null,\n flags,\n providerIndexes: 0,\n value: value,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tView: null,\n next: null,\n prev: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0 as TStylingRange,\n styleBindings: 0 as TStylingRange,\n };\n if (ngDevMode) {\n // For performance reasons it is important that the tNode retains the same shape during runtime.\n // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n // prevent class transitions.\n Object.seal(tNode);\n }\n return tNode;\n}\n\n/** Mode for capturing node bindings. */\nconst enum CaptureNodeBindingMode {\n Inputs,\n Outputs,\n}\n\n/**\n * Captures node input bindings for the given directive based on the inputs metadata.\n * This will be called multiple times to combine inputs from various directives on a node.\n *\n * The host binding alias map is used to alias and filter out properties for host directives.\n * If the mapping is provided, it'll act as an allowlist, as well as a mapping of what public\n * name inputs/outputs should be exposed under.\n */\nfunction captureNodeBindings<T>(\n mode: CaptureNodeBindingMode.Inputs,\n inputs: DirectiveDef<T>['inputs'],\n directiveIndex: number,\n bindingsResult: NodeInputBindings | null,\n hostDirectiveAliasMap: HostDirectiveBindingMap | null,\n): NodeInputBindings | null;\n/**\n * Captures node output bindings for the given directive based on the output metadata.\n * This will be called multiple times to combine inputs from various directives on a node.\n *\n * The host binding alias map is used to alias and filter out properties for host directives.\n * If the mapping is provided, it'll act as an allowlist, as well as a mapping of what public\n * name inputs/outputs should be exposed under.\n */\nfunction captureNodeBindings<T>(\n mode: CaptureNodeBindingMode.Outputs,\n outputs: DirectiveDef<T>['outputs'],\n directiveIndex: number,\n bindingsResult: NodeOutputBindings | null,\n hostDirectiveAliasMap: HostDirectiveBindingMap | null,\n): NodeOutputBindings | null;\n\nfunction captureNodeBindings<T>(\n mode: CaptureNodeBindingMode,\n aliasMap: DirectiveDef<T>['inputs'] | DirectiveDef<T>['outputs'],\n directiveIndex: number,\n bindingsResult: NodeInputBindings | NodeOutputBindings | null,\n hostDirectiveAliasMap: HostDirectiveBindingMap | null,\n): NodeInputBindings | NodeOutputBindings | null {\n for (let publicName in aliasMap) {\n if (!aliasMap.hasOwnProperty(publicName)) {\n continue;\n }\n\n const value = aliasMap[publicName];\n if (value === undefined) {\n continue;\n }\n\n bindingsResult ??= {};\n\n let internalName: string;\n let inputFlags = InputFlags.None;\n\n // For inputs, the value might be an array capturing additional\n // input flags.\n if (Array.isArray(value)) {\n internalName = value[0];\n inputFlags = value[1];\n } else {\n internalName = value;\n }\n\n // If there are no host directive mappings, we want to remap using the alias map from the\n // definition itself. If there is an alias map, it has two functions:\n // 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the\n // ones inside the host directive map will be exposed on the host.\n // 2. The public name of the property is aliased using the host directive alias map, rather\n // than the alias map from the definition.\n let finalPublicName: string = publicName;\n if (hostDirectiveAliasMap !== null) {\n // If there is no mapping, it's not part of the allowlist and this input/output\n // is not captured and should be ignored.\n if (!hostDirectiveAliasMap.hasOwnProperty(publicName)) {\n continue;\n }\n finalPublicName = hostDirectiveAliasMap[publicName];\n }\n\n if (mode === CaptureNodeBindingMode.Inputs) {\n addPropertyBinding(\n bindingsResult as NodeInputBindings,\n directiveIndex,\n finalPublicName,\n internalName,\n inputFlags,\n );\n } else {\n addPropertyBinding(\n bindingsResult as NodeOutputBindings,\n directiveIndex,\n finalPublicName,\n internalName,\n );\n }\n }\n return bindingsResult;\n}\n\nfunction addPropertyBinding(\n bindings: NodeInputBindings,\n directiveIndex: number,\n publicName: string,\n internalName: string,\n inputFlags: InputFlags,\n): void;\nfunction addPropertyBinding(\n bindings: NodeOutputBindings,\n directiveIndex: number,\n publicName: string,\n internalName: string,\n): void;\n\nfunction addPropertyBinding(\n bindings: NodeInputBindings | NodeOutputBindings,\n directiveIndex: number,\n publicName: string,\n internalName: string,\n inputFlags?: InputFlags,\n) {\n let values: (typeof bindings)[typeof publicName];\n\n if (bindings.hasOwnProperty(publicName)) {\n (values = bindings[publicName]).push(directiveIndex, internalName);\n } else {\n values = bindings[publicName] = [directiveIndex, internalName];\n }\n\n if (inputFlags !== undefined) {\n (values as NodeInputBindings[typeof publicName]).push(inputFlags);\n }\n}\n\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(\n tView: TView,\n tNode: TNode,\n hostDirectiveDefinitionMap: HostDirectiveDefs | null,\n): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const tViewData = tView.data;\n\n const tNodeAttrs = tNode.attrs;\n const inputsFromAttrs: InitialInputData = [];\n let inputsStore: NodeInputBindings | null = null;\n let outputsStore: NodeOutputBindings | null = null;\n\n for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n const directiveDef = tViewData[directiveIndex] as DirectiveDef<any>;\n const aliasData = hostDirectiveDefinitionMap\n ? hostDirectiveDefinitionMap.get(directiveDef)\n : null;\n const aliasedInputs = aliasData ? aliasData.inputs : null;\n const aliasedOutputs = aliasData ? aliasData.outputs : null;\n\n inputsStore = captureNodeBindings(\n CaptureNodeBindingMode.Inputs,\n directiveDef.inputs,\n directiveIndex,\n inputsStore,\n aliasedInputs,\n );\n outputsStore = captureNodeBindings(\n CaptureNodeBindingMode.Outputs,\n directiveDef.outputs,\n directiveIndex,\n outputsStore,\n aliasedOutputs,\n );\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n const initialInputs =\n inputsStore !== null && tNodeAttrs !== null && !isInlineTemplate(tNode)\n ? generateInitialInputs(inputsStore, directiveIndex, tNodeAttrs)\n : null;\n inputsFromAttrs.push(initialInputs);\n }\n\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= TNodeFlags.hasClassInput;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= TNodeFlags.hasStyleInput;\n }\n }\n\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name: string): string {\n if (name === 'class') return 'className';\n if (name === 'for') return 'htmlFor';\n if (name === 'formaction') return 'formAction';\n if (name === 'innerHtml') return 'innerHTML';\n if (name === 'readonly') return 'readOnly';\n if (name === 'tabindex') return 'tabIndex';\n return name;\n}\n\nexport function elementPropertyInternal<T>(\n tView: TView,\n tNode: TNode,\n lView: LView,\n propName: string,\n value: T,\n renderer: Renderer,\n sanitizer: SanitizerFn | null | undefined,\n nativeOnly: boolean,\n): void {\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n const element = getNativeByTNode(tNode, lView) as RElement | RComment;\n let inputData = tNode.inputs;\n let dataValue: NodeInputBindings[typeof propName] | undefined;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n } else if (tNode.type & TNodeType.AnyRNode) {\n propName = mapPropName(propName);\n\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n ngDevMode.rendererSetProperty++;\n }\n\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? (sanitizer(value, tNode.value || '', propName) as any) : value;\n renderer.setProperty(element as RElement, propName, value);\n } else if (tNode.type & TNodeType.AnyContainer) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n }\n }\n}\n\n/** If node is an OnPush component, marks its LView dirty. */\nexport function markDirtyIfOnPush(lView: LView, viewIndex: number): void {\n ngDevMode && assertLView(lView);\n const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & LViewFlags.CheckAlways)) {\n childComponentLView[FLAGS] |= LViewFlags.Dirty;\n }\n}\n\nfunction setNgReflectProperty(\n lView: LView,\n element: RElement | RComment,\n type: TNodeType,\n attrName: string,\n value: any,\n) {\n const renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n const debugValue = normalizeDebugBindingValue(value);\n if (type & TNodeType.AnyRNode) {\n if (value == null) {\n renderer.removeAttribute(element as RElement, attrName);\n } else {\n renderer.setAttribute(element as RElement, attrName, debugValue);\n }\n } else {\n const textContent = escapeCommentText(\n `bindings=${JSON.stringify({[attrName]: debugValue}, null, 2)}`,\n );\n renderer.setValue(element as RComment, textContent);\n }\n}\n\nexport function setNgReflectProperties(\n lView: LView,\n element: RElement | RComment,\n type: TNodeType,\n dataValue: NodeInputBindings[string],\n value: any,\n) {\n if (type & (TNodeType.AnyRNode | TNodeType.Container)) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (let i = 0; i < dataValue.length; i += 3) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1] as string, value);\n }\n }\n}\n\n/**\n * Resolve the matched directives on a node.\n */\nexport function resolveDirectives(\n tView: TView,\n lView: LView,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n localRefs: string[] | null,\n): void {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n\n if (getBindingsEnabled()) {\n const exportsMap: {[key: string]: number} | null = localRefs === null ? null : {'': -1};\n const matchResult = findDirectiveDefMatches(tView, tNode);\n let directiveDefs: DirectiveDef<unknown>[] | null;\n let hostDirectiveDefs: HostDirectiveDefs | null;\n\n if (matchResult === null) {\n directiveDefs = hostDirectiveDefs = null;\n } else {\n [directiveDefs, hostDirectiveDefs] = matchResult;\n }\n\n if (directiveDefs !== null) {\n initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);\n }\n if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n}\n\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nexport function initializeDirectives(\n tView: TView,\n lView: LView<unknown>,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n directives: DirectiveDef<unknown>[],\n exportsMap: {[key: string]: number} | null,\n hostDirectiveDefs: HostDirectiveDefs | null,\n) {\n ngDevMode && assertFirstCreatePass(tView);\n\n // Publishes the directive types to DI so they can be injected. Needs to\n // happen in a separate pass before the TNode flags have been initialized.\n for (let i = 0; i < directives.length; i++) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, directives[i].type);\n }\n\n initTNodeFlags(tNode, tView.data.length, directives.length);\n\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n if (def.providersResolver) def.providersResolver(def);\n }\n let preOrderHooksFound = false;\n let preOrderCheckHooksFound = false;\n let directiveIdx = allocExpando(tView, lView, directives.length, null);\n ngDevMode &&\n assertSame(\n directiveIdx,\n tNode.directiveStart,\n 'TNode.directiveStart should point to just allocated space',\n );\n\n for (let i = 0; i < directives.length; i++) {\n const def = directives[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n\n configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n saveNameToExportMap(directiveIdx, def, exportsMap);\n\n if (def.contentQueries !== null) tNode.flags |= TNodeFlags.hasContentQuery;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= TNodeFlags.hasHostBindings;\n\n const lifeCycleHooks: Partial<OnChanges & OnInit & DoCheck> = def.type.prototype;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (\n !preOrderHooksFound &&\n (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)\n ) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks ??= []).push(tNode.index);\n preOrderHooksFound = true;\n }\n\n if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n (tView.preOrderCheckHooks ??= []).push(tNode.index);\n preOrderCheckHooksFound = true;\n }\n\n directiveIdx++;\n }\n\n initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nexport function registerHostBindingOpCodes(\n tView: TView,\n tNode: TNode,\n directiveIdx: number,\n directiveVarsIdx: number,\n def: ComponentDef<any> | DirectiveDef<any>,\n): void {\n ngDevMode && assertFirstCreatePass(tView);\n\n const hostBindings = def.hostBindings;\n if (hostBindings) {\n let hostBindingOpCodes = tView.hostBindingOpCodes;\n if (hostBindingOpCodes === null) {\n hostBindingOpCodes = tView.hostBindingOpCodes = [] as any as HostBindingOpCodes;\n }\n const elementIndx = ~tNode.index;\n if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n // Conditionally add select element so that we are more efficient in execution.\n // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n // (We could just always add it.)\n hostBindingOpCodes.push(elementIndx);\n }\n hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n }\n}\n\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n return value;\n }\n }\n return 0;\n}\n\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(\n tView: TView,\n lView: LView,\n tNode: TDirectiveHostNode,\n native: RNode,\n) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n\n // The component view needs to be created before creating the node injector\n // since it is used to inject some special symbols like `ChangeDetectorRef`.\n if (isComponentHost(tNode)) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n addComponentLogic(\n lView,\n tNode as TElementNode,\n tView.data[start + tNode.componentOffset] as ComponentDef<unknown>,\n );\n }\n\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n\n attachPatchData(native, lView);\n\n const initialInputs = tNode.initialInputs;\n for (let i = start; i < end; i++) {\n const def = tView.data[i] as DirectiveDef<any>;\n const directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs!);\n }\n\n if (isComponentDef(def)) {\n const componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n }\n }\n}\n\nexport function invokeDirectivesHostBindings(tView: TView, lView: LView, tNode: TNode) {\n const start = tNode.directiveStart;\n const end = tNode.directiveEnd;\n const elementIndex = tNode.index;\n const currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (let dirIndex = start; dirIndex < end; dirIndex++) {\n const def = tView.data[dirIndex] as DirectiveDef<unknown>;\n const directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n }\n } finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nexport function invokeHostBindingsInCreationMode(def: DirectiveDef<any>, directive: any) {\n if (def.hostBindings !== null) {\n def.hostBindings!(RenderFlags.Create, directive);\n }\n}\n\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(\n tView: TView,\n tNode: TElementNode | TContainerNode | TElementContainerNode,\n): [matches: DirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs | null] | null {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n const registry = tView.directiveRegistry;\n let matches: DirectiveDef<unknown>[] | null = null;\n let hostDirectiveDefs: HostDirectiveDefs | null = null;\n if (registry) {\n for (let i = 0; i < registry.length; i++) {\n const def = registry[i] as ComponentDef<any> | DirectiveDef<any>;\n if (isNodeMatchingSelectorList(tNode, def.selectors!, /* isProjectionMode */ false)) {\n matches || (matches = []);\n\n if (isComponentDef(def)) {\n if (ngDevMode) {\n assertTNodeType(\n tNode,\n TNodeType.Element,\n `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n `Please use a different tag to activate the ${stringify(def.type)} component.`,\n );\n\n if (isComponentHost(tNode)) {\n throwMultipleComponentError(tNode, matches.find(isComponentDef)!.type, def.type);\n }\n }\n\n // Components are inserted at the front of the matches array so that their lifecycle\n // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n // compatibility. This logic doesn't make sense with host directives, because it\n // would allow the host directives to undo any overrides the host may have made.\n // To handle this case, the host directives of components are inserted at the beginning\n // of the array, followed by the component. As such, the insertion order is as follows:\n // 1. Host directives belonging to the selector-matched component.\n // 2. Selector-matched component.\n // 3. Host directives belonging to selector-matched directives.\n // 4. Selector-matched directives.\n if (def.findHostDirectiveDefs !== null) {\n const hostDirectiveMatches: DirectiveDef<unknown>[] = [];\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);\n // Add all host directives declared on this component, followed by the component itself.\n // Host directives should execute first so the host has a chance to override changes\n // to the DOM made by them.\n matches.unshift(...hostDirectiveMatches, def);\n // Component is offset starting from the beginning of the host directives array.\n const componentOffset = hostDirectiveMatches.length;\n markAsComponentHost(tView, tNode, componentOffset);\n } else {\n // No host directives on this component, just add the\n // component def to the beginning of the matches.\n matches.unshift(def);\n markAsComponentHost(tView, tNode, 0);\n }\n } else {\n // Append any host directives to the matches first.\n hostDirectiveDefs = hostDirectiveDefs || new Map();\n def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);\n matches.push(def);\n }\n }\n }\n }\n ngDevMode && matches !== null && assertNoDuplicateDirectives(matches);\n return matches === null ? null : [matches, hostDirectiveDefs];\n}\n\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nexport function markAsComponentHost(tView: TView, hostTNode: TNode, componentOffset: number): void {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n hostTNode.componentOffset = componentOffset;\n (tView.components ??= []).push(hostTNode.index);\n}\n\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(\n tNode: TNode,\n localRefs: string[] | null,\n exportsMap: {[key: string]: number},\n): void {\n if (localRefs) {\n const localNames: (string | number)[] = (tNode.localNames = []);\n\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (let i = 0; i < localRefs.length; i += 2) {\n const index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new RuntimeError(\n RuntimeErrorCode.EXPORT_NOT_FOUND,\n ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`,\n );\n localNames.push(localRefs[i], index);\n }\n }\n}\n\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(\n directiveIdx: number,\n def: DirectiveDef<any> | ComponentDef<any>,\n exportsMap: {[key: string]: number} | null,\n) {\n if (exportsMap) {\n if (def.exportAs) {\n for (let i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = directiveIdx;\n }\n }\n if (isComponentDef(def)) exportsMap[''] = directiveIdx;\n }\n}\n\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nexport function initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) {\n ngDevMode &&\n assertNotEqual(\n numberOfDirectives,\n tNode.directiveEnd - tNode.directiveStart,\n 'Reached the max number of directives',\n );\n tNode.flags |= TNodeFlags.isDirectiveHost;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\n\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nexport function configureViewWithDirective<T>(\n tView: TView,\n tNode: TNode,\n lView: LView,\n directiveIndex: number,\n def: DirectiveDef<T>,\n): void {\n ngDevMode &&\n assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n tView.data[directiveIndex] = def;\n const directiveFactory =\n def.factory || ((def as Writable<DirectiveDef<T>>).factory = getFactoryDef(def.type, true));\n // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n // we also want to support `inject()` directly from the directive constructor context so we set\n // `ɵɵdirectiveInject` as the inject implementation here too.\n const nodeInjectorFactory = new NodeInjectorFactory(\n directiveFactory,\n isComponentDef(def),\n ɵɵdirectiveInject,\n );\n tView.blueprint[directiveIndex] = nodeInjectorFactory;\n lView[directiveIndex] = nodeInjectorFactory;\n\n registerHostBindingOpCodes(\n tView,\n tNode,\n directiveIndex,\n allocExpando(tView, lView, def.hostVars, NO_CHANGE),\n def,\n );\n}\n\nfunction addComponentLogic<T>(lView: LView, hostTNode: TElementNode, def: ComponentDef<T>): void {\n const native = getNativeByTNode(hostTNode, lView) as RElement;\n const tView = getOrCreateComponentTView(def);\n\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n const rendererFactory = lView[ENVIRONMENT].rendererFactory;\n let lViewFlags = LViewFlags.CheckAlways;\n if (def.signals) {\n lViewFlags = LViewFlags.SignalView;\n } else if (def.onPush) {\n lViewFlags = LViewFlags.Dirty;\n }\n const componentView = addToViewTree(\n lView,\n createLView(\n lView,\n tView,\n null,\n lViewFlags,\n native,\n hostTNode as TElementNode,\n null,\n rendererFactory.createRenderer(native, def),\n null,\n null,\n null,\n ),\n );\n\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[hostTNode.index] = componentView;\n}\n\nexport function elementAttributeInternal(\n tNode: TNode,\n lView: LView,\n name: string,\n value: any,\n sanitizer: SanitizerFn | null | undefined,\n namespace: string | null | undefined,\n) {\n if (ngDevMode) {\n assertNotSame(value, NO_CHANGE as any, 'Incoming value should never be NO_CHANGE.');\n validateAgainstEventAttributes(name);\n assertTNodeType(\n tNode,\n TNodeType.Element,\n `Attempted to set attribute \\`${name}\\` on a container node. ` +\n `Host bindings are not valid on ng-container or ng-template.`,\n );\n }\n const element = getNativeByTNode(tNode, lView) as RElement;\n setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\n\nexport function setElementAttribute(\n renderer: Renderer,\n element: RElement,\n namespace: string | null | undefined,\n tagName: string | null,\n name: string,\n value: any,\n sanitizer: SanitizerFn | null | undefined,\n) {\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n renderer.removeAttribute(element, name, namespace);\n } else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue =\n sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n\n renderer.setAttribute(element, name, strValue as string, namespace);\n }\n}\n\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs<T>(\n lView: LView,\n directiveIndex: number,\n instance: T,\n def: DirectiveDef<T>,\n tNode: TNode,\n initialInputData: InitialInputData,\n): void {\n const initialInputs: InitialInputs | null = initialInputData![directiveIndex];\n if (initialInputs !== null) {\n for (let i = 0; i < initialInputs.length; ) {\n const publicName = initialInputs[i++] as string;\n const privateName = initialInputs[i++] as string;\n const flags = initialInputs[i++] as InputFlags;\n const value = initialInputs[i++] as string;\n\n writeToDirectiveInput<T>(def, instance, publicName, privateName, flags, value);\n\n if (ngDevMode) {\n const nativeElement = getNativeByTNode(tNode, lView) as RElement;\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n}\n\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs Input alias map that was generated from the directive def inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n * @param attrs Static attrs on this node.\n */\nfunction generateInitialInputs(\n inputs: NodeInputBindings,\n directiveIndex: number,\n attrs: TAttributes,\n): InitialInputs | null {\n let inputsToStore: InitialInputs | null = null;\n let i = 0;\n while (i < attrs.length) {\n const attrName = attrs[i];\n if (attrName === AttributeMarker.NamespaceURI) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n } else if (attrName === AttributeMarker.ProjectAs) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number') break;\n\n if (inputs.hasOwnProperty(attrName as string)) {\n if (inputsToStore === null) inputsToStore = [];\n\n // Find the input's public name from the input store. Note that we can be found easier\n // through the directive def, but we want to do it using the inputs store so that it can\n // account for host directive aliases.\n const inputConfig = inputs[attrName as string];\n for (let j = 0; j < inputConfig.length; j += 3) {\n if (inputConfig[j] === directiveIndex) {\n inputsToStore.push(\n attrName as string,\n inputConfig[j + 1] as string,\n inputConfig[j + 2] as InputFlags,\n attrs[i + 1] as string,\n );\n // A directive can't have multiple inputs with the same name so we can break here.\n break;\n }\n }\n }\n\n i += 2;\n }\n return inputsToStore;\n}\n\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nexport function createLContainer(\n hostNative: RElement | RComment | LView,\n currentView: LView,\n native: RComment,\n tNode: TNode,\n): LContainer {\n ngDevMode && assertLView(currentView);\n const lContainer: LContainer = [\n hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n 0, // flags\n currentView, // parent\n null, // next\n tNode, // t_host\n null, // dehydrated views\n native, // native,\n null, // view refs\n null, // moved views\n ];\n ngDevMode &&\n assertEqual(\n lContainer.length,\n CONTAINER_HEADER_OFFSET,\n 'Should allocate correct number of slots for LContainer header.',\n );\n return lContainer;\n}\n\n/** Refreshes all content queries declared by directives in a given view */\nexport function refreshContentQueries(tView: TView, lView: LView): void {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n const prevConsumer = setActiveConsumer(null);\n try {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx] as DirectiveDef<any>;\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries!(RenderFlags.Update, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nexport function addToViewTree<T extends LView | LContainer>(lView: LView, lViewOrLContainer: T): T {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL]![NEXT] = lViewOrLContainer;\n } else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n}\n\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n\nexport function executeViewQueryFn<T>(\n flags: RenderFlags,\n viewQueryFn: ViewQueriesFunction<T>,\n component: T,\n): void {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n const prevConsumer = setActiveConsumer(null);\n try {\n viewQueryFn(flags, component);\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nexport function storePropertyBindingMetadata(\n tData: TData,\n tNode: TNode,\n propertyName: string,\n bindingIndex: number,\n ...interpolationParts: string[]\n) {\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n let bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\n\nexport function getOrCreateLViewCleanup(view: LView): any[] {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return (view[CLEANUP] ??= []);\n}\n\nexport function getOrCreateTViewCleanup(tView: TView): any[] {\n return (tView.cleanup ??= []);\n}\n\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nexport function loadComponentRenderer(\n currentDef: DirectiveDef<any> | null,\n tNode: TNode,\n lView: LView,\n): Renderer {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index])!;\n }\n return lView[RENDERER];\n}\n\n/** Handles an error thrown in an LView. */\nexport function handleError(lView: LView, error: any): void {\n const injector = lView[INJECTOR];\n const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n}\n\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\nexport function setInputsForProperty(\n tView: TView,\n lView: LView,\n inputs: NodeInputBindings[typeof publicName],\n publicName: string,\n value: unknown,\n): void {\n for (let i = 0; i < inputs.length; ) {\n const index = inputs[i++] as number;\n const privateName = inputs[i++] as string;\n const flags = inputs[i++] as InputFlags;\n const instance = lView[index];\n ngDevMode && assertIndexInRange(lView, index);\n const def = tView.data[index] as DirectiveDef<any>;\n\n writeToDirectiveInput(def, instance, publicName, privateName, flags, value);\n }\n}\n\n/**\n * Updates a text binding at a given index in a given LView.\n */\nexport function textBindingInternal(lView: LView, index: number, value: string): void {\n ngDevMode && assertString(value, 'Value should be a string');\n ngDevMode && assertNotSame(value, NO_CHANGE as any, 'value should not be NO_CHANGE');\n ngDevMode && assertIndexInRange(lView, index);\n const element = getNativeByIndex(index, lView) as any as RText;\n ngDevMode && assertDefined(element, 'native element should exist');\n updateTextNode(lView[RENDERER], element, value);\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.dev/license\n */\n\nimport {retrieveHydrationInfo} from '../../hydration/utils';\nimport {assertEqual, assertNotReactive} from '../../util/assert';\nimport {RenderFlags} from '../interfaces/definition';\nimport {\n CONTEXT,\n FLAGS,\n HOST,\n HYDRATION,\n INJECTOR,\n LView,\n LViewFlags,\n QUERIES,\n TVIEW,\n TView,\n} from '../interfaces/view';\nimport {enterView, leaveView} from '../state';\nimport {getComponentLViewByIndex, isCreationMode} from '../util/view_utils';\n\nimport {executeTemplate, executeViewQueryFn, refreshContentQueries} from './shared';\n\nexport function renderComponent(hostLView: LView, componentHostIdx: number) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n const componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n\n const hostRNode = componentView[HOST];\n // Populate an LView with hydration info retrieved from the DOM via TransferState.\n if (hostRNode !== null && componentView[HYDRATION] === null) {\n componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]!);\n }\n\n renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nexport function syncViewWithBlueprint(tView: TView, lView: LView) {\n for (let i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.blueprint[i]);\n }\n}\n\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nexport function renderView<T>(tView: TView, lView: LView<T>, context: T): void {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n ngDevMode && assertNotReactive(renderView.name);\n enterView(lView);\n try {\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn<T>(RenderFlags.Create, viewQuery, context);\n }\n\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n const templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate<T>(tView, lView, templateFn, RenderFlags.Create, context);\n }\n\n // This needs to be set before children are processed to support recursive components.\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\n }\n\n // Mark all queries active in this view as dirty. This is necessary for signal-based queries to\n // have a clear marking point where we can read query results atomically (for a given view).\n lView[QUERIES]?.finishViewCreation(tView);\n\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn<T>(RenderFlags.Update, tView.viewQuery!, context);\n }\n\n // Render child component views.\n const components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n } catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n tView.firstCreatePass = false;\n }\n\n throw error;\n } finally {\n lView[FLAGS] &= ~LViewFlags.CreationMode;\n leaveView();\n }\n}\n\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView: LView, components: number[]): void {\n for (let i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {Injector} from '../di/injector';\nimport {DehydratedContainerView} from '../hydration/interfaces';\nimport {hasInSkipHydrationBlockFlag} from '../hydration/skip_hydration';\nimport {assertDefined} from '../util/assert';\n\nimport {assertLContainer, assertLView, assertTNodeForLView} from './assert';\nimport {renderView} from './instructions/render';\nimport {createLView} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from './interfaces/container';\nimport {TNode} from './interfaces/node';\nimport {RComment, RElement} from './interfaces/renderer_dom';\nimport {\n DECLARATION_LCONTAINER,\n FLAGS,\n HYDRATION,\n LView,\n LViewFlags,\n QUERIES,\n RENDERER,\n T_HOST,\n TVIEW,\n} from './interfaces/view';\nimport {\n addViewToDOM,\n destroyLView,\n detachView,\n getBeforeNodeForView,\n insertView,\n nativeParentNode,\n} from './node_manipulation';\n\nexport function createAndRenderEmbeddedLView<T>(\n declarationLView: LView<unknown>,\n templateTNode: TNode,\n context: T,\n options?: {\n injector?: Injector;\n embeddedViewInjector?: Injector;\n dehydratedView?: DehydratedContainerView | null;\n },\n): LView<T> {\n const prevConsumer = setActiveConsumer(null);\n try {\n const embeddedTView = templateTNode.tView!;\n ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');\n ngDevMode && assertTNodeForLView(templateTNode, declarationLView);\n\n // Embedded views follow the change detection strategy of the view they're declared in.\n const isSignalView = declarationLView[FLAGS] & LViewFlags.SignalView;\n const viewFlags = isSignalView ? LViewFlags.SignalView : LViewFlags.CheckAlways;\n const embeddedLView = createLView<T>(\n declarationLView,\n embeddedTView,\n context,\n viewFlags,\n null,\n templateTNode,\n null,\n null,\n options?.injector ?? null,\n options?.embeddedViewInjector ?? null,\n options?.dehydratedView ?? null,\n );\n\n const declarationLContainer = declarationLView[templateTNode.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n\n const declarationViewLQueries = declarationLView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n\n // execute creation mode of a view\n renderView(embeddedTView, embeddedLView, context);\n\n return embeddedLView;\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\nexport function getLViewFromLContainer<T>(\n lContainer: LContainer,\n index: number,\n): LView<T> | undefined {\n const adjustedIndex = CONTAINER_HEADER_OFFSET + index;\n // avoid reading past the array boundaries\n if (adjustedIndex < lContainer.length) {\n const lView = lContainer[adjustedIndex];\n ngDevMode && assertLView(lView);\n return lView as LView<T>;\n }\n return undefined;\n}\n\n/**\n * Returns whether an elements that belong to a view should be\n * inserted into the DOM. For client-only cases, DOM elements are\n * always inserted. For hydration cases, we check whether serialized\n * info is available for a view and the view is not in a \"skip hydration\"\n * block (in which case view contents was re-created, thus needing insertion).\n */\nexport function shouldAddViewToDom(\n tNode: TNode,\n dehydratedView?: DehydratedContainerView | null,\n): boolean {\n return (\n !dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode)\n );\n}\n\nexport function addLViewToLContainer(\n lContainer: LContainer,\n lView: LView<unknown>,\n index: number,\n addToDOM = true,\n): void {\n const tView = lView[TVIEW];\n\n // Insert into the view tree so the new view can be change-detected\n insertView(tView, lView, lContainer, index);\n\n // Insert elements that belong to this view into the DOM tree\n if (addToDOM) {\n const beforeNode = getBeforeNodeForView(index, lContainer);\n const renderer = lView[RENDERER];\n const parentRNode = nativeParentNode(renderer, lContainer[NATIVE] as RElement | RComment);\n if (parentRNode !== null) {\n addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n }\n }\n\n // When in hydration mode, reset the pointer to the first child in\n // the dehydrated view. This indicates that the view was hydrated and\n // further attaching/detaching should work with this view as normal.\n const hydrationInfo = lView[HYDRATION];\n if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {\n hydrationInfo.firstChild = null;\n }\n}\n\nexport function removeLViewFromLContainer(\n lContainer: LContainer,\n index: number,\n): LView<unknown> | undefined {\n const lView = detachView(lContainer, index);\n if (lView !== undefined) {\n destroyLView(lView[TVIEW], lView);\n }\n return lView;\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.dev/license\n */\n\nimport {assertParentView} from './assert';\nimport {icuContainerIterate} from './i18n/i18n_tree_shaking';\nimport {CONTAINER_HEADER_OFFSET, LContainer, NATIVE} from './interfaces/container';\nimport {TIcuContainerNode, TNode, TNodeType} from './interfaces/node';\nimport {RNode} from './interfaces/renderer_dom';\nimport {isLContainer} from './interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, HOST, LView, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getProjectionNodes} from './node_manipulation';\nimport {getLViewParent, unwrapRNode} from './util/view_utils';\n\nexport function collectNativeNodes(\n tView: TView,\n lView: LView,\n tNode: TNode | null,\n result: any[],\n isProjection: boolean = false,\n): any[] {\n while (tNode !== null) {\n // Let declarations don't have corresponding DOM nodes so we skip over them.\n if (tNode.type === TNodeType.LetDeclaration) {\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n continue;\n }\n\n ngDevMode &&\n assertTNodeType(\n tNode,\n TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Projection | TNodeType.Icu,\n );\n\n const lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n collectNativeNodesInLContainer(lNode, result);\n }\n\n const tNodeType = tNode.type;\n if (tNodeType & TNodeType.ElementContainer) {\n collectNativeNodes(tView, lView, tNode.child, result);\n } else if (tNodeType & TNodeType.Icu) {\n const nextRNode = icuContainerIterate(tNode as TIcuContainerNode, lView);\n let rNode: RNode | null;\n while ((rNode = nextRNode())) {\n result.push(rNode);\n }\n } else if (tNodeType & TNodeType.Projection) {\n const nodesInSlot = getProjectionNodes(lView, tNode);\n if (Array.isArray(nodesInSlot)) {\n result.push(...nodesInSlot);\n } else {\n const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW])!;\n ngDevMode && assertParentView(parentView);\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n\n return result;\n}\n\n/**\n * Collects all root nodes in all views in a given LContainer.\n */\nexport function collectNativeNodesInLContainer(lContainer: LContainer, result: any[]) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const lViewInAContainer = lContainer[i];\n const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n\n // When an LContainer is created, the anchor (comment) node is:\n // - (1) either reused in case of an ElementContainer (<ng-container>)\n // - (2) or a new comment node is created\n // In the first case, the anchor comment node would be added to the final\n // list by the code in the `collectNativeNodes` function\n // (see the `result.push(unwrapRNode(lNode))` line), but the second\n // case requires extra handling: the anchor node needs to be added to the\n // final list manually. See additional information in the `createAnchorNode`\n // function in the `view_container_ref.ts`.\n //\n // In the first case, the same reference would be stored in the `NATIVE`\n // and `HOST` slots in an LContainer. Otherwise, this is the second case and\n // we should add an element to the final list.\n if (lContainer[NATIVE] !== lContainer[HOST]) {\n result.push(lContainer[NATIVE]);\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.dev/license\n */\n\nimport {REACTIVE_NODE, ReactiveNode} from '@angular/core/primitives/signals';\n\nimport {\n LView,\n PARENT,\n REACTIVE_TEMPLATE_CONSUMER,\n TVIEW,\n TView,\n TViewType,\n} from './interfaces/view';\nimport {getLViewParent, markAncestorsForTraversal, markViewForRefresh} from './util/view_utils';\nimport {assertDefined} from '../util/assert';\n\nlet freeConsumers: ReactiveNode[] = [];\nexport interface ReactiveLViewConsumer extends ReactiveNode {\n lView: LView | null;\n}\n\n/**\n * Create a new template consumer pointing at the specified LView.\n * Sometimes, a previously created consumer may be reused, in order to save on allocations. In that\n * case, the LView will be updated.\n */\nexport function getOrBorrowReactiveLViewConsumer(lView: LView): ReactiveLViewConsumer {\n return lView[REACTIVE_TEMPLATE_CONSUMER] ?? borrowReactiveLViewConsumer(lView);\n}\n\nfunction borrowReactiveLViewConsumer(lView: LView): ReactiveLViewConsumer {\n const consumer = freeConsumers.pop() ?? Object.create(REACTIVE_LVIEW_CONSUMER_NODE);\n consumer.lView = lView;\n return consumer;\n}\n\nexport function maybeReturnReactiveLViewConsumer(consumer: ReactiveLViewConsumer): void {\n if (consumer.lView![REACTIVE_TEMPLATE_CONSUMER] === consumer) {\n // The consumer got committed.\n return;\n }\n consumer.lView = null;\n freeConsumers.push(consumer);\n}\n\nconst REACTIVE_LVIEW_CONSUMER_NODE: Omit<ReactiveLViewConsumer, 'lView'> = {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerMarkedDirty: (node: ReactiveLViewConsumer) => {\n markAncestorsForTraversal(node.lView!);\n },\n consumerOnSignalRead(this: ReactiveLViewConsumer): void {\n this.lView![REACTIVE_TEMPLATE_CONSUMER] = this;\n },\n};\n\n/**\n * Creates a temporary consumer for use with `LView`s that should not have consumers.\n * If the LView already has a consumer, returns the existing one instead.\n *\n * This is necessary because some APIs may cause change detection directly on an LView\n * that we do not want to have a consumer (Embedded views today). As a result, there\n * would be no active consumer from running change detection on its host component\n * and any signals in the LView template would be untracked. Instead, we create\n * this temporary consumer that marks the first parent that _should_ have a consumer\n * for refresh. Once change detection runs as part of that refresh, we throw away\n * this consumer because its signals will then be tracked by the parent's consumer.\n */\nexport function getOrCreateTemporaryConsumer(lView: LView): ReactiveLViewConsumer {\n const consumer = lView[REACTIVE_TEMPLATE_CONSUMER] ?? Object.create(TEMPORARY_CONSUMER_NODE);\n consumer.lView = lView;\n return consumer;\n}\n\nconst TEMPORARY_CONSUMER_NODE = {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerMarkedDirty: (node: ReactiveLViewConsumer) => {\n let parent = getLViewParent(node.lView!);\n while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW])) {\n parent = getLViewParent(parent);\n }\n if (!parent) {\n // If we can't find an appropriate parent that should have a consumer, we\n // don't have a way of appropriately refreshing this LView as part of application synchronization.\n return;\n }\n\n markViewForRefresh(parent);\n },\n consumerOnSignalRead(this: ReactiveLViewConsumer): void {\n this.lView![REACTIVE_TEMPLATE_CONSUMER] = this;\n },\n};\n\n/**\n * Indicates if the view should get its own reactive consumer node.\n *\n * In the current design, all embedded views share a consumer with the component view. This allows\n * us to refresh at the component level rather than at a per-view level. In addition, root views get\n * their own reactive node because root component will have a host view that executes the\n * component's host bindings. This needs to be tracked in a consumer as well.\n *\n * To get a more granular change detection than per-component, all we would just need to update the\n * condition here so that a given view gets a reactive consumer which can become dirty independently\n * from its parent component. For example embedded views for signal components could be created with\n * a new type \"SignalEmbeddedView\" and the condition here wouldn't even need updating in order to\n * get granular per-view change detection for signal components.\n */\nexport function viewShouldHaveReactiveConsumer(tView: TView) {\n return tView.type !== TViewType.Embedded;\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.dev/license\n */\n\nimport {\n consumerAfterComputation,\n consumerBeforeComputation,\n consumerDestroy,\n consumerPollProducersForChange,\n getActiveConsumer,\n ReactiveNode,\n} from '@angular/core/primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {assertDefined, assertEqual} from '../../util/assert';\nimport {executeCheckHooks, executeInitAndCheckHooks, incrementInitPhaseFlags} from '../hooks';\nimport {CONTAINER_HEADER_OFFSET, LContainerFlags, MOVED_VIEWS} from '../interfaces/container';\nimport {ComponentTemplate, RenderFlags} from '../interfaces/definition';\nimport {\n CONTEXT,\n EFFECTS_TO_SCHEDULE,\n ENVIRONMENT,\n FLAGS,\n InitPhaseState,\n LView,\n LViewFlags,\n REACTIVE_TEMPLATE_CONSUMER,\n TVIEW,\n TView,\n} from '../interfaces/view';\nimport {\n getOrCreateTemporaryConsumer,\n getOrBorrowReactiveLViewConsumer,\n maybeReturnReactiveLViewConsumer,\n ReactiveLViewConsumer,\n viewShouldHaveReactiveConsumer,\n} from '../reactive_lview_consumer';\nimport {\n CheckNoChangesMode,\n enterView,\n isExhaustiveCheckNoChanges,\n isInCheckNoChangesMode,\n isRefreshingViews,\n leaveView,\n setBindingIndex,\n setIsInCheckNoChangesMode,\n setIsRefreshingViews,\n} from '../state';\nimport {getFirstLContainer, getNextLContainer} from '../util/view_traversal_utils';\nimport {\n getComponentLViewByIndex,\n isCreationMode,\n markAncestorsForTraversal,\n markViewForRefresh,\n requiresRefreshOrTraversal,\n resetPreOrderHookFlags,\n viewAttachedToChangeDetector,\n} from '../util/view_utils';\n\nimport {\n executeTemplate,\n executeViewQueryFn,\n handleError,\n processHostBindingOpCodes,\n refreshContentQueries,\n} from './shared';\n\n/**\n * The maximum number of times the change detection traversal will rerun before throwing an error.\n */\nexport const MAXIMUM_REFRESH_RERUNS = 100;\n\nexport function detectChangesInternal(\n lView: LView,\n notifyErrorHandler = true,\n mode = ChangeDetectionMode.Global,\n) {\n const environment = lView[ENVIRONMENT];\n const rendererFactory = environment.rendererFactory;\n\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to invoke renderer factory functions in that mode\n // to avoid any possible side-effects.\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n\n if (!checkNoChangesMode) {\n rendererFactory.begin?.();\n }\n\n try {\n detectChangesInViewWhileDirty(lView, mode);\n } catch (error) {\n if (notifyErrorHandler) {\n handleError(lView, error);\n }\n throw error;\n } finally {\n if (!checkNoChangesMode) {\n rendererFactory.end?.();\n\n // One final flush of the effects queue to catch any effects created in `ngAfterViewInit` or\n // other post-order hooks.\n environment.inlineEffectRunner?.flush();\n }\n }\n}\n\nfunction detectChangesInViewWhileDirty(lView: LView, mode: ChangeDetectionMode) {\n const lastIsRefreshingViewsValue = isRefreshingViews();\n try {\n setIsRefreshingViews(true);\n detectChangesInView(lView, mode);\n\n // We don't need or want to do any looping when in exhaustive checkNoChanges because we\n // already traverse all the views and nothing should change so we shouldn't have to do\n // another pass to pick up new changes.\n if (ngDevMode && isExhaustiveCheckNoChanges()) {\n return;\n }\n\n let retries = 0;\n // If after running change detection, this view still needs to be refreshed or there are\n // descendants views that need to be refreshed due to re-dirtying during the change detection\n // run, detect changes on the view again. We run change detection in `Targeted` mode to only\n // refresh views with the `RefreshView` flag.\n while (requiresRefreshOrTraversal(lView)) {\n if (retries === MAXIMUM_REFRESH_RERUNS) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_CHANGE_DETECTION,\n ngDevMode &&\n 'Infinite change detection while trying to refresh views. ' +\n 'There may be components which each cause the other to require a refresh, ' +\n 'causing an infinite loop.',\n );\n }\n retries++;\n // Even if this view is detached, we still detect changes in targeted mode because this was\n // the root of the change detection run.\n detectChangesInView(lView, ChangeDetectionMode.Targeted);\n }\n } finally {\n // restore state to what it was before entering this change detection loop\n setIsRefreshingViews(lastIsRefreshingViewsValue);\n }\n}\n\nexport function checkNoChangesInternal(\n lView: LView,\n mode: CheckNoChangesMode,\n notifyErrorHandler = true,\n) {\n setIsInCheckNoChangesMode(mode);\n try {\n detectChangesInternal(lView, notifyErrorHandler);\n } finally {\n setIsInCheckNoChangesMode(CheckNoChangesMode.Off);\n }\n}\n\n/**\n * Different modes of traversing the logical view tree during change detection.\n *\n *\n * The change detection traversal algorithm switches between these modes based on various\n * conditions.\n */\nexport const enum ChangeDetectionMode {\n /**\n * In `Global` mode, `Dirty` and `CheckAlways` views are refreshed as well as views with the\n * `RefreshView` flag.\n */\n Global,\n /**\n * In `Targeted` mode, only views with the `RefreshView` flag or updated signals are refreshed.\n */\n Targeted,\n}\n\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\n\nexport function refreshView<T>(\n tView: TView,\n lView: LView,\n templateFn: ComponentTemplate<{}> | null,\n context: T,\n) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n const flags = lView[FLAGS];\n if ((flags & LViewFlags.Destroyed) === LViewFlags.Destroyed) return;\n\n // Check no changes mode is a dev only mode used to verify that bindings have not changed\n // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n const isInExhaustiveCheckNoChangesPass = ngDevMode && isExhaustiveCheckNoChanges();\n\n !isInCheckNoChangesPass && lView[ENVIRONMENT].inlineEffectRunner?.flush();\n\n // Start component reactive context\n // - We might already be in a reactive context if this is an embedded view of the host.\n // - We might be descending into a view that needs a consumer.\n enterView(lView);\n let returnConsumerToPool = true;\n let prevConsumer: ReactiveNode | null = null;\n let currentConsumer: ReactiveLViewConsumer | null = null;\n if (!isInCheckNoChangesPass) {\n if (viewShouldHaveReactiveConsumer(tView)) {\n currentConsumer = getOrBorrowReactiveLViewConsumer(lView);\n prevConsumer = consumerBeforeComputation(currentConsumer);\n } else if (getActiveConsumer() === null) {\n // If the current view should not have a reactive consumer but we don't have an active consumer,\n // we still need to create a temporary consumer to track any signal reads in this template.\n // This is a rare case that can happen with `viewContainerRef.createEmbeddedView(...).detectChanges()`.\n // This temporary consumer marks the first parent that _should_ have a consumer for refresh.\n // Once that refresh happens, the signals will be tracked in the parent consumer and we can destroy\n // the temporary one.\n returnConsumerToPool = false;\n currentConsumer = getOrCreateTemporaryConsumer(lView);\n prevConsumer = consumerBeforeComputation(currentConsumer);\n } else if (lView[REACTIVE_TEMPLATE_CONSUMER]) {\n consumerDestroy(lView[REACTIVE_TEMPLATE_CONSUMER]);\n lView[REACTIVE_TEMPLATE_CONSUMER] = null;\n }\n }\n\n try {\n resetPreOrderHookFlags(lView);\n\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, RenderFlags.Update, context);\n }\n\n const hooksInitPhaseCompleted =\n (flags & LViewFlags.InitPhaseStateMask) === InitPhaseState.InitPhaseCompleted;\n\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n } else {\n const preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, InitPhaseState.OnInitHooksToBeRun, null);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.OnInitHooksToBeRun);\n }\n }\n\n // We do not need to mark transplanted views for refresh when doing exhaustive checks\n // because all views will be reached anyways during the traversal.\n if (!isInExhaustiveCheckNoChangesPass) {\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n }\n detectChangesInEmbeddedViews(lView, ChangeDetectionMode.Global);\n\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n } else {\n const contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(\n lView,\n contentHooks,\n InitPhaseState.AfterContentInitHooksToBeRun,\n );\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterContentInitHooksToBeRun);\n }\n }\n\n processHostBindingOpCodes(tView, lView);\n\n // Refresh child component views.\n const components = tView.components;\n if (components !== null) {\n detectChangesInChildComponents(lView, components, ChangeDetectionMode.Global);\n }\n\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n const viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn<T>(RenderFlags.Update, viewQuery, context);\n }\n\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!isInCheckNoChangesPass) {\n if (hooksInitPhaseCompleted) {\n const viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n } else {\n const viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n incrementInitPhaseFlags(lView, InitPhaseState.AfterViewInitHooksToBeRun);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n\n // Schedule any effects that are waiting on the update pass of this view.\n if (lView[EFFECTS_TO_SCHEDULE]) {\n for (const notifyEffect of lView[EFFECTS_TO_SCHEDULE]) {\n notifyEffect();\n }\n\n // Once they've been run, we can drop the array.\n lView[EFFECTS_TO_SCHEDULE] = null;\n }\n\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!isInCheckNoChangesPass) {\n lView[FLAGS] &= ~(LViewFlags.Dirty | LViewFlags.FirstLViewPass);\n }\n } catch (e) {\n if (!isInCheckNoChangesPass) {\n // If refreshing a view causes an error, we need to remark the ancestors as needing traversal\n // because the error might have caused a situation where views below the current location are\n // dirty but will be unreachable because the \"has dirty children\" flag in the ancestors has been\n // cleared during change detection and we failed to run to completion.\n markAncestorsForTraversal(lView);\n }\n throw e;\n } finally {\n if (currentConsumer !== null) {\n consumerAfterComputation(currentConsumer, prevConsumer);\n if (returnConsumerToPool) {\n maybeReturnReactiveLViewConsumer(currentConsumer);\n }\n }\n leaveView();\n }\n}\n\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction detectChangesInEmbeddedViews(lView: LView, mode: ChangeDetectionMode) {\n for (\n let lContainer = getFirstLContainer(lView);\n lContainer !== null;\n lContainer = getNextLContainer(lContainer)\n ) {\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n const embeddedLView = lContainer[i];\n detectChangesInViewIfAttached(embeddedLView, mode);\n }\n }\n}\n\n/**\n * Mark transplanted views as needing to be refreshed at their attachment points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView: LView) {\n for (\n let lContainer = getFirstLContainer(lView);\n lContainer !== null;\n lContainer = getNextLContainer(lContainer)\n ) {\n if (!(lContainer[FLAGS] & LContainerFlags.HasTransplantedViews)) continue;\n\n const movedViews = lContainer[MOVED_VIEWS]!;\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (let i = 0; i < movedViews.length; i++) {\n const movedLView = movedViews[i]!;\n markViewForRefresh(movedLView);\n }\n }\n}\n\n/**\n * Detects changes in a component by entering the component view and processing its bindings,\n * queries, etc. if it is CheckAlways, OnPush and Dirty, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction detectChangesInComponent(\n hostLView: LView,\n componentHostIdx: number,\n mode: ChangeDetectionMode,\n): void {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n detectChangesInViewIfAttached(componentView, mode);\n}\n\n/**\n * Visits a view as part of change detection traversal.\n *\n * If the view is detached, no additional traversal happens.\n */\nfunction detectChangesInViewIfAttached(lView: LView, mode: ChangeDetectionMode) {\n if (!viewAttachedToChangeDetector(lView)) {\n return;\n }\n detectChangesInView(lView, mode);\n}\n\n/**\n * Visits a view as part of change detection traversal.\n *\n * The view is refreshed if:\n * - If the view is CheckAlways or Dirty and ChangeDetectionMode is `Global`\n * - If the view has the `RefreshView` flag\n *\n * The view is not refreshed, but descendants are traversed in `ChangeDetectionMode.Targeted` if the\n * view HasChildViewsToRefresh flag is set.\n */\nfunction detectChangesInView(lView: LView, mode: ChangeDetectionMode) {\n const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n const tView = lView[TVIEW];\n const flags = lView[FLAGS];\n const consumer = lView[REACTIVE_TEMPLATE_CONSUMER];\n\n // Refresh CheckAlways views in Global mode.\n let shouldRefreshView: boolean = !!(\n mode === ChangeDetectionMode.Global && flags & LViewFlags.CheckAlways\n );\n\n // Refresh Dirty views in Global mode, as long as we're not in checkNoChanges.\n // CheckNoChanges never worked with `OnPush` components because the `Dirty` flag was\n // cleared before checkNoChanges ran. Because there is now a loop for to check for\n // backwards views, it gives an opportunity for `OnPush` components to be marked `Dirty`\n // before the CheckNoChanges pass. We don't want existing errors that are hidden by the\n // current CheckNoChanges bug to surface when making unrelated changes.\n shouldRefreshView ||= !!(\n flags & LViewFlags.Dirty &&\n mode === ChangeDetectionMode.Global &&\n !isInCheckNoChangesPass\n );\n\n // Always refresh views marked for refresh, regardless of mode.\n shouldRefreshView ||= !!(flags & LViewFlags.RefreshView);\n\n // Refresh views when they have a dirty reactive consumer, regardless of mode.\n shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange(consumer));\n\n shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges());\n\n // Mark the Flags and `ReactiveNode` as not dirty before refreshing the component, so that they\n // can be re-dirtied during the refresh process.\n if (consumer) {\n consumer.dirty = false;\n }\n lView[FLAGS] &= ~(LViewFlags.HasChildViewsToRefresh | LViewFlags.RefreshView);\n\n if (shouldRefreshView) {\n refreshView(tView, lView, tView.template, lView[CONTEXT]);\n } else if (flags & LViewFlags.HasChildViewsToRefresh) {\n detectChangesInEmbeddedViews(lView, ChangeDetectionMode.Targeted);\n const components = tView.components;\n if (components !== null) {\n detectChangesInChildComponents(lView, components, ChangeDetectionMode.Targeted);\n }\n }\n}\n\n/** Refreshes child components in the current view (update mode). */\nfunction detectChangesInChildComponents(\n hostLView: LView,\n components: number[],\n mode: ChangeDetectionMode,\n): void {\n for (let i = 0; i < components.length; i++) {\n detectChangesInComponent(hostLView, components[i], mode);\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.dev/license\n */\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {isRootView} from '../interfaces/type_checks';\nimport {ENVIRONMENT, FLAGS, LView, LViewFlags} from '../interfaces/view';\nimport {isRefreshingViews} from '../state';\nimport {getLViewParent} from '../util/view_utils';\n\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nexport function markViewDirty(lView: LView, source: NotificationSource): LView | null {\n const dirtyBitsToUse = isRefreshingViews()\n ? // When we are actively refreshing views, we only use the `Dirty` bit to mark a view\n // for check. This bit is ignored in ChangeDetectionMode.Targeted, which is used to\n // synchronously rerun change detection on a specific set of views (those which have\n // the `RefreshView` flag and those with dirty signal consumers). `LViewFlags.Dirty`\n // does not support re-entrant change detection on its own.\n LViewFlags.Dirty\n : // When we are not actively refreshing a view tree, it is absolutely\n // valid to update state and mark views dirty. We use the `RefreshView` flag in this\n // case to allow synchronously rerunning change detection. This applies today to\n // afterRender hooks as well as animation listeners which execute after detecting\n // changes in a view when the render factory flushes.\n LViewFlags.RefreshView | LViewFlags.Dirty;\n lView[ENVIRONMENT].changeDetectionScheduler?.notify(source);\n while (lView) {\n lView[FLAGS] |= dirtyBitsToUse;\n const parent = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent) {\n return lView;\n }\n // continue otherwise\n lView = parent!;\n }\n return null;\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.dev/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {NotificationSource} from '../change_detection/scheduling/zoneless_scheduling';\nimport type {ApplicationRef} from '../core';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {EmbeddedViewRef} from '../linker/view_ref';\nimport {removeFromArray} from '../util/array_utils';\nimport {assertEqual} from '../util/assert';\n\nimport {collectNativeNodes} from './collect_native_nodes';\nimport {checkNoChangesInternal, detectChangesInternal} from './instructions/change_detection';\nimport {markViewDirty} from './instructions/mark_view_dirty';\nimport {CONTAINER_HEADER_OFFSET, VIEW_REFS} from './interfaces/container';\nimport {isLContainer, isRootView} from './interfaces/type_checks';\nimport {\n CONTEXT,\n DECLARATION_LCONTAINER,\n FLAGS,\n LView,\n LViewFlags,\n PARENT,\n TVIEW,\n} from './interfaces/view';\nimport {\n destroyLView,\n detachMovedView,\n detachView,\n detachViewFromDOM,\n trackMovedView,\n} from './node_manipulation';\nimport {CheckNoChangesMode} from './state';\nimport {storeLViewOnDestroy, updateAncestorTraversalFlagsOnAttach} from './util/view_utils';\n\n// Needed due to tsickle downleveling where multiple `implements` with classes creates\n// multiple @extends in Closure annotations, which is illegal. This workaround fixes\n// the multiple @extends by making the annotation @implements instead\ninterface ChangeDetectorRefInterface extends ChangeDetectorRef {}\n\nexport class ViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorRefInterface {\n private _appRef: ApplicationRef | null = null;\n private _attachedToViewContainer = false;\n\n get rootNodes(): any[] {\n const lView = this._lView;\n const tView = lView[TVIEW];\n return collectNativeNodes(tView, lView, tView.firstChild, []);\n }\n\n constructor(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n public _lView: LView,\n\n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n private _cdRefInjectingView?: LView,\n readonly notifyErrorHandler = true,\n ) {}\n\n get context(): T {\n return this._lView[CONTEXT] as unknown as T;\n }\n\n /**\n * @deprecated Replacing the full context object is not supported. Modify the context\n * directly, or consider using a `Proxy` if you need to replace the full object.\n * // TODO(devversion): Remove this.\n */\n set context(value: T) {\n if (ngDevMode) {\n // Note: We have a warning message here because the `@deprecated` JSDoc will not be picked\n // up for assignments on the setter. We want to let users know about the deprecated usage.\n console.warn(\n 'Angular: Replacing the `context` object of an `EmbeddedViewRef` is deprecated.',\n );\n }\n\n this._lView[CONTEXT] = value as unknown as {};\n }\n\n get destroyed(): boolean {\n return (this._lView[FLAGS] & LViewFlags.Destroyed) === LViewFlags.Destroyed;\n }\n\n destroy(): void {\n if (this._appRef) {\n this._appRef.detachView(this);\n } else if (this._attachedToViewContainer) {\n const parent = this._lView[PARENT];\n if (isLContainer(parent)) {\n const viewRefs = parent[VIEW_REFS] as ViewRef<unknown>[] | null;\n const index = viewRefs ? viewRefs.indexOf(this) : -1;\n if (index > -1) {\n ngDevMode &&\n assertEqual(\n index,\n parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET,\n 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.',\n );\n detachView(parent, index);\n removeFromArray(viewRefs!, index);\n }\n }\n this._attachedToViewContainer = false;\n }\n destroyLView(this._lView[TVIEW], this._lView);\n }\n\n onDestroy(callback: Function) {\n storeLViewOnDestroy(this._lView, callback as () => void);\n }\n\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'app-root',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n markForCheck(): void {\n markViewDirty(this._cdRefInjectingView || this._lView, NotificationSource.MarkForCheck);\n }\n\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n detach(): void {\n this._lView[FLAGS] &= ~LViewFlags.Attached;\n }\n\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'app-root',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n reattach(): void {\n updateAncestorTraversalFlagsOnAttach(this._lView);\n this._lView[FLAGS] |= LViewFlags.Attached;\n }\n\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach} for more information.\n */\n detectChanges(): void {\n // Add `RefreshView` flag to ensure this view is refreshed if not already dirty.\n // `RefreshView` flag is used intentionally over `Dirty` because it gets cleared before\n // executing any of the actual refresh code while the `Dirty` flag doesn't get cleared\n // until the end of the refresh. Using `RefreshView` prevents creating a potential difference\n // in the state of the LViewFlags during template execution.\n this._lView[FLAGS] |= LViewFlags.RefreshView;\n detectChangesInternal(this._lView, this.notifyErrorHandler);\n }\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n checkNoChanges(): void {\n if (ngDevMode) {\n checkNoChangesInternal(\n this._lView,\n CheckNoChangesMode.OnlyDirtyViews,\n this.notifyErrorHandler,\n );\n }\n }\n\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_ATTACHED,\n ngDevMode && 'This view is already attached directly to the ApplicationRef!',\n );\n }\n this._attachedToViewContainer = true;\n }\n\n detachFromAppRef() {\n this._appRef = null;\n const isRoot = isRootView(this._lView);\n const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && !isRoot) {\n detachMovedView(declarationContainer, this._lView);\n }\n detachViewFromDOM(this._lView[TVIEW], this._lView);\n }\n\n attachToAppRef(appRef: ApplicationRef) {\n if (this._attachedToViewContainer) {\n throw new RuntimeError(\n RuntimeErrorCode.VIEW_ALREADY_ATTACHED,\n ngDevMode && 'This view is already attached to a ViewContainer!',\n );\n }\n this._appRef = appRef;\n const isRoot = isRootView(this._lView);\n const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n if (declarationContainer !== null && !isRoot) {\n trackMovedView(declarationContainer, this._lView);\n }\n updateAncestorTraversalFlagsOnAttach(this._lView);\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.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {DehydratedContainerView} from '../hydration/interfaces';\nimport {TContainerNode, TNode, TNodeType} from '../render3/interfaces/node';\nimport {LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {createAndRenderEmbeddedLView} from '../render3/view_manipulation';\nimport {ViewRef as R3_ViewRef} from '../render3/view_ref';\nimport {assertDefined} from '../util/assert';\n\nimport {createElementRef, ElementRef} from './element_ref';\nimport {EmbeddedViewRef} from './view_ref';\n\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see {@link ViewContainerRef}\n *\n * @publicApi\n */\nexport abstract class TemplateRef<C> {\n /**\n * The anchor element in the parent view for this embedded view.\n *\n * The data-binding and [injection contexts](guide/di/dependency-injection-context) of embedded\n * views created from this `TemplateRef` inherit from the contexts of this location.\n *\n * Typically new embedded views are attached to the view container of this location, but in\n * advanced use-cases, the view can be attached to a different container while keeping the\n * data-binding and injection context from the original location.\n *\n */\n // TODO(i): rename to anchor or location\n abstract readonly elementRef: ElementRef;\n\n /**\n * Instantiates an unattached embedded view based on this template.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param injector Injector to be used within the embedded view.\n * @returns The new embedded view object.\n */\n abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;\n\n /**\n * Implementation of the `createEmbeddedView` function.\n *\n * This implementation is internal and allows framework code\n * to invoke it with extra parameters (e.g. for hydration) without\n * affecting public API.\n *\n * @internal\n */\n abstract createEmbeddedViewImpl(\n context: C,\n injector?: Injector,\n dehydratedView?: DehydratedContainerView | null,\n ): EmbeddedViewRef<C>;\n\n /**\n * Returns an `ssrId` associated with a TView, which was used to\n * create this instance of the `TemplateRef`.\n *\n * @internal\n */\n abstract get ssrId(): string | null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => TemplateRef<any> | null = injectTemplateRef;\n}\n\nconst ViewEngineTemplateRef = TemplateRef;\n\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\nconst R3TemplateRef = class TemplateRef<T> extends ViewEngineTemplateRef<T> {\n constructor(\n private _declarationLView: LView,\n private _declarationTContainer: TContainerNode,\n public override elementRef: ElementRef,\n ) {\n super();\n }\n\n /**\n * Returns an `ssrId` associated with a TView, which was used to\n * create this instance of the `TemplateRef`.\n *\n * @internal\n */\n override get ssrId(): string | null {\n return this._declarationTContainer.tView?.ssrId || null;\n }\n\n override createEmbeddedView(context: T, injector?: Injector): EmbeddedViewRef<T> {\n return this.createEmbeddedViewImpl(context, injector);\n }\n\n /**\n * @internal\n */\n override createEmbeddedViewImpl(\n context: T,\n injector?: Injector,\n dehydratedView?: DehydratedContainerView,\n ): EmbeddedViewRef<T> {\n const embeddedLView = createAndRenderEmbeddedLView(\n this._declarationLView,\n this._declarationTContainer,\n context,\n {embeddedViewInjector: injector, dehydratedView},\n );\n return new R3_ViewRef<T>(embeddedLView);\n }\n};\n\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nexport function injectTemplateRef<T>(): TemplateRef<T> | null {\n return createTemplateRef<T>(getCurrentTNode()!, getLView());\n}\n\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nexport function createTemplateRef<T>(hostTNode: TNode, hostLView: LView): TemplateRef<T> | null {\n if (hostTNode.type & TNodeType.Container) {\n ngDevMode && assertDefined(hostTNode.tView, 'TView must be allocated');\n return new R3TemplateRef(\n hostLView,\n hostTNode as TContainerNode,\n createElementRef(hostTNode, hostLView),\n );\n }\n return null;\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.dev/license\n */\n\nimport {NodeNavigationStep, REFERENCE_NODE_BODY, REFERENCE_NODE_HOST} from './interfaces';\n\n/**\n * Regexp that extracts a reference node information from the compressed node location.\n * The reference node is represented as either:\n * - a number which points to an LView slot\n * - the `b` char which indicates that the lookup should start from the `document.body`\n * - the `h` char to start lookup from the component host node (`lView[HOST]`)\n */\nconst REF_EXTRACTOR_REGEXP = new RegExp(\n `^(\\\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`,\n);\n\n/**\n * Helper function that takes a reference node location and a set of navigation steps\n * (from the reference node) to a target node and outputs a string that represents\n * a location.\n *\n * For example, given: referenceNode = 'b' (body) and path = ['firstChild', 'firstChild',\n * 'nextSibling'], the function returns: `bf2n`.\n */\nexport function compressNodeLocation(referenceNode: string, path: NodeNavigationStep[]): string {\n const result: Array<string | number> = [referenceNode];\n for (const segment of path) {\n const lastIdx = result.length - 1;\n if (lastIdx > 0 && result[lastIdx - 1] === segment) {\n // An empty string in a count slot represents 1 occurrence of an instruction.\n const value = (result[lastIdx] || 1) as number;\n result[lastIdx] = value + 1;\n } else {\n // Adding a new segment to the path.\n // Using an empty string in a counter field to avoid encoding `1`s\n // into the path, since they are implicit (e.g. `f1n1` vs `fn`), so\n // it's enough to have a single char in this case.\n result.push(segment, '');\n }\n }\n return result.join('');\n}\n\n/**\n * Helper function that reverts the `compressNodeLocation` and transforms a given\n * string into an array where at 0th position there is a reference node info and\n * after that it contains information (in pairs) about a navigation step and the\n * number of repetitions.\n *\n * For example, the path like 'bf2n' will be transformed to:\n * ['b', 'firstChild', 2, 'nextSibling', 1].\n *\n * This information is later consumed by the code that navigates the DOM to find\n * a given node by its location.\n */\nexport function decompressNodeLocation(\n path: string,\n): [string | number, ...(number | NodeNavigationStep)[]] {\n const matches = path.match(REF_EXTRACTOR_REGEXP)!;\n const [_, refNodeId, refNodeName, rest] = matches;\n // If a reference node is represented by an index, transform it to a number.\n const ref = refNodeId ? parseInt(refNodeId, 10) : refNodeName;\n const steps: (number | NodeNavigationStep)[] = [];\n // Match all segments in a path.\n for (const [_, step, count] of rest.matchAll(/(f|n)(\\d*)/g)) {\n const repeat = parseInt(count, 10) || 1;\n steps.push(step as NodeNavigationStep, repeat);\n }\n return [ref, ...steps];\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.dev/license\n */\n\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {RElement, RNode} from '../render3/interfaces/renderer_dom';\nimport {\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n HOST,\n LView,\n TView,\n} from '../render3/interfaces/view';\nimport {getFirstNativeNode} from '../render3/node_manipulation';\nimport {ɵɵresolveBody} from '../render3/util/misc_utils';\nimport {renderStringify} from '../render3/util/stringify_utils';\nimport {getNativeByTNode, unwrapRNode} from '../render3/util/view_utils';\nimport {assertDefined} from '../util/assert';\n\nimport {compressNodeLocation, decompressNodeLocation} from './compression';\nimport {\n nodeNotFoundAtPathError,\n nodeNotFoundError,\n validateSiblingNodeExists,\n} from './error_handling';\nimport {\n DehydratedView,\n NodeNavigationStep,\n NODES,\n REFERENCE_NODE_BODY,\n REFERENCE_NODE_HOST,\n} from './interfaces';\nimport {calcSerializedContainerSize, getSegmentHead} from './utils';\n\n/** Whether current TNode is a first node in an <ng-container>. */\nfunction isFirstElementInNgContainer(tNode: TNode): boolean {\n return !tNode.prev && tNode.parent?.type === TNodeType.ElementContainer;\n}\n\n/** Returns an instruction index (subtracting HEADER_OFFSET). */\nfunction getNoOffsetIndex(tNode: TNode): number {\n return tNode.index - HEADER_OFFSET;\n}\n\n/**\n * Check whether a given node exists, but is disconnected from the DOM.\n */\nexport function isDisconnectedNode(tNode: TNode, lView: LView) {\n return (\n !(tNode.type & (TNodeType.Projection | TNodeType.LetDeclaration)) &&\n !!lView[tNode.index] &&\n isDisconnectedRNode(unwrapRNode(lView[tNode.index]))\n );\n}\n\n/**\n * Check whether the given node exists, but is disconnected from the DOM.\n *\n * Note: we leverage the fact that we have this information available in the DOM emulation\n * layer (in Domino) for now. Longer-term solution should not rely on the DOM emulation and\n * only use internal data structures and state to compute this information.\n */\nexport function isDisconnectedRNode(rNode: RNode | null) {\n return !!rNode && !(rNode as Node).isConnected;\n}\n\n/**\n * Locate a node in an i18n tree that corresponds to a given instruction index.\n *\n * @param hydrationInfo The hydration annotation data\n * @param noOffsetIndex the instruction index\n * @returns an RNode that corresponds to the instruction index\n */\nexport function locateI18nRNodeByIndex<T extends RNode>(\n hydrationInfo: DehydratedView,\n noOffsetIndex: number,\n): T | null | undefined {\n const i18nNodes = hydrationInfo.i18nNodes;\n if (i18nNodes) {\n return i18nNodes.get(noOffsetIndex) as T | null | undefined;\n }\n return undefined;\n}\n\n/**\n * Attempt to locate an RNode by a path, if it exists.\n *\n * @param hydrationInfo The hydration annotation data\n * @param lView the current lView\n * @param noOffsetIndex the instruction index\n * @returns an RNode that corresponds to the instruction index or null if no path exists\n */\nexport function tryLocateRNodeByPath(\n hydrationInfo: DehydratedView,\n lView: LView<unknown>,\n noOffsetIndex: number,\n): RNode | null {\n const nodes = hydrationInfo.data[NODES];\n const path = nodes?.[noOffsetIndex];\n return path ? locateRNodeByPath(path, lView) : null;\n}\n\n/**\n * Locate a node in DOM tree that corresponds to a given TNode.\n *\n * @param hydrationInfo The hydration annotation data\n * @param tView the current tView\n * @param lView the current lView\n * @param tNode the current tNode\n * @returns an RNode that represents a given tNode\n */\nexport function locateNextRNode<T extends RNode>(\n hydrationInfo: DehydratedView,\n tView: TView,\n lView: LView<unknown>,\n tNode: TNode,\n): T | null {\n const noOffsetIndex = getNoOffsetIndex(tNode);\n let native = locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex);\n\n if (native === undefined) {\n const nodes = hydrationInfo.data[NODES];\n if (nodes?.[noOffsetIndex]) {\n // We know the exact location of the node.\n native = locateRNodeByPath(nodes[noOffsetIndex], lView);\n } else if (tView.firstChild === tNode) {\n // We create a first node in this view, so we use a reference\n // to the first child in this DOM segment.\n native = hydrationInfo.firstChild;\n } else {\n // Locate a node based on a previous sibling or a parent node.\n const previousTNodeParent = tNode.prev === null;\n const previousTNode = (tNode.prev ?? tNode.parent)!;\n ngDevMode &&\n assertDefined(\n previousTNode,\n 'Unexpected state: current TNode does not have a connection ' +\n 'to the previous node or a parent node.',\n );\n if (isFirstElementInNgContainer(tNode)) {\n const noOffsetParentIndex = getNoOffsetIndex(tNode.parent!);\n native = getSegmentHead(hydrationInfo, noOffsetParentIndex);\n } else {\n let previousRElement = getNativeByTNode(previousTNode, lView);\n if (previousTNodeParent) {\n native = (previousRElement as RElement).firstChild;\n } else {\n // If the previous node is an element, but it also has container info,\n // this means that we are processing a node like `<div #vcrTarget>`, which is\n // represented in the DOM as `<div></div>...<!--container-->`.\n // In this case, there are nodes *after* this element and we need to skip\n // all of them to reach an element that we are looking for.\n const noOffsetPrevSiblingIndex = getNoOffsetIndex(previousTNode);\n const segmentHead = getSegmentHead(hydrationInfo, noOffsetPrevSiblingIndex);\n if (previousTNode.type === TNodeType.Element && segmentHead) {\n const numRootNodesToSkip = calcSerializedContainerSize(\n hydrationInfo,\n noOffsetPrevSiblingIndex,\n );\n // `+1` stands for an anchor comment node after all the views in this container.\n const nodesToSkip = numRootNodesToSkip + 1;\n // First node after this segment.\n native = siblingAfter(nodesToSkip, segmentHead);\n } else {\n native = previousRElement.nextSibling;\n }\n }\n }\n }\n }\n return native as T;\n}\n\n/**\n * Skips over a specified number of nodes and returns the next sibling node after that.\n */\nexport function siblingAfter<T extends RNode>(skip: number, from: RNode): T | null {\n let currentNode = from;\n for (let i = 0; i < skip; i++) {\n ngDevMode && validateSiblingNodeExists(currentNode);\n currentNode = currentNode.nextSibling!;\n }\n return currentNode as T;\n}\n\n/**\n * Helper function to produce a string representation of the navigation steps\n * (in terms of `nextSibling` and `firstChild` navigations). Used in error\n * messages in dev mode.\n */\nfunction stringifyNavigationInstructions(instructions: (number | NodeNavigationStep)[]): string {\n const container = [];\n for (let i = 0; i < instructions.length; i += 2) {\n const step = instructions[i];\n const repeat = instructions[i + 1] as number;\n for (let r = 0; r < repeat; r++) {\n container.push(step === NodeNavigationStep.FirstChild ? 'firstChild' : 'nextSibling');\n }\n }\n return container.join('.');\n}\n\n/**\n * Helper function that navigates from a starting point node (the `from` node)\n * using provided set of navigation instructions (within `path` argument).\n */\nfunction navigateToNode(from: Node, instructions: (number | NodeNavigationStep)[]): RNode {\n let node = from;\n for (let i = 0; i < instructions.length; i += 2) {\n const step = instructions[i];\n const repeat = instructions[i + 1] as number;\n for (let r = 0; r < repeat; r++) {\n if (ngDevMode && !node) {\n throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n }\n switch (step) {\n case NodeNavigationStep.FirstChild:\n node = node.firstChild!;\n break;\n case NodeNavigationStep.NextSibling:\n node = node.nextSibling!;\n break;\n }\n }\n }\n if (ngDevMode && !node) {\n throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n }\n return node as RNode;\n}\n\n/**\n * Locates an RNode given a set of navigation instructions (which also contains\n * a starting point node info).\n */\nfunction locateRNodeByPath(path: string, lView: LView): RNode {\n const [referenceNode, ...navigationInstructions] = decompressNodeLocation(path);\n let ref: Element;\n if (referenceNode === REFERENCE_NODE_HOST) {\n ref = lView[DECLARATION_COMPONENT_VIEW][HOST] as unknown as Element;\n } else if (referenceNode === REFERENCE_NODE_BODY) {\n ref = ɵɵresolveBody(\n lView[DECLARATION_COMPONENT_VIEW][HOST] as RElement & {ownerDocument: Document},\n );\n } else {\n const parentElementId = Number(referenceNode);\n ref = unwrapRNode((lView as any)[parentElementId + HEADER_OFFSET]) as Element;\n }\n return navigateToNode(ref, navigationInstructions);\n}\n\n/**\n * Generate a list of DOM navigation operations to get from node `start` to node `finish`.\n *\n * Note: assumes that node `start` occurs before node `finish` in an in-order traversal of the DOM\n * tree. That is, we should be able to get from `start` to `finish` purely by using `.firstChild`\n * and `.nextSibling` operations.\n */\nexport function navigateBetween(start: Node, finish: Node): NodeNavigationStep[] | null {\n if (start === finish) {\n return [];\n } else if (start.parentElement == null || finish.parentElement == null) {\n return null;\n } else if (start.parentElement === finish.parentElement) {\n return navigateBetweenSiblings(start, finish);\n } else {\n // `finish` is a child of its parent, so the parent will always have a child.\n const parent = finish.parentElement!;\n\n const parentPath = navigateBetween(start, parent);\n const childPath = navigateBetween(parent.firstChild!, finish);\n if (!parentPath || !childPath) return null;\n\n return [\n // First navigate to `finish`'s parent\n ...parentPath,\n // Then to its first child.\n NodeNavigationStep.FirstChild,\n // And finally from that node to `finish` (maybe a no-op if we're already there).\n ...childPath,\n ];\n }\n}\n\n/**\n * Calculates a path between 2 sibling nodes (generates a number of `NextSibling` navigations).\n * Returns `null` if no such path exists between the given nodes.\n */\nfunction navigateBetweenSiblings(start: Node, finish: Node): NodeNavigationStep[] | null {\n const nav: NodeNavigationStep[] = [];\n let node: Node | null = null;\n for (node = start; node != null && node !== finish; node = node.nextSibling) {\n nav.push(NodeNavigationStep.NextSibling);\n }\n // If the `node` becomes `null` or `undefined` at the end, that means that we\n // didn't find the `end` node, thus return `null` (which would trigger serialization\n // error to be produced).\n return node == null ? null : nav;\n}\n\n/**\n * Calculates a path between 2 nodes in terms of `nextSibling` and `firstChild`\n * navigations:\n * - the `from` node is a known node, used as an starting point for the lookup\n * (the `fromNodeName` argument is a string representation of the node).\n * - the `to` node is a node that the runtime logic would be looking up,\n * using the path generated by this function.\n */\nexport function calcPathBetween(from: Node, to: Node, fromNodeName: string): string | null {\n const path = navigateBetween(from, to);\n return path === null ? null : compressNodeLocation(fromNodeName, path);\n}\n\n/**\n * Invoked at serialization time (on the server) when a set of navigation\n * instructions needs to be generated for a TNode.\n */\nexport function calcPathForNode(\n tNode: TNode,\n lView: LView,\n excludedParentNodes: Set<number> | null,\n): string {\n let parentTNode = tNode.parent;\n let parentIndex: number | string;\n let parentRNode: RNode;\n let referenceNodeName: string;\n\n // Skip over all parent nodes that are disconnected from the DOM, such nodes\n // can not be used as anchors.\n //\n // This might happen in certain content projection-based use-cases, where\n // a content of an element is projected and used, when a parent element\n // itself remains detached from DOM. In this scenario we try to find a parent\n // element that is attached to DOM and can act as an anchor instead.\n //\n // It can also happen that the parent node should be excluded, for example,\n // because it belongs to an i18n block, which requires paths which aren't\n // relative to other views in an i18n block.\n while (\n parentTNode !== null &&\n (isDisconnectedNode(parentTNode, lView) || excludedParentNodes?.has(parentTNode.index))\n ) {\n parentTNode = parentTNode.parent;\n }\n\n if (parentTNode === null || !(parentTNode.type & TNodeType.AnyRNode)) {\n // If there is no parent TNode or a parent TNode does not represent an RNode\n // (i.e. not a DOM node), use component host element as a reference node.\n parentIndex = referenceNodeName = REFERENCE_NODE_HOST;\n parentRNode = lView[DECLARATION_COMPONENT_VIEW][HOST]!;\n } else {\n // Use parent TNode as a reference node.\n parentIndex = parentTNode.index;\n parentRNode = unwrapRNode(lView[parentIndex]);\n referenceNodeName = renderStringify(parentIndex - HEADER_OFFSET);\n }\n let rNode = unwrapRNode(lView[tNode.index]);\n if (tNode.type & (TNodeType.AnyContainer | TNodeType.Icu)) {\n // For <ng-container> nodes, instead of serializing a reference\n // to the anchor comment node, serialize a location of the first\n // DOM element. Paired with the container size (serialized as a part\n // of `ngh.containers`), it should give enough information for runtime\n // to hydrate nodes in this container.\n const firstRNode = getFirstNativeNode(lView, tNode);\n\n // If container is not empty, use a reference to the first element,\n // otherwise, rNode would point to an anchor comment node.\n if (firstRNode) {\n rNode = firstRNode;\n }\n }\n let path: string | null = calcPathBetween(parentRNode as Node, rNode as Node, referenceNodeName);\n if (path === null && parentRNode !== rNode) {\n // Searching for a path between elements within a host node failed.\n // Trying to find a path to an element starting from the `document.body` instead.\n //\n // Important note: this type of reference is relatively unstable, since Angular\n // may not be able to control parts of the page that the runtime logic navigates\n // through. This is mostly needed to cover \"portals\" use-case (like menus, dialog boxes,\n // etc), where nodes are content-projected (including direct DOM manipulations) outside\n // of the host node. The better solution is to provide APIs to work with \"portals\",\n // at which point this code path would not be needed.\n const body = (parentRNode as Node).ownerDocument!.body as Node;\n path = calcPathBetween(body, rNode as Node, REFERENCE_NODE_BODY);\n\n if (path === null) {\n // If the path is still empty, it's likely that this node is detached and\n // won't be found during hydration.\n throw nodeNotFoundError(lView, tNode);\n }\n }\n return path!;\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.dev/license\n */\n\nimport {inject, Injector} from '../di';\nimport {isRootTemplateMessage} from '../render3/i18n/i18n_util';\nimport {createIcuIterator} from '../render3/instructions/i18n_icu_container_visitor';\nimport {I18nNode, I18nNodeKind, I18nPlaceholderType, TI18n, TIcu} from '../render3/interfaces/i18n';\nimport {isTNodeShape, TNode, TNodeType} from '../render3/interfaces/node';\nimport type {Renderer} from '../render3/interfaces/renderer';\nimport type {RNode} from '../render3/interfaces/renderer_dom';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView, TVIEW} from '../render3/interfaces/view';\nimport {getFirstNativeNode, nativeRemoveNode} from '../render3/node_manipulation';\nimport {unwrapRNode} from '../render3/util/view_utils';\nimport {assertDefined, assertNotEqual} from '../util/assert';\n\nimport type {HydrationContext} from './annotate';\nimport {DehydratedIcuData, DehydratedView, I18N_DATA} from './interfaces';\nimport {isDisconnectedRNode, locateNextRNode, tryLocateRNodeByPath} from './node_lookup_utils';\nimport {isI18nInSkipHydrationBlock} from './skip_hydration';\nimport {IS_I18N_HYDRATION_ENABLED} from './tokens';\nimport {\n getNgContainerSize,\n initDisconnectedNodes,\n isDisconnectedNode,\n isSerializedElementContainer,\n processTextNodeBeforeSerialization,\n} from './utils';\n\nlet _isI18nHydrationSupportEnabled = false;\n\nlet _prepareI18nBlockForHydrationImpl: typeof prepareI18nBlockForHydrationImpl = () => {\n // noop unless `enablePrepareI18nBlockForHydrationImpl` is invoked.\n};\n\nexport function setIsI18nHydrationSupportEnabled(enabled: boolean) {\n _isI18nHydrationSupportEnabled = enabled;\n}\n\nexport function isI18nHydrationSupportEnabled() {\n return _isI18nHydrationSupportEnabled;\n}\n\n/**\n * Prepares an i18n block and its children, located at the given\n * view and instruction index, for hydration.\n *\n * @param lView lView with the i18n block\n * @param index index of the i18n block in the lView\n * @param parentTNode TNode of the parent of the i18n block\n * @param subTemplateIndex sub-template index, or -1 for the main template\n */\nexport function prepareI18nBlockForHydration(\n lView: LView,\n index: number,\n parentTNode: TNode | null,\n subTemplateIndex: number,\n): void {\n _prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex);\n}\n\nexport function enablePrepareI18nBlockForHydrationImpl() {\n _prepareI18nBlockForHydrationImpl = prepareI18nBlockForHydrationImpl;\n}\n\nexport function isI18nHydrationEnabled(injector?: Injector) {\n injector = injector ?? inject(Injector);\n return injector.get(IS_I18N_HYDRATION_ENABLED, false);\n}\n\n/**\n * Collects, if not already cached, all of the indices in the\n * given TView which are children of an i18n block.\n *\n * Since i18n blocks don't introduce a parent TNode, this is necessary\n * in order to determine which indices in a LView are translated.\n */\nexport function getOrComputeI18nChildren(\n tView: TView,\n context: HydrationContext,\n): Set<number> | null {\n let i18nChildren = context.i18nChildren.get(tView);\n if (i18nChildren === undefined) {\n i18nChildren = collectI18nChildren(tView);\n context.i18nChildren.set(tView, i18nChildren);\n }\n return i18nChildren;\n}\n\nfunction collectI18nChildren(tView: TView): Set<number> | null {\n const children = new Set<number>();\n\n function collectI18nViews(node: I18nNode) {\n children.add(node.index);\n\n switch (node.kind) {\n case I18nNodeKind.ELEMENT:\n case I18nNodeKind.PLACEHOLDER: {\n for (const childNode of node.children) {\n collectI18nViews(childNode);\n }\n break;\n }\n\n case I18nNodeKind.ICU: {\n for (const caseNodes of node.cases) {\n for (const caseNode of caseNodes) {\n collectI18nViews(caseNode);\n }\n }\n break;\n }\n }\n }\n\n // Traverse through the AST of each i18n block in the LView,\n // and collect every instruction index.\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n const tI18n = tView.data[i] as TI18n | undefined;\n if (!tI18n || !tI18n.ast) {\n continue;\n }\n\n for (const node of tI18n.ast) {\n collectI18nViews(node);\n }\n }\n\n return children.size === 0 ? null : children;\n}\n\n/**\n * Resulting data from serializing an i18n block.\n */\nexport interface SerializedI18nBlock {\n /**\n * A queue of active ICU cases from a depth-first traversal\n * of the i18n AST. This is serialized to the client in order\n * to correctly associate DOM nodes with i18n nodes during\n * hydration.\n */\n caseQueue: Array<number>;\n\n /**\n * A set of indices in the lView of the block for nodes\n * that are disconnected from the DOM. In i18n, this can\n * happen when using content projection but some nodes are\n * not selected by an <ng-content />.\n */\n disconnectedNodes: Set<number>;\n\n /**\n * A set of indices in the lView of the block for nodes\n * considered \"disjoint\", indicating that we need to serialize\n * a path to the node in order to hydrate it.\n *\n * A node is considered disjoint when its RNode does not\n * directly follow the RNode of the previous i18n node, for\n * example, because of content projection.\n */\n disjointNodes: Set<number>;\n}\n\n/**\n * Attempts to serialize i18n data for an i18n block, located at\n * the given view and instruction index.\n *\n * @param lView lView with the i18n block\n * @param index index of the i18n block in the lView\n * @param context the hydration context\n * @returns the i18n data, or null if there is no relevant data\n */\nexport function trySerializeI18nBlock(\n lView: LView,\n index: number,\n context: HydrationContext,\n): SerializedI18nBlock | null {\n if (!context.isI18nHydrationEnabled) {\n return null;\n }\n\n const tView = lView[TVIEW];\n const tI18n = tView.data[index] as TI18n | undefined;\n if (!tI18n || !tI18n.ast) {\n return null;\n }\n\n const parentTNode = tView.data[tI18n.parentTNodeIndex] as TNode;\n if (parentTNode && isI18nInSkipHydrationBlock(parentTNode)) {\n return null;\n }\n\n const serializedI18nBlock: SerializedI18nBlock = {\n caseQueue: [],\n disconnectedNodes: new Set(),\n disjointNodes: new Set(),\n };\n serializeI18nBlock(lView, serializedI18nBlock, context, tI18n.ast);\n\n return serializedI18nBlock.caseQueue.length === 0 &&\n serializedI18nBlock.disconnectedNodes.size === 0 &&\n serializedI18nBlock.disjointNodes.size === 0\n ? null\n : serializedI18nBlock;\n}\n\nfunction serializeI18nBlock(\n lView: LView,\n serializedI18nBlock: SerializedI18nBlock,\n context: HydrationContext,\n nodes: I18nNode[],\n): Node | null {\n let prevRNode = null;\n for (const node of nodes) {\n const nextRNode = serializeI18nNode(lView, serializedI18nBlock, context, node);\n if (nextRNode) {\n if (isDisjointNode(prevRNode, nextRNode)) {\n serializedI18nBlock.disjointNodes.add(node.index - HEADER_OFFSET);\n }\n prevRNode = nextRNode;\n }\n }\n return prevRNode;\n}\n\n/**\n * Helper to determine whether the given nodes are \"disjoint\".\n *\n * The i18n hydration process walks through the DOM and i18n nodes\n * at the same time. It expects the sibling DOM node of the previous\n * i18n node to be the first node of the next i18n node.\n *\n * In cases of content projection, this won't always be the case. So\n * when we detect that, we mark the node as \"disjoint\", ensuring that\n * we will serialize the path to the node. This way, when we hydrate the\n * i18n node, we will be able to find the correct place to start.\n */\nfunction isDisjointNode(prevNode: Node | null, nextNode: Node) {\n return prevNode && prevNode.nextSibling !== nextNode;\n}\n\n/**\n * Process the given i18n node for serialization.\n * Returns the first RNode for the i18n node to begin hydration.\n */\nfunction serializeI18nNode(\n lView: LView,\n serializedI18nBlock: SerializedI18nBlock,\n context: HydrationContext,\n node: I18nNode,\n): Node | null {\n const maybeRNode = unwrapRNode(lView[node.index]!);\n if (!maybeRNode || isDisconnectedRNode(maybeRNode)) {\n serializedI18nBlock.disconnectedNodes.add(node.index - HEADER_OFFSET);\n return null;\n }\n\n const rNode = maybeRNode as Node;\n switch (node.kind) {\n case I18nNodeKind.TEXT: {\n processTextNodeBeforeSerialization(context, rNode);\n break;\n }\n\n case I18nNodeKind.ELEMENT:\n case I18nNodeKind.PLACEHOLDER: {\n serializeI18nBlock(lView, serializedI18nBlock, context, node.children);\n break;\n }\n\n case I18nNodeKind.ICU: {\n const currentCase = lView[node.currentCaseLViewIndex] as number | null;\n if (currentCase != null) {\n // i18n uses a negative value to signal a change to a new case, so we\n // need to invert it to get the proper value.\n const caseIdx = currentCase < 0 ? ~currentCase : currentCase;\n serializedI18nBlock.caseQueue.push(caseIdx);\n serializeI18nBlock(lView, serializedI18nBlock, context, node.cases[caseIdx]);\n }\n break;\n }\n }\n\n return getFirstNativeNodeForI18nNode(lView, node) as Node | null;\n}\n\n/**\n * Helper function to get the first native node to begin hydrating\n * the given i18n node.\n */\nfunction getFirstNativeNodeForI18nNode(lView: LView, node: I18nNode) {\n const tView = lView[TVIEW];\n const maybeTNode = tView.data[node.index];\n\n if (isTNodeShape(maybeTNode)) {\n // If the node is backed by an actual TNode, we can simply delegate.\n return getFirstNativeNode(lView, maybeTNode);\n } else if (node.kind === I18nNodeKind.ICU) {\n // A nested ICU container won't have an actual TNode. In that case, we can use\n // an iterator to find the first child.\n const icuIterator = createIcuIterator(maybeTNode as TIcu, lView);\n let rNode: RNode | null = icuIterator();\n\n // If the ICU container has no nodes, then we use the ICU anchor as the node.\n return rNode ?? unwrapRNode(lView[node.index]);\n } else {\n // Otherwise, the node is a text or trivial element in an ICU container,\n // and we can just use the RNode directly.\n return unwrapRNode(lView[node.index]) ?? null;\n }\n}\n\n/**\n * Describes shared data available during the hydration process.\n */\ninterface I18nHydrationContext {\n hydrationInfo: DehydratedView;\n lView: LView;\n i18nNodes: Map<number, RNode | null>;\n disconnectedNodes: Set<number>;\n caseQueue: number[];\n dehydratedIcuData: Map<number, DehydratedIcuData>;\n}\n\n/**\n * Describes current hydration state.\n */\ninterface I18nHydrationState {\n // The current node\n currentNode: Node | null;\n\n /**\n * Whether the tree should be connected.\n *\n * During hydration, it can happen that we expect to have a\n * current RNode, but we don't. In such cases, we still need\n * to propagate the expectation to the corresponding LViews,\n * so that the proper downstream error handling can provide\n * the correct context for the error.\n */\n isConnected: boolean;\n}\n\nfunction setCurrentNode(state: I18nHydrationState, node: Node | null) {\n state.currentNode = node;\n}\n\n/**\n * Marks the current RNode as the hydration root for the given\n * AST node.\n */\nfunction appendI18nNodeToCollection(\n context: I18nHydrationContext,\n state: I18nHydrationState,\n astNode: I18nNode,\n) {\n const noOffsetIndex = astNode.index - HEADER_OFFSET;\n const {disconnectedNodes} = context;\n const currentNode = state.currentNode;\n\n if (state.isConnected) {\n context.i18nNodes.set(noOffsetIndex, currentNode);\n\n // We expect the node to be connected, so ensure that it\n // is not in the set, regardless of whether we found it,\n // so that the downstream error handling can provide the\n // proper context.\n disconnectedNodes.delete(noOffsetIndex);\n } else {\n disconnectedNodes.add(noOffsetIndex);\n }\n\n return currentNode;\n}\n\n/**\n * Skip over some sibling nodes during hydration.\n *\n * Note: we use this instead of `siblingAfter` as it's expected that\n * sometimes we might encounter null nodes. In those cases, we want to\n * defer to downstream error handling to provide proper context.\n */\nfunction skipSiblingNodes(state: I18nHydrationState, skip: number) {\n let currentNode = state.currentNode;\n for (let i = 0; i < skip; i++) {\n if (!currentNode) {\n break;\n }\n currentNode = currentNode?.nextSibling ?? null;\n }\n return currentNode;\n}\n\n/**\n * Fork the given state into a new state for hydrating children.\n */\nfunction forkHydrationState(state: I18nHydrationState, nextNode: Node | null) {\n return {currentNode: nextNode, isConnected: state.isConnected};\n}\n\nfunction prepareI18nBlockForHydrationImpl(\n lView: LView,\n index: number,\n parentTNode: TNode | null,\n subTemplateIndex: number,\n) {\n const hydrationInfo = lView[HYDRATION];\n if (!hydrationInfo) {\n return;\n }\n\n if (\n !isI18nHydrationSupportEnabled() ||\n (parentTNode &&\n (isI18nInSkipHydrationBlock(parentTNode) ||\n isDisconnectedNode(hydrationInfo, parentTNode.index - HEADER_OFFSET)))\n ) {\n return;\n }\n\n const tView = lView[TVIEW];\n const tI18n = tView.data[index] as TI18n;\n ngDevMode &&\n assertDefined(tI18n, 'Expected i18n data to be present in a given TView slot during hydration');\n\n function findHydrationRoot() {\n if (isRootTemplateMessage(subTemplateIndex)) {\n // This is the root of an i18n block. In this case, our hydration root will\n // depend on where our parent TNode (i.e. the block with i18n applied) is\n // in the DOM.\n ngDevMode && assertDefined(parentTNode, 'Expected parent TNode while hydrating i18n root');\n const rootNode = locateNextRNode(hydrationInfo!, tView, lView, parentTNode!) as Node;\n\n // If this i18n block is attached to an <ng-container>, then we want to begin\n // hydrating directly with the RNode. Otherwise, for a TNode with a physical DOM\n // element, we want to recurse into the first child and begin there.\n return parentTNode!.type & TNodeType.ElementContainer ? rootNode : rootNode.firstChild;\n }\n\n // This is a nested template in an i18n block. In this case, the entire view\n // is translated, and part of a dehydrated view in a container. This means that\n // we can simply begin hydration with the first dehydrated child.\n return hydrationInfo?.firstChild as Node;\n }\n\n const currentNode = findHydrationRoot();\n ngDevMode && assertDefined(currentNode, 'Expected root i18n node during hydration');\n\n const disconnectedNodes = initDisconnectedNodes(hydrationInfo) ?? new Set();\n const i18nNodes = (hydrationInfo.i18nNodes ??= new Map<number, RNode | null>());\n const caseQueue = hydrationInfo.data[I18N_DATA]?.[index - HEADER_OFFSET] ?? [];\n const dehydratedIcuData = (hydrationInfo.dehydratedIcuData ??= new Map<\n number,\n DehydratedIcuData\n >());\n\n collectI18nNodesFromDom(\n {hydrationInfo, lView, i18nNodes, disconnectedNodes, caseQueue, dehydratedIcuData},\n {currentNode, isConnected: true},\n tI18n.ast,\n );\n\n // Nodes from inactive ICU cases should be considered disconnected. We track them above\n // because they aren't (and shouldn't be) serialized. Since we may mutate or create a\n // new set, we need to be sure to write the expected value back to the DehydratedView.\n hydrationInfo.disconnectedNodes = disconnectedNodes.size === 0 ? null : disconnectedNodes;\n}\n\nfunction collectI18nNodesFromDom(\n context: I18nHydrationContext,\n state: I18nHydrationState,\n nodeOrNodes: I18nNode | I18nNode[],\n) {\n if (Array.isArray(nodeOrNodes)) {\n let nextState = state;\n for (const node of nodeOrNodes) {\n // Whenever a node doesn't directly follow the previous RNode, it\n // is given a path. We need to resume collecting nodes from that location\n // until and unless we find another disjoint node.\n const targetNode = tryLocateRNodeByPath(\n context.hydrationInfo,\n context.lView,\n node.index - HEADER_OFFSET,\n );\n if (targetNode) {\n nextState = forkHydrationState(state, targetNode as Node);\n }\n collectI18nNodesFromDom(context, nextState, node);\n }\n } else {\n if (context.disconnectedNodes.has(nodeOrNodes.index - HEADER_OFFSET)) {\n // i18n nodes can be considered disconnected if e.g. they were projected.\n // In that case, we have to make sure to skip over them.\n return;\n }\n\n switch (nodeOrNodes.kind) {\n case I18nNodeKind.TEXT: {\n // Claim a text node for hydration\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n\n case I18nNodeKind.ELEMENT: {\n // Recurse into the current element's children...\n collectI18nNodesFromDom(\n context,\n forkHydrationState(state, state.currentNode?.firstChild ?? null),\n nodeOrNodes.children,\n );\n\n // And claim the parent element itself.\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n\n case I18nNodeKind.PLACEHOLDER: {\n const noOffsetIndex = nodeOrNodes.index - HEADER_OFFSET;\n const {hydrationInfo} = context;\n const containerSize = getNgContainerSize(hydrationInfo, noOffsetIndex);\n\n switch (nodeOrNodes.type) {\n case I18nPlaceholderType.ELEMENT: {\n // Hydration expects to find the head of the element.\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n\n // A TNode for the node may not yet if we're hydrating during the first pass,\n // so use the serialized data to determine if this is an <ng-container>.\n if (isSerializedElementContainer(hydrationInfo, noOffsetIndex)) {\n // An <ng-container> doesn't have a physical DOM node, so we need to\n // continue hydrating from siblings.\n collectI18nNodesFromDom(context, state, nodeOrNodes.children);\n\n // Skip over the anchor element. It will be claimed by the\n // downstream container hydration.\n const nextNode = skipSiblingNodes(state, 1);\n setCurrentNode(state, nextNode);\n } else {\n // Non-container elements represent an actual node in the DOM, so we\n // need to continue hydration with the children, and claim the node.\n collectI18nNodesFromDom(\n context,\n forkHydrationState(state, state.currentNode?.firstChild ?? null),\n nodeOrNodes.children,\n );\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n\n // Elements can also be the anchor of a view container, so there may\n // be elements after this node that we need to skip.\n if (containerSize !== null) {\n // `+1` stands for an anchor node after all of the views in the container.\n const nextNode = skipSiblingNodes(state, containerSize + 1);\n setCurrentNode(state, nextNode);\n }\n }\n break;\n }\n\n case I18nPlaceholderType.SUBTEMPLATE: {\n ngDevMode &&\n assertNotEqual(\n containerSize,\n null,\n 'Expected a container size while hydrating i18n subtemplate',\n );\n\n // Hydration expects to find the head of the template.\n appendI18nNodeToCollection(context, state, nodeOrNodes);\n\n // Skip over all of the template children, as well as the anchor\n // node, since the template itself will handle them instead.\n const nextNode = skipSiblingNodes(state, containerSize! + 1);\n setCurrentNode(state, nextNode);\n break;\n }\n }\n break;\n }\n\n case I18nNodeKind.ICU: {\n // If the current node is connected, we need to pop the next case from the\n // queue, so that the active case is also considered connected.\n const selectedCase = state.isConnected ? context.caseQueue.shift()! : null;\n const childState = {currentNode: null, isConnected: false};\n\n // We traverse through each case, even if it's not active,\n // so that we correctly populate disconnected nodes.\n for (let i = 0; i < nodeOrNodes.cases.length; i++) {\n collectI18nNodesFromDom(\n context,\n i === selectedCase ? state : childState,\n nodeOrNodes.cases[i],\n );\n }\n\n if (selectedCase !== null) {\n // ICUs represent a branching state, and the selected case could be different\n // than what it was on the server. In that case, we need to be able to clean\n // up the nodes from the original case. To do that, we store the selected case.\n context.dehydratedIcuData.set(nodeOrNodes.index, {case: selectedCase, node: nodeOrNodes});\n }\n\n // Hydration expects to find the ICU anchor element.\n const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n setCurrentNode(state, currentNode?.nextSibling ?? null);\n break;\n }\n }\n }\n}\n\nlet _claimDehydratedIcuCaseImpl: typeof claimDehydratedIcuCaseImpl = () => {\n // noop unless `enableClaimDehydratedIcuCaseImpl` is invoked\n};\n\n/**\n * Mark the case for the ICU node at the given index in the view as claimed,\n * allowing its nodes to be hydrated and not cleaned up.\n */\nexport function claimDehydratedIcuCase(lView: LView, icuIndex: number, caseIndex: number) {\n _claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex);\n}\n\nexport function enableClaimDehydratedIcuCaseImpl() {\n _claimDehydratedIcuCaseImpl = claimDehydratedIcuCaseImpl;\n}\n\nfunction claimDehydratedIcuCaseImpl(lView: LView, icuIndex: number, caseIndex: number) {\n const dehydratedIcuDataMap = lView[HYDRATION]?.dehydratedIcuData;\n if (dehydratedIcuDataMap) {\n const dehydratedIcuData = dehydratedIcuDataMap.get(icuIndex);\n if (dehydratedIcuData?.case === caseIndex) {\n // If the case we're attempting to claim matches the dehydrated one,\n // we remove it from the map to mark it as \"claimed.\"\n dehydratedIcuDataMap.delete(icuIndex);\n }\n }\n}\n\n/**\n * Clean up all i18n hydration data associated with the given view.\n */\nexport function cleanupI18nHydrationData(lView: LView) {\n const hydrationInfo = lView[HYDRATION];\n if (hydrationInfo) {\n const {i18nNodes, dehydratedIcuData: dehydratedIcuDataMap} = hydrationInfo;\n if (i18nNodes && dehydratedIcuDataMap) {\n const renderer = lView[RENDERER];\n for (const dehydratedIcuData of dehydratedIcuDataMap.values()) {\n cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData);\n }\n }\n\n hydrationInfo.i18nNodes = undefined;\n hydrationInfo.dehydratedIcuData = undefined;\n }\n}\n\nfunction cleanupDehydratedIcuData(\n renderer: Renderer,\n i18nNodes: Map<number, RNode | null>,\n dehydratedIcuData: DehydratedIcuData,\n) {\n for (const node of dehydratedIcuData.node.cases[dehydratedIcuData.case]) {\n const rNode = i18nNodes.get(node.index - HEADER_OFFSET);\n if (rNode) {\n nativeRemoveNode(renderer, rNode, false);\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.dev/license\n */\n\nimport {ApplicationRef} from '../application/application_ref';\nimport {\n CONTAINER_HEADER_OFFSET,\n DEHYDRATED_VIEWS,\n LContainer,\n} from '../render3/interfaces/container';\nimport {Renderer} from '../render3/interfaces/renderer';\nimport {RNode} from '../render3/interfaces/renderer_dom';\nimport {isLContainer, isLView} from '../render3/interfaces/type_checks';\nimport {\n HEADER_OFFSET,\n HOST,\n HYDRATION,\n LView,\n PARENT,\n RENDERER,\n TVIEW,\n} from '../render3/interfaces/view';\nimport {nativeRemoveNode} from '../render3/node_manipulation';\nimport {EMPTY_ARRAY} from '../util/empty';\n\nimport {validateSiblingNodeExists} from './error_handling';\nimport {cleanupI18nHydrationData} from './i18n';\nimport {DehydratedContainerView, NUM_ROOT_NODES} from './interfaces';\nimport {getLNodeForHydration} from './utils';\n\n/**\n * Removes all dehydrated views from a given LContainer:\n * both in internal data structure, as well as removing\n * corresponding DOM nodes that belong to that dehydrated view.\n */\nexport function removeDehydratedViews(lContainer: LContainer) {\n const views = lContainer[DEHYDRATED_VIEWS] ?? [];\n const parentLView = lContainer[PARENT];\n const renderer = parentLView[RENDERER];\n for (const view of views) {\n removeDehydratedView(view, renderer);\n ngDevMode && ngDevMode.dehydratedViewsRemoved++;\n }\n // Reset the value to an empty array to indicate that no\n // further processing of dehydrated views is needed for\n // this view container (i.e. do not trigger the lookup process\n // once again in case a `ViewContainerRef` is created later).\n lContainer[DEHYDRATED_VIEWS] = EMPTY_ARRAY;\n}\n\n/**\n * Helper function to remove all nodes from a dehydrated view.\n */\nfunction removeDehydratedView(dehydratedView: DehydratedContainerView, renderer: Renderer) {\n let nodesRemoved = 0;\n let currentRNode = dehydratedView.firstChild;\n if (currentRNode) {\n const numNodes = dehydratedView.data[NUM_ROOT_NODES];\n while (nodesRemoved < numNodes) {\n ngDevMode && validateSiblingNodeExists(currentRNode);\n const nextSibling: RNode = currentRNode.nextSibling!;\n nativeRemoveNode(renderer, currentRNode, false);\n currentRNode = nextSibling;\n nodesRemoved++;\n }\n }\n}\n\n/**\n * Walks over all views within this LContainer invokes dehydrated views\n * cleanup function for each one.\n */\nfunction cleanupLContainer(lContainer: LContainer) {\n removeDehydratedViews(lContainer);\n\n // The host could be an LView if this container is on a component node.\n // In this case, descend into host LView for further cleanup. See also\n // LContainer[HOST] docs for additional information.\n const hostLView = lContainer[HOST];\n if (isLView(hostLView)) {\n cleanupLView(hostLView);\n }\n\n for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n cleanupLView(lContainer[i] as LView);\n }\n}\n\n/**\n * Walks over `LContainer`s and components registered within\n * this LView and invokes dehydrated views cleanup function for each one.\n */\nfunction cleanupLView(lView: LView) {\n cleanupI18nHydrationData(lView);\n\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (isLContainer(lView[i])) {\n const lContainer = lView[i];\n cleanupLContainer(lContainer);\n } else if (isLView(lView[i])) {\n // This is a component, enter the `cleanupLView` recursively.\n cleanupLView(lView[i]);\n }\n }\n}\n\n/**\n * Walks over all views registered within the ApplicationRef and removes\n * all dehydrated views from all `LContainer`s along the way.\n */\nexport function cleanupDehydratedViews(appRef: ApplicationRef) {\n const viewRefs = appRef._views;\n for (const viewRef of viewRefs) {\n const lNode = getLNodeForHydration(viewRef);\n // An `lView` might be `null` if a `ViewRef` represents\n // an embedded view (not a component view).\n if (lNode !== null && lNode[HOST] !== null) {\n if (isLView(lNode)) {\n cleanupLView(lNode);\n } else {\n // Cleanup in all views within this view container\n cleanupLContainer(lNode);\n }\n ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;\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.dev/license\n */\n\nimport {DEHYDRATED_VIEWS, LContainer} from '../render3/interfaces/container';\nimport {RNode} from '../render3/interfaces/renderer_dom';\n\nimport {removeDehydratedViews} from './cleanup';\nimport {\n DehydratedContainerView,\n MULTIPLIER,\n NUM_ROOT_NODES,\n SerializedContainerView,\n TEMPLATE_ID,\n} from './interfaces';\nimport {siblingAfter} from './node_lookup_utils';\n\n/**\n * Given a current DOM node and a serialized information about the views\n * in a container, walks over the DOM structure, collecting the list of\n * dehydrated views.\n */\nexport function locateDehydratedViewsInContainer(\n currentRNode: RNode,\n serializedViews: SerializedContainerView[],\n): [RNode, DehydratedContainerView[]] {\n const dehydratedViews: DehydratedContainerView[] = [];\n for (const serializedView of serializedViews) {\n // Repeats a view multiple times as needed, based on the serialized information\n // (for example, for *ngFor-produced views).\n for (let i = 0; i < (serializedView[MULTIPLIER] ?? 1); i++) {\n const view: DehydratedContainerView = {\n data: serializedView,\n firstChild: null,\n };\n if (serializedView[NUM_ROOT_NODES] > 0) {\n // Keep reference to the first node in this view,\n // so it can be accessed while invoking template instructions.\n view.firstChild = currentRNode as HTMLElement;\n\n // Move over to the next node after this view, which can\n // either be a first node of the next view or an anchor comment\n // node after the last view in a container.\n currentRNode = siblingAfter(serializedView[NUM_ROOT_NODES], currentRNode)!;\n }\n dehydratedViews.push(view);\n }\n }\n\n return [currentRNode, dehydratedViews];\n}\n\n/**\n * Reference to a function that searches for a matching dehydrated views\n * stored on a given lContainer.\n * Returns `null` by default, when hydration is not enabled.\n */\nlet _findMatchingDehydratedViewImpl: typeof findMatchingDehydratedViewImpl = () => null;\n\n/**\n * Retrieves the next dehydrated view from the LContainer and verifies that\n * it matches a given template id (from the TView that was used to create this\n * instance of a view). If the id doesn't match, that means that we are in an\n * unexpected state and can not complete the reconciliation process. Thus,\n * all dehydrated views from this LContainer are removed (including corresponding\n * DOM nodes) and the rendering is performed as if there were no dehydrated views\n * in this container.\n */\nfunction findMatchingDehydratedViewImpl(\n lContainer: LContainer,\n template: string | null,\n): DehydratedContainerView | null {\n const views = lContainer[DEHYDRATED_VIEWS];\n if (!template || views === null || views.length === 0) {\n return null;\n }\n const view = views[0];\n // Verify whether the first dehydrated view in the container matches\n // the template id passed to this function (that originated from a TView\n // that was used to create an instance of an embedded or component views.\n if (view.data[TEMPLATE_ID] === template) {\n // If the template id matches - extract the first view and return it.\n return views.shift()!;\n } else {\n // Otherwise, we are at the state when reconciliation can not be completed,\n // thus we remove all dehydrated views within this container (remove them\n // from internal data structures as well as delete associated elements from\n // the DOM tree).\n removeDehydratedViews(lContainer);\n return null;\n }\n}\n\nexport function enableFindMatchingDehydratedViewImpl() {\n _findMatchingDehydratedViewImpl = findMatchingDehydratedViewImpl;\n}\n\nexport function findMatchingDehydratedView(\n lContainer: LContainer,\n template: string | null,\n): DehydratedContainerView | null {\n return _findMatchingDehydratedViewImpl(lContainer, template);\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.dev/license\n */\n\nimport {InjectionToken} from '../../di/injection_token';\n\nexport const enum NotificationSource {\n // Change detection needs to run in order to synchronize application state\n // with the DOM when the following notifications are received:\n // This operation indicates that a subtree needs to be traversed during change detection.\n MarkAncestorsForTraversal,\n // A component/directive gets a new input.\n SetInput,\n // Defer block state updates need change detection to fully render the state.\n DeferBlockStateUpdate,\n // Debugging tools updated state and have requested change detection.\n DebugApplyChanges,\n // ChangeDetectorRef.markForCheck indicates the component is dirty/needs to refresh.\n MarkForCheck,\n\n // Bound listener callbacks execute and can update state without causing other notifications from\n // above.\n Listener,\n\n // The following notifications do not require views to be refreshed\n // but we should execute render hooks:\n // Render hooks are guaranteed to execute with the schedulers timing.\n RenderHook,\n DeferredRenderHook,\n // Views might be created outside and manipulated in ways that\n // we cannot be aware of. When a view is attached, Angular now \"knows\"\n // about it and we now know that DOM might have changed (and we should\n // run render hooks). If the attached view is dirty, the `MarkAncestorsForTraversal`\n // notification should also be received.\n ViewAttached,\n // When DOM removal happens, render hooks may be interested in the new\n // DOM state but we do not need to refresh any views unless. If change\n // detection is required after DOM removal, another notification should\n // be received (i.e. `markForCheck`).\n ViewDetachedFromDOM,\n // Applying animations might result in new DOM state and should rerun render hooks\n AsyncAnimationsLoaded,\n}\n\n/**\n * Injectable that is notified when an `LView` is made aware of changes to application state.\n */\nexport abstract class ChangeDetectionScheduler {\n abstract notify(source: NotificationSource): void;\n abstract runningTick: boolean;\n}\n\n/** Token used to indicate if zoneless was enabled via provideZonelessChangeDetection(). */\nexport const ZONELESS_ENABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless enabled' : '',\n {providedIn: 'root', factory: () => false},\n);\n\n/** Token used to indicate `provideExperimentalZonelessChangeDetection` was used. */\nexport const PROVIDED_ZONELESS = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless provided' : '',\n {providedIn: 'root', factory: () => false},\n);\n\nexport const ZONELESS_SCHEDULER_DISABLED = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'scheduler disabled' : '',\n);\n\n// TODO(atscott): Remove in v19. Scheduler should be done with runOutsideAngular.\nexport const SCHEDULE_IN_ROOT_ZONE = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'run changes outside zone in root' : '',\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.dev/license\n */\n\nimport {ChangeDetectorRef} from '../change_detection/change_detection';\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\n\nimport {ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {ViewRef} from './view_ref';\n\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nexport abstract class ComponentRef<C> {\n /**\n * Updates a specified input name to a new value. Using this method will properly mark for check\n * component using the `OnPush` change detection strategy. It will also assure that the\n * `OnChanges` lifecycle hook runs when a dynamically created component is change-detected.\n *\n * @param name The name of an input.\n * @param value The new value of an input.\n */\n abstract setInput(name: string, value: unknown): void;\n\n /**\n * The host or anchor element for this component instance.\n */\n abstract get location(): ElementRef;\n\n /**\n * The dependency injector for this component instance.\n */\n abstract get injector(): Injector;\n\n /**\n * This component instance.\n */\n abstract get instance(): C;\n\n /**\n * The host view defined by the template\n * for this component instance.\n */\n abstract get hostView(): ViewRef;\n\n /**\n * The change detector for this component instance.\n */\n abstract get changeDetectorRef(): ChangeDetectorRef;\n\n /**\n * The type of this component (as created by a `ComponentFactory` class).\n */\n abstract get componentType(): Type<any>;\n\n /**\n * Destroys the component instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * A lifecycle hook that provides additional developer-defined cleanup\n * functionality for the component.\n * @param callback A handler function that cleans up developer-defined data\n * associated with this component. Called when the `destroy()` method is invoked.\n */\n abstract onDestroy(callback: Function): void;\n}\n\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nexport abstract class ComponentFactory<C> {\n /**\n * The component's HTML selector.\n */\n abstract get selector(): string;\n /**\n * The type of component the factory will create.\n */\n abstract get componentType(): Type<any>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n abstract get ngContentSelectors(): string[];\n /**\n * The inputs of the component.\n */\n abstract get inputs(): {\n propName: string;\n templateName: string;\n transform?: (value: any) => any;\n isSignal: boolean;\n }[];\n /**\n * The outputs of the component.\n */\n abstract get outputs(): {propName: string; templateName: string}[];\n /**\n * Creates a new component.\n */\n abstract create(\n injector: Injector,\n projectableNodes?: any[][],\n rootSelectorOrNode?: string | any,\n environmentInjector?: EnvironmentInjector | NgModuleRef<any>,\n ): ComponentRef<C>;\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.dev/license\n */\n\nimport {Type} from '../interface/type';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactory} from './component_factory';\n\nexport function noComponentFactoryError(component: Function) {\n const error = Error(`No component factory found for ${stringify(component)}.`);\n (error as any)[ERROR_COMPONENT] = component;\n return error;\n}\n\nconst ERROR_COMPONENT = 'ngComponent';\n\nexport function getComponent(error: Error): Type<any> {\n return (error as any)[ERROR_COMPONENT];\n}\n\nclass _NullComponentFactoryResolver implements ComponentFactoryResolver {\n resolveComponentFactory<T>(component: {new (...args: any[]): T}): ComponentFactory<T> {\n throw noComponentFactoryError(component);\n }\n}\n\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nexport abstract class ComponentFactoryResolver {\n static NULL: ComponentFactoryResolver = /* @__PURE__ */ new _NullComponentFactoryResolver();\n /**\n * Retrieves the factory object that creates a component of the given type.\n * @param component The component type.\n */\n abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;\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.dev/license\n */\n\nimport {isLView} from '../render3/interfaces/type_checks';\nimport {RENDERER} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\n\nimport {RendererStyleFlags2, RendererType2} from './api_flags';\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nexport abstract class RendererFactory2 {\n /**\n * Creates and initializes a custom renderer for a host DOM element.\n * @param hostElement The element to render.\n * @param type The base class to implement.\n * @returns The new custom renderer instance.\n */\n abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;\n /**\n * A callback invoked when rendering has begun.\n */\n abstract begin?(): void;\n /**\n * A callback invoked when rendering has completed.\n */\n abstract end?(): void;\n /**\n * Use with animations test-only mode. Notifies the test when rendering has completed.\n * @returns The asynchronous result of the developer-defined function.\n */\n abstract whenRenderingDone?(): Promise<any>;\n}\n\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nexport abstract class Renderer2 {\n /**\n * Use to store arbitrary developer-defined data on a renderer instance,\n * as an object containing key-value pairs.\n * This is useful for renderers that delegate to other renderers.\n */\n abstract get data(): {[key: string]: any};\n\n /**\n * Implement this callback to destroy the renderer or the host element.\n */\n abstract destroy(): void;\n /**\n * Implement this callback to create an instance of the host element.\n * @param name An identifying name for the new element, unique within the namespace.\n * @param namespace The namespace for the new element.\n * @returns The new element.\n */\n abstract createElement(name: string, namespace?: string | null): any;\n /**\n * Implement this callback to add a comment to the DOM of the host element.\n * @param value The comment text.\n * @returns The modified element.\n */\n abstract createComment(value: string): any;\n\n /**\n * Implement this callback to add text to the DOM of the host element.\n * @param value The text string.\n * @returns The modified element.\n */\n abstract createText(value: string): any;\n /**\n * If null or undefined, the view engine won't call it.\n * This is used as a performance optimization for production mode.\n */\n destroyNode: ((node: any) => void) | null = null;\n /**\n * Appends a child to a given parent node in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child node.\n */\n abstract appendChild(parent: any, newChild: any): void;\n /**\n * Implement this callback to insert a child node at a given position in a parent node\n * in the host element DOM.\n * @param parent The parent node.\n * @param newChild The new child nodes.\n * @param refChild The existing child node before which `newChild` is inserted.\n * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a\n * move. Animation uses this information to trigger move animations. In the past the Animation\n * would always assume that any `insertBefore` is a move. This is not strictly true because\n * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should\n * not trigger an animation move.\n */\n abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;\n /**\n * Implement this callback to remove a child node from the host element's DOM.\n * @param parent The parent node.\n * @param oldChild The child node to remove.\n * @param isHostElement Optionally signal to the renderer whether this element is a host element\n * or not\n */\n abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;\n /**\n * Implement this callback to prepare an element to be bootstrapped\n * as a root element, and return the element instance.\n * @param selectorOrNode The DOM element.\n * @param preserveContent Whether the contents of the root element\n * should be preserved, or cleared upon bootstrap (default behavior).\n * Use with `ViewEncapsulation.ShadowDom` to allow simple native\n * content projection via `<slot>` elements.\n * @returns The root element.\n */\n abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;\n /**\n * Implement this callback to get the parent of a given node\n * in the host element's DOM.\n * @param node The child node to query.\n * @returns The parent node, or null if there is no parent.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract parentNode(node: any): any;\n /**\n * Implement this callback to get the next sibling node of a given node\n * in the host element's DOM.\n * @returns The sibling node, or null if there is no sibling.\n * This is because the check is synchronous,\n * and the caller can't rely on checking for null.\n */\n abstract nextSibling(node: any): any;\n /**\n * Implement this callback to set an attribute value for an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param value The new value.\n * @param namespace The namespace.\n */\n abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;\n\n /**\n * Implement this callback to remove an attribute from an element in the DOM.\n * @param el The element.\n * @param name The attribute name.\n * @param namespace The namespace.\n */\n abstract removeAttribute(el: any, name: string, namespace?: string | null): void;\n /**\n * Implement this callback to add a class to an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract addClass(el: any, name: string): void;\n\n /**\n * Implement this callback to remove a class from an element in the DOM.\n * @param el The element.\n * @param name The class name.\n */\n abstract removeClass(el: any, name: string): void;\n\n /**\n * Implement this callback to set a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param value The new value.\n * @param flags Flags for style variations. No flags are set by default.\n */\n abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to remove the value from a CSS style for an element in the DOM.\n * @param el The element.\n * @param style The name of the style.\n * @param flags Flags for style variations to remove, if set. ???\n */\n abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;\n\n /**\n * Implement this callback to set the value of a property of an element in the DOM.\n * @param el The element.\n * @param name The property name.\n * @param value The new value.\n */\n abstract setProperty(el: any, name: string, value: any): void;\n\n /**\n * Implement this callback to set the value of a node in the host element.\n * @param node The node.\n * @param value The new value.\n */\n abstract setValue(node: any, value: string): void;\n\n /**\n * Implement this callback to start an event listener.\n * @param target The context in which to listen for events. Can be\n * the entire window or document, the body of the document, or a specific\n * DOM element.\n * @param eventName The event to listen for.\n * @param callback A handler function to invoke when the event occurs.\n * @returns An \"unlisten\" function for disposing of this handler.\n */\n abstract listen(\n target: 'window' | 'document' | 'body' | any,\n eventName: string,\n callback: (event: any) => boolean | void,\n ): () => void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => Renderer2 = () => injectRenderer2();\n}\n\n/** Injects a Renderer2 for the current component. */\nexport function injectRenderer2(): Renderer2 {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER] as Renderer2;\n}\n\n/**\n * This enum is meant to be used by `ɵtype` properties of the different renderers implemented\n * by the framework\n *\n * We choose to not add `ɵtype` to `Renderer2` to no expose it to the public API.\n */\nexport const enum AnimationRendererType {\n Regular = 0,\n Delegated = 1,\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.dev/license\n */\n\nimport {ɵɵdefineInjectable} from '../di/interface/defs';\nimport {SecurityContext} from './security';\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nexport abstract class Sanitizer {\n abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: () => null,\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.dev/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../../di/forward_ref';\nimport {ModuleWithProviders} from '../../di/interface/provider';\nimport {Type} from '../../interface/type';\nimport {NgModuleDef} from '../../metadata/ng_module_def';\nimport {getComponentDef, getDirectiveDef, getNgModuleDef, getPipeDef} from '../definition';\nimport {ComponentType, DirectiveType, PipeType} from '../interfaces/definition';\nimport {stringifyForError} from '../util/stringify_utils';\n\nexport function isModuleWithProviders(value: any): value is ModuleWithProviders<{}> {\n return (value as {ngModule?: any}).ngModule !== undefined;\n}\n\nexport function isNgModule<T>(value: Type<T>): value is Type<T> & {ɵmod: NgModuleDef<T>} {\n return !!getNgModuleDef(value);\n}\n\nexport function isPipe<T>(value: Type<T>): value is PipeType<T> {\n return !!getPipeDef(value);\n}\n\nexport function isDirective<T>(value: Type<T>): value is DirectiveType<T> {\n return !!getDirectiveDef(value);\n}\n\nexport function isComponent<T>(value: Type<T>): value is ComponentType<T> {\n return !!getComponentDef(value);\n}\n\nfunction getDependencyTypeForError(type: Type<any>) {\n if (getComponentDef(type)) return 'component';\n if (getDirectiveDef(type)) return 'directive';\n if (getPipeDef(type)) return 'pipe';\n return 'type';\n}\n\nexport function verifyStandaloneImport(depType: Type<unknown>, importingType: Type<unknown>) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(\n `Expected forwardRef function, imported from \"${stringifyForError(\n importingType,\n )}\", to return a standalone entity or NgModule but got \"${\n stringifyForError(depType) || depType\n }\".`,\n );\n }\n }\n\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(\n `The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(\n depType,\n )}, imported from \"${stringifyForError(\n importingType,\n )}\", is not standalone. Did you forget to add the standalone: true flag?`,\n );\n }\n } else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(\n `A module with providers was imported from \"${stringifyForError(\n importingType,\n )}\". Modules with providers are not supported in standalone components imports.`,\n );\n } else {\n throw new Error(\n `The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(\n importingType,\n )}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`,\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.dev/license\n */\n\nimport {concatStringsWithSpace} from '../../util/stringify';\nimport {assertFirstCreatePass} from '../assert';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {TAttributes, TNode} from '../interfaces/node';\nimport {getTView} from '../state';\n\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nexport function computeStaticStyling(\n tNode: TNode,\n attrs: TAttributes | null,\n writeToHost: boolean,\n): void {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n let styles: string | null = writeToHost ? tNode.styles : null;\n let classes: string | null = writeToHost ? tNode.classes : null;\n let mode: AttributeMarker | 0 = 0;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n } else if (mode == AttributeMarker.Classes) {\n classes = concatStringsWithSpace(classes, value as string);\n } else if (mode == AttributeMarker.Styles) {\n const style = value as string;\n const styleValue = attrs[++i] as string;\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? (tNode.styles = styles) : (tNode.stylesWithoutHost = styles);\n writeToHost ? (tNode.classes = classes) : (tNode.classesWithoutHost = classes);\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {ChangeDetectorRef} from '../change_detection/change_detector_ref';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from '../change_detection/scheduling/zoneless_scheduling';\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {DehydratedView} from '../hydration/interfaces';\nimport {retrieveHydrationInfo} from '../hydration/utils';\nimport {Type} from '../interface/type';\nimport {\n ComponentFactory as AbstractComponentFactory,\n ComponentRef as AbstractComponentRef,\n} from '../linker/component_factory';\nimport {ComponentFactoryResolver as AbstractComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {createElementRef, ElementRef} from '../linker/element_ref';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {Renderer2, RendererFactory2} from '../render/api';\nimport {Sanitizer} from '../sanitization/sanitizer';\nimport {assertDefined, assertGreaterThan, assertIndexInRange} from '../util/assert';\n\nimport {AfterRenderManager} from './after_render/manager';\nimport {assertComponentType, assertNoDuplicateDirectives} from './assert';\nimport {attachPatchData} from './context_discovery';\nimport {getComponentDef} from './definition';\nimport {depsTracker} from './deps_tracker/deps_tracker';\nimport {getNodeInjectable, NodeInjector} from './di';\nimport {registerPostOrderHooks} from './hooks';\nimport {reportUnknownPropertyError} from './instructions/element_validation';\nimport {markViewDirty} from './instructions/mark_view_dirty';\nimport {renderView} from './instructions/render';\nimport {\n addToViewTree,\n createLView,\n createTView,\n executeContentQueries,\n getOrCreateComponentTView,\n getOrCreateTNode,\n initializeDirectives,\n invokeDirectivesHostBindings,\n locateHostElement,\n markAsComponentHost,\n setInputsForProperty,\n} from './instructions/shared';\nimport {ComponentDef, DirectiveDef, HostDirectiveDefs} from './interfaces/definition';\nimport {InputFlags} from './interfaces/input_flags';\nimport {\n NodeInputBindings,\n TContainerNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeType,\n} from './interfaces/node';\nimport {Renderer} from './interfaces/renderer';\nimport {RElement, RNode} from './interfaces/renderer_dom';\nimport {\n CONTEXT,\n HEADER_OFFSET,\n INJECTOR,\n LView,\n LViewEnvironment,\n LViewFlags,\n TVIEW,\n TViewType,\n} from './interfaces/view';\nimport {MATH_ML_NAMESPACE, SVG_NAMESPACE} from './namespaces';\nimport {createElementNode, setupStaticAttributes, writeDirectClass} from './node_manipulation';\nimport {\n extractAttrsAndClassesFromSelector,\n stringifyCSSSelectorList,\n} from './node_selector_matcher';\nimport {enterView, getCurrentTNode, getLView, leaveView} from './state';\nimport {computeStaticStyling} from './styling/static_styling';\nimport {mergeHostAttrs, setUpAttributes} from './util/attrs_utils';\nimport {debugStringifyTypeForError, stringifyForError} from './util/stringify_utils';\nimport {getComponentLViewByIndex, getNativeByTNode, getTNode} from './util/view_utils';\nimport {ViewRef} from './view_ref';\nimport {ChainedInjector} from './chained_injector';\nimport {unregisterLView} from './interfaces/lview_tracking';\n\nexport class ComponentFactoryResolver extends AbstractComponentFactoryResolver {\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n constructor(private ngModule?: NgModuleRef<any>) {\n super();\n }\n\n override resolveComponentFactory<T>(component: Type<T>): AbstractComponentFactory<T> {\n ngDevMode && assertComponentType(component);\n const componentDef = getComponentDef(component)!;\n return new ComponentFactory(componentDef, this.ngModule);\n }\n}\n\nfunction toRefArray<T>(\n map: DirectiveDef<T>['inputs'],\n isInputMap: true,\n): ComponentFactory<T>['inputs'];\nfunction toRefArray<T>(\n map: DirectiveDef<T>['outputs'],\n isInput: false,\n): ComponentFactory<T>['outputs'];\n\nfunction toRefArray<\n T,\n IsInputMap extends boolean,\n Return extends IsInputMap extends true\n ? ComponentFactory<T>['inputs']\n : ComponentFactory<T>['outputs'],\n>(map: DirectiveDef<T>['inputs'] | DirectiveDef<T>['outputs'], isInputMap: IsInputMap): Return {\n const array: Return = [] as unknown as Return;\n for (const publicName in map) {\n if (!map.hasOwnProperty(publicName)) {\n continue;\n }\n\n const value = map[publicName];\n if (value === undefined) {\n continue;\n }\n\n const isArray = Array.isArray(value);\n const propName: string = isArray ? value[0] : value;\n const flags: InputFlags = isArray ? value[1] : InputFlags.None;\n\n if (isInputMap) {\n (array as ComponentFactory<T>['inputs']).push({\n propName: propName,\n templateName: publicName,\n isSignal: (flags & InputFlags.SignalBased) !== 0,\n });\n } else {\n (array as ComponentFactory<T>['outputs']).push({\n propName: propName,\n templateName: publicName,\n });\n }\n }\n return array;\n}\n\nfunction getNamespace(elementName: string): string | null {\n const name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null;\n}\n\n/**\n * ComponentFactory interface implementation.\n */\nexport class ComponentFactory<T> extends AbstractComponentFactory<T> {\n override selector: string;\n override componentType: Type<any>;\n override ngContentSelectors: string[];\n isBoundToModule: boolean;\n\n override get inputs(): {\n propName: string;\n templateName: string;\n isSignal: boolean;\n transform?: (value: any) => any;\n }[] {\n const componentDef = this.componentDef;\n const inputTransforms = componentDef.inputTransforms;\n const refArray = toRefArray(componentDef.inputs, true);\n\n if (inputTransforms !== null) {\n for (const input of refArray) {\n if (inputTransforms.hasOwnProperty(input.propName)) {\n input.transform = inputTransforms[input.propName];\n }\n }\n }\n\n return refArray;\n }\n\n override get outputs(): {propName: string; templateName: string}[] {\n return toRefArray(this.componentDef.outputs, false);\n }\n\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n constructor(\n private componentDef: ComponentDef<any>,\n private ngModule?: NgModuleRef<any>,\n ) {\n super();\n this.componentType = componentDef.type;\n this.selector = stringifyCSSSelectorList(componentDef.selectors);\n this.ngContentSelectors = componentDef.ngContentSelectors\n ? componentDef.ngContentSelectors\n : [];\n this.isBoundToModule = !!ngModule;\n }\n\n override create(\n injector: Injector,\n projectableNodes?: any[][] | undefined,\n rootSelectorOrNode?: any,\n environmentInjector?: NgModuleRef<any> | EnvironmentInjector | undefined,\n ): AbstractComponentRef<T> {\n const prevConsumer = setActiveConsumer(null);\n try {\n // Check if the component is orphan\n if (\n ngDevMode &&\n (typeof ngJitMode === 'undefined' || ngJitMode) &&\n this.componentDef.debugInfo?.forbidOrphanRendering\n ) {\n if (depsTracker.isOrphanComponent(this.componentType)) {\n throw new RuntimeError(\n RuntimeErrorCode.RUNTIME_DEPS_ORPHAN_COMPONENT,\n `Orphan component found! Trying to render the component ${debugStringifyTypeForError(\n this.componentType,\n )} without first loading the NgModule that declares it. It is recommended to make this component standalone in order to avoid this error. If this is not possible now, import the component's NgModule in the appropriate NgModule, or the standalone component in which you are trying to render this component. If this is a lazy import, load the NgModule lazily as well and use its module injector.`,\n );\n }\n }\n\n environmentInjector = environmentInjector || this.ngModule;\n\n let realEnvironmentInjector =\n environmentInjector instanceof EnvironmentInjector\n ? environmentInjector\n : environmentInjector?.injector;\n\n if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {\n realEnvironmentInjector =\n this.componentDef.getStandaloneInjector(realEnvironmentInjector) ||\n realEnvironmentInjector;\n }\n\n const rootViewInjector = realEnvironmentInjector\n ? new ChainedInjector(injector, realEnvironmentInjector)\n : injector;\n\n const rendererFactory = rootViewInjector.get(RendererFactory2, null);\n if (rendererFactory === null) {\n throw new RuntimeError(\n RuntimeErrorCode.RENDERER_NOT_FOUND,\n ngDevMode &&\n 'Angular was not able to inject a renderer (RendererFactory2). ' +\n 'Likely this is due to a broken DI hierarchy. ' +\n 'Make sure that any injector used to create this component has a correct parent.',\n );\n }\n const sanitizer = rootViewInjector.get(Sanitizer, null);\n\n const changeDetectionScheduler = rootViewInjector.get(ChangeDetectionScheduler, null);\n\n const environment: LViewEnvironment = {\n rendererFactory,\n sanitizer,\n // We don't use inline effects (yet).\n inlineEffectRunner: null,\n changeDetectionScheduler,\n };\n\n const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its\n // selector.\n const elementName = (this.componentDef.selectors[0][0] as string) || 'div';\n const hostRNode = rootSelectorOrNode\n ? locateHostElement(\n hostRenderer,\n rootSelectorOrNode,\n this.componentDef.encapsulation,\n rootViewInjector,\n )\n : createElementNode(hostRenderer, elementName, getNamespace(elementName));\n\n let rootFlags = LViewFlags.IsRoot;\n if (this.componentDef.signals) {\n rootFlags |= LViewFlags.SignalView;\n } else if (!this.componentDef.onPush) {\n rootFlags |= LViewFlags.CheckAlways;\n }\n\n let hydrationInfo: DehydratedView | null = null;\n if (hostRNode !== null) {\n hydrationInfo = retrieveHydrationInfo(hostRNode, rootViewInjector, true /* isRootView */);\n }\n\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(\n TViewType.Root,\n null,\n null,\n 1,\n 0,\n null,\n null,\n null,\n null,\n null,\n null,\n );\n const rootLView = createLView(\n null,\n rootTView,\n null,\n rootFlags,\n null,\n null,\n environment,\n hostRenderer,\n rootViewInjector,\n null,\n hydrationInfo,\n );\n\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView);\n\n let component: T;\n let tElementNode: TElementNode;\n let componentView: LView | null = null;\n\n try {\n const rootComponentDef = this.componentDef;\n let rootDirectives: DirectiveDef<unknown>[];\n let hostDirectiveDefs: HostDirectiveDefs | null = null;\n\n if (rootComponentDef.findHostDirectiveDefs) {\n rootDirectives = [];\n hostDirectiveDefs = new Map();\n rootComponentDef.findHostDirectiveDefs(\n rootComponentDef,\n rootDirectives,\n hostDirectiveDefs,\n );\n rootDirectives.push(rootComponentDef);\n ngDevMode && assertNoDuplicateDirectives(rootDirectives);\n } else {\n rootDirectives = [rootComponentDef];\n }\n\n const hostTNode = createRootComponentTNode(rootLView, hostRNode);\n componentView = createRootComponentView(\n hostTNode,\n hostRNode,\n rootComponentDef,\n rootDirectives,\n rootLView,\n environment,\n hostRenderer,\n );\n\n tElementNode = getTNode(rootTView, HEADER_OFFSET) as TElementNode;\n\n // TODO(crisbeto): in practice `hostRNode` should always be defined, but there are some\n // tests where the renderer is mocked out and `undefined` is returned. We should update the\n // tests so that this check can be removed.\n if (hostRNode) {\n setRootNodeAttributes(hostRenderer, rootComponentDef, hostRNode, rootSelectorOrNode);\n }\n\n if (projectableNodes !== undefined) {\n projectNodes(tElementNode, this.ngContentSelectors, projectableNodes);\n }\n\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler\n // and executed here? Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(\n componentView,\n rootComponentDef,\n rootDirectives,\n hostDirectiveDefs,\n rootLView,\n [LifecycleHooksFeature],\n );\n renderView(rootTView, rootLView, null);\n } catch (e) {\n // Stop tracking the views if creation failed since\n // the consumer won't have a way to dereference them.\n if (componentView !== null) {\n unregisterLView(componentView);\n }\n unregisterLView(rootLView);\n throw e;\n } finally {\n leaveView();\n }\n\n return new ComponentRef(\n this.componentType,\n component,\n createElementRef(tElementNode, rootLView),\n rootLView,\n tElementNode,\n );\n } finally {\n setActiveConsumer(prevConsumer);\n }\n }\n}\n\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nexport class ComponentRef<T> extends AbstractComponentRef<T> {\n override instance: T;\n override hostView: ViewRef<T>;\n override changeDetectorRef: ChangeDetectorRef;\n override componentType: Type<T>;\n private previousInputValues: Map<string, unknown> | null = null;\n\n constructor(\n componentType: Type<T>,\n instance: T,\n public location: ElementRef,\n private _rootLView: LView,\n private _tNode: TElementNode | TContainerNode | TElementContainerNode,\n ) {\n super();\n this.instance = instance;\n this.hostView = this.changeDetectorRef = new ViewRef<T>(\n _rootLView,\n undefined /* _cdRefInjectingView */,\n false /* notifyErrorHandler */,\n );\n this.componentType = componentType;\n }\n\n override setInput(name: string, value: unknown): void {\n const inputData = this._tNode.inputs;\n let dataValue: NodeInputBindings[typeof name] | undefined;\n if (inputData !== null && (dataValue = inputData[name])) {\n this.previousInputValues ??= new Map();\n // Do not set the input if it is the same as the last value\n // This behavior matches `bindingUpdated` when binding inputs in templates.\n if (\n this.previousInputValues.has(name) &&\n Object.is(this.previousInputValues.get(name), value)\n ) {\n return;\n }\n\n const lView = this._rootLView;\n setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);\n this.previousInputValues.set(name, value);\n const childComponentLView = getComponentLViewByIndex(this._tNode.index, lView);\n markViewDirty(childComponentLView, NotificationSource.SetInput);\n } else {\n if (ngDevMode) {\n const cmpNameForError = stringifyForError(this.componentType);\n let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n reportUnknownPropertyError(message);\n }\n }\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._tNode, this._rootLView);\n }\n\n override destroy(): void {\n this.hostView.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.hostView.onDestroy(callback);\n }\n}\n\n/** Represents a HostFeature function. */\ntype HostFeature = <T>(component: T, componentDef: ComponentDef<T>) => void;\n\n/** Creates a TNode that can be used to instantiate a root component. */\nfunction createRootComponentTNode(lView: LView, rNode: RNode): TElementNode {\n const tView = lView[TVIEW];\n const index = HEADER_OFFSET;\n ngDevMode && assertIndexInRange(lView, index);\n lView[index] = rNode;\n\n // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n // representing a host element.\n return getOrCreateTNode(tView, index, TNodeType.Element, '#host', null);\n}\n\n/**\n * Creates the root component view and the root component node.\n *\n * @param hostRNode Render host element.\n * @param rootComponentDef ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(\n tNode: TElementNode,\n hostRNode: RElement | null,\n rootComponentDef: ComponentDef<any>,\n rootDirectives: DirectiveDef<any>[],\n rootView: LView,\n environment: LViewEnvironment,\n hostRenderer: Renderer,\n): LView {\n const tView = rootView[TVIEW];\n applyRootComponentStyling(rootDirectives, tNode, hostRNode, hostRenderer);\n\n // Hydration info is on the host element and needs to be retrieved\n // and passed to the component LView.\n let hydrationInfo: DehydratedView | null = null;\n if (hostRNode !== null) {\n hydrationInfo = retrieveHydrationInfo(hostRNode, rootView[INJECTOR]!);\n }\n const viewRenderer = environment.rendererFactory.createRenderer(hostRNode, rootComponentDef);\n let lViewFlags = LViewFlags.CheckAlways;\n if (rootComponentDef.signals) {\n lViewFlags = LViewFlags.SignalView;\n } else if (rootComponentDef.onPush) {\n lViewFlags = LViewFlags.Dirty;\n }\n const componentView = createLView(\n rootView,\n getOrCreateComponentTView(rootComponentDef),\n null,\n lViewFlags,\n rootView[tNode.index],\n tNode,\n environment,\n viewRenderer,\n null,\n null,\n hydrationInfo,\n );\n\n if (tView.firstCreatePass) {\n markAsComponentHost(tView, tNode, rootDirectives.length - 1);\n }\n\n addToViewTree(rootView, componentView);\n\n // Store component view at node index, with node as the HOST\n return (rootView[tNode.index] = componentView);\n}\n\n/** Sets up the styling information on a root component. */\nfunction applyRootComponentStyling(\n rootDirectives: DirectiveDef<any>[],\n tNode: TElementNode,\n rNode: RElement | null,\n hostRenderer: Renderer,\n): void {\n for (const def of rootDirectives) {\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n\n if (rNode !== null) {\n setupStaticAttributes(hostRenderer, rNode, tNode);\n }\n }\n}\n\n/**\n * Creates a root component and sets it up with features and host bindings.Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nfunction createRootComponent<T>(\n componentView: LView,\n rootComponentDef: ComponentDef<T>,\n rootDirectives: DirectiveDef<any>[],\n hostDirectiveDefs: HostDirectiveDefs | null,\n rootLView: LView,\n hostFeatures: HostFeature[] | null,\n): any {\n const rootTNode = getCurrentTNode() as TElementNode;\n ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n const tView = rootLView[TVIEW];\n const native = getNativeByTNode(rootTNode, rootLView);\n\n initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);\n\n for (let i = 0; i < rootDirectives.length; i++) {\n const directiveIndex = rootTNode.directiveStart + i;\n const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);\n attachPatchData(directiveInstance, rootLView);\n }\n\n invokeDirectivesHostBindings(tView, rootLView, rootTNode);\n\n if (native) {\n attachPatchData(native, rootLView);\n }\n\n // We're guaranteed for the `componentOffset` to be positive here\n // since a root component always matches a component def.\n ngDevMode &&\n assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');\n const component = getNodeInjectable(\n rootLView,\n tView,\n rootTNode.directiveStart + rootTNode.componentOffset,\n rootTNode,\n );\n componentView[CONTEXT] = rootLView[CONTEXT] = component;\n\n if (hostFeatures !== null) {\n for (const feature of hostFeatures) {\n feature(component, rootComponentDef);\n }\n }\n\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n executeContentQueries(tView, rootTNode, rootLView);\n\n return component;\n}\n\n/** Sets the static attributes on a root component. */\nfunction setRootNodeAttributes(\n hostRenderer: Renderer2,\n componentDef: ComponentDef<unknown>,\n hostRNode: RElement,\n rootSelectorOrNode: any,\n) {\n if (rootSelectorOrNode) {\n // The placeholder will be replaced with the actual version at build time.\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.2.13']);\n } else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n const {attrs, classes} = extractAttrsAndClassesFromSelector(componentDef.selectors[0]);\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n}\n\n/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(\n tNode: TElementNode,\n ngContentSelectors: string[],\n projectableNodes: any[][],\n) {\n const projection: (TNode | RNode[] | null)[] = (tNode.projection = []);\n for (let i = 0; i < ngContentSelectors.length; i++) {\n const nodesforSlot = projectableNodes[i];\n // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\n}\n\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nexport function LifecycleHooksFeature(): void {\n const tNode = getCurrentTNode()!;\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(getLView()[TVIEW], tNode);\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.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector} from '../di/r3_injector';\nimport {validateMatchingNode} from '../hydration/error_handling';\nimport {CONTAINERS} from '../hydration/interfaces';\nimport {isInSkipHydrationBlock} from '../hydration/skip_hydration';\nimport {\n getSegmentHead,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n} from '../hydration/utils';\nimport {findMatchingDehydratedView, locateDehydratedViewsInContainer} from '../hydration/views';\nimport {isType, Type} from '../interface/type';\nimport {assertNodeInjector} from '../render3/assert';\nimport {ComponentFactory as R3ComponentFactory} from '../render3/component_ref';\nimport {getComponentDef} from '../render3/definition';\nimport {getParentInjectorLocation, NodeInjector} from '../render3/di';\nimport {addToViewTree, createLContainer} from '../render3/instructions/shared';\nimport {\n CONTAINER_HEADER_OFFSET,\n DEHYDRATED_VIEWS,\n LContainer,\n NATIVE,\n VIEW_REFS,\n} from '../render3/interfaces/container';\nimport {NodeInjectorOffset} from '../render3/interfaces/injector';\nimport {\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeType,\n} from '../render3/interfaces/node';\nimport {RComment, RNode} from '../render3/interfaces/renderer_dom';\nimport {isLContainer} from '../render3/interfaces/type_checks';\nimport {\n HEADER_OFFSET,\n HYDRATION,\n LView,\n PARENT,\n RENDERER,\n T_HOST,\n TVIEW,\n} from '../render3/interfaces/view';\nimport {assertTNodeType} from '../render3/node_assert';\nimport {\n destroyLView,\n detachView,\n nativeInsertBefore,\n nativeNextSibling,\n nativeParentNode,\n} from '../render3/node_manipulation';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {\n getParentInjectorIndex,\n getParentInjectorView,\n hasParentInjector,\n} from '../render3/util/injector_utils';\nimport {getNativeByTNode, unwrapRNode, viewAttachedToContainer} from '../render3/util/view_utils';\nimport {addLViewToLContainer, shouldAddViewToDom} from '../render3/view_manipulation';\nimport {ViewRef as R3ViewRef} from '../render3/view_ref';\nimport {addToArray, removeFromArray} from '../util/array_utils';\nimport {\n assertDefined,\n assertEqual,\n assertGreaterThan,\n assertLessThan,\n throwError,\n} from '../util/assert';\n\nimport {ComponentFactory, ComponentRef} from './component_factory';\nimport {createElementRef, ElementRef} from './element_ref';\nimport {NgModuleRef} from './ng_module_factory';\nimport {TemplateRef} from './template_ref';\nimport {EmbeddedViewRef, ViewRef} from './view_ref';\n\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a view hierarchy.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * selector: 'dynamic',\n * template: `<span>This is a content of a dynamic component.</span>`,\n * })\n * class DynamicComponent {\n * vcr = inject(ViewContainerRef);\n * }\n *\n * @Component({\n * standalone: true,\n * selector: 'app',\n * template: `<main>Hi! This is the main content.</main>`,\n * })\n * class AppComponent {\n * vcr = inject(ViewContainerRef);\n *\n * ngAfterViewInit() {\n * const compRef = this.vcr.createComponent(DynamicComponent);\n * compRef.changeDetectorRef.detectChanges();\n * }\n * }\n * ```\n *\n * @see {@link ComponentRef}\n * @see {@link EmbeddedViewRef}\n *\n * @publicApi\n */\nexport abstract class ViewContainerRef {\n /**\n * Anchor element that specifies the location of this container in the containing view.\n * Each view container can have only one anchor element, and each anchor element\n * can have only a single view container.\n *\n * Root elements of views attached to this container become siblings of the anchor element in\n * the rendered view.\n *\n * Access the `ViewContainerRef` of an element by placing a `Directive` injected\n * with `ViewContainerRef` on the element, or use a `ViewChild` query.\n *\n * <!-- TODO: rename to anchorElement -->\n */\n abstract get element(): ElementRef;\n\n /**\n * The dependency injector for this view container.\n */\n abstract get injector(): Injector;\n\n /** @deprecated No replacement */\n abstract get parentInjector(): Injector;\n\n /**\n * Destroys all views in this container.\n */\n abstract clear(): void;\n\n /**\n * Retrieves a view from this container.\n * @param index The 0-based index of the view to retrieve.\n * @returns The `ViewRef` instance, or null if the index is out of range.\n */\n abstract get(index: number): ViewRef | null;\n\n /**\n * Reports how many views are currently attached to this container.\n * @returns The number of views.\n */\n abstract get length(): number;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param options Extra configuration for the created view. Includes:\n * * index: The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n * * injector: Injector to be used within the embedded view.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n options?: {\n index?: number;\n injector?: Injector;\n },\n ): EmbeddedViewRef<C>;\n\n /**\n * Instantiates an embedded view and inserts it\n * into this container.\n * @param templateRef The HTML template that defines the view.\n * @param context The data-binding context of the embedded view, as declared\n * in the `<ng-template>` usage.\n * @param index The 0-based index at which to insert the new view into this container.\n * If not specified, appends the new view as the last entry.\n *\n * @returns The `ViewRef` instance for the newly created view.\n */\n abstract createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n index?: number,\n ): EmbeddedViewRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentType Component Type to use.\n * @param options An object that contains extra parameters:\n * * index: the index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * * injector: the injector to use as the parent for the new component.\n * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide\n * this to ensure that all expected providers are available for the component\n * instantiation.\n * * environmentInjector: an EnvironmentInjector which will provide the component's environment.\n * you should almost always provide this to ensure that all expected providers\n * are available for the component instantiation. This option is intended to\n * replace the `ngModuleRef` parameter.\n * * projectableNodes: list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n *\n * @returns The new `ComponentRef` which contains the component instance and the host view.\n */\n abstract createComponent<C>(\n componentType: Type<C>,\n options?: {\n index?: number;\n injector?: Injector;\n ngModuleRef?: NgModuleRef<unknown>;\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n projectableNodes?: Node[][];\n },\n ): ComponentRef<C>;\n\n /**\n * Instantiates a single component and inserts its host view into this container.\n *\n * @param componentFactory Component factory to use.\n * @param index The index at which to insert the new component's host view into this container.\n * If not specified, appends the new view as the last entry.\n * @param injector The injector to use as the parent for the new component.\n * @param projectableNodes List of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.\n * This information is used to retrieve corresponding NgModule injector.\n *\n * @returns The new `ComponentRef` which contains the component instance and the host view.\n *\n * @deprecated Angular no longer requires component factories to dynamically create components.\n * Use different signature of the `createComponent` method, which allows passing\n * Component class directly.\n */\n abstract createComponent<C>(\n componentFactory: ComponentFactory<C>,\n index?: number,\n injector?: Injector,\n projectableNodes?: any[][],\n environmentInjector?: EnvironmentInjector | NgModuleRef<any>,\n ): ComponentRef<C>;\n\n /**\n * Inserts a view into this container.\n * @param viewRef The view to insert.\n * @param index The 0-based index at which to insert the view.\n * If not specified, appends the new view as the last entry.\n * @returns The inserted `ViewRef` instance.\n *\n */\n abstract insert(viewRef: ViewRef, index?: number): ViewRef;\n\n /**\n * Moves a view to a new location in this container.\n * @param viewRef The view to move.\n * @param index The 0-based index of the new location.\n * @returns The moved `ViewRef` instance.\n */\n abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;\n\n /**\n * Returns the index of a view within the current container.\n * @param viewRef The view to query.\n * @returns The 0-based index of the view's position in this container,\n * or `-1` if this container doesn't contain the view.\n */\n abstract indexOf(viewRef: ViewRef): number;\n\n /**\n * Destroys a view attached to this container\n * @param index The 0-based index of the view to destroy.\n * If not specified, the last view in the container is removed.\n */\n abstract remove(index?: number): void;\n\n /**\n * Detaches a view from this container without destroying it.\n * Use along with `insert()` to move a view within the current container.\n * @param index The 0-based index of the view to detach.\n * If not specified, the last view in the container is detached.\n */\n abstract detach(index?: number): ViewRef | null;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: () => ViewContainerRef = injectViewContainerRef;\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nexport function injectViewContainerRef(): ViewContainerRef {\n const previousTNode = getCurrentTNode() as TElementNode | TElementContainerNode | TContainerNode;\n return createContainerRef(previousTNode, getLView());\n}\n\nconst VE_ViewContainerRef = ViewContainerRef;\n\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n constructor(\n private _lContainer: LContainer,\n private _hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n private _hostLView: LView,\n ) {\n super();\n }\n\n override get element(): ElementRef {\n return createElementRef(this._hostTNode, this._hostLView);\n }\n\n override get injector(): Injector {\n return new NodeInjector(this._hostTNode, this._hostLView);\n }\n\n /** @deprecated No replacement */\n override get parentInjector(): Injector {\n const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n if (hasParentInjector(parentLocation)) {\n const parentView = getParentInjectorView(parentLocation, this._hostLView);\n const injectorIndex = getParentInjectorIndex(parentLocation);\n ngDevMode && assertNodeInjector(parentView, injectorIndex);\n const parentTNode = parentView[TVIEW].data[\n injectorIndex + NodeInjectorOffset.TNODE\n ] as TElementNode;\n return new NodeInjector(parentTNode, parentView);\n } else {\n return new NodeInjector(null, this._hostLView);\n }\n }\n\n override clear(): void {\n while (this.length > 0) {\n this.remove(this.length - 1);\n }\n }\n\n override get(index: number): ViewRef | null {\n const viewRefs = getViewRefs(this._lContainer);\n return (viewRefs !== null && viewRefs[index]) || null;\n }\n\n override get length(): number {\n return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n\n override createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n options?: {\n index?: number;\n injector?: Injector;\n },\n ): EmbeddedViewRef<C>;\n override createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n index?: number,\n ): EmbeddedViewRef<C>;\n override createEmbeddedView<C>(\n templateRef: TemplateRef<C>,\n context?: C,\n indexOrOptions?:\n | number\n | {\n index?: number;\n injector?: Injector;\n },\n ): EmbeddedViewRef<C> {\n let index: number | undefined;\n let injector: Injector | undefined;\n\n if (typeof indexOrOptions === 'number') {\n index = indexOrOptions;\n } else if (indexOrOptions != null) {\n index = indexOrOptions.index;\n injector = indexOrOptions.injector;\n }\n\n const dehydratedView = findMatchingDehydratedView(this._lContainer, templateRef.ssrId);\n const viewRef = templateRef.createEmbeddedViewImpl(\n context || <any>{},\n injector,\n dehydratedView,\n );\n this.insertImpl(viewRef, index, shouldAddViewToDom(this._hostTNode, dehydratedView));\n return viewRef;\n }\n\n override createComponent<C>(\n componentType: Type<C>,\n options?: {\n index?: number;\n injector?: Injector;\n projectableNodes?: Node[][];\n ngModuleRef?: NgModuleRef<unknown>;\n },\n ): ComponentRef<C>;\n /**\n * @deprecated Angular no longer requires component factories to dynamically create components.\n * Use different signature of the `createComponent` method, which allows passing\n * Component class directly.\n */\n override createComponent<C>(\n componentFactory: ComponentFactory<C>,\n index?: number | undefined,\n injector?: Injector | undefined,\n projectableNodes?: any[][] | undefined,\n environmentInjector?: EnvironmentInjector | NgModuleRef<any> | undefined,\n ): ComponentRef<C>;\n override createComponent<C>(\n componentFactoryOrType: ComponentFactory<C> | Type<C>,\n indexOrOptions?:\n | number\n | undefined\n | {\n index?: number;\n injector?: Injector;\n ngModuleRef?: NgModuleRef<unknown>;\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n projectableNodes?: Node[][];\n },\n injector?: Injector | undefined,\n projectableNodes?: any[][] | undefined,\n environmentInjector?: EnvironmentInjector | NgModuleRef<any> | undefined,\n ): ComponentRef<C> {\n const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n let index: number | undefined;\n\n // This function supports 2 signatures and we need to handle options correctly for both:\n // 1. When first argument is a Component type. This signature also requires extra\n // options to be provided as object (more ergonomic option).\n // 2. First argument is a Component factory. In this case extra options are represented as\n // positional arguments. This signature is less ergonomic and will be deprecated.\n if (isComponentFactory) {\n if (ngDevMode) {\n assertEqual(\n typeof indexOrOptions !== 'object',\n true,\n 'It looks like Component factory was provided as the first argument ' +\n 'and an options object as the second argument. This combination of arguments ' +\n 'is incompatible. You can either change the first argument to provide Component ' +\n 'type or change the second argument to be a number (representing an index at ' +\n \"which to insert the new component's host view into this container)\",\n );\n }\n index = indexOrOptions as number | undefined;\n } else {\n if (ngDevMode) {\n assertDefined(\n getComponentDef(componentFactoryOrType),\n `Provided Component class doesn't contain Component definition. ` +\n `Please check whether provided class has @Component decorator.`,\n );\n assertEqual(\n typeof indexOrOptions !== 'number',\n true,\n 'It looks like Component type was provided as the first argument ' +\n \"and a number (representing an index at which to insert the new component's \" +\n 'host view into this container as the second argument. This combination of arguments ' +\n 'is incompatible. Please use an object as the second argument instead.',\n );\n }\n const options = (indexOrOptions || {}) as {\n index?: number;\n injector?: Injector;\n ngModuleRef?: NgModuleRef<unknown>;\n environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;\n projectableNodes?: Node[][];\n };\n if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n throwError(\n `Cannot pass both environmentInjector and ngModuleRef options to createComponent().`,\n );\n }\n index = options.index;\n injector = options.injector;\n projectableNodes = options.projectableNodes;\n environmentInjector = options.environmentInjector || options.ngModuleRef;\n }\n\n const componentFactory: ComponentFactory<C> = isComponentFactory\n ? (componentFactoryOrType as ComponentFactory<C>)\n : new R3ComponentFactory(getComponentDef(componentFactoryOrType)!);\n const contextInjector = injector || this.parentInjector;\n\n // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n if (!environmentInjector && (componentFactory as any).ngModule == null) {\n // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n // using a provided injector first, then fall back to the parent injector of this\n // `ViewContainerRef` instance.\n //\n // For the factory-less case, it's critical to establish a connection with the module\n // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n // rely on the provided injector, since it might be detached from the DI tree (for example, if\n // it was created via `Injector.create` without specifying a parent injector, or if an\n // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n // injector, which is normally connected to the DI tree, which includes module injector\n // subtree.\n const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n\n // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n // undefined` expression which seems to cause internal google apps to fail. This is documented\n // in the following internal bug issue: go/b/142967802\n const result = _injector.get(EnvironmentInjector, null);\n if (result) {\n environmentInjector = result;\n }\n }\n\n const componentDef = getComponentDef(componentFactory.componentType ?? {});\n const dehydratedView = findMatchingDehydratedView(this._lContainer, componentDef?.id ?? null);\n const rNode = dehydratedView?.firstChild ?? null;\n const componentRef = componentFactory.create(\n contextInjector,\n projectableNodes,\n rNode,\n environmentInjector,\n );\n this.insertImpl(\n componentRef.hostView,\n index,\n shouldAddViewToDom(this._hostTNode, dehydratedView),\n );\n return componentRef;\n }\n\n override insert(viewRef: ViewRef, index?: number): ViewRef {\n return this.insertImpl(viewRef, index, true);\n }\n\n private insertImpl(viewRef: ViewRef, index?: number, addToDOM?: boolean): ViewRef {\n const lView = (viewRef as R3ViewRef<any>)._lView!;\n\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n\n const prevIdx = this.indexOf(viewRef);\n\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n } else {\n const prevLContainer = lView[PARENT] as LContainer;\n ngDevMode &&\n assertEqual(\n isLContainer(prevLContainer),\n true,\n 'An attached view should have its PARENT point to a container.',\n );\n\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n const prevVCRef = new R3ViewContainerRef(\n prevLContainer,\n prevLContainer[T_HOST] as TDirectiveHostNode,\n prevLContainer[PARENT],\n );\n\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n\n // Logical operation of adding `LView` to `LContainer`\n const adjustedIdx = this._adjustIndex(index);\n const lContainer = this._lContainer;\n\n addLViewToLContainer(lContainer, lView, adjustedIdx, addToDOM);\n\n (viewRef as R3ViewRef<any>).attachToViewContainerRef();\n addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n\n return viewRef;\n }\n\n override move(viewRef: ViewRef, newIndex: number): ViewRef {\n if (ngDevMode && viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n return this.insert(viewRef, newIndex);\n }\n\n override indexOf(viewRef: ViewRef): number {\n const viewRefsArr = getViewRefs(this._lContainer);\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n }\n\n override remove(index?: number): void {\n const adjustedIdx = this._adjustIndex(index, -1);\n const detachedView = detachView(this._lContainer, adjustedIdx);\n\n if (detachedView) {\n // Before destroying the view, remove it from the container's array of `ViewRef`s.\n // This ensures the view container length is updated before calling\n // `destroyLView`, which could recursively call view container methods that\n // rely on an accurate container length.\n // (e.g. a method on this view container being called by a child directive's OnDestroy\n // lifecycle hook)\n removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n destroyLView(detachedView[TVIEW], detachedView);\n }\n }\n\n override detach(index?: number): ViewRef | null {\n const adjustedIdx = this._adjustIndex(index, -1);\n const view = detachView(this._lContainer, adjustedIdx);\n\n const wasDetached =\n view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n return wasDetached ? new R3ViewRef(view!) : null;\n }\n\n private _adjustIndex(index?: number, shift: number = 0) {\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n }\n};\n\nfunction getViewRefs(lContainer: LContainer): ViewRef[] | null {\n return lContainer[VIEW_REFS] as ViewRef[];\n}\n\nfunction getOrCreateViewRefs(lContainer: LContainer): ViewRef[] {\n return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])) as ViewRef[];\n}\n\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nexport function createContainerRef(\n hostTNode: TElementNode | TContainerNode | TElementContainerNode,\n hostLView: LView,\n): ViewContainerRef {\n ngDevMode && assertTNodeType(hostTNode, TNodeType.AnyContainer | TNodeType.AnyRNode);\n\n let lContainer: LContainer;\n const slotValue = hostLView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n } else {\n // An LContainer anchor can not be `null`, but we set it here temporarily\n // and update to the actual value later in this function (see\n // `_locateOrCreateAnchorNode`).\n lContainer = createLContainer(slotValue, hostLView, null!, hostTNode);\n hostLView[hostTNode.index] = lContainer;\n addToViewTree(hostLView, lContainer);\n }\n _locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue);\n\n return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n\n/**\n * Creates and inserts a comment node that acts as an anchor for a view container.\n *\n * If the host is a regular element, we have to insert a comment node manually which will\n * be used as an anchor when inserting elements. In this specific case we use low-level DOM\n * manipulation to insert it.\n */\nfunction insertAnchorNode(hostLView: LView, hostTNode: TNode): RComment {\n const renderer = hostLView[RENDERER];\n ngDevMode && ngDevMode.rendererCreateComment++;\n const commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n\n const hostNative = getNativeByTNode(hostTNode, hostLView)!;\n const parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(\n renderer,\n parentOfHostNative!,\n commentNode,\n nativeNextSibling(renderer, hostNative),\n false,\n );\n return commentNode;\n}\n\nlet _locateOrCreateAnchorNode = createAnchorNode;\nlet _populateDehydratedViewsInLContainer: typeof populateDehydratedViewsInLContainerImpl = () =>\n false; // noop by default\n\n/**\n * Looks up dehydrated views that belong to a given LContainer and populates\n * this information into the `LContainer[DEHYDRATED_VIEWS]` slot. When running\n * in client-only mode, this function is a noop.\n *\n * @param lContainer LContainer that should be populated.\n * @param tNode Corresponding TNode.\n * @param hostLView LView that hosts LContainer.\n * @returns a boolean flag that indicates whether a populating operation\n * was successful. The operation might be unsuccessful in case is has completed\n * previously, we are rendering in client-only mode or this content is located\n * in a skip hydration section.\n */\nexport function populateDehydratedViewsInLContainer(\n lContainer: LContainer,\n tNode: TNode,\n hostLView: LView,\n): boolean {\n return _populateDehydratedViewsInLContainer(lContainer, tNode, hostLView);\n}\n\n/**\n * Regular creation mode: an anchor is created and\n * assigned to the `lContainer[NATIVE]` slot.\n */\nfunction createAnchorNode(\n lContainer: LContainer,\n hostLView: LView,\n hostTNode: TNode,\n slotValue: any,\n) {\n // We already have a native element (anchor) set, return.\n if (lContainer[NATIVE]) return;\n\n let commentNode: RComment;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\n if (hostTNode.type & TNodeType.ElementContainer) {\n commentNode = unwrapRNode(slotValue) as RComment;\n } else {\n commentNode = insertAnchorNode(hostLView, hostTNode);\n }\n lContainer[NATIVE] = commentNode;\n}\n\n/**\n * Hydration logic that looks up all dehydrated views in this container\n * and puts them into `lContainer[DEHYDRATED_VIEWS]` slot.\n *\n * @returns a boolean flag that indicates whether a populating operation\n * was successful. The operation might be unsuccessful in case is has completed\n * previously, we are rendering in client-only mode or this content is located\n * in a skip hydration section.\n */\nfunction populateDehydratedViewsInLContainerImpl(\n lContainer: LContainer,\n tNode: TNode,\n hostLView: LView,\n): boolean {\n // We already have a native element (anchor) set and the process\n // of finding dehydrated views happened (so the `lContainer[DEHYDRATED_VIEWS]`\n // is not null), exit early.\n if (lContainer[NATIVE] && lContainer[DEHYDRATED_VIEWS]) {\n return true;\n }\n\n const hydrationInfo = hostLView[HYDRATION];\n const noOffsetIndex = tNode.index - HEADER_OFFSET;\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock(tNode) ||\n isDisconnectedNode(hydrationInfo, noOffsetIndex);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return false;\n }\n\n // Hydration mode, looking up an anchor node and dehydrated views in DOM.\n const currentRNode: RNode | null = getSegmentHead(hydrationInfo, noOffsetIndex);\n\n const serializedViews = hydrationInfo.data[CONTAINERS]?.[noOffsetIndex];\n ngDevMode &&\n assertDefined(\n serializedViews,\n 'Unexpected state: no hydration info available for a given TNode, ' +\n 'which represents a view container.',\n );\n\n const [commentNode, dehydratedViews] = locateDehydratedViewsInContainer(\n currentRNode!,\n serializedViews!,\n );\n\n if (ngDevMode) {\n validateMatchingNode(commentNode, Node.COMMENT_NODE, null, hostLView, tNode, true);\n // Do not throw in case this node is already claimed (thus `false` as a second\n // argument). If this container is created based on an `<ng-template>`, the comment\n // node would be already claimed from the `template` instruction. If an element acts\n // as an anchor (e.g. <div #vcRef>), a separate comment node would be created/located,\n // so we need to claim it here.\n markRNodeAsClaimedByHydration(commentNode, false);\n }\n\n lContainer[NATIVE] = commentNode as RComment;\n lContainer[DEHYDRATED_VIEWS] = dehydratedViews;\n\n return true;\n}\n\nfunction locateOrCreateAnchorNode(\n lContainer: LContainer,\n hostLView: LView,\n hostTNode: TNode,\n slotValue: any,\n): void {\n if (!_populateDehydratedViewsInLContainer(lContainer, hostTNode, hostLView)) {\n // Populating dehydrated views operation returned `false`, which indicates\n // that the logic was running in client-only mode, this an anchor comment\n // node should be created for this container.\n createAnchorNode(lContainer, hostLView, hostTNode, slotValue);\n }\n}\n\nexport function enableLocateOrCreateContainerRefImpl() {\n _locateOrCreateAnchorNode = locateOrCreateAnchorNode;\n _populateDehydratedViewsInLContainer = populateDehydratedViewsInLContainerImpl;\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.dev/license\n */\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nexport const Type = Function;\n\nexport function isType(v: any): v is Type<any> {\n return typeof v === 'function';\n}\n\n/**\n * @description\n *\n * Represents an abstract class `T`, if applied to a concrete class it would stop being\n * instantiable.\n *\n * @publicApi\n */\nexport interface AbstractType<T> extends Function {\n prototype: T;\n}\n\nexport interface Type<T> extends Function {\n new (...args: any[]): T;\n}\n\n/**\n * Returns a writable type version of type.\n *\n * USAGE:\n * Given:\n * ```\n * interface Person {readonly name: string}\n * ```\n *\n * We would like to get a read/write version of `Person`.\n * ```\n * const WritablePerson = Writable<Person>;\n * ```\n *\n * The result is that you can do:\n *\n * ```\n * const readonlyPerson: Person = {name: 'Marry'};\n * readonlyPerson.name = 'John'; // TypeError\n * (readonlyPerson as WritablePerson).name = 'John'; // OK\n *\n * // Error: Correctly detects that `Person` did not have `age` property.\n * (readonlyPerson as WritablePerson).age = 30;\n * ```\n */\nexport type Writable<T> = {\n -readonly [K in keyof T]: T[K];\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.dev/license\n */\n\n// We are temporarily importing the existing viewEngine_from core so we can be sure we are\n// correctly implementing its interfaces for backwards compatibility.\n\nimport {ProviderToken} from '../di/provider_token';\nimport {createElementRef, ElementRef as ViewEngine_ElementRef} from '../linker/element_ref';\nimport {QueryList} from '../linker/query_list';\nimport {createTemplateRef, TemplateRef as ViewEngine_TemplateRef} from '../linker/template_ref';\nimport {createContainerRef, ViewContainerRef} from '../linker/view_container_ref';\nimport {assertDefined, assertIndexInRange, assertNumber, throwError} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {assertFirstCreatePass, assertLContainer} from './assert';\nimport {getNodeInjectable, locateDirectiveOrProvider} from './di';\nimport {storeCleanupWithContext} from './instructions/shared';\nimport {CONTAINER_HEADER_OFFSET, LContainer, MOVED_VIEWS} from './interfaces/container';\nimport {\n TContainerNode,\n TElementContainerNode,\n TElementNode,\n TNode,\n TNodeType,\n} from './interfaces/node';\nimport {LQueries, LQuery, QueryFlags, TQueries, TQuery, TQueryMetadata} from './interfaces/query';\nimport {DECLARATION_LCONTAINER, LView, PARENT, QUERIES, TVIEW, TView} from './interfaces/view';\nimport {assertTNodeType} from './node_assert';\nimport {getCurrentTNode, getLView, getTView} from './state';\n\nclass LQuery_<T> implements LQuery<T> {\n matches: (T | null)[] | null = null;\n constructor(public queryList: QueryList<T>) {}\n clone(): LQuery<T> {\n return new LQuery_(this.queryList);\n }\n setDirty(): void {\n this.queryList.setDirty();\n }\n}\n\nclass LQueries_ implements LQueries {\n constructor(public queries: LQuery<any>[] = []) {}\n\n createEmbeddedView(tView: TView): LQueries | null {\n const tQueries = tView.queries;\n if (tQueries !== null) {\n const noOfInheritedQueries =\n tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n const viewLQueries: LQuery<any>[] = [];\n\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (let i = 0; i < noOfInheritedQueries; i++) {\n const tQuery = tQueries.getByIndex(i);\n const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n\n return new LQueries_(viewLQueries);\n }\n\n return null;\n }\n\n insertView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n detachView(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n finishViewCreation(tView: TView): void {\n this.dirtyQueriesWithMatches(tView);\n }\n\n private dirtyQueriesWithMatches(tView: TView) {\n for (let i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n }\n}\n\nexport class TQueryMetadata_ implements TQueryMetadata {\n public predicate: ProviderToken<unknown> | string[];\n constructor(\n predicate: ProviderToken<unknown> | string[] | string,\n public flags: QueryFlags,\n public read: any = null,\n ) {\n // Compiler might not be able to pre-optimize and split multiple selectors.\n if (typeof predicate === 'string') {\n this.predicate = splitQueryMultiSelectors(predicate);\n } else {\n this.predicate = predicate;\n }\n }\n}\n\nclass TQueries_ implements TQueries {\n constructor(private queries: TQuery[] = []) {}\n\n elementStart(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView,\n 'Queries should collect results on the first template pass only',\n );\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n }\n elementEnd(tNode: TNode): void {\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n }\n embeddedTView(tNode: TNode): TQueries | null {\n let queriesForTemplateRef: TQuery[] | null = null;\n\n for (let i = 0; i < this.length; i++) {\n const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n } else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n }\n\n template(tView: TView, tNode: TNode): void {\n ngDevMode &&\n assertFirstCreatePass(\n tView,\n 'Queries should collect results on the first template pass only',\n );\n for (let i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n }\n\n getByIndex(index: number): TQuery {\n ngDevMode && assertIndexInRange(this.queries, index);\n return this.queries[index];\n }\n\n get length(): number {\n return this.queries.length;\n }\n\n track(tquery: TQuery): void {\n this.queries.push(tquery);\n }\n}\n\nclass TQuery_ implements TQuery {\n matches: number[] | null = null;\n indexInDeclarationView = -1;\n crossesNgTemplate = false;\n\n /**\n * A node index on which a query was declared (-1 for view queries and ones inherited from the\n * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n * when to apply content queries to elements in a template.\n */\n private _declarationNodeIndex: number;\n\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n private _appliesToNextNode = true;\n\n constructor(\n public metadata: TQueryMetadata,\n nodeIndex: number = -1,\n ) {\n this._declarationNodeIndex = nodeIndex;\n }\n\n elementStart(tView: TView, tNode: TNode): void {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n }\n\n elementEnd(tNode: TNode): void {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n }\n\n template(tView: TView, tNode: TNode): void {\n this.elementStart(tView, tNode);\n }\n\n embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n }\n\n private isApplyingToNode(tNode: TNode): boolean {\n if (\n this._appliesToNextNode &&\n (this.metadata.flags & QueryFlags.descendants) !== QueryFlags.descendants\n ) {\n const declarationNodeIdx = this._declarationNodeIndex;\n let parent = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (\n parent !== null &&\n parent.type & TNodeType.ElementContainer &&\n parent.index !== declarationNodeIdx\n ) {\n parent = parent.parent;\n }\n return declarationNodeIdx === (parent !== null ? parent.index : -1);\n }\n return this._appliesToNextNode;\n }\n\n private matchTNode(tView: TView, tNode: TNode): void {\n const predicate = this.metadata.predicate;\n if (Array.isArray(predicate)) {\n for (let i = 0; i < predicate.length; i++) {\n const name = predicate[i];\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n // Also try matching the name to a provider since strings can be used as DI tokens too.\n this.matchTNodeWithReadOption(\n tView,\n tNode,\n locateDirectiveOrProvider(tNode, tView, name, false, false),\n );\n }\n } else {\n if ((predicate as any) === ViewEngine_TemplateRef) {\n if (tNode.type & TNodeType.Container) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n } else {\n this.matchTNodeWithReadOption(\n tView,\n tNode,\n locateDirectiveOrProvider(tNode, tView, predicate, false, false),\n );\n }\n }\n }\n\n private matchTNodeWithReadOption(tView: TView, tNode: TNode, nodeMatchIdx: number | null): void {\n if (nodeMatchIdx !== null) {\n const read = this.metadata.read;\n if (read !== null) {\n if (\n read === ViewEngine_ElementRef ||\n read === ViewContainerRef ||\n (read === ViewEngine_TemplateRef && tNode.type & TNodeType.Container)\n ) {\n this.addMatch(tNode.index, -2);\n } else {\n const directiveOrProviderIdx = locateDirectiveOrProvider(\n tNode,\n tView,\n read,\n false,\n false,\n );\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n } else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n }\n\n private addMatch(tNodeIdx: number, matchIdx: number) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n } else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n }\n}\n\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode: TNode, selector: string): number | null {\n const localNames = tNode.localNames;\n if (localNames !== null) {\n for (let i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1] as number;\n }\n }\n }\n return null;\n}\n\nfunction createResultByTNodeType(tNode: TNode, currentView: LView): any {\n if (tNode.type & (TNodeType.AnyRNode | TNodeType.ElementContainer)) {\n return createElementRef(tNode, currentView);\n } else if (tNode.type & TNodeType.Container) {\n return createTemplateRef(tNode, currentView);\n }\n return null;\n}\n\nfunction createResultForNode(lView: LView, tNode: TNode, matchingIdx: number, read: any): any {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n } else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n } else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode as TElementNode);\n }\n}\n\nfunction createSpecialToken(lView: LView, tNode: TNode, read: any): any {\n if (read === ViewEngine_ElementRef) {\n return createElementRef(tNode, lView);\n } else if (read === ViewEngine_TemplateRef) {\n return createTemplateRef(tNode, lView);\n } else if (read === ViewContainerRef) {\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n return createContainerRef(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n );\n } else {\n ngDevMode &&\n throwError(\n `Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(\n read,\n )}.`,\n );\n }\n}\n\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults<T>(\n tView: TView,\n lView: LView,\n tQuery: TQuery,\n queryIndex: number,\n): T[] {\n const lQuery = lView[QUERIES]!.queries![queryIndex];\n if (lQuery.matches === null) {\n const tViewData = tView.data;\n const tQueryMatches = tQuery.matches;\n const result: Array<T | null> = [];\n for (let i = 0; tQueryMatches !== null && i < tQueryMatches.length; i += 2) {\n const matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n } else {\n ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n const tNode = tViewData[matchedNodeIdx] as TNode;\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n\n return lQuery.matches;\n}\n\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults<T>(tView: TView, lView: LView, queryIndex: number, result: T[]): T[] {\n const tQuery = tView.queries!.getByIndex(queryIndex);\n const tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n const lViewResults = materializeViewResults<T>(tView, lView, tQuery, queryIndex);\n\n for (let i = 0; i < tQueryMatches.length; i += 2) {\n const tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2] as T);\n } else {\n const childQueryIndex = tQueryMatches[i + 1];\n\n const declarationLContainer = lView[-tNodeIdx] as LContainer;\n ngDevMode && assertLContainer(declarationLContainer);\n\n // collect matches for views inserted in this container\n for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n const embeddedLView = declarationLContainer[i];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n const embeddedLViews = declarationLContainer[MOVED_VIEWS]!;\n for (let i = 0; i < embeddedLViews.length; i++) {\n const embeddedLView = embeddedLViews[i];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\n}\n\nexport function loadQueryInternal<T>(lView: LView, queryIndex: number): QueryList<T> {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertIndexInRange(lView[QUERIES]!.queries, queryIndex);\n return lView[QUERIES]!.queries[queryIndex].queryList;\n}\n\n/**\n * Creates a new instance of LQuery and returns its index in the collection of LQuery objects.\n *\n * @returns index in the collection of LQuery objects\n */\nfunction createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags): number {\n const queryList = new QueryList<T>(\n (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly,\n );\n\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n\n const lQueries = (lView[QUERIES] ??= new LQueries_()).queries;\n return lQueries.push(new LQuery_(queryList)) - 1;\n}\n\nexport function createViewQuery<T>(\n predicate: ProviderToken<unknown> | string[] | string,\n flags: QueryFlags,\n read?: any,\n): number {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticViewQueries = true;\n }\n }\n\n return createLQuery<T>(tView, getLView(), flags);\n}\n\nexport function createContentQuery<T>(\n directiveIndex: number,\n predicate: ProviderToken<unknown> | string[] | string,\n flags: QueryFlags,\n read?: ProviderToken<T>,\n): number {\n ngDevMode && assertNumber(flags, 'Expecting flags');\n const tView = getTView();\n if (tView.firstCreatePass) {\n const tNode = getCurrentTNode()!;\n createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if ((flags & QueryFlags.isStatic) === QueryFlags.isStatic) {\n tView.staticContentQueries = true;\n }\n }\n\n return createLQuery<T>(tView, getLView(), flags);\n}\n\n/** Splits multiple selectors in the locator. */\nfunction splitQueryMultiSelectors(locator: string): string[] {\n return locator.split(',').map((s) => s.trim());\n}\n\nexport function createTQuery(tView: TView, metadata: TQueryMetadata, nodeIndex: number): void {\n if (tView.queries === null) tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\n\nexport function saveContentQueryAndDirectiveIndex(tView: TView, directiveIndex: number) {\n const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n const lastSavedDirectiveIndex = tViewContentQueries.length\n ? tViewContentQueries[tViewContentQueries.length - 1]\n : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries!.length - 1, directiveIndex);\n }\n}\n\nexport function getTQuery(tView: TView, index: number): TQuery {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries!.getByIndex(index);\n}\n\n/**\n * A helper function collecting results from all the views where a given query was active.\n * @param lView\n * @param queryIndex\n */\nexport function getQueryResults<V>(lView: LView, queryIndex: number): V[] {\n const tView = lView[TVIEW];\n const tQuery = getTQuery(tView, queryIndex);\n return tQuery.crossesNgTemplate\n ? collectQueryResults<V>(tView, lView, queryIndex, [])\n : materializeViewResults<V>(tView, lView, tQuery, queryIndex);\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.dev/license\n */\n\nconst markedFeatures = new Set<string>();\n\n// tslint:disable:ban\n/**\n * A guarded `performance.mark` for feature marking.\n *\n * This method exists because while all supported browser and node.js version supported by Angular\n * support performance.mark API. This is not the case for other environments such as JSDOM and\n * Cloudflare workers.\n */\nexport function performanceMarkFeature(feature: string): void {\n if (markedFeatures.has(feature)) {\n return;\n }\n markedFeatures.add(feature);\n performance?.mark?.('mark_feature_usage', {detail: {feature}});\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.dev/license\n */\n\nimport {SIGNAL} from '@angular/core/primitives/signals';\n\n/**\n * A reactive value which notifies consumers of any changes.\n *\n * Signals are functions which returns their current value. To access the current value of a signal,\n * call it.\n *\n * Ordinary values can be turned into `Signal`s with the `signal` function.\n */\nexport type Signal<T> = (() => T) & {\n [SIGNAL]: unknown;\n};\n\n/**\n * Checks if the given `value` is a reactive `Signal`.\n */\nexport function isSignal(value: unknown): value is Signal<unknown> {\n return typeof value === 'function' && (value as Signal<unknown>)[SIGNAL] !== undefined;\n}\n\n/**\n * A comparison function which can determine if two values are equal.\n */\nexport type ValueEqualityFn<T> = (a: T, b: T) => boolean;\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.dev/license\n */\n\nimport {\n createSignal,\n SIGNAL,\n SignalGetter,\n SignalNode,\n signalSetFn,\n signalUpdateFn,\n} from '@angular/core/primitives/signals';\n\nimport {performanceMarkFeature} from '../../util/performance';\n\nimport {isSignal, Signal, ValueEqualityFn} from './api';\n\n/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */\nexport const ɵWRITABLE_SIGNAL = /* @__PURE__ */ Symbol('WRITABLE_SIGNAL');\n\n/**\n * A `Signal` with a value that can be mutated via a setter interface.\n */\nexport interface WritableSignal<T> extends Signal<T> {\n [ɵWRITABLE_SIGNAL]: T;\n\n /**\n * Directly set the signal to a new value, and notify any dependents.\n */\n set(value: T): void;\n\n /**\n * Update the value of the signal based on its current value, and\n * notify any dependents.\n */\n update(updateFn: (value: T) => T): void;\n\n /**\n * Returns a readonly version of this signal. Readonly signals can be accessed to read their value\n * but can't be changed using set or update methods. The readonly signals do _not_ have\n * any built-in mechanism that would prevent deep-mutation of their value.\n */\n asReadonly(): Signal<T>;\n}\n\n/**\n * Utility function used during template type checking to extract the value from a `WritableSignal`.\n * @codeGenApi\n */\nexport function ɵunwrapWritableSignal<T>(value: T | {[ɵWRITABLE_SIGNAL]: T}): T {\n // Note: the function uses `WRITABLE_SIGNAL` as a brand instead of `WritableSignal<T>`,\n // because the latter incorrectly unwraps non-signal getter functions.\n return null!;\n}\n\n/**\n * Options passed to the `signal` creation function.\n */\nexport interface CreateSignalOptions<T> {\n /**\n * A comparison function which defines equality for signal values.\n */\n equal?: ValueEqualityFn<T>;\n}\n\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nexport function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T> {\n performanceMarkFeature('NgSignals');\n const signalFn = createSignal(initialValue) as SignalGetter<T> & WritableSignal<T>;\n const node = signalFn[SIGNAL];\n if (options?.equal) {\n node.equal = options.equal;\n }\n\n signalFn.set = (newValue: T) => signalSetFn(node, newValue);\n signalFn.update = (updateFn: (value: T) => T) => signalUpdateFn(node, updateFn);\n signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn as any) as () => Signal<T>;\n if (ngDevMode) {\n signalFn.toString = () => `[Signal: ${signalFn()}]`;\n }\n return signalFn as WritableSignal<T>;\n}\n\nexport function signalAsReadonlyFn<T>(this: SignalGetter<T>): Signal<T> {\n const node = this[SIGNAL] as SignalNode<T> & {readonlyFn?: Signal<T>};\n if (node.readonlyFn === undefined) {\n const readonlyFn = () => this();\n (readonlyFn as any)[SIGNAL] = node;\n node.readonlyFn = readonlyFn as Signal<T>;\n }\n return node.readonlyFn;\n}\n\n/**\n * Checks if the given `value` is a writeable signal.\n */\nexport function isWritableSignal(value: unknown): value is WritableSignal<unknown> {\n return isSignal(value) && typeof (value as any).set === 'function';\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Type, Writable} from '../../interface/type';\nimport {EMPTY_ARRAY, EMPTY_OBJ} from '../../util/empty';\nimport {fillProperties} from '../../util/property';\nimport {\n ComponentDef,\n ContentQueriesFunction,\n DirectiveDef,\n DirectiveDefFeature,\n HostBindingsFunction,\n RenderFlags,\n ViewQueriesFunction,\n} from '../interfaces/definition';\nimport {TAttributes} from '../interfaces/node';\nimport {isComponentDef} from '../interfaces/type_checks';\nimport {mergeHostAttrs} from '../util/attrs_utils';\nimport {stringifyForError} from '../util/stringify_utils';\n\nexport function getSuperType(\n type: Type<any>,\n): Type<any> & {ɵcmp?: ComponentDef<any>; ɵdir?: DirectiveDef<any>} {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\ntype WritableDef = Writable<DirectiveDef<any> | ComponentDef<any>>;\n\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nexport function ɵɵInheritDefinitionFeature(\n definition: DirectiveDef<any> | ComponentDef<any>,\n): void {\n let superType = getSuperType(definition.type);\n let shouldInheritFields = true;\n const inheritanceChain: WritableDef[] = [definition];\n\n while (superType) {\n let superDef: DirectiveDef<any> | ComponentDef<any> | undefined = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp || superType.ɵdir;\n } else {\n if (superType.ɵcmp) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_INHERITANCE,\n ngDevMode &&\n `Directives cannot inherit Components. Directive ${stringifyForError(\n definition.type,\n )} is attempting to extend component ${stringifyForError(superType)}`,\n );\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n const writeableDef = definition as WritableDef;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.inputTransforms = maybeUnwrapEmpty(definition.inputTransforms);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n\n // Merge hostBindings\n const superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n\n // Merge queries\n const superViewQuery = superDef.viewQuery;\n const superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n\n // Merge inputs and outputs\n mergeInputsWithTransforms(definition, superDef);\n fillProperties(definition.outputs, superDef.outputs);\n\n // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n const defData = (definition as ComponentDef<any>).data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n }\n\n // Run parent features\n const features = superDef.features;\n if (features) {\n for (let i = 0; i < features.length; i++) {\n const feature = features[i];\n if (feature && feature.ngInherit) {\n (feature as DirectiveDefFeature)(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n\nfunction mergeInputsWithTransforms<T>(target: WritableDef, source: DirectiveDef<any>) {\n for (const key in source.inputs) {\n if (!source.inputs.hasOwnProperty(key)) {\n continue;\n }\n if (target.inputs.hasOwnProperty(key)) {\n continue;\n }\n const value = source.inputs[key];\n if (value === undefined) {\n continue;\n }\n\n target.inputs[key] = value;\n target.declaredInputs[key] = source.declaredInputs[key];\n\n // If the input is inherited, and we have a transform for it, we also inherit it.\n // Note that transforms should not be inherited if the input has its own metadata\n // in the `source` directive itself already (i.e. the input is re-declared/overridden).\n if (source.inputTransforms !== null) {\n // Note: transforms are stored with their minified names.\n // Perf: only access the minified name when there are source transforms.\n const minifiedName = Array.isArray(value) ? value[0] : value;\n if (!source.inputTransforms.hasOwnProperty(minifiedName)) {\n continue;\n }\n target.inputTransforms ??= {};\n target.inputTransforms[minifiedName] = source.inputTransforms[minifiedName];\n }\n }\n}\n\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain: WritableDef[]) {\n let hostVars: number = 0;\n let hostAttrs: TAttributes | null = null;\n // We process the inheritance order from the base to the leaves here.\n for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n const def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = hostVars += def.hostVars;\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs = mergeHostAttrs(\n def.hostAttrs,\n (hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs)),\n );\n }\n}\n\nfunction maybeUnwrapEmpty<T>(value: T[]): T[];\nfunction maybeUnwrapEmpty<T>(value: T): T;\nfunction maybeUnwrapEmpty(value: any): any {\n if (value === EMPTY_OBJ) {\n return {};\n } else if (value === EMPTY_ARRAY) {\n return [];\n } else {\n return value;\n }\n}\n\nfunction inheritViewQuery(definition: WritableDef, superViewQuery: ViewQueriesFunction<any>) {\n const prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = (rf, ctx) => {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n } else {\n definition.viewQuery = superViewQuery;\n }\n}\n\nfunction inheritContentQueries(\n definition: WritableDef,\n superContentQueries: ContentQueriesFunction<any>,\n) {\n const prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = (rf, ctx, directiveIndex) => {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n } else {\n definition.contentQueries = superContentQueries;\n }\n}\n\nfunction inheritHostBindings(\n definition: WritableDef,\n superHostBindings: HostBindingsFunction<any>,\n) {\n const prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = (rf: RenderFlags, ctx: any) => {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n } else {\n definition.hostBindings = superHostBindings;\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.dev/license\n */\n\nimport {Writable} from '../../interface/type';\nimport {DirectiveDef, InputTransformFunction} from '../interfaces/definition';\n\n/**\n * Decorates the directive definition with support for input transform functions.\n *\n * If the directive uses inheritance, the feature should be included before the\n * `InheritDefinitionFeature` to ensure that the `inputTransforms` field is populated.\n *\n * @codeGenApi\n */\nexport function ɵɵInputTransformsFeature<T>(definition: DirectiveDef<T>): void {\n const inputs = definition.inputConfig;\n const inputTransforms: Record<string, InputTransformFunction> = {};\n\n for (const minifiedKey in inputs) {\n if (inputs.hasOwnProperty(minifiedKey)) {\n // Note: the private names are used for the keys, rather than the public ones, because public\n // names can be re-aliased in host directives which would invalidate the lookup.\n const value = inputs[minifiedKey];\n if (Array.isArray(value) && value[3]) {\n inputTransforms[minifiedKey] = value[3];\n }\n }\n }\n\n (definition as Writable<DirectiveDef<T>>).inputTransforms = inputTransforms;\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.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector, R3Injector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\n\nimport {ComponentFactoryResolver} from './component_factory_resolver';\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nexport abstract class NgModuleRef<T> {\n /**\n * The injector that contains all of the providers of the `NgModule`.\n */\n abstract get injector(): EnvironmentInjector;\n\n /**\n * The resolver that can retrieve component factories in a context of this module.\n *\n * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\n abstract get componentFactoryResolver(): ComponentFactoryResolver;\n\n /**\n * The `NgModule` instance.\n */\n abstract get instance(): T;\n\n /**\n * Destroys the module instance and all of the data structures associated with it.\n */\n abstract destroy(): void;\n\n /**\n * Registers a callback to be executed when the module is destroyed.\n */\n abstract onDestroy(callback: () => void): void;\n}\n\nexport interface InternalNgModuleRef<T> extends NgModuleRef<T> {\n // Note: we are using the prefix _ as NgModuleData is an NgModuleRef and therefore directly\n // exposed to the user.\n _bootstrapComponents: Type<any>[];\n resolveInjectorInitializers(): void;\n}\n\n/**\n * @publicApi\n *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\n */\nexport abstract class NgModuleFactory<T> {\n abstract get moduleType(): Type<T>;\n abstract create(parentInjector: Injector | null): NgModuleRef<T>;\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.dev/license\n */\n\nimport {createInjectorWithoutInjectorInstances} from '../di/create_injector';\nimport {Injector} from '../di/injector';\nimport {EnvironmentProviders, Provider, StaticProvider} from '../di/interface/provider';\nimport {EnvironmentInjector, getNullInjector, R3Injector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentFactoryResolver as viewEngine_ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {\n InternalNgModuleRef,\n NgModuleFactory as viewEngine_NgModuleFactory,\n NgModuleRef as viewEngine_NgModuleRef,\n} from '../linker/ng_module_factory';\nimport {assertDefined} from '../util/assert';\nimport {stringify} from '../util/stringify';\n\nimport {ComponentFactoryResolver} from './component_ref';\nimport {getNgModuleDef} from './definition';\nimport {maybeUnwrapFn} from './util/misc_utils';\n\n/**\n * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n * not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nexport function createNgModule<T>(\n ngModule: Type<T>,\n parentInjector?: Injector,\n): viewEngine_NgModuleRef<T> {\n return new NgModuleRef<T>(ngModule, parentInjector ?? null, []);\n}\n\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nexport const createNgModuleRef = createNgModule;\nexport class NgModuleRef<T> extends viewEngine_NgModuleRef<T> implements InternalNgModuleRef<T> {\n // tslint:disable-next-line:require-internal-with-underscore\n _bootstrapComponents: Type<any>[] = [];\n // tslint:disable-next-line:require-internal-with-underscore\n private readonly _r3Injector: R3Injector;\n override instance!: T;\n destroyCbs: (() => void)[] | null = [];\n\n // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n\n constructor(\n private readonly ngModuleType: Type<T>,\n public _parent: Injector | null,\n additionalProviders: StaticProvider[],\n runInjectorInitializers = true,\n ) {\n super();\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(\n ngModuleDef,\n `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`,\n );\n\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef!.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(\n ngModuleType,\n _parent,\n [\n {provide: viewEngine_NgModuleRef, useValue: this},\n {\n provide: viewEngine_ComponentFactoryResolver,\n useValue: this.componentFactoryResolver,\n },\n ...additionalProviders,\n ],\n stringify(ngModuleType),\n new Set(['environment']),\n ) as R3Injector;\n\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its constructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n if (runInjectorInitializers) {\n this.resolveInjectorInitializers();\n }\n }\n\n resolveInjectorInitializers() {\n this._r3Injector.resolveInjectorInitializers();\n this.instance = this._r3Injector.get(this.ngModuleType);\n }\n\n override get injector(): EnvironmentInjector {\n return this._r3Injector;\n }\n\n override destroy(): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n const injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs!.forEach((fn) => fn());\n this.destroyCbs = null;\n }\n override onDestroy(callback: () => void): void {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs!.push(callback);\n }\n}\n\nexport class NgModuleFactory<T> extends viewEngine_NgModuleFactory<T> {\n constructor(public moduleType: Type<T>) {\n super();\n }\n\n override create(parentInjector: Injector | null): viewEngine_NgModuleRef<T> {\n return new NgModuleRef(this.moduleType, parentInjector, []);\n }\n}\n\nexport function createNgModuleRefWithProviders<T>(\n moduleType: Type<T>,\n parentInjector: Injector | null,\n additionalProviders: StaticProvider[],\n): InternalNgModuleRef<T> {\n return new NgModuleRef(moduleType, parentInjector, additionalProviders, false);\n}\n\nexport class EnvironmentNgModuleRefAdapter extends viewEngine_NgModuleRef<null> {\n override readonly injector: R3Injector;\n override readonly componentFactoryResolver: ComponentFactoryResolver =\n new ComponentFactoryResolver(this);\n override readonly instance = null;\n\n constructor(config: {\n providers: Array<Provider | EnvironmentProviders>;\n parent: EnvironmentInjector | null;\n debugName: string | null;\n runEnvironmentInitializers: boolean;\n }) {\n super();\n const injector = new R3Injector(\n [\n ...config.providers,\n {provide: viewEngine_NgModuleRef, useValue: this},\n {provide: viewEngine_ComponentFactoryResolver, useValue: this.componentFactoryResolver},\n ],\n config.parent || getNullInjector(),\n config.debugName,\n new Set(['environment']),\n );\n this.injector = injector;\n if (config.runEnvironmentInitializers) {\n injector.resolveInjectorInitializers();\n }\n }\n\n override destroy(): void {\n this.injector.destroy();\n }\n\n override onDestroy(callback: () => void): void {\n this.injector.onDestroy(callback);\n }\n}\n\n/**\n * Create a new environment injector.\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n * messages.\n *\n * @publicApi\n */\nexport function createEnvironmentInjector(\n providers: Array<Provider | EnvironmentProviders>,\n parent: EnvironmentInjector,\n debugName: string | null = null,\n): EnvironmentInjector {\n const adapter = new EnvironmentNgModuleRefAdapter({\n providers,\n parent,\n debugName,\n runEnvironmentInitializers: true,\n });\n return adapter.injector;\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.dev/license\n */\n\nexport function isIterable(obj: any): obj is Iterable<any> {\n return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== undefined;\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return (\n Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n Symbol.iterator in obj)\n ); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function areIterablesEqual<T>(\n a: Iterable<T>,\n b: Iterable<T>,\n comparator: (a: T, b: T) => boolean,\n): boolean {\n const iterator1 = a[Symbol.iterator]();\n const iterator2 = b[Symbol.iterator]();\n\n while (true) {\n const item1 = iterator1.next();\n const item2 = iterator2.next();\n if (item1.done && item2.done) return true;\n if (item1.done || item2.done) return false;\n if (!comparator(item1.value, item2.value)) return false;\n }\n}\n\nexport function iterateListLike<T>(obj: Iterable<T>, fn: (p: T) => void) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n } else {\n const iterator = obj[Symbol.iterator]();\n let item: IteratorResult<T, any>;\n while (!(item = iterator.next()).done) {\n fn(item.value);\n }\n }\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\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.dev/license\n */\n\nimport {assertIndexInRange, assertLessThan, assertNotSame} from '../util/assert';\nimport {devModeEqual} from '../util/comparison';\n\nimport {getExpressionChangedErrorDetails, throwErrorIfNoChangesMode} from './errors';\nimport {LView} from './interfaces/view';\nimport {isInCheckNoChangesMode} from './state';\nimport {NO_CHANGE} from './tokens';\n\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nexport function updateBinding(lView: LView, bindingIndex: number, value: any): any {\n return (lView[bindingIndex] = value);\n}\n\n/** Gets the current binding value. */\nexport function getBinding(lView: LView, bindingIndex: number): any {\n ngDevMode && assertIndexInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n}\n\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\nexport function bindingUpdated(lView: LView, bindingIndex: number, value: any): boolean {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n const oldValue = lView[bindingIndex];\n\n if (Object.is(oldValue, value)) {\n return false;\n } else {\n if (ngDevMode && isInCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n const details = getExpressionChangedErrorDetails(\n lView,\n bindingIndex,\n oldValueToCompare,\n value,\n );\n throwErrorIfNoChangesMode(\n oldValue === NO_CHANGE,\n details.oldValue,\n details.newValue,\n details.propName,\n lView,\n );\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\n\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nexport function bindingUpdated2(lView: LView, bindingIndex: number, exp1: any, exp2: any): boolean {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated3(\n lView: LView,\n bindingIndex: number,\n exp1: any,\n exp2: any,\n exp3: any,\n): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nexport function bindingUpdated4(\n lView: LView,\n bindingIndex: number,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n): boolean {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\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.dev/license\n */\n\nimport {TNode, TNodeFlags} from '../render3/interfaces/node';\n\n/**\n * Checks whether a TNode is considered detached, i.e. not present in the\n * translated i18n template. We should not attempt hydration for such nodes\n * and instead, use a regular \"creation mode\".\n */\nexport function isDetachedByI18n(tNode: TNode) {\n return (tNode.flags & TNodeFlags.isDetached) === TNodeFlags.isDetached;\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.dev/license\n */\nimport {validateMatchingNode, validateNodeExists} from '../../hydration/error_handling';\nimport {TEMPLATES} from '../../hydration/interfaces';\nimport {locateNextRNode, siblingAfter} from '../../hydration/node_lookup_utils';\nimport {\n calcSerializedContainerSize,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n setSegmentHead,\n} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {populateDehydratedViewsInLContainer} from '../../linker/view_container_ref';\nimport {assertEqual} from '../../util/assert';\nimport {assertFirstCreatePass} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {LocalRefExtractor, TAttributes, TContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {RComment} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView, TViewType} from '../interfaces/view';\nimport {appendChild} from '../node_manipulation';\nimport {\n getLView,\n getTView,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n setCurrentTNode,\n wasLastNodeCreated,\n} from '../state';\nimport {getConstant} from '../util/view_utils';\n\nimport {\n addToViewTree,\n createDirectivesInstances,\n createLContainer,\n createTView,\n getOrCreateTNode,\n resolveDirectives,\n saveResolvedLocalsInData,\n} from './shared';\n\nfunction templateFirstCreatePass(\n index: number,\n tView: TView,\n lView: LView,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n tagName?: string | null,\n attrs?: TAttributes | null,\n localRefsIndex?: number | null,\n): TContainerNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n const tViewConsts = tView.consts;\n\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n const tNode = getOrCreateTNode(tView, index, TNodeType.Container, tagName || null, attrs || null);\n\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n\n const embeddedTView = (tNode.tView = createTView(\n TViewType.Embedded,\n tNode,\n templateFn,\n decls,\n vars,\n tView.directiveRegistry,\n tView.pipeRegistry,\n null,\n tView.schemas,\n tViewConsts,\n null /* ssrId */,\n ));\n\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates an LContainer for an embedded view.\n *\n * @param declarationLView LView in which the template was declared.\n * @param declarationTView TView in which the template wa declared.\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n */\nexport function declareTemplate(\n declarationLView: LView,\n declarationTView: TView,\n index: number,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n tagName?: string | null,\n attrs?: TAttributes | null,\n localRefsIndex?: number | null,\n localRefExtractor?: LocalRefExtractor,\n): TNode {\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = declarationTView.firstCreatePass\n ? templateFirstCreatePass(\n adjustedIndex,\n declarationTView,\n declarationLView,\n templateFn,\n decls,\n vars,\n tagName,\n attrs,\n localRefsIndex,\n )\n : (declarationTView.data[adjustedIndex] as TContainerNode);\n setCurrentTNode(tNode, false);\n\n const comment = _locateOrCreateContainerAnchor(\n declarationTView,\n declarationLView,\n tNode,\n index,\n ) as RComment;\n\n if (wasLastNodeCreated()) {\n appendChild(declarationTView, declarationLView, comment, tNode);\n }\n attachPatchData(comment, declarationLView);\n\n const lContainer = createLContainer(comment, declarationLView, comment, tNode);\n declarationLView[adjustedIndex] = lContainer;\n addToViewTree(declarationLView, lContainer);\n\n // If hydration is enabled, looks up dehydrated views in the DOM\n // using hydration annotation info and stores those views on LContainer.\n // In client-only mode, this function is a noop.\n populateDehydratedViewsInLContainer(lContainer, tNode, declarationLView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(declarationTView, declarationLView, tNode);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(declarationLView, tNode, localRefExtractor);\n }\n\n return tNode;\n}\n\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplate(\n index: number,\n templateFn: ComponentTemplate<any> | null,\n decls: number,\n vars: number,\n tagName?: string | null,\n attrsIndex?: number | null,\n localRefsIndex?: number | null,\n localRefExtractor?: LocalRefExtractor,\n): typeof ɵɵtemplate {\n const lView = getLView();\n const tView = getTView();\n const attrs = getConstant<TAttributes>(tView.consts, attrsIndex);\n declareTemplate(\n lView,\n tView,\n index,\n templateFn,\n decls,\n vars,\n tagName,\n attrs,\n localRefsIndex,\n localRefExtractor,\n );\n return ɵɵtemplate;\n}\n\nlet _locateOrCreateContainerAnchor = createContainerAnchorImpl;\n\n/**\n * Regular creation mode for LContainers and their anchor (comment) nodes.\n */\nfunction createContainerAnchorImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n): RComment {\n lastNodeWasCreated(true);\n return lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n}\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode for LContainers and their\n * anchor (comment) nodes.\n */\nfunction locateOrCreateContainerAnchorImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n): RComment {\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDetachedByI18n(tNode) ||\n isDisconnectedNode(hydrationInfo, index);\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createContainerAnchorImpl(tView, lView, tNode, index);\n }\n\n const ssrId = hydrationInfo.data[TEMPLATES]?.[index] ?? null;\n\n // Apply `ssrId` value to the underlying TView if it was not previously set.\n //\n // There might be situations when the same component is present in a template\n // multiple times and some instances are opted-out of using hydration via\n // `ngSkipHydration` attribute. In this scenario, at the time a TView is created,\n // the `ssrId` might be `null` (if the first component is opted-out of hydration).\n // The code below makes sure that the `ssrId` is applied to the TView if it's still\n // `null` and verifies we never try to override it with a different value.\n if (ssrId !== null && tNode.tView !== null) {\n if (tNode.tView.ssrId === null) {\n tNode.tView.ssrId = ssrId;\n } else {\n ngDevMode &&\n assertEqual(tNode.tView.ssrId, ssrId, 'Unexpected value of the `ssrId` for this TView');\n }\n }\n\n // Hydration mode, looking up existing elements in DOM.\n const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode)!;\n ngDevMode && validateNodeExists(currentRNode, lView, tNode);\n\n setSegmentHead(hydrationInfo, index, currentRNode);\n const viewContainerSize = calcSerializedContainerSize(hydrationInfo, index);\n const comment = siblingAfter<RComment>(viewContainerSize, currentRNode)!;\n\n if (ngDevMode) {\n validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);\n markRNodeAsClaimedByHydration(comment);\n }\n\n return comment;\n}\n\nexport function enableLocateOrCreateContainerAnchorImpl() {\n _locateOrCreateContainerAnchor = locateOrCreateContainerAnchorImpl;\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.dev/license\n */\n\nimport {getActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\n\n/**\n * Asserts that the current stack frame is not within a reactive context. Useful\n * to disallow certain code from running inside a reactive context (see {@link toSignal}).\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nexport function assertNotInReactiveContext(debugFn: Function, extraContext?: string): void {\n // Taking a `Function` instead of a string name here prevents the un-minified name of the function\n // from being retained in the bundle regardless of minification.\n if (getActiveConsumer() !== null) {\n throw new RuntimeError(\n RuntimeErrorCode.ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT,\n ngDevMode &&\n `${debugFn.name}() cannot be called from within a reactive context.${\n extraContext ? ` ${extraContext}` : ''\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.dev/license\n */\n\n/**\n * The phase to run an `afterRender` or `afterNextRender` callback in.\n *\n * Callbacks in the same phase run in the order they are registered. Phases run in the\n * following order after each render:\n *\n * 1. `AfterRenderPhase.EarlyRead`\n * 2. `AfterRenderPhase.Write`\n * 3. `AfterRenderPhase.MixedReadWrite`\n * 4. `AfterRenderPhase.Read`\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * @deprecated Specify the phase for your callback to run in by passing a spec-object as the first\n * parameter to `afterRender` or `afterNextRender` instead of a function.\n */\nexport enum AfterRenderPhase {\n /**\n * Use `AfterRenderPhase.EarlyRead` for callbacks that only need to **read** from the\n * DOM before a subsequent `AfterRenderPhase.Write` callback, for example to perform\n * custom layout that the browser doesn't natively support. Prefer the\n * `AfterRenderPhase.EarlyRead` phase if reading can wait until after the write phase.\n * **Never** write to the DOM in this phase.\n *\n * <div class=\"alert is-important\">\n *\n * Using this value can degrade performance.\n * Instead, prefer using built-in browser functionality when possible.\n *\n * </div>\n */\n EarlyRead,\n\n /**\n * Use `AfterRenderPhase.Write` for callbacks that only **write** to the DOM. **Never**\n * read from the DOM in this phase.\n */\n Write,\n\n /**\n * Use `AfterRenderPhase.MixedReadWrite` for callbacks that read from or write to the\n * DOM, that haven't been refactored to use a different phase. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n *\n * <div class=\"alert is-critical\">\n *\n * Using this value can **significantly** degrade performance.\n * Instead, prefer dividing work into the appropriate phase callbacks.\n *\n * </div>\n */\n MixedReadWrite,\n\n /**\n * Use `AfterRenderPhase.Read` for callbacks that only **read** from the DOM. **Never**\n * write to the DOM in this phase.\n */\n Read,\n}\n\n/**\n * A callback that runs after render.\n *\n * @developerPreview\n */\nexport interface AfterRenderRef {\n /**\n * Shut down the callback, preventing it from being called again.\n */\n destroy(): void;\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.dev/license\n */\n\nimport {AfterRenderPhase, AfterRenderRef} from './api';\nimport {NgZone} from '../../zone';\nimport {inject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {ErrorHandler} from '../../error_handler';\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {type DestroyRef} from '../../linker/destroy_ref';\n\nexport class AfterRenderManager {\n impl: AfterRenderImpl | null = null;\n\n execute(): void {\n this.impl?.execute();\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: AfterRenderManager,\n providedIn: 'root',\n factory: () => new AfterRenderManager(),\n });\n}\n\nexport class AfterRenderImpl {\n static readonly PHASES = [\n AfterRenderPhase.EarlyRead,\n AfterRenderPhase.Write,\n AfterRenderPhase.MixedReadWrite,\n AfterRenderPhase.Read,\n ] as const;\n\n private readonly ngZone = inject(NgZone);\n private readonly scheduler = inject(ChangeDetectionScheduler);\n private readonly errorHandler = inject(ErrorHandler, {optional: true});\n\n /** Current set of active sequences. */\n private readonly sequences = new Set<AfterRenderSequence>();\n\n /** Tracks registrations made during the current set of executions. */\n private readonly deferredRegistrations = new Set<AfterRenderSequence>();\n\n /** Whether the `AfterRenderManager` is currently executing hooks. */\n executing = false;\n\n /**\n * Run the sequence of phases of hooks, once through. As a result of executing some hooks, more\n * might be scheduled.\n */\n execute(): void {\n this.executing = true;\n for (const phase of AfterRenderImpl.PHASES) {\n for (const sequence of this.sequences) {\n if (sequence.erroredOrDestroyed || !sequence.hooks[phase]) {\n continue;\n }\n\n try {\n sequence.pipelinedValue = this.ngZone.runOutsideAngular(() =>\n sequence.hooks[phase]!(sequence.pipelinedValue),\n );\n } catch (err) {\n sequence.erroredOrDestroyed = true;\n this.errorHandler?.handleError(err);\n }\n }\n }\n this.executing = false;\n\n // Cleanup step to reset sequence state and also collect one-shot sequences for removal.\n for (const sequence of this.sequences) {\n sequence.afterRun();\n if (sequence.once) {\n this.sequences.delete(sequence);\n // Destroy the sequence so its on destroy callbacks can be cleaned up\n // immediately, instead of waiting until the injector is destroyed.\n sequence.destroy();\n }\n }\n\n for (const sequence of this.deferredRegistrations) {\n this.sequences.add(sequence);\n }\n if (this.deferredRegistrations.size > 0) {\n this.scheduler.notify(NotificationSource.DeferredRenderHook);\n }\n this.deferredRegistrations.clear();\n }\n\n register(sequence: AfterRenderSequence): void {\n if (!this.executing) {\n this.sequences.add(sequence);\n // Trigger an `ApplicationRef.tick()` if one is not already pending/running, because we have a\n // new render hook that needs to run.\n this.scheduler.notify(NotificationSource.RenderHook);\n } else {\n this.deferredRegistrations.add(sequence);\n }\n }\n\n unregister(sequence: AfterRenderSequence): void {\n if (this.executing && this.sequences.has(sequence)) {\n // We can't remove an `AfterRenderSequence` in the middle of iteration.\n // Instead, mark it as destroyed so it doesn't run any more, and mark it as one-shot so it'll\n // be removed at the end of the current execution.\n sequence.erroredOrDestroyed = true;\n sequence.pipelinedValue = undefined;\n sequence.once = true;\n } else {\n // It's safe to directly remove this sequence.\n this.sequences.delete(sequence);\n this.deferredRegistrations.delete(sequence);\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: AfterRenderImpl,\n providedIn: 'root',\n factory: () => new AfterRenderImpl(),\n });\n}\n\nexport type AfterRenderHook = (value?: unknown) => unknown;\nexport type AfterRenderHooks = [\n /* EarlyRead */ AfterRenderHook | undefined,\n /* Write */ AfterRenderHook | undefined,\n /* MixedReadWrite */ AfterRenderHook | undefined,\n /* Read */ AfterRenderHook | undefined,\n];\n\nexport class AfterRenderSequence implements AfterRenderRef {\n /**\n * Whether this sequence errored or was destroyed during this execution, and hooks should no\n * longer run for it.\n */\n erroredOrDestroyed: boolean = false;\n\n /**\n * The value returned by the last hook execution (if any), ready to be pipelined into the next\n * one.\n */\n pipelinedValue: unknown = undefined;\n\n private unregisterOnDestroy: (() => void) | undefined;\n\n constructor(\n readonly impl: AfterRenderImpl,\n readonly hooks: AfterRenderHooks,\n public once: boolean,\n destroyRef: DestroyRef | null,\n ) {\n this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n }\n\n afterRun(): void {\n this.erroredOrDestroyed = false;\n this.pipelinedValue = undefined;\n }\n\n destroy(): void {\n this.impl.unregister(this);\n this.unregisterOnDestroy?.();\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.dev/license\n */\n\nimport {assertInInjectionContext} from '../../di';\nimport {Injector} from '../../di/injector';\nimport {inject} from '../../di/injector_compatibility';\nimport {DestroyRef} from '../../linker/destroy_ref';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {assertNotInReactiveContext} from '../reactivity/asserts';\nimport {isPlatformBrowser} from '../util/misc_utils';\nimport {AfterRenderPhase, AfterRenderRef} from './api';\nimport {\n AfterRenderHooks,\n AfterRenderImpl,\n AfterRenderManager,\n AfterRenderSequence,\n} from './manager';\n\n/**\n * An argument list containing the first non-never type in the given type array, or an empty\n * argument list if there are no non-never types in the type array.\n */\nexport type ɵFirstAvailable<T extends unknown[]> = T extends [infer H, ...infer R]\n ? [H] extends [never]\n ? ɵFirstAvailable<R>\n : [H]\n : [];\n\n/**\n * Options passed to `afterRender` and `afterNextRender`.\n *\n * @developerPreview\n */\nexport interface AfterRenderOptions {\n /**\n * The `Injector` to use during creation.\n *\n * If this is not provided, the current injection context will be used instead (via `inject`).\n */\n injector?: Injector;\n\n /**\n * Whether the hook should require manual cleanup.\n *\n * If this is `false` (the default) the hook will automatically register itself to be cleaned up\n * with the current `DestroyRef`.\n */\n manualCleanup?: boolean;\n\n /**\n * The phase the callback should be invoked in.\n *\n * <div class=\"alert is-critical\">\n *\n * Defaults to `AfterRenderPhase.MixedReadWrite`. You should choose a more specific\n * phase instead. See `AfterRenderPhase` for more information.\n *\n * </div>\n *\n * @deprecated Specify the phase for your callback to run in by passing a spec-object as the first\n * parameter to `afterRender` or `afterNextRender` instead of a function.\n */\n phase?: AfterRenderPhase;\n}\n\n/**\n * Register callbacks to be invoked each time the application finishes rendering, during the\n * specified phases. The available phases are:\n * - `earlyRead`\n * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to\n * perform custom layout that the browser doesn't natively support. Prefer the `read` phase if\n * reading can wait until after the write phase. **Never** write to the DOM in this phase.\n * - `write`\n * Use this phase to **write** to the DOM. **Never** read from the DOM in this phase.\n * - `mixedReadWrite`\n * Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n * - `read`\n * Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.\n *\n * <div class=\"alert is-critical\">\n *\n * You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`\n * phases when possible, to avoid performance degradation.\n *\n * </div>\n *\n * Note that:\n * - Callbacks run in the following phase order *after each render*:\n * 1. `earlyRead`\n * 2. `write`\n * 3. `mixedReadWrite`\n * 4. `read`\n * - Callbacks in the same phase run in the order they are registered.\n * - Callbacks run on browser platforms only, they will not run on the server.\n *\n * The first phase callback to run as part of this spec will receive no parameters. Each\n * subsequent phase callback in this spec will receive the return value of the previously run\n * phase callback as a parameter. This can be used to coordinate work across multiple phases.\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * <div class=\"alert is-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param spec The callback functions to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterRender` to read or write the DOM after each render.\n *\n * ### Example\n * ```ts\n * @Component({\n * selector: 'my-cmp',\n * template: `<span #content>{{ ... }}</span>`,\n * })\n * export class MyComponent {\n * @ViewChild('content') contentRef: ElementRef;\n *\n * constructor() {\n * afterRender({\n * read: () => {\n * console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterRender<E = never, W = never, M = never>(\n spec: {\n earlyRead?: () => E;\n write?: (...args: ɵFirstAvailable<[E]>) => W;\n mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M;\n read?: (...args: ɵFirstAvailable<[M, W, E]>) => void;\n },\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef;\n\n/**\n * Register a callback to be invoked each time the application finishes rendering, during the\n * `mixedReadWrite` phase.\n *\n * <div class=\"alert is-critical\">\n *\n * You should prefer specifying an explicit phase for the callback instead, or you risk significant\n * performance degradation.\n *\n * </div>\n *\n * Note that the callback will run\n * - in the order it was registered\n * - once per render\n * - on browser platforms only\n * - during the `mixedReadWrite` phase\n *\n * <div class=\"alert is-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param callback A callback function to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterRender` to read or write the DOM after each render.\n *\n * ### Example\n * ```ts\n * @Component({\n * selector: 'my-cmp',\n * template: `<span #content>{{ ... }}</span>`,\n * })\n * export class MyComponent {\n * @ViewChild('content') contentRef: ElementRef;\n *\n * constructor() {\n * afterRender({\n * read: () => {\n * console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;\n\nexport function afterRender(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n options?: AfterRenderOptions,\n): AfterRenderRef {\n ngDevMode &&\n assertNotInReactiveContext(\n afterRender,\n 'Call `afterRender` outside of a reactive context. For example, schedule the render ' +\n 'callback inside the component constructor`.',\n );\n\n !options?.injector && assertInInjectionContext(afterRender);\n const injector = options?.injector ?? inject(Injector);\n\n if (!isPlatformBrowser(injector)) {\n return NOOP_AFTER_RENDER_REF;\n }\n\n performanceMarkFeature('NgAfterRender');\n\n return afterRenderImpl(callbackOrSpec, injector, options, /* once */ false);\n}\n\n/**\n * Register callbacks to be invoked the next time the application finishes rendering, during the\n * specified phases. The available phases are:\n * - `earlyRead`\n * Use this phase to **read** from the DOM before a subsequent `write` callback, for example to\n * perform custom layout that the browser doesn't natively support. Prefer the `read` phase if\n * reading can wait until after the write phase. **Never** write to the DOM in this phase.\n * - `write`\n * Use this phase to **write** to the DOM. **Never** read from the DOM in this phase.\n * - `mixedReadWrite`\n * Use this phase to read from and write to the DOM simultaneously. **Never** use this phase if\n * it is possible to divide the work among the other phases instead.\n * - `read`\n * Use this phase to **read** from the DOM. **Never** write to the DOM in this phase.\n *\n * <div class=\"alert is-critical\">\n *\n * You should prefer using the `read` and `write` phases over the `earlyRead` and `mixedReadWrite`\n * phases when possible, to avoid performance degradation.\n *\n * </div>\n *\n * Note that:\n * - Callbacks run in the following phase order *once, after the next render*:\n * 1. `earlyRead`\n * 2. `write`\n * 3. `mixedReadWrite`\n * 4. `read`\n * - Callbacks in the same phase run in the order they are registered.\n * - Callbacks run on browser platforms only, they will not run on the server.\n *\n * The first phase callback to run as part of this spec will receive no parameters. Each\n * subsequent phase callback in this spec will receive the return value of the previously run\n * phase callback as a parameter. This can be used to coordinate work across multiple phases.\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * <div class=\"alert is-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param spec The callback functions to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterNextRender` to read or write the DOM once,\n * for example to initialize a non-Angular library.\n *\n * ### Example\n * ```ts\n * @Component({\n * selector: 'my-chart-cmp',\n * template: `<div #chart>{{ ... }}</div>`,\n * })\n * export class MyChartCmp {\n * @ViewChild('chart') chartRef: ElementRef;\n * chart: MyChart|null;\n *\n * constructor() {\n * afterNextRender({\n * write: () => {\n * this.chart = new MyChart(this.chartRef.nativeElement);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterNextRender<E = never, W = never, M = never>(\n spec: {\n earlyRead?: () => E;\n write?: (...args: ɵFirstAvailable<[E]>) => W;\n mixedReadWrite?: (...args: ɵFirstAvailable<[W, E]>) => M;\n read?: (...args: ɵFirstAvailable<[M, W, E]>) => void;\n },\n options?: Omit<AfterRenderOptions, 'phase'>,\n): AfterRenderRef;\n\n/**\n * Register a callback to be invoked the next time the application finishes rendering, during the\n * `mixedReadWrite` phase.\n *\n * <div class=\"alert is-critical\">\n *\n * You should prefer specifying an explicit phase for the callback instead, or you risk significant\n * performance degradation.\n *\n * </div>\n *\n * Note that the callback will run\n * - in the order it was registered\n * - on browser platforms only\n * - during the `mixedReadWrite` phase\n *\n * <div class=\"alert is-important\">\n *\n * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.\n * You must use caution when directly reading or writing the DOM and layout.\n *\n * </div>\n *\n * @param callback A callback function to register\n * @param options Options to control the behavior of the callback\n *\n * @usageNotes\n *\n * Use `afterNextRender` to read or write the DOM once,\n * for example to initialize a non-Angular library.\n *\n * ### Example\n * ```ts\n * @Component({\n * selector: 'my-chart-cmp',\n * template: `<div #chart>{{ ... }}</div>`,\n * })\n * export class MyChartCmp {\n * @ViewChild('chart') chartRef: ElementRef;\n * chart: MyChart|null;\n *\n * constructor() {\n * afterNextRender({\n * write: () => {\n * this.chart = new MyChart(this.chartRef.nativeElement);\n * }\n * });\n * }\n * }\n * ```\n *\n * @developerPreview\n */\nexport function afterNextRender(\n callback: VoidFunction,\n options?: AfterRenderOptions,\n): AfterRenderRef;\n\nexport function afterNextRender(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n options?: AfterRenderOptions,\n): AfterRenderRef {\n !options?.injector && assertInInjectionContext(afterNextRender);\n const injector = options?.injector ?? inject(Injector);\n\n if (!isPlatformBrowser(injector)) {\n return NOOP_AFTER_RENDER_REF;\n }\n\n performanceMarkFeature('NgAfterNextRender');\n\n return afterRenderImpl(callbackOrSpec, injector, options, /* once */ true);\n}\n\nfunction getHooks(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n phase: AfterRenderPhase,\n): AfterRenderHooks {\n if (callbackOrSpec instanceof Function) {\n const hooks: AfterRenderHooks = [undefined, undefined, undefined, undefined];\n hooks[phase] = callbackOrSpec;\n return hooks;\n } else {\n return [\n callbackOrSpec.earlyRead,\n callbackOrSpec.write,\n callbackOrSpec.mixedReadWrite,\n callbackOrSpec.read,\n ];\n }\n}\n\n/**\n * Shared implementation for `afterRender` and `afterNextRender`.\n */\nfunction afterRenderImpl(\n callbackOrSpec:\n | VoidFunction\n | {\n earlyRead?: () => unknown;\n write?: (r?: unknown) => unknown;\n mixedReadWrite?: (r?: unknown) => unknown;\n read?: (r?: unknown) => void;\n },\n injector: Injector,\n options: AfterRenderOptions | undefined,\n once: boolean,\n): AfterRenderRef {\n const manager = injector.get(AfterRenderManager);\n // Lazily initialize the handler implementation, if necessary. This is so that it can be\n // tree-shaken if `afterRender` and `afterNextRender` aren't used.\n manager.impl ??= injector.get(AfterRenderImpl);\n\n const hooks = options?.phase ?? AfterRenderPhase.MixedReadWrite;\n const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n const sequence = new AfterRenderSequence(\n manager.impl,\n getHooks(callbackOrSpec, hooks),\n once,\n destroyRef,\n );\n manager.impl.register(sequence);\n return sequence;\n}\n\n/** `AfterRenderRef` that does nothing. */\nconst NOOP_AFTER_RENDER_REF: AfterRenderRef = {\n destroy() {},\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.dev/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\nimport {elementAttributeInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nexport function ɵɵattribute(\n name: string,\n value: any,\n sanitizer?: SanitizerFn | null,\n namespace?: string,\n): typeof ɵɵattribute {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n }\n return ɵɵattribute;\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.dev/license\n */\n\nimport {assertEqual, assertLessThan} from '../../util/assert';\nimport {bindingUpdated, bindingUpdated2, bindingUpdated3, bindingUpdated4} from '../bindings';\nimport {LView} from '../interfaces/view';\nimport {getBindingIndex, incrementBindingIndex, nextBindingIndex, setBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {renderStringify} from '../util/stringify_utils';\n\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nexport function interpolationV(lView: LView, values: any[]): string | NO_CHANGE {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n let isBindingUpdated = false;\n let bindingIndex = getBindingIndex();\n\n for (let i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n setBindingIndex(bindingIndex);\n\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n\n // Build the updated content\n let content = values[0];\n for (let i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n\n return content;\n}\n\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nexport function interpolation1(\n lView: LView,\n prefix: string,\n v0: any,\n suffix: string,\n): string | NO_CHANGE {\n const different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nexport function interpolation2(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nexport function interpolation3(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\n\n return different\n ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix\n : NO_CHANGE;\n}\n\n/**\n * Create an interpolation binding with 4 expressions.\n */\nexport function interpolation4(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nexport function interpolation5(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nexport function interpolation6(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n i4 +\n renderStringify(v5) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nexport function interpolation7(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n i4 +\n renderStringify(v5) +\n i5 +\n renderStringify(v6) +\n suffix\n : NO_CHANGE;\n}\n\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nexport function interpolation8(\n lView: LView,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): string | NO_CHANGE {\n const bindingIndex = getBindingIndex();\n let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n\n return different\n ? prefix +\n renderStringify(v0) +\n i0 +\n renderStringify(v1) +\n i1 +\n renderStringify(v2) +\n i2 +\n renderStringify(v3) +\n i3 +\n renderStringify(v4) +\n i4 +\n renderStringify(v5) +\n i5 +\n renderStringify(v6) +\n i6 +\n renderStringify(v7) +\n suffix\n : NO_CHANGE;\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.dev/license\n */\n\nimport {KeyValueArray} from '../../util/array_utils';\nimport {assertNumber, assertNumberInRange} from '../../util/assert';\n\n/**\n * Value stored in the `TData` which is needed to re-concatenate the styling.\n *\n * See: `TStylingKeyPrimitive` and `TStylingStatic`\n */\nexport type TStylingKey = TStylingKeyPrimitive | TStylingStatic;\n\n/**\n * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is\n * needed to re-concatenate the styling.\n *\n * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.\n * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.\n * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction\n * is combined with directive which shadows its input `@Input('class')`. That way the binding\n * should not participate in the styling resolution.\n */\nexport type TStylingKeyPrimitive = string | null | false;\n\n/**\n * Store the static values for the styling binding.\n *\n * The `TStylingStatic` is just `KeyValueArray` where key `\"\"` (stored at location 0) contains the\n * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the\n * `\"\"` contains the wrapped value.\n *\n * When instructions are resolving styling they may need to look forward or backwards in the linked\n * list to resolve the value. For this reason we have to make sure that he linked list also contains\n * the static values. However the list only has space for one item per styling instruction. For this\n * reason we store the static values here as part of the `TStylingKey`. This means that the\n * resolution function when looking for a value needs to first look at the binding value, and than\n * at `TStylingKey` (if it exists).\n *\n * Imagine we have:\n *\n * ```\n * <div class=\"TEMPLATE\" my-dir>\n *\n * @Directive({\n * host: {\n * class: 'DIR',\n * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case the linked list will contain one item:\n *\n * ```\n * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`\n * tData[10] = <TStylingStatic>[\n * '': 'dynamic', // This is the wrapped value of `TStylingKey`\n * 'DIR': true, // This is the default static value of directive binding.\n * ];\n * tData[10 + 1] = 0; // We don't have prev/next.\n *\n * lView[10] = undefined; // assume `ctx.exp` is `undefined`\n * lView[10 + 1] = undefined; // Just normalized `lView[10]`\n * ```\n *\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into the static `TStylingStatic` too see if there is a default value for\n * `dynamic` (there is not). Therefore it is safe to remove it.\n *\n * If setting `true` case:\n * ```\n * lView[10] = true; // assume `ctx.exp` is `true`\n * lView[10 + 1] = true; // Just normalized `lView[10]`\n * ```\n * So when the function is resolving styling value, it first needs to look into the linked list\n * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains\n * ```\n * tNode.residualClass = [\n * 'TEMPLATE': true,\n * ];\n * ```\n *\n * This means that it is safe to add class.\n */\nexport interface TStylingStatic extends KeyValueArray<any> {}\n\n/**\n * This is a branded number which contains previous and next index.\n *\n * When we come across styling instructions we need to store the `TStylingKey` in the correct\n * order so that we can re-concatenate the styling value in the desired priority.\n *\n * The insertion can happen either at the:\n * - end of template as in the case of coming across additional styling instruction in the template\n * - in front of the template in the case of coming across additional instruction in the\n * `hostBindings`.\n *\n * We use `TStylingRange` to store the previous and next index into the `TData` where the template\n * bindings can be found.\n *\n * - bit 0 is used to mark that the previous index has a duplicate for current value.\n * - bit 1 is used to mark that the next index has a duplicate for the current value.\n * - bits 2-16 are used to encode the next/tail of the template.\n * - bits 17-32 are used to encode the previous/head of template.\n *\n * NODE: *duplicate* false implies that it is statically known that this binding will not collide\n * with other bindings and therefore there is no need to check other bindings. For example the\n * bindings in `<div [style.color]=\"exp\" [style.width]=\"exp\">` will never collide and will have\n * their bits set accordingly. Previous duplicate means that we may need to check previous if the\n * current binding is `null`. Next duplicate means that we may need to check next bindings if the\n * current binding is not `null`.\n *\n * NOTE: `0` has special significance and represents `null` as in no additional pointer.\n */\nexport type TStylingRange = number & {\n __brand__: 'TStylingRange';\n};\n\n/**\n * Shift and masks constants for encoding two numbers into and duplicate info into a single number.\n */\nexport const enum StylingRange {\n /// Number of bits to shift for the previous pointer\n PREV_SHIFT = 17,\n /// Previous pointer mask.\n PREV_MASK = 0xfffe0000,\n\n /// Number of bits to shift for the next pointer\n NEXT_SHIFT = 2,\n /// Next pointer mask.\n NEXT_MASK = 0x001fffc,\n\n // Mask to remove negative bit. (interpret number as positive)\n UNSIGNED_MASK = 0x7fff,\n\n /**\n * This bit is set if the previous bindings contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `width` binding will\n * have previous duplicate set. The implication is that if `width` binding becomes `null`, it is\n * necessary to defer the value to `map.width`. (Because `width` overwrites `map.width`.)\n */\n PREV_DUPLICATE = 0x02,\n\n /**\n * This bit is set to if the next binding contains a binding which could possibly cause a\n * duplicate. For example: `<div [style]=\"map\" [style.width]=\"width\">`, the `map` binding will\n * have next duplicate set. The implication is that if `map.width` binding becomes not `null`, it\n * is necessary to defer the value to `width`. (Because `width` overwrites `map.width`.)\n */\n NEXT_DUPLICATE = 0x01,\n}\n\nexport function toTStylingRange(prev: number, next: number): TStylingRange {\n ngDevMode && assertNumberInRange(prev, 0, StylingRange.UNSIGNED_MASK);\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return ((prev << StylingRange.PREV_SHIFT) | (next << StylingRange.NEXT_SHIFT)) as TStylingRange;\n}\n\nexport function getTStylingRangePrev(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange >> StylingRange.PREV_SHIFT) & StylingRange.UNSIGNED_MASK;\n}\n\nexport function getTStylingRangePrevDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & StylingRange.PREV_DUPLICATE) == StylingRange.PREV_DUPLICATE;\n}\n\nexport function setTStylingRangePrev(\n tStylingRange: TStylingRange,\n previous: number,\n): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, StylingRange.UNSIGNED_MASK);\n return ((tStylingRange & ~StylingRange.PREV_MASK) |\n (previous << StylingRange.PREV_SHIFT)) as TStylingRange;\n}\n\nexport function setTStylingRangePrevDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | StylingRange.PREV_DUPLICATE) as TStylingRange;\n}\n\nexport function getTStylingRangeNext(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & StylingRange.NEXT_MASK) >> StylingRange.NEXT_SHIFT;\n}\n\nexport function setTStylingRangeNext(tStylingRange: TStylingRange, next: number): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, StylingRange.UNSIGNED_MASK);\n return ((tStylingRange & ~StylingRange.NEXT_MASK) | //\n (next << StylingRange.NEXT_SHIFT)) as TStylingRange;\n}\n\nexport function getTStylingRangeNextDuplicate(tStylingRange: TStylingRange): boolean {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & StylingRange.NEXT_DUPLICATE) === StylingRange.NEXT_DUPLICATE;\n}\n\nexport function setTStylingRangeNextDuplicate(tStylingRange: TStylingRange): TStylingRange {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | StylingRange.NEXT_DUPLICATE) as TStylingRange;\n}\n\nexport function getTStylingRangeTail(tStylingRange: TStylingRange): number {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n const next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\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.dev/license\n */\n\nimport {KeyValueArray, keyValueArrayIndexOf} from '../../util/array_utils';\nimport {assertEqual, assertIndexInRange, assertNotEqual} from '../../util/assert';\nimport {assertFirstUpdatePass} from '../assert';\nimport {TNode} from '../interfaces/node';\nimport {\n getTStylingRangeNext,\n getTStylingRangePrev,\n setTStylingRangeNext,\n setTStylingRangeNextDuplicate,\n setTStylingRangePrev,\n setTStylingRangePrevDuplicate,\n toTStylingRange,\n TStylingKey,\n TStylingKeyPrimitive,\n TStylingRange,\n} from '../interfaces/styling';\nimport {TData} from '../interfaces/view';\nimport {getTView} from '../state';\n\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__: undefined;\n\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nexport function insertTStylingBinding(\n tData: TData,\n tNode: TNode,\n tStylingKeyWithStatic: TStylingKey,\n index: number,\n isHostBinding: boolean,\n isClassBinding: boolean,\n): void {\n ngDevMode && assertFirstUpdatePass(getTView());\n let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n let tmplHead = getTStylingRangePrev(tBindings);\n let tmplTail = getTStylingRangeNext(tBindings);\n\n tData[index] = tStylingKeyWithStatic;\n let isKeyDuplicateOfStatic = false;\n let tStylingKey: TStylingKeyPrimitive;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n const staticKeyValueArray = tStylingKeyWithStatic as KeyValueArray<any>;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (\n tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey as string) > 0\n ) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n } else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n\n // If we don't have template bindings then `tail` is 0.\n const hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n const previousNode = getTStylingRangePrev(tData[tmplHead + 1] as TStylingRange);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] = setTStylingRangeNext(\n tData[previousNode + 1] as TStylingRange,\n index,\n );\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1] as TStylingRange, index);\n } else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1] as TStylingRange, index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n } else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(\n tmplHead !== 0 && tmplTail === 0,\n false,\n 'Adding template bindings after hostBindings is not allowed.',\n );\n if (tmplHead === 0) {\n tmplHead = index;\n } else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1] as TStylingRange, index);\n }\n tmplTail = index;\n }\n\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1] as TStylingRange);\n }\n markDuplicates(tData, tStylingKey, index, true);\n markDuplicates(tData, tStylingKey, index, false);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n } else {\n tNode.styleBindings = tBindings;\n }\n}\n\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(\n tNode: TNode,\n tStylingKey: TStylingKey,\n tData: TData,\n index: number,\n isClassBinding: boolean,\n) {\n const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (\n residual != null /* or undefined */ &&\n typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0\n ) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1] as TStylingRange);\n }\n}\n\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(\n tData: TData,\n tStylingKey: TStylingKeyPrimitive,\n index: number,\n isPrevDir: boolean,\n) {\n const tStylingAtIndex = tData[index + 1] as TStylingRange;\n const isMap = tStylingKey === null;\n let cursor = isPrevDir\n ? getTStylingRangePrev(tStylingAtIndex)\n : getTStylingRangeNext(tStylingAtIndex);\n let foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertIndexInRange(tData, cursor);\n const tStylingValueAtCursor = tData[cursor] as TStylingKey;\n const tStyleRangeAtCursor = tData[cursor + 1] as TStylingRange;\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir\n ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor)\n : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir\n ? getTStylingRangePrev(tStyleRangeAtCursor)\n : getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir\n ? setTStylingRangePrevDuplicate(tStylingAtIndex)\n : setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor: TStylingKey, tStylingKey: TStylingKeyPrimitive) {\n ngDevMode &&\n assertNotEqual(\n Array.isArray(tStylingKey),\n true,\n \"Expected that 'tStylingKey' has been unwrapped\",\n );\n if (\n tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0; // see if we are matching the key\n }\n return false;\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.dev/license\n */\n\nimport {assertEqual, throwError} from '../../util/assert';\nimport {CharCode} from '../../util/char_code';\n\n/**\n * Stores the locations of key/value indexes while parsing styling.\n *\n * In case of `cssText` parsing the indexes are like so:\n * ```\n * \"key1: value1; key2: value2; key3: value3\"\n * ^ ^ ^ ^ ^\n * | | | | +-- textEnd\n * | | | +---------------- valueEnd\n * | | +---------------------- value\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n *\n * In case of `className` parsing the indexes are like so:\n * ```\n * \"key1 key2 key3\"\n * ^ ^ ^\n * | | +-- textEnd\n * | +------------------------ keyEnd\n * +---------------------------- key\n * ```\n * NOTE: `value` and `valueEnd` are used only for styles, not classes.\n */\ninterface ParserState {\n textEnd: number;\n key: number;\n keyEnd: number;\n value: number;\n valueEnd: number;\n}\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState: ParserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedKey(text: string): string {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nexport function getLastParsedValue(text: string): string {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassName(text: string): number {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nexport function parseClassNameNext(text: string, index: number): number {\n const end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, (parserState.key = index), end);\n return consumeWhitespace(text, index, end);\n}\n\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyle(text: string): number {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nexport function parseStyleNext(text: string, startIndex: number): number {\n const end = parserState.textEnd;\n let index = (parserState.key = consumeWhitespace(text, startIndex, end));\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, CharCode.COLON);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, CharCode.SEMI_COLON);\n}\n\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nexport function resetParserState(text: string): void {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nexport function consumeWhitespace(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nexport function consumeClassToken(text: string, startIndex: number, endIndex: number): number {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > CharCode.SPACE) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nexport function consumeStyleKey(text: string, startIndex: number, endIndex: number): number {\n let ch: number;\n while (\n startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === CharCode.DASH ||\n ch === CharCode.UNDERSCORE ||\n ((ch & CharCode.UPPER_CASE) >= CharCode.A && (ch & CharCode.UPPER_CASE) <= CharCode.Z) ||\n (ch >= CharCode.ZERO && ch <= CharCode.NINE))\n ) {\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nexport function consumeSeparator(\n text: string,\n startIndex: number,\n endIndex: number,\n separator: number,\n): number {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nexport function consumeStyleValue(text: string, startIndex: number, endIndex: number): number {\n let ch1 = -1; // 1st previous character\n let ch2 = -1; // 2nd previous character\n let ch3 = -1; // 3rd previous character\n let i = startIndex;\n let lastChIndex = i;\n while (i < endIndex) {\n const ch: number = text.charCodeAt(i++);\n if (ch === CharCode.SEMI_COLON) {\n return lastChIndex;\n } else if (ch === CharCode.DOUBLE_QUOTE || ch === CharCode.SINGLE_QUOTE) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n } else if (\n startIndex === i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === CharCode.U &&\n ch2 === CharCode.R &&\n ch1 === CharCode.L &&\n ch === CharCode.OPEN_PAREN\n ) {\n lastChIndex = i = consumeQuotedText(text, CharCode.CLOSE_PAREN, i, endIndex);\n } else if (ch > CharCode.SPACE) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & CharCode.UPPER_CASE;\n }\n return lastChIndex;\n}\n\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nexport function consumeQuotedText(\n text: string,\n quoteCharCode: number,\n startIndex: number,\n endIndex: number,\n): number {\n let ch1 = -1; // 1st previous character\n let index = startIndex;\n while (index < endIndex) {\n const ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== CharCode.BACK_SLASH) {\n return index;\n }\n if (ch == CharCode.BACK_SLASH && ch1 === CharCode.BACK_SLASH) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n } else {\n ch1 = ch;\n }\n }\n throw ngDevMode\n ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex)\n : new Error();\n}\n\nfunction malformedStyleError(text: string, expecting: string, index: number): never {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\n `Malformed style at location ${index} in string '` +\n text.substring(0, index) +\n '[>>' +\n text.substring(index, index + 1) +\n '<<]' +\n text.slice(index + 1) +\n `'. Expecting '${expecting}'.`,\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.dev/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {TNode} from '../interfaces/node';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {LView, RENDERER, TView} from '../interfaces/view';\nimport {getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {\n elementPropertyInternal,\n setInputsForProperty,\n storePropertyBindingMetadata,\n} from './shared';\n\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵproperty<T>(\n propName: string,\n value: T,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵproperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n value,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nexport function setDirectiveInputsWhichShadowsStyling(\n tView: TView,\n tNode: TNode,\n lView: LView,\n value: any,\n isClassBased: boolean,\n) {\n const inputs = tNode.inputs!;\n const property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, value);\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.dev/license\n */\n\nimport {SafeValue, unwrapSafeValue} from '../../sanitization/bypass';\nimport {KeyValueArray, keyValueArrayGet, keyValueArraySet} from '../../util/array_utils';\nimport {\n assertDefined,\n assertEqual,\n assertLessThan,\n assertNotEqual,\n throwError,\n} from '../../util/assert';\nimport {EMPTY_ARRAY} from '../../util/empty';\nimport {concatStringsWithSpace, stringify} from '../../util/stringify';\nimport {assertFirstUpdatePass} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {AttributeMarker} from '../interfaces/attribute_marker';\nimport {DirectiveDef} from '../interfaces/definition';\nimport {TAttributes, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {\n getTStylingRangeNext,\n getTStylingRangeNextDuplicate,\n getTStylingRangePrev,\n getTStylingRangePrevDuplicate,\n TStylingKey,\n TStylingRange,\n} from '../interfaces/styling';\nimport {LView, RENDERER, TData, TView} from '../interfaces/view';\nimport {applyStyling} from '../node_manipulation';\nimport {\n getCurrentDirectiveDef,\n getLView,\n getSelectedIndex,\n getTView,\n incrementBindingIndex,\n} from '../state';\nimport {insertTStylingBinding} from '../styling/style_binding_list';\nimport {\n getLastParsedKey,\n getLastParsedValue,\n parseClassName,\n parseClassNameNext,\n parseStyle,\n parseStyleNext,\n} from '../styling/styling_parser';\nimport {NO_CHANGE} from '../tokens';\nimport {getNativeByIndex} from '../util/view_utils';\n\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\n\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleProp(\n prop: string,\n value: string | number | SafeValue | undefined | null,\n suffix?: string | null,\n): typeof ɵɵstyleProp {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\n}\n\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nexport function ɵɵclassProp(\n className: string,\n value: boolean | undefined | null,\n): typeof ɵɵclassProp {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\n}\n\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nexport function ɵɵstyleMap(styles: {[styleName: string]: any} | string | undefined | null): void {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function styleStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n }\n}\n\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nexport function ɵɵclassMap(\n classes: {[className: string]: boolean | undefined | null} | string | undefined | null,\n): void {\n checkStylingMap(classKeyValueArraySet, classStringParser, classes, true);\n}\n\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nexport function classStringParser(keyValueArray: KeyValueArray<any>, text: string): void {\n for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingProperty(\n prop: string,\n value: any | NO_CHANGE,\n suffix: string | undefined | null,\n isClassBased: boolean,\n): void {\n const lView = getLView();\n const tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n const tNode = tView.data[getSelectedIndex()] as TNode;\n updateStyling(\n tView,\n tNode,\n lView,\n lView[RENDERER],\n prop,\n (lView[bindingIndex + 1] = normalizeSuffix(value, suffix)),\n isClassBased,\n bindingIndex,\n );\n }\n}\n\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nexport function checkStylingMap(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: any | NO_CHANGE,\n isClassBased: boolean,\n): void {\n const tView = getTView();\n const bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n const lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tView.data[getSelectedIndex()] as TNode;\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n const tStylingKey = tView.data[bindingIndex];\n assertEqual(\n Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey,\n false,\n \"Styling linked list shadow input should be marked as 'false'\",\n );\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode &&\n isClassBased === false &&\n staticPrefix !== null &&\n assertEqual(staticPrefix.endsWith(';'), true, \"Expecting static portion to end with ';'\");\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n } else {\n updateStylingMap(\n tView,\n tNode,\n lView,\n lView[RENDERER],\n lView[bindingIndex + 1],\n (lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value)),\n isClassBased,\n bindingIndex,\n );\n }\n }\n}\n\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView: TView, bindingIndex: number): boolean {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(\n tView: TView,\n tStylingKey: TStylingKey,\n bindingIndex: number,\n isClassBased: boolean,\n): void {\n ngDevMode && assertFirstUpdatePass(tView);\n const tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n const tNode = tData[getSelectedIndex()] as TNode;\n ngDevMode && assertDefined(tNode, 'TNode expected');\n const isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function wrapInStaticStylingKey(\n tData: TData,\n tNode: TNode,\n stylingKey: TStylingKey,\n isClassBased: boolean,\n): TStylingKey {\n const hostDirectiveDef = getCurrentDirectiveDef(tData);\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n const isFirstStylingInstructionInTemplate =\n ((isClassBased ? tNode.classBindings : tNode.styleBindings) as any as number) === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n } else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n const directiveStylingLast = tNode.directiveStylingLast;\n const isFirstStylingInstructionInHostBinding =\n directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey = collectStylingFromDirectives(\n hostDirectiveDef,\n tData,\n tNode,\n stylingKey,\n isClassBased,\n );\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(\n null,\n tData,\n tNode,\n templateStylingKey[1] /* unwrap previous statics */,\n isClassBased,\n );\n templateStylingKey = collectStylingFromTAttrs(\n templateStylingKey,\n tNode.attrs,\n isClassBased,\n );\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n } else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(\n tData: TData,\n tNode: TNode,\n isClassBased: boolean,\n): TStylingKey | undefined {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)] as TStylingKey;\n}\n\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(\n tData: TData,\n tNode: TNode,\n isClassBased: boolean,\n tStylingKey: TStylingKey,\n): void {\n const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(\n getTStylingRangeNext(bindings),\n 0,\n 'Expecting to have at least one template styling binding.',\n );\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(\n tData: TData,\n tNode: TNode,\n isClassBased: boolean,\n): KeyValueArray<any> | null {\n let residual: KeyValueArray<any> | null | undefined = undefined;\n const directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(\n tNode.directiveStylingLast,\n -1,\n 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.',\n );\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n const attrs = (tData[i] as DirectiveDef<any>).hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased) as KeyValueArray<any> | null;\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased) as KeyValueArray<any> | null;\n}\n\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(\n hostDirectiveDef: DirectiveDef<any> | null,\n tData: TData,\n tNode: TNode,\n stylingKey: TStylingKey,\n isClassBased: boolean,\n): TStylingKey {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n let currentDirective: DirectiveDef<any> | null = null;\n const directiveEnd = tNode.directiveEnd;\n let directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n } else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast] as DirectiveDef<any>;\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef) break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(\n stylingKey: TStylingKey | undefined,\n attrs: TAttributes | null,\n isClassBased: boolean,\n): TStylingKey {\n const desiredMarker = isClassBased ? AttributeMarker.Classes : AttributeMarker.Styles;\n let currentMarker = AttributeMarker.ImplicitAttributes;\n if (attrs !== null) {\n for (let i = 0; i < attrs.length; i++) {\n const item = attrs[i] as number | string;\n if (typeof item === 'number') {\n currentMarker = item;\n } else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : (['', stylingKey] as any);\n }\n keyValueArraySet(\n stylingKey as KeyValueArray<any>,\n item,\n isClassBased ? true : attrs[++i],\n );\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that `style` can be processed. This is done\n * for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nexport function toStylingKeyValueArray(\n keyValueArraySet: (keyValueArray: KeyValueArray<any>, key: string, value: any) => void,\n stringParser: (styleKeyValueArray: KeyValueArray<any>, text: string) => void,\n value: string | string[] | {[key: string]: any} | SafeValue | null | undefined,\n): KeyValueArray<any> {\n if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY as any;\n const styleKeyValueArray: KeyValueArray<any> = [] as any;\n const unwrappedValue = unwrapSafeValue(value) as string | string[] | {[key: string]: any};\n if (Array.isArray(unwrappedValue)) {\n for (let i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n } else if (typeof unwrappedValue === 'object') {\n for (const key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n } else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n } else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function styleKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: string, value: any) {\n keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n\n/**\n * Class-binding-specific function for setting the `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nexport function classKeyValueArraySet(keyValueArray: KeyValueArray<any>, key: unknown, value: any) {\n // We use `classList.add` to eventually add the CSS classes to the DOM node. Any value passed into\n // `add` is stringified and added to the `class` attribute, e.g. even null, undefined or numbers\n // will be added. Stringify the key here so that our internal data structure matches the value in\n // the DOM. The only exceptions are empty strings and strings that contain spaces for which\n // the browser throws an error. We ignore such values, because the error is somewhat cryptic.\n const stringKey = String(key);\n if (stringKey !== '' && !stringKey.includes(' ')) {\n keyValueArraySet(keyValueArray, stringKey, value);\n }\n}\n\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(\n tView: TView,\n tNode: TNode,\n lView: LView,\n renderer: Renderer,\n oldKeyValueArray: KeyValueArray<any>,\n newKeyValueArray: KeyValueArray<any>,\n isClassBased: boolean,\n bindingIndex: number,\n) {\n if ((oldKeyValueArray as KeyValueArray<any> | NO_CHANGE) === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY as any;\n }\n let oldIndex = 0;\n let newIndex = 0;\n let oldKey: string | null = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n let newKey: string | null = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n const oldValue =\n oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n const newValue =\n newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n let setKey: string | null = null;\n let setValue: any = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n } else if (newKey === null || (oldKey !== null && oldKey < newKey!)) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n } else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(\n tView: TView,\n tNode: TNode,\n lView: LView,\n renderer: Renderer,\n prop: string,\n value: string | undefined | null | boolean,\n isClassBased: boolean,\n bindingIndex: number,\n) {\n if (!(tNode.type & TNodeType.AnyRNode)) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n const tData = tView.data;\n const tRange = tData[bindingIndex + 1] as TStylingRange;\n const higherPriorityValue = getTStylingRangeNextDuplicate(tRange)\n ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased)\n : undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n const rNode = getNativeByIndex(getSelectedIndex(), lView) as RElement;\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(\n tData: TData,\n tNode: TNode | null,\n lView: LView,\n prop: string,\n index: number,\n isClassBased: boolean,\n): any {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n const isPrevDirection = tNode === null;\n let value: any = undefined;\n while (index > 0) {\n const rawKey = tData[index] as TStylingKey;\n const containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n const key = containsStatics ? (rawKey as string[])[1] : rawKey;\n const isStylingMap = key === null;\n let valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined;\n }\n let currentValue = isStylingMap\n ? keyValueArrayGet(valueAtLViewIndex, prop)\n : key === prop\n ? valueAtLViewIndex\n : undefined;\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey as KeyValueArray<any>, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n const tRange = tData[index + 1] as TStylingRange;\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual!, prop);\n }\n }\n return value;\n}\n\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value: any): boolean {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(\n value: any,\n suffix: string | undefined | null,\n): string | null | undefined | boolean {\n if (value == null || value === '') {\n // do nothing\n // Do not add the suffix if the value is going to be empty.\n // As it produce invalid CSS, which the browsers will automatically omit but Domino will not.\n // Example: `\"left\": \"px;\"` instead of `\"left\": \"\"`.\n } else if (typeof suffix === 'string') {\n value = value + suffix;\n } else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nexport function hasStylingInputShadow(tNode: TNode, isClassBased: boolean) {\n return (tNode.flags & (isClassBased ? TNodeFlags.hasClassInput : TNodeFlags.hasStyleInput)) !== 0;\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.dev/license\n */\n\nimport {keyValueArraySet} from '../../util/array_utils';\nimport {getLView} from '../state';\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {checkStylingMap, classStringParser} from './styling';\n\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate2(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate3(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate4(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate5(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate6(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate7(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolate8(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): void {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nexport function ɵɵclassMapInterpolateV(values: any[]): void {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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.dev/license\n */\n\nimport {TrackByFunction} from '../change_detection';\nimport {formatRuntimeError, RuntimeErrorCode} from '../errors';\n\nimport {stringifyForError} from './util/stringify_utils';\n\n/**\n * A type representing the live collection to be reconciled with any new (incoming) collection. This\n * is an adapter class that makes it possible to work with different internal data structures,\n * regardless of the actual values of the incoming collection.\n */\nexport abstract class LiveCollection<T, V> {\n abstract get length(): number;\n abstract at(index: number): V;\n abstract attach(index: number, item: T): void;\n abstract detach(index: number): T;\n abstract create(index: number, value: V): T;\n destroy(item: T): void {\n // noop by default\n }\n updateValue(index: number, value: V): void {\n // noop by default\n }\n\n // operations below could be implemented on top of the operations defined so far, but having\n // them explicitly allow clear expression of intent and potentially more performant\n // implementations\n swap(index1: number, index2: number): void {\n const startIdx = Math.min(index1, index2);\n const endIdx = Math.max(index1, index2);\n const endItem = this.detach(endIdx);\n if (endIdx - startIdx > 1) {\n const startItem = this.detach(startIdx);\n this.attach(startIdx, endItem);\n this.attach(endIdx, startItem);\n } else {\n this.attach(startIdx, endItem);\n }\n }\n move(prevIndex: number, newIdx: number): void {\n this.attach(newIdx, this.detach(prevIndex));\n }\n}\n\nfunction valuesMatching<V>(\n liveIdx: number,\n liveValue: V,\n newIdx: number,\n newValue: V,\n trackBy: TrackByFunction<V>,\n): number {\n if (liveIdx === newIdx && Object.is(liveValue, newValue)) {\n // matching and no value identity to update\n return 1;\n } else if (Object.is(trackBy(liveIdx, liveValue), trackBy(newIdx, newValue))) {\n // matching but requires value identity update\n return -1;\n }\n\n return 0;\n}\n\nfunction recordDuplicateKeys(keyToIdx: Map<unknown, Set<number>>, key: unknown, idx: number): void {\n const idxSoFar = keyToIdx.get(key);\n\n if (idxSoFar !== undefined) {\n idxSoFar.add(idx);\n } else {\n keyToIdx.set(key, new Set([idx]));\n }\n}\n\n/**\n * The live collection reconciliation algorithm that perform various in-place operations, so it\n * reflects the content of the new (incoming) collection.\n *\n * The reconciliation algorithm has 2 code paths:\n * - \"fast\" path that don't require any memory allocation;\n * - \"slow\" path that requires additional memory allocation for intermediate data structures used to\n * collect additional information about the live collection.\n * It might happen that the algorithm switches between the two modes in question in a single\n * reconciliation path - generally it tries to stay on the \"fast\" path as much as possible.\n *\n * The overall complexity of the algorithm is O(n + m) for speed and O(n) for memory (where n is the\n * length of the live collection and m is the length of the incoming collection). Given the problem\n * at hand the complexity / performance constraints makes it impossible to perform the absolute\n * minimum of operation to reconcile the 2 collections. The algorithm makes different tradeoffs to\n * stay within reasonable performance bounds and may apply sub-optimal number of operations in\n * certain situations.\n *\n * @param liveCollection the current, live collection;\n * @param newCollection the new, incoming collection;\n * @param trackByFn key generation function that determines equality between items in the life and\n * incoming collection;\n */\nexport function reconcile<T, V>(\n liveCollection: LiveCollection<T, V>,\n newCollection: Iterable<V> | undefined | null,\n trackByFn: TrackByFunction<V>,\n): void {\n let detachedItems: UniqueValueMultiKeyMap<unknown, T> | undefined = undefined;\n let liveKeysInTheFuture: Set<unknown> | undefined = undefined;\n\n let liveStartIdx = 0;\n let liveEndIdx = liveCollection.length - 1;\n\n const duplicateKeys = ngDevMode ? new Map<unknown, Set<number>>() : undefined;\n\n if (Array.isArray(newCollection)) {\n let newEndIdx = newCollection.length - 1;\n\n while (liveStartIdx <= liveEndIdx && liveStartIdx <= newEndIdx) {\n // compare from the beginning\n const liveStartValue = liveCollection.at(liveStartIdx);\n const newStartValue = newCollection[liveStartIdx];\n\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys!, trackByFn(liveStartIdx, newStartValue), liveStartIdx);\n }\n\n const isStartMatching = valuesMatching(\n liveStartIdx,\n liveStartValue,\n liveStartIdx,\n newStartValue,\n trackByFn,\n );\n if (isStartMatching !== 0) {\n if (isStartMatching < 0) {\n liveCollection.updateValue(liveStartIdx, newStartValue);\n }\n liveStartIdx++;\n continue;\n }\n\n // compare from the end\n // TODO(perf): do _all_ the matching from the end\n const liveEndValue = liveCollection.at(liveEndIdx);\n const newEndValue = newCollection[newEndIdx];\n\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys!, trackByFn(newEndIdx, newEndValue), newEndIdx);\n }\n\n const isEndMatching = valuesMatching(\n liveEndIdx,\n liveEndValue,\n newEndIdx,\n newEndValue,\n trackByFn,\n );\n if (isEndMatching !== 0) {\n if (isEndMatching < 0) {\n liveCollection.updateValue(liveEndIdx, newEndValue);\n }\n liveEndIdx--;\n newEndIdx--;\n continue;\n }\n\n // Detect swap and moves:\n const liveStartKey = trackByFn(liveStartIdx, liveStartValue);\n const liveEndKey = trackByFn(liveEndIdx, liveEndValue);\n const newStartKey = trackByFn(liveStartIdx, newStartValue);\n if (Object.is(newStartKey, liveEndKey)) {\n const newEndKey = trackByFn(newEndIdx, newEndValue);\n // detect swap on both ends;\n if (Object.is(newEndKey, liveStartKey)) {\n liveCollection.swap(liveStartIdx, liveEndIdx);\n liveCollection.updateValue(liveEndIdx, newEndValue);\n newEndIdx--;\n liveEndIdx--;\n } else {\n // the new item is the same as the live item with the end pointer - this is a move forward\n // to an earlier index;\n liveCollection.move(liveEndIdx, liveStartIdx);\n }\n liveCollection.updateValue(liveStartIdx, newStartValue);\n liveStartIdx++;\n continue;\n }\n\n // Fallback to the slow path: we need to learn more about the content of the live and new\n // collections.\n detachedItems ??= new UniqueValueMultiKeyMap();\n liveKeysInTheFuture ??= initLiveItemsInTheFuture(\n liveCollection,\n liveStartIdx,\n liveEndIdx,\n trackByFn,\n );\n\n // Check if I'm inserting a previously detached item: if so, attach it here\n if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newStartKey)) {\n liveCollection.updateValue(liveStartIdx, newStartValue);\n liveStartIdx++;\n liveEndIdx++;\n } else if (!liveKeysInTheFuture.has(newStartKey)) {\n // Check if we seen a new item that doesn't exist in the old collection and must be INSERTED\n const newItem = liveCollection.create(liveStartIdx, newCollection[liveStartIdx]);\n liveCollection.attach(liveStartIdx, newItem);\n liveStartIdx++;\n liveEndIdx++;\n } else {\n // We know that the new item exists later on in old collection but we don't know its index\n // and as the consequence can't move it (don't know where to find it). Detach the old item,\n // hoping that it unlocks the fast path again.\n detachedItems.set(liveStartKey, liveCollection.detach(liveStartIdx));\n liveEndIdx--;\n }\n }\n\n // Final cleanup steps:\n // - more items in the new collection => insert\n while (liveStartIdx <= newEndIdx) {\n createOrAttach(\n liveCollection,\n detachedItems,\n trackByFn,\n liveStartIdx,\n newCollection[liveStartIdx],\n );\n liveStartIdx++;\n }\n } else if (newCollection != null) {\n // iterable - immediately fallback to the slow path\n const newCollectionIterator = newCollection[Symbol.iterator]();\n let newIterationResult = newCollectionIterator.next();\n while (!newIterationResult.done && liveStartIdx <= liveEndIdx) {\n const liveValue = liveCollection.at(liveStartIdx);\n const newValue = newIterationResult.value;\n\n if (ngDevMode) {\n recordDuplicateKeys(duplicateKeys!, trackByFn(liveStartIdx, newValue), liveStartIdx);\n }\n\n const isStartMatching = valuesMatching(\n liveStartIdx,\n liveValue,\n liveStartIdx,\n newValue,\n trackByFn,\n );\n if (isStartMatching !== 0) {\n // found a match - move on, but update value\n if (isStartMatching < 0) {\n liveCollection.updateValue(liveStartIdx, newValue);\n }\n liveStartIdx++;\n newIterationResult = newCollectionIterator.next();\n } else {\n detachedItems ??= new UniqueValueMultiKeyMap();\n liveKeysInTheFuture ??= initLiveItemsInTheFuture(\n liveCollection,\n liveStartIdx,\n liveEndIdx,\n trackByFn,\n );\n\n // Check if I'm inserting a previously detached item: if so, attach it here\n const newKey = trackByFn(liveStartIdx, newValue);\n if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newKey)) {\n liveCollection.updateValue(liveStartIdx, newValue);\n liveStartIdx++;\n liveEndIdx++;\n newIterationResult = newCollectionIterator.next();\n } else if (!liveKeysInTheFuture.has(newKey)) {\n liveCollection.attach(liveStartIdx, liveCollection.create(liveStartIdx, newValue));\n liveStartIdx++;\n liveEndIdx++;\n newIterationResult = newCollectionIterator.next();\n } else {\n // it is a move forward - detach the current item without advancing in collections\n const liveKey = trackByFn(liveStartIdx, liveValue);\n detachedItems.set(liveKey, liveCollection.detach(liveStartIdx));\n liveEndIdx--;\n }\n }\n }\n\n // this is a new item as we run out of the items in the old collection - create or attach a\n // previously detached one\n while (!newIterationResult.done) {\n createOrAttach(\n liveCollection,\n detachedItems,\n trackByFn,\n liveCollection.length,\n newIterationResult.value,\n );\n newIterationResult = newCollectionIterator.next();\n }\n }\n\n // Cleanups common to the array and iterable:\n // - more items in the live collection => delete starting from the end;\n while (liveStartIdx <= liveEndIdx) {\n liveCollection.destroy(liveCollection.detach(liveEndIdx--));\n }\n\n // - destroy items that were detached but never attached again.\n detachedItems?.forEach((item) => {\n liveCollection.destroy(item);\n });\n\n // report duplicate keys (dev mode only)\n if (ngDevMode) {\n let duplicatedKeysMsg = [];\n for (const [key, idxSet] of duplicateKeys!) {\n if (idxSet.size > 1) {\n const idx = [...idxSet].sort((a, b) => a - b);\n for (let i = 1; i < idx.length; i++) {\n duplicatedKeysMsg.push(\n `key \"${stringifyForError(key)}\" at index \"${idx[i - 1]}\" and \"${idx[i]}\"`,\n );\n }\n }\n }\n\n if (duplicatedKeysMsg.length > 0) {\n const message = formatRuntimeError(\n RuntimeErrorCode.LOOP_TRACK_DUPLICATE_KEYS,\n 'The provided track expression resulted in duplicated keys for a given collection. ' +\n 'Adjust the tracking expression such that it uniquely identifies all the items in the collection. ' +\n 'Duplicated keys were: \\n' +\n duplicatedKeysMsg.join(', \\n') +\n '.',\n );\n\n // tslint:disable-next-line:no-console\n console.warn(message);\n }\n }\n}\n\nfunction attachPreviouslyDetached<T, V>(\n prevCollection: LiveCollection<T, V>,\n detachedItems: UniqueValueMultiKeyMap<unknown, T> | undefined,\n index: number,\n key: unknown,\n): boolean {\n if (detachedItems !== undefined && detachedItems.has(key)) {\n prevCollection.attach(index, detachedItems.get(key)!);\n detachedItems.delete(key);\n return true;\n }\n return false;\n}\n\nfunction createOrAttach<T, V>(\n liveCollection: LiveCollection<T, V>,\n detachedItems: UniqueValueMultiKeyMap<unknown, T> | undefined,\n trackByFn: TrackByFunction<unknown>,\n index: number,\n value: V,\n) {\n if (!attachPreviouslyDetached(liveCollection, detachedItems, index, trackByFn(index, value))) {\n const newItem = liveCollection.create(index, value);\n liveCollection.attach(index, newItem);\n } else {\n liveCollection.updateValue(index, value);\n }\n}\n\nfunction initLiveItemsInTheFuture<T>(\n liveCollection: LiveCollection<unknown, unknown>,\n start: number,\n end: number,\n trackByFn: TrackByFunction<unknown>,\n): Set<unknown> {\n const keys = new Set();\n for (let i = start; i <= end; i++) {\n keys.add(trackByFn(i, liveCollection.at(i)));\n }\n return keys;\n}\n\n/**\n * A specific, partial implementation of the Map interface with the following characteristics:\n * - allows multiple values for a given key;\n * - maintain FIFO order for multiple values corresponding to a given key;\n * - assumes that all values are unique.\n *\n * The implementation aims at having the minimal overhead for cases where keys are _not_ duplicated\n * (the most common case in the list reconciliation algorithm). To achieve this, the first value for\n * a given key is stored in a regular map. Then, when more values are set for a given key, we\n * maintain a form of linked list in a separate map. To maintain this linked list we assume that all\n * values (in the entire collection) are unique.\n */\nexport class UniqueValueMultiKeyMap<K, V> {\n // A map from a key to the first value corresponding to this key.\n private kvMap = new Map<K, V>();\n // A map that acts as a linked list of values - each value maps to the next value in this \"linked\n // list\" (this only works if values are unique). Allocated lazily to avoid memory consumption when\n // there are no duplicated values.\n private _vMap: Map<V, V> | undefined = undefined;\n\n has(key: K): boolean {\n return this.kvMap.has(key);\n }\n\n delete(key: K): boolean {\n if (!this.has(key)) return false;\n\n const value = this.kvMap.get(key)!;\n if (this._vMap !== undefined && this._vMap.has(value)) {\n this.kvMap.set(key, this._vMap.get(value)!);\n this._vMap.delete(value);\n } else {\n this.kvMap.delete(key);\n }\n\n return true;\n }\n\n get(key: K): V | undefined {\n return this.kvMap.get(key);\n }\n\n set(key: K, value: V): void {\n if (this.kvMap.has(key)) {\n let prevValue = this.kvMap.get(key)!;\n\n // Note: we don't use `assertNotSame`, because the value needs to be stringified even if\n // there is no error which can freeze the browser for large values (see #58509).\n if (ngDevMode && prevValue === value) {\n throw new Error(`Detected a duplicated value ${value} for the key ${key}`);\n }\n\n if (this._vMap === undefined) {\n this._vMap = new Map();\n }\n\n const vMap = this._vMap;\n while (vMap.has(prevValue)) {\n prevValue = vMap.get(prevValue)!;\n }\n vMap.set(prevValue, value);\n } else {\n this.kvMap.set(key, value);\n }\n }\n\n forEach(cb: (v: V, k: K) => void) {\n for (let [key, value] of this.kvMap) {\n cb(value, key);\n if (this._vMap !== undefined) {\n const vMap = this._vMap;\n while (vMap.has(value)) {\n value = vMap.get(value)!;\n cb(value, key);\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {TrackByFunction} from '../../change_detection';\nimport {formatRuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DehydratedContainerView} from '../../hydration/interfaces';\nimport {findMatchingDehydratedView} from '../../hydration/views';\nimport {assertDefined, assertFunction} from '../../util/assert';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {assertLContainer, assertLView, assertTNode} from '../assert';\nimport {bindingUpdated} from '../bindings';\nimport {CONTAINER_HEADER_OFFSET, LContainer} from '../interfaces/container';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {TNode} from '../interfaces/node';\nimport {\n CONTEXT,\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n HYDRATION,\n LView,\n TVIEW,\n TView,\n} from '../interfaces/view';\nimport {LiveCollection, reconcile} from '../list_reconciliation';\nimport {destroyLView, detachView} from '../node_manipulation';\nimport {getLView, getSelectedIndex, getTView, nextBindingIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\nimport {getConstant, getTNode} from '../util/view_utils';\nimport {\n addLViewToLContainer,\n createAndRenderEmbeddedLView,\n getLViewFromLContainer,\n removeLViewFromLContainer,\n shouldAddViewToDom,\n} from '../view_manipulation';\n\nimport {declareTemplate} from './template';\n\n/**\n * The conditional instruction represents the basic building block on the runtime side to support\n * built-in \"if\" and \"switch\". On the high level this instruction is responsible for adding and\n * removing views selected by a conditional expression.\n *\n * @param matchingTemplateIndex Index of a template TNode representing a conditional view to be\n * inserted; -1 represents a special case when there is no view to insert.\n * @param contextValue Value that should be exposed as the context of the conditional.\n * @codeGenApi\n */\nexport function ɵɵconditional<T>(matchingTemplateIndex: number, contextValue?: T) {\n performanceMarkFeature('NgControlFlow');\n\n const hostLView = getLView();\n const bindingIndex = nextBindingIndex();\n const prevMatchingTemplateIndex: number =\n hostLView[bindingIndex] !== NO_CHANGE ? hostLView[bindingIndex] : -1;\n const prevContainer =\n prevMatchingTemplateIndex !== -1\n ? getLContainer(hostLView, HEADER_OFFSET + prevMatchingTemplateIndex)\n : undefined;\n const viewInContainerIdx = 0;\n\n if (bindingUpdated(hostLView, bindingIndex, matchingTemplateIndex)) {\n const prevConsumer = setActiveConsumer(null);\n try {\n // The index of the view to show changed - remove the previously displayed one\n // (it is a noop if there are no active views in a container).\n if (prevContainer !== undefined) {\n removeLViewFromLContainer(prevContainer, viewInContainerIdx);\n }\n\n // Index -1 is a special case where none of the conditions evaluates to\n // a truthy value and as the consequence we've got no view to show.\n if (matchingTemplateIndex !== -1) {\n const nextLContainerIndex = HEADER_OFFSET + matchingTemplateIndex;\n const nextContainer = getLContainer(hostLView, nextLContainerIndex);\n const templateTNode = getExistingTNode(hostLView[TVIEW], nextLContainerIndex);\n\n const dehydratedView = findMatchingDehydratedView(\n nextContainer,\n templateTNode.tView!.ssrId,\n );\n const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, contextValue, {\n dehydratedView,\n });\n\n addLViewToLContainer(\n nextContainer,\n embeddedLView,\n viewInContainerIdx,\n shouldAddViewToDom(templateTNode, dehydratedView),\n );\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n } else if (prevContainer !== undefined) {\n // We might keep displaying the same template but the actual value of the expression could have\n // changed - re-bind in context.\n const lView = getLViewFromLContainer<T | undefined>(prevContainer, viewInContainerIdx);\n if (lView !== undefined) {\n lView[CONTEXT] = contextValue;\n }\n }\n}\n\nexport class RepeaterContext<T> {\n constructor(\n private lContainer: LContainer,\n public $implicit: T,\n public $index: number,\n ) {}\n\n get $count(): number {\n return this.lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n}\n\n/**\n * A built-in trackBy function used for situations where users specified collection index as a\n * tracking expression. Having this function body in the runtime avoids unnecessary code generation.\n *\n * @param index\n * @returns\n */\nexport function ɵɵrepeaterTrackByIndex(index: number) {\n return index;\n}\n\n/**\n * A built-in trackBy function used for situations where users specified collection item reference\n * as a tracking expression. Having this function body in the runtime avoids unnecessary code\n * generation.\n *\n * @param index\n * @returns\n */\nexport function ɵɵrepeaterTrackByIdentity<T>(_: number, value: T) {\n return value;\n}\n\nclass RepeaterMetadata {\n constructor(\n public hasEmptyBlock: boolean,\n public trackByFn: TrackByFunction<unknown>,\n public liveCollection?: LiveCollectionLContainerImpl,\n ) {}\n}\n\n/**\n * The repeaterCreate instruction runs in the creation part of the template pass and initializes\n * internal data structures required by the update pass of the built-in repeater logic. Repeater\n * metadata are allocated in the data part of LView with the following layout:\n * - LView[HEADER_OFFSET + index] - metadata\n * - LView[HEADER_OFFSET + index + 1] - reference to a template function rendering an item\n * - LView[HEADER_OFFSET + index + 2] - optional reference to a template function rendering an empty\n * block\n *\n * @param index Index at which to store the metadata of the repeater.\n * @param templateFn Reference to the template of the main repeater block.\n * @param decls The number of nodes, local refs, and pipes for the main block.\n * @param vars The number of bindings for the main block.\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param trackByFn Reference to the tracking function.\n * @param trackByUsesComponentInstance Whether the tracking function has any references to the\n * component instance. If it doesn't, we can avoid rebinding it.\n * @param emptyTemplateFn Reference to the template function of the empty block.\n * @param emptyDecls The number of nodes, local refs, and pipes for the empty block.\n * @param emptyVars The number of bindings for the empty block.\n * @param emptyTagName The name of the empty block container element, if applicable\n * @param emptyAttrsIndex Index of the empty block template attributes in the `consts` array.\n *\n * @codeGenApi\n */\nexport function ɵɵrepeaterCreate(\n index: number,\n templateFn: ComponentTemplate<unknown>,\n decls: number,\n vars: number,\n tagName: string | null,\n attrsIndex: number | null,\n trackByFn: TrackByFunction<unknown>,\n trackByUsesComponentInstance?: boolean,\n emptyTemplateFn?: ComponentTemplate<unknown>,\n emptyDecls?: number,\n emptyVars?: number,\n emptyTagName?: string | null,\n emptyAttrsIndex?: number | null,\n): void {\n performanceMarkFeature('NgControlFlow');\n\n ngDevMode &&\n assertFunction(\n trackByFn,\n `A track expression must be a function, was ${typeof trackByFn} instead.`,\n );\n\n const lView = getLView();\n const tView = getTView();\n const hasEmptyBlock = emptyTemplateFn !== undefined;\n const hostLView = getLView();\n const boundTrackBy = trackByUsesComponentInstance\n ? // We only want to bind when necessary, because it produces a\n // new function. For pure functions it's not necessary.\n trackByFn.bind(hostLView[DECLARATION_COMPONENT_VIEW][CONTEXT])\n : trackByFn;\n const metadata = new RepeaterMetadata(hasEmptyBlock, boundTrackBy);\n hostLView[HEADER_OFFSET + index] = metadata;\n\n declareTemplate(\n lView,\n tView,\n index + 1,\n templateFn,\n decls,\n vars,\n tagName,\n getConstant(tView.consts, attrsIndex),\n );\n\n if (hasEmptyBlock) {\n ngDevMode &&\n assertDefined(emptyDecls, 'Missing number of declarations for the empty repeater block.');\n ngDevMode &&\n assertDefined(emptyVars, 'Missing number of bindings for the empty repeater block.');\n\n declareTemplate(\n lView,\n tView,\n index + 2,\n emptyTemplateFn,\n emptyDecls!,\n emptyVars!,\n emptyTagName,\n getConstant(tView.consts, emptyAttrsIndex),\n );\n }\n}\n\nfunction isViewExpensiveToRecreate(lView: LView): boolean {\n // assumption: anything more than a text node with a binding is considered \"expensive\"\n return lView.length - HEADER_OFFSET > 2;\n}\n\nclass OperationsCounter {\n created = 0;\n destroyed = 0;\n\n reset() {\n this.created = 0;\n this.destroyed = 0;\n }\n\n recordCreate() {\n this.created++;\n }\n\n recordDestroy() {\n this.destroyed++;\n }\n\n /**\n * A method indicating if the entire collection was re-created as part of the reconciliation pass.\n * Used to warn developers about the usage of a tracking function that might result in excessive\n * amount of view creation / destroy operations.\n *\n * @returns boolean value indicating if a live collection was re-created\n */\n wasReCreated(collectionLen: number): boolean {\n return collectionLen > 0 && this.created === this.destroyed && this.created === collectionLen;\n }\n}\n\nclass LiveCollectionLContainerImpl extends LiveCollection<\n LView<RepeaterContext<unknown>>,\n unknown\n> {\n operationsCounter = ngDevMode ? new OperationsCounter() : undefined;\n\n /**\n Property indicating if indexes in the repeater context need to be updated following the live\n collection changes. Index updates are necessary if and only if views are inserted / removed in\n the middle of LContainer. Adds and removals at the end don't require index updates.\n */\n private needsIndexUpdate = false;\n constructor(\n private lContainer: LContainer,\n private hostLView: LView,\n private templateTNode: TNode,\n ) {\n super();\n }\n\n override get length(): number {\n return this.lContainer.length - CONTAINER_HEADER_OFFSET;\n }\n override at(index: number): unknown {\n return this.getLView(index)[CONTEXT].$implicit;\n }\n override attach(index: number, lView: LView<RepeaterContext<unknown>>): void {\n const dehydratedView = lView[HYDRATION] as DehydratedContainerView;\n this.needsIndexUpdate ||= index !== this.length;\n addLViewToLContainer(\n this.lContainer,\n lView,\n index,\n shouldAddViewToDom(this.templateTNode, dehydratedView),\n );\n }\n override detach(index: number): LView<RepeaterContext<unknown>> {\n this.needsIndexUpdate ||= index !== this.length - 1;\n return detachExistingView<RepeaterContext<unknown>>(this.lContainer, index);\n }\n override create(index: number, value: unknown): LView<RepeaterContext<unknown>> {\n const dehydratedView = findMatchingDehydratedView(\n this.lContainer,\n this.templateTNode.tView!.ssrId,\n );\n const embeddedLView = createAndRenderEmbeddedLView(\n this.hostLView,\n this.templateTNode,\n new RepeaterContext(this.lContainer, value, index),\n {dehydratedView},\n );\n this.operationsCounter?.recordCreate();\n\n return embeddedLView;\n }\n override destroy(lView: LView<RepeaterContext<unknown>>): void {\n destroyLView(lView[TVIEW], lView);\n this.operationsCounter?.recordDestroy();\n }\n override updateValue(index: number, value: unknown): void {\n this.getLView(index)[CONTEXT].$implicit = value;\n }\n\n reset(): void {\n this.needsIndexUpdate = false;\n this.operationsCounter?.reset();\n }\n\n updateIndexes(): void {\n if (this.needsIndexUpdate) {\n for (let i = 0; i < this.length; i++) {\n this.getLView(i)[CONTEXT].$index = i;\n }\n }\n }\n\n private getLView(index: number): LView<RepeaterContext<unknown>> {\n return getExistingLViewFromLContainer(this.lContainer, index);\n }\n}\n\n/**\n * The repeater instruction does update-time diffing of a provided collection (against the\n * collection seen previously) and maps changes in the collection to views structure (by adding,\n * removing or moving views as needed).\n * @param collection - the collection instance to be checked for changes\n * @codeGenApi\n */\nexport function ɵɵrepeater(collection: Iterable<unknown> | undefined | null): void {\n const prevConsumer = setActiveConsumer(null);\n const metadataSlotIdx = getSelectedIndex();\n try {\n const hostLView = getLView();\n const hostTView = hostLView[TVIEW];\n const metadata = hostLView[metadataSlotIdx] as RepeaterMetadata;\n const containerIndex = metadataSlotIdx + 1;\n const lContainer = getLContainer(hostLView, containerIndex);\n\n if (metadata.liveCollection === undefined) {\n const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);\n metadata.liveCollection = new LiveCollectionLContainerImpl(\n lContainer,\n hostLView,\n itemTemplateTNode,\n );\n } else {\n metadata.liveCollection.reset();\n }\n\n const liveCollection = metadata.liveCollection;\n reconcile(liveCollection, collection, metadata.trackByFn);\n\n // Warn developers about situations where the entire collection was re-created as part of the\n // reconciliation pass. Note that this warning might be \"overreacting\" and report cases where\n // the collection re-creation is the intended behavior. Still, the assumption is that most of\n // the time it is undesired.\n if (\n ngDevMode &&\n metadata.trackByFn === ɵɵrepeaterTrackByIdentity &&\n liveCollection.operationsCounter?.wasReCreated(liveCollection.length) &&\n isViewExpensiveToRecreate(getExistingLViewFromLContainer(lContainer, 0))\n ) {\n const message = formatRuntimeError(\n RuntimeErrorCode.LOOP_TRACK_RECREATE,\n `The configured tracking expression (track by identity) caused re-creation of the entire collection of size ${liveCollection.length}. ` +\n 'This is an expensive operation requiring destruction and subsequent creation of DOM nodes, directives, components etc. ' +\n 'Please review the \"track expression\" and make sure that it uniquely identifies items in a collection.',\n );\n console.warn(message);\n }\n\n // moves in the container might caused context's index to get out of order, re-adjust if needed\n liveCollection.updateIndexes();\n\n // handle empty blocks\n if (metadata.hasEmptyBlock) {\n const bindingIndex = nextBindingIndex();\n const isCollectionEmpty = liveCollection.length === 0;\n if (bindingUpdated(hostLView, bindingIndex, isCollectionEmpty)) {\n const emptyTemplateIndex = metadataSlotIdx + 2;\n const lContainerForEmpty = getLContainer(hostLView, emptyTemplateIndex);\n if (isCollectionEmpty) {\n const emptyTemplateTNode = getExistingTNode(hostTView, emptyTemplateIndex);\n const dehydratedView = findMatchingDehydratedView(\n lContainerForEmpty,\n emptyTemplateTNode.tView!.ssrId,\n );\n const embeddedLView = createAndRenderEmbeddedLView(\n hostLView,\n emptyTemplateTNode,\n undefined,\n {dehydratedView},\n );\n addLViewToLContainer(\n lContainerForEmpty,\n embeddedLView,\n 0,\n shouldAddViewToDom(emptyTemplateTNode, dehydratedView),\n );\n } else {\n removeLViewFromLContainer(lContainerForEmpty, 0);\n }\n }\n }\n } finally {\n setActiveConsumer(prevConsumer);\n }\n}\n\nfunction getLContainer(lView: LView, index: number): LContainer {\n const lContainer = lView[index];\n ngDevMode && assertLContainer(lContainer);\n\n return lContainer;\n}\n\nfunction detachExistingView<T>(lContainer: LContainer, index: number): LView<T> {\n const existingLView = detachView(lContainer, index);\n ngDevMode && assertLView(existingLView);\n\n return existingLView as LView<T>;\n}\n\nfunction getExistingLViewFromLContainer<T>(lContainer: LContainer, index: number): LView<T> {\n const existingLView = getLViewFromLContainer<T>(lContainer, index);\n ngDevMode && assertLView(existingLView);\n\n return existingLView!;\n}\n\nfunction getExistingTNode(tView: TView, index: number): TNode {\n const tNode = getTNode(tView, index);\n ngDevMode && assertTNode(tNode);\n\n return tNode;\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.dev/license\n */\n\nimport {\n invalidSkipHydrationHost,\n validateMatchingNode,\n validateNodeExists,\n} from '../../hydration/error_handling';\nimport {locateNextRNode} from '../../hydration/node_lookup_utils';\nimport {\n hasSkipHydrationAttrOnRElement,\n hasSkipHydrationAttrOnTNode,\n} from '../../hydration/skip_hydration';\nimport {\n getSerializedContainerViews,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n markRNodeAsSkippedByHydration,\n setSegmentHead,\n} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {assertDefined, assertEqual, assertIndexInRange} from '../../util/assert';\nimport {assertFirstCreatePass, assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {\n hasClassInput,\n hasStyleInput,\n TAttributes,\n TElementNode,\n TNode,\n TNodeFlags,\n TNodeType,\n} from '../interfaces/node';\nimport {Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isComponentHost, isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {\n appendChild,\n clearElementContents,\n createElementNode,\n setupStaticAttributes,\n} from '../node_manipulation';\nimport {\n decreaseElementDepthCount,\n enterSkipHydrationBlock,\n getBindingIndex,\n getCurrentTNode,\n getElementDepthCount,\n getLView,\n getNamespace,\n getTView,\n increaseElementDepthCount,\n isCurrentTNodeParent,\n isInSkipHydrationBlock,\n isSkipHydrationRootTNode,\n lastNodeWasCreated,\n leaveSkipHydrationBlock,\n setCurrentTNode,\n setCurrentTNodeAsNotParent,\n wasLastNodeCreated,\n} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getConstant} from '../util/view_utils';\n\nimport {validateElementIsKnown} from './element_validation';\nimport {setDirectiveInputsWhichShadowsStyling} from './property';\nimport {\n createDirectivesInstances,\n executeContentQueries,\n getOrCreateTNode,\n resolveDirectives,\n saveResolvedLocalsInData,\n} from './shared';\n\nfunction elementStartFirstCreatePass(\n index: number,\n tView: TView,\n lView: LView,\n name: string,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): TElementNode {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.Element, name, attrs);\n\n resolveDirectives(tView, lView, tNode, getConstant<string[]>(tViewConsts, localRefsIndex));\n\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nexport function ɵɵelementStart(\n index: number,\n name: string,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelementStart {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = HEADER_OFFSET + index;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(),\n tView.bindingStartIndex,\n 'elements should be created before any bindings',\n );\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const renderer = lView[RENDERER];\n const tNode = tView.firstCreatePass\n ? elementStartFirstCreatePass(adjustedIndex, tView, lView, name, attrsIndex, localRefsIndex)\n : (tView.data[adjustedIndex] as TElementNode);\n\n const native = _locateOrCreateElementNode(tView, lView, tNode, renderer, name, index);\n lView[adjustedIndex] = native;\n\n const hasDirectives = isDirectiveHost(tNode);\n\n if (ngDevMode && tView.firstCreatePass) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\n\n setCurrentTNode(tNode, true);\n setupStaticAttributes(renderer, native, tNode);\n\n if (!isDetachedByI18n(tNode) && wasLastNodeCreated()) {\n // In the i18n case, the translation may have removed this element, so only add it if it is not\n // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n appendChild(tView, lView, native, tNode);\n }\n\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n\n if (hasDirectives) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n return ɵɵelementStart;\n}\n\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementEnd(): typeof ɵɵelementEnd {\n let currentTNode = getCurrentTNode()!;\n ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(getCurrentTNode());\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n const tNode = currentTNode;\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode);\n\n if (isSkipHydrationRootTNode(tNode)) {\n leaveSkipHydrationBlock();\n }\n\n decreaseElementDepthCount();\n\n const tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n }\n return ɵɵelementEnd;\n}\n\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelement(\n index: number,\n name: string,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelement {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n return ɵɵelement;\n}\n\nlet _locateOrCreateElementNode: typeof locateOrCreateElementNodeImpl = (\n tView: TView,\n lView: LView,\n tNode: TNode,\n renderer: Renderer,\n name: string,\n index: number,\n) => {\n lastNodeWasCreated(true);\n return createElementNode(renderer, name, getNamespace());\n};\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of element nodes.\n */\nfunction locateOrCreateElementNodeImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n renderer: Renderer,\n name: string,\n index: number,\n): RElement {\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDetachedByI18n(tNode) ||\n isDisconnectedNode(hydrationInfo, index);\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createElementNode(renderer, name, getNamespace());\n }\n\n // Hydration mode, looking up an existing element in DOM.\n const native = locateNextRNode<RElement>(hydrationInfo, tView, lView, tNode)!;\n ngDevMode && validateMatchingNode(native, Node.ELEMENT_NODE, name, lView, tNode);\n ngDevMode && markRNodeAsClaimedByHydration(native);\n\n // This element might also be an anchor of a view container.\n if (getSerializedContainerViews(hydrationInfo, index)) {\n // Important note: this element acts as an anchor, but it's **not** a part\n // of the embedded view, so we start the segment **after** this element, taking\n // a reference to the next sibling. For example, the following template:\n // `<div #vcrTarget>` is represented in the DOM as `<div></div>...<!--container-->`,\n // so while processing a `<div>` instruction, point to the next sibling as a\n // start of a segment.\n ngDevMode && validateNodeExists(native.nextSibling, lView, tNode);\n setSegmentHead(hydrationInfo, index, native.nextSibling);\n }\n\n // Checks if the skip hydration attribute is present during hydration so we know to\n // skip attempting to hydrate this block. We check both TNode and RElement for an\n // attribute: the RElement case is needed for i18n cases, when we add it to host\n // elements during the annotation phase (after all internal data structures are setup).\n if (\n hydrationInfo &&\n (hasSkipHydrationAttrOnTNode(tNode) || hasSkipHydrationAttrOnRElement(native))\n ) {\n if (isComponentHost(tNode)) {\n enterSkipHydrationBlock(tNode);\n\n // Since this isn't hydratable, we need to empty the node\n // so there's no duplicate content after render\n clearElementContents(native);\n\n ngDevMode && markRNodeAsSkippedByHydration(native);\n } else if (ngDevMode) {\n // If this is not a component host, throw an error.\n // Hydration can be skipped on per-component basis only.\n throw invalidSkipHydrationHost(native);\n }\n }\n return native;\n}\n\nexport function enableLocateOrCreateElementNodeImpl() {\n _locateOrCreateElementNode = locateOrCreateElementNodeImpl;\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.dev/license\n */\nimport {KeyValueArray} from '../../util/array_utils';\nimport {TStylingRange} from '../interfaces/styling';\nimport {AttributeMarker} from './attribute_marker';\n\nimport {InputFlags} from './input_flags';\nimport {TIcu} from './i18n';\nimport {CssSelector} from './projection';\nimport {RNode} from './renderer_dom';\nimport type {LView, TView} from './view';\n\n/**\n * TNodeType corresponds to the {@link TNode} `type` property.\n *\n * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily\n * check if the `TNode` is of more than one type.\n *\n * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`\n * can be written as:\n * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`\n *\n * However any given `TNode` can only be of one type.\n */\nexport const enum TNodeType {\n /**\n * The TNode contains information about a DOM element aka {@link RText}.\n */\n Text = 0b1,\n\n /**\n * The TNode contains information about a DOM element aka {@link RElement}.\n */\n Element = 0b10,\n\n /**\n * The TNode contains information about an {@link LContainer} for embedded views.\n */\n Container = 0b100,\n\n /**\n * The TNode contains information about an `<ng-container>` element {@link RNode}.\n */\n ElementContainer = 0b1000,\n\n /**\n * The TNode contains information about an `<ng-content>` projection\n */\n Projection = 0b10000,\n\n /**\n * The TNode contains information about an ICU comment used in `i18n`.\n */\n Icu = 0b100000,\n\n /**\n * Special node type representing a placeholder for future `TNode` at this location.\n *\n * I18n translation blocks are created before the element nodes which they contain. (I18n blocks\n * can span over many elements.) Because i18n `TNode`s (representing text) are created first they\n * often may need to point to element `TNode`s which are not yet created. In such a case we create\n * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together\n * without knowing any information about the future nodes which will be at that location.\n *\n * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that\n * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse\n * existing `TNode` (rather than create a new one) and just update the missing information.\n */\n Placeholder = 0b1000000,\n\n /**\n * The TNode contains information about a `@let` declaration.\n */\n LetDeclaration = 0b10000000,\n\n // Combined Types These should never be used for `TNode.type` only as a useful way to check\n // if `TNode.type` is one of several choices.\n\n // See: https://github.com/microsoft/TypeScript/issues/35875 why we can't refer to existing enum.\n AnyRNode = 0b11, // Text | Element\n AnyContainer = 0b1100, // Container | ElementContainer\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nexport function toTNodeTypeAsString(tNodeType: TNodeType): string {\n let text = '';\n tNodeType & TNodeType.Text && (text += '|Text');\n tNodeType & TNodeType.Element && (text += '|Element');\n tNodeType & TNodeType.Container && (text += '|Container');\n tNodeType & TNodeType.ElementContainer && (text += '|ElementContainer');\n tNodeType & TNodeType.Projection && (text += '|Projection');\n tNodeType & TNodeType.Icu && (text += '|IcuContainer');\n tNodeType & TNodeType.Placeholder && (text += '|Placeholder');\n tNodeType & TNodeType.LetDeclaration && (text += '|LetDeclaration');\n return text.length > 0 ? text.substring(1) : text;\n}\n\n/**\n * Helper function to detect if a given value matches a `TNode` shape.\n *\n * The logic uses the `insertBeforeIndex` and its possible values as\n * a way to differentiate a TNode shape from other types of objects\n * within the `TView.data`. This is not a perfect check, but it can\n * be a reasonable differentiator, since we control the shapes of objects\n * within `TView.data`.\n */\nexport function isTNodeShape(value: unknown): value is TNode {\n return (\n value != null &&\n typeof value === 'object' &&\n ((value as TNode).insertBeforeIndex === null ||\n typeof (value as TNode).insertBeforeIndex === 'number' ||\n Array.isArray((value as TNode).insertBeforeIndex))\n );\n}\n\nexport function isLetDeclaration(tNode: TNode): boolean {\n return !!(tNode.type & TNodeType.LetDeclaration);\n}\n\n/**\n * Corresponds to the TNode.flags property.\n */\nexport const enum TNodeFlags {\n /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */\n isDirectiveHost = 0x1,\n\n /** Bit #2 - This bit is set if the node has been projected */\n isProjected = 0x2,\n\n /** Bit #3 - This bit is set if any directive on this node has content queries */\n hasContentQuery = 0x4,\n\n /** Bit #4 - This bit is set if the node has any \"class\" inputs */\n hasClassInput = 0x8,\n\n /** Bit #5 - This bit is set if the node has any \"style\" inputs */\n hasStyleInput = 0x10,\n\n /** Bit #6 - This bit is set if the node has been detached by i18n */\n isDetached = 0x20,\n\n /**\n * Bit #7 - This bit is set if the node has directives with host bindings.\n *\n * This flags allows us to guard host-binding logic and invoke it only on nodes\n * that actually have directives with host bindings.\n */\n hasHostBindings = 0x40,\n\n /**\n * Bit #8 - This bit is set if the node is a located inside skip hydration block.\n */\n inSkipHydrationBlock = 0x80,\n}\n\n/**\n * Corresponds to the TNode.providerIndexes property.\n */\nexport const enum TNodeProviderIndexes {\n /** The index of the first provider on this node is encoded on the least significant bits. */\n ProvidersStartIndexMask = 0b00000000000011111111111111111111,\n\n /**\n * The count of view providers from the component on this node is\n * encoded on the 20 most significant bits.\n */\n CptViewProvidersCountShift = 20,\n CptViewProvidersCountShifter = 0b00000000000100000000000000000000,\n}\n\n/**\n * A combination of:\n * - Attribute names and values.\n * - Special markers acting as flags to alter attributes processing.\n * - Parsed ngProjectAs selectors.\n */\nexport type TAttributes = (string | AttributeMarker | CssSelector)[];\n\n/**\n * Constants that are associated with a view. Includes:\n * - Attribute arrays.\n * - Local definition arrays.\n * - Translated messages (i18n).\n */\nexport type TConstants = (TAttributes | string)[];\n\n/**\n * Factory function that returns an array of consts. Consts can be represented as a function in\n * case any additional statements are required to define consts in the list. An example is i18n\n * where additional i18n calls are generated, which should be executed when consts are requested\n * for the first time.\n */\nexport type TConstantsFactory = () => TConstants;\n\n/**\n * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be\n * either an array or a factory function that returns that array.\n */\nexport type TConstantsOrFactory = TConstants | TConstantsFactory;\n\n/**\n * Binding data (flyweight) for a particular node that is shared between all templates\n * of a specific type.\n *\n * If a property is:\n * - PropertyAliases: that property's data was generated and this is it\n * - Null: that property's data was already generated and nothing was found.\n * - Undefined: that property's data has not yet been generated\n *\n * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern\n */\nexport interface TNode {\n /** The type of the TNode. See TNodeType. */\n type: TNodeType;\n\n /**\n * Index of the TNode in TView.data and corresponding native element in LView.\n *\n * This is necessary to get from any TNode to its corresponding native element when\n * traversing the node tree.\n *\n * If index is -1, this is a dynamically created container node or embedded view node.\n */\n index: number;\n\n /**\n * Insert before existing DOM node index.\n *\n * When DOM nodes are being inserted, normally they are being appended as they are created.\n * Under i18n case, the translated text nodes are created ahead of time as part of the\n * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead\n * needs to be inserted using `insertBeforeIndex` semantics.\n *\n * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In\n * such a case the value stores an array of text nodes to insert.\n *\n * Example:\n * ```\n * <div i18n>\n * Hello <span>World</span>!\n * </div>\n * ```\n * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text\n * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't\n * insert `World` because the `<span>` node has not yet been created. In such a case the\n * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert\n * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into\n * `<span>` itself.\n *\n * Pseudo code:\n * ```\n * if (insertBeforeIndex === null) {\n * // append as normal\n * } else if (Array.isArray(insertBeforeIndex)) {\n * // First insert current `TNode` at correct location\n * const currentNode = lView[this.index];\n * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);\n * // Now append all of the children\n * for(let i=1; i<this.insertBeforeIndex; i++) {\n * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);\n * }\n * } else {\n * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])\n * }\n * ```\n * - null: Append as normal using `parentNode.appendChild`\n * - `number`: Append using\n * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`\n *\n * *Initialization*\n *\n * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not\n * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`\n * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`\n * `TNode` at that location. See `TNodeType.Placeholder` for more information.\n */\n insertBeforeIndex: InsertBeforeIndex;\n\n /**\n * The index of the closest injector in this node's LView.\n *\n * If the index === -1, there is no injector on this node or any ancestor node in this view.\n *\n * If the index !== -1, it is the index of this node's injector OR the index of a parent\n * injector in the same view. We pass the parent injector index down the node tree of a view so\n * it's possible to find the parent injector without walking a potentially deep node tree.\n * Injector indices are not set across view boundaries because there could be multiple component\n * hosts.\n *\n * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n * injector.\n */\n injectorIndex: number;\n\n /** Stores starting index of the directives. */\n directiveStart: number;\n\n /**\n * Stores final exclusive index of the directives.\n *\n * The area right behind the `directiveStart-directiveEnd` range is used to allocate the\n * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set\n * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.\n */\n directiveEnd: number;\n\n /**\n * Offset from the `directiveStart` at which the component (one at most) of the node is stored.\n * Set to -1 if no components have been applied to the node. Component index can be found using\n * `directiveStart + componentOffset`.\n */\n componentOffset: number;\n\n /**\n * Stores the last directive which had a styling instruction.\n *\n * Initial value of this is `-1` which means that no `hostBindings` styling instruction has\n * executed. As `hostBindings` instructions execute they set the value to the index of the\n * `DirectiveDef` which contained the last `hostBindings` styling instruction.\n *\n * Valid values are:\n * - `-1` No `hostBindings` instruction has executed.\n * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of\n * the last styling instruction which executed in the `hostBindings`.\n *\n * This data is needed so that styling instructions know which static styling data needs to be\n * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data\n * since last styling instruction.\n */\n directiveStylingLast: number;\n\n /**\n * Stores indexes of property bindings. This field is only set in the ngDevMode and holds\n * indexes of property bindings so TestBed can get bound property metadata for a given node.\n */\n propertyBindings: number[] | null;\n\n /**\n * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput\n * etc.\n */\n flags: TNodeFlags;\n\n /**\n * This number stores two values using its bits:\n *\n * - the index of the first provider on that node (first 16 bits)\n * - the count of view providers from the component on this node (last 16 bits)\n */\n // TODO(misko): break this into actual vars.\n providerIndexes: TNodeProviderIndexes;\n\n /**\n * The value name associated with this node.\n * if type:\n * `TNodeType.Text`: text value\n * `TNodeType.Element`: tag name\n * `TNodeType.ICUContainer`: `TIcu`\n */\n value: any;\n\n /**\n * Attributes associated with an element. We need to store attributes to support various\n * use-cases (attribute injection, content projection with selectors, directives matching).\n * Attributes are stored statically because reading them from the DOM would be way too slow for\n * content projection and queries.\n *\n * Since attrs will always be calculated first, they will never need to be marked undefined by\n * other instructions.\n *\n * For regular attributes a name of an attribute and its value alternate in the array.\n * e.g. ['role', 'checkbox']\n * This array can contain flags that will indicate \"special attributes\" (attributes with\n * namespaces, attributes extracted from bindings and outputs).\n */\n attrs: TAttributes | null;\n\n /**\n * Same as `TNode.attrs` but contains merged data across all directive host bindings.\n *\n * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.\n * We merge attrs here so that it can be used in a performant way for initial rendering.\n *\n * The `attrs` are merged in first pass in following order:\n * - Component's `hostAttrs`\n * - Directives' `hostAttrs`\n * - Template `TNode.attrs` associated with the current `TNode`.\n */\n mergedAttrs: TAttributes | null;\n\n /**\n * A set of local names under which a given element is exported in a template and\n * visible to queries. An entry in this array can be created for different reasons:\n * - an element itself is referenced, ex.: `<div #foo>`\n * - a component is referenced, ex.: `<my-cmpt #foo>`\n * - a directive is referenced, ex.: `<my-cmpt #foo=\"directiveExportAs\">`.\n *\n * A given element might have different local names and those names can be associated\n * with a directive. We store local names at even indexes while odd indexes are reserved\n * for directive index in a view (or `-1` if there is no associated directive).\n *\n * Some examples:\n * - `<div #foo>` => `[\"foo\", -1]`\n * - `<my-cmpt #foo>` => `[\"foo\", myCmptIdx]`\n * - `<my-cmpt #foo #bar=\"directiveExportAs\">` => `[\"foo\", myCmptIdx, \"bar\", directiveIdx]`\n * - `<div #foo #bar=\"directiveExportAs\">` => `[\"foo\", -1, \"bar\", directiveIdx]`\n */\n localNames: (string | number)[] | null;\n\n /** Information about input properties that need to be set once from attribute data. */\n initialInputs: InitialInputData | null | undefined;\n\n /**\n * Input data for all directives on this node. `null` means that there are no directives with\n * inputs on this node.\n */\n inputs: NodeInputBindings | null;\n\n /**\n * Output data for all directives on this node. `null` means that there are no directives with\n * outputs on this node.\n */\n outputs: NodeOutputBindings | null;\n\n /**\n * The TView attached to this node.\n *\n * If this TNode corresponds to an LContainer with a template (e.g. structural\n * directive), the template's TView will be stored here.\n *\n * If this TNode corresponds to an element, tView will be `null`.\n */\n tView: TView | null;\n\n /**\n * The next sibling node. Necessary so we can propagate through the root nodes of a view\n * to insert them or remove them from the DOM.\n */\n next: TNode | null;\n\n /**\n * The previous sibling node.\n * This simplifies operations when we need a pointer to the previous node.\n */\n prev: TNode | null;\n\n /**\n * The next projected sibling. Since in Angular content projection works on the node-by-node\n * basis the act of projecting nodes might change nodes relationship at the insertion point\n * (target view). At the same time we need to keep initial relationship between nodes as\n * expressed in content view.\n */\n projectionNext: TNode | null;\n\n /**\n * First child of the current node.\n *\n * For component nodes, the child will always be a ContentChild (in same view).\n * For embedded view nodes, the child will be in their child view.\n */\n child: TNode | null;\n\n /**\n * Parent node (in the same view only).\n *\n * We need a reference to a node's parent so we can append the node to its parent's native\n * element at the appropriate time.\n *\n * If the parent would be in a different view (e.g. component host), this property will be null.\n * It's important that we don't try to cross component boundaries when retrieving the parent\n * because the parent will change (e.g. index, attrs) depending on where the component was\n * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through\n * LView.node instead (which will be instance-specific).\n *\n * If this is an inline view node (V), the parent will be its container.\n */\n parent: TElementNode | TContainerNode | null;\n\n /**\n * List of projected TNodes for a given component host element OR index into the said nodes.\n *\n * For easier discussion assume this example:\n * `<parent>`'s view definition:\n * ```\n * <child id=\"c1\">content1</child>\n * <child id=\"c2\"><span>content2</span></child>\n * ```\n * `<child>`'s view definition:\n * ```\n * <ng-content id=\"cont1\"></ng-content>\n * ```\n *\n * If `Array.isArray(projection)` then `TNode` is a host element:\n * - `projection` stores the content nodes which are to be projected.\n * - The nodes represent categories defined by the selector: For example:\n * `<ng-content/><ng-content select=\"abc\"/>` would represent the heads for `<ng-content/>`\n * and `<ng-content select=\"abc\"/>` respectively.\n * - The nodes we store in `projection` are heads only, we used `.next` to get their\n * siblings.\n * - The nodes `.next` is sorted/rewritten as part of the projection setup.\n * - `projection` size is equal to the number of projections `<ng-content>`. The size of\n * `c1` will be `1` because `<child>` has only one `<ng-content>`.\n * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)\n * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and\n * as a result have different set of nodes to project.\n * - without `projection` it would be difficult to efficiently traverse nodes to be projected.\n *\n * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:\n * - `projection` is an index of the host's `projection`Nodes.\n * - This would return the first head node to project:\n * `getHost(currentTNode).projection[currentTNode.projection]`.\n * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case\n * the process is recursive in nature.\n *\n * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as\n * projectable nodes during dynamic component creation.\n */\n projection: (TNode | RNode[])[] | number | null;\n\n /**\n * A collection of all `style` static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial `style`s on an element (e.g. `<div style=\"width:200px;\">`)\n * - There are one or more initial `style`s on a directive/component host\n * (e.g. `@Directive({host: {style: \"width:200px;\" } }`)\n */\n styles: string | null;\n\n /**\n * A collection of all `style` static values for an element excluding host sources.\n *\n * Populated when there are one or more initial `style`s on an element\n * (e.g. `<div style=\"width:200px;\">`)\n * Must be stored separately from `tNode.styles` to facilitate setting directive\n * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,\n * we would feed host styles back into directives as \"inputs\". If we used `tNode.attrs`, we\n * would have to concatenate the attributes on every template pass. Instead, we process once on\n * first create pass and store here.\n */\n stylesWithoutHost: string | null;\n\n /**\n * A `KeyValueArray` version of residual `styles`.\n *\n * When there are styling instructions than each instruction stores the static styling\n * which is of lower priority than itself. This means that there may be a higher priority\n * styling than the instruction.\n *\n * Imagine:\n * ```\n * <div style=\"color: highest;\" my-dir>\n *\n * @Directive({\n * host: {\n * style: 'color: lowest; ',\n * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);\n * }\n * })\n * ```\n *\n * In the above case:\n * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction\n * - `color: highest` is the residual and is stored here.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `styles` is `null`\n * - `KeyValueArray`: parsed version of `styles`.\n */\n residualStyles: KeyValueArray<any> | undefined | null;\n\n /**\n * A collection of all class static values for an element (including from host).\n *\n * This field will be populated if and when:\n *\n * - There are one or more initial classes on an element (e.g. `<div class=\"one two three\">`)\n * - There are one or more initial classes on an directive/component host\n * (e.g. `@Directive({host: {class: \"SOME_CLASS\" } }`)\n */\n classes: string | null;\n\n /**\n * A collection of all class static values for an element excluding host sources.\n *\n * Populated when there are one or more initial classes on an element\n * (e.g. `<div class=\"SOME_CLASS\">`)\n * Must be stored separately from `tNode.classes` to facilitate setting directive\n * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed\n * inputs, we would feed host classes back into directives as \"inputs\". If we used\n * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,\n * we process once on first create pass and store here.\n */\n classesWithoutHost: string | null;\n\n /**\n * A `KeyValueArray` version of residual `classes`.\n *\n * Same as `TNode.residualStyles` but for classes.\n *\n * - `undefined': not initialized.\n * - `null`: initialized but `classes` is `null`\n * - `KeyValueArray`: parsed version of `classes`.\n */\n residualClasses: KeyValueArray<any> | undefined | null;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the class bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"class\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n classBindings: TStylingRange;\n\n /**\n * Stores the head/tail index of the class bindings.\n *\n * - If no bindings, the head and tail will both be 0.\n * - If there are template bindings, stores the head/tail of the style bindings in the template.\n * - If no template bindings but there are host bindings, the head value will point to the last\n * host binding for \"style\" (not the head of the linked list), tail will be 0.\n *\n * See: `style_binding_list.ts` for details.\n *\n * This is used by `insertTStylingBinding` to know where the next styling binding should be\n * inserted so that they can be sorted in priority order.\n */\n styleBindings: TStylingRange;\n}\n\n/**\n * See `TNode.insertBeforeIndex`\n */\nexport type InsertBeforeIndex = null | number | number[];\n\n/** Static data for an element */\nexport interface TElementNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;\n /**\n * Element nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using viewData[HOST_NODE]).\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n\n /**\n * If this is a component TNode with projection, this will be an array of projected\n * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node\n * or a component without projection, it will be null.\n */\n projection: (TNode | RNode[])[] | null;\n\n /**\n * Stores TagName\n */\n value: string;\n}\n\n/** Static data for a text node */\nexport interface TTextNode extends TNode {\n /** Index in the data[] array */\n index: number;\n child: null;\n /**\n * Text nodes will have parents unless they are the first node of a component or\n * embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n}\n\n/** Static data for an LContainer */\nexport interface TContainerNode extends TNode {\n /**\n * Index in the data[] array.\n *\n * If it's -1, this is a dynamically created container node that isn't stored in\n * data[] (e.g. when you inject ViewContainerRef) .\n */\n index: number;\n child: null;\n\n /**\n * Container nodes will have parents unless:\n *\n * - They are the first node of a component or embedded view\n * - They are dynamically created\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: TView | null;\n projection: null;\n value: null;\n}\n\n/** Static data for an <ng-container> */\nexport interface TElementContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n}\n\n/** Static data for an ICU expression */\nexport interface TIcuContainerNode extends TNode {\n /** Index in the LView[] array. */\n index: number;\n child: null;\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n value: TIcu;\n}\n\n/** Static data for an LProjectionNode */\nexport interface TProjectionNode extends TNode {\n /** Index in the data[] array */\n child: null;\n /**\n * Projection nodes will have parents unless they are the first node of a component\n * or embedded view (which means their parent is in a different view and must be\n * retrieved using LView.node).\n */\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n\n /** Index of the projection node. (See TNode.projection for more info.) */\n projection: number;\n value: null;\n}\n\n/**\n * Static data for a `@let` declaration. This node is necessary, because the expression of a\n * `@let` declaration can contain code that uses the node injector (e.g. pipes). In order for\n * the node injector to work, it needs this `TNode`.\n */\nexport interface TLetDeclarationNode extends TNode {\n index: number;\n child: null;\n parent: TElementNode | TElementContainerNode | null;\n tView: null;\n projection: null;\n value: null; // TODO(crisbeto): capture the name here? Might come in handy for the dev tools.\n}\n\n/**\n * A union type representing all TNode types that can host a directive.\n */\nexport type TDirectiveHostNode = TElementNode | TContainerNode | TElementContainerNode;\n\n/**\n * Store the runtime output names for all the directives.\n *\n * i+0: directive instance index\n * i+1: privateName\n *\n * e.g.\n * ```\n * {\n * \"publicName\": [0, 'change-minified']\n * }\n */\nexport type NodeOutputBindings = Record<string, (number | string)[]>;\n\n/**\n * Store the runtime input for all directives applied to a node.\n *\n * This allows efficiently setting the same input on a directive that\n * might apply to multiple directives.\n *\n * i+0: directive instance index\n * i+1: privateName\n * i+2: input flags\n *\n * e.g.\n * ```\n * {\n * \"publicName\": [0, 'change-minified', <bit-input-flags>]\n * }\n * ```\n */\nexport type NodeInputBindings = Record<string, (number | string | InputFlags)[]>;\n\n/**\n * This array contains information about input properties that\n * need to be set once from attribute data. It's ordered by\n * directive index (relative to element) so it's simple to\n * look up a specific directive's initial input data.\n *\n * Within each sub-array:\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: initial value\n *\n * If a directive on a node does not have any input properties\n * that should be set from attributes, its index is set to null\n * to avoid a sparse array.\n *\n * e.g. [null, ['role-min', 'minified-input', 'button']]\n */\nexport type InitialInputData = (InitialInputs | null)[];\n\n/**\n * Used by InitialInputData to store input properties\n * that should be set once from attributes.\n *\n * i+0: attribute name\n * i+1: minified/internal input name\n * i+2: input flags\n * i+3: initial value\n *\n * e.g. ['role-min', 'minified-input', 'button']\n */\nexport type InitialInputs = (string | InputFlags)[];\n\n/**\n * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.\n */\nexport type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;\n\n/**\n * Type for a function that extracts a value for a local refs.\n * Example:\n * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;\n * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;\n */\nexport type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasClassInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasClassInput) !== 0;\n}\n\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nexport function hasStyleInput(tNode: TNode) {\n return (tNode.flags & TNodeFlags.hasStyleInput) !== 0;\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.dev/license\n */\nimport {validateMatchingNode, validateNodeExists} from '../../hydration/error_handling';\nimport {locateNextRNode, siblingAfter} from '../../hydration/node_lookup_utils';\nimport {\n getNgContainerSize,\n isDisconnectedNode,\n markRNodeAsClaimedByHydration,\n setSegmentHead,\n} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {assertEqual, assertIndexInRange, assertNumber} from '../../util/assert';\nimport {assertHasParent} from '../assert';\nimport {attachPatchData} from '../context_discovery';\nimport {registerPostOrderHooks} from '../hooks';\nimport {TAttributes, TElementContainerNode, TNode, TNodeType} from '../interfaces/node';\nimport {RComment} from '../interfaces/renderer_dom';\nimport {isContentQueryHost, isDirectiveHost} from '../interfaces/type_checks';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {appendChild, createCommentNode} from '../node_manipulation';\nimport {\n getBindingIndex,\n getCurrentTNode,\n getLView,\n getTView,\n isCurrentTNodeParent,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n setCurrentTNode,\n setCurrentTNodeAsNotParent,\n wasLastNodeCreated,\n} from '../state';\nimport {computeStaticStyling} from '../styling/static_styling';\nimport {getConstant} from '../util/view_utils';\n\nimport {\n createDirectivesInstances,\n executeContentQueries,\n getOrCreateTNode,\n resolveDirectives,\n saveResolvedLocalsInData,\n} from './shared';\n\nfunction elementContainerStartFirstCreatePass(\n index: number,\n tView: TView,\n lView: LView,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): TElementContainerNode {\n ngDevMode && ngDevMode.firstCreatePass++;\n\n const tViewConsts = tView.consts;\n const attrs = getConstant<TAttributes>(tViewConsts, attrsIndex);\n const tNode = getOrCreateTNode(tView, index, TNodeType.ElementContainer, 'ng-container', attrs);\n\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n\n const localRefs = getConstant<string[]>(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n\n return tNode;\n}\n\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerStart(\n index: number,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelementContainerStart {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(\n getBindingIndex(),\n tView.bindingStartIndex,\n 'element containers should be created before any bindings',\n );\n\n const tNode = tView.firstCreatePass\n ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex)\n : (tView.data[adjustedIndex] as TElementContainerNode);\n setCurrentTNode(tNode, true);\n\n const comment = _locateOrCreateElementContainerNode(tView, lView, tNode, index);\n lView[adjustedIndex] = comment;\n\n if (wasLastNodeCreated()) {\n appendChild(tView, lView, comment, tNode);\n }\n attachPatchData(comment, lView);\n\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n\n return ɵɵelementContainerStart;\n}\n\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainerEnd(): typeof ɵɵelementContainerEnd {\n let currentTNode = getCurrentTNode()!;\n const tView = getTView();\n if (isCurrentTNodeParent()) {\n setCurrentTNodeAsNotParent();\n } else {\n ngDevMode && assertHasParent(currentTNode);\n currentTNode = currentTNode.parent!;\n setCurrentTNode(currentTNode, false);\n }\n\n ngDevMode && assertTNodeType(currentTNode, TNodeType.ElementContainer);\n\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries!.elementEnd(currentTNode);\n }\n }\n return ɵɵelementContainerEnd;\n}\n\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nexport function ɵɵelementContainer(\n index: number,\n attrsIndex?: number | null,\n localRefsIndex?: number,\n): typeof ɵɵelementContainer {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\n return ɵɵelementContainer;\n}\n\nlet _locateOrCreateElementContainerNode: typeof locateOrCreateElementContainerNode = (\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n) => {\n lastNodeWasCreated(true);\n return createCommentNode(lView[RENDERER], ngDevMode ? 'ng-container' : '');\n};\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of comment nodes that\n * represent <ng-container>'s anchor.\n */\nfunction locateOrCreateElementContainerNode(\n tView: TView,\n lView: LView,\n tNode: TNode,\n index: number,\n): RComment {\n let comment: RComment;\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDisconnectedNode(hydrationInfo, index) ||\n isDetachedByI18n(tNode);\n\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createCommentNode(lView[RENDERER], ngDevMode ? 'ng-container' : '');\n }\n\n // Hydration mode, looking up existing elements in DOM.\n const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode)!;\n ngDevMode && validateNodeExists(currentRNode, lView, tNode);\n\n const ngContainerSize = getNgContainerSize(hydrationInfo, index) as number;\n ngDevMode &&\n assertNumber(\n ngContainerSize,\n 'Unexpected state: hydrating an <ng-container>, ' + 'but no hydration info is available.',\n );\n\n setSegmentHead(hydrationInfo, index, currentRNode);\n comment = siblingAfter<RComment>(ngContainerSize, currentRNode)!;\n\n if (ngDevMode) {\n validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);\n markRNodeAsClaimedByHydration(comment);\n }\n\n return comment;\n}\n\nexport function enableLocateOrCreateElementContainerNodeImpl() {\n _locateOrCreateElementContainerNode = locateOrCreateElementContainerNode;\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.dev/license\n */\nimport {OpaqueViewState} from '../interfaces/view';\nimport {getLView} from '../state';\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nexport function ɵɵgetCurrentView(): OpaqueViewState {\n return getLView() as any as OpaqueViewState;\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.dev/license\n */\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {\n getCurrentDirectiveDef,\n getLView,\n getSelectedTNode,\n getTView,\n nextBindingIndex,\n} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {\n elementPropertyInternal,\n loadComponentRenderer,\n storePropertyBindingMetadata,\n} from './shared';\n\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵhostProperty<T>(\n propName: string,\n value: T,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵhostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostProperty<T>(\n propName: string,\n value: T | NO_CHANGE,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵsyntheticHostProperty {\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵsyntheticHostProperty;\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.dev/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\n\nfunction plural(val: number): number {\nconst n = val, i = Math.floor(Math.abs(val)), v = val.toString().replace(/^[^.]*\\.?/, '').length;\n\nif (i === 1 && v === 0)\n return 1;\nreturn 5;\n}\n\nexport default [\"en\",[[\"a\",\"p\"],[\"AM\",\"PM\"],u],[[\"AM\",\"PM\"],u,u],[[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"],[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"]],u,[[\"J\",\"F\",\"M\",\"A\",\"M\",\"J\",\"J\",\"A\",\"S\",\"O\",\"N\",\"D\"],[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]],u,[[\"B\",\"A\"],[\"BC\",\"AD\"],[\"Before Christ\",\"Anno Domini\"]],0,[6,0],[\"M/d/yy\",\"MMM d, y\",\"MMMM d, y\",\"EEEE, MMMM d, y\"],[\"h:mm a\",\"h:mm:ss a\",\"h:mm:ss a z\",\"h:mm:ss a zzzz\"],[\"{1}, {0}\",u,\"{1} 'at' {0}\",u],[\".\",\",\",\";\",\"%\",\"+\",\"-\",\"E\",\"×\",\"‰\",\"∞\",\"NaN\",\":\"],[\"#,##0.###\",\"#,##0%\",\"¤#,##0.00\",\"#E0\"],\"USD\",\"$\",\"US Dollar\",{},\"ltr\", plural];\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.dev/license\n */\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {global} from '../util/global';\n\nimport localeEn from './locale_en';\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA: {[localeId: string]: any} = {};\n\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n/format-data-locale) to know how to import additional locale\n * data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nexport function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n\n LOCALE_DATA[localeId] = data;\n\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\n}\n\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function findLocaleData(locale: string): any {\n const normalizedLocale = normalizeLocale(locale);\n\n let match = getLocaleData(normalizedLocale);\n if (match) {\n return match;\n }\n\n // let's try to find a parent locale\n const parentLocale = normalizedLocale.split('-')[0];\n match = getLocaleData(parentLocale);\n if (match) {\n return match;\n }\n\n if (parentLocale === 'en') {\n return localeEn;\n }\n\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_LOCALE_DATA,\n ngDevMode && `Missing locale data for the locale \"${locale}\".`,\n );\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nexport function getLocaleCurrencyCode(locale: string): string | null {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\n}\n\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see {@link NgPlural}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n */\nexport function getLocalePluralCase(locale: string): (value: number) => number {\n const data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nexport function getLocaleData(normalizedLocale: string): any {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] =\n global.ng &&\n global.ng.common &&\n global.ng.common.locales &&\n global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nexport function unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\n\n/**\n * Index of each type of locale data from the locale data array\n */\nexport enum LocaleDataIndex {\n LocaleId = 0,\n DayPeriodsFormat,\n DayPeriodsStandalone,\n DaysFormat,\n DaysStandalone,\n MonthsFormat,\n MonthsStandalone,\n Eras,\n FirstDayOfWeek,\n WeekendRange,\n DateFormat,\n TimeFormat,\n DateTimeFormat,\n NumberSymbols,\n NumberFormats,\n CurrencyCode,\n CurrencySymbol,\n CurrencyName,\n Currencies,\n Directionality,\n PluralCase,\n ExtraData,\n}\n\n/**\n * Index of each type of locale data from the extra locale data array\n */\nexport const enum ExtraLocaleDataIndex {\n ExtraDayPeriodFormats = 0,\n ExtraDayPeriodStandalone,\n ExtraDayPeriodsRules,\n}\n\n/**\n * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)\n */\nexport const enum CurrencyIndex {\n Symbol = 0,\n SymbolNarrow,\n NbOfDigits,\n}\n\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale: string): string {\n return locale.toLowerCase().replace(/_/g, '-');\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.dev/license\n */\n\nimport {getLocalePluralCase} from './locale_data_api';\n\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n\n/**\n * Returns the plural case based on the locale\n */\nexport function getPluralCase(value: string, locale: string): string {\n const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n const result = pluralMapping[plural];\n return result !== undefined ? result : 'other';\n}\n\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nexport const DEFAULT_LOCALE_ID = 'en-US';\n\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nexport const USD_CURRENCY_CODE = 'USD';\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.dev/license\n */\n\nimport {DEFAULT_LOCALE_ID} from '../../i18n/localization';\nimport {assertDefined} from '../../util/assert';\n\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nexport function setLocaleId(localeId: string) {\n ngDevMode && assertDefined(localeId, `Expected localeId to be defined`);\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\n}\n\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nexport function getLocaleId(): string {\n return LOCALE_ID;\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\nimport {NotificationSource} from '../../change_detection/scheduling/zoneless_scheduling';\nimport {assertIndexInRange} from '../../util/assert';\nimport {NodeOutputBindings, TNode, TNodeType} from '../interfaces/node';\nimport {GlobalTargetResolver, Renderer} from '../interfaces/renderer';\nimport {RElement} from '../interfaces/renderer_dom';\nimport {isDirectiveHost} from '../interfaces/type_checks';\nimport {CLEANUP, CONTEXT, LView, RENDERER, TView} from '../interfaces/view';\nimport {assertTNodeType} from '../node_assert';\nimport {profiler} from '../profiler';\nimport {ProfilerEvent} from '../profiler_types';\nimport {getCurrentDirectiveDef, getCurrentTNode, getLView, getTView} from '../state';\nimport {getComponentLViewByIndex, getNativeByTNode, unwrapRNode} from '../util/view_utils';\n\nimport {markViewDirty} from './mark_view_dirty';\nimport {\n getOrCreateLViewCleanup,\n getOrCreateTViewCleanup,\n handleError,\n loadComponentRenderer,\n} from './shared';\n\n/**\n * Contains a reference to a function that disables event replay feature\n * for server-side rendered applications. This function is overridden with\n * an actual implementation when the event replay feature is enabled via\n * `withEventReplay()` call.\n */\nlet stashEventListener = (el: RElement, eventName: string, listenerFn: (e?: any) => any) => {};\n\nexport function setStashFn(fn: typeof stashEventListener) {\n stashEventListener = fn;\n}\n\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener - this argument is a reminder\n * from the Renderer3 infrastructure and should be removed from the instruction arguments\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵlistener(\n eventName: string,\n listenerFn: (e?: any) => any,\n useCapture?: boolean,\n eventTargetResolver?: GlobalTargetResolver,\n): typeof ɵɵlistener {\n const lView = getLView<{} | null>();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(\n tView,\n lView,\n lView[RENDERER],\n tNode,\n eventName,\n listenerFn,\n eventTargetResolver,\n );\n return ɵɵlistener;\n}\n\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nexport function ɵɵsyntheticHostListener(\n eventName: string,\n listenerFn: (e?: any) => any,\n): typeof ɵɵsyntheticHostListener {\n const tNode = getCurrentTNode()!;\n const lView = getLView<{} | null>();\n const tView = getTView();\n const currentDef = getCurrentDirectiveDef(tView.data);\n const renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);\n return ɵɵsyntheticHostListener;\n}\n\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(\n tView: TView,\n lView: LView,\n eventName: string,\n tNodeIdx: number,\n): ((e?: any) => any) | null {\n const tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n const cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n const lCleanup = lView[CLEANUP]!;\n const listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n}\n\nexport function listenerInternal(\n tView: TView,\n lView: LView<{} | null>,\n renderer: Renderer,\n tNode: TNode,\n eventName: string,\n listenerFn: (e?: any) => any,\n eventTargetResolver?: GlobalTargetResolver,\n): void {\n const isTNodeDirectiveHost = isDirectiveHost(tNode);\n const firstCreatePass = tView.firstCreatePass;\n const tCleanup: false | any[] = firstCreatePass && getOrCreateTViewCleanup(tView);\n const context = lView[CONTEXT];\n\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n const lCleanup = getOrCreateLViewCleanup(lView);\n\n ngDevMode && assertTNodeType(tNode, TNodeType.AnyRNode | TNodeType.AnyContainer);\n\n let processOutputs = true;\n\n // Adding a native event listener is applicable when:\n // - The corresponding TNode represents a DOM element.\n // - The event target has a resolver (usually resulting in a global object,\n // such as `window` or `document`).\n if (tNode.type & TNodeType.AnyRNode || eventTargetResolver) {\n const native = getNativeByTNode(tNode, lView) as RElement;\n const target = eventTargetResolver ? eventTargetResolver(native) : native;\n const lCleanupIndex = lCleanup.length;\n const idxOrTargetGetter = eventTargetResolver\n ? (_lView: LView) => eventTargetResolver(unwrapRNode(_lView[tNode.index]))\n : tNode.index;\n\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n let existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n const lastListenerFn = (<any>existingListener).__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n (<any>existingListener).__ngLastListenerFn__ = listenerFn;\n processOutputs = false;\n } else {\n listenerFn = wrapListener(tNode, lView, context, listenerFn);\n stashEventListener(native, eventName, listenerFn);\n const cleanupFn = renderer.listen(target as RElement, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n } else {\n // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n // ancestors are marked dirty when an event occurs.\n listenerFn = wrapListener(tNode, lView, context, listenerFn);\n }\n\n // subscribe to directive outputs\n const outputs = tNode.outputs;\n let props: NodeOutputBindings[keyof NodeOutputBindings] | undefined;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n const propsLength = props.length;\n if (propsLength) {\n for (let i = 0; i < propsLength; i += 2) {\n const index = props[i] as number;\n ngDevMode && assertIndexInRange(lView, index);\n const minifiedName = props[i + 1];\n const directiveInstance = lView[index];\n const output = directiveInstance[minifiedName];\n\n if (ngDevMode && !isOutputSubscribable(output)) {\n throw new Error(\n `@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`,\n );\n }\n\n const subscription = (output as SubscribableOutput<unknown>).subscribe(listenerFn);\n const idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n}\n\nfunction executeListenerWithErrorHandling(\n lView: LView,\n context: {} | null,\n listenerFn: (e?: any) => any,\n e: any,\n): boolean {\n const prevConsumer = setActiveConsumer(null);\n try {\n profiler(ProfilerEvent.OutputStart, context, listenerFn);\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n } catch (error) {\n handleError(lView, error);\n return false;\n } finally {\n profiler(ProfilerEvent.OutputEnd, context, listenerFn);\n setActiveConsumer(prevConsumer);\n }\n}\n\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(\n tNode: TNode,\n lView: LView<{} | null>,\n context: {} | null,\n listenerFn: (e?: any) => any,\n): EventListener {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e: any) {\n // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\n\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n const startView =\n tNode.componentOffset > -1 ? getComponentLViewByIndex(tNode.index, lView) : lView;\n markViewDirty(startView, NotificationSource.Listener);\n\n let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n let nextListenerFn = (<any>wrapListenerIn_markDirtyAndPreventDefault).__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n nextListenerFn = (<any>nextListenerFn).__ngNextListenerFn__;\n }\n\n return result;\n };\n}\n\n/** Describes a subscribable output field value. */\ninterface SubscribableOutput<T> {\n subscribe(listener: (v: T) => void): {unsubscribe: () => void};\n}\n\n/**\n * Whether the given value represents a subscribable output.\n *\n * For example, an `EventEmitter, a `Subject`, an `Observable` or an\n * `OutputEmitter`.\n */\nfunction isOutputSubscribable(value: unknown): value is SubscribableOutput<unknown> {\n return (\n value != null && typeof (value as Partial<SubscribableOutput<unknown>>).subscribe === 'function'\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.dev/license\n */\nimport {nextContextImpl} from '../state';\n\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nexport function ɵɵnextContext<T = any>(level: number = 1): T {\n return nextContextImpl(level);\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.dev/license\n */\nimport {findMatchingDehydratedView} from '../../hydration/views';\nimport {newArray} from '../../util/array_utils';\nimport {assertLContainer, assertTNode} from '../assert';\nimport {ComponentTemplate} from '../interfaces/definition';\nimport {TAttributes, TElementNode, TNode, TNodeFlags, TNodeType} from '../interfaces/node';\nimport {ProjectionSlots} from '../interfaces/projection';\nimport {\n DECLARATION_COMPONENT_VIEW,\n HEADER_OFFSET,\n HYDRATION,\n LView,\n T_HOST,\n TView,\n} from '../interfaces/view';\nimport {applyProjection} from '../node_manipulation';\nimport {\n getProjectAsAttrValue,\n isNodeMatchingSelectorList,\n isSelectorInSelectorList,\n} from '../node_selector_matcher';\nimport {getLView, getTView, isInSkipHydrationBlock, setCurrentTNodeAsNotParent} from '../state';\nimport {\n addLViewToLContainer,\n createAndRenderEmbeddedLView,\n shouldAddViewToDom,\n} from '../view_manipulation';\n\nimport {getOrCreateTNode} from './shared';\nimport {declareTemplate} from './template';\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nexport function matchingProjectionSlotIndex(\n tNode: TNode,\n projectionSlots: ProjectionSlots,\n): number | null {\n let wildcardNgContentIndex = null;\n const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (let i = 0; i < projectionSlots.length; i++) {\n const slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (\n ngProjectAsAttrVal === null\n ? isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true)\n : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)\n ) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n}\n\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\nexport function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void {\n const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST] as TElementNode;\n\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n const projectionHeads: (TNode | null)[] = (componentNode.projection = newArray(\n numProjectionSlots,\n null! as TNode,\n ));\n const tails: (TNode | null)[] = projectionHeads.slice();\n\n let componentChild: TNode | null = componentNode.child;\n\n while (componentChild !== null) {\n // Do not project let declarations so they don't occupy a slot.\n if (componentChild.type !== TNodeType.LetDeclaration) {\n const slotIndex = projectionSlots\n ? matchingProjectionSlotIndex(componentChild, projectionSlots)\n : 0;\n\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex]!.projectionNext = componentChild;\n } else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n }\n\n componentChild = componentChild.next;\n }\n }\n}\n\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex Index of the projection node.\n * @param selectorIndex Index of the slot selector.\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n * @param attrs Static attributes set on the `ng-content` node.\n * @param fallbackTemplateFn Template function with fallback content.\n * Will be rendered if the slot is empty at runtime.\n * @param fallbackDecls Number of declarations in the fallback template.\n * @param fallbackVars Number of variables in the fallback template.\n *\n * @codeGenApi\n */\nexport function ɵɵprojection(\n nodeIndex: number,\n selectorIndex: number = 0,\n attrs?: TAttributes,\n fallbackTemplateFn?: ComponentTemplate<unknown>,\n fallbackDecls?: number,\n fallbackVars?: number,\n): void {\n const lView = getLView();\n const tView = getTView();\n const fallbackIndex = fallbackTemplateFn ? nodeIndex + 1 : null;\n\n // Fallback content needs to be declared no matter whether the slot is empty since different\n // instances of the component may or may not insert it. Also it needs to be declare *before*\n // the projection node in order to work correctly with hydration.\n if (fallbackIndex !== null) {\n declareTemplate(\n lView,\n tView,\n fallbackIndex,\n fallbackTemplateFn!,\n fallbackDecls!,\n fallbackVars!,\n null,\n attrs,\n );\n }\n\n const tProjectionNode = getOrCreateTNode(\n tView,\n HEADER_OFFSET + nodeIndex,\n TNodeType.Projection,\n null,\n attrs || null,\n );\n\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null) {\n tProjectionNode.projection = selectorIndex;\n }\n\n // `<ng-content>` has no content. Even if there's fallback\n // content, the fallback is shown next to it.\n setCurrentTNodeAsNotParent();\n\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock();\n const componentHostNode = lView[DECLARATION_COMPONENT_VIEW][T_HOST] as TElementNode;\n const isEmpty = componentHostNode.projection![tProjectionNode.projection] === null;\n\n if (isEmpty && fallbackIndex !== null) {\n insertFallbackContent(lView, tView, fallbackIndex);\n } else if (\n isNodeCreationMode &&\n (tProjectionNode.flags & TNodeFlags.isDetached) !== TNodeFlags.isDetached\n ) {\n // re-distribution of projectable nodes is stored on a component's view level\n applyProjection(tView, lView, tProjectionNode);\n }\n}\n\n/** Inserts the fallback content of a projection slot. Assumes there's no projected content. */\nfunction insertFallbackContent(lView: LView, tView: TView, fallbackIndex: number) {\n const adjustedIndex = HEADER_OFFSET + fallbackIndex;\n const fallbackTNode = tView.data[adjustedIndex] as TNode;\n const fallbackLContainer = lView[adjustedIndex];\n ngDevMode && assertTNode(fallbackTNode);\n ngDevMode && assertLContainer(fallbackLContainer);\n\n const dehydratedView = findMatchingDehydratedView(fallbackLContainer, fallbackTNode.tView!.ssrId);\n const fallbackLView = createAndRenderEmbeddedLView(lView, fallbackTNode, undefined, {\n dehydratedView,\n });\n addLViewToLContainer(\n fallbackLContainer,\n fallbackLView,\n 0,\n shouldAddViewToDom(fallbackTNode, dehydratedView),\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.dev/license\n */\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {getBindingIndex, getLView, getSelectedTNode, getTView} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {elementPropertyInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate(\n propName: string,\n v0: any,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n}\n\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate1(\n propName: string,\n prefix: string,\n v0: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate1 {\n const lView = getLView();\n const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 1,\n prefix,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate1;\n}\n\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate2(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate2 {\n const lView = getLView();\n const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 2,\n prefix,\n i0,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate2;\n}\n\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate3(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate3 {\n const lView = getLView();\n const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 3,\n prefix,\n i0,\n i1,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate3;\n}\n\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate4(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate4 {\n const lView = getLView();\n const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 4,\n prefix,\n i0,\n i1,\n i2,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate4;\n}\n\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate5(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate5 {\n const lView = getLView();\n const interpolatedValue = interpolation5(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 5,\n prefix,\n i0,\n i1,\n i2,\n i3,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate5;\n}\n\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate6(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate6 {\n const lView = getLView();\n const interpolatedValue = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 6,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate6;\n}\n\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate7(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate7 {\n const lView = getLView();\n const interpolatedValue = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 7,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n i5,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate7;\n}\n\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolate8(\n propName: string,\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolate8 {\n const lView = getLView();\n const interpolatedValue = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode &&\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - 8,\n prefix,\n i0,\n i1,\n i2,\n i3,\n i4,\n i5,\n i6,\n suffix,\n );\n }\n return ɵɵpropertyInterpolate8;\n}\n\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings in between those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵpropertyInterpolateV(\n propName: string,\n values: any[],\n sanitizer?: SanitizerFn,\n): typeof ɵɵpropertyInterpolateV {\n const lView = getLView();\n const interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n interpolatedValue,\n lView[RENDERER],\n sanitizer,\n false,\n );\n if (ngDevMode) {\n const interpolationInBetween = [values[0]]; // prefix\n for (let i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata(\n tView.data,\n tNode,\n propName,\n getBindingIndex() - interpolationInBetween.length + 1,\n ...interpolationInBetween,\n );\n }\n }\n return ɵɵpropertyInterpolateV;\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.dev/license\n */\n\nimport {ProviderToken} from '../../di';\nimport {unwrapElementRef} from '../../linker/element_ref';\nimport {QueryList} from '../../linker/query_list';\nimport {QueryFlags} from '../interfaces/query';\nimport {\n createContentQuery,\n createViewQuery,\n getQueryResults,\n getTQuery,\n loadQueryInternal,\n} from '../query';\nimport {getCurrentQueryIndex, getLView, getTView, setCurrentQueryIndex} from '../state';\nimport {isCreationMode} from '../util/view_utils';\n\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nexport function ɵɵcontentQuery<T>(\n directiveIndex: number,\n predicate: ProviderToken<unknown> | string | string[],\n flags: QueryFlags,\n read?: any,\n): void {\n createContentQuery<T>(directiveIndex, predicate, flags, read);\n}\n\n/**\n * Creates a new view query by initializing internal data structures.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nexport function ɵɵviewQuery<T>(\n predicate: ProviderToken<unknown> | string | string[],\n flags: QueryFlags,\n read?: any,\n): void {\n createViewQuery(predicate, flags, read);\n}\n\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nexport function ɵɵqueryRefresh(queryList: QueryList<any>): boolean {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n\n setCurrentQueryIndex(queryIndex + 1);\n\n const tQuery = getTQuery(tView, queryIndex);\n if (\n queryList.dirty &&\n isCreationMode(lView) ===\n ((tQuery.metadata.flags & QueryFlags.isStatic) === QueryFlags.isStatic)\n ) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n const result = getQueryResults(lView, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nexport function ɵɵloadQuery<T>(): QueryList<T> {\n return loadQueryInternal<T>(getLView(), getCurrentQueryIndex());\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.dev/license\n */\nimport {HEADER_OFFSET, LView, TView} from '../interfaces/view';\nimport {getContextLView} from '../state';\nimport {load} from '../util/view_utils';\n\n/** Store a value in the `data` at a given `index`. */\nexport function store<T>(tView: TView, lView: LView, index: number, value: T): void {\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n if (index >= tView.data.length) {\n tView.data[index] = null;\n tView.blueprint[index] = null;\n }\n lView[index] = value;\n}\n\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nexport function ɵɵreference<T>(index: number) {\n const contextLView = getContextLView();\n return load<T>(contextLView, HEADER_OFFSET + index);\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.dev/license\n */\nimport {validateMatchingNode} from '../../hydration/error_handling';\nimport {locateNextRNode} from '../../hydration/node_lookup_utils';\nimport {isDisconnectedNode, markRNodeAsClaimedByHydration} from '../../hydration/utils';\nimport {isDetachedByI18n} from '../../i18n/utils';\nimport {assertEqual, assertIndexInRange} from '../../util/assert';\nimport {TElementNode, TNode, TNodeType} from '../interfaces/node';\nimport {RText} from '../interfaces/renderer_dom';\nimport {HEADER_OFFSET, HYDRATION, LView, RENDERER, T_HOST, TView} from '../interfaces/view';\nimport {appendChild, createTextNode} from '../node_manipulation';\nimport {\n getBindingIndex,\n getLView,\n getTView,\n isInSkipHydrationBlock,\n lastNodeWasCreated,\n setCurrentTNode,\n wasLastNodeCreated,\n} from '../state';\n\nimport {getOrCreateTNode} from './shared';\n\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nexport function ɵɵtext(index: number, value: string = ''): void {\n const lView = getLView();\n const tView = getTView();\n const adjustedIndex = index + HEADER_OFFSET;\n\n ngDevMode &&\n assertEqual(\n getBindingIndex(),\n tView.bindingStartIndex,\n 'text nodes should be created before any bindings',\n );\n ngDevMode && assertIndexInRange(lView, adjustedIndex);\n\n const tNode = tView.firstCreatePass\n ? getOrCreateTNode(tView, adjustedIndex, TNodeType.Text, value, null)\n : (tView.data[adjustedIndex] as TElementNode);\n\n const textNative = _locateOrCreateTextNode(tView, lView, tNode, value, index);\n lView[adjustedIndex] = textNative;\n\n if (wasLastNodeCreated()) {\n appendChild(tView, lView, textNative, tNode);\n }\n\n // Text nodes are self closing.\n setCurrentTNode(tNode, false);\n}\n\nlet _locateOrCreateTextNode: typeof locateOrCreateTextNodeImpl = (\n tView: TView,\n lView: LView,\n tNode: TNode,\n value: string,\n index: number,\n) => {\n lastNodeWasCreated(true);\n return createTextNode(lView[RENDERER], value);\n};\n\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of text nodes.\n */\nfunction locateOrCreateTextNodeImpl(\n tView: TView,\n lView: LView,\n tNode: TNode,\n value: string,\n index: number,\n): RText {\n const hydrationInfo = lView[HYDRATION];\n const isNodeCreationMode =\n !hydrationInfo ||\n isInSkipHydrationBlock() ||\n isDetachedByI18n(tNode) ||\n isDisconnectedNode(hydrationInfo, index);\n lastNodeWasCreated(isNodeCreationMode);\n\n // Regular creation mode.\n if (isNodeCreationMode) {\n return createTextNode(lView[RENDERER], value);\n }\n\n // Hydration mode, looking up an existing element in DOM.\n const textNative = locateNextRNode(hydrationInfo, tView, lView, tNode) as RText;\n\n ngDevMode && validateMatchingNode(textNative, Node.TEXT_NODE, null, lView, tNode);\n ngDevMode && markRNodeAsClaimedByHydration(textNative);\n\n return textNative;\n}\n\nexport function enableLocateOrCreateTextNodeImpl() {\n _locateOrCreateTextNode = locateOrCreateTextNodeImpl;\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.dev/license\n */\nimport {getLView, getSelectedIndex} from '../state';\nimport {NO_CHANGE} from '../tokens';\n\nimport {\n interpolation1,\n interpolation2,\n interpolation3,\n interpolation4,\n interpolation5,\n interpolation6,\n interpolation7,\n interpolation8,\n interpolationV,\n} from './interpolation';\nimport {textBindingInternal} from './shared';\n\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n}\n\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate1(\n prefix: string,\n v0: any,\n suffix: string,\n): typeof ɵɵtextInterpolate1 {\n const lView = getLView();\n const interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate1;\n}\n\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate2(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n suffix: string,\n): typeof ɵɵtextInterpolate2 {\n const lView = getLView();\n const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate2;\n}\n\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate3(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n suffix: string,\n): typeof ɵɵtextInterpolate3 {\n const lView = getLView();\n const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate3;\n}\n\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate4(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n suffix: string,\n): typeof ɵɵtextInterpolate4 {\n const lView = getLView();\n const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate4;\n}\n\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate5(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n suffix: string,\n): typeof ɵɵtextInterpolate5 {\n const lView = getLView();\n const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate5;\n}\n\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate6(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n suffix: string,\n): typeof ɵɵtextInterpolate6 {\n const lView = getLView();\n const interpolated = interpolation6(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n suffix,\n );\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate6;\n}\n\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate7(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n suffix: string,\n): typeof ɵɵtextInterpolate7 {\n const lView = getLView();\n const interpolated = interpolation7(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n suffix,\n );\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate7;\n}\n\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nexport function ɵɵtextInterpolate8(\n prefix: string,\n v0: any,\n i0: string,\n v1: any,\n i1: string,\n v2: any,\n i2: string,\n v3: any,\n i3: string,\n v4: any,\n i4: string,\n v5: any,\n i5: string,\n v6: any,\n i6: string,\n v7: any,\n suffix: string,\n): typeof ɵɵtextInterpolate8 {\n const lView = getLView();\n const interpolated = interpolation8(\n lView,\n prefix,\n v0,\n i0,\n v1,\n i1,\n v2,\n i2,\n v3,\n i3,\n v4,\n i4,\n v5,\n i5,\n v6,\n i6,\n v7,\n suffix,\n );\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolate8;\n}\n\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nexport function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV {\n const lView = getLView();\n const interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), interpolated as string);\n }\n return ɵɵtextInterpolateV;\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.dev/license\n */\n\nimport {bindingUpdated} from '../bindings';\nimport {SanitizerFn} from '../interfaces/sanitization';\nimport {RENDERER} from '../interfaces/view';\nimport {isWritableSignal, WritableSignal} from '../reactivity/signal';\nimport {getCurrentTNode, getLView, getSelectedTNode, getTView, nextBindingIndex} from '../state';\n\nimport {listenerInternal} from './listener';\nimport {elementPropertyInternal, storePropertyBindingMetadata} from './shared';\n\n/**\n * Update a two-way bound property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `twoWayProperty('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nexport function ɵɵtwoWayProperty<T>(\n propName: string,\n value: T | WritableSignal<T>,\n sanitizer?: SanitizerFn | null,\n): typeof ɵɵtwoWayProperty {\n // TODO(crisbeto): perf impact of re-evaluating this on each change detection?\n if (isWritableSignal(value)) {\n value = value();\n }\n\n const lView = getLView();\n const bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n const tView = getTView();\n const tNode = getSelectedTNode();\n elementPropertyInternal(\n tView,\n tNode,\n lView,\n propName,\n value,\n lView[RENDERER],\n sanitizer,\n false,\n );\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n\n return ɵɵtwoWayProperty;\n}\n\n/**\n * Function used inside two-way listeners to conditionally set the value of the bound expression.\n *\n * @param target Field on which to set the value.\n * @param value Value to be set to the field.\n *\n * @codeGenApi\n */\nexport function ɵɵtwoWayBindingSet<T>(target: unknown, value: T): boolean {\n const canWrite = isWritableSignal(target);\n canWrite && target.set(value);\n return canWrite;\n}\n\n/**\n * Adds an event listener that updates a two-way binding to the current node.\n *\n * @param eventName Name of the event.\n * @param listenerFn The function to be called when event emits.\n *\n * @codeGenApi\n */\nexport function ɵɵtwoWayListener(\n eventName: string,\n listenerFn: (e?: any) => any,\n): typeof ɵɵtwoWayListener {\n const lView = getLView<{} | null>();\n const tView = getTView();\n const tNode = getCurrentTNode()!;\n listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn);\n return ɵɵtwoWayListener;\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {TNodeType} from '../interfaces/node';\nimport {HEADER_OFFSET} from '../interfaces/view';\nimport {getContextLView, getLView, getSelectedIndex, getTView, setCurrentTNode} from '../state';\nimport {load} from '../util/view_utils';\nimport {getOrCreateTNode} from './shared';\nimport {store} from './storage';\n\n/** Object that indicates the value of a `@let` declaration that hasn't been initialized yet. */\nconst UNINITIALIZED_LET = {};\n\n/**\n * Declares an `@let` at a specific data slot. Returns itself to allow chaining.\n *\n * @param index Index at which to declare the `@let`.\n *\n * @codeGenApi\n */\nexport function ɵɵdeclareLet(index: number): typeof ɵɵdeclareLet {\n const tView = getTView();\n const lView = getLView();\n const adjustedIndex = index + HEADER_OFFSET;\n const tNode = getOrCreateTNode(tView, adjustedIndex, TNodeType.LetDeclaration, null, null);\n setCurrentTNode(tNode, false);\n store(tView, lView, adjustedIndex, UNINITIALIZED_LET);\n return ɵɵdeclareLet;\n}\n\n/**\n * Instruction that stores the value of a `@let` declaration on the current view.\n * Returns the value to allow usage inside variable initializers.\n *\n * @codeGenApi\n */\nexport function ɵɵstoreLet<T>(value: T): T {\n performanceMarkFeature('NgLet');\n const tView = getTView();\n const lView = getLView();\n const index = getSelectedIndex();\n store(tView, lView, index, value);\n return value;\n}\n\n/**\n * Retrieves the value of a `@let` declaration defined in a parent view.\n *\n * @param index Index of the declaration within the view.\n *\n * @codeGenApi\n */\nexport function ɵɵreadContextLet<T>(index: number): T {\n const contextLView = getContextLView();\n const value = load<T>(contextLView, HEADER_OFFSET + index);\n\n if (value === UNINITIALIZED_LET) {\n throw new RuntimeError(\n RuntimeErrorCode.UNINITIALIZED_LET_ACCESS,\n ngDevMode && 'Attempting to access a @let declaration whose value is not available yet',\n );\n }\n\n return value;\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.dev/license\n */\n\nimport {resolveForwardRef} from '../di/forward_ref';\nimport {ClassProvider, Provider} from '../di/interface/provider';\nimport {isClassProvider, isTypeProvider, SingleProvider} from '../di/provider_collection';\nimport {providerToFactory} from '../di/r3_injector';\nimport {assertDefined} from '../util/assert';\n\nimport {emitProviderConfiguredEvent, runInInjectorProfilerContext} from './debug/injector_profiler';\nimport {\n diPublicInInjector,\n getNodeInjectable,\n getOrCreateNodeInjectorForNode,\n NodeInjector,\n} from './di';\nimport {ɵɵdirectiveInject} from './instructions/all';\nimport {DirectiveDef} from './interfaces/definition';\nimport {NodeInjectorFactory} from './interfaces/injector';\nimport {\n TContainerNode,\n TDirectiveHostNode,\n TElementContainerNode,\n TElementNode,\n TNodeProviderIndexes,\n} from './interfaces/node';\nimport {isComponentDef} from './interfaces/type_checks';\nimport {DestroyHookData, LView, TData, TVIEW, TView} from './interfaces/view';\nimport {getCurrentTNode, getLView, getTView} from './state';\n\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nexport function providersResolver<T>(\n def: DirectiveDef<T>,\n providers: Provider[],\n viewProviders: Provider[],\n): void {\n const tView = getTView();\n if (tView.firstCreatePass) {\n const isComponent = isComponentDef(def);\n\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(\n provider: Provider,\n tInjectables: TData,\n lInjectablesBlueprint: NodeInjectorFactory[],\n isComponent: boolean,\n isViewProvider: boolean,\n): void {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(\n provider[i],\n tInjectables,\n lInjectablesBlueprint,\n isComponent,\n isViewProvider,\n );\n }\n } else {\n const tView = getTView();\n const lView = getLView();\n const tNode = getCurrentTNode()!;\n let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n\n const providerFactory = providerToFactory(provider);\n if (ngDevMode) {\n const injector = new NodeInjector(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n );\n runInInjectorProfilerContext(injector, token, () => {\n emitProviderConfiguredEvent(provider as SingleProvider, isViewProvider);\n });\n }\n\n const beginIndex = tNode.providerIndexes & TNodeProviderIndexes.ProvidersStartIndexMask;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount =\n tNode.providerIndexes >> TNodeProviderIndexes.CptViewProvidersCountShift;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(\n token,\n tInjectables,\n isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount,\n endIndex,\n );\n if (existingFactoryIndex === -1) {\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n ),\n tView,\n token,\n );\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n\n const existingProvidersFactoryIndex = indexOf(\n token,\n tInjectables,\n beginIndex + cptViewProvidersCount,\n endIndex,\n );\n const existingViewProvidersFactoryIndex = indexOf(\n token,\n tInjectables,\n beginIndex,\n beginIndex + cptViewProvidersCount,\n );\n const doesProvidersFactoryExist =\n existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist =\n existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (\n (isViewProvider && !doesViewProvidersFactoryExist) ||\n (!isViewProvider && !doesProvidersFactoryExist)\n ) {\n // Cases 1.a and 2.a\n diPublicInInjector(\n getOrCreateNodeInjectorForNode(\n tNode as TElementNode | TContainerNode | TElementContainerNode,\n lView,\n ),\n tView,\n token,\n );\n const factory = multiFactory(\n isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver,\n lInjectablesBlueprint.length,\n isViewProvider,\n isComponent,\n providerFactory,\n );\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += TNodeProviderIndexes.CptViewProvidersCountShifter;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(\n lInjectablesBlueprint![\n isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex\n ],\n providerFactory,\n !isViewProvider && isComponent,\n );\n registerDestroyHooksIfSupported(\n tView,\n provider,\n existingProvidersFactoryIndex > -1\n ? existingProvidersFactoryIndex\n : existingViewProvidersFactoryIndex,\n indexInFactory,\n );\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders!++;\n }\n }\n }\n}\n\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(\n tView: TView,\n provider: Exclude<Provider, any[]>,\n contextIndex: number,\n indexInFactory?: number,\n) {\n const providerIsTypeProvider = isTypeProvider(provider);\n const providerIsClassProvider = isClassProvider(provider);\n\n if (providerIsTypeProvider || providerIsClassProvider) {\n // Resolve forward references as `useClass` can hold a forward reference.\n const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n const prototype = classToken.prototype;\n const ngOnDestroy = prototype.ngOnDestroy;\n\n if (ngOnDestroy) {\n const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n\n if (!providerIsTypeProvider && (provider as ClassProvider).multi) {\n ngDevMode &&\n assertDefined(\n indexInFactory,\n 'indexInFactory when registering multi factory destroy hook',\n );\n const existingCallbacksIndex = hooks.indexOf(contextIndex);\n\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n } else {\n (hooks[existingCallbacksIndex + 1] as DestroyHookData).push(indexInFactory!, ngOnDestroy);\n }\n } else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(\n multiFactory: NodeInjectorFactory,\n factory: () => any,\n isComponentProvider: boolean,\n): number {\n if (isComponentProvider) {\n multiFactory.componentProviders!++;\n }\n return multiFactory.multi!.push(factory) - 1;\n}\n\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item: any, arr: any[], begin: number, end: number) {\n for (let i = begin; i < end; i++) {\n if (arr[i] === item) return i;\n }\n return -1;\n}\n\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(\n this: NodeInjectorFactory,\n _: undefined,\n tData: TData,\n lData: LView,\n tNode: TDirectiveHostNode,\n): any[] {\n return multiResolve(this.multi!, []);\n}\n\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(\n this: NodeInjectorFactory,\n _: undefined,\n tData: TData,\n lView: LView,\n tNode: TDirectiveHostNode,\n): any[] {\n const factories = this.multi!;\n let result: any[];\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders!;\n const multiProviders = getNodeInjectable(\n lView,\n lView[TVIEW],\n this.providerFactory!.index!,\n tNode,\n );\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}\n\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories: Array<() => any>, result: any[]): any[] {\n for (let i = 0; i < factories.length; i++) {\n const factory = factories[i]! as () => null;\n result.push(factory());\n }\n return result;\n}\n\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(\n factoryFn: (\n this: NodeInjectorFactory,\n _: undefined,\n tData: TData,\n lData: LView,\n tNode: TDirectiveHostNode,\n ) => any,\n index: number,\n isViewProvider: boolean,\n isComponent: boolean,\n f: () => any,\n): NodeInjectorFactory {\n const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\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.dev/license\n */\nimport {ProcessProvidersFunction, Provider} from '../../di/interface/provider';\nimport {providersResolver} from '../di_setup';\nimport {DirectiveDef} from '../interfaces/definition';\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ɵɵProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nexport function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders: Provider[] = []) {\n return (definition: DirectiveDef<T>) => {\n definition.providersResolver = (\n def: DirectiveDef<T>,\n processProvidersFn?: ProcessProvidersFunction,\n ) => {\n return providersResolver(\n def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders,\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.dev/license\n */\nimport {ɵɵinject as inject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable as defineInjectable} from '../../di/interface/defs';\nimport {internalImportProvidersFrom} from '../../di/provider_collection';\nimport {EnvironmentInjector} from '../../di/r3_injector';\nimport {OnDestroy} from '../../interface/lifecycle_hooks';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {ComponentDef} from '../interfaces/definition';\nimport {createEnvironmentInjector} from '../ng_module_ref';\n\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nclass StandaloneService implements OnDestroy {\n cachedInjectors = new Map<ComponentDef<unknown>, EnvironmentInjector | null>();\n\n constructor(private _injector: EnvironmentInjector) {}\n\n getOrCreateStandaloneInjector(componentDef: ComponentDef<unknown>): EnvironmentInjector | null {\n if (!componentDef.standalone) {\n return null;\n }\n\n if (!this.cachedInjectors.has(componentDef)) {\n const providers = internalImportProvidersFrom(false, componentDef.type);\n const standaloneInjector =\n providers.length > 0\n ? createEnvironmentInjector(\n [providers],\n this._injector,\n `Standalone[${componentDef.type.name}]`,\n )\n : null;\n this.cachedInjectors.set(componentDef, standaloneInjector);\n }\n\n return this.cachedInjectors.get(componentDef)!;\n }\n\n ngOnDestroy() {\n try {\n for (const injector of this.cachedInjectors.values()) {\n if (injector !== null) {\n injector.destroy();\n }\n }\n } finally {\n this.cachedInjectors.clear();\n }\n }\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ defineInjectable({\n token: StandaloneService,\n providedIn: 'environment',\n factory: () => new StandaloneService(inject(EnvironmentInjector)),\n });\n}\n\n/**\n * A feature that acts as a setup code for the {@link StandaloneService}.\n *\n * The most important responsibility of this feature is to expose the \"getStandaloneInjector\"\n * function (an entry points to a standalone injector creation) on a component definition object. We\n * go through the features infrastructure to make sure that the standalone injector creation logic\n * is tree-shakable and not included in applications that don't use standalone components.\n *\n * @codeGenApi\n */\nexport function ɵɵStandaloneFeature(definition: ComponentDef<unknown>) {\n performanceMarkFeature('NgStandalone');\n definition.getStandaloneInjector = (parentInjector: EnvironmentInjector) => {\n return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(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.dev/license\n */\n\nimport {isForwardRef, resolveForwardRef} from '../di/forward_ref';\nimport {Type} from '../interface/type';\nimport {flatten} from '../util/array_utils';\nimport {noSideEffects} from '../util/closure';\nimport {EMPTY_ARRAY} from '../util/empty';\n\nimport {extractDefListOrFactory, getNgModuleDef} from './definition';\nimport {depsTracker} from './deps_tracker/deps_tracker';\nimport {\n ComponentDef,\n ComponentType,\n NgModuleScopeInfoFromDecorator,\n RawScopeInfoFromDecorator,\n} from './interfaces/definition';\nimport {isModuleWithProviders} from './jit/util';\n\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nexport function ɵɵsetComponentScope(\n type: ComponentType<any>,\n directives: Type<any>[] | (() => Type<any>[]),\n pipes: Type<any>[] | (() => Type<any>[]),\n): void {\n const def = type.ɵcmp as ComponentDef<any>;\n def.directiveDefs = extractDefListOrFactory(directives, /* pipeDef */ false);\n def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */ true);\n}\n\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nexport function ɵɵsetNgModuleScope(type: any, scope: NgModuleScopeInfoFromDecorator): unknown {\n return noSideEffects(() => {\n const ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = convertToTypeArray(scope.declarations || EMPTY_ARRAY);\n ngModuleDef.imports = convertToTypeArray(scope.imports || EMPTY_ARRAY);\n ngModuleDef.exports = convertToTypeArray(scope.exports || EMPTY_ARRAY);\n\n if (scope.bootstrap) {\n // This only happens in local compilation mode.\n ngModuleDef.bootstrap = convertToTypeArray(scope.bootstrap);\n }\n\n depsTracker.registerNgModule(type, scope);\n });\n}\n\nfunction convertToTypeArray(\n values: Type<any>[] | (() => Type<any>[]) | RawScopeInfoFromDecorator[],\n): Type<any>[] | (() => Type<any>[]) {\n if (typeof values === 'function') {\n return values;\n }\n\n const flattenValues = flatten(values);\n\n if (flattenValues.some(isForwardRef)) {\n return () => flattenValues.map(resolveForwardRef).map(maybeUnwrapModuleWithProviders);\n } else {\n return flattenValues.map(maybeUnwrapModuleWithProviders);\n }\n}\n\nfunction maybeUnwrapModuleWithProviders(value: any): Type<any> {\n return isModuleWithProviders(value) ? value.ngModule : (value as Type<any>);\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.dev/license\n */\n\nimport {assertIndexInRange} from '../util/assert';\nimport {\n bindingUpdated,\n bindingUpdated2,\n bindingUpdated3,\n bindingUpdated4,\n getBinding,\n updateBinding,\n} from './bindings';\nimport {LView} from './interfaces/view';\nimport {getBindingRoot, getLView} from './state';\nimport {NO_CHANGE} from './tokens';\n\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n return lView[bindingIndex] === NO_CHANGE\n ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn())\n : getBinding(lView, bindingIndex);\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction1(\n slotOffset: number,\n pureFn: (v: any) => any,\n exp: any,\n thisArg?: any,\n): any {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction2(\n slotOffset: number,\n pureFn: (v1: any, v2: any) => any,\n exp1: any,\n exp2: any,\n thisArg?: any,\n): any {\n return pureFunction2Internal(\n getLView(),\n getBindingRoot(),\n slotOffset,\n pureFn,\n exp1,\n exp2,\n thisArg,\n );\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction3(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n thisArg?: any,\n): any {\n return pureFunction3Internal(\n getLView(),\n getBindingRoot(),\n slotOffset,\n pureFn,\n exp1,\n exp2,\n exp3,\n thisArg,\n );\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction4(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n thisArg?: any,\n): any {\n return pureFunction4Internal(\n getLView(),\n getBindingRoot(),\n slotOffset,\n pureFn,\n exp1,\n exp2,\n exp3,\n exp4,\n thisArg,\n );\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction5(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different\n ? updateBinding(\n lView,\n bindingIndex + 5,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5)\n : pureFn(exp1, exp2, exp3, exp4, exp5),\n )\n : getBinding(lView, bindingIndex + 5);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction6(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n exp6: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different\n ? updateBinding(\n lView,\n bindingIndex + 6,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6)\n : pureFn(exp1, exp2, exp3, exp4, exp5, exp6),\n )\n : getBinding(lView, bindingIndex + 6);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction7(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n exp6: any,\n exp7: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different\n ? updateBinding(\n lView,\n bindingIndex + 7,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7)\n : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7),\n )\n : getBinding(lView, bindingIndex + 7);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunction8(\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n exp5: any,\n exp6: any,\n exp7: any,\n exp8: any,\n thisArg?: any,\n): any {\n const bindingIndex = getBindingRoot() + slotOffset;\n const lView = getLView();\n const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different\n ? updateBinding(\n lView,\n bindingIndex + 8,\n thisArg\n ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)\n : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8),\n )\n : getBinding(lView, bindingIndex + 8);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nexport function ɵɵpureFunctionV(\n slotOffset: number,\n pureFn: (...v: any[]) => any,\n exps: any[],\n thisArg?: any,\n): any {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView: LView, returnValueIndex: number) {\n ngDevMode && assertIndexInRange(lView, returnValueIndex);\n const lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction1Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v: any) => any,\n exp: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp)\n ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp))\n : getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction2Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v1: any, v2: any) => any,\n exp1: any,\n exp2: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2)\n ? updateBinding(\n lView,\n bindingIndex + 2,\n thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2),\n )\n : getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunction3Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3)\n ? updateBinding(\n lView,\n bindingIndex + 3,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3),\n )\n : getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nexport function pureFunction4Internal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (v1: any, v2: any, v3: any, v4: any) => any,\n exp1: any,\n exp2: any,\n exp3: any,\n exp4: any,\n thisArg?: any,\n): any {\n const bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4)\n ? updateBinding(\n lView,\n bindingIndex + 4,\n thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4),\n )\n : getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nexport function pureFunctionVInternal(\n lView: LView,\n bindingRoot: number,\n slotOffset: number,\n pureFn: (...v: any[]) => any,\n exps: any[],\n thisArg?: any,\n): any {\n let bindingIndex = bindingRoot + slotOffset;\n let different = false;\n for (let i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different\n ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps))\n : getPureFunctionReturnValue(lView, bindingIndex);\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.dev/license\n */\n\nimport {PipeTransform} from '../change_detection/pipe_transform';\nimport {setInjectImplementation} from '../di/inject_switch';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\n\nimport {InjectorProfilerContext, setInjectorProfilerContext} from './debug/injector_profiler';\nimport {getFactoryDef} from './definition_factory';\nimport {NodeInjector, setIncludeViewProviders} from './di';\nimport {store, ɵɵdirectiveInject} from './instructions/all';\nimport {isHostComponentStandalone} from './instructions/element_validation';\nimport {PipeDef, PipeDefList} from './interfaces/definition';\nimport {TTextNode} from './interfaces/node';\nimport {CONTEXT, DECLARATION_COMPONENT_VIEW, HEADER_OFFSET, LView, TVIEW} from './interfaces/view';\nimport {\n pureFunction1Internal,\n pureFunction2Internal,\n pureFunction3Internal,\n pureFunction4Internal,\n pureFunctionVInternal,\n} from './pure_function';\nimport {getBindingRoot, getCurrentTNode, getLView, getTView} from './state';\nimport {load} from './util/view_utils';\n\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nexport function ɵɵpipe(index: number, pipeName: string): any {\n const tView = getTView();\n let pipeDef: PipeDef<any>;\n const adjustedIndex = index + HEADER_OFFSET;\n\n if (tView.firstCreatePass) {\n // The `getPipeDef` throws if a pipe with a given name is not found\n // (so we use non-null assertion below).\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry)!;\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks ??= []).push(adjustedIndex, pipeDef.onDestroy);\n }\n } else {\n pipeDef = tView.data[adjustedIndex] as PipeDef<any>;\n }\n\n const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n\n let previousInjectorProfilerContext: InjectorProfilerContext;\n if (ngDevMode) {\n previousInjectorProfilerContext = setInjectorProfilerContext({\n injector: new NodeInjector(getCurrentTNode() as TTextNode, getLView()),\n token: pipeDef.type,\n });\n }\n const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n try {\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n const previousIncludeViewProviders = setIncludeViewProviders(false);\n const pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n store(tView, getLView(), adjustedIndex, pipeInstance);\n return pipeInstance;\n } finally {\n // we have to restore the injector implementation in finally, just in case the creation of the\n // pipe throws an error.\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(previousInjectorProfilerContext!);\n }\n}\n\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef(name: string, registry: PipeDefList | null): PipeDef<any> | undefined {\n if (registry) {\n if (ngDevMode) {\n const pipes = registry.filter((pipe) => pipe.name === name);\n // TODO: Throw an error in the next major\n if (pipes.length > 1) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.MULTIPLE_MATCHING_PIPES,\n getMultipleMatchingPipesMessage(name),\n ),\n );\n }\n }\n for (let i = registry.length - 1; i >= 0; i--) {\n const pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n if (ngDevMode) {\n throw new RuntimeError(RuntimeErrorCode.PIPE_NOT_FOUND, getPipeNotFoundErrorMessage(name));\n }\n return;\n}\n\n/**\n * Generates a helpful error message for the user when multiple pipes match the name.\n *\n * @param name Name of the pipe\n * @returns The error message\n */\nfunction getMultipleMatchingPipesMessage(name: string) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `check ${\n hostIsStandalone ? \"'@Component.imports' of this component\" : 'the imports of this module'\n }`;\n const errorMessage = `Multiple pipes match the name \\`${name}\\`${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\n}\n\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name: string) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `Verify that it is ${\n hostIsStandalone\n ? \"included in the '@Component.imports' of this component\"\n : 'declared or imported in this module'\n }`;\n const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\n}\n\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param offset the binding offset\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind1(index: number, offset: number, v1: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction1Internal(\n lView,\n getBindingRoot(),\n offset,\n pipeInstance.transform,\n v1,\n pipeInstance,\n )\n : pipeInstance.transform(v1);\n}\n\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction2Internal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n v1,\n v2,\n pipeInstance,\n )\n : pipeInstance.transform(v1, v2);\n}\n\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction3Internal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n v1,\n v2,\n v3,\n pipeInstance,\n )\n : pipeInstance.transform(v1, v2, v3);\n}\n\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBind4(\n index: number,\n slotOffset: number,\n v1: any,\n v2: any,\n v3: any,\n v4: any,\n): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunction4Internal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n v1,\n v2,\n v3,\n v4,\n pipeInstance,\n )\n : pipeInstance.transform(v1, v2, v3, v4);\n}\n\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nexport function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any {\n const adjustedIndex = index + HEADER_OFFSET;\n const lView = getLView();\n const pipeInstance = load<PipeTransform>(lView, adjustedIndex);\n return isPure(lView, adjustedIndex)\n ? pureFunctionVInternal(\n lView,\n getBindingRoot(),\n slotOffset,\n pipeInstance.transform,\n values,\n pipeInstance,\n )\n : pipeInstance.transform.apply(pipeInstance, values);\n}\n\nfunction isPure(lView: LView, index: number): boolean {\n return (<PipeDef<any>>lView[TVIEW].data[index]).pure;\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.dev/license\n */\n\nimport {createTemplateRef, TemplateRef} from '../linker/template_ref';\nimport {TNode} from './interfaces/node';\nimport {LView} from './interfaces/view';\n\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nexport function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null {\n return createTemplateRef(tNode, lView);\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.dev/license\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nexport class Version {\n public readonly major: string;\n public readonly minor: string;\n public readonly patch: string;\n\n constructor(public full: string) {\n const parts = full.split('.');\n this.major = parts[0];\n this.minor = parts[1];\n this.patch = parts.slice(2).join('.');\n }\n}\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('18.2.13');\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.dev/license\n */\n\n/*\n * This file exists to support compilation of @angular/core in Ivy mode.\n *\n * When the Angular compiler processes a compilation unit, it normally writes imports to\n * @angular/core. When compiling the core package itself this strategy isn't usable. Instead, the\n * compiler writes imports to this file.\n *\n * Only a subset of such imports are supported - core is not allowed to declare components or pipes.\n * A check in ngtsc's `R3SymbolsImportRewriter` validates this condition. The rewriter is only used\n * when compiling @angular/core and is responsible for translating an external name (prefixed with\n * ɵ) to the internal symbol name as exported below.\n *\n * The below symbols are used for @Injectable and @NgModule compilation.\n */\n\nexport {ɵɵinject} from './di/injector_compatibility';\nexport {ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵInjectableDeclaration} from './di/interface/defs';\nexport {NgModuleDef} from './metadata/ng_module_def';\nexport {ɵɵdefineNgModule} from './render3/definition';\nexport {\n ɵɵFactoryDeclaration,\n ɵɵInjectorDeclaration,\n ɵɵNgModuleDeclaration,\n} from './render3/interfaces/public_definitions';\nexport {setClassMetadata, setClassMetadataAsync} from './render3/metadata';\nexport {NgModuleFactory} from './render3/ng_module_ref';\nexport {noSideEffects as ɵnoSideEffects} from './util/closure';\n\n/**\n * The existence of this constant (in this particular file) informs the Angular compiler that the\n * current program is actually @angular/core, which needs to be compiled specially.\n */\nexport const ITS_JUST_ANGULAR = true;\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.dev/license\n */\n\nimport {Injectable} from './di';\n\n@Injectable({providedIn: 'platform'})\nexport class Console {\n log(message: string): void {\n // tslint:disable-next-line:no-console\n console.log(message);\n }\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n warn(message: string): void {\n // tslint:disable-next-line:no-console\n console.warn(message);\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.dev/license\n */\n\nimport {Inject, Injectable, InjectionToken} from '../di';\nimport {NgZone} from '../zone/ng_zone';\n\n/**\n * Testability API.\n * `declare` keyword causes tsickle to generate externs, so these methods are\n * not renamed by Closure Compiler.\n * @publicApi\n */\nexport declare interface PublicTestability {\n isStable(): boolean;\n whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;\n findProviders(using: any, provider: string, exactMatch: boolean): any[];\n}\n\n// Angular internal, not intended for public API.\nexport interface PendingMacrotask {\n source: string;\n creationLocation: Error;\n runCount?: number;\n data?: TaskData;\n}\n\nexport interface TaskData {\n target?: XMLHttpRequest;\n delay?: number;\n isPeriodic?: boolean;\n}\n\ninterface WaitCallback {\n // Needs to be 'any' - setTimeout returns a number according to ES6, but\n // on NodeJS it returns a Timer.\n timeoutId: any;\n doneCb: Function;\n updateCb?: Function;\n}\n\n/**\n * Internal injection token that can used to access an instance of a Testability class.\n *\n * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is\n * needed to ensure that there are no direct references to the `Testability` class, so it can be\n * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class\n * should be available, this token is used to add a provider that references the `Testability`\n * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.\n */\nexport const TESTABILITY = new InjectionToken<Testability>('');\n\n/**\n * Internal injection token to retrieve Testability getter class instance.\n */\nexport const TESTABILITY_GETTER = new InjectionToken<GetTestability>('');\n\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser.\n *\n * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also\n * instantiate Testability by default (in both development and production modes).\n *\n * For applications bootstrapped using the `bootstrapApplication` function, Testability is not\n * included by default. You can include it into your applications by getting the list of necessary\n * providers using the `provideProtractorTestingSupport()` function and adding them into the\n * `options.providers` array. Example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class Testability implements PublicTestability {\n private _isZoneStable: boolean = true;\n private _callbacks: WaitCallback[] = [];\n\n private taskTrackingZone: {macroTasks: Task[]} | null = null;\n\n constructor(\n private _ngZone: NgZone,\n private registry: TestabilityRegistry,\n @Inject(TESTABILITY_GETTER) testabilityGetter: GetTestability,\n ) {\n // If there was no Testability logic registered in the global scope\n // before, register the current testability getter as a global one.\n if (!_testabilityGetter) {\n setTestabilityGetter(testabilityGetter);\n testabilityGetter.addToWindow(registry);\n }\n this._watchAngularEvents();\n _ngZone.run(() => {\n this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n\n private _watchAngularEvents(): void {\n this._ngZone.onUnstable.subscribe({\n next: () => {\n this._isZoneStable = false;\n },\n });\n\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.subscribe({\n next: () => {\n NgZone.assertNotInAngularZone();\n queueMicrotask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n },\n });\n });\n }\n\n /**\n * Whether an associated application is stable\n */\n isStable(): boolean {\n return this._isZoneStable && !this._ngZone.hasPendingMacrotasks;\n }\n\n private _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n queueMicrotask(() => {\n while (this._callbacks.length !== 0) {\n let cb = this._callbacks.pop()!;\n clearTimeout(cb.timeoutId);\n cb.doneCb();\n }\n });\n } else {\n // Still not stable, send updates.\n let pending = this.getPendingTasks();\n this._callbacks = this._callbacks.filter((cb) => {\n if (cb.updateCb && cb.updateCb(pending)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n\n return true;\n });\n }\n }\n\n private getPendingTasks(): PendingMacrotask[] {\n if (!this.taskTrackingZone) {\n return [];\n }\n\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map((t: Task) => {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: (t as any).creationLocation as Error,\n data: t.data,\n };\n });\n }\n\n private addCallback(cb: Function, timeout?: number, updateCb?: Function) {\n let timeoutId: any = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(() => {\n this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n cb();\n }, timeout);\n }\n this._callbacks.push(<WaitCallback>{doneCb: cb, timeoutId: timeoutId, updateCb: updateCb});\n }\n\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error(\n 'Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/plugins/task-tracking\" loaded?',\n );\n }\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n }\n\n /**\n * Registers an application with a testability hook so that it can be tracked.\n * @param token token of application, root element\n *\n * @internal\n */\n registerApplication(token: any) {\n this.registry.registerApplication(token, this);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n *\n * @internal\n */\n unregisterApplication(token: any) {\n this.registry.unregisterApplication(token);\n }\n\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n}\n\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n@Injectable({providedIn: 'platform'})\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\n\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n unregisterApplication(token: any) {\n this._applications.delete(token);\n }\n\n /**\n * Unregisters all applications\n */\n unregisterAllApplications() {\n this._applications.clear();\n }\n\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n getTestability(elem: any): Testability | null {\n return this._applications.get(elem) || null;\n }\n\n /**\n * Get all registered testabilities\n */\n getAllTestabilities(): Testability[] {\n return Array.from(this._applications.values());\n }\n\n /**\n * Get all registered applications(root elements)\n */\n getAllRootElements(): any[] {\n return Array.from(this._applications.keys());\n }\n\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability | null {\n return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;\n }\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n *\n * @publicApi\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(\n registry: TestabilityRegistry,\n elem: any,\n findInAncestors: boolean,\n ): Testability | null;\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nlet _testabilityGetter: GetTestability | undefined;\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.dev/license\n */\n\nimport {Subscribable} from 'rxjs';\n\n/**\n * Determine if the argument is shaped like a Promise\n */\nexport function isPromise<T = any>(obj: any): obj is Promise<T> {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}\n\n/**\n * Determine if the argument is a Subscribable\n */\nexport function isSubscribable<T>(obj: any | Subscribable<T>): obj is Subscribable<T> {\n return !!obj && typeof obj.subscribe === 'function';\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.dev/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {inject, Injectable, InjectionToken} from '../di';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {isPromise, isSubscribable} from '../util/lang';\n\n/**\n * A DI token that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see {@link ApplicationInitStatus}\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n * ### Example with NgModule-based application\n * ```\n * function initializeApp(): Promise<any> {\n * return new Promise((resolve, reject) => {\n * // Do some asynchronous stuff\n * resolve();\n * });\n * }\n *\n * @NgModule({\n * imports: [BrowserModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: () => initializeApp,\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * ### Example with standalone application\n * ```\n * export function initializeApp(http: HttpClient) {\n * return (): Promise<any> =>\n * firstValueFrom(\n * http\n * .get(\"https://someUrl.com/api/user\")\n * .pipe(tap(user => { ... }))\n * );\n * }\n *\n * bootstrapApplication(App, {\n * providers: [\n * provideHttpClient(),\n * {\n * provide: APP_INITIALIZER,\n * useFactory: initializeApp,\n * multi: true,\n * deps: [HttpClient],\n * },\n * ],\n * });\n\n * ```\n *\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ### Example with NgModule-based application\n * ```\n * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n * return () => httpClient.get(\"https://someUrl.com/api/user\")\n * .pipe(\n * tap(user => { ... })\n * );\n * }\n *\n * @NgModule({\n * imports: [BrowserModule, HttpClientModule],\n * declarations: [AppComponent],\n * bootstrap: [AppComponent],\n * providers: [{\n * provide: APP_INITIALIZER,\n * useFactory: initializeAppFactory,\n * deps: [HttpClient],\n * multi: true\n * }]\n * })\n * export class AppModule {}\n * ```\n *\n * ### Example with standalone application\n * ```\n * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {\n * return () => httpClient.get(\"https://someUrl.com/api/user\")\n * .pipe(\n * tap(user => { ... })\n * );\n * }\n *\n * bootstrapApplication(App, {\n * providers: [\n * provideHttpClient(),\n * {\n * provide: APP_INITIALIZER,\n * useFactory: initializeAppFactory,\n * multi: true,\n * deps: [HttpClient],\n * },\n * ],\n * });\n * ```\n *\n * @publicApi\n */\nexport const APP_INITIALIZER = new InjectionToken<\n ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>\n>(ngDevMode ? 'Application Initializer' : '');\n\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class ApplicationInitStatus {\n // Using non null assertion, these fields are defined below\n // within the `new Promise` callback (synchronously).\n private resolve!: (...args: any[]) => void;\n private reject!: (...args: any[]) => void;\n\n private initialized = false;\n public readonly done = false;\n public readonly donePromise: Promise<any> = new Promise((res, rej) => {\n this.resolve = res;\n this.reject = rej;\n });\n\n private readonly appInits = inject(APP_INITIALIZER, {optional: true}) ?? [];\n\n constructor() {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !Array.isArray(this.appInits)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `APP_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof this.appInits}). ` +\n 'Please check that the `APP_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.',\n );\n }\n }\n\n /** @internal */\n runInitializers() {\n if (this.initialized) {\n return;\n }\n\n const asyncInitPromises = [];\n for (const appInits of this.appInits) {\n const initResult = appInits();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n } else if (isSubscribable(initResult)) {\n const observableAsPromise = new Promise<void>((resolve, reject) => {\n initResult.subscribe({complete: resolve, error: reject});\n });\n asyncInitPromises.push(observableAsPromise);\n }\n }\n\n const complete = () => {\n // @ts-expect-error overwriting a readonly\n this.done = true;\n this.resolve();\n };\n\n Promise.all(asyncInitPromises)\n .then(() => {\n complete();\n })\n .catch((e) => {\n this.reject(e);\n });\n\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\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.dev/license\n */\n\nimport '../util/ng_jit_mode';\n\nimport {\n setActiveConsumer,\n setThrowInvalidWriteToSignalError,\n} from '@angular/core/primitives/signals';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {ZONELESS_ENABLED} from '../change_detection/scheduling/zoneless_scheduling';\nimport {Console} from '../console';\nimport {inject} from '../di';\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector, type R3Injector} from '../di/r3_injector';\nimport {ErrorHandler, INTERNAL_APPLICATION_ERROR_HANDLER} from '../error_handler';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {ComponentFactory, ComponentRef} from '../linker/component_factory';\nimport {ComponentFactoryResolver} from '../linker/component_factory_resolver';\nimport {NgModuleRef} from '../linker/ng_module_factory';\nimport {ViewRef} from '../linker/view_ref';\nimport {PendingTasks} from '../pending_tasks';\nimport {RendererFactory2} from '../render/api';\nimport {AfterRenderManager} from '../render3/after_render/manager';\nimport {ComponentFactory as R3ComponentFactory} from '../render3/component_ref';\nimport {isStandalone} from '../render3/definition';\nimport {ChangeDetectionMode, detectChangesInternal} from '../render3/instructions/change_detection';\nimport {FLAGS, LView, LViewFlags} from '../render3/interfaces/view';\nimport {publishDefaultGlobalUtils as _publishDefaultGlobalUtils} from '../render3/util/global_utils';\nimport {removeLViewOnDestroy, requiresRefreshOrTraversal} from '../render3/util/view_utils';\nimport {ViewRef as InternalViewRef} from '../render3/view_ref';\nimport {TESTABILITY} from '../testability/testability';\nimport {isPromise} from '../util/lang';\nimport {NgZone} from '../zone/ng_zone';\n\nimport {ApplicationInitStatus} from './application_init';\n\n/**\n * A DI token that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nexport const APP_BOOTSTRAP_LISTENER = new InjectionToken<\n ReadonlyArray<(compRef: ComponentRef<any>) => void>\n>(ngDevMode ? 'appBootstrapListener' : '');\n\nexport function publishDefaultGlobalUtils() {\n ngDevMode && _publishDefaultGlobalUtils();\n}\n\n/**\n * Sets the error for an invalid write to a signal to be an Angular `RuntimeError`.\n */\nexport function publishSignalConfiguration(): void {\n setThrowInvalidWriteToSignalError(() => {\n throw new RuntimeError(\n RuntimeErrorCode.SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT,\n ngDevMode &&\n 'Writing to signals is not allowed in a `computed` or an `effect` by default. ' +\n 'Use `allowSignalWrites` in the `CreateEffectOptions` to enable this inside effects.',\n );\n });\n}\n\nexport function isBoundToModule<C>(cf: ComponentFactory<C>): boolean {\n return (cf as R3ComponentFactory<C>).isBoundToModule;\n}\n\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @deprecated\n * @publicApi\n */\nexport class NgProbeToken {\n constructor(\n public name: string,\n public token: any,\n ) {}\n}\n\n/**\n * Provides additional options to the bootstrapping process.\n *\n * @publicApi\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used when not configured in the providers.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone | 'zone.js' | 'noop';\n\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * ```\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n * ```\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n ngZoneEventCoalescing?: boolean;\n\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n * ```\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n * ```\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n ngZoneRunCoalescing?: boolean;\n\n /**\n * When false, change detection is scheduled when Angular receives\n * a clear indication that templates need to be refreshed. This includes:\n *\n * - calling `ChangeDetectorRef.markForCheck`\n * - calling `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - attaching a view that is marked dirty\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @deprecated This option was introduced out of caution as a way for developers to opt out of the\n * new behavior in v18 which schedule change detection for the above events when they occur\n * outside the Zone. After monitoring the results post-release, we have determined that this\n * feature is working as desired and do not believe it should ever be disabled by setting\n * this option to `true`.\n */\n ignoreChangesOutsideZone?: boolean;\n}\n\n/** Maximum number of times ApplicationRef will refresh all attached views in a single tick. */\nconst MAXIMUM_REFRESH_RERUNS = 10;\n\nexport function _callAndReportToErrorHandler(\n errorHandler: ErrorHandler,\n ngZone: NgZone,\n callback: () => any,\n): any {\n try {\n const result = callback();\n if (isPromise(result)) {\n return result.catch((e: any) => {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n\n return result;\n } catch (e) {\n ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n // rethrow as the exception handler might not do it\n throw e;\n }\n}\n\nexport function optionsReducer<T extends Object>(dst: T, objs: T | T[]): T {\n if (Array.isArray(objs)) {\n return objs.reduce(optionsReducer, dst);\n }\n return {...dst, ...objs};\n}\n\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class ApplicationRef {\n /** @internal */\n private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = [];\n /** @internal */\n _runningTick: boolean = false;\n private _destroyed = false;\n private _destroyListeners: Array<() => void> = [];\n /** @internal */\n _views: InternalViewRef<unknown>[] = [];\n private readonly internalErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);\n private readonly afterRenderManager = inject(AfterRenderManager);\n private readonly zonelessEnabled = inject(ZONELESS_ENABLED);\n\n /**\n * Current dirty state of the application across a number of dimensions (views, afterRender hooks,\n * etc).\n *\n * A flag set here means that `tick()` will attempt to resolve the dirtiness when executed.\n *\n * @internal\n */\n dirtyFlags = ApplicationRefDirtyFlags.None;\n\n /**\n * Like `dirtyFlags` but don't cause `tick()` to loop.\n *\n * @internal\n */\n deferredDirtyFlags = ApplicationRefDirtyFlags.None;\n\n // Needed for ComponentFixture temporarily during migration of autoDetect behavior\n // Eventually the hostView of the fixture should just attach to ApplicationRef.\n private externalTestViews: Set<InternalViewRef<unknown>> = new Set();\n private beforeRender = new Subject<boolean>();\n /** @internal */\n afterTick = new Subject<void>();\n /** @internal */\n get allViews() {\n return [...this.externalTestViews.keys(), ...this._views];\n }\n\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n public readonly componentTypes: Type<any>[] = [];\n\n /**\n * Get a list of components registered to this application.\n */\n public readonly components: ComponentRef<any>[] = [];\n\n /**\n * Returns an Observable that indicates when the application is stable or unstable.\n */\n public readonly isStable: Observable<boolean> = inject(PendingTasks).hasPendingTasks.pipe(\n map((pending) => !pending),\n );\n\n /**\n * @returns A promise that resolves when the application becomes stable\n */\n whenStable(): Promise<void> {\n let subscription: Subscription;\n return new Promise<void>((resolve) => {\n subscription = this.isStable.subscribe({\n next: (stable) => {\n if (stable) {\n resolve();\n }\n },\n });\n }).finally(() => {\n subscription.unsubscribe();\n });\n }\n\n private readonly _injector = inject(EnvironmentInjector);\n /**\n * The `EnvironmentInjector` used to create this application.\n */\n get injector(): EnvironmentInjector {\n return this._injector;\n }\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n *\n * @deprecated Passing Component factories as the `Application.bootstrap` function argument is\n * deprecated. Pass Component Types instead.\n */\n bootstrap<C>(\n componentFactory: ComponentFactory<C>,\n rootSelectorOrNode?: string | any,\n ): ComponentRef<C>;\n\n /**\n * Bootstrap a component onto the element identified by its selector or, optionally, to a\n * specified element.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a component, Angular mounts it onto a target DOM element\n * and kicks off automatic change detection. The target DOM element can be\n * provided using the `rootSelectorOrNode` argument.\n *\n * If the target DOM element is not provided, Angular tries to find one on a page\n * using the `selector` of the component that is being bootstrapped\n * (first matched element is used).\n *\n * ### Example\n *\n * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n * but it requires us to know the component while writing the application code.\n *\n * Imagine a situation where we have to wait for an API call to decide about the component to\n * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n * dynamically bootstrap a component.\n *\n * {@example core/ts/platform/platform.ts region='componentSelector'}\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * selector of the bootstrapped component.\n *\n * In the following example, we are providing a CSS selector to match the target element.\n *\n * {@example core/ts/platform/platform.ts region='cssSelector'}\n *\n * While in this example, we are providing reference to a DOM node.\n *\n * {@example core/ts/platform/platform.ts region='domNode'}\n */\n bootstrap<C>(\n componentOrFactory: ComponentFactory<C> | Type<C>,\n rootSelectorOrNode?: string | any,\n ): ComponentRef<C> {\n (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n const isComponentFactory = componentOrFactory instanceof ComponentFactory;\n const initStatus = this._injector.get(ApplicationInitStatus);\n\n if (!initStatus.done) {\n const standalone = !isComponentFactory && isStandalone(componentOrFactory);\n const errorMessage =\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Cannot bootstrap as there are still asynchronous initializers running.' +\n (standalone\n ? ''\n : ' Bootstrap components in the `ngDoBootstrap` method of the root module.');\n throw new RuntimeError(RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING, errorMessage);\n }\n\n let componentFactory: ComponentFactory<C>;\n if (isComponentFactory) {\n componentFactory = componentOrFactory;\n } else {\n const resolver = this._injector.get(ComponentFactoryResolver);\n componentFactory = resolver.resolveComponentFactory(componentOrFactory)!;\n }\n this.componentTypes.push(componentFactory.componentType);\n\n // Create a factory associated with the current module if it's not bound to some other\n const ngModule = isBoundToModule(componentFactory)\n ? undefined\n : this._injector.get(NgModuleRef);\n const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n const nativeElement = compRef.location.nativeElement;\n const testability = compRef.injector.get(TESTABILITY, null);\n testability?.registerApplication(nativeElement);\n\n compRef.onDestroy(() => {\n this.detachView(compRef.hostView);\n remove(this.components, compRef);\n testability?.unregisterApplication(nativeElement);\n });\n\n this._loadComponent(compRef);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.log(`Angular is running in development mode.`);\n }\n return compRef;\n }\n\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n tick(): void {\n if (!this.zonelessEnabled) {\n this.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeGlobal;\n }\n this._tick();\n }\n\n /** @internal */\n _tick(): void {\n (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n if (this._runningTick) {\n throw new RuntimeError(\n RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK,\n ngDevMode && 'ApplicationRef.tick is called recursively',\n );\n }\n\n const prevConsumer = setActiveConsumer(null);\n try {\n this._runningTick = true;\n this.synchronize();\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n for (let view of this._views) {\n view.checkNoChanges();\n }\n }\n } catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this.internalErrorHandler(e);\n } finally {\n this._runningTick = false;\n setActiveConsumer(prevConsumer);\n this.afterTick.next();\n }\n }\n\n /**\n * Performs the core work of synchronizing the application state with the UI, resolving any\n * pending dirtiness (potentially in a loop).\n */\n private synchronize(): void {\n let rendererFactory: RendererFactory2 | null = null;\n if (!(this._injector as R3Injector).destroyed) {\n rendererFactory = this._injector.get(RendererFactory2, null, {optional: true});\n }\n\n // When beginning synchronization, all deferred dirtiness becomes active dirtiness.\n this.dirtyFlags |= this.deferredDirtyFlags;\n this.deferredDirtyFlags = ApplicationRefDirtyFlags.None;\n\n let runs = 0;\n while (this.dirtyFlags !== ApplicationRefDirtyFlags.None && runs++ < MAXIMUM_REFRESH_RERUNS) {\n this.synchronizeOnce(rendererFactory);\n }\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && runs >= MAXIMUM_REFRESH_RERUNS) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_CHANGE_DETECTION,\n ngDevMode &&\n 'Infinite change detection while refreshing application views. ' +\n 'Ensure views are not calling `markForCheck` on every template execution or ' +\n 'that afterRender hooks always mark views for check.',\n );\n }\n }\n\n /**\n * Perform a single synchronization pass.\n */\n private synchronizeOnce(rendererFactory: RendererFactory2 | null): void {\n // If we happened to loop, deferred dirtiness can be processed as active dirtiness again.\n this.dirtyFlags |= this.deferredDirtyFlags;\n this.deferredDirtyFlags = ApplicationRefDirtyFlags.None;\n\n // First check dirty views, if there are any.\n if (this.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeAny) {\n // Change detection on views starts in targeted mode (only check components if they're\n // marked as dirty) unless global checking is specifically requested via APIs like\n // `ApplicationRef.tick()` and the `NgZone` integration.\n const useGlobalCheck = Boolean(this.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeGlobal);\n\n // Clear the view-related dirty flags.\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.ViewTreeAny;\n\n // Set the AfterRender bit, as we're checking views and will need to run afterRender hooks.\n this.dirtyFlags |= ApplicationRefDirtyFlags.AfterRender;\n\n // Check all potentially dirty views.\n this.beforeRender.next(useGlobalCheck);\n for (let {_lView, notifyErrorHandler} of this._views) {\n detectChangesInViewIfRequired(\n _lView,\n notifyErrorHandler,\n useGlobalCheck,\n this.zonelessEnabled,\n );\n }\n\n // If `markForCheck()` was called during view checking, it will have set the `ViewTreeCheck`\n // flag. We clear the flag here because, for backwards compatibility, `markForCheck()`\n // during view checking doesn't cause the view to be re-checked.\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.ViewTreeCheck;\n\n // Check if any views are still dirty after checking and we need to loop back.\n this.syncDirtyFlagsWithViews();\n if (this.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeAny) {\n // If any views are still dirty after checking, loop back before running render hooks.\n return;\n }\n } else {\n // If we skipped refreshing views above, there might still be unflushed animations\n // because we never called `detectChangesInternal` on the views.\n rendererFactory?.begin?.();\n rendererFactory?.end?.();\n }\n\n // Even if there were no dirty views, afterRender hooks might still be dirty.\n if (this.dirtyFlags & ApplicationRefDirtyFlags.AfterRender) {\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.AfterRender;\n this.afterRenderManager.execute();\n\n // afterRender hooks might influence dirty flags.\n }\n this.syncDirtyFlagsWithViews();\n }\n\n /**\n * Checks `allViews` for views which require refresh/traversal, and updates `dirtyFlags`\n * accordingly, with two potential behaviors:\n *\n * 1. If any of our views require updating, then this adds the `ViewTreeTraversal` dirty flag.\n * This _should_ be a no-op, since the scheduler should've added the flag at the same time the\n * view was marked as needing updating.\n *\n * TODO(alxhub): figure out if this behavior is still needed for edge cases.\n *\n * 2. If none of our views require updating, then clear the view-related `dirtyFlag`s. This\n * happens when the scheduler is notified of a view becoming dirty, but the view itself isn't\n * reachable through traversal from our roots (e.g. it's detached from the CD tree).\n */\n private syncDirtyFlagsWithViews(): void {\n if (this.allViews.some(({_lView}) => requiresRefreshOrTraversal(_lView))) {\n // If after running all afterRender callbacks new views are dirty, ensure we loop back.\n this.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeTraversal;\n return;\n } else {\n // Even though this flag may be set, none of _our_ views require traversal, and so the\n // `ApplicationRef` doesn't require any repeated checking.\n this.dirtyFlags &= ~ApplicationRefDirtyFlags.ViewTreeAny;\n }\n }\n\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n attachView(viewRef: ViewRef): void {\n (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n const view = viewRef as InternalViewRef<unknown>;\n this._views.push(view);\n view.attachToAppRef(this);\n }\n\n /**\n * Detaches a view from dirty checking again.\n */\n detachView(viewRef: ViewRef): void {\n (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n const view = viewRef as InternalViewRef<unknown>;\n remove(this._views, view);\n view.detachFromAppRef();\n }\n\n private _loadComponent(componentRef: ComponentRef<any>): void {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);\n if (ngDevMode && !Array.isArray(listeners)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n 'Unexpected type of the `APP_BOOTSTRAP_LISTENER` token value ' +\n `(expected an array, but got ${typeof listeners}). ` +\n 'Please check that the `APP_BOOTSTRAP_LISTENER` token is configured as a ' +\n '`multi: true` provider.',\n );\n }\n [...this._bootstrapListeners, ...listeners].forEach((listener) => listener(componentRef));\n }\n\n /** @internal */\n ngOnDestroy() {\n if (this._destroyed) return;\n\n try {\n // Call all the lifecycle hooks.\n this._destroyListeners.forEach((listener) => listener());\n\n // Destroy all registered views.\n this._views.slice().forEach((view) => view.destroy());\n } finally {\n // Indicate that this instance is destroyed.\n this._destroyed = true;\n\n // Release all references.\n this._views = [];\n this._bootstrapListeners = [];\n this._destroyListeners = [];\n }\n }\n\n /**\n * Registers a listener to be called when an instance is destroyed.\n *\n * @param callback A callback function to add as a listener.\n * @returns A function which unregisters a listener.\n */\n onDestroy(callback: () => void): VoidFunction {\n (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n this._destroyListeners.push(callback);\n return () => remove(this._destroyListeners, callback);\n }\n\n /**\n * Destroys an Angular application represented by this `ApplicationRef`. Calling this function\n * will destroy the associated environment injectors as well as all the bootstrapped components\n * with their views.\n */\n destroy(): void {\n if (this._destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED,\n ngDevMode && 'This instance of the `ApplicationRef` has already been destroyed.',\n );\n }\n\n const injector = this._injector as R3Injector;\n\n // Check that this injector instance supports destroy operation.\n if (injector.destroy && !injector.destroyed) {\n // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle\n // hook, which invokes the remaining cleanup actions.\n injector.destroy();\n }\n }\n\n /**\n * Returns the number of attached views.\n */\n get viewCount() {\n return this._views.length;\n }\n\n private warnIfDestroyed() {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._destroyed) {\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED,\n 'This instance of the `ApplicationRef` has already been destroyed.',\n ),\n );\n }\n }\n}\n\nexport function remove<T>(list: T[], el: T): void {\n const index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\nexport const enum ApplicationRefDirtyFlags {\n None = 0,\n\n /**\n * A global change detection round has been requested.\n */\n ViewTreeGlobal = 0b00000001,\n\n /**\n * Part of the view tree is marked for traversal.\n */\n ViewTreeTraversal = 0b00000010,\n\n /**\n * Part of the view tree is marked to be checked (dirty).\n */\n ViewTreeCheck = 0b00000100,\n\n /**\n * Helper for any view tree bit being set.\n */\n ViewTreeAny = ViewTreeGlobal | ViewTreeTraversal | ViewTreeCheck,\n\n /**\n * After render hooks need to run.\n */\n AfterRender = 0b00001000,\n}\n\nlet whenStableStore: WeakMap<ApplicationRef, Promise<void>> | undefined;\n/**\n * Returns a Promise that resolves when the application becomes stable after this method is called\n * the first time.\n */\nexport function whenStable(applicationRef: ApplicationRef): Promise<void> {\n whenStableStore ??= new WeakMap();\n const cachedWhenStable = whenStableStore.get(applicationRef);\n if (cachedWhenStable) {\n return cachedWhenStable;\n }\n\n const whenStablePromise = applicationRef.isStable\n .pipe(first((isStable) => isStable))\n .toPromise()\n .then(() => void 0);\n whenStableStore.set(applicationRef, whenStablePromise);\n\n // Be a good citizen and clean the store `onDestroy` even though we are using `WeakMap`.\n applicationRef.onDestroy(() => whenStableStore?.delete(applicationRef));\n\n return whenStablePromise;\n}\n\nexport function detectChangesInViewIfRequired(\n lView: LView,\n notifyErrorHandler: boolean,\n isFirstPass: boolean,\n zonelessEnabled: boolean,\n) {\n // When re-checking, only check views which actually need it.\n if (!isFirstPass && !requiresRefreshOrTraversal(lView)) {\n return;\n }\n\n const mode =\n isFirstPass && !zonelessEnabled\n ? // The first pass is always in Global mode, which includes `CheckAlways` views.\n // When using zoneless, all root views must be explicitly marked for refresh, even if they are\n // `CheckAlways`.\n ChangeDetectionMode.Global\n : // Only refresh views with the `RefreshView` flag or views is a changed signal\n ChangeDetectionMode.Targeted;\n detectChangesInternal(lView, notifyErrorHandler, mode);\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.dev/license\n */\n\nimport {Injectable} from '../di/injectable';\nimport {InjectionToken} from '../di/injection_token';\nimport {StaticProvider} from '../di/interface/provider';\nimport {MissingTranslationStrategy} from '../i18n/tokens';\nimport {Type} from '../interface/type';\nimport {ViewEncapsulation} from '../metadata/view';\nimport {ComponentFactory as ComponentFactoryR3} from '../render3/component_ref';\nimport {getComponentDef, getNgModuleDef} from '../render3/definition';\nimport {NgModuleFactory as NgModuleFactoryR3} from '../render3/ng_module_ref';\nimport {maybeUnwrapFn} from '../render3/util/misc_utils';\n\nimport {ComponentFactory} from './component_factory';\nimport {NgModuleFactory} from './ng_module_factory';\n\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nexport class ModuleWithComponentFactories<T> {\n constructor(\n public ngModuleFactory: NgModuleFactory<T>,\n public componentFactories: ComponentFactory<any>[],\n ) {}\n}\n\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\n@Injectable({providedIn: 'root'})\nexport class Compiler {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components\n * have to be inlined.\n */\n compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {\n return new NgModuleFactoryR3(moduleType);\n }\n\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n return Promise.resolve(this.compileModuleSync(moduleType));\n }\n\n /**\n * Same as {@link Compiler#compileModuleSync compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {\n const ngModuleFactory = this.compileModuleSync(moduleType);\n const moduleDef = getNgModuleDef(moduleType)!;\n const componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce(\n (factories: ComponentFactory<any>[], declaration: Type<any>) => {\n const componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactoryR3(componentDef));\n return factories;\n },\n [] as ComponentFactory<any>[],\n );\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n\n /**\n * Same as {@link Compiler#compileModuleAsync compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync<T>(\n moduleType: Type<T>,\n ): Promise<ModuleWithComponentFactories<T>> {\n return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));\n }\n\n /**\n * Clears all caches.\n */\n clearCache(): void {}\n\n /**\n * Clears the cache for the given component/ngModule.\n */\n clearCacheFor(type: Type<any>) {}\n\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n getModuleId(moduleType: Type<any>): string | undefined {\n return undefined;\n }\n}\n\n/**\n * Options for creating a compiler.\n *\n * @publicApi\n */\nexport type CompilerOptions = {\n defaultEncapsulation?: ViewEncapsulation;\n providers?: StaticProvider[];\n preserveWhitespaces?: boolean;\n};\n\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nexport const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>(\n ngDevMode ? 'compilerOptions' : '',\n);\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nexport abstract class CompilerFactory {\n abstract createCompiler(options?: CompilerOptions[]): Compiler;\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.dev/license\n */\n\nimport {Subscription} from 'rxjs';\n\nimport {ApplicationRef} from '../../application/application_ref';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n Injectable,\n InjectionToken,\n makeEnvironmentProviders,\n StaticProvider,\n} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {PendingTasks} from '../../pending_tasks';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {NgZone} from '../../zone';\nimport {InternalNgZoneOptions} from '../../zone/ng_zone';\n\nimport {\n ChangeDetectionScheduler,\n ZONELESS_SCHEDULER_DISABLED,\n ZONELESS_ENABLED,\n SCHEDULE_IN_ROOT_ZONE,\n} from './zoneless_scheduling';\nimport {SCHEDULE_IN_ROOT_ZONE_DEFAULT} from './flags';\n\n@Injectable({providedIn: 'root'})\nexport class NgZoneChangeDetectionScheduler {\n private readonly zone = inject(NgZone);\n private readonly changeDetectionScheduler = inject(ChangeDetectionScheduler);\n private readonly applicationRef = inject(ApplicationRef);\n\n private _onMicrotaskEmptySubscription?: Subscription;\n\n initialize(): void {\n if (this._onMicrotaskEmptySubscription) {\n return;\n }\n\n this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({\n next: () => {\n // `onMicroTaskEmpty` can happen _during_ the zoneless scheduler change detection because\n // zone.run(() => {}) will result in `checkStable` at the end of the `zone.run` closure\n // and emit `onMicrotaskEmpty` synchronously if run coalsecing is false.\n if (this.changeDetectionScheduler.runningTick) {\n return;\n }\n this.zone.run(() => {\n this.applicationRef.tick();\n });\n },\n });\n }\n\n ngOnDestroy() {\n this._onMicrotaskEmptySubscription?.unsubscribe();\n }\n}\n\n/**\n * Internal token used to verify that `provideZoneChangeDetection` is not used\n * with the bootstrapModule API.\n */\nexport const PROVIDED_NG_ZONE = new InjectionToken<boolean>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '',\n {factory: () => false},\n);\n\nexport function internalProvideZoneChangeDetection({\n ngZoneFactory,\n ignoreChangesOutsideZone,\n scheduleInRootZone,\n}: {\n ngZoneFactory?: () => NgZone;\n ignoreChangesOutsideZone?: boolean;\n scheduleInRootZone?: boolean;\n}): StaticProvider[] {\n ngZoneFactory ??= () =>\n new NgZone({...getNgZoneOptions(), scheduleInRootZone} as InternalNgZoneOptions);\n return [\n {provide: NgZone, useFactory: ngZoneFactory},\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {\n optional: true,\n });\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n ngZoneChangeDetectionScheduler === null\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP,\n `A required Injectable was not found in the dependency injection tree. ` +\n 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.',\n );\n }\n return () => ngZoneChangeDetectionScheduler!.initialize();\n },\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const service = inject(ZoneStablePendingTask);\n return () => {\n service.initialize();\n };\n },\n },\n // Always disable scheduler whenever explicitly disabled, even if another place called\n // `provideZoneChangeDetection` without the 'ignore' option.\n ignoreChangesOutsideZone === true ? {provide: ZONELESS_SCHEDULER_DISABLED, useValue: true} : [],\n {\n provide: SCHEDULE_IN_ROOT_ZONE,\n useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT,\n },\n ];\n}\n\n/**\n * Provides `NgZone`-based change detection for the application bootstrapped using\n * `bootstrapApplication`.\n *\n * `NgZone` is already provided in applications by default. This provider allows you to configure\n * options like `eventCoalescing` in the `NgZone`.\n * This provider is not available for `platformBrowser().bootstrapModule`, which uses\n * `BootstrapOptions` instead.\n *\n * @usageNotes\n * ```typescript\n * bootstrapApplication(MyApp, {providers: [\n * provideZoneChangeDetection({eventCoalescing: true}),\n * ]});\n * ```\n *\n * @publicApi\n * @see {@link bootstrapApplication}\n * @see {@link NgZoneOptions}\n */\nexport function provideZoneChangeDetection(options?: NgZoneOptions): EnvironmentProviders {\n const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;\n const scheduleInRootZone = (options as any)?.scheduleInRootZone;\n const zoneProviders = internalProvideZoneChangeDetection({\n ngZoneFactory: () => {\n const ngZoneOptions = getNgZoneOptions(options);\n ngZoneOptions.scheduleInRootZone = scheduleInRootZone;\n if (ngZoneOptions.shouldCoalesceEventChangeDetection) {\n performanceMarkFeature('NgZone_CoalesceEvent');\n }\n return new NgZone(ngZoneOptions);\n },\n ignoreChangesOutsideZone,\n scheduleInRootZone,\n });\n return makeEnvironmentProviders([\n {provide: PROVIDED_NG_ZONE, useValue: true},\n {provide: ZONELESS_ENABLED, useValue: false},\n zoneProviders,\n ]);\n}\n\n/**\n * Used to configure event and run coalescing with `provideZoneChangeDetection`.\n *\n * @publicApi\n *\n * @see {@link provideZoneChangeDetection}\n */\nexport interface NgZoneOptions {\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * ```\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n * ```\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n eventCoalescing?: boolean;\n\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n * ```\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n * ```\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n runCoalescing?: boolean;\n\n /**\n * When false, change detection is scheduled when Angular receives\n * a clear indication that templates need to be refreshed. This includes:\n *\n * - calling `ChangeDetectorRef.markForCheck`\n * - calling `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - attaching a view that is marked dirty\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @deprecated This option was introduced out of caution as a way for developers to opt out of the\n * new behavior in v18 which schedule change detection for the above events when they occur\n * outside the Zone. After monitoring the results post-release, we have determined that this\n * feature is working as desired and do not believe it should ever be disabled by setting\n * this option to `true`.\n */\n ignoreChangesOutsideZone?: boolean;\n}\n\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nexport function getNgZoneOptions(options?: NgZoneOptions): InternalNgZoneOptions {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,\n shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false,\n };\n}\n\n@Injectable({providedIn: 'root'})\nexport class ZoneStablePendingTask {\n private readonly subscription = new Subscription();\n private initialized = false;\n private readonly zone = inject(NgZone);\n private readonly pendingTasks = inject(PendingTasks);\n\n initialize() {\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n\n let task: number | null = null;\n if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {\n task = this.pendingTasks.add();\n }\n\n this.zone.runOutsideAngular(() => {\n this.subscription.add(\n this.zone.onStable.subscribe(() => {\n NgZone.assertNotInAngularZone();\n\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n queueMicrotask(() => {\n if (\n task !== null &&\n !this.zone.hasPendingMacrotasks &&\n !this.zone.hasPendingMicrotasks\n ) {\n this.pendingTasks.remove(task);\n task = null;\n }\n });\n }),\n );\n });\n\n this.subscription.add(\n this.zone.onUnstable.subscribe(() => {\n NgZone.assertInAngularZone();\n task ??= this.pendingTasks.add();\n }),\n );\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\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.dev/license\n */\n\nimport {Subscription} from 'rxjs';\n\nimport {ApplicationRef, ApplicationRefDirtyFlags} from '../../application/application_ref';\nimport {Injectable} from '../../di/injectable';\nimport {inject} from '../../di/injector_compatibility';\nimport {EnvironmentProviders} from '../../di/interface/provider';\nimport {makeEnvironmentProviders} from '../../di/provider_collection';\nimport {RuntimeError, RuntimeErrorCode, formatRuntimeError} from '../../errors';\nimport {PendingTasks} from '../../pending_tasks';\nimport {\n scheduleCallbackWithMicrotask,\n scheduleCallbackWithRafRace,\n} from '../../util/callback_scheduler';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {NgZone, NgZonePrivate, NoopNgZone, angularZoneInstanceIdProperty} from '../../zone/ng_zone';\n\nimport {\n ChangeDetectionScheduler,\n NotificationSource,\n ZONELESS_ENABLED,\n PROVIDED_ZONELESS,\n ZONELESS_SCHEDULER_DISABLED,\n SCHEDULE_IN_ROOT_ZONE,\n} from './zoneless_scheduling';\n\nconst CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT = 100;\nlet consecutiveMicrotaskNotifications = 0;\nlet stackFromLastFewNotifications: string[] = [];\n\nfunction trackMicrotaskNotificationForDebugging() {\n consecutiveMicrotaskNotifications++;\n if (CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT - consecutiveMicrotaskNotifications < 5) {\n const stack = new Error().stack;\n if (stack) {\n stackFromLastFewNotifications.push(stack);\n }\n }\n\n if (consecutiveMicrotaskNotifications === CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_CHANGE_DETECTION,\n 'Angular could not stabilize because there were endless change notifications within the browser event loop. ' +\n 'The stack from the last several notifications: \\n' +\n stackFromLastFewNotifications.join('\\n'),\n );\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class ChangeDetectionSchedulerImpl implements ChangeDetectionScheduler {\n private readonly appRef = inject(ApplicationRef);\n private readonly taskService = inject(PendingTasks);\n private readonly ngZone = inject(NgZone);\n private readonly zonelessEnabled = inject(ZONELESS_ENABLED);\n private readonly disableScheduling =\n inject(ZONELESS_SCHEDULER_DISABLED, {optional: true}) ?? false;\n private readonly zoneIsDefined = typeof Zone !== 'undefined' && !!Zone.root.run;\n private readonly schedulerTickApplyArgs = [{data: {'__scheduler_tick__': true}}];\n private readonly subscriptions = new Subscription();\n private readonly angularZoneId = this.zoneIsDefined\n ? (this.ngZone as NgZonePrivate)._inner?.get(angularZoneInstanceIdProperty)\n : null;\n private readonly scheduleInRootZone =\n !this.zonelessEnabled &&\n this.zoneIsDefined &&\n (inject(SCHEDULE_IN_ROOT_ZONE, {optional: true}) ?? false);\n\n private cancelScheduledCallback: null | (() => void) = null;\n private useMicrotaskScheduler = false;\n runningTick = false;\n pendingRenderTaskId: number | null = null;\n\n constructor() {\n this.subscriptions.add(\n this.appRef.afterTick.subscribe(() => {\n // If the scheduler isn't running a tick but the application ticked, that means\n // someone called ApplicationRef.tick manually. In this case, we should cancel\n // any change detections that had been scheduled so we don't run an extra one.\n if (!this.runningTick) {\n this.cleanup();\n }\n }),\n );\n this.subscriptions.add(\n this.ngZone.onUnstable.subscribe(() => {\n // If the zone becomes unstable when we're not running tick (this happens from the zone.run),\n // we should cancel any scheduled change detection here because at this point we\n // know that the zone will stabilize at some point and run change detection itself.\n if (!this.runningTick) {\n this.cleanup();\n }\n }),\n );\n\n // TODO(atscott): These conditions will need to change when zoneless is the default\n // Instead, they should flip to checking if ZoneJS scheduling is provided\n this.disableScheduling ||=\n !this.zonelessEnabled &&\n // NoopNgZone without enabling zoneless means no scheduling whatsoever\n (this.ngZone instanceof NoopNgZone ||\n // The same goes for the lack of Zone without enabling zoneless scheduling\n !this.zoneIsDefined);\n }\n\n notify(source: NotificationSource): void {\n if (!this.zonelessEnabled && source === NotificationSource.Listener) {\n // When the notification comes from a listener, we skip the notification unless the\n // application has enabled zoneless. Ideally, listeners wouldn't notify the scheduler at all\n // automatically. We do not know that a developer made a change in the listener callback that\n // requires an `ApplicationRef.tick` (synchronize templates / run render hooks). We do this\n // only for an easier migration from OnPush components to zoneless. Because listeners are\n // usually executed inside the Angular zone and listeners automatically call `markViewDirty`,\n // developers never needed to manually use `ChangeDetectorRef.markForCheck` or some other API\n // to make listener callbacks work correctly with `OnPush` components.\n return;\n }\n switch (source) {\n case NotificationSource.MarkAncestorsForTraversal: {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeTraversal;\n break;\n }\n case NotificationSource.DebugApplyChanges:\n case NotificationSource.DeferBlockStateUpdate:\n case NotificationSource.MarkForCheck:\n case NotificationSource.Listener:\n case NotificationSource.SetInput: {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeCheck;\n break;\n }\n case NotificationSource.DeferredRenderHook: {\n // Render hooks are \"deferred\" when they're triggered from other render hooks. Using the\n // deferred dirty flags ensures that adding new hooks doesn't automatically trigger a loop\n // inside tick().\n this.appRef.deferredDirtyFlags |= ApplicationRefDirtyFlags.AfterRender;\n break;\n }\n case NotificationSource.ViewDetachedFromDOM:\n case NotificationSource.ViewAttached:\n case NotificationSource.RenderHook:\n case NotificationSource.AsyncAnimationsLoaded:\n default: {\n // These notifications only schedule a tick but do not change whether we should refresh\n // views. Instead, we only need to run render hooks unless another notification from the\n // other set is also received before `tick` happens.\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.AfterRender;\n }\n }\n\n if (!this.shouldScheduleTick()) {\n return;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (this.useMicrotaskScheduler) {\n trackMicrotaskNotificationForDebugging();\n } else {\n consecutiveMicrotaskNotifications = 0;\n stackFromLastFewNotifications.length = 0;\n }\n }\n\n const scheduleCallback = this.useMicrotaskScheduler\n ? scheduleCallbackWithMicrotask\n : scheduleCallbackWithRafRace;\n this.pendingRenderTaskId = this.taskService.add();\n if (this.scheduleInRootZone) {\n this.cancelScheduledCallback = Zone.root.run(() => scheduleCallback(() => this.tick()));\n } else {\n this.cancelScheduledCallback = this.ngZone.runOutsideAngular(() =>\n scheduleCallback(() => this.tick()),\n );\n }\n }\n\n private shouldScheduleTick(): boolean {\n if (this.disableScheduling) {\n return false;\n }\n // already scheduled or running\n if (this.pendingRenderTaskId !== null || this.runningTick || this.appRef._runningTick) {\n return false;\n }\n // If we're inside the zone don't bother with scheduler. Zone will stabilize\n // eventually and run change detection.\n if (\n !this.zonelessEnabled &&\n this.zoneIsDefined &&\n Zone.current.get(angularZoneInstanceIdProperty + this.angularZoneId)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Calls ApplicationRef._tick inside the `NgZone`.\n *\n * Calling `tick` directly runs change detection and cancels any change detection that had been\n * scheduled previously.\n *\n * @param shouldRefreshViews Passed directly to `ApplicationRef._tick` and skips straight to\n * render hooks when `false`.\n */\n private tick(): void {\n // When ngZone.run below exits, onMicrotaskEmpty may emit if the zone is\n // stable. We want to prevent double ticking so we track whether the tick is\n // already running and skip it if so.\n if (this.runningTick || this.appRef.destroyed) {\n return;\n }\n\n // The scheduler used to pass \"whether to check views\" as a boolean flag instead of setting\n // fine-grained dirtiness flags, and global checking was always used on the first pass. This\n // created an interesting edge case: if a notification made a view dirty and then ticked via the\n // scheduler (and not the zone) a global check was still performed.\n //\n // Ideally, this would not be the case, and only zone-based ticks would do global passes.\n // However this is a breaking change and requires fixes in g3. Until this cleanup can be done,\n // we add the `ViewTreeGlobal` flag to request a global check if any views are dirty in a\n // scheduled tick (unless zoneless is enabled, in which case global checks aren't really a\n // thing).\n //\n // TODO(alxhub): clean up and remove this workaround as a breaking change.\n if (!this.zonelessEnabled && this.appRef.dirtyFlags & ApplicationRefDirtyFlags.ViewTreeAny) {\n this.appRef.dirtyFlags |= ApplicationRefDirtyFlags.ViewTreeGlobal;\n }\n\n const task = this.taskService.add();\n try {\n this.ngZone.run(\n () => {\n this.runningTick = true;\n this.appRef._tick();\n },\n undefined,\n this.schedulerTickApplyArgs,\n );\n } catch (e: unknown) {\n this.taskService.remove(task);\n throw e;\n } finally {\n this.cleanup();\n }\n // If we're notified of a change within 1 microtask of running change\n // detection, run another round in the same event loop. This allows code\n // which uses Promise.resolve (see NgModel) to avoid\n // ExpressionChanged...Error to still be reflected in a single browser\n // paint, even if that spans multiple rounds of change detection.\n this.useMicrotaskScheduler = true;\n scheduleCallbackWithMicrotask(() => {\n this.useMicrotaskScheduler = false;\n this.taskService.remove(task);\n });\n }\n\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n this.cleanup();\n }\n\n private cleanup() {\n this.runningTick = false;\n this.cancelScheduledCallback?.();\n this.cancelScheduledCallback = null;\n // If this is the last task, the service will synchronously emit a stable\n // notification. If there is a subscriber that then acts in a way that\n // tries to notify the scheduler again, we need to be able to respond to\n // schedule a new change detection. Therefore, we should clear the task ID\n // before removing it from the pending tasks (or the tasks service should\n // not synchronously emit stable, similar to how Zone stableness only\n // happens if it's still stable after a microtask).\n if (this.pendingRenderTaskId !== null) {\n const taskId = this.pendingRenderTaskId;\n this.pendingRenderTaskId = null;\n this.taskService.remove(taskId);\n }\n }\n}\n\n/**\n * Provides change detection without ZoneJS for the application bootstrapped using\n * `bootstrapApplication`.\n *\n * This function allows you to configure the application to not use the state/state changes of\n * ZoneJS to schedule change detection in the application. This will work when ZoneJS is not present\n * on the page at all or if it exists because something else is using it (either another Angular\n * application which uses ZoneJS for scheduling or some other library that relies on ZoneJS).\n *\n * This can also be added to the `TestBed` providers to configure the test environment to more\n * closely match production behavior. This will help give higher confidence that components are\n * compatible with zoneless change detection.\n *\n * ZoneJS uses browser events to trigger change detection. When using this provider, Angular will\n * instead use Angular APIs to schedule change detection. These APIs include:\n *\n * - `ChangeDetectorRef.markForCheck`\n * - `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - when bound host or template listeners are triggered\n * - attaching a view that was marked dirty by one of the above\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @usageNotes\n * ```typescript\n * bootstrapApplication(MyApp, {providers: [\n * provideExperimentalZonelessChangeDetection(),\n * ]});\n * ```\n *\n * This API is experimental. Neither the shape, nor the underlying behavior is stable and can change\n * in patch versions. There are known feature gaps and API ergonomic considerations. We will iterate\n * on the exact API based on the feedback and our understanding of the problem and solution space.\n *\n * @publicApi\n * @experimental\n * @see [bootstrapApplication](/api/platform-browser/bootstrapApplication)\n */\nexport function provideExperimentalZonelessChangeDetection(): EnvironmentProviders {\n performanceMarkFeature('NgZoneless');\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && typeof Zone !== 'undefined' && Zone) {\n const message = formatRuntimeError(\n RuntimeErrorCode.UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE,\n `The application is using zoneless change detection, but is still loading Zone.js. ` +\n `Consider removing Zone.js to get the full benefits of zoneless. ` +\n `In applications using the Angular CLI, Zone.js is typically included in the \"polyfills\" section of the angular.json file.`,\n );\n console.warn(message);\n }\n\n return makeEnvironmentProviders([\n {provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl},\n {provide: NgZone, useClass: NoopNgZone},\n {provide: ZONELESS_ENABLED, useValue: true},\n {provide: SCHEDULE_IN_ROOT_ZONE, useValue: false},\n typeof ngDevMode === 'undefined' || ngDevMode\n ? [{provide: PROVIDED_ZONELESS, useValue: true}]\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.dev/license\n */\n\nimport {InjectionToken} from '../di/injection_token';\nimport {inject} from '../di/injector_compatibility';\nimport {InjectFlags} from '../di/interface/injector';\n\nimport {DEFAULT_LOCALE_ID, USD_CURRENCY_CODE} from './localization';\n\ndeclare const $localize: {locale?: string};\n\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nexport function getGlobalLocale(): string {\n if (\n typeof ngI18nClosureMode !== 'undefined' &&\n ngI18nClosureMode &&\n typeof goog !== 'undefined' &&\n goog.LOCALE !== 'en'\n ) {\n // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.LOCALE;\n } else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;\n }\n}\n\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n/locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const LOCALE_ID: InjectionToken<string> = new InjectionToken(ngDevMode ? 'LocaleId' : '', {\n providedIn: 'root',\n factory: () =>\n inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),\n});\n\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n/locale-id) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const DEFAULT_CURRENCY_CODE = new InjectionToken<string>(\n ngDevMode ? 'DefaultCurrencyCode' : '',\n {\n providedIn: 'root',\n factory: () => USD_CURRENCY_CODE,\n },\n);\n\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n/merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS = new InjectionToken<string>(ngDevMode ? 'Translations' : '');\n\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n/merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nexport const TRANSLATIONS_FORMAT = new InjectionToken<string>(\n ngDevMode ? 'TranslationsFormat' : '',\n);\n\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n/merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nexport enum MissingTranslationStrategy {\n Error = 0,\n Warning = 1,\n Ignore = 2,\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.dev/license\n */\n\nimport {InjectionToken} from '../di';\n\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nexport const PLATFORM_DESTROY_LISTENERS = new InjectionToken<Set<VoidFunction>>(\n ngDevMode ? 'PlatformDestroyListeners' : '',\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.dev/license\n */\nimport {Subscription} from 'rxjs';\n\nimport {PROVIDED_NG_ZONE} from '../change_detection/scheduling/ng_zone_scheduling';\nimport {EnvironmentInjector, R3Injector} from '../di/r3_injector';\nimport {ErrorHandler} from '../error_handler';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {DEFAULT_LOCALE_ID} from '../i18n/localization';\nimport {LOCALE_ID} from '../i18n/tokens';\nimport {ImagePerformanceWarning} from '../image_performance_warning';\nimport {Type} from '../interface/type';\nimport {PLATFORM_DESTROY_LISTENERS} from './platform_destroy_listeners';\nimport {setLocaleId} from '../render3/i18n/i18n_locale_id';\nimport {NgZone} from '../zone/ng_zone';\n\nimport {ApplicationInitStatus} from '../application/application_init';\nimport {_callAndReportToErrorHandler, ApplicationRef, remove} from '../application/application_ref';\nimport {PROVIDED_ZONELESS} from '../change_detection/scheduling/zoneless_scheduling';\nimport {Injector} from '../di';\nimport {InternalNgModuleRef, NgModuleRef} from '../linker/ng_module_factory';\nimport {stringify} from '../util/stringify';\n\nexport interface BootstrapConfig {\n platformInjector: Injector;\n}\n\nexport interface ModuleBootstrapConfig<M> extends BootstrapConfig {\n moduleRef: InternalNgModuleRef<M>;\n allPlatformModules: NgModuleRef<unknown>[];\n}\n\nexport interface ApplicationBootstrapConfig extends BootstrapConfig {\n r3Injector: R3Injector;\n rootComponent: Type<unknown> | undefined;\n}\n\nfunction isApplicationBootstrapConfig(\n config: ApplicationBootstrapConfig | ModuleBootstrapConfig<unknown>,\n): config is ApplicationBootstrapConfig {\n return !(config as ModuleBootstrapConfig<unknown>).moduleRef;\n}\n\nexport function bootstrap<M>(\n moduleBootstrapConfig: ModuleBootstrapConfig<M>,\n): Promise<NgModuleRef<M>>;\nexport function bootstrap(\n applicationBootstrapConfig: ApplicationBootstrapConfig,\n): Promise<ApplicationRef>;\nexport function bootstrap<M>(\n config: ModuleBootstrapConfig<M> | ApplicationBootstrapConfig,\n): Promise<ApplicationRef> | Promise<NgModuleRef<M>> {\n const envInjector = isApplicationBootstrapConfig(config)\n ? config.r3Injector\n : config.moduleRef.injector;\n const ngZone = envInjector.get(NgZone);\n return ngZone.run(() => {\n if (isApplicationBootstrapConfig(config)) {\n config.r3Injector.resolveInjectorInitializers();\n } else {\n config.moduleRef.resolveInjectorInitializers();\n }\n const exceptionHandler = envInjector.get(ErrorHandler, null);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (exceptionHandler === null) {\n const errorMessage = isApplicationBootstrapConfig(config)\n ? 'No `ErrorHandler` found in the Dependency Injection tree.'\n : 'No ErrorHandler. Is platform module (BrowserModule) included';\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP,\n errorMessage,\n );\n }\n if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {\n throw new RuntimeError(\n RuntimeErrorCode.PROVIDED_BOTH_ZONE_AND_ZONELESS,\n 'Invalid change detection configuration: ' +\n 'provideZoneChangeDetection and provideExperimentalZonelessChangeDetection cannot be used together.',\n );\n }\n }\n\n let onErrorSubscription: Subscription;\n ngZone.runOutsideAngular(() => {\n onErrorSubscription = ngZone.onError.subscribe({\n next: (error: any) => {\n exceptionHandler!.handleError(error);\n },\n });\n });\n\n // If the whole platform is destroyed, invoke the `destroy` method\n // for all bootstrapped applications as well.\n if (isApplicationBootstrapConfig(config)) {\n const destroyListener = () => envInjector.destroy();\n const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n onPlatformDestroyListeners.add(destroyListener);\n\n envInjector.onDestroy(() => {\n onErrorSubscription.unsubscribe();\n onPlatformDestroyListeners.delete(destroyListener);\n });\n } else {\n const destroyListener = () => config.moduleRef.destroy();\n const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n onPlatformDestroyListeners.add(destroyListener);\n\n config.moduleRef.onDestroy(() => {\n remove(config.allPlatformModules, config.moduleRef);\n onErrorSubscription.unsubscribe();\n onPlatformDestroyListeners.delete(destroyListener);\n });\n }\n\n return _callAndReportToErrorHandler(exceptionHandler!, ngZone, () => {\n const initStatus = envInjector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n\n return initStatus.donePromise.then(() => {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const imagePerformanceService = envInjector.get(ImagePerformanceWarning);\n imagePerformanceService.start();\n }\n\n if (isApplicationBootstrapConfig(config)) {\n const appRef = envInjector.get(ApplicationRef);\n if (config.rootComponent !== undefined) {\n appRef.bootstrap(config.rootComponent);\n }\n return appRef;\n } else {\n moduleDoBootstrap(config.moduleRef, config.allPlatformModules);\n return config.moduleRef;\n }\n });\n });\n });\n}\n\nfunction moduleDoBootstrap(\n moduleRef: InternalNgModuleRef<any>,\n allPlatformModules: NgModuleRef<unknown>[],\n): void {\n const appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach((f) => appRef.bootstrap(f));\n } else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND,\n ngDevMode &&\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` +\n `but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n `Please define one of these.`,\n );\n }\n allPlatformModules.push(moduleRef);\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.dev/license\n */\n\nimport {compileNgModuleFactory} from '../application/application_ngmodule_factory_compiler';\nimport {\n _callAndReportToErrorHandler,\n BootstrapOptions,\n optionsReducer,\n} from '../application/application_ref';\nimport {\n getNgZoneOptions,\n internalProvideZoneChangeDetection,\n} from '../change_detection/scheduling/ng_zone_scheduling';\nimport {ChangeDetectionScheduler} from '../change_detection/scheduling/zoneless_scheduling';\nimport {ChangeDetectionSchedulerImpl} from '../change_detection/scheduling/zoneless_scheduling_impl';\nimport {Injectable, Injector} from '../di';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\nimport {Type} from '../interface/type';\nimport {CompilerOptions} from '../linker';\nimport {NgModuleFactory, NgModuleRef} from '../linker/ng_module_factory';\nimport {createNgModuleRefWithProviders} from '../render3/ng_module_ref';\nimport {getNgZone, NgZone} from '../zone/ng_zone';\nimport {bootstrap} from './bootstrap';\nimport {PLATFORM_DESTROY_LISTENERS} from './platform_destroy_listeners';\n\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'platform'})\nexport class PlatformRef {\n private _modules: NgModuleRef<any>[] = [];\n private _destroyListeners: Array<() => void> = [];\n private _destroyed: boolean = false;\n\n /** @internal */\n constructor(private _injector: Injector) {}\n\n /**\n * Creates an instance of an `@NgModule` for the given platform.\n *\n * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\n */\n bootstrapModuleFactory<M>(\n moduleFactory: NgModuleFactory<M>,\n options?: BootstrapOptions,\n ): Promise<NgModuleRef<M>> {\n const scheduleInRootZone = (options as any)?.scheduleInRootZone;\n const ngZoneFactory = () =>\n getNgZone(options?.ngZone, {\n ...getNgZoneOptions({\n eventCoalescing: options?.ngZoneEventCoalescing,\n runCoalescing: options?.ngZoneRunCoalescing,\n }),\n scheduleInRootZone,\n });\n const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;\n const allAppProviders = [\n internalProvideZoneChangeDetection({\n ngZoneFactory,\n ignoreChangesOutsideZone,\n }),\n {provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl},\n ];\n const moduleRef = createNgModuleRefWithProviders(\n moduleFactory.moduleType,\n this.injector,\n allAppProviders,\n );\n\n return bootstrap({\n moduleRef,\n allPlatformModules: this._modules,\n platformInjector: this.injector,\n });\n }\n\n /**\n * Creates an instance of an `@NgModule` for a given platform.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n bootstrapModule<M>(\n moduleType: Type<M>,\n compilerOptions:\n | (CompilerOptions & BootstrapOptions)\n | Array<CompilerOptions & BootstrapOptions> = [],\n ): Promise<NgModuleRef<M>> {\n const options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType).then((moduleFactory) =>\n this.bootstrapModuleFactory(moduleFactory, options),\n );\n }\n\n /**\n * Registers a listener to be called when the platform is destroyed.\n */\n onDestroy(callback: () => void): void {\n this._destroyListeners.push(callback);\n }\n\n /**\n * Retrieves the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get injector(): Injector {\n return this._injector;\n }\n\n /**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n */\n destroy() {\n if (this._destroyed) {\n throw new RuntimeError(\n RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED,\n ngDevMode && 'The platform has already been destroyed!',\n );\n }\n this._modules.slice().forEach((module) => module.destroy());\n this._destroyListeners.forEach((listener) => listener());\n\n const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n if (destroyListeners) {\n destroyListeners.forEach((listener) => listener());\n destroyListeners.clear();\n }\n\n this._destroyed = true;\n }\n\n /**\n * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\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.dev/license\n */\n\nimport {getCompilerFacade, JitCompilerUsage} from '../compiler/compiler_facade';\nimport {Injector} from '../di/injector';\nimport {Type} from '../interface/type';\nimport {COMPILER_OPTIONS, CompilerOptions} from '../linker/compiler';\nimport {NgModuleFactory} from '../linker/ng_module_factory';\nimport {\n isComponentResourceResolutionQueueEmpty,\n resolveComponentResources,\n} from '../metadata/resource_loading';\nimport {assertNgModuleType} from '../render3/assert';\nimport {setJitOptions} from '../render3/jit/jit_options';\nimport {NgModuleFactory as R3NgModuleFactory} from '../render3/ng_module_ref';\n\nexport function compileNgModuleFactory<M>(\n injector: Injector,\n options: CompilerOptions,\n moduleType: Type<M>,\n): Promise<NgModuleFactory<M>> {\n ngDevMode && assertNgModuleType(moduleType);\n\n const moduleFactory = new R3NgModuleFactory(moduleType);\n\n // All of the logic below is irrelevant for AOT-compiled code.\n if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map((opts) => opts.defaultEncapsulation)),\n preserveWhitespaces: _lastDefined(compilerOptions.map((opts) => opts.preserveWhitespaces)),\n });\n\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n\n const compilerProviders = compilerOptions.flatMap((option) => option.providers ?? []);\n\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n\n const compiler = getCompilerFacade({\n usage: JitCompilerUsage.Decorator,\n kind: 'NgModule',\n type: moduleType,\n });\n const compilerInjector = Injector.create({providers: compilerProviders});\n const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources((url) => Promise.resolve(resourceLoader.get(url))).then(\n () => moduleFactory,\n );\n}\n\nfunction _lastDefined<T>(args: T[]): T | undefined {\n for (let i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\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.dev/license\n */\n\nimport {\n publishDefaultGlobalUtils,\n publishSignalConfiguration,\n} from '../application/application_ref';\nimport {PLATFORM_INITIALIZER} from '../application/application_tokens';\nimport {InjectionToken, Injector, StaticProvider} from '../di';\nimport {INJECTOR_SCOPE} from '../di/scope';\nimport {RuntimeError, RuntimeErrorCode} from '../errors';\n\nimport {PlatformRef} from './platform_ref';\nimport {PLATFORM_DESTROY_LISTENERS} from './platform_destroy_listeners';\n\nlet _platformInjector: Injector | null = null;\n\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nexport const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>(\n ngDevMode ? 'AllowMultipleToken' : '',\n);\n\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nexport function createPlatform(injector: Injector): PlatformRef {\n if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_PLATFORMS,\n ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.',\n );\n }\n publishDefaultGlobalUtils();\n publishSignalConfiguration();\n _platformInjector = injector;\n const platform = injector.get(PlatformRef);\n runPlatformInitializers(injector);\n return platform;\n}\n\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nexport function createPlatformFactory(\n parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null,\n name: string,\n providers: StaticProvider[] = [],\n): (extraProviders?: StaticProvider[]) => PlatformRef {\n const desc = `Platform: ${name}`;\n const marker = new InjectionToken(desc);\n return (extraProviders: StaticProvider[] = []) => {\n let platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n const platformProviders: StaticProvider[] = [\n ...providers,\n ...extraProviders,\n {provide: marker, useValue: true},\n ];\n if (parentPlatformFactory) {\n parentPlatformFactory(platformProviders);\n } else {\n createPlatform(createPlatformInjector(platformProviders, desc));\n }\n }\n return assertPlatform(marker);\n };\n}\n\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers: StaticProvider[] = [], name?: string): Injector {\n return Injector.create({\n name,\n providers: [\n {provide: INJECTOR_SCOPE, useValue: 'platform'},\n {provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => (_platformInjector = null)])},\n ...providers,\n ],\n });\n}\n\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nexport function assertPlatform(requiredToken: any): PlatformRef {\n const platform = getPlatform();\n\n if (!platform) {\n throw new RuntimeError(RuntimeErrorCode.PLATFORM_NOT_FOUND, ngDevMode && 'No platform exists!');\n }\n\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n !platform.injector.get(requiredToken, null)\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.MULTIPLE_PLATFORMS,\n 'A platform with a different configuration has been created. Please destroy it first.',\n );\n }\n\n return platform;\n}\n\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nexport function getPlatform(): PlatformRef | null {\n return _platformInjector?.get(PlatformRef) ?? null;\n}\n\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nexport function destroyPlatform(): void {\n getPlatform()?.destroy();\n}\n\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nexport function createOrReusePlatformInjector(providers: StaticProvider[] = []): Injector {\n // If a platform injector already exists, it means that the platform\n // is already bootstrapped and no additional actions are required.\n if (_platformInjector) return _platformInjector;\n\n publishDefaultGlobalUtils();\n // Otherwise, setup a new platform injector and run platform initializers.\n const injector = createPlatformInjector(providers);\n _platformInjector = injector;\n publishSignalConfiguration();\n runPlatformInitializers(injector);\n return injector;\n}\n\nfunction runPlatformInitializers(injector: Injector): void {\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n inits?.forEach((init) => init());\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.dev/license\n */\n\nimport {global} from './global';\n\n/**\n * Returns whether Angular is in development mode.\n *\n * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the\n * application is built using the Angular CLI with the `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nexport function isDevMode(): boolean {\n return typeof ngDevMode === 'undefined' || !!ngDevMode;\n}\n\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * Using this method is discouraged as the Angular CLI will set production mode when using the\n * `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nexport function enableProdMode(): void {\n // The below check is there so when ngDevMode is set via terser\n // `global['ngDevMode'] = false;` is also dropped.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n global['ngDevMode'] = false;\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.dev/license\n */\n\nimport {InjectFlags} from '../di';\nimport {InternalInjectFlags} from '../di/interface/injector';\nimport {TNode, TNodeType} from '../render3/interfaces/node';\nimport {isComponentHost} from '../render3/interfaces/type_checks';\nimport {DECLARATION_COMPONENT_VIEW, LView} from '../render3/interfaces/view';\nimport {getCurrentTNode, getLView} from '../render3/state';\nimport {getComponentLViewByIndex} from '../render3/util/view_utils';\nimport {ViewRef} from '../render3/view_ref';\n\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/components/lifecycle#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/components/lifecycle#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nexport abstract class ChangeDetectorRef {\n /**\n * When a view uses the {@link ChangeDetectionStrategy#OnPush} (checkOnce)\n * change detection strategy, explicitly marks the view as changed so that\n * it can be checked again.\n *\n * Components are normally marked as dirty (in need of rerendering) when inputs\n * have changed or events have fired in the view. Call this method to ensure that\n * a component is checked even if these triggers have not occurred.\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n */\n abstract markForCheck(): void;\n\n /**\n * Detaches this view from the change-detection tree.\n * A detached view is not checked until it is reattached.\n * Use in combination with `detectChanges()` to implement local change detection checks.\n *\n * Detached views are not checked during change detection runs until they are\n * re-attached, even if they are marked as dirty.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detach(): void;\n\n /**\n * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach}\n * to implement local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n */\n abstract detectChanges(): void;\n\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * Use in development mode to verify that running change detection doesn't introduce\n * other changes. Calling it in production mode is a noop.\n *\n * @deprecated This is a test-only API that does not have a place in production interface.\n * `checkNoChanges` is already part of an `ApplicationRef` tick when the app is running in dev\n * mode. For more granular `checkNoChanges` validation, use `ComponentFixture`.\n */\n abstract checkNoChanges(): void;\n\n /**\n * Re-attaches the previously detached view to the change detection tree.\n * Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n */\n abstract reattach(): void;\n\n /**\n * @internal\n * @nocollapse\n */\n static __NG_ELEMENT_ID__: (flags: InjectFlags) => ChangeDetectorRef = injectChangeDetectorRef;\n}\n\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nexport function injectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef {\n return createViewRef(\n getCurrentTNode()!,\n getLView(),\n (flags & InternalInjectFlags.ForPipe) === InternalInjectFlags.ForPipe,\n );\n}\n\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode: TNode, lView: LView, isPipe: boolean): ChangeDetectorRef {\n if (isComponentHost(tNode) && !isPipe) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new ViewRef(componentView, componentView);\n } else if (\n tNode.type &\n (TNodeType.AnyRNode | TNodeType.AnyContainer | TNodeType.Icu | TNodeType.LetDeclaration)\n ) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new ViewRef(hostComponentView, lView);\n }\n return null!;\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {Writable} from '../../interface/type';\nimport {isListLikeIterable, iterateListLike} from '../../util/iterable';\nimport {stringify} from '../../util/stringify';\n\nimport {\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDifferFactory,\n NgIterable,\n TrackByFunction,\n} from './iterable_differs';\n\nexport class DefaultIterableDifferFactory implements IterableDifferFactory {\n constructor() {}\n supports(obj: Object | null | undefined): boolean {\n return isListLikeIterable(obj);\n }\n\n create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V> {\n return new DefaultIterableDiffer<V>(trackByFn);\n }\n}\n\nconst trackByIdentity = (index: number, item: any) => item;\n\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nexport class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {\n public readonly length: number = 0;\n // TODO: confirm the usage of `collection` as it's unused, readonly and on a non public API.\n public readonly collection!: V[] | Iterable<V> | null;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n private _linkedRecords: _DuplicateMap<V> | null = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n private _unlinkedRecords: _DuplicateMap<V> | null = null;\n private _previousItHead: IterableChangeRecord_<V> | null = null;\n private _itHead: IterableChangeRecord_<V> | null = null;\n private _itTail: IterableChangeRecord_<V> | null = null;\n private _additionsHead: IterableChangeRecord_<V> | null = null;\n private _additionsTail: IterableChangeRecord_<V> | null = null;\n private _movesHead: IterableChangeRecord_<V> | null = null;\n private _movesTail: IterableChangeRecord_<V> | null = null;\n private _removalsHead: IterableChangeRecord_<V> | null = null;\n private _removalsTail: IterableChangeRecord_<V> | null = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n private _identityChangesHead: IterableChangeRecord_<V> | null = null;\n private _identityChangesTail: IterableChangeRecord_<V> | null = null;\n private _trackByFn: TrackByFunction<V>;\n\n constructor(trackByFn?: TrackByFunction<V>) {\n this._trackByFn = trackByFn || trackByIdentity;\n }\n\n forEachItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachOperation(\n fn: (\n item: IterableChangeRecord<V>,\n previousIndex: number | null,\n currentIndex: number | null,\n ) => void,\n ) {\n let nextIt = this._itHead;\n let nextRemove = this._removalsHead;\n let addRemoveOffset = 0;\n let moveOffsets: number[] | null = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n const record: IterableChangeRecord<V> =\n !nextRemove ||\n (nextIt &&\n nextIt.currentIndex! < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets))\n ? nextIt!\n : nextRemove;\n const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n const currentIndex = record.currentIndex;\n\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n } else {\n nextIt = nextIt!._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n } else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets) moveOffsets = [];\n const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n const localCurrentIndex = currentIndex! - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (let i = 0; i < localMovePreviousIndex; i++) {\n const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n const index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n const previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n }\n\n forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n }\n\n diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null {\n if (collection == null) collection = [];\n if (!isListLikeIterable(collection)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode &&\n `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`,\n );\n }\n\n if (this.check(collection)) {\n return this;\n } else {\n return null;\n }\n }\n\n onDestroy() {}\n\n check(collection: NgIterable<V>): boolean {\n this._reset();\n\n let record: IterableChangeRecord_<V> | null = this._itHead;\n let mayBeDirty: boolean = false;\n let index: number;\n let item: V;\n let itemTrackBy: any;\n if (Array.isArray(collection)) {\n (this as Writable<this>).length = collection.length;\n\n for (let index = 0; index < this.length; index++) {\n item = collection[index];\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n\n record = record._next;\n }\n } else {\n index = 0;\n iterateListLike(collection, (item: V) => {\n itemTrackBy = this._trackByFn(index, item);\n if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n } else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n (this as Writable<this>).length = index;\n }\n\n this._truncate(record);\n (this as Writable<this>).collection = collection;\n return this.isDirty;\n }\n\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get isDirty(): boolean {\n return (\n this._additionsHead !== null ||\n this._movesHead !== null ||\n this._removalsHead !== null ||\n this._identityChangesHead !== null\n );\n }\n\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n _reset() {\n if (this.isDirty) {\n let record: IterableChangeRecord_<V> | null;\n\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }\n\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n _mismatch(\n record: IterableChangeRecord_<V> | null,\n item: V,\n itemTrackBy: any,\n index: number,\n ): IterableChangeRecord_<V> {\n // The previous record after which we will append the current one.\n let previousRecord: IterableChangeRecord_<V> | null;\n\n if (record === null) {\n previousRecord = this._itTail;\n } else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n\n // See if we have evicted the item, which used to be at some anterior position of _itHead list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._reinsertAfter(record, previousRecord, index);\n } else {\n // Attempt to see if the item is at some posterior position of _itHead list.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have the item in _itHead at/after `index` position. We need to move it forward in the\n // collection.\n // But first we need to check if identity changed, so we can update in view if necessary.\n if (!Object.is(record.item, item)) this._addIdentityChange(record, item);\n\n this._moveAfter(record, previousRecord, index);\n } else {\n // It is a new item: add it.\n record = this._addAfter(\n new IterableChangeRecord_<V>(item, itemTrackBy),\n previousRecord,\n index,\n );\n }\n }\n return record;\n }\n\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n _verifyReinsertion(\n record: IterableChangeRecord_<V>,\n item: V,\n itemTrackBy: any,\n index: number,\n ): IterableChangeRecord_<V> {\n let reinsertRecord: IterableChangeRecord_<V> | null =\n this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev!, index);\n } else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n }\n\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n _truncate(record: IterableChangeRecord_<V> | null) {\n // Anything after that needs to be removed;\n while (record !== null) {\n const nextRecord: IterableChangeRecord_<V> | null = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n }\n\n /** @internal */\n _reinsertAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n const prev = record._prevRemoved;\n const next = record._nextRemoved;\n\n if (prev === null) {\n this._removalsHead = next;\n } else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n } else {\n next._prevRemoved = prev;\n }\n\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _moveAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n }\n\n /** @internal */\n _addAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n this._insertAfter(record, prevRecord, index);\n\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n } else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n }\n\n /** @internal */\n _insertAfter(\n record: IterableChangeRecord_<V>,\n prevRecord: IterableChangeRecord_<V> | null,\n index: number,\n ): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n\n const next: IterableChangeRecord_<V> | null =\n prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n } else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n } else {\n prevRecord._next = record;\n }\n\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap<V>();\n }\n this._linkedRecords.put(record);\n\n record.currentIndex = index;\n return record;\n }\n\n /** @internal */\n _remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n return this._addToRemovals(this._unlink(record));\n }\n\n /** @internal */\n _unlink(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n\n const prev = record._prev;\n const next = record._next;\n\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n\n if (prev === null) {\n this._itHead = next;\n } else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n } else {\n next._prev = prev;\n }\n\n return record;\n }\n\n /** @internal */\n _addToMoves(record: IterableChangeRecord_<V>, toIndex: number): IterableChangeRecord_<V> {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n\n if (record.previousIndex === toIndex) {\n return record;\n }\n\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n } else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n\n return record;\n }\n\n private _addToRemovals(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap<V>();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n } else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n }\n\n /** @internal */\n _addIdentityChange(record: IterableChangeRecord_<V>, item: V) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n } else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n }\n}\n\nexport class IterableChangeRecord_<V> implements IterableChangeRecord<V> {\n currentIndex: number | null = null;\n previousIndex: number | null = null;\n\n /** @internal */\n _nextPrevious: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _prev: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _next: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _prevDup: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextDup: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _prevRemoved: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextRemoved: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextAdded: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextMoved: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _nextIdentityChange: IterableChangeRecord_<V> | null = null;\n\n constructor(\n public item: V,\n public trackById: any,\n ) {}\n}\n\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList<V> {\n /** @internal */\n _head: IterableChangeRecord_<V> | null = null;\n /** @internal */\n _tail: IterableChangeRecord_<V> | null = null;\n\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n add(record: IterableChangeRecord_<V>): void {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n } else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail!._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n }\n\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n get(trackById: any, atOrAfterIndex: number | null): IterableChangeRecord_<V> | null {\n let record: IterableChangeRecord_<V> | null;\n for (record = this._head; record !== null; record = record._nextDup) {\n if (\n (atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex!) &&\n Object.is(record.trackById, trackById)\n ) {\n return record;\n }\n }\n return null;\n }\n\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n remove(record: IterableChangeRecord_<V>): boolean {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n\n const prev: IterableChangeRecord_<V> | null = record._prevDup;\n const next: IterableChangeRecord_<V> | null = record._nextDup;\n if (prev === null) {\n this._head = next;\n } else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n } else {\n next._prevDup = prev;\n }\n return this._head === null;\n }\n}\n\nclass _DuplicateMap<V> {\n map = new Map<any, _DuplicateItemRecordList<V>>();\n\n put(record: IterableChangeRecord_<V>) {\n const key = record.trackById;\n\n let duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList<V>();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n }\n\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n get(trackById: any, atOrAfterIndex: number | null): IterableChangeRecord_<V> | null {\n const key = trackById;\n const recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n }\n\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n remove(record: IterableChangeRecord_<V>): IterableChangeRecord_<V> {\n const key = record.trackById;\n const recordList: _DuplicateItemRecordList<V> = this.map.get(key)!;\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n }\n\n get isEmpty(): boolean {\n return this.map.size === 0;\n }\n\n clear() {\n this.map.clear();\n }\n}\n\nfunction getPreviousIndex(\n item: any,\n addRemoveOffset: number,\n moveOffsets: number[] | null,\n): number {\n const previousIndex = item.previousIndex;\n if (previousIndex === null) return previousIndex;\n let moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\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.dev/license\n */\n\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {isJsObject} from '../../util/iterable';\nimport {stringify} from '../../util/stringify';\n\nimport {\n KeyValueChangeRecord,\n KeyValueChanges,\n KeyValueDiffer,\n KeyValueDifferFactory,\n} from './keyvalue_differs';\n\nexport class DefaultKeyValueDifferFactory<K, V> implements KeyValueDifferFactory {\n constructor() {}\n supports(obj: any): boolean {\n return obj instanceof Map || isJsObject(obj);\n }\n\n create<K, V>(): KeyValueDiffer<K, V> {\n return new DefaultKeyValueDiffer<K, V>();\n }\n}\n\nexport class DefaultKeyValueDiffer<K, V> implements KeyValueDiffer<K, V>, KeyValueChanges<K, V> {\n private _records = new Map<K, KeyValueChangeRecord_<K, V>>();\n private _mapHead: KeyValueChangeRecord_<K, V> | null = null;\n // _appendAfter is used in the check loop\n private _appendAfter: KeyValueChangeRecord_<K, V> | null = null;\n private _previousMapHead: KeyValueChangeRecord_<K, V> | null = null;\n private _changesHead: KeyValueChangeRecord_<K, V> | null = null;\n private _changesTail: KeyValueChangeRecord_<K, V> | null = null;\n private _additionsHead: KeyValueChangeRecord_<K, V> | null = null;\n private _additionsTail: KeyValueChangeRecord_<K, V> | null = null;\n private _removalsHead: KeyValueChangeRecord_<K, V> | null = null;\n private _removalsTail: KeyValueChangeRecord_<K, V> | null = null;\n\n get isDirty(): boolean {\n return (\n this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null\n );\n }\n\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n }\n\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n }\n\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n }\n\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n }\n\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void) {\n let record: KeyValueChangeRecord_<K, V> | null;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n }\n\n diff(map?: Map<any, any> | {[k: string]: any} | null): any {\n if (!map) {\n map = new Map();\n } else if (!(map instanceof Map || isJsObject(map))) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DIFFER_INPUT,\n ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`,\n );\n }\n\n return this.check(map) ? this : null;\n }\n\n onDestroy() {}\n\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n check(map: Map<any, any> | {[k: string]: any}): boolean {\n this._reset();\n\n let insertBefore = this._mapHead;\n this._appendAfter = null;\n\n this._forEach(map, (value: any, key: any) => {\n if (insertBefore && insertBefore.key === key) {\n this._maybeAddToChanges(insertBefore, value);\n this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n } else {\n const record = this._getOrCreateRecordForKey(key, value);\n insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n\n this._removalsHead = insertBefore;\n\n for (\n let record: KeyValueChangeRecord_<K, V> | null = insertBefore;\n record !== null;\n record = record._nextRemoved\n ) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n\n // Make sure tails have no next records from previous runs\n if (this._changesTail) this._changesTail._nextChanged = null;\n if (this._additionsTail) this._additionsTail._nextAdded = null;\n\n return this.isDirty;\n }\n\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n private _insertBeforeOrAppend(\n before: KeyValueChangeRecord_<K, V> | null,\n record: KeyValueChangeRecord_<K, V>,\n ): KeyValueChangeRecord_<K, V> | null {\n if (before) {\n const prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n\n this._appendAfter = before;\n return before;\n }\n\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n } else {\n this._mapHead = record;\n }\n\n this._appendAfter = record;\n return null;\n }\n\n private _getOrCreateRecordForKey(key: K, value: V): KeyValueChangeRecord_<K, V> {\n if (this._records.has(key)) {\n const record = this._records.get(key)!;\n this._maybeAddToChanges(record, value);\n const prev = record._prev;\n const next = record._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record._next = null;\n record._prev = null;\n\n return record;\n }\n\n const record = new KeyValueChangeRecord_<K, V>(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n }\n\n /** @internal */\n _reset() {\n if (this.isDirty) {\n let record: KeyValueChangeRecord_<K, V> | null;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n }\n\n // Add the record or a given key to the list of changes only when the value has actually changed\n private _maybeAddToChanges(record: KeyValueChangeRecord_<K, V>, newValue: any): void {\n if (!Object.is(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n }\n\n private _addToAdditions(record: KeyValueChangeRecord_<K, V>) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n } else {\n this._additionsTail!._nextAdded = record;\n this._additionsTail = record;\n }\n }\n\n private _addToChanges(record: KeyValueChangeRecord_<K, V>) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n } else {\n this._changesTail!._nextChanged = record;\n this._changesTail = record;\n }\n }\n\n /** @internal */\n private _forEach<K, V>(obj: Map<K, V> | {[k: string]: V}, fn: (v: V, k: any) => void) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n } else {\n Object.keys(obj).forEach((k) => fn(obj[k], k));\n }\n }\n}\n\nclass KeyValueChangeRecord_<K, V> implements KeyValueChangeRecord<K, V> {\n previousValue: V | null = null;\n currentValue: V | null = null;\n\n /** @internal */\n _nextPrevious: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _next: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _prev: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _nextAdded: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _nextRemoved: KeyValueChangeRecord_<K, V> | null = null;\n /** @internal */\n _nextChanged: KeyValueChangeRecord_<K, V> | null = null;\n\n constructor(public key: K) {}\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.dev/license\n */\n\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {StaticProvider} from '../../di/interface/provider';\nimport {Optional, SkipSelf} from '../../di/metadata';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';\n\n/**\n * A type describing supported iterable types.\n *\n * @publicApi\n */\nexport type NgIterable<T> = Array<T> | Iterable<T>;\n\n/**\n * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to\n * respond to changes in an iterable by effecting equivalent changes in the DOM.\n *\n * @publicApi\n */\nexport interface IterableDiffer<V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;\n}\n\n/**\n * An object describing the changes in the `Iterable` collection since last time\n * `IterableDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface IterableChanges<V> {\n /**\n * Iterate over all changes. `IterableChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over a set of operations which when applied to the original `Iterable` will produce the\n * new `Iterable`.\n *\n * NOTE: These are not necessarily the actual operations which were applied to the original\n * `Iterable`, rather these are a set of computed operations which may not be the same as the\n * ones applied.\n *\n * @param record A change which needs to be applied\n * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the\n * original `Iterable` location, where as `previousIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the\n * original `Iterable` location, where as `currentIndex` refers to the transient location\n * of the item, after applying the operations up to this point.\n */\n forEachOperation(\n fn: (\n record: IterableChangeRecord<V>,\n previousIndex: number | null,\n currentIndex: number | null,\n ) => void,\n ): void;\n\n /**\n * Iterate over changes in the order of original `Iterable` showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all added items. */\n forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all moved items. */\n forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /** Iterate over all removed items. */\n forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;\n\n /**\n * Iterate over all items which had their identity (as computed by the `TrackByFunction`)\n * changed.\n */\n forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface IterableChangeRecord<V> {\n /** Current index of the item in `Iterable` or null if removed. */\n readonly currentIndex: number | null;\n\n /** Previous index of the item in `Iterable` or null if added. */\n readonly previousIndex: number | null;\n\n /** The item. */\n readonly item: V;\n\n /** Track by identity as computed by the `TrackByFunction`. */\n readonly trackById: any;\n}\n\n/**\n * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely\n * identifies items in an iterable.\n *\n * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates\n * when items in the iterable are reordered, new items are added, or existing items are removed.\n *\n *\n * In all of these scenarios it is usually desirable to only update the DOM elements associated\n * with the items affected by the change. This behavior is important to:\n *\n * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the\n * iterable is modified\n * - enable animation of item addition, removal, and iterable reordering\n * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically\n * populated using `NgForOf` and the bound iterable is updated\n *\n * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over\n * contains a property with a unique identifier. For example, given a model:\n *\n * ```ts\n * class User {\n * id: number;\n * name: string;\n * ...\n * }\n * ```\n * a custom `trackBy` function could look like the following:\n * ```ts\n * function userTrackBy(index, user) {\n * return user.id;\n * }\n * ```\n *\n * A custom `trackBy` function must have several properties:\n *\n * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always\n * return the same value for a given input)\n * - return unique value for all unique inputs\n * - be fast\n *\n * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)\n * @publicApi\n */\nexport interface TrackByFunction<T> {\n // Note: the type parameter `U` enables more accurate template type checking in case a trackBy\n // function is declared using a base type of the iterated type. The `U` type gives TypeScript\n // additional freedom to infer a narrower type for the `item` parameter type, instead of imposing\n // the trackBy's declared item type as the inferred type for `T`.\n // See https://github.com/angular/angular/issues/40125\n\n /**\n * @param index The index of the item within the iterable.\n * @param item The item in the iterable.\n */\n <U extends T>(index: number, item: T & U): any;\n}\n\n/**\n * Provides a factory for {@link IterableDiffer}.\n *\n * @publicApi\n */\nexport interface IterableDifferFactory {\n supports(objects: any): boolean;\n create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;\n}\n\nexport function defaultIterableDiffersFactory() {\n return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nexport class IterableDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: IterableDiffers,\n providedIn: 'root',\n factory: defaultIterableDiffersFactory,\n });\n\n constructor(private factories: IterableDifferFactory[]) {}\n\n static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers {\n if (parent != null) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n\n return new IterableDiffers(factories);\n }\n\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n static extend(factories: IterableDifferFactory[]): StaticProvider {\n return {\n provide: IterableDiffers,\n useFactory: (parent: IterableDiffers | null) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for IterableDiffers, in such a case just assume\n // `defaultIterableDiffersFactory`.\n return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]],\n };\n }\n\n find(iterable: any): IterableDifferFactory {\n const factory = this.factories.find((f) => f.supports(iterable));\n if (factory != null) {\n return factory;\n } else {\n throw new RuntimeError(\n RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY,\n ngDevMode &&\n `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(\n iterable,\n )}'`,\n );\n }\n }\n}\n\nexport function getTypeNameForDebugging(type: any): string {\n return type['name'] || typeof type;\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.dev/license\n */\n\nimport {Optional, SkipSelf, StaticProvider, ɵɵdefineInjectable} from '../../di';\nimport {RuntimeError, RuntimeErrorCode} from '../../errors';\n\nimport {DefaultKeyValueDifferFactory} from './default_keyvalue_differ';\n\n/**\n * A differ that tracks changes made to an object over time.\n *\n * @publicApi\n */\nexport interface KeyValueDiffer<K, V> {\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: Map<K, V>): KeyValueChanges<K, V> | null;\n\n /**\n * Compute a difference between the previous state and the new `object` state.\n *\n * @param object containing the new value.\n * @returns an object describing the difference. The return value is only valid until the next\n * `diff()` invocation.\n */\n diff(object: {[key: string]: V}): KeyValueChanges<string, V> | null;\n // TODO(TS2.1): diff<KP extends string>(this: KeyValueDiffer<KP, V>, object: Record<KP, V>):\n // KeyValueDiffer<KP, V>;\n}\n\n/**\n * An object describing the changes in the `Map` or `{[k:string]: string}` since last time\n * `KeyValueDiffer#diff()` was invoked.\n *\n * @publicApi\n */\nexport interface KeyValueChanges<K, V> {\n /**\n * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes\n * to each item.\n */\n forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over changes in the order of original Map showing where the original items\n * have moved.\n */\n forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all keys for which values have changed.\n */\n forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all added items.\n */\n forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n\n /**\n * Iterate over all removed items.\n */\n forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;\n}\n\n/**\n * Record representing the item change information.\n *\n * @publicApi\n */\nexport interface KeyValueChangeRecord<K, V> {\n /**\n * Current key in the Map.\n */\n readonly key: K;\n\n /**\n * Current value for the key or `null` if removed.\n */\n readonly currentValue: V | null;\n\n /**\n * Previous value for the key or `null` if added.\n */\n readonly previousValue: V | null;\n}\n\n/**\n * Provides a factory for {@link KeyValueDiffer}.\n *\n * @publicApi\n */\nexport interface KeyValueDifferFactory {\n /**\n * Test to see if the differ knows how to diff this kind of object.\n */\n supports(objects: any): boolean;\n\n /**\n * Create a `KeyValueDiffer`.\n */\n create<K, V>(): KeyValueDiffer<K, V>;\n}\n\nexport function defaultKeyValueDiffersFactory() {\n return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nexport class KeyValueDiffers {\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: KeyValueDiffers,\n providedIn: 'root',\n factory: defaultKeyValueDiffersFactory,\n });\n\n /**\n * @deprecated v4.0.0 - Should be private.\n */\n factories: KeyValueDifferFactory[];\n\n constructor(factories: KeyValueDifferFactory[]) {\n this.factories = factories;\n }\n\n static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers {\n if (parent) {\n const copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n }\n\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider {\n return {\n provide: KeyValueDiffers,\n useFactory: (parent: KeyValueDiffers) => {\n // if parent is null, it means that we are in the root injector and we have just overridden\n // the default injection mechanism for KeyValueDiffers, in such a case just assume\n // `defaultKeyValueDiffersFactory`.\n return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]],\n };\n }\n\n find(kv: any): KeyValueDifferFactory {\n const factory = this.factories.find((f) => f.supports(kv));\n if (factory) {\n return factory;\n }\n throw new RuntimeError(\n RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY,\n ngDevMode && `Cannot find a differ supporting object '${kv}'`,\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.dev/license\n */\n\nimport {DefaultIterableDifferFactory} from './differs/default_iterable_differ';\nimport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nimport {IterableDifferFactory, IterableDiffers} from './differs/iterable_differs';\nimport {KeyValueDifferFactory, KeyValueDiffers} from './differs/keyvalue_differs';\n\nexport {SimpleChange, SimpleChanges} from '../interface/simple_change';\nexport {devModeEqual} from '../util/comparison';\nexport {ChangeDetectorRef} from './change_detector_ref';\nexport {ChangeDetectionStrategy} from './constants';\nexport {\n DefaultIterableDiffer,\n DefaultIterableDifferFactory,\n} from './differs/default_iterable_differ';\nexport {DefaultKeyValueDifferFactory} from './differs/default_keyvalue_differ';\nexport {\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDifferFactory,\n IterableDiffers,\n NgIterable,\n TrackByFunction,\n} from './differs/iterable_differs';\nexport {\n KeyValueChangeRecord,\n KeyValueChanges,\n KeyValueDiffer,\n KeyValueDifferFactory,\n KeyValueDiffers,\n} from './differs/keyvalue_differs';\nexport {PipeTransform} from './pipe_transform';\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff: KeyValueDifferFactory[] = [new DefaultKeyValueDifferFactory()];\n\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff: IterableDifferFactory[] = [new DefaultIterableDifferFactory()];\n\nexport const defaultIterableDiffers = new IterableDiffers(iterableDiff);\n\nexport const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\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.dev/license\n */\n\nimport {StaticProvider} from '../di';\n\nimport {createPlatformFactory} from './platform';\nimport {PlatformRef} from './platform_ref';\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nexport const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef =\n createPlatformFactory(null, 'core', []);\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.dev/license\n */\n\nimport {NgModule} from '../metadata';\n\nimport {ApplicationRef} from './application_ref';\n\n/**\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects\n * `ApplicationRef` to instantiate it.\n *\n * @publicApi\n */\n@NgModule()\nexport class ApplicationModule {\n // Inject ApplicationRef to make it eager...\n constructor(appRef: ApplicationRef) {}\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.dev/license\n */\n\nimport {APP_BOOTSTRAP_LISTENER, ApplicationRef, whenStable} from '../application/application_ref';\nimport {Console} from '../console';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n Injector,\n makeEnvironmentProviders,\n Provider,\n} from '../di';\nimport {inject} from '../di/injector_compatibility';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';\nimport {enableLocateOrCreateContainerRefImpl} from '../linker/view_container_ref';\nimport {enableLocateOrCreateI18nNodeImpl} from '../render3/i18n/i18n_apply';\nimport {enableLocateOrCreateElementNodeImpl} from '../render3/instructions/element';\nimport {enableLocateOrCreateElementContainerNodeImpl} from '../render3/instructions/element_container';\nimport {enableApplyRootElementTransformImpl} from '../render3/instructions/shared';\nimport {enableLocateOrCreateContainerAnchorImpl} from '../render3/instructions/template';\nimport {enableLocateOrCreateTextNodeImpl} from '../render3/instructions/text';\nimport {getDocument} from '../render3/interfaces/document';\nimport {isPlatformBrowser} from '../render3/util/misc_utils';\nimport {TransferState} from '../transfer_state';\nimport {performanceMarkFeature} from '../util/performance';\nimport {NgZone} from '../zone';\n\nimport {cleanupDehydratedViews} from './cleanup';\nimport {\n enableClaimDehydratedIcuCaseImpl,\n enablePrepareI18nBlockForHydrationImpl,\n isI18nHydrationEnabled,\n setIsI18nHydrationSupportEnabled,\n} from './i18n';\nimport {\n IS_HYDRATION_DOM_REUSE_ENABLED,\n IS_I18N_HYDRATION_ENABLED,\n PRESERVE_HOST_CONTENT,\n} from './tokens';\nimport {enableRetrieveHydrationInfoImpl, NGH_DATA_KEY, SSR_CONTENT_INTEGRITY_MARKER} from './utils';\nimport {enableFindMatchingDehydratedViewImpl} from './views';\n\n/**\n * Indicates whether the hydration-related code was added,\n * prevents adding it multiple times.\n */\nlet isHydrationSupportEnabled = false;\n\n/**\n * Indicates whether the i18n-related code was added,\n * prevents adding it multiple times.\n *\n * Note: This merely controls whether the code is loaded,\n * while `setIsI18nHydrationSupportEnabled` determines\n * whether i18n blocks are serialized or hydrated.\n */\nlet isI18nHydrationRuntimeSupportEnabled = false;\n\n/**\n * Defines a period of time that Angular waits for the `ApplicationRef.isStable` to emit `true`.\n * If there was no event with the `true` value during this time, Angular reports a warning.\n */\nconst APPLICATION_IS_STABLE_TIMEOUT = 10_000;\n\n/**\n * Brings the necessary hydration code in tree-shakable manner.\n * The code is only present when the `provideClientHydration` is\n * invoked. Otherwise, this code is tree-shaken away during the\n * build optimization step.\n *\n * This technique allows us to swap implementations of methods so\n * tree shaking works appropriately when hydration is disabled or\n * enabled. It brings in the appropriate version of the method that\n * supports hydration only when enabled.\n */\nfunction enableHydrationRuntimeSupport() {\n if (!isHydrationSupportEnabled) {\n isHydrationSupportEnabled = true;\n enableRetrieveHydrationInfoImpl();\n enableLocateOrCreateElementNodeImpl();\n enableLocateOrCreateTextNodeImpl();\n enableLocateOrCreateElementContainerNodeImpl();\n enableLocateOrCreateContainerAnchorImpl();\n enableLocateOrCreateContainerRefImpl();\n enableFindMatchingDehydratedViewImpl();\n enableApplyRootElementTransformImpl();\n }\n}\n\n/**\n * Brings the necessary i18n hydration code in tree-shakable manner.\n * Similar to `enableHydrationRuntimeSupport`, the code is only\n * present when `withI18nSupport` is invoked.\n */\nfunction enableI18nHydrationRuntimeSupport() {\n if (!isI18nHydrationRuntimeSupportEnabled) {\n isI18nHydrationRuntimeSupportEnabled = true;\n enableLocateOrCreateI18nNodeImpl();\n enablePrepareI18nBlockForHydrationImpl();\n enableClaimDehydratedIcuCaseImpl();\n }\n}\n\n/**\n * Outputs a message with hydration stats into a console.\n */\nfunction printHydrationStats(injector: Injector) {\n const console = injector.get(Console);\n const message =\n `Angular hydrated ${ngDevMode!.hydratedComponents} component(s) ` +\n `and ${ngDevMode!.hydratedNodes} node(s), ` +\n `${ngDevMode!.componentsSkippedHydration} component(s) were skipped. ` +\n `Learn more at https://angular.dev/guide/hydration.`;\n // tslint:disable-next-line:no-console\n console.log(message);\n}\n\n/**\n * Returns a Promise that is resolved when an application becomes stable.\n */\nfunction whenStableWithTimeout(appRef: ApplicationRef, injector: Injector): Promise<void> {\n const whenStablePromise = whenStable(appRef);\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;\n const console = injector.get(Console);\n const ngZone = injector.get(NgZone);\n\n // The following call should not and does not prevent the app to become stable\n // We cannot use RxJS timer here because the app would remain unstable.\n // This also avoids an extra change detection cycle.\n const timeoutId = ngZone.runOutsideAngular(() => {\n return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);\n });\n\n whenStablePromise.finally(() => clearTimeout(timeoutId));\n }\n\n return whenStablePromise;\n}\n\n/**\n * Returns a set of providers required to setup hydration support\n * for an application that is server side rendered. This function is\n * included into the `provideClientHydration` public API function from\n * the `platform-browser` package.\n *\n * The function sets up an internal flag that would be recognized during\n * the server side rendering time as well, so there is no need to\n * configure or change anything in NgUniversal to enable the feature.\n */\nexport function withDomHydration(): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: IS_HYDRATION_DOM_REUSE_ENABLED,\n useFactory: () => {\n let isEnabled = true;\n if (isPlatformBrowser()) {\n // On the client, verify that the server response contains\n // hydration annotations. Otherwise, keep hydration disabled.\n const transferState = inject(TransferState, {optional: true});\n isEnabled = !!transferState?.get(NGH_DATA_KEY, null);\n if (!isEnabled && typeof ngDevMode !== 'undefined' && ngDevMode) {\n const console = inject(Console);\n const message = formatRuntimeError(\n RuntimeErrorCode.MISSING_HYDRATION_ANNOTATIONS,\n 'Angular hydration was requested on the client, but there was no ' +\n 'serialized information present in the server response, ' +\n 'thus hydration was not enabled. ' +\n 'Make sure the `provideClientHydration()` is included into the list ' +\n 'of providers in the server part of the application configuration.',\n );\n // tslint:disable-next-line:no-console\n console.warn(message);\n }\n }\n if (isEnabled) {\n performanceMarkFeature('NgHydration');\n }\n return isEnabled;\n },\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n // i18n support is enabled by calling withI18nSupport(), but there's\n // no way to turn it off (e.g. for tests), so we turn it off by default.\n setIsI18nHydrationSupportEnabled(false);\n\n // Since this function is used across both server and client,\n // make sure that the runtime code is only added when invoked\n // on the client. Moving forward, the `isPlatformBrowser` check should\n // be replaced with a tree-shakable alternative (e.g. `isServer`\n // flag).\n if (isPlatformBrowser() && inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n verifySsrContentsIntegrity();\n enableHydrationRuntimeSupport();\n }\n },\n multi: true,\n },\n {\n provide: PRESERVE_HOST_CONTENT,\n useFactory: () => {\n // Preserve host element content only in a browser\n // environment and when hydration is configured properly.\n // On a server, an application is rendered from scratch,\n // so the host content needs to be empty.\n return isPlatformBrowser() && inject(IS_HYDRATION_DOM_REUSE_ENABLED);\n },\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n useFactory: () => {\n if (isPlatformBrowser() && inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n const appRef = inject(ApplicationRef);\n const injector = inject(Injector);\n return () => {\n // Wait until an app becomes stable and cleanup all views that\n // were not claimed during the application bootstrap process.\n // The timing is similar to when we start the serialization process\n // on the server.\n //\n // Note: the cleanup task *MUST* be scheduled within the Angular zone in Zone apps\n // to ensure that change detection is properly run afterward.\n whenStableWithTimeout(appRef, injector).then(() => {\n cleanupDehydratedViews(appRef);\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n printHydrationStats(injector);\n }\n });\n };\n }\n return () => {}; // noop\n },\n multi: true,\n },\n ]);\n}\n\n/**\n * Returns a set of providers required to setup support for i18n hydration.\n * Requires hydration to be enabled separately.\n */\nexport function withI18nSupport(): Provider[] {\n return [\n {\n provide: IS_I18N_HYDRATION_ENABLED,\n useValue: true,\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n enableI18nHydrationRuntimeSupport();\n setIsI18nHydrationSupportEnabled(true);\n performanceMarkFeature('NgI18nHydration');\n },\n multi: true,\n },\n ];\n}\n\n/**\n *\n * @param time The time in ms until the stable timedout warning message is logged\n */\nfunction logWarningOnStableTimedout(time: number, console: Console): void {\n const message =\n `Angular hydration expected the ApplicationRef.isStable() to emit \\`true\\`, but it ` +\n `didn't happen within ${time}ms. Angular hydration logic depends on the application becoming stable ` +\n `as a signal to complete hydration process.`;\n\n console.warn(formatRuntimeError(RuntimeErrorCode.HYDRATION_STABLE_TIMEDOUT, message));\n}\n\n/**\n * Verifies whether the DOM contains a special marker added during SSR time to make sure\n * there is no SSR'ed contents transformations happen after SSR is completed. Typically that\n * happens either by CDN or during the build process as an optimization to remove comment nodes.\n * Hydration process requires comment nodes produced by Angular to locate correct DOM segments.\n * When this special marker is *not* present - throw an error and do not proceed with hydration,\n * since it will not be able to function correctly.\n *\n * Note: this function is invoked only on the client, so it's safe to use DOM APIs.\n */\nfunction verifySsrContentsIntegrity(): void {\n const doc = getDocument();\n let hydrationMarker: Node | undefined;\n for (const node of doc.body.childNodes) {\n if (\n node.nodeType === Node.COMMENT_NODE &&\n node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER\n ) {\n hydrationMarker = node;\n break;\n }\n }\n if (!hydrationMarker) {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_SSR_CONTENT_INTEGRITY_MARKER,\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n 'Angular hydration logic detected that HTML content of this page was modified after it ' +\n 'was produced during server side rendering. Make sure that there are no optimizations ' +\n 'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' +\n 'relies on HTML produced by the server, including whitespaces and comment nodes.',\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.dev/license\n */\n\n/**\n * Transforms a value (typically a string) to a boolean.\n * Intended to be used as a transform function of an input.\n *\n * @usageNotes\n * ```typescript\n * @Input({ transform: booleanAttribute }) status!: boolean;\n * ```\n * @param value Value to be transformed.\n *\n * @publicApi\n */\nexport function booleanAttribute(value: unknown): boolean {\n return typeof value === 'boolean' ? value : value != null && value !== 'false';\n}\n\n/**\n * Transforms a value (typically a string) to a number.\n * Intended to be used as a transform function of an input.\n * @param value Value to be transformed.\n * @param fallbackValue Value to use if the provided value can't be parsed as a number.\n *\n * @usageNotes\n * ```typescript\n * @Input({ transform: numberAttribute }) id!: number;\n * ```\n *\n * @publicApi\n */\nexport function numberAttribute(value: unknown, fallbackValue = NaN): number {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n const isNumberValue = !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\n return isNumberValue ? Number(value) : fallbackValue;\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.dev/license\n */\n\nimport {createComputed, SIGNAL} from '@angular/core/primitives/signals';\n\nimport {performanceMarkFeature} from '../../util/performance';\n\nimport {Signal, ValueEqualityFn} from './api';\n\n/**\n * Options passed to the `computed` creation function.\n */\nexport interface CreateComputedOptions<T> {\n /**\n * A comparison function which defines equality for computed values.\n */\n equal?: ValueEqualityFn<T>;\n}\n\n/**\n * Create a computed `Signal` which derives a reactive value from an expression.\n */\nexport function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T> {\n performanceMarkFeature('NgSignals');\n const getter = createComputed(computation);\n if (options?.equal) {\n getter[SIGNAL].equal = options.equal;\n }\n if (ngDevMode) {\n getter.toString = () => `[Computed: ${getter()}]`;\n }\n return getter;\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.dev/license\n */\n\nimport {setActiveConsumer} from '@angular/core/primitives/signals';\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n */\nexport function untracked<T>(nonReactiveReadsFn: () => T): T {\n const prevConsumer = setActiveConsumer(null);\n // We are not trying to catch any particular errors here, just making sure that the consumers\n // stack is restored in case of errors.\n try {\n return nonReactiveReadsFn();\n } finally {\n setActiveConsumer(prevConsumer);\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.dev/license\n */\n\nimport {createWatch, Watch, WatchCleanupRegisterFn} from '@angular/core/primitives/signals';\n\nimport {ChangeDetectorRef} from '../../change_detection';\nimport {assertInInjectionContext} from '../../di/contextual';\nimport {InjectionToken} from '../../di/injection_token';\nimport {Injector} from '../../di/injector';\nimport {inject} from '../../di/injector_compatibility';\nimport {ɵɵdefineInjectable} from '../../di/interface/defs';\nimport {ErrorHandler} from '../../error_handler';\nimport type {ViewRef} from '../view_ref';\nimport {DestroyRef} from '../../linker/destroy_ref';\nimport {FLAGS, LViewFlags, EFFECTS_TO_SCHEDULE} from '../interfaces/view';\n\nimport {assertNotInReactiveContext} from './asserts';\nimport {performanceMarkFeature} from '../../util/performance';\nimport {PendingTasks} from '../../pending_tasks';\n\n/**\n * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed\n * before the next effect run. The cleanup function makes it possible to \"cancel\" any work that the\n * previous effect run might have started.\n *\n * @developerPreview\n */\nexport type EffectCleanupFn = () => void;\n\n/**\n * A callback passed to the effect function that makes it possible to register cleanup logic.\n *\n * @developerPreview\n */\nexport type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;\n\nexport interface SchedulableEffect {\n run(): void;\n creationZone: unknown;\n}\n\n/**\n * Not public API, which guarantees `EffectScheduler` only ever comes from the application root\n * injector.\n */\nexport const APP_EFFECT_SCHEDULER = new InjectionToken('', {\n providedIn: 'root',\n factory: () => inject(EffectScheduler),\n});\n\n/**\n * A scheduler which manages the execution of effects.\n */\nexport abstract class EffectScheduler {\n /**\n * Schedule the given effect to be executed at a later time.\n *\n * It is an error to attempt to execute any effects synchronously during a scheduling operation.\n */\n abstract scheduleEffect(e: SchedulableEffect): void;\n\n /**\n * Run any scheduled effects.\n */\n abstract flush(): void;\n\n /** @nocollapse */\n static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({\n token: EffectScheduler,\n providedIn: 'root',\n factory: () => new ZoneAwareEffectScheduler(),\n });\n}\n\n/**\n * A wrapper around `ZoneAwareQueueingScheduler` that schedules flushing via the microtask queue\n * when.\n */\nexport class ZoneAwareEffectScheduler implements EffectScheduler {\n private queuedEffectCount = 0;\n private queues = new Map<Zone | null, Set<SchedulableEffect>>();\n private readonly pendingTasks = inject(PendingTasks);\n private taskId: number | null = null;\n\n scheduleEffect(handle: SchedulableEffect): void {\n this.enqueue(handle);\n\n if (this.taskId === null) {\n const taskId = (this.taskId = this.pendingTasks.add());\n queueMicrotask(() => {\n this.flush();\n this.pendingTasks.remove(taskId);\n this.taskId = null;\n });\n }\n }\n\n private enqueue(handle: SchedulableEffect): void {\n const zone = handle.creationZone as Zone | null;\n if (!this.queues.has(zone)) {\n this.queues.set(zone, new Set());\n }\n\n const queue = this.queues.get(zone)!;\n if (queue.has(handle)) {\n return;\n }\n this.queuedEffectCount++;\n queue.add(handle);\n }\n\n /**\n * Run all scheduled effects.\n *\n * Execution order of effects within the same zone is guaranteed to be FIFO, but there is no\n * ordering guarantee between effects scheduled in different zones.\n */\n flush(): void {\n while (this.queuedEffectCount > 0) {\n for (const [zone, queue] of this.queues) {\n // `zone` here must be defined.\n if (zone === null) {\n this.flushQueue(queue);\n } else {\n zone.run(() => this.flushQueue(queue));\n }\n }\n }\n }\n\n private flushQueue(queue: Set<SchedulableEffect>): void {\n for (const handle of queue) {\n queue.delete(handle);\n this.queuedEffectCount--;\n\n // TODO: what happens if this throws an error?\n handle.run();\n }\n }\n}\n\n/**\n * Core reactive node for an Angular effect.\n *\n * `EffectHandle` combines the reactive graph's `Watch` base node for effects with the framework's\n * scheduling abstraction (`EffectScheduler`) as well as automatic cleanup via `DestroyRef` if\n * available/requested.\n */\nclass EffectHandle implements EffectRef, SchedulableEffect {\n unregisterOnDestroy: (() => void) | undefined;\n readonly watcher: Watch;\n\n constructor(\n private scheduler: EffectScheduler,\n private effectFn: (onCleanup: EffectCleanupRegisterFn) => void,\n public creationZone: Zone | null,\n destroyRef: DestroyRef | null,\n private injector: Injector,\n allowSignalWrites: boolean,\n ) {\n this.watcher = createWatch(\n (onCleanup) => this.runEffect(onCleanup),\n () => this.schedule(),\n allowSignalWrites,\n );\n this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n }\n\n private runEffect(onCleanup: WatchCleanupRegisterFn): void {\n try {\n this.effectFn(onCleanup);\n } catch (err) {\n // Inject the `ErrorHandler` here in order to avoid circular DI error\n // if the effect is used inside of a custom `ErrorHandler`.\n const errorHandler = this.injector.get(ErrorHandler, null, {optional: true});\n errorHandler?.handleError(err);\n }\n }\n\n run(): void {\n this.watcher.run();\n }\n\n private schedule(): void {\n this.scheduler.scheduleEffect(this);\n }\n\n destroy(): void {\n this.watcher.destroy();\n this.unregisterOnDestroy?.();\n\n // Note: if the effect is currently scheduled, it's not un-scheduled, and so the scheduler will\n // retain a reference to it. Attempting to execute it will be a no-op.\n }\n}\n\n/**\n * A global reactive effect, which can be manually destroyed.\n *\n * @developerPreview\n */\nexport interface EffectRef {\n /**\n * Shut down the effect, removing it from any upcoming scheduled executions.\n */\n destroy(): void;\n}\n\n/**\n * Options passed to the `effect` function.\n *\n * @developerPreview\n */\nexport interface CreateEffectOptions {\n /**\n * The `Injector` in which to create the effect.\n *\n * If this is not provided, the current [injection context](guide/di/dependency-injection-context)\n * will be used instead (via `inject`).\n */\n injector?: Injector;\n\n /**\n * Whether the `effect` should require manual cleanup.\n *\n * If this is `false` (the default) the effect will automatically register itself to be cleaned up\n * with the current `DestroyRef`.\n */\n manualCleanup?: boolean;\n\n /**\n * Whether the `effect` should allow writing to signals.\n *\n * Using effects to synchronize data by writing to signals can lead to confusing and potentially\n * incorrect behavior, and should be enabled only when necessary.\n */\n allowSignalWrites?: boolean;\n}\n\n/**\n * Create a global `Effect` for the given reactive function.\n *\n * @developerPreview\n */\nexport function effect(\n effectFn: (onCleanup: EffectCleanupRegisterFn) => void,\n options?: CreateEffectOptions,\n): EffectRef {\n performanceMarkFeature('NgSignals');\n ngDevMode &&\n assertNotInReactiveContext(\n effect,\n 'Call `effect` outside of a reactive context. For example, schedule the ' +\n 'effect inside the component constructor.',\n );\n\n !options?.injector && assertInInjectionContext(effect);\n const injector = options?.injector ?? inject(Injector);\n const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n\n const handle = new EffectHandle(\n injector.get(APP_EFFECT_SCHEDULER),\n effectFn,\n typeof Zone === 'undefined' ? null : Zone.current,\n destroyRef,\n injector,\n options?.allowSignalWrites ?? false,\n );\n\n // Effects need to be marked dirty manually to trigger their initial run. The timing of this\n // marking matters, because the effects may read signals that track component inputs, which are\n // only available after those components have had their first update pass.\n //\n // We inject `ChangeDetectorRef` optionally, to determine whether this effect is being created in\n // the context of a component or not. If it is, then we check whether the component has already\n // run its update pass, and defer the effect's initial scheduling until the update pass if it\n // hasn't already run.\n const cdr = injector.get(ChangeDetectorRef, null, {optional: true}) as ViewRef<unknown> | null;\n if (!cdr || !(cdr._lView[FLAGS] & LViewFlags.FirstLViewPass)) {\n // This effect is either not running in a view injector, or the view has already\n // undergone its first change detection pass, which is necessary for any required inputs to be\n // set.\n handle.watcher.notify();\n } else {\n // Delay the initialization of the effect until the view is fully initialized.\n (cdr._lView[EFFECTS_TO_SCHEDULE] ??= []).push(handle.watcher.notify);\n }\n\n return handle;\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.dev/license\n */\n\nimport {Injector} from '../di/injector';\nimport {EnvironmentInjector, getNullInjector} from '../di/r3_injector';\nimport {Type} from '../interface/type';\nimport {ComponentRef} from '../linker/component_factory';\n\nimport {ComponentFactory} from './component_ref';\nimport {getComponentDef} from './definition';\nimport {assertComponentDef} from './errors';\n\n/**\n * Creates a `ComponentRef` instance based on provided component type and a set of options.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: `Hello {{ name }}!`\n * })\n * class HelloComponent {\n * name = 'Angular';\n * }\n *\n * @Component({\n * standalone: true,\n * template: `<div id=\"hello-component-host\"></div>`\n * })\n * class RootComponent {}\n *\n * // Bootstrap an application.\n * const applicationRef = await bootstrapApplication(RootComponent);\n *\n * // Locate a DOM node that would be used as a host.\n * const hostElement = document.getElementById('hello-component-host');\n *\n * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.\n * const environmentInjector = applicationRef.injector;\n *\n * // We can now create a `ComponentRef` instance.\n * const componentRef = createComponent(HelloComponent, {hostElement, environmentInjector});\n *\n * // Last step is to register the newly created ref using the `ApplicationRef` instance\n * // to include the component view into change detection cycles.\n * applicationRef.attachView(componentRef.hostView);\n * componentRef.changeDetectorRef.detectChanges();\n * ```\n *\n * @param component Component class reference.\n * @param options Set of options to use:\n * * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component.\n * * `hostElement` (optional): A DOM node that should act as a host node for the component. If not\n * provided, Angular creates one based on the tag name used in the component selector (and falls\n * back to using `div` if selector doesn't have tag name info).\n * * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it\n * [here](guide/di/hierarchical-dependency-injection#elementinjector).\n * * `projectableNodes` (optional): A list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @returns ComponentRef instance that represents a given Component.\n *\n * @publicApi\n */\nexport function createComponent<C>(\n component: Type<C>,\n options: {\n environmentInjector: EnvironmentInjector;\n hostElement?: Element;\n elementInjector?: Injector;\n projectableNodes?: Node[][];\n },\n): ComponentRef<C> {\n ngDevMode && assertComponentDef(component);\n const componentDef = getComponentDef(component)!;\n const elementInjector = options.elementInjector || getNullInjector();\n const factory = new ComponentFactory<C>(componentDef);\n return factory.create(\n elementInjector,\n options.projectableNodes,\n options.hostElement,\n options.environmentInjector,\n );\n}\n\n/**\n * An interface that describes the subset of component metadata\n * that can be retrieved using the `reflectComponentType` function.\n *\n * @publicApi\n */\nexport interface ComponentMirror<C> {\n /**\n * The component's HTML selector.\n */\n get selector(): string;\n /**\n * The type of component the factory will create.\n */\n get type(): Type<C>;\n /**\n * The inputs of the component.\n */\n get inputs(): ReadonlyArray<{\n readonly propName: string;\n readonly templateName: string;\n readonly transform?: (value: any) => any;\n readonly isSignal: boolean;\n }>;\n /**\n * The outputs of the component.\n */\n get outputs(): ReadonlyArray<{readonly propName: string; readonly templateName: string}>;\n /**\n * Selector for all <ng-content> elements in the component.\n */\n get ngContentSelectors(): ReadonlyArray<string>;\n /**\n * Whether this component is marked as standalone.\n * Note: an extra flag, not present in `ComponentFactory`.\n */\n get isStandalone(): boolean;\n /**\n * // TODO(signals): Remove internal and add public documentation\n * @internal\n */\n get isSignal(): boolean;\n}\n\n/**\n * Creates an object that allows to retrieve component metadata.\n *\n * @usageNotes\n *\n * The example below demonstrates how to use the function and how the fields\n * of the returned object map to the component metadata.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * selector: 'foo-component',\n * template: `\n * <ng-content></ng-content>\n * <ng-content select=\"content-selector-a\"></ng-content>\n * `,\n * })\n * class FooComponent {\n * @Input('inputName') inputPropName: string;\n * @Output('outputName') outputPropName = new EventEmitter<void>();\n * }\n *\n * const mirror = reflectComponentType(FooComponent);\n * expect(mirror.type).toBe(FooComponent);\n * expect(mirror.selector).toBe('foo-component');\n * expect(mirror.isStandalone).toBe(true);\n * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);\n * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);\n * expect(mirror.ngContentSelectors).toEqual([\n * '*', // first `<ng-content>` in a template, the selector defaults to `*`\n * 'content-selector-a' // second `<ng-content>` in a template\n * ]);\n * ```\n *\n * @param component Component class reference.\n * @returns An object that allows to retrieve component metadata.\n *\n * @publicApi\n */\nexport function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | null {\n const componentDef = getComponentDef(component);\n if (!componentDef) return null;\n\n const factory = new ComponentFactory<C>(componentDef);\n return {\n get selector(): string {\n return factory.selector;\n },\n get type(): Type<C> {\n return factory.componentType;\n },\n get inputs(): ReadonlyArray<{\n propName: string;\n templateName: string;\n transform?: (value: any) => any;\n isSignal: boolean;\n }> {\n return factory.inputs;\n },\n get outputs(): ReadonlyArray<{propName: string; templateName: string}> {\n return factory.outputs;\n },\n get ngContentSelectors(): ReadonlyArray<string> {\n return factory.ngContentSelectors;\n },\n get isStandalone(): boolean {\n return componentDef.standalone;\n },\n get isSignal(): boolean {\n return componentDef.signals;\n },\n };\n}\n","export enum StepperTheme {\n LIGHT = 'light',\n DARK = 'dark',\n}\n\nexport enum StepperMode {\n HORIZONTAL = 'horizontal',\n RADIAL = 'radial',\n}\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowEmptyArrays: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decodeDotInKeys: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n duplicates: 'combine',\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictDepth: false,\n strictNullHandling: false,\n throwOnLimitExceeded: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options, currentArrayLength) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {\n throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(\n options.delimiter,\n options.throwOnLimitExceeded ? limit + 1 : limit\n );\n\n if (options.throwOnLimitExceeded && parts.length > limit) {\n throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');\n }\n\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key;\n var val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n\n val = utils.maybeMap(\n parseArrayValue(\n part.slice(pos + 1),\n options,\n isArray(obj[key]) ? obj[key].length : 0\n ),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(String(val));\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n var existing = has.call(obj, key);\n if (existing && options.duplicates === 'combine') {\n obj[key] = utils.combine(obj[key], val);\n } else if (!existing || options.duplicates === 'last') {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var currentArrayLength = 0;\n if (chain.length > 0 && chain[chain.length - 1] === '[]') {\n var parentKey = chain.slice(0, -1).join('');\n currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;\n }\n\n var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))\n ? []\n : utils.combine([], leaf);\n } else {\n obj = options.plainObjects ? { __proto__: null } : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;\n var index = parseInt(decodedRoot, 10);\n if (!options.parseArrays && decodedRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== decodedRoot\n && String(index) === decodedRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (decodedRoot !== '__proto__') {\n obj[decodedRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, check strictDepth option for throw, else just add whatever is left\n\n if (segment) {\n if (options.strictDepth === true) {\n throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');\n }\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n\n if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {\n throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n\n if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') {\n throw new TypeError('`throwOnLimitExceeded` option must be a boolean');\n }\n\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;\n\n if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {\n throw new TypeError('The duplicates option must be either combine, first, or last');\n }\n\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n\n return {\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n duplicates: duplicates,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,\n throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? { __proto__: null } : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? { __proto__: null } : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","<ul class=\"no-list-style font-body-1 medium-type\">\n @for (item of items; track item) {\n <li *ngIf=\"item.withDivider\" class=\"ps-xsmall-y divider\"><hr /></li>\n <li>\n <a\n *ngIf=\"item.link\"\n (beforeNavigation)=\"handleClick(item.id, $event)\"\n class=\"flex no-underline nordic-blue-900-text ps-medium-x ps-small-y\"\n [class.current-item]=\"item.active\"\n [finLink]=\"item.link\"\n [external]=\"item.external\"\n [attr.target]=\"item.openInNewTab ? '_blank' : ''\"\n [attr.data-testid]=\"item.attrs?.['data-testid']\"\n >\n <ng-container [ngTemplateOutlet]=\"itemContent\" [ngTemplateOutletContext]=\"{ item }\"></ng-container>\n </a>\n <button\n *ngIf=\"!item.link\"\n class=\"fill align-left ps-medium-x ps-small-y\"\n [attr.data-testid]=\"item.attrs?.['data-testid']\"\n (click)=\"handleClick(item.id, $event)\"\n >\n <ng-container [ngTemplateOutlet]=\"itemContent\" [ngTemplateOutletContext]=\"{ item }\"></ng-container>\n </button>\n </li>\n }\n</ul>\n\n<ng-template #itemContent let-item=\"item\">\n <fcom-icon\n *ngIf=\"item.icon?.position === IconPosition.LEFT\"\n class=\"icon-medium ms-xsmall-r\"\n [name]=\"item.icon.name\"\n [category]=\"item.icon.category\"\n ></fcom-icon>\n {{ item.teaserTitle }}\n <fcom-icon\n *ngIf=\"item.icon?.position === IconPosition.RIGHT\"\n class=\"icon-medium ms-xsmall-l\"\n [name]=\"item.icon.name\"\n [category]=\"item.icon.category\"\n ></fcom-icon>\n <fcom-icon\n *ngIf=\"!item.icon && item.external\"\n class=\"icon-medium ms-xsmall-l\"\n [name]=\"SvgLibraryIcon.EXTERNAL_TAB\"\n ></fcom-icon>\n</ng-template>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { MenuListItem } from '@fcom/common/interfaces';\n\nimport { IconPosition } from '../../icons';\n\nexport interface MenuListClickEvent {\n itemId: string;\n originalEvent: Event;\n}\n\n@Component({\n selector: 'fcom-menu-list',\n templateUrl: './menu-list.component.html',\n styleUrl: './menu-list.component.scss',\n})\nexport class MenuListComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input({ required: true })\n items: MenuListItem[];\n\n @Output()\n itemClicked = new EventEmitter<MenuListClickEvent>();\n\n handleClick(itemId: string, event: Event): void {\n this.itemClicked.emit({\n itemId,\n originalEvent: event,\n });\n }\n\n protected readonly IconPosition = IconPosition;\n}\n","import { HttpResponse } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\nimport { filter, map, pluck, tap } from 'rxjs/operators';\n\nimport {\n CmsCollection,\n CmsContent,\n CmsContentType,\n CmsImageData,\n CmsTaxonomy,\n CmsTaxonomyGeneral,\n CmsTemplate,\n CmsViewType,\n ResponseCodeHandler,\n} from '@fcom/core-api';\nimport { LoginStatus, ProfileTier } from '@fcom/core-api/login';\nimport { DdsLanguage } from '@fcom/core/interfaces';\nimport { isObject, isString, symbolToLangPath } from '@fcom/core/utils';\nimport { SentryLogger } from '@fcom/core';\n\nconst HEADER_LEVEL = 'header-level';\nconst FONT_HEADING = 'font-heading';\n\nexport const getGridClass = (content: CmsContent): string => {\n const gridClassFromTag = content?.subjectTaxonomyTags?.find((tag) => tag.startsWith(CmsTaxonomyGeneral.SECTION));\n if (gridClassFromTag) {\n return content?.subjectTaxonomyTags\n ?.filter((tag) => tag.indexOf('cmstyle-') > -1)\n .map((tag) => tag.replace('cmstyle-', ''))\n .join(' ');\n }\n if (content.viewTypeName) {\n const splitted = content.viewTypeName.split('--');\n if (splitted.length > 1) {\n return splitted[0];\n }\n if (content.viewTypeName.startsWith('section-')) {\n return content.viewTypeName;\n }\n }\n return '';\n};\n\nexport const getHeaderLevel = (\n subjectTaxonomyTags: CmsTaxonomy[],\n contentId?: number,\n sentryLogger?: SentryLogger\n): number | undefined => {\n const headerLevelTags = subjectTaxonomyTags?.filter((tag) => tag.startsWith(HEADER_LEVEL));\n if (headerLevelTags?.length > 1 && sentryLogger) {\n sentryLogger.error('Each CMS content should have only one header-level subjectTaxonomyTag.', contentId);\n }\n return headerLevelTags && headerLevelTags.length > 0\n ? Number(headerLevelTags[0].substring(HEADER_LEVEL.length + 1))\n : undefined;\n};\n\nexport const getFontLevel = (subjectTaxonomyTags: CmsTaxonomy[]): string | undefined => {\n const headerFontLevelTags = subjectTaxonomyTags?.filter((tag) => tag.startsWith(FONT_HEADING));\n\n return headerFontLevelTags && headerFontLevelTags.length > 0 ? headerFontLevelTags[0] : undefined;\n};\n\nexport const getViewType = (content: CmsContent): CmsViewType => {\n if (content.viewTypeName) {\n const splitted = content.viewTypeName.split('--');\n if (splitted.length > 1) {\n return splitted[1] as CmsViewType;\n }\n if (content.viewTypeName.indexOf('section-') === -1) {\n return content.viewTypeName as CmsViewType;\n }\n }\n return null;\n};\n\nexport const getBackgroundImageForCmsTemplate = (template$: Observable<CmsTemplate>): Observable<CmsImageData> => {\n return template$.pipe(\n pluck('main'),\n map((content) => content?.find((obj) => obj.contentType === CmsContentType.CMPlaceholder)),\n filter(Boolean),\n pluck('picture')\n );\n};\n\nexport const getShowForLoginStatus = (content: CmsContent): LoginStatus => {\n const tags = content.subjectTaxonomyTags || [];\n const hasLoggedIn = tags.includes(CmsTaxonomyGeneral.SHOW_FOR_LOGGED_IN);\n const hasNotLoggedIn = tags.includes(CmsTaxonomyGeneral.SHOW_FOR_NOT_LOGGED_IN);\n if (hasLoggedIn && hasNotLoggedIn) {\n return null;\n }\n if (hasLoggedIn) {\n return LoginStatus.LOGGED_IN;\n }\n if (hasNotLoggedIn) {\n return LoginStatus.NOT_LOGGED_IN;\n }\n return null;\n};\n\nexport const getShowForProfileTiers = (content: CmsContent): ProfileTier[] => {\n const tags = content.subjectTaxonomyTags || [];\n\n const tierTagMap = {\n [CmsTaxonomyGeneral.SHOW_FOR_BASIC_TIER]: ProfileTier.BASIC,\n [CmsTaxonomyGeneral.SHOW_FOR_SILVER_TIER]: ProfileTier.SILVER,\n [CmsTaxonomyGeneral.SHOW_FOR_GOLD_TIER]: ProfileTier.GOLD,\n [CmsTaxonomyGeneral.SHOW_FOR_PLATINUM_TIER]: ProfileTier.PLATINUM,\n [CmsTaxonomyGeneral.SHOW_FOR_PLATINUM_LUMO_TIER]: ProfileTier.LUMO,\n [CmsTaxonomyGeneral.SHOW_FOR_JUNIOR_TIER]: ProfileTier.JUNIOR,\n };\n\n return tags.map((tag) => tierTagMap[tag]).filter(Boolean);\n};\n\nconst resolveOldWwwLinks = (obj: any, ddsLocale: DdsLanguage): void => {\n Object.keys(obj).forEach((key: string) => {\n if (isString(obj[key])) {\n obj[key] = symbolToLangPath(obj[key], ddsLocale);\n } else if (isObject(obj[key])) {\n resolveOldWwwLinks(obj[key], ddsLocale);\n }\n });\n};\n\nexport const recursiveParse = (\n item: CmsContent | CmsCollection,\n sentryLogger: SentryLogger\n): CmsContent | CmsCollection => {\n const recursiveParseMapper = (item: CmsContent | CmsCollection) => recursiveParse(item, sentryLogger);\n // @TODO: Remove delete responsiveImageData when CMS has migrated away from these\n if (item.picture) {\n delete item.picture['responsiveImageData'];\n }\n if (Array.isArray(item['media'])) {\n item['media'].forEach((media) => {\n delete media['responsiveImageData'];\n });\n }\n const content: CmsContent = {\n ...item,\n gridClass: getGridClass(item),\n viewType: getViewType(item),\n showForLoginStatus: getShowForLoginStatus(item),\n showForProfileTiers: getShowForProfileTiers(item),\n headerLevel: getHeaderLevel(item?.subjectTaxonomyTags, item?.contentId, sentryLogger),\n };\n\n if (Array.isArray(item.related) && item.related.length) {\n content.related = item.related.map(recursiveParseMapper);\n }\n\n if (\n (item.contentType === CmsContentType.CMTeaser || item.contentType === CmsContentType.CMPersonalized) &&\n Array.isArray(item.items) &&\n item.items.length\n ) {\n return {\n ...content,\n items: item.items.map(recursiveParseMapper),\n };\n }\n if (item.contentType === CmsContentType.CMCollection) {\n return {\n ...content,\n items: (item as CmsCollection).items.map(recursiveParseMapper),\n };\n }\n return content;\n};\n\nexport const hasPersonalizedContent = (items: CmsContent[] | undefined): boolean => {\n if (!items) {\n return false;\n }\n return items.some((item) => {\n return (\n (item.contentType === CmsContentType.CMPersonalized && item.personalizationParameters?.length) ||\n hasPersonalizedContent(item.items)\n );\n });\n};\n\nexport const parseCmsTemplate = (\n data: CmsTemplate,\n ddsLocale: DdsLanguage,\n sentryLogger: SentryLogger\n): CmsTemplate => {\n resolveOldWwwLinks(data, ddsLocale);\n const recursiveParseMapper = (item: CmsContent | CmsCollection) => recursiveParse(item, sentryLogger);\n return {\n header: data.header.map(recursiveParseMapper),\n main: data.main.map(recursiveParseMapper),\n footer: data.footer.map(recursiveParseMapper),\n };\n};\n\n/*\n * Removes empty paragraphs and such originating from CMS.\n * Useful when e.g. teaserText has to be \"empty\", but CMS doesn't allow it.\n * */\nexport const removeEmptyCmsText = (text: string): string => {\n return (text || '').replace(/<p>-<\\/p>/gi, '');\n};\n\nexport const finUniversalResponseStatus =\n <T>(serverResponseCodeHandler: ResponseCodeHandler | undefined, setterRef: string, contentUrl: string) =>\n (response$: Observable<HttpResponse<T>>): Observable<HttpResponse<T>> =>\n response$.pipe(\n tap((res) => {\n if (serverResponseCodeHandler) {\n const cacheControl = res.headers.get('Cache-Control');\n const expires = res.headers.get('Expires');\n const lastModified = res.headers.get('Last-Modified');\n const edgeCacheTag = res.headers.get('X-Edge-Cache-Tag');\n\n serverResponseCodeHandler.setUniversalResponseStatus(setterRef, 200, contentUrl, {\n ...(cacheControl && { 'Cache-Control': cacheControl }),\n ...(expires && { Expires: expires }),\n ...(lastModified && { 'Last-Modified': lastModified }),\n ...(edgeCacheTag && { 'Edge-Cache-Tag': edgeCacheTag }),\n });\n }\n })\n );\n","import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\ninterface LetContext<T> {\n finLet: T;\n}\n\n@Directive({\n selector: '[finLet]',\n})\nexport class LetDirective<T> {\n private context: LetContext<T> = { finLet: null };\n\n constructor(\n private viewContainer: ViewContainerRef,\n private templateRef: TemplateRef<LetContext<T>>\n ) {\n this.viewContainer.createEmbeddedView(this.templateRef, this.context);\n }\n\n @Input()\n set finLet(value: T) {\n this.context.finLet = value;\n }\n}\n","<div class=\"flex flex--column border rounded-large white-bg ms-medium-b overflow-hidden\">\n <div class=\"flex flex--space-between ps-medium\">\n <h3 class=\"mr-clear-t font-heading-4\">{{ title | finLocalization }}</h3>\n <fcom-icon\n *ngIf=\"showIcon\"\n [dataTestId]=\"'pax-logic-icon'\"\n [name]=\"SvgLibraryIcon.FINNAIR_EMBLEM_BLOCK\"\n ></fcom-icon>\n </div>\n <div data-testid=\"pax-login-benefits\" class=\"flex ps-medium-x ps-xsmall-y pax-login-row\">\n <ul *ngIf=\"benefitMode === 'list'\" class=\"flex-1 pax-login-list\">\n <li>{{ 'loginPromotion.benefitList.personalDetailsFilled' | finLocalization }}</li>\n <li>{{ 'loginPromotion.benefitList.earnPoints' | finLocalization }}</li>\n <li>{{ 'loginPromotion.benefitList.membershipBenefits' | finLocalization }}</li>\n </ul>\n <p *ngIf=\"benefitMode === 'text'\" class=\"pax-login-benefit-text regular-type ms-medium-r\">\n {{ benefitText | finLocalization }}\n </p>\n <div class=\"flex flex-1 flex--column\">\n <fcom-button\n (clickBtn)=\"onLoginClick()\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n [text]=\"'loginPromotion.loginButtonText' | finLocalization\"\n data-testid=\"pax-login-card-log-in-button\"\n >\n </fcom-button>\n <fcom-button\n (clickBtn)=\"showForgotPassword ? onForgotPasswordClick() : onJoinClick()\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n [mode]=\"ButtonMode.FILL\"\n [text]=\"\n (showForgotPassword ? 'loginPromotion.forgotPassword' : 'loginPromotion.createAccount') | finLocalization\n \"\n class=\"underline ms-xsmall-t\"\n data-testid=\"pax-login-card-secondary-button\"\n >\n </fcom-button>\n </div>\n </div>\n <span\n data-testid=\"pax-login-footnote\"\n *ngIf=\"footnoteText\"\n class=\"grey-100-bg rounded-bottom-large ps-medium-x ps-xsmall-y regular-type font-body-1\"\n >{{ footnoteText | finLocalization }}\n </span>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\n\nimport { ButtonMode, ButtonTheme, NotificationTheme } from '@fcom/ui-components';\nimport { JoinService, LoginService } from '@fcom/common/login/services';\nimport { GtmService } from '@fcom/common/gtm/services/gtm.service';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { AppState } from '@fcom/core/interfaces';\nimport { LoginActions } from '@fcom/core/actions';\nimport { LoginStep } from '@fcom/core-api/login';\nimport { ConfigService } from '@fcom/core/services';\n\nimport { ScrollService } from '../../../services';\n\n@Component({\n selector: 'fin-login-card',\n templateUrl: './login-card.component.html',\n styleUrls: ['./login-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoginCardComponent {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonMode = ButtonMode;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n /**\n * Whether to show the Finnair Plus icon in the right upper corner\n */\n @Input()\n showIcon: boolean;\n\n @Input()\n footnoteText: string;\n\n /**\n * Mode to determine how to show benefits of logging in.\n * `list` shows a list and `text` shows a sentence.\n */\n @Input()\n benefitMode: 'list' | 'text' = 'list';\n\n /**\n * Title shown at the top of the card\n */\n @Input()\n title: string;\n\n @Input()\n benefitText: string;\n\n @Input()\n showForgotPassword = false;\n\n @Input()\n scrollOnCta = false;\n\n constructor(\n private loginService: LoginService,\n private gtmService: GtmService,\n private store$: Store<AppState>,\n private scrollService: ScrollService,\n private configService: ConfigService,\n public joinService: JoinService\n ) {}\n\n onJoinClick(): void {\n this.gtmService.trackElement(\n 'join-promotion',\n GaContext.FINNAIR_PLUS,\n ElementTypes.LINK,\n undefined,\n ElementActions.CLICK\n );\n if (this.configService.cfg.enableJoinDialog) {\n if (this.scrollOnCta) {\n this.scrollService.scrollTop();\n }\n this.joinService.joinDialogOpen$.next(true);\n } else {\n this.loginService.redirectToJoin();\n }\n }\n\n onLoginClick(): void {\n this.gtmService.trackElement(\n 'login-promotion',\n GaContext.FINNAIR_PLUS,\n ElementTypes.LINK,\n undefined,\n ElementActions.CLICK\n );\n if (this.configService.cfg.enableLoginDialog) {\n if (this.scrollOnCta) {\n this.scrollService.scrollTop();\n }\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.CREDENTIALS }));\n } else {\n this.loginService.redirectToLogin();\n }\n }\n\n onForgotPasswordClick(): void {\n this.gtmService.trackElement(\n 'forgot-pwd-promotion',\n GaContext.FINNAIR_PLUS,\n ElementTypes.LINK,\n undefined,\n ElementActions.CLICK\n );\n this.loginService.redirectToForgotPassword();\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTarget } from '@fcom/core-api';\n\nimport { toLinkData } from '../../services';\n\n@Component({\n selector: 'cms-cta-with-image-and-text',\n template: `\n <fin-cta-with-image-and-text\n [target$]=\"cmsTarget$\"\n [teaserTitle$]=\"content$ | finMap: 'teaserTitle'\"\n [teaserText$]=\"content$ | finMap: 'teaserText'\"\n [iconUrl$]=\"content$ | finMap: 'iconUrl'\"\n >\n </fin-cta-with-image-and-text>\n `,\n})\nexport class CmsCtaWithImageAndTextComponent implements OnInit {\n @Input()\n content$: Observable<any>;\n\n cmsTarget$: Observable<CmsTarget>;\n\n ngOnInit(): void {\n this.cmsTarget$ = this.content$.pipe(map((d) => toLinkData(d.target)));\n }\n}\n","if(typeof jsConfigOverride === 'undefined') { var e = new Error(\"Cannot find module 'jsConfigOverride'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }\n\nmodule.exports = jsConfigOverride;","<ng-container *ngIf=\"(openWithParams$ | async) !== null\">\n <div class=\"datepicker-container\">\n <ng-container *ngIf=\"'datepicker' | finLocalization as uiLabels\">\n <fcom-datepicker\n *ngIf=\"renderDatepicker$ | async\"\n [uiLabels]=\"uiLabels\"\n [dateLabels]=\"'date' | finLocalization\"\n [titleAreaConfiguration]=\"{\n titleAreaStyle: 'ps-large-x ps-xsmall-y',\n title: datePickerTitleLabel$ | async | finLocalization,\n titleStyle: 'font-heading-4',\n }\"\n [isDateRange]=\"(tripType$ | async) === TripType.RETURN\"\n [selectableDatesRange]=\"calendarRange\"\n [selectedDates]=\"[(travelDates$ | async)?.departureDate, (travelDates$ | async)?.returnDate]\"\n [doneBtnHidden]=\"true\"\n [showTags]=\"false\"\n [dayTemplate]=\"dayTemplate\"\n [headerTemplate]=\"\n (type === PriceCalendarType.PRICES && (isLoading$ | async)) ||\n (calendarPrices$ | async)?.histogram?.length > 0\n ? calendarHeader\n : undefined\n \"\n [scrollToMonthIndex$]=\"scrollToHistogramMonth$\"\n [showAddReturn]=\"(tripType$ | async) === TripType.ONEWAY && showAddReturn\"\n [subTitle]=\"(subTitle$ | async) ? subTitleTemplate : undefined\"\n [disabledDateRanges]=\"disabledDateRanges$ | async\"\n [showEnhancedCalendar]=\"showEnhancedCalendar$ | async\"\n (selectedDatesChange)=\"updateCalendarDates($event)\"\n (close)=\"enableNewSearchAutomatically ? onClose() : closeModal()\"\n (monthChange)=\"setHistogramMonth($event?.monthArrayIndex)\"\n (addReturn)=\"addReturn()\"\n ></fcom-datepicker>\n </ng-container>\n </div>\n\n <ng-template #subTitleTemplate>\n <ng-container *ngIf=\"subTitle$ | async as subTitle\">\n <h3 class=\"font-body-1 subTitle medium-type\" [style]=\"CMS_STYLE_OVERRIDE\">\n <span>\n {{ subTitle.origin }}\n </span>\n <span class=\"flex--nogrow ps-xxsmall-x\">\n <fcom-icon\n class=\"icon-small\"\n [name]=\"\n (tripType$ | async) === TripType.RETURN ? SvgLibraryIcon.RETURN_TRIP : SvgLibraryIcon.AIRCRAFT_HORIZONTAL\n \"\n ></fcom-icon>\n </span>\n <span>\n {{ subTitle.destination }}\n </span>\n </h3>\n </ng-container>\n </ng-template>\n <!-- custom modal footer -->\n <div\n class=\"df-tablet-up flex flex--middle ps-large-x grey-50-bg font-body-1 ps-small\"\n [ngClass]=\"{\n 'price-calendar-sticky-footer': datesSelected$ | async,\n enhancedContainer: (showEnhancedCalendar$ | async) === true,\n }\"\n data-testid=\"price-calendar-footer\"\n >\n <span class=\"flex flex--align-start flex--space-between fill price-calendar-footer-container\">\n <ng-container>\n @if (showTripPriceFrom && type === PriceCalendarType.PRICES) {\n <span data-testid=\"date-modal-price\">\n <span\n >{{\n ((tripType$ | async) === TripType.ONEWAY\n ? 'bookingWidget.priceCalendar.oneWayPerAdult'\n : 'bookingWidget.priceCalendar.roundTripPerAdult'\n ) | finLocalization\n }}\n </span>\n <span class=\"bold-type\">{{\n pricePerAdult$ | async | finPrice: { stripZeroCents: true, useSymbol: true } | finEmpty: '–'\n }}</span>\n </span>\n }\n\n @if (showFlexibleDatesSelection) {\n <span class=\"flex--end\">\n <fcom-checkbox\n [name]=\"'flexibleDates'\"\n [checked]=\"flexibleDates$ | async\"\n [disabled]=\"false\"\n (change)=\"setFlexibleDates($event)\"\n data-testid=\"flexible-dates\"\n >\n <span>{{ 'priceCalendar.flexibleDates' | finLocalization }}</span>\n </fcom-checkbox>\n </span>\n }\n </ng-container>\n </span>\n <div\n class=\"done-button align-center\"\n [class.enhancedBtn]=\"(showEnhancedCalendar$ | async) === true\"\n [class.flex]=\"enableNewSearchAutomatically\"\n >\n @if (enableNewSearchAutomatically) {\n <fcom-button\n data-testid=\"travel-dates-cancel\"\n class=\"ms-small-r\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [text]=\"'actions.cancel' | finLocalization\"\n [aria]=\"{ label: 'actions.cancel' | finLocalization, role: 'button' }\"\n (clickBtn)=\"onClose()\"\n ></fcom-button>\n\n <fcom-button\n data-testid=\"travel-dates-search\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'bookingSearch.search' | finLocalization\"\n [aria]=\"{ label: 'bookingSearch.search' | finLocalization, role: 'button' }\"\n [disabled]=\"!isSearchEnabled\"\n (clickBtn)=\"startNewSearch()\"\n ></fcom-button>\n } @else {\n <fcom-button\n [text]=\"ctaLabel\"\n [disabled]=\"ctaDisabled$ | async\"\n (clickBtn)=\"emitCTAClicked()\"\n data-testid=\"price-calendar-cta-button\"\n ></fcom-button>\n }\n </div>\n </div>\n</ng-container>\n\n<ng-template #calendarHeader>\n <fin-histogram\n [barData$]=\"calendarPrices$ | finMap: 'histogram'\"\n [selected$]=\"selectedHistogramMonth$\"\n [isActive$]=\"(openWithParams$ | async) !== undefined | finToObservable\"\n [isLoading$]=\"isLoading$\"\n (barSelected)=\"handleHistogramClick($event)\"\n (barsScrolled)=\"handleBarsScrolled($event)\"\n ></fin-histogram>\n</ng-template>\n\n<ng-template\n #dayTemplate\n let-dayValue=\"dayValue\"\n let-dayString=\"dayString\"\n let-showEnhancedCalendar=\"showEnhancedCalendar\"\n>\n <div\n class=\"calendar-day\"\n [class.enhancedDay]=\"showEnhancedCalendar\"\n *finLet=\"(calendarPrices$ | async)?.calendar?.[dayValue.id] as price\"\n [attr.data-testid]=\"'calendar-day-' + dayValue.id\"\n >\n <div\n class=\"calendar-day-number\"\n [ngClass]=\"{\n 'font-heading-5': showEnhancedCalendar,\n 'heather-700-text': showEnhancedCalendar && price?.isLowestPrice,\n 'ps-xxsmall-t': !showEnhancedCalendar,\n }\"\n >\n {{ dayString }}\n </div>\n @if ((this.isLoading$ | async) === true) {\n <div class=\"flex flex--center ps-xxsmall\">\n <div class=\"grey-bar\"></div>\n </div>\n } @else if ((calendarPrices$ | async)?.calendar) {\n <div\n class=\"calendar-day-price font-body-2 regular-type\"\n [ngClass]=\"{\n 'heather-700-text bold-type': price?.isLowestPrice,\n }\"\n [attr.data-testid]=\"'calendar-price-' + dayValue.id\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n priceTemplate;\n context: {\n amount:\n dayValue.id >= (travelDates$ | async)?.departureDate?.id &&\n dayValue.id < (travelDates$ | async)?.returnDate?.id &&\n (tripType$ | async) === TripType.RETURN\n ? undefined\n : price?.amount,\n isPriceAvailable: (calendarPrices$ | async)?.histogram,\n }\n \"\n ></ng-container>\n </div>\n } @else {\n <div class=\"calendar-day-price font-body-2 regular-type\">\n <ng-container\n *ngTemplateOutlet=\"priceTemplate; context: { amount: undefined, isPriceAvailable: false }\"\n ></ng-container>\n </div>\n }\n <ng-template #priceTemplate let-amount=\"amount\" let-isPriceAvailable=\"isPriceAvailable\">\n <ng-container *ngIf=\"isPriceAvailable\">\n {{ amount | finPrice: { abbreviate: true, useCustomFormat: true } | finEmpty: ' ' }}\n </ng-container>\n </ng-template>\n\n @if (price) {\n <div\n class=\"fill absolute\"\n [attr.data-testid]=\"'calendar-price-border-' + dayValue.id\"\n [ngClass]=\"{\n 'ps-xxsmall-x': showEnhancedCalendar,\n 'birch-300-bg': !showEnhancedCalendar && !price?.noFlight,\n 'grey-400-bg': !showEnhancedCalendar && price?.noFlight,\n 'day-border': !showEnhancedCalendar,\n }\"\n >\n @if (showEnhancedCalendar && price?.isLowestPrice) {\n <div\n class=\"day-border\"\n [class.heather-700-bg]=\"price?.isLowestPrice\"\n [class.white-bg]=\"price?.isLowestPrice\"\n ></div>\n }\n </div>\n }\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport { BehaviorSubject, combineLatest, filter, forkJoin, map, Observable, of, Subscription, switchMap } from 'rxjs';\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { delay, distinctUntilChanged, take } from 'rxjs/operators';\n\nimport { isPresent, LocalDate, unsubscribe } from '@fcom/core/utils';\nimport { ButtonMode, ButtonSize, ButtonTheme, DateRange, LoaderTheme } from '@fcom/ui-components';\nimport { Amount } from '@fcom/dapi';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { LocationRouteCffService } from '@fcom/core';\nimport { TripType } from '@fcom/core/interfaces';\nimport {\n Direction,\n ElementTypes,\n FlightSegment,\n GlobalBookingTripDates,\n PriceCalendarParams,\n PriceCalendarWithPricesParams,\n} from '@fcom/common/interfaces';\nimport { ElementActions, GaContext, SearchType } from '@fcom/common/interfaces/gtm.interface';\n\nimport { DatePickerPrices, HistogramBar, PriceCalendarCTAParams } from '../../interfaces';\nimport { PriceCalendarService } from '../../services';\nimport {\n calendarDatesToGlobalBookingTripDates,\n priceCalendarBaseParamsAreValid,\n shouldUpdateCalendarDates,\n} from '../../utils';\nimport { GtmService } from '../../gtm';\n\nexport enum PriceCalendarType {\n PRICES = 'prices',\n ONLY_DATES = 'onlyDates',\n}\n\n@Component({\n selector: 'fin-price-calendar',\n templateUrl: 'price-calendar.component.html',\n styleUrls: ['./price-calendar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PriceCalendarComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly TripType = TripType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly LoaderTheme = LoaderTheme;\n readonly CMS_STYLE_OVERRIDE = {\n 'margin-top': '0px',\n };\n readonly PriceCalendarType = PriceCalendarType;\n\n @Input()\n type: PriceCalendarType = PriceCalendarType.PRICES;\n\n @Input()\n openWithParams$: Observable<PriceCalendarParams | null>;\n\n @Input()\n showAddReturn = false;\n\n @Input()\n identifier: string;\n\n @Input()\n disabledDateRanges$: Observable<DateRange[]> = of([]);\n\n @Input()\n showFlexibleDatesSelection = false;\n\n @Input()\n showTripPriceFrom = true;\n\n @Input()\n showSubtitle = false;\n\n @Input()\n ctaLabel = '';\n\n @Input()\n enablePreFlightSearchTracking = true;\n\n @Input()\n enableNewSearchAutomatically = false;\n\n @Input()\n isSearchEnabled = false;\n\n @Input()\n showEnhancedCalendar$: Observable<boolean> = of(false);\n\n @Output()\n addReturnClicked = new EventEmitter();\n\n @Output()\n modalClose = new EventEmitter<boolean>();\n\n @Output()\n ctaClicked = new EventEmitter<PriceCalendarCTAParams>();\n\n @Output()\n travelDatesChanged = new EventEmitter<GlobalBookingTripDates>();\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n @Output()\n cancelSelection = new EventEmitter<void>();\n\n subscription = new Subscription();\n\n calendarRange: DateRange = [LocalDate.now(), LocalDate.now().plusDays(360)];\n pricePerAdult$: Observable<Amount> = of(undefined);\n datesSelected$: Observable<boolean> = of(false);\n datePickerTitleLabel$: Observable<string> = of('');\n subTitle$: Observable<{ origin: string; destination: string }>;\n calendarPrices$: Observable<DatePickerPrices>;\n tripType$: Observable<TripType> = of(undefined);\n travelDates$: Observable<GlobalBookingTripDates>;\n flexibleDates$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n ctaDisabled$: Observable<boolean> = of(false);\n isLoading$: Observable<boolean> = of(true);\n selectedHistogramMonth$: BehaviorSubject<number> = new BehaviorSubject(undefined);\n scrollToHistogramMonth$: BehaviorSubject<number> = new BehaviorSubject(undefined);\n renderDatepicker$ = new BehaviorSubject(false);\n\n constructor(\n private priceCalendarService: PriceCalendarService,\n private locationRouteCffService: LocationRouteCffService,\n private languageService: LanguageService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.subscription.add(\n this.openWithParams$.pipe(delay(1)).subscribe((params) => {\n this.renderDatepicker$.next(params !== null);\n })\n );\n this.startSearchWithSelectedDates();\n this.isLoading$ = this.type === PriceCalendarType.PRICES ? this.priceCalendarService.isLoading$ : of(false);\n this.travelDates$ = this.priceCalendarService.travelDates$;\n this.tripType$ = this.priceCalendarService.tripType$;\n\n if (this.type === PriceCalendarType.PRICES) {\n this.calendarPrices$ = this.priceCalendarService.calendarPrices$;\n this.pricePerAdult$ = this.priceCalendarService.startingFromPrice$;\n }\n\n this.datesSelected$ = combineLatest([this.travelDates$, this.tripType$]).pipe(\n map(\n ([{ departureDate, returnDate }, tripType]) =>\n isPresent(departureDate) && (tripType === TripType.ONEWAY || isPresent(returnDate))\n )\n );\n\n this.datePickerTitleLabel$ = combineLatest([this.tripType$, this.travelDates$]).pipe(\n map(([tripType, { departureDate }]) => {\n if (tripType === TripType.ONEWAY) {\n return 'bookingWidget.priceCalendar.selectDeparture.oneWay';\n }\n return isPresent(departureDate)\n ? 'bookingWidget.priceCalendar.selectReturn'\n : 'bookingWidget.priceCalendar.selectDeparture.roundTrip';\n })\n );\n\n this.ctaDisabled$ = combineLatest([this.tripType$, this.travelDates$]).pipe(\n map(([tripType, travelDates]) => {\n if (tripType === TripType.RETURN) {\n return !isPresent(travelDates.departureDate) || !isPresent(travelDates.returnDate);\n }\n return !isPresent(travelDates.departureDate);\n })\n );\n\n if (this.showSubtitle) {\n this.subTitle$ = this.priceCalendarService.params$.pipe(\n filter(Boolean),\n switchMap(({ origin, destination }) => {\n return forkJoin({\n origin: this.locationRouteCffService.bestGuessFor(origin, this.languageService.localeValue),\n destination: this.locationRouteCffService.bestGuessFor(destination, this.languageService.localeValue),\n });\n }),\n map(({ origin, destination }) => {\n const originCity = origin ? origin.cityName : '';\n const destinationCity = destination ? destination.cityName : '';\n return { origin: originCity, destination: destinationCity };\n })\n );\n }\n\n if (this.enablePreFlightSearchTracking) {\n this.subscription.add(\n this.datesSelected$\n .pipe(\n filter((datesSelected) => datesSelected),\n switchMap(() => this.priceCalendarService.getPriceCalendarCTAParams())\n )\n .subscribe((ctaParams) => {\n const { tripType, paxAmount, travelClass, flights } = ctaParams;\n\n const departureFlight: FlightSegment = {\n origin: flights[0]?.origin?.locationCode,\n destination: flights[0]?.destination?.locationCode,\n departureDate: flights[0]?.departureDate,\n };\n\n const returnFlight: FlightSegment = {\n origin: flights[1]?.origin?.locationCode,\n destination: flights[1]?.destination?.locationCode,\n departureDate: flights[1]?.departureDate,\n };\n\n const flightSegments: FlightSegment[] =\n tripType === TripType.RETURN ? [departureFlight, returnFlight] : [departureFlight];\n if (paxAmount && travelClass) {\n this.gtmService.preFlightSearch({\n flights: flightSegments,\n paxAmount,\n travelClass,\n isAward: this.type === PriceCalendarType.ONLY_DATES,\n });\n }\n })\n );\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n closeModal(): void {\n this.modalClose.emit(false);\n }\n\n addReturn(): void {\n this.priceCalendarService.convertToReturnTrip();\n this.addReturnClicked.emit();\n }\n\n updateCalendarDates(calendarDates: [string] | [string, string]): void {\n const newDates = calendarDatesToGlobalBookingTripDates(calendarDates);\n if (shouldUpdateCalendarDates(newDates, this.priceCalendarService.travelDatesValues)) {\n this.priceCalendarService.updateCalendarDates(newDates);\n this.travelDatesChanged.emit(newDates);\n }\n }\n\n setHistogramMonth(selectedMonthIndex = 0): void {\n this.selectedHistogramMonth$.next(selectedMonthIndex);\n }\n\n handleHistogramClick(selectedBar: HistogramBar): void {\n if (!selectedBar.noFlight) {\n this.gtmService.trackElement(\n 'histogram',\n 'flight-search',\n ElementTypes.BOOKING_WIDGET,\n selectedBar?.isCheapest ? 'lowest-month-click' : 'other-month-click',\n ElementActions.CLICK,\n undefined,\n this.type === PriceCalendarType.ONLY_DATES ? SearchType.AWARD : SearchType.BOOKING_FLOW\n );\n }\n this.scrollToHistogramMonth$.next(selectedBar.index);\n }\n\n handleBarsScrolled(_direction: Direction): void {\n //TODO: Check what this doing ?\n this.gtmService.trackElement(\n 'histogram',\n 'flight-search',\n ElementTypes.BOOKING_WIDGET,\n 'arrow-click',\n ElementActions.CLICK,\n undefined,\n this.type === PriceCalendarType.ONLY_DATES ? SearchType.AWARD : SearchType.BOOKING_FLOW\n );\n }\n\n emitCTAClicked(): void {\n this.subscription.add(\n this.priceCalendarService\n .getPriceCalendarCTAParams()\n .pipe(take(1))\n .subscribe((ctaParams) => {\n this.ctaClicked.emit({\n ...ctaParams,\n flexibleDates: this.flexibleDates$.value,\n });\n })\n );\n }\n\n setFlexibleDates(isChecked: boolean): void {\n this.flexibleDates$.next(isChecked);\n }\n\n onCancelSelection(): void {\n this.cancelSelection.emit();\n this.startSearchWithSelectedDates(true);\n this.closeModal();\n }\n\n onClose(): void {\n if (this.enableNewSearchAutomatically) {\n this.onCancelSelection();\n\n this.gtmService.trackElement(\n 'global-widget-cancel-new-search-from-price-calendar',\n GaContext.BOOKING_FLOW,\n ElementTypes.BOOKING_WIDGET,\n ElementTypes.BUTTON,\n '',\n ElementActions.CLICK\n );\n }\n }\n\n startNewSearch(): void {\n this.startSearch.emit();\n this.modalClose.next(true);\n\n this.gtmService.trackElement(\n 'global-widget-start-new-search-from-price-calendar',\n GaContext.BOOKING_FLOW,\n ElementTypes.BOOKING_WIDGET,\n ElementTypes.BUTTON,\n '',\n ElementActions.CLICK\n );\n }\n\n startSearchWithSelectedDates(onlyOnce = false): void {\n this.subscription.add(\n this.openWithParams$\n .pipe(\n onlyOnce ? take(1) : map((params) => params),\n filter((params) => isPresent(params) && priceCalendarBaseParamsAreValid(params)),\n distinctUntilChanged(\n (pre: PriceCalendarWithPricesParams, next: PriceCalendarWithPricesParams) =>\n pre.origin === next.origin &&\n pre.destination === next.destination &&\n pre.tripType === next.tripType &&\n pre.travelClass === next.travelClass\n )\n )\n .subscribe((params) => {\n this.selectedHistogramMonth$.next(undefined);\n this.priceCalendarService.updateParams({\n ...params,\n initialTravelDates: {\n ...params.initialTravelDates,\n returnDate: params.tripType !== TripType.RETURN ? undefined : params.initialTravelDates?.returnDate,\n },\n });\n })\n );\n }\n}\n","<ng-template\n #priceLine\n let-label=\"label\"\n let-value=\"value\"\n let-originalValue=\"originalValue\"\n let-labelContent=\"labelContent\"\n let-bold=\"bold\"\n let-borderBottom=\"borderBottom\"\n let-category=\"category\"\n>\n <tr\n [attr.data-testid]=\"'price-breakdown-price-for-' + category\"\n class=\"ps-xxsmall-b\"\n [ngClass]=\"{ 'border-bottom': borderBottom }\"\n >\n <th\n scope=\"row\"\n class=\"align-left ps-xxsmall-b\"\n [ngClass]=\"{ 'light-type': !bold, 'medium-type ms-xsmall-t': bold }\"\n >\n <ng-container *ngIf=\"label; else labelContent\">{{ label }}</ng-container>\n </th>\n <td\n data-testid=\"price-breakdown-price\"\n class=\"align-right ps-xxsmall-b\"\n [ngClass]=\"{ 'medium-type ms-xsmall-t': bold }\"\n >\n <span\n data-testid=\"price-breakdown-original-price\"\n class=\"nordic-blue-900-text strike-through pr-xxsmall-r\"\n *ngIf=\"originalValue\"\n >{{ originalValue }}</span\n >\n <span data-testid=\"price-breakdown-price\">{{ value }}</span>\n </td>\n </tr>\n</ng-template>\n\n<ng-template #titleLine let-label=\"label\" let-labelContent=\"labelContent\" let-bold=\"bold\">\n <tr class=\"ps-xxsmall-b\">\n <th\n scope=\"row\"\n class=\"align-left ps-xxsmall-y\"\n [ngClass]=\"{ 'light-type': !bold, 'medium-type ms-xsmall-t': bold }\"\n >\n <ng-container *ngIf=\"label; else labelContent\">{{ label }}</ng-container>\n </th>\n </tr>\n</ng-template>\n\n<ng-template #expandedLine let-borderBottom=\"borderBottom\">\n <tr class=\"ps-xxsmall-b\" [class.border-bottom]=\"borderBottom\">\n <ng-content></ng-content>\n </tr>\n</ng-template>\n\n<fin-expand\n *ngIf=\"prices$ | async as prices\"\n class=\"flex--basis-full block pr-small-x\"\n [key]=\"'price-breakdown-expand'\"\n [id]=\"'price-breakdown-expand'\"\n [initiallyOpen]=\"true\"\n [class.ps-small-b]=\"(expand.isOpen$ | async) === false\"\n #expand\n>\n <div class=\"trigger flex\">\n <div class=\"flex-1\">\n <h3 class=\"font-heading-4\">\n <fcom-icon\n class=\"flex flex-1 flex--nogrow flex--self-start icon-large nordic-blue-900-text\"\n [name]=\"SvgLibraryIcon.CREDIT_OR_DEBIT_CARD_BLOCK\"\n ></fcom-icon>\n <span class=\"flex-1 flex--self-center ps-xsmall-l medium-type\">\n {{ 'purchase.priceBreakdown.title' | finLocalization }}\n </span>\n </h3>\n </div>\n <fcom-icon\n class=\"flex-1 flex--nogrow rotate flex--self-start icon-medium nordic-blue-900-text\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n <div class=\"font-body-1 ps-xsmall-t content\">\n <ng-content select=\"fcom-notification\"></ng-content>\n <table class=\"fill summary-table\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.priceBreakdown.title' | finLocalization\n }}\n </caption>\n <thead>\n <tr>\n <th class=\"flex medium-type ps-xxsmall-b\" scope=\"col\" colspan=\"2\">\n {{ 'purchase.priceBreakdown.flights' | finLocalization }}\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n ((passengers$ | async).length === 1 ? 'tripCard.passenger' : 'tripCard.passengers')\n | finLocalization: { passengerAmount: (passengers$ | async).length },\n value:\n showPoints && prices?.flight?.total.totalPoints\n ? ('award.points'\n | finLocalization: { pointsAmount: +prices?.flight?.total?.totalPoints.amount | finPoints })\n : (prices?.flight?.total.baseFare | finPrice),\n bold: false,\n category: 'flights',\n }\"\n >\n </ng-container>\n <ng-template #labelContent>\n <button\n data-testid=\"price-breakdown-total-tax\"\n (click)=\"openTaxModal($event, prices?.flight?.total.totalTax)\"\n class=\"taxes-link underline nordic-blue-900-text\"\n >\n {{ 'purchase.review.taxTotal' | finLocalization }}\n </button>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n value:\n prices?.flight?.total.totalTax || {\n amount: '0',\n currencyCode: prices?.flight?.total.baseFare.currencyCode,\n } | finPrice,\n labelContent: prices?.flight?.total.totalTax ? labelContent : null,\n label: prices?.flight?.total.totalTax ? null : ('purchase.review.taxTotal' | finLocalization),\n borderBottom: prices.services.totalPerCategory?.length,\n bold: true,\n category: 'tax',\n }\"\n >\n </ng-container>\n\n <ng-container\n *ngIf=\"showTravelExtrasTitle$ | async\"\n [ngTemplateOutlet]=\"titleLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.priceBreakdown.travelExtras' | finLocalization,\n bold: true,\n }\"\n >\n </ng-container>\n <ng-container *ngIf=\"summary$ | async as summary\">\n <ng-container *ngFor=\"let sum of summary\">\n <ng-container\n *ngIf=\"sum.count && !(sum.id === Category.SAF)\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n sum.key\n | finLocalization\n : {\n seatCount: sum.count,\n mealCount: sum.count,\n baggageCount: sum.count,\n loungeCount: sum.count,\n travelComfortCount: sum.count,\n wifiCount: sum.count,\n coverCount: sum.count,\n petCount: sum.count,\n sportCount: sum.count,\n specialCount: sum.count,\n firearmCount: sum.count,\n medicCount: sum.count,\n specialNeedCount: sum.count,\n childCount: sum.count,\n amount: sum.count,\n },\n value: sum.total | finPrice,\n originalValue: sum.originalTotal | finPrice,\n bold: false,\n category: sum.id,\n }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"showSafTitle$ | async\"\n [ngTemplateOutlet]=\"titleLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.priceBreakdown.safContribution' | finLocalization,\n bold: true,\n }\"\n >\n </ng-container>\n <ng-container *ngIf=\"summary$ | async as summary\">\n <ng-container *ngFor=\"let sum of summary\">\n <ng-container\n *ngIf=\"sum.count && sum.id === Category.SAF\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n sum.key\n | finLocalization\n : {\n safCount: sum.count,\n },\n value: sum.total | finPrice,\n originalValue: sum.originalTotal | finPrice,\n bold: false,\n category: sum.id,\n }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n <tfoot></tfoot>\n </table>\n\n <div class=\"border-top ps-small flex flex--center\">\n <button\n (click)=\"openSummaryModal($event, prices)\"\n class=\"detailed-breakdown underline nordic-blue-900-text bold-type\"\n data-testid=\"see-detailed-breakdown-button\"\n >\n {{ 'purchase.priceBreakdown.detailedBreakdown' | finLocalization }}\n </button>\n </div>\n </div>\n</fin-expand>\n\n<fcom-modal\n [(open)]=\"taxModalOpen\"\n [title]=\"'purchase.review.taxTotal' | finLocalization\"\n [buttons]=\"ModalButtons.CLOSE\"\n (close)=\"closeTaxModal()\"\n>\n <div class=\"pr-large-x\">\n <cms-unstyled-fragment\n *ngIf=\"'fragments.purchaseTaxesAndRefundRenewed.url' | finLocalization\"\n class=\"block font-body-1 unstyled-fragment-line-height pr-xxsmall-y\"\n [contentUrl$]=\"'fragments.purchaseTaxesAndRefundRenewed.url' | finLocalization | finToObservable\"\n >\n </cms-unstyled-fragment>\n\n <table class=\"fill dictionary-table tax-table font-body-1\" *ngIf=\"totalTaxes$ | async as totalTaxes\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.review.taxTotal' | finLocalization\n }}\n </caption>\n <thead>\n <tr>\n <th class=\"bold-type ms-medium-y\" scope=\"col\" colspan=\"2\">\n {{ 'purchase.priceBreakdown.perBooking' | finLocalization }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let tax of totalTaxes\" class=\"flex flex--space-between\">\n <th scope=\"row\">\n <ng-container *ngIf=\"tax.code !== ENVIRONMENTAL_SURCHARGE; else environmentalSurcharge\">\n {{ 'TAX_CODES.' + tax.code.slice(0, 2) | finLocalization | finEmpty: tax.code.slice(0, 2) }}\n </ng-container>\n <ng-template #environmentalSurcharge>\n {{ 'TAX_CODES.' + ENVIRONMENTAL_SURCHARGE | finLocalization }}\n </ng-template>\n </th>\n <td>{{ tax | finPrice }}</td>\n </tr>\n </tbody>\n <tfoot>\n <tr class=\"flex flex--space-between border-top medium-type\">\n <th scope=\"row\">{{ 'price.total' | finLocalization }}</th>\n <td>{{ taxModalData?.totalTaxes | finPrice }}</td>\n </tr>\n </tfoot>\n </table>\n </div>\n</fcom-modal>\n\n<fcom-modal\n [(open)]=\"summaryModalOpen\"\n [title]=\"'purchase.priceBreakdown.detailedBreakdownPassenger' | finLocalization\"\n [buttons]=\"ModalButtons.DONE\"\n (close)=\"closeSummaryModal()\"\n data-testid=\"detailed-breakdown-per-passenger\"\n>\n <ng-container *ngFor=\"let breakdown of breakdowns$ | finObsToArray\">\n <div class=\"pr-xsmall-t pr-large-l pr-xxlarge-r\">\n <div class=\"trigger flex\" *ngIf=\"breakdown | async as passenger\">\n <div class=\"flex-1\">\n <h3 class=\"font-heading-5 nordic-blue-50-bg\">\n <span class=\"flex-1 flex--self-center ps-xsmall-l medium-type\" data-hj-suppress>\n {{ passenger?.title ? ('passenger.title.' + passenger?.title | lowercase | finLocalization) : '' }}\n {{ passenger?.firstName }} {{ passenger?.lastName }} ({{\n 'passenger.' + asPaxTypeKey(passenger.passengerTypeCode).toLowerCase() | finLocalization | titlecase\n }})\n </span>\n </h3>\n </div>\n </div>\n <div class=\"font-body-1 ps-xsmall-t content\" *ngIf=\"breakdown | async as pax\">\n <table class=\"fill price-breakdown-per-passenger\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.priceBreakdown.detailedBreakdownPassenger' | finLocalization\n }}\n </caption>\n\n <thead>\n <tr>\n <th class=\"flex medium-type ps-xxsmall-b\" scope=\"col\" colspan=\"2\">\n {{ 'purchase.priceBreakdown.flights' | finLocalization }}\n </th>\n </tr>\n </thead>\n\n <tbody>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.priceBreakdown.flights' | finLocalization,\n originalValue:\n pax.prices?.originalBaseFare && pax.discountReasonCode\n ? (pax.prices?.originalBaseFare | finPrice)\n : undefined,\n value:\n showPoints && pax.prices?.totalPoints\n ? ('award.points' | finLocalization: { pointsAmount: +pax.prices?.totalPoints.amount | finPoints })\n : (pax.prices?.baseFare | finPrice),\n bold: false,\n }\"\n >\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"expandedLine\"\n [ngTemplateOutletContext]=\"{ borderBottom: pax.services.length }\"\n >\n <ng-container>\n <tr>\n <td colspan=\"3\">\n <fin-expand\n class=\"price-breakdown-modal\"\n [key]=\"'price-breakdown-expand-' + (breakdown | async)?.id\"\n [id]=\"'price-breakdown-expand-' + (breakdown | async)?.id\"\n #expand\n >\n <div class=\"trigger flex\">\n <div class=\"flex-1\">\n <span class=\"underline medium-type\">\n {{ 'purchase.review.taxTotal' | finLocalization }}\n </span>\n </div>\n <div>\n <span class=\"medium-type\">{{\n pax.prices?.totalTax || { amount: '0', currencyCode: pax.prices?.baseFare.currencyCode }\n | finPrice\n }}</span>\n <span class=\"ps-xsmall-l\">\n <fcom-icon\n class=\"flex-1 flex--nogrow rotate flex--self-start icon-medium nordic-blue-900-text\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </span>\n </div>\n </div>\n <div class=\"font-body-1 content\">\n <ul class=\"list-disc-style\">\n <li *ngFor=\"let tax of pax.prices.taxes\">\n <div class=\"flex flex--space-between\">\n <span>\n {{\n 'TAX_CODES.' + tax.code.slice(0, 2) | finLocalization | finEmpty: tax.code.slice(0, 2)\n }}\n </span>\n <span>\n {{ tax | finPrice }}\n </span>\n </div>\n </li>\n <li *ngIf=\"+pax.prices.environmentalSurcharge?.amount > 0\">\n <div class=\"flex flex--space-between\">\n <span>\n {{ 'TAX_CODES.' + ENVIRONMENTAL_SURCHARGE | finLocalization }}\n </span>\n <span>\n {{ pax.prices.environmentalSurcharge | finPrice }}\n </span>\n </div>\n </li>\n </ul>\n </div>\n </fin-expand>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n\n <ng-container *ngFor=\"let fee of pax.prices?.fees\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.' + fee.code | finLocalization,\n value: fee | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"pax.hasOtherServices\"\n [ngTemplateOutlet]=\"titleLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.priceBreakdown.travelExtras' | finLocalization,\n bold: true,\n }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let service of pax.services\">\n <ng-container\n *ngIf=\"service.count && !(service.id === Category.SAF)\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n service.key\n | finLocalization\n : {\n seatCount: service.count,\n mealCount: service.count,\n baggageCount: service.count,\n loungeCount: service.count,\n travelComfortCount: service.count,\n wifiCount: service.count,\n coverCount: service.count,\n petCount: service.count,\n sportCount: service.count,\n specialCount: service.count,\n firearmCount: service.count,\n medicCount: service.count,\n specialNeedCount: service.count,\n childCount: service.count,\n amount: service.count,\n },\n value: service.total | finPrice,\n originalValue: service.originalTotal | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container\n *ngIf=\"pax.hasSaf\"\n [ngTemplateOutlet]=\"titleLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.priceBreakdown.safContribution' | finLocalization,\n bold: true,\n }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let service of pax.services\">\n <ng-container\n *ngIf=\"service.count && service.id === Category.SAF\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n service.key\n | finLocalization\n : {\n safCount: service.count,\n },\n value: service.total | finPrice,\n originalValue: service.originalTotal | finPrice,\n bold: false,\n category: service.id,\n }\"\n >\n </ng-container>\n </ng-container>\n </tbody>\n <tfoot class=\"border-top\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: ('purchase.priceBreakdown.totalPrice' | finLocalization),\n value:\n showPoints && pax.prices?.totalPoints\n ? ('award.points'\n | finLocalization: { pointsAmount: +pax.prices?.totalPoints.amount | finPoints }) +\n ' + ' +\n (pax.total | finPrice)\n : (pax.total | finPrice),\n bold: true,\n }\"\n >\n </ng-container>\n </tfoot>\n </table>\n </div>\n </div>\n </ng-container>\n</fcom-modal>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { EMPTY, Observable, catchError, combineLatest, filter, map } from 'rxjs';\n\nimport { hasUnitPrices } from '@fcom/common/utils';\nimport { SentryLogger } from '@fcom/core/services';\nimport {\n Category,\n FinnairAmount,\n FinnairCharge,\n FinnairPassengerCode,\n FinnairPassengerItem,\n FinnairTotalPricesDetails,\n} from '@fcom/dapi/api/models';\nimport { Amount, BreakdownModel, PriceService } from '@fcom/dapi/interfaces';\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { ModalButtons } from '@fcom/ui-components';\nimport { ElementActions, ElementTypes } from '@fcom/common/interfaces';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport {\n getCategoryServices,\n getPassengerServices,\n hasPassengers,\n passengerHasOtherServices,\n passengerHasSaf,\n showTravelExtrasTitle,\n} from '../../utils/order.utils';\n\n@Component({\n selector: 'fin-price-breakdown-renewed',\n templateUrl: './price-breakdown-renewed.component.html',\n styleUrls: ['./price-breakdown-renewed.component.scss'],\n})\nexport class PriceBreakdownRenewedComponent implements OnInit {\n public readonly ModalButtons = ModalButtons;\n public readonly asPaxTypeKey = asPaxTypeKey;\n public readonly FinnairPassengerCode = FinnairPassengerCode;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n public readonly Category = Category;\n\n @Input()\n prices$: Observable<FinnairTotalPricesDetails>;\n @Input()\n passengers$: Observable<FinnairPassengerItem[]>;\n @Input()\n showPoints = false;\n\n breakdowns$: Observable<BreakdownModel[]>;\n totalPrice$: Observable<Amount>;\n taxModalOpen = false;\n taxModalData: { totalTaxes: FinnairAmount };\n summary$: Observable<PriceService[]>;\n summaryModalOpen: boolean;\n summaryModalData: { prices: FinnairTotalPricesDetails };\n totalTaxes$: Observable<FinnairCharge[]>;\n showSafTitle$: Observable<boolean>;\n showTravelExtrasTitle$: Observable<boolean>;\n\n ENVIRONMENTAL_SURCHARGE = 'environmentalSurcharge';\n\n constructor(\n private sentryLogger: SentryLogger,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.breakdowns$ = combineLatest([this.passengers$, this.prices$]).pipe(\n filter(([passengers, prices]) => hasPassengers(passengers) && hasUnitPrices(prices)),\n map(([passengers, prices]) =>\n passengers\n .filter((passenger) => parseFloat(prices.total.totalPerPax?.[passenger.id]?.totalAmount.amount) > 0)\n .map((passenger: FinnairPassengerItem) => {\n return {\n ...passenger,\n prices: prices.flight?.totalPerPax?.[passenger.id] || prices.services?.totalPerPax?.[passenger.id],\n services: getPassengerServices(prices.services?.totalPerCategory, passenger),\n hasSaf: passengerHasSaf(prices.services?.totalPerCategory, passenger),\n hasOtherServices: passengerHasOtherServices(prices.services?.totalPerCategory, passenger),\n total: prices.total.totalPerPax?.[passenger.id]?.totalAmount,\n discountReasonCode: prices.flight?.total?.discountReasonCode,\n };\n })\n ),\n catchError((e: unknown) => {\n this.sentryLogger.error('Exception in handling prices of passengers', e);\n return EMPTY;\n })\n );\n\n this.showSafTitle$ = this.prices$.pipe(\n map((prices) => Boolean(getCategoryServices(prices.services.totalPerCategory, Category.SAF)))\n );\n\n this.showTravelExtrasTitle$ = this.prices$.pipe(\n map((prices) => {\n return (\n showTravelExtrasTitle(prices.services.totalPerCategory) && Boolean(prices.services.totalPerCategory?.length)\n );\n })\n );\n\n this.summary$ = combineLatest([this.passengers$, this.prices$]).pipe(\n filter(([passengers, prices]) => hasPassengers(passengers) && hasUnitPrices(prices)),\n map(([passengers, prices]) => {\n const serviceCategoryHasDiscountedServices = prices.services?.totalPerCategory?.reduce(\n (acc, categoryPriceItem) => {\n acc[categoryPriceItem.category] = Object.values(categoryPriceItem.totalPerPax || {}).some(\n (pricePerPassenger) => pricePerPassenger.price?.originalTotalAmount\n );\n return acc;\n },\n {}\n );\n\n const summary = passengers.reduce<{ [key: string]: PriceService }>(\n (summaryAcc, passenger: FinnairPassengerItem) => {\n const passengerSummary = getPassengerServices(prices.services?.totalPerCategory, passenger);\n\n return passengerSummary.reduce((acc, service) => {\n if (acc[service.id]) {\n const categoryHasDiscountedServices = serviceCategoryHasDiscountedServices?.[service.id];\n\n const totalAmount = parseFloat(acc[service.id].total.amount) + parseFloat(service.total.amount);\n const summaryOriginalTotal = acc[service.id].originalTotal || acc[service.id].total;\n const originalTotalAmount =\n parseFloat(summaryOriginalTotal?.amount || acc[service.id].total.amount) +\n parseFloat(service.originalTotal?.amount || service.total.amount);\n\n acc[service.id] = {\n ...acc[service.id],\n total: {\n ...acc[service.id].total,\n amount: totalAmount.toString(),\n },\n ...(categoryHasDiscountedServices\n ? {\n originalTotal: {\n ...summaryOriginalTotal,\n amount: originalTotalAmount.toString(),\n },\n }\n : {}),\n count: service.count + acc[service.id].count,\n };\n } else {\n acc[service.id] = { ...service };\n }\n return acc;\n }, summaryAcc);\n },\n {}\n );\n return Object.values(summary);\n })\n );\n\n this.totalTaxes$ = combineLatest([this.passengers$, this.prices$]).pipe(\n filter(([passengers, prices]) => hasPassengers(passengers) && hasUnitPrices(prices)),\n map(([passengers, prices]) => {\n const totalTaxes = passengers.reduce<{ [key: string]: FinnairCharge }>(\n (taxAcc, passenger: FinnairPassengerItem) => {\n const passengerTaxes = prices.flight?.totalPerPax?.[passenger.id]?.taxes;\n\n passengerTaxes?.forEach((tax) => {\n if (taxAcc[tax.code]) {\n taxAcc[tax.code].amount = (parseFloat(taxAcc[tax.code].amount) + parseFloat(tax.amount)).toString();\n } else {\n taxAcc[tax.code] = { ...tax };\n }\n });\n\n const passengerEnvironmentalSurcharge = prices.flight?.totalPerPax?.[passenger.id]?.environmentalSurcharge;\n const surchargeAmount = parseFloat(passengerEnvironmentalSurcharge?.amount);\n\n if (!surchargeAmount) {\n return taxAcc;\n }\n\n taxAcc[this.ENVIRONMENTAL_SURCHARGE] = taxAcc[this.ENVIRONMENTAL_SURCHARGE]\n ? {\n ...taxAcc[this.ENVIRONMENTAL_SURCHARGE],\n amount: (parseFloat(taxAcc[this.ENVIRONMENTAL_SURCHARGE].amount) + surchargeAmount).toString(),\n }\n : {\n ...passengerEnvironmentalSurcharge,\n code: this.ENVIRONMENTAL_SURCHARGE,\n };\n\n return taxAcc;\n },\n {}\n );\n\n return Object.values(totalTaxes);\n })\n );\n }\n\n openTaxModal(event, totalTaxes: FinnairAmount) {\n event.stopPropagation();\n\n this.taxModalOpen = true;\n this.taxModalData = { totalTaxes };\n\n this.gtmService.trackElement(\n 'taxes-fees-charges-modal',\n 'booking-flow_purchase-review',\n ElementTypes.BUTTON,\n '',\n ElementActions.CLICK\n );\n }\n\n openSummaryModal(event, prices: FinnairTotalPricesDetails) {\n event.stopPropagation();\n\n this.summaryModalOpen = true;\n this.summaryModalData = {\n prices,\n };\n\n this.gtmService.trackElement(\n 'detailed-breakdown-modal',\n 'booking-flow_purchase-review',\n ElementTypes.BUTTON,\n '',\n ElementActions.CLICK\n );\n }\n\n closeSummaryModal() {\n this.summaryModalData = null;\n }\n\n closeTaxModal() {\n this.taxModalData = null;\n }\n}\n","export enum Airline {\n FINNAIR = 'AY',\n AMERICAN_AIRLINES = 'AA',\n BRAATHENS_REGIONAL_AIRLINES = 'TF',\n BRITHIS_AIRWAYS = 'BA',\n CATHAY_PACIFIC = 'CX',\n DRAGONAIR = 'KA',\n IBERIA = 'IB',\n JAPAN_AIRLINES = 'JL',\n JUNEYAO_AIRLINES = 'HO',\n LAN_AIRLINES = 'LA',\n MALAYSIAN = 'MH',\n QANTAS = 'QF',\n QATAR_AIRWAYS = 'QR',\n ROYAL_JORDANIAN = 'RJ',\n S7_AIRLINES = 'S7',\n SRI_LANKAN = 'UL',\n TAM_AIRLINES = 'JJ',\n US_AIRWAYS = 'US',\n}\n","<div [formGroup]=\"parentForm\" class=\"light-type\" [class.ps-small-t]=\"displayContainerStyles\">\n <label class=\"checkbox-container flex\" [for]=\"idOrControlName\">\n <input\n #inputElement\n type=\"checkbox\"\n [attr.name]=\"translationPrefix + '.label' | finLocalization\"\n [attr.aria-required]=\"isRequired\"\n [value]=\"checkboxValue\"\n [id]=\"idOrControlName\"\n [formControlName]=\"controlName\"\n [name]=\"controlName\"\n class=\"is-vishidden\"\n />\n <span [ngSwitch]=\"control.value\" class=\"checkbox-icon nordic-blue-900-text\" aria-hidden=\"true\">\n <fcom-icon *ngSwitchCase=\"true\" class=\"icon-small\" [name]=\"SvgLibraryIcon.CHECKBOX_SELECTED\"></fcom-icon>\n <fcom-icon *ngSwitchDefault class=\"icon-small\" [name]=\"SvgLibraryIcon.CHECKBOX_UNSELECTED\"></fcom-icon>\n </span>\n <span *ngIf=\"!descriptionText\" [ngClass]=\"labelClass\">\n {{ translationPrefix + '.label' | finLocalization }}\n <span *ngIf=\"isRequired\"> *</span>\n </span>\n\n <span *ngIf=\"descriptionText\" class=\"label font-body-1 ps-xsmall-l\">\n <div class=\"medium-type\">\n {{ translationPrefix + '.label' | finLocalization }} <span *ngIf=\"isRequired\"> *</span>\n </div>\n <div class=\"font-body-2 nordic-blue-900-text\">{{ descriptionText }}</div>\n </span>\n </label>\n\n <div *ngIf=\"ctrlField.invalid && ctrlField.touched\" class=\"error-label font-body-2 regular-type\" aria-live=\"polite\">\n <span *ngIf=\"ctrlField.errors?.required\" class=\"error-900-text\">\n {{ translationPrefix + '.required' | finLocalization }}\n </span>\n </div>\n</div>\n","import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fin-form-input-checkbox',\n templateUrl: 'form-input-checkbox.component.html',\n styleUrls: ['form-input-checkbox.component.scss'],\n})\nexport class FormInputCheckboxComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n id: string;\n\n @Input()\n checkboxValue: string | boolean = true;\n\n @Input()\n displayContainerStyles = true;\n\n @Input()\n descriptionText: string;\n\n @Input()\n labelClass = 'label font-body-1 ms-xsmall-l';\n\n isRequired = false;\n idOrControlName: string;\n control: AbstractControl;\n\n @ViewChild('inputElement', { static: true })\n inputElement: ElementRef;\n\n ngOnInit(): void {\n this.control = this.ctrlField;\n this.isRequired = this.required;\n this.idOrControlName = this.id || `${this.controlName}-${this.checkboxValue}`;\n }\n\n setFocus(): void {\n this.inputElement.nativeElement.focus();\n }\n\n get required(): boolean {\n return this.ctrlField.errors?.required;\n }\n\n get ctrlField(): AbstractControl {\n return this.parentForm.controls[this.controlName];\n }\n}\n","import { Inject, InjectionToken, Injectable } from '@angular/core';\n\nimport { SentryOptions } from '../../interfaces';\n\nexport const CAPTURE_MESSAGE: InjectionToken<SentryLogger> = new InjectionToken('sentryCaptureMessage');\n\n@Injectable()\nexport class SentryLogger {\n constructor(@Inject(CAPTURE_MESSAGE) private captureMessage: Function) {}\n\n error = (message: string, extra?: any): void => this.log(message, { level: 'error', extra });\n info = (message: string, extra?: any): void => this.log(message, { level: 'info', extra });\n warn = (message: string, extra?: any): void => this.log(message, { level: 'warning', extra });\n\n private log(message: string, options: SentryOptions): void {\n this.captureMessage(message, options);\n }\n}\n","import { breakpoints } from '@finnairoyj/fcom-ui-styles';\n\nimport { Breakpoint } from '../interfaces/breakpoint.interface';\n\nexport const getCurrentBreakPoint = (): Breakpoint => {\n const currentWidth: number = window.innerWidth;\n const breakpointOrder = [Breakpoint.DESKTOP, Breakpoint.LAPTOP, Breakpoint.TABLET, Breakpoint.MOBILE];\n\n return breakpointOrder.find((breakpointName) => {\n return currentWidth >= Number(breakpoints[breakpointName].replace('px', ''));\n });\n};\n","<div *ngFor=\"let bound of bounds$ | async; let isLast = last; let index = index\" class=\"ms-medium-t\">\n <fin-flight-card\n [flightOrBound]=\"bound\"\n [title]=\"bound.locationTitle\"\n [locations]=\"locations$ | async\"\n [passengers]=\"cancelRefund$ | finMap: 'order.passengers' | async\"\n [hideModify]=\"true\"\n (viewDetails)=\"viewDetails(index)\"\n >\n </fin-flight-card>\n</div>\n\n<fcom-modal\n class=\"itinerary-modal\"\n [title]=\"'itinerary.title' | finLocalization\"\n [buttons]=\"ModalButtons.DONE\"\n [(open)]=\"itineraryModal.open\"\n>\n <fin-itinerary\n *ngIf=\"itineraryModal.data && (itineraryModal.data.outbound$ || itineraryModal.data.inbound$)\"\n class=\"block pr-medium\"\n [selectionPhase$]=\"itineraryModal.data.selectionPhase$\"\n [outbound$]=\"itineraryModal.data.outbound$\"\n [inbound$]=\"itineraryModal.data.inbound$\"\n [locations$]=\"itineraryModal.data.locations$\"\n >\n </fin-itinerary>\n</fcom-modal>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { ButtonTheme, ModalButtons } from '@fcom/ui-components';\nimport { SelectionPhase } from '@fcom/common/interfaces/booking';\nimport { FinnairOrder, FinnairOrderCancelRefund } from '@fcom/dapi/api/models';\n\nimport { ExtendedBound } from '../../../cancel/interfaces';\nimport { ItineraryModal } from '../../modules/ancillaries/interfaces';\n\n@Component({\n selector: 'fin-itinerary-detail',\n templateUrl: './itinerary-detail.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryDetailComponent {\n readonly ModalButtons = ModalButtons;\n readonly ButtonTheme = ButtonTheme;\n itineraryModal: ItineraryModal = {\n open: false,\n data: null,\n };\n slideIndexSubject$ = new ReplaySubject<number>(0);\n\n @Input()\n cancelRefund$: Observable<FinnairOrderCancelRefund>;\n\n @Input()\n bounds$: Observable<ExtendedBound[]>;\n\n @Input()\n locations$: Observable<FinnairOrder['locations']>;\n\n viewDetails(index: number): void {\n const bounds$ = this.cancelRefund$.pipe(map((cancelRefund) => cancelRefund.order.bounds));\n this.slideIndexSubject$.next(index);\n this.itineraryModal = {\n open: true,\n data: {\n outbound$: bounds$.pipe(map((bounds) => bounds[0])),\n inbound$: bounds$.pipe(map((bounds) => (bounds.length > 1 ? bounds[1] : undefined))),\n locations$: this.locations$,\n selectionPhase$: this.slideIndexSubject$.pipe(\n map((slideIndex) => (slideIndex === 0 ? SelectionPhase.OUTBOUND : SelectionPhase.INBOUND))\n ),\n },\n };\n }\n}\n","<ng-template #loaderContent>\n <div class=\"loader-content flex--nogrow align-center\">\n <h2 class=\"font-heading-4\" *ngIf=\"!hideTitle\">{{ title | finLocalization }}</h2>\n <div class=\"loader-spacer pr-medium-y\">\n <div class=\"loader\"></div>\n </div>\n <div class=\"loader-for font-body-1 grey-600-text\">{{ waitingFor | finLocalization }}</div>\n </div>\n</ng-template>\n\n<ng-container [ngSwitch]=\"type\">\n <!-- CASE 1/4: FULL_SCREEN -->\n <div *ngSwitchCase=\"LoaderType.FULL_SCREEN\" class=\"loader-container fixed z5 top-left fill grow\">\n <div class=\"loader-wrapper grid-max-width center grow flex flex--center nordic-blue-900-text white-bg\">\n <ng-container *ngTemplateOutlet=\"loaderContent\"></ng-container>\n </div>\n </div>\n\n <!-- CASE 2/4: EMBEDDED -->\n <div *ngSwitchCase=\"LoaderType.EMBEDDED\" class=\"nordic-blue-900-text pr-large-y\">\n <ng-container *ngTemplateOutlet=\"loaderContent\"></ng-container>\n </div>\n\n <!-- CASE 3/4: INLINE -->\n <div *ngSwitchCase=\"LoaderType.INLINE\" class=\"pr-large-y font-body-1\">\n <div class=\"loader\"></div>\n </div>\n\n <!-- CASE 4/4: INLINE_TEXT -->\n <div *ngSwitchCase=\"LoaderType.INLINE_TEXT\" class=\"font-body-1 inline-block pr-small-x\">\n <div class=\"loader\"></div>\n </div>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { LoaderType } from '../../interfaces';\n\n@Component({\n selector: 'fin-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoaderComponent {\n readonly LoaderType = LoaderType;\n\n @Input()\n type: LoaderType = LoaderType.EMBEDDED;\n @Input()\n title = 'loader.title';\n @Input()\n hideTitle = false;\n @Input()\n waitingFor = '';\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\nimport {NumberInput, coerceElement, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n Input,\n NgModule,\n NgZone,\n OnDestroy,\n Output,\n booleanAttribute,\n} from '@angular/core';\nimport {Observable, Observer, Subject, Subscription} from 'rxjs';\nimport {debounceTime, filter, map} from 'rxjs/operators';\n\n// Angular may add, remove, or edit comment nodes during change detection. We don't care about\n// these changes because they don't affect the user-preceived content, and worse it can cause\n// infinite change detection cycles where the change detection updates a comment, triggering the\n// MutationObserver, triggering another change detection and kicking the cycle off again.\nfunction shouldIgnoreRecord(record: MutationRecord) {\n // Ignore changes to comment text.\n if (record.type === 'characterData' && record.target instanceof Comment) {\n return true;\n }\n // Ignore addition / removal of comments.\n if (record.type === 'childList') {\n for (let i = 0; i < record.addedNodes.length; i++) {\n if (!(record.addedNodes[i] instanceof Comment)) {\n return false;\n }\n }\n for (let i = 0; i < record.removedNodes.length; i++) {\n if (!(record.removedNodes[i] instanceof Comment)) {\n return false;\n }\n }\n return true;\n }\n // Observe everything else.\n return false;\n}\n\n/**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class MutationObserverFactory {\n create(callback: MutationCallback): MutationObserver | null {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n }\n}\n\n/** An injectable service that allows watching elements for changes to their content. */\n@Injectable({providedIn: 'root'})\nexport class ContentObserver implements OnDestroy {\n /** Keeps track of the existing MutationObservers so they can be reused. */\n private _observedElements = new Map<\n Element,\n {\n observer: MutationObserver | null;\n readonly stream: Subject<MutationRecord[]>;\n count: number;\n }\n >();\n\n constructor(private _mutationObserverFactory: MutationObserverFactory) {}\n\n ngOnDestroy() {\n this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n }\n\n /**\n * Observe content changes on an element.\n * @param element The element to observe for content changes.\n */\n observe(element: Element): Observable<MutationRecord[]>;\n\n /**\n * Observe content changes on an element.\n * @param element The element to observe for content changes.\n */\n observe(element: ElementRef<Element>): Observable<MutationRecord[]>;\n\n observe(elementOrRef: Element | ElementRef<Element>): Observable<MutationRecord[]> {\n const element = coerceElement(elementOrRef);\n\n return new Observable((observer: Observer<MutationRecord[]>) => {\n const stream = this._observeElement(element);\n const subscription = stream\n .pipe(\n map(records => records.filter(record => !shouldIgnoreRecord(record))),\n filter(records => !!records.length),\n )\n .subscribe(observer);\n\n return () => {\n subscription.unsubscribe();\n this._unobserveElement(element);\n };\n });\n }\n\n /**\n * Observes the given element by using the existing MutationObserver if available, or creating a\n * new one if not.\n */\n private _observeElement(element: Element): Subject<MutationRecord[]> {\n if (!this._observedElements.has(element)) {\n const stream = new Subject<MutationRecord[]>();\n const observer = this._mutationObserverFactory.create(mutations => stream.next(mutations));\n if (observer) {\n observer.observe(element, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n this._observedElements.set(element, {observer, stream, count: 1});\n } else {\n this._observedElements.get(element)!.count++;\n }\n return this._observedElements.get(element)!.stream;\n }\n\n /**\n * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n * observing this element.\n */\n private _unobserveElement(element: Element) {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element)!.count--;\n if (!this._observedElements.get(element)!.count) {\n this._cleanupObserver(element);\n }\n }\n }\n\n /** Clean up the underlying MutationObserver for the specified element. */\n private _cleanupObserver(element: Element) {\n if (this._observedElements.has(element)) {\n const {observer, stream} = this._observedElements.get(element)!;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n }\n}\n\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\n@Directive({\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n standalone: true,\n})\nexport class CdkObserveContent implements AfterContentInit, OnDestroy {\n /** Event emitted for each change in the element's content. */\n @Output('cdkObserveContent') readonly event = new EventEmitter<MutationRecord[]>();\n\n /**\n * Whether observing content is disabled. This option can be used\n * to disconnect the underlying MutationObserver until it is needed.\n */\n @Input({alias: 'cdkObserveContentDisabled', transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n this._disabled ? this._unsubscribe() : this._subscribe();\n }\n private _disabled = false;\n\n /** Debounce interval for emitting the changes. */\n @Input()\n get debounce(): number {\n return this._debounce;\n }\n set debounce(value: NumberInput) {\n this._debounce = coerceNumberProperty(value);\n this._subscribe();\n }\n private _debounce: number;\n\n private _currentSubscription: Subscription | null = null;\n\n constructor(\n private _contentObserver: ContentObserver,\n private _elementRef: ElementRef<HTMLElement>,\n private _ngZone: NgZone,\n ) {}\n\n ngAfterContentInit() {\n if (!this._currentSubscription && !this.disabled) {\n this._subscribe();\n }\n }\n\n ngOnDestroy() {\n this._unsubscribe();\n }\n\n private _subscribe() {\n this._unsubscribe();\n const stream = this._contentObserver.observe(this._elementRef);\n\n // TODO(mmalerba): We shouldn't be emitting on this @Output() outside the zone.\n // Consider brining it back inside the zone next time we're making breaking changes.\n // Bringing it back inside can cause things like infinite change detection loops and changed\n // after checked errors if people's code isn't handling it properly.\n this._ngZone.runOutsideAngular(() => {\n this._currentSubscription = (\n this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream\n ).subscribe(this.event);\n });\n }\n\n private _unsubscribe() {\n this._currentSubscription?.unsubscribe();\n }\n}\n\n@NgModule({\n imports: [CdkObserveContent],\n exports: [CdkObserveContent],\n providers: [MutationObserverFactory],\n})\nexport class ObserversModule {}\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 */\nimport {Injectable, CSP_NONCE, Optional, Inject} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set<string> = new Set<string>();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\n@Injectable({providedIn: 'root'})\nexport class MediaMatcher {\n /** The internal matchMedia method to return back a MediaQueryList like object. */\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor(\n private _platform: Platform,\n @Optional() @Inject(CSP_NONCE) private _nonce?: string | null,\n ) {\n this._matchMedia =\n this._platform.isBrowser && window.matchMedia\n ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window)\n : noopMatchMedia;\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query, this._nonce);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string, nonce: string | undefined | null) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n\n if (nonce) {\n mediaQueryStyleNode.setAttribute('nonce', nonce);\n }\n\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head!.appendChild(mediaQueryStyleNode);\n }\n\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n console.error(e);\n }\n}\n\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query: string): MediaQueryList {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => {},\n removeListener: () => {},\n } as any;\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\nimport {coerceArray} from '@angular/cdk/coercion';\nimport {Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {combineLatest, concat, Observable, Observer, Subject} from 'rxjs';\nimport {debounceTime, map, skip, startWith, take, takeUntil} from 'rxjs/operators';\nimport {MediaMatcher} from './media-matcher';\n\n/** The current state of a layout breakpoint. */\nexport interface BreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n/** The current state of a layout breakpoint. */\ninterface InternalBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /** The media query being to be matched */\n query: string;\n}\n\ninterface Query {\n observable: Observable<InternalBreakpointState>;\n mql: MediaQueryList;\n}\n\n/** Utility for checking the matching state of @media queries. */\n@Injectable({providedIn: 'root'})\nexport class BreakpointObserver implements OnDestroy {\n /** A map of all media queries currently being listened for. */\n private _queries = new Map<string, Query>();\n /** A subject for all other observables to takeUntil based on. */\n private readonly _destroySubject = new Subject<void>();\n\n constructor(\n private _mediaMatcher: MediaMatcher,\n private _zone: NgZone,\n ) {}\n\n /** Completes the active subject, signalling to all other observables to complete. */\n ngOnDestroy() {\n this._destroySubject.next();\n this._destroySubject.complete();\n }\n\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n isMatched(value: string | readonly string[]): boolean {\n const queries = splitQueries(coerceArray(value));\n return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n }\n\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n observe(value: string | readonly string[]): Observable<BreakpointState> {\n const queries = splitQueries(coerceArray(value));\n const observables = queries.map(query => this._registerQuery(query).observable);\n\n let stateObservable = combineLatest(observables);\n // Emit the first state immediately, and then debounce the subsequent emissions.\n stateObservable = concat(\n stateObservable.pipe(take(1)),\n stateObservable.pipe(skip(1), debounceTime(0)),\n );\n return stateObservable.pipe(\n map(breakpointStates => {\n const response: BreakpointState = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach(({matches, query}) => {\n response.matches = response.matches || matches;\n response.breakpoints[query] = matches;\n });\n return response;\n }),\n );\n }\n\n /** Registers a specific query to be listened for. */\n private _registerQuery(query: string): Query {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query)!;\n }\n\n const mql = this._mediaMatcher.matchMedia(query);\n\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new Observable((observer: Observer<MediaQueryListEvent>) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e: MediaQueryListEvent): void => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(\n startWith(mql),\n map(({matches}) => ({query, matches})),\n takeUntil(this._destroySubject),\n );\n\n // Add the MediaQueryList to the set of queries.\n const output = {observable: queryObservable, mql};\n this._queries.set(query, output);\n return output;\n }\n}\n\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries: readonly string[]): readonly string[] {\n return queries\n .map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\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// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nexport const Breakpoints = {\n XSmall: '(max-width: 599.98px)',\n Small: '(min-width: 600px) and (max-width: 959.98px)',\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n XLarge: '(min-width: 1920px)',\n\n Handset:\n '(max-width: 599.98px) and (orientation: portrait), ' +\n '(max-width: 959.98px) and (orientation: landscape)',\n Tablet:\n '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n Web:\n '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n\n HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n\n HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\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/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function addAriaReferencedId(el: Element, attr: `aria-${string}`, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n id = id.trim();\n if (ids.some(existingId => existingId.trim() === id)) {\n return;\n }\n ids.push(id);\n\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function removeAriaReferencedId(el: Element, attr: `aria-${string}`, id: string) {\n const ids = getAriaReferenceIds(el, attr);\n id = id.trim();\n const filteredIds = ids.filter(val => val !== id);\n\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n } else {\n el.removeAttribute(attr);\n }\n}\n\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nexport function getAriaReferenceIds(el: Element, attr: string): string[] {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n const attrValue = el.getAttribute(attr);\n return attrValue?.match(/\\S+/g) ?? [];\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\nimport {EffectRef, Injector, QueryList, Signal, effect, isSignal} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\nimport {\n UP_ARROW,\n DOWN_ARROW,\n LEFT_ARROW,\n RIGHT_ARROW,\n TAB,\n A,\n Z,\n ZERO,\n NINE,\n hasModifierKey,\n HOME,\n END,\n PAGE_UP,\n PAGE_DOWN,\n} from '@angular/cdk/keycodes';\nimport {debounceTime, filter, map, tap} from 'rxjs/operators';\n\n/** This interface is for items that can be passed to a ListKeyManager. */\nexport interface ListKeyManagerOption {\n /** Whether the option is disabled. */\n disabled?: boolean;\n\n /** Gets the label for this option. */\n getLabel?(): string;\n}\n\n/** Modifier keys handled by the ListKeyManager. */\nexport type ListKeyManagerModifierKey = 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey';\n\n/**\n * This class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */\nexport class ListKeyManager<T extends ListKeyManagerOption> {\n private _activeItemIndex = -1;\n private _activeItem: T | null = null;\n private _wrap = false;\n private readonly _letterKeyStream = new Subject<string>();\n private _typeaheadSubscription = Subscription.EMPTY;\n private _itemChangesSubscription?: Subscription;\n private _vertical = true;\n private _horizontal: 'ltr' | 'rtl' | null;\n private _allowedModifierKeys: ListKeyManagerModifierKey[] = [];\n private _homeAndEnd = false;\n private _pageUpAndDown = {enabled: false, delta: 10};\n private _effectRef: EffectRef | undefined;\n\n /**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager. By default, disabled items are skipped.\n */\n private _skipPredicateFn = (item: T) => item.disabled;\n\n // Buffer for the letters that the user has pressed when the typeahead option is turned on.\n private _pressedLetters: string[] = [];\n\n constructor(items: QueryList<T> | T[] | readonly T[]);\n constructor(items: Signal<T[]> | Signal<readonly T[]>, injector: Injector);\n constructor(\n private _items: QueryList<T> | T[] | readonly T[] | Signal<T[]> | Signal<readonly T[]>,\n injector?: Injector,\n ) {\n // We allow for the items to be an array because, in some cases, the consumer may\n // not have access to a QueryList of the items they want to manage (e.g. when the\n // items aren't being collected via `ViewChildren` or `ContentChildren`).\n if (_items instanceof QueryList) {\n this._itemChangesSubscription = _items.changes.subscribe((newItems: QueryList<T>) =>\n this._itemsChanged(newItems.toArray()),\n );\n } else if (isSignal(_items)) {\n if (!injector && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error('ListKeyManager constructed with a signal must receive an injector');\n }\n\n this._effectRef = effect(() => this._itemsChanged(_items()), {injector});\n }\n }\n\n /**\n * Stream that emits any time the TAB key is pressed, so components can react\n * when focus is shifted off of the list.\n */\n readonly tabOut = new Subject<void>();\n\n /** Stream that emits whenever the active item of the list manager changes. */\n readonly change = new Subject<number>();\n\n /**\n * Sets the predicate function that determines which items should be skipped by the\n * list key manager.\n * @param predicate Function that determines whether the given item should be skipped.\n */\n skipPredicate(predicate: (item: T) => boolean): this {\n this._skipPredicateFn = predicate;\n return this;\n }\n\n /**\n * Configures wrapping mode, which determines whether the active item will wrap to\n * the other end of list when there are no more items in the given direction.\n * @param shouldWrap Whether the list should wrap when reaching the end.\n */\n withWrap(shouldWrap = true): this {\n this._wrap = shouldWrap;\n return this;\n }\n\n /**\n * Configures whether the key manager should be able to move the selection vertically.\n * @param enabled Whether vertical selection should be enabled.\n */\n withVerticalOrientation(enabled: boolean = true): this {\n this._vertical = enabled;\n return this;\n }\n\n /**\n * Configures the key manager to move the selection horizontally.\n * Passing in `null` will disable horizontal movement.\n * @param direction Direction in which the selection can be moved.\n */\n withHorizontalOrientation(direction: 'ltr' | 'rtl' | null): this {\n this._horizontal = direction;\n return this;\n }\n\n /**\n * Modifier keys which are allowed to be held down and whose default actions will be prevented\n * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n */\n withAllowedModifierKeys(keys: ListKeyManagerModifierKey[]): this {\n this._allowedModifierKeys = keys;\n return this;\n }\n\n /**\n * Turns on typeahead mode which allows users to set the active item by typing.\n * @param debounceInterval Time to wait after the last keystroke before setting the active item.\n */\n withTypeAhead(debounceInterval: number = 200): this {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const items = this._getItemsArray();\n if (items.length > 0 && items.some(item => typeof item.getLabel !== 'function')) {\n throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n }\n\n this._typeaheadSubscription.unsubscribe();\n\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._typeaheadSubscription = this._letterKeyStream\n .pipe(\n tap(letter => this._pressedLetters.push(letter)),\n debounceTime(debounceInterval),\n filter(() => this._pressedLetters.length > 0),\n map(() => this._pressedLetters.join('')),\n )\n .subscribe(inputString => {\n const items = this._getItemsArray();\n\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (let i = 1; i < items.length + 1; i++) {\n const index = (this._activeItemIndex + i) % items.length;\n const item = items[index];\n\n if (\n !this._skipPredicateFn(item) &&\n item.getLabel!().toUpperCase().trim().indexOf(inputString) === 0\n ) {\n this.setActiveItem(index);\n break;\n }\n }\n\n this._pressedLetters = [];\n });\n\n return this;\n }\n\n /** Cancels the current typeahead sequence. */\n cancelTypeahead(): this {\n this._pressedLetters = [];\n return this;\n }\n\n /**\n * Configures the key manager to activate the first and last items\n * respectively when the Home or End key is pressed.\n * @param enabled Whether pressing the Home or End key activates the first/last item.\n */\n withHomeAndEnd(enabled: boolean = true): this {\n this._homeAndEnd = enabled;\n return this;\n }\n\n /**\n * Configures the key manager to activate every 10th, configured or first/last element in up/down direction\n * respectively when the Page-Up or Page-Down key is pressed.\n * @param enabled Whether pressing the Page-Up or Page-Down key activates the first/last item.\n * @param delta Whether pressing the Home or End key activates the first/last item.\n */\n withPageUpDown(enabled: boolean = true, delta: number = 10): this {\n this._pageUpAndDown = {enabled, delta};\n return this;\n }\n\n /**\n * Sets the active item to the item at the index specified.\n * @param index The index of the item to be set as active.\n */\n setActiveItem(index: number): void;\n\n /**\n * Sets the active item to the specified item.\n * @param item The item to be set as active.\n */\n setActiveItem(item: T): void;\n\n setActiveItem(item: any): void {\n const previousActiveItem = this._activeItem;\n\n this.updateActiveItem(item);\n\n if (this._activeItem !== previousActiveItem) {\n this.change.next(this._activeItemIndex);\n }\n }\n\n /**\n * Sets the active item depending on the key event passed in.\n * @param event Keyboard event to be used for determining which element should be active.\n */\n onKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const modifiers: ListKeyManagerModifierKey[] = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];\n const isModifierAllowed = modifiers.every(modifier => {\n return !event[modifier] || this._allowedModifierKeys.indexOf(modifier) > -1;\n });\n\n switch (keyCode) {\n case TAB:\n this.tabOut.next();\n return;\n\n case DOWN_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setNextItemActive();\n break;\n } else {\n return;\n }\n\n case UP_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setPreviousItemActive();\n break;\n } else {\n return;\n }\n\n case RIGHT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive();\n break;\n } else {\n return;\n }\n\n case LEFT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive();\n break;\n } else {\n return;\n }\n\n case HOME:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setFirstItemActive();\n break;\n } else {\n return;\n }\n\n case END:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setLastItemActive();\n break;\n } else {\n return;\n }\n\n case PAGE_UP:\n if (this._pageUpAndDown.enabled && isModifierAllowed) {\n const targetIndex = this._activeItemIndex - this._pageUpAndDown.delta;\n this._setActiveItemByIndex(targetIndex > 0 ? targetIndex : 0, 1);\n break;\n } else {\n return;\n }\n\n case PAGE_DOWN:\n if (this._pageUpAndDown.enabled && isModifierAllowed) {\n const targetIndex = this._activeItemIndex + this._pageUpAndDown.delta;\n const itemsLength = this._getItemsArray().length;\n this._setActiveItemByIndex(targetIndex < itemsLength ? targetIndex : itemsLength - 1, -1);\n break;\n } else {\n return;\n }\n\n default:\n if (isModifierAllowed || hasModifierKey(event, 'shiftKey')) {\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n } else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n\n // Note that we return here, in order to avoid preventing\n // the default action of non-navigational keys.\n return;\n }\n\n this._pressedLetters = [];\n event.preventDefault();\n }\n\n /** Index of the currently active item. */\n get activeItemIndex(): number | null {\n return this._activeItemIndex;\n }\n\n /** The active item. */\n get activeItem(): T | null {\n return this._activeItem;\n }\n\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n isTyping(): boolean {\n return this._pressedLetters.length > 0;\n }\n\n /** Sets the active item to the first enabled item in the list. */\n setFirstItemActive(): void {\n this._setActiveItemByIndex(0, 1);\n }\n\n /** Sets the active item to the last enabled item in the list. */\n setLastItemActive(): void {\n this._setActiveItemByIndex(this._getItemsArray().length - 1, -1);\n }\n\n /** Sets the active item to the next enabled item in the list. */\n setNextItemActive(): void {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }\n\n /** Sets the active item to a previous enabled item in the list. */\n setPreviousItemActive(): void {\n this._activeItemIndex < 0 && this._wrap\n ? this.setLastItemActive()\n : this._setActiveItemByDelta(-1);\n }\n\n /**\n * Allows setting the active without any other effects.\n * @param index Index of the item to be set as active.\n */\n updateActiveItem(index: number): void;\n\n /**\n * Allows setting the active item without any other effects.\n * @param item Item to be set as active.\n */\n updateActiveItem(item: T): void;\n\n updateActiveItem(item: any): void {\n const itemArray = this._getItemsArray();\n const index = typeof item === 'number' ? item : itemArray.indexOf(item);\n const activeItem = itemArray[index];\n\n // Explicitly check for `null` and `undefined` because other falsy values are valid.\n this._activeItem = activeItem == null ? null : activeItem;\n this._activeItemIndex = index;\n }\n\n /** Cleans up the key manager. */\n destroy() {\n this._typeaheadSubscription.unsubscribe();\n this._itemChangesSubscription?.unsubscribe();\n this._effectRef?.destroy();\n this._letterKeyStream.complete();\n this.tabOut.complete();\n this.change.complete();\n this._pressedLetters = [];\n }\n\n /**\n * This method sets the active item, given a list of items and the delta between the\n * currently active item and the new active item. It will calculate differently\n * depending on whether wrap mode is turned on.\n */\n private _setActiveItemByDelta(delta: -1 | 1): void {\n this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);\n }\n\n /**\n * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n * down the list until it finds an item that is not disabled, and it will wrap if it\n * encounters either end of the list.\n */\n private _setActiveInWrapMode(delta: -1 | 1): void {\n const items = this._getItemsArray();\n\n for (let i = 1; i <= items.length; i++) {\n const index = (this._activeItemIndex + delta * i + items.length) % items.length;\n const item = items[index];\n\n if (!this._skipPredicateFn(item)) {\n this.setActiveItem(index);\n return;\n }\n }\n }\n\n /**\n * Sets the active item properly given the default mode. In other words, it will\n * continue to move down the list until it finds an item that is not disabled. If\n * it encounters either end of the list, it will stop and not wrap.\n */\n private _setActiveInDefaultMode(delta: -1 | 1): void {\n this._setActiveItemByIndex(this._activeItemIndex + delta, delta);\n }\n\n /**\n * Sets the active item to the first enabled item starting at the index specified. If the\n * item is disabled, it will move in the fallbackDelta direction until it either\n * finds an enabled item or encounters the end of the list.\n */\n private _setActiveItemByIndex(index: number, fallbackDelta: -1 | 1): void {\n const items = this._getItemsArray();\n\n if (!items[index]) {\n return;\n }\n\n while (this._skipPredicateFn(items[index])) {\n index += fallbackDelta;\n\n if (!items[index]) {\n return;\n }\n }\n\n this.setActiveItem(index);\n }\n\n /** Returns the items as an array. */\n private _getItemsArray(): T[] | readonly T[] {\n if (isSignal(this._items)) {\n return this._items();\n }\n\n return this._items instanceof QueryList ? this._items.toArray() : this._items;\n }\n\n /** Callback for when the items have changed. */\n private _itemsChanged(newItems: T[] | readonly T[]) {\n if (this._activeItem) {\n const newIndex = newItems.indexOf(this._activeItem);\n\n if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n this._activeItemIndex = newIndex;\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 */\n\nimport {ListKeyManager, ListKeyManagerOption} from './list-key-manager';\n\n/**\n * This is the interface for highlightable items (used by the ActiveDescendantKeyManager).\n * Each item must know how to style itself as active or inactive and whether or not it is\n * currently disabled.\n */\nexport interface Highlightable extends ListKeyManagerOption {\n /** Applies the styles for an active item to this item. */\n setActiveStyles(): void;\n\n /** Applies the styles for an inactive item to this item. */\n setInactiveStyles(): void;\n}\n\nexport class ActiveDescendantKeyManager<T> extends ListKeyManager<Highlightable & T> {\n /**\n * Sets the active item to the item at the specified index and adds the\n * active styles to the newly active item. Also removes active styles\n * from the previously active item.\n * @param index Index of the item to be set as active.\n */\n override setActiveItem(index: number): void;\n\n /**\n * Sets the active item to the item to the specified one and adds the\n * active styles to the it. Also removes active styles from the\n * previously active item.\n * @param item Item to be set as active.\n */\n override setActiveItem(item: T): void;\n\n override setActiveItem(index: any): void {\n if (this.activeItem) {\n this.activeItem.setInactiveStyles();\n }\n super.setActiveItem(index);\n if (this.activeItem) {\n this.activeItem.setActiveStyles();\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\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable} from '@angular/core';\n\n/**\n * Configuration for the isFocusable method.\n */\nexport class IsFocusableConfig {\n /**\n * Whether to count an element as focusable even if it is not currently visible.\n */\n ignoreVisibility: boolean = false;\n}\n\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n\n/**\n * Utility for checking the interactivity of an element, such as whether it is focusable or\n * tabbable.\n */\n@Injectable({providedIn: 'root'})\nexport class InteractivityChecker {\n constructor(private _platform: Platform) {}\n\n /**\n * Gets whether an element is disabled.\n *\n * @param element Element to be checked.\n * @returns Whether the element is disabled.\n */\n isDisabled(element: HTMLElement): boolean {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n }\n\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @returns Whether the element is visible.\n */\n isVisible(element: HTMLElement): boolean {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }\n\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n *\n * @param element Element to be checked.\n * @returns Whether the element is tabbable.\n */\n isTabbable(element: HTMLElement): boolean {\n // Nothing is tabbable on the server 😎\n if (!this._platform.isBrowser) {\n return false;\n }\n\n const frameElement = getFrameElement(getWindow(element));\n\n if (frameElement) {\n // Frame elements inherit their tabindex onto all child elements.\n if (getTabIndexValue(frameElement) === -1) {\n return false;\n }\n\n // Browsers disable tabbing to an element inside of an invisible frame.\n if (!this.isVisible(frameElement)) {\n return false;\n }\n }\n\n let nodeName = element.nodeName.toLowerCase();\n let tabIndexValue = getTabIndexValue(element);\n\n if (element.hasAttribute('contenteditable')) {\n return tabIndexValue !== -1;\n }\n\n if (nodeName === 'iframe' || nodeName === 'object') {\n // The frame or object's content may be tabbable depending on the content, but it's\n // not possibly to reliably detect the content of the frames. We always consider such\n // elements as non-tabbable.\n return false;\n }\n\n // In iOS, the browser only considers some specific elements as tabbable.\n if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {\n return false;\n }\n\n if (nodeName === 'audio') {\n // Audio elements without controls enabled are never tabbable, regardless\n // of the tabindex attribute explicitly being set.\n if (!element.hasAttribute('controls')) {\n return false;\n }\n // Audio elements with controls are by default tabbable unless the\n // tabindex attribute is set to `-1` explicitly.\n return tabIndexValue !== -1;\n }\n\n if (nodeName === 'video') {\n // For all video elements, if the tabindex attribute is set to `-1`, the video\n // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n // tabindex attribute is the source of truth here.\n if (tabIndexValue === -1) {\n return false;\n }\n // If the tabindex is explicitly set, and not `-1` (as per check before), the\n // video element is always tabbable (regardless of whether it has controls or not).\n if (tabIndexValue !== null) {\n return true;\n }\n // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n // has controls enabled. Firefox is special as videos are always tabbable regardless\n // of whether there are controls or not.\n return this._platform.FIREFOX || element.hasAttribute('controls');\n }\n\n return element.tabIndex >= 0;\n }\n\n /**\n * Gets whether an element can be focused by the user.\n *\n * @param element Element to be checked.\n * @param config The config object with options to customize this method's behavior\n * @returns Whether the element is focusable.\n */\n isFocusable(element: HTMLElement, config?: IsFocusableConfig): boolean {\n // Perform checks in order of left to most expensive.\n // Again, naive approach that does not capture many edge cases and browser quirks.\n return (\n isPotentiallyFocusable(element) &&\n !this.isDisabled(element) &&\n (config?.ignoreVisibility || this.isVisible(element))\n );\n }\n}\n\n/**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n */\nfunction getFrameElement(window: Window) {\n try {\n return window.frameElement as HTMLElement;\n } catch {\n return null;\n }\n}\n\n/** Checks whether the specified element has any geometry / rectangles. */\nfunction hasGeometry(element: HTMLElement): boolean {\n // Use logic from jQuery to check for an invisible element.\n // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12\n return !!(\n element.offsetWidth ||\n element.offsetHeight ||\n (typeof element.getClientRects === 'function' && element.getClientRects().length)\n );\n}\n\n/** Gets whether an element's */\nfunction isNativeFormElement(element: Node) {\n let nodeName = element.nodeName.toLowerCase();\n return (\n nodeName === 'input' ||\n nodeName === 'select' ||\n nodeName === 'button' ||\n nodeName === 'textarea'\n );\n}\n\n/** Gets whether an element is an `<input type=\"hidden\">`. */\nfunction isHiddenInput(element: HTMLElement): boolean {\n return isInputElement(element) && element.type == 'hidden';\n}\n\n/** Gets whether an element is an anchor that has an href attribute. */\nfunction isAnchorWithHref(element: HTMLElement): boolean {\n return isAnchorElement(element) && element.hasAttribute('href');\n}\n\n/** Gets whether an element is an input element. */\nfunction isInputElement(element: HTMLElement): element is HTMLInputElement {\n return element.nodeName.toLowerCase() == 'input';\n}\n\n/** Gets whether an element is an anchor element. */\nfunction isAnchorElement(element: HTMLElement): element is HTMLAnchorElement {\n return element.nodeName.toLowerCase() == 'a';\n}\n\n/** Gets whether an element has a valid tabindex. */\nfunction hasValidTabIndex(element: HTMLElement): boolean {\n if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n return false;\n }\n\n let tabIndex = element.getAttribute('tabindex');\n return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n}\n\n/**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n */\nfunction getTabIndexValue(element: HTMLElement): number | null {\n if (!hasValidTabIndex(element)) {\n return null;\n }\n\n // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n\n return isNaN(tabIndex) ? -1 : tabIndex;\n}\n\n/** Checks whether the specified element is potentially tabbable on iOS */\nfunction isPotentiallyTabbableIOS(element: HTMLElement): boolean {\n let nodeName = element.nodeName.toLowerCase();\n let inputType = nodeName === 'input' && (element as HTMLInputElement).type;\n\n return (\n inputType === 'text' ||\n inputType === 'password' ||\n nodeName === 'select' ||\n nodeName === 'textarea'\n );\n}\n\n/**\n * Gets whether an element is potentially focusable without taking current visible/disabled state\n * into account.\n */\nfunction isPotentiallyFocusable(element: HTMLElement): boolean {\n // Inputs are potentially focusable *unless* they're type=\"hidden\".\n if (isHiddenInput(element)) {\n return false;\n }\n\n return (\n isNativeFormElement(element) ||\n isAnchorWithHref(element) ||\n element.hasAttribute('contenteditable') ||\n hasValidTabIndex(element)\n );\n}\n\n/** Gets the parent window of a DOM node with regards of being inside of an iframe. */\nfunction getWindow(node: HTMLElement): Window {\n // ownerDocument is null if `node` itself *is* a document.\n return (node.ownerDocument && node.ownerDocument.defaultView) || window;\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\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, OnDestroy, APP_ID, inject} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {addAriaReferencedId, getAriaReferenceIds, removeAriaReferencedId} from './aria-reference';\n\n/**\n * Interface used to register message elements and keep a count of how many registrations have\n * the same message and the reference to the message element used for the `aria-describedby`.\n */\nexport interface RegisteredMessage {\n /** The element containing the message. */\n messageElement: Element;\n\n /** The number of elements that reference this message element via `aria-describedby`. */\n referenceCount: number;\n}\n\n/**\n * ID used for the body container where all messages are appended.\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\nexport const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n\n/**\n * ID prefix used for each created message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nexport const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n\n/**\n * Attribute given to each host element that is described by a message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nexport const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\n@Injectable({providedIn: 'root'})\nexport class AriaDescriber implements OnDestroy {\n private _document: Document;\n\n /** Map of all registered message elements that have been placed into the document. */\n private _messageRegistry = new Map<string | Element, RegisteredMessage>();\n\n /** Container for all registered messages. */\n private _messagesContainer: HTMLElement | null = null;\n\n /** Unique ID for the service. */\n private readonly _id = `${nextId++}`;\n\n constructor(\n @Inject(DOCUMENT) _document: any,\n /**\n * @deprecated To be turned into a required parameter.\n * @breaking-change 14.0.0\n */\n private _platform?: Platform,\n ) {\n this._document = _document;\n this._id = inject(APP_ID) + '-' + nextId++;\n }\n\n /**\n * Adds to the host element an aria-describedby reference to a hidden element that contains\n * the message. If the same message has already been registered, then it will reuse the created\n * message element.\n */\n describe(hostElement: Element, message: string, role?: string): void;\n\n /**\n * Adds to the host element an aria-describedby reference to an already-existing message element.\n */\n describe(hostElement: Element, message: HTMLElement): void;\n\n describe(hostElement: Element, message: string | HTMLElement, role?: string): void {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n setMessageId(message, this._id);\n this._messageRegistry.set(key, {messageElement: message, referenceCount: 0});\n } else if (!this._messageRegistry.has(key)) {\n this._createMessageElement(message, role);\n }\n\n if (!this._isElementDescribedByMessage(hostElement, key)) {\n this._addMessageReference(hostElement, key);\n }\n }\n\n /** Removes the host element's aria-describedby reference to the message. */\n removeDescription(hostElement: Element, message: string, role?: string): void;\n\n /** Removes the host element's aria-describedby reference to the message element. */\n removeDescription(hostElement: Element, message: HTMLElement): void;\n\n removeDescription(hostElement: Element, message: string | HTMLElement, role?: string): void {\n if (!message || !this._isElementNode(hostElement)) {\n return;\n }\n\n const key = getKey(message, role);\n\n if (this._isElementDescribedByMessage(hostElement, key)) {\n this._removeMessageReference(hostElement, key);\n }\n\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n const registeredMessage = this._messageRegistry.get(key);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(key);\n }\n }\n\n if (this._messagesContainer?.childNodes.length === 0) {\n this._messagesContainer.remove();\n this._messagesContainer = null;\n }\n }\n\n /** Unregisters all created message elements and removes the message container. */\n ngOnDestroy() {\n const describedElements = this._document.querySelectorAll(\n `[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}=\"${this._id}\"]`,\n );\n\n for (let i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n this._messagesContainer?.remove();\n this._messagesContainer = null;\n this._messageRegistry.clear();\n }\n\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n private _createMessageElement(message: string, role?: string) {\n const messageElement = this._document.createElement('div');\n setMessageId(messageElement, this._id);\n messageElement.textContent = message;\n\n if (role) {\n messageElement.setAttribute('role', role);\n }\n\n this._createMessagesContainer();\n this._messagesContainer!.appendChild(messageElement);\n this._messageRegistry.set(getKey(message, role), {messageElement, referenceCount: 0});\n }\n\n /** Deletes the message element from the global messages container. */\n private _deleteMessageElement(key: string | Element) {\n this._messageRegistry.get(key)?.messageElement?.remove();\n this._messageRegistry.delete(key);\n }\n\n /** Creates the global container for all aria-describedby messages. */\n private _createMessagesContainer() {\n if (this._messagesContainer) {\n return;\n }\n\n const containerClassName = 'cdk-describedby-message-container';\n const serverContainers = this._document.querySelectorAll(\n `.${containerClassName}[platform=\"server\"]`,\n );\n\n for (let i = 0; i < serverContainers.length; i++) {\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n serverContainers[i].remove();\n }\n\n const messagesContainer = this._document.createElement('div');\n\n // We add `visibility: hidden` in order to prevent text in this container from\n // being searchable by the browser's Ctrl + F functionality.\n // Screen-readers will still read the description for elements with aria-describedby even\n // when the description element is not visible.\n messagesContainer.style.visibility = 'hidden';\n // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n // the description element doesn't impact page layout.\n messagesContainer.classList.add(containerClassName);\n messagesContainer.classList.add('cdk-visually-hidden');\n\n // @breaking-change 14.0.0 Remove null check for `_platform`.\n if (this._platform && !this._platform.isBrowser) {\n messagesContainer.setAttribute('platform', 'server');\n }\n\n this._document.body.appendChild(messagesContainer);\n this._messagesContainer = messagesContainer;\n }\n\n /** Removes all cdk-describedby messages that are hosted through the element. */\n private _removeCdkDescribedByReferenceIds(element: Element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(\n id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0,\n );\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n }\n\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n private _addMessageReference(element: Element, key: string | Element) {\n const registeredMessage = this._messageRegistry.get(key)!;\n\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);\n registeredMessage.referenceCount++;\n }\n\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n private _removeMessageReference(element: Element, key: string | Element) {\n const registeredMessage = this._messageRegistry.get(key)!;\n registeredMessage.referenceCount--;\n\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n\n /** Returns true if the element has been described by the provided message ID. */\n private _isElementDescribedByMessage(element: Element, key: string | Element): boolean {\n const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n const registeredMessage = this._messageRegistry.get(key);\n const messageId = registeredMessage && registeredMessage.messageElement.id;\n\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n }\n\n /** Determines whether a message can be described on a particular element. */\n private _canBeDescribed(element: Element, message: string | HTMLElement | void): boolean {\n if (!this._isElementNode(element)) {\n return false;\n }\n\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n\n const trimmedMessage = message == null ? '' : `${message}`.trim();\n const ariaLabel = element.getAttribute('aria-label');\n\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false;\n }\n\n /** Checks whether a node is an Element node. */\n private _isElementNode(element: Node): element is Element {\n return element.nodeType === this._document.ELEMENT_NODE;\n }\n}\n\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message: string | Element, role?: string): string | Element {\n return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element: HTMLElement, serviceId: string) {\n if (!element.id) {\n element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;\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\nimport {Platform, _getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterContentInit,\n Directive,\n ElementRef,\n Inject,\n Injectable,\n Input,\n NgZone,\n OnDestroy,\n DoCheck,\n SimpleChanges,\n OnChanges,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {take} from 'rxjs/operators';\nimport {InteractivityChecker} from '../interactivity-checker/interactivity-checker';\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class currently uses a relatively simple approach to focus trapping.\n * It assumes that the tab order is the same as DOM order, which is not necessarily true.\n * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.\n */\nexport class FocusTrap {\n private _startAnchor: HTMLElement | null;\n private _endAnchor: HTMLElement | null;\n private _hasAttached = false;\n\n // Event listeners for the anchors. Need to be regular functions so that we can unbind them later.\n protected startAnchorListener = () => this.focusLastTabbableElement();\n protected endAnchorListener = () => this.focusFirstTabbableElement();\n\n /** Whether the focus trap is active. */\n get enabled(): boolean {\n return this._enabled;\n }\n set enabled(value: boolean) {\n this._enabled = value;\n\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(value, this._startAnchor);\n this._toggleAnchorTabIndex(value, this._endAnchor);\n }\n }\n protected _enabled: boolean = true;\n\n constructor(\n readonly _element: HTMLElement,\n private _checker: InteractivityChecker,\n readonly _ngZone: NgZone,\n readonly _document: Document,\n deferAnchors = false,\n ) {\n if (!deferAnchors) {\n this.attachAnchors();\n }\n }\n\n /** Destroys the focus trap by cleaning up the anchors. */\n destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n startAnchor.remove();\n }\n\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n endAnchor.remove();\n }\n\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }\n\n /**\n * Inserts the anchors into the DOM. This is usually done automatically\n * in the constructor, but can be deferred for cases like directives with `*ngIf`.\n * @returns Whether the focus trap managed to attach successfully. This may not be the case\n * if the target element isn't currently in the DOM.\n */\n attachAnchors(): boolean {\n // If we're not on the browser, there can be no focus to trap.\n if (this._hasAttached) {\n return true;\n }\n\n this._ngZone.runOutsideAngular(() => {\n if (!this._startAnchor) {\n this._startAnchor = this._createAnchor();\n this._startAnchor!.addEventListener('focus', this.startAnchorListener);\n }\n\n if (!this._endAnchor) {\n this._endAnchor = this._createAnchor();\n this._endAnchor!.addEventListener('focus', this.endAnchorListener);\n }\n });\n\n if (this._element.parentNode) {\n this._element.parentNode.insertBefore(this._startAnchor!, this._element);\n this._element.parentNode.insertBefore(this._endAnchor!, this._element.nextSibling);\n this._hasAttached = true;\n }\n\n return this._hasAttached;\n }\n\n /**\n * Waits for the zone to stabilize, then focuses the first tabbable element.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusInitialElementWhenReady(options?: FocusOptions): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement(options)));\n });\n }\n\n /**\n * Waits for the zone to stabilize, then focuses\n * the first tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusFirstTabbableElementWhenReady(options?: FocusOptions): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n this._executeOnStable(() => resolve(this.focusFirstTabbableElement(options)));\n });\n }\n\n /**\n * Waits for the zone to stabilize, then focuses\n * the last tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusLastTabbableElementWhenReady(options?: FocusOptions): Promise<boolean> {\n return new Promise<boolean>(resolve => {\n this._executeOnStable(() => resolve(this.focusLastTabbableElement(options)));\n });\n }\n\n /**\n * Get the specified boundary element of the trapped region.\n * @param bound The boundary to get (start or end of trapped region).\n * @returns The boundary element.\n */\n private _getRegionBoundary(bound: 'start' | 'end'): HTMLElement | null {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const markers = this._element.querySelectorAll(\n `[cdk-focus-region-${bound}], ` + `[cdkFocusRegion${bound}], ` + `[cdk-focus-${bound}]`,\n ) as NodeListOf<HTMLElement>;\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n for (let i = 0; i < markers.length; i++) {\n // @breaking-change 8.0.0\n if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n console.warn(\n `Found use of deprecated attribute 'cdk-focus-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated ` +\n `attribute will be removed in 8.0.0.`,\n markers[i],\n );\n } else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n console.warn(\n `Found use of deprecated attribute 'cdk-focus-region-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` +\n `will be removed in 8.0.0.`,\n markers[i],\n );\n }\n }\n }\n\n if (bound == 'start') {\n return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);\n }\n return markers.length\n ? markers[markers.length - 1]\n : this._getLastTabbableElement(this._element);\n }\n\n /**\n * Focuses the element that should be focused when the focus trap is initialized.\n * @returns Whether focus was moved successfully.\n */\n focusInitialElement(options?: FocusOptions): boolean {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const redirectToElement = this._element.querySelector(\n `[cdk-focus-initial], ` + `[cdkFocusInitial]`,\n ) as HTMLElement;\n\n if (redirectToElement) {\n // @breaking-change 8.0.0\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n redirectToElement.hasAttribute(`cdk-focus-initial`)\n ) {\n console.warn(\n `Found use of deprecated attribute 'cdk-focus-initial', ` +\n `use 'cdkFocusInitial' instead. The deprecated attribute ` +\n `will be removed in 8.0.0`,\n redirectToElement,\n );\n }\n\n // Warn the consumer if the element they've pointed to\n // isn't focusable, when not in production mode.\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n !this._checker.isFocusable(redirectToElement)\n ) {\n console.warn(`Element matching '[cdkFocusInitial]' is not focusable.`, redirectToElement);\n }\n\n if (!this._checker.isFocusable(redirectToElement)) {\n const focusableChild = this._getFirstTabbableElement(redirectToElement) as HTMLElement;\n focusableChild?.focus(options);\n return !!focusableChild;\n }\n\n redirectToElement.focus(options);\n return true;\n }\n\n return this.focusFirstTabbableElement(options);\n }\n\n /**\n * Focuses the first tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusFirstTabbableElement(options?: FocusOptions): boolean {\n const redirectToElement = this._getRegionBoundary('start');\n\n if (redirectToElement) {\n redirectToElement.focus(options);\n }\n\n return !!redirectToElement;\n }\n\n /**\n * Focuses the last tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusLastTabbableElement(options?: FocusOptions): boolean {\n const redirectToElement = this._getRegionBoundary('end');\n\n if (redirectToElement) {\n redirectToElement.focus(options);\n }\n\n return !!redirectToElement;\n }\n\n /**\n * Checks whether the focus trap has successfully been attached.\n */\n hasAttached(): boolean {\n return this._hasAttached;\n }\n\n /** Get the first tabbable element from a DOM subtree (inclusive). */\n private _getFirstTabbableElement(root: HTMLElement): HTMLElement | null {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n\n const children = root.children;\n\n for (let i = 0; i < children.length; i++) {\n const tabbableChild =\n children[i].nodeType === this._document.ELEMENT_NODE\n ? this._getFirstTabbableElement(children[i] as HTMLElement)\n : null;\n\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n\n return null;\n }\n\n /** Get the last tabbable element from a DOM subtree (inclusive). */\n private _getLastTabbableElement(root: HTMLElement): HTMLElement | null {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n\n // Iterate in reverse DOM order.\n const children = root.children;\n\n for (let i = children.length - 1; i >= 0; i--) {\n const tabbableChild =\n children[i].nodeType === this._document.ELEMENT_NODE\n ? this._getLastTabbableElement(children[i] as HTMLElement)\n : null;\n\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n\n return null;\n }\n\n /** Creates an anchor element. */\n private _createAnchor(): HTMLElement {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }\n\n /**\n * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.\n * @param isEnabled Whether the focus trap is enabled.\n * @param anchor Anchor on which to toggle the tabindex.\n */\n private _toggleAnchorTabIndex(isEnabled: boolean, anchor: HTMLElement) {\n // Remove the tabindex completely, rather than setting it to -1, because if the\n // element has a tabindex, the user might still hit it when navigating with the arrow keys.\n isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex');\n }\n\n /**\n * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.\n * @param enabled: Whether the anchors should trap Tab.\n */\n protected toggleAnchors(enabled: boolean) {\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(enabled, this._startAnchor);\n this._toggleAnchorTabIndex(enabled, this._endAnchor);\n }\n }\n\n /** Executes a function when the zone is stable. */\n private _executeOnStable(fn: () => any): void {\n if (this._ngZone.isStable) {\n fn();\n } else {\n this._ngZone.onStable.pipe(take(1)).subscribe(fn);\n }\n }\n}\n\n/**\n * Factory that allows easy instantiation of focus traps.\n */\n@Injectable({providedIn: 'root'})\nexport class FocusTrapFactory {\n private _document: Document;\n\n constructor(\n private _checker: InteractivityChecker,\n private _ngZone: NgZone,\n @Inject(DOCUMENT) _document: any,\n ) {\n this._document = _document;\n }\n\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param deferCaptureElements Defers the creation of focus-capturing elements to be done\n * manually by the user.\n * @returns The created focus trap instance.\n */\n create(element: HTMLElement, deferCaptureElements: boolean = false): FocusTrap {\n return new FocusTrap(\n element,\n this._checker,\n this._ngZone,\n this._document,\n deferCaptureElements,\n );\n }\n}\n\n/** Directive for trapping focus within a region. */\n@Directive({\n selector: '[cdkTrapFocus]',\n exportAs: 'cdkTrapFocus',\n standalone: true,\n})\nexport class CdkTrapFocus implements OnDestroy, AfterContentInit, OnChanges, DoCheck {\n /** Underlying FocusTrap instance. */\n focusTrap: FocusTrap;\n\n /** Previously focused element to restore focus to upon destroy when using autoCapture. */\n private _previouslyFocusedElement: HTMLElement | null = null;\n\n /** Whether the focus trap is active. */\n @Input({alias: 'cdkTrapFocus', transform: booleanAttribute})\n get enabled(): boolean {\n return this.focusTrap?.enabled || false;\n }\n set enabled(value: boolean) {\n if (this.focusTrap) {\n this.focusTrap.enabled = value;\n }\n }\n\n /**\n * Whether the directive should automatically move focus into the trapped region upon\n * initialization and return focus to the previous activeElement upon destruction.\n */\n @Input({alias: 'cdkTrapFocusAutoCapture', transform: booleanAttribute}) autoCapture: boolean;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _focusTrapFactory: FocusTrapFactory,\n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 13.0.0\n */\n @Inject(DOCUMENT) _document: any,\n ) {\n const platform = inject(Platform);\n\n if (platform.isBrowser) {\n this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);\n }\n }\n\n ngOnDestroy() {\n this.focusTrap?.destroy();\n\n // If we stored a previously focused element when using autoCapture, return focus to that\n // element now that the trapped region is being destroyed.\n if (this._previouslyFocusedElement) {\n this._previouslyFocusedElement.focus();\n this._previouslyFocusedElement = null;\n }\n }\n\n ngAfterContentInit() {\n this.focusTrap?.attachAnchors();\n\n if (this.autoCapture) {\n this._captureFocus();\n }\n }\n\n ngDoCheck() {\n if (this.focusTrap && !this.focusTrap.hasAttached()) {\n this.focusTrap.attachAnchors();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const autoCaptureChange = changes['autoCapture'];\n\n if (\n autoCaptureChange &&\n !autoCaptureChange.firstChange &&\n this.autoCapture &&\n this.focusTrap?.hasAttached()\n ) {\n this._captureFocus();\n }\n }\n\n private _captureFocus() {\n this._previouslyFocusedElement = _getFocusedElementPierceShadowDom();\n this.focusTrap?.focusInitialElementWhenReady();\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/** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */\nexport function isFakeMousedownFromScreenReader(event: MouseEvent): boolean {\n // Some screen readers will dispatch a fake `mousedown` event when pressing enter or space on\n // a clickable element. We can distinguish these events when `event.buttons` is zero, or\n // `event.detail` is zero depending on the browser:\n // - `event.buttons` works on Firefox, but fails on Chrome.\n // - `detail` works on Chrome, but fails on Firefox.\n return event.buttons === 0 || event.detail === 0;\n}\n\n/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */\nexport function isFakeTouchstartFromScreenReader(event: TouchEvent): boolean {\n const touch: Touch | undefined =\n (event.touches && event.touches[0]) || (event.changedTouches && event.changedTouches[0]);\n\n // A fake `touchstart` can be distinguished from a real one by looking at the `identifier`\n // which is typically >= 0 on a real device versus -1 from a screen reader. Just to be safe,\n // we can also look at `radiusX` and `radiusY`. This behavior was observed against a Windows 10\n // device with a touch screen running NVDA v2020.4 and Firefox 85 or Chrome 88.\n return (\n !!touch &&\n touch.identifier === -1 &&\n (touch.radiusX == null || touch.radiusX === 1) &&\n (touch.radiusY == null || touch.radiusY === 1)\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\nimport {ALT, CONTROL, MAC_META, META, SHIFT} from '@angular/cdk/keycodes';\nimport {Inject, Injectable, InjectionToken, OnDestroy, Optional, NgZone} from '@angular/core';\nimport {normalizePassiveListenerOptions, Platform, _getEventTarget} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {distinctUntilChanged, skip} from 'rxjs/operators';\nimport {\n isFakeMousedownFromScreenReader,\n isFakeTouchstartFromScreenReader,\n} from '../fake-event-detection';\n\n/**\n * The input modalities detected by this service. Null is used if the input modality is unknown.\n */\nexport type InputModality = 'keyboard' | 'mouse' | 'touch' | null;\n\n/** Options to configure the behavior of the InputModalityDetector. */\nexport interface InputModalityDetectorOptions {\n /** Keys to ignore when detecting keyboard input modality. */\n ignoreKeys?: number[];\n}\n\n/**\n * Injectable options for the InputModalityDetector. These are shallowly merged with the default\n * options.\n */\nexport const INPUT_MODALITY_DETECTOR_OPTIONS = new InjectionToken<InputModalityDetectorOptions>(\n 'cdk-input-modality-detector-options',\n);\n\n/**\n * Default options for the InputModalityDetector.\n *\n * Modifier keys are ignored by default (i.e. when pressed won't cause the service to detect\n * keyboard input modality) for two reasons:\n *\n * 1. Modifier keys are commonly used with mouse to perform actions such as 'right click' or 'open\n * in new tab', and are thus less representative of actual keyboard interaction.\n * 2. VoiceOver triggers some keyboard events when linearly navigating with Control + Option (but\n * confusingly not with Caps Lock). Thus, to have parity with other screen readers, we ignore\n * these keys so as to not update the input modality.\n *\n * Note that we do not by default ignore the right Meta key on Safari because it has the same key\n * code as the ContextMenu key on other browsers. When we switch to using event.key, we can\n * distinguish between the two.\n */\nexport const INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS: InputModalityDetectorOptions = {\n ignoreKeys: [ALT, CONTROL, MAC_META, META, SHIFT],\n};\n\n/**\n * The amount of time needed to pass after a touchstart event in order for a subsequent mousedown\n * event to be attributed as mouse and not touch.\n *\n * This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found\n * that a value of around 650ms seems appropriate.\n */\nexport const TOUCH_BUFFER_MS = 650;\n\n/**\n * Event listener options that enable capturing and also mark the listener as passive if the browser\n * supports it.\n */\nconst modalityEventListenerOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n\n/**\n * Service that detects the user's input modality.\n *\n * This service does not update the input modality when a user navigates with a screen reader\n * (e.g. linear navigation with VoiceOver, object navigation / browse mode with NVDA, virtual PC\n * cursor mode with JAWS). This is in part due to technical limitations (i.e. keyboard events do not\n * fire as expected in these modes) but is also arguably the correct behavior. Navigating with a\n * screen reader is akin to visually scanning a page, and should not be interpreted as actual user\n * input interaction.\n *\n * When a user is not navigating but *interacting* with a screen reader, this service attempts to\n * update the input modality to keyboard, but in general this service's behavior is largely\n * undefined.\n */\n@Injectable({providedIn: 'root'})\nexport class InputModalityDetector implements OnDestroy {\n /** Emits whenever an input modality is detected. */\n readonly modalityDetected: Observable<InputModality>;\n\n /** Emits when the input modality changes. */\n readonly modalityChanged: Observable<InputModality>;\n\n /** The most recently detected input modality. */\n get mostRecentModality(): InputModality {\n return this._modality.value;\n }\n\n /**\n * The most recently detected input modality event target. Is null if no input modality has been\n * detected or if the associated event target is null for some unknown reason.\n */\n _mostRecentTarget: HTMLElement | null = null;\n\n /** The underlying BehaviorSubject that emits whenever an input modality is detected. */\n private readonly _modality = new BehaviorSubject<InputModality>(null);\n\n /** Options for this InputModalityDetector. */\n private readonly _options: InputModalityDetectorOptions;\n\n /**\n * The timestamp of the last touch input modality. Used to determine whether mousedown events\n * should be attributed to mouse or touch.\n */\n private _lastTouchMs = 0;\n\n /**\n * Handles keydown events. Must be an arrow function in order to preserve the context when it gets\n * bound.\n */\n private _onKeydown = (event: KeyboardEvent) => {\n // If this is one of the keys we should ignore, then ignore it and don't update the input\n // modality to keyboard.\n if (this._options?.ignoreKeys?.some(keyCode => keyCode === event.keyCode)) {\n return;\n }\n\n this._modality.next('keyboard');\n this._mostRecentTarget = _getEventTarget(event);\n };\n\n /**\n * Handles mousedown events. Must be an arrow function in order to preserve the context when it\n * gets bound.\n */\n private _onMousedown = (event: MouseEvent) => {\n // Touches trigger both touch and mouse events, so we need to distinguish between mouse events\n // that were triggered via mouse vs touch. To do so, check if the mouse event occurs closely\n // after the previous touch event.\n if (Date.now() - this._lastTouchMs < TOUCH_BUFFER_MS) {\n return;\n }\n\n // Fake mousedown events are fired by some screen readers when controls are activated by the\n // screen reader. Attribute them to keyboard input modality.\n this._modality.next(isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse');\n this._mostRecentTarget = _getEventTarget(event);\n };\n\n /**\n * Handles touchstart events. Must be an arrow function in order to preserve the context when it\n * gets bound.\n */\n private _onTouchstart = (event: TouchEvent) => {\n // Same scenario as mentioned in _onMousedown, but on touch screen devices, fake touchstart\n // events are fired. Again, attribute to keyboard input modality.\n if (isFakeTouchstartFromScreenReader(event)) {\n this._modality.next('keyboard');\n return;\n }\n\n // Store the timestamp of this touch event, as it's used to distinguish between mouse events\n // triggered via mouse vs touch.\n this._lastTouchMs = Date.now();\n\n this._modality.next('touch');\n this._mostRecentTarget = _getEventTarget(event);\n };\n\n constructor(\n private readonly _platform: Platform,\n ngZone: NgZone,\n @Inject(DOCUMENT) document: Document,\n @Optional()\n @Inject(INPUT_MODALITY_DETECTOR_OPTIONS)\n options?: InputModalityDetectorOptions,\n ) {\n this._options = {\n ...INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS,\n ...options,\n };\n\n // Skip the first emission as it's null.\n this.modalityDetected = this._modality.pipe(skip(1));\n this.modalityChanged = this.modalityDetected.pipe(distinctUntilChanged());\n\n // If we're not in a browser, this service should do nothing, as there's no relevant input\n // modality to detect.\n if (_platform.isBrowser) {\n ngZone.runOutsideAngular(() => {\n document.addEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n document.addEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n document.addEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n });\n }\n }\n\n ngOnDestroy() {\n this._modality.complete();\n\n if (this._platform.isBrowser) {\n document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\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\nimport {\n Platform,\n normalizePassiveListenerOptions,\n _getShadowRoot,\n _getEventTarget,\n} from '@angular/cdk/platform';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n AfterViewInit,\n} from '@angular/core';\nimport {Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {InputModalityDetector, TOUCH_BUFFER_MS} from '../input-modality/input-modality-detector';\n\nexport type FocusOrigin = 'touch' | 'mouse' | 'keyboard' | 'program' | null;\n\n/**\n * Corresponds to the options that can be passed to the native `focus` event.\n * via https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus\n */\nexport interface FocusOptions {\n /** Whether the browser should scroll to the element when it is focused. */\n preventScroll?: boolean;\n}\n\n/** Detection mode used for attributing the origin of a focus event. */\nexport enum FocusMonitorDetectionMode {\n /**\n * Any mousedown, keydown, or touchstart event that happened in the previous\n * tick or the current tick will be used to assign a focus event's origin (to\n * either mouse, keyboard, or touch). This is the default option.\n */\n IMMEDIATE,\n /**\n * A focus event's origin is always attributed to the last corresponding\n * mousedown, keydown, or touchstart event, no matter how long ago it occurred.\n */\n EVENTUAL,\n}\n\n/** Injectable service-level options for FocusMonitor. */\nexport interface FocusMonitorOptions {\n detectionMode?: FocusMonitorDetectionMode;\n}\n\n/** InjectionToken for FocusMonitorOptions. */\nexport const FOCUS_MONITOR_DEFAULT_OPTIONS = new InjectionToken<FocusMonitorOptions>(\n 'cdk-focus-monitor-default-options',\n);\n\ntype MonitoredElementInfo = {\n checkChildren: boolean;\n readonly subject: Subject<FocusOrigin>;\n rootNode: HTMLElement | ShadowRoot | Document;\n};\n\n/**\n * Event listener options that enable capturing and also\n * mark the listener as passive if the browser supports it.\n */\nconst captureEventListenerOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n\n/** Monitors mouse and keyboard events to determine the cause of focus events. */\n@Injectable({providedIn: 'root'})\nexport class FocusMonitor implements OnDestroy {\n /** The focus origin that the next focus event is a result of. */\n private _origin: FocusOrigin = null;\n\n /** The FocusOrigin of the last focus event tracked by the FocusMonitor. */\n private _lastFocusOrigin: FocusOrigin;\n\n /** Whether the window has just been focused. */\n private _windowFocused = false;\n\n /** The timeout id of the window focus timeout. */\n private _windowFocusTimeoutId: number;\n\n /** The timeout id of the origin clearing timeout. */\n private _originTimeoutId: number;\n\n /**\n * Whether the origin was determined via a touch interaction. Necessary as properly attributing\n * focus events to touch interactions requires special logic.\n */\n private _originFromTouchInteraction = false;\n\n /** Map of elements being monitored to their info. */\n private _elementInfo = new Map<HTMLElement, MonitoredElementInfo>();\n\n /** The number of elements currently being monitored. */\n private _monitoredElementCount = 0;\n\n /**\n * Keeps track of the root nodes to which we've currently bound a focus/blur handler,\n * as well as the number of monitored elements that they contain. We have to treat focus/blur\n * handlers differently from the rest of the events, because the browser won't emit events\n * to the document when focus moves inside of a shadow root.\n */\n private _rootNodeFocusListenerCount = new Map<HTMLElement | Document | ShadowRoot, number>();\n\n /**\n * The specified detection mode, used for attributing the origin of a focus\n * event.\n */\n private readonly _detectionMode: FocusMonitorDetectionMode;\n\n /**\n * Event listener for `focus` events on the window.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _windowFocusListener = () => {\n // Make a note of when the window regains focus, so we can\n // restore the origin info for the focused element.\n this._windowFocused = true;\n this._windowFocusTimeoutId = window.setTimeout(() => (this._windowFocused = false));\n };\n\n /** Used to reference correct document/window */\n protected _document?: Document;\n\n /** Subject for stopping our InputModalityDetector subscription. */\n private readonly _stopInputModalityDetector = new Subject<void>();\n\n constructor(\n private _ngZone: NgZone,\n private _platform: Platform,\n private readonly _inputModalityDetector: InputModalityDetector,\n /** @breaking-change 11.0.0 make document required */\n @Optional() @Inject(DOCUMENT) document: any | null,\n @Optional() @Inject(FOCUS_MONITOR_DEFAULT_OPTIONS) options: FocusMonitorOptions | null,\n ) {\n this._document = document;\n this._detectionMode = options?.detectionMode || FocusMonitorDetectionMode.IMMEDIATE;\n }\n /**\n * Event listener for `focus` and 'blur' events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n private _rootNodeFocusAndBlurListener = (event: Event) => {\n const target = _getEventTarget<HTMLElement>(event);\n\n // We need to walk up the ancestor chain in order to support `checkChildren`.\n for (let element = target; element; element = element.parentElement) {\n if (event.type === 'focus') {\n this._onFocus(event as FocusEvent, element);\n } else {\n this._onBlur(event as FocusEvent, element);\n }\n }\n };\n\n /**\n * Monitors focus on an element and applies appropriate CSS classes.\n * @param element The element to monitor\n * @param checkChildren Whether to count the element as focused when its children are focused.\n * @returns An observable that emits when the focus state of the element changes.\n * When the element is blurred, null will be emitted.\n */\n monitor(element: HTMLElement, checkChildren?: boolean): Observable<FocusOrigin>;\n\n /**\n * Monitors focus on an element and applies appropriate CSS classes.\n * @param element The element to monitor\n * @param checkChildren Whether to count the element as focused when its children are focused.\n * @returns An observable that emits when the focus state of the element changes.\n * When the element is blurred, null will be emitted.\n */\n monitor(element: ElementRef<HTMLElement>, checkChildren?: boolean): Observable<FocusOrigin>;\n\n monitor(\n element: HTMLElement | ElementRef<HTMLElement>,\n checkChildren: boolean = false,\n ): Observable<FocusOrigin> {\n const nativeElement = coerceElement(element);\n\n // Do nothing if we're not on the browser platform or the passed in node isn't an element.\n if (!this._platform.isBrowser || nativeElement.nodeType !== 1) {\n // Note: we don't want the observable to emit at all so we don't pass any parameters.\n return observableOf();\n }\n\n // If the element is inside the shadow DOM, we need to bind our focus/blur listeners to\n // the shadow root, rather than the `document`, because the browser won't emit focus events\n // to the `document`, if focus is moving within the same shadow root.\n const rootNode = _getShadowRoot(nativeElement) || this._getDocument();\n const cachedInfo = this._elementInfo.get(nativeElement);\n\n // Check if we're already monitoring this element.\n if (cachedInfo) {\n if (checkChildren) {\n // TODO(COMP-318): this can be problematic, because it'll turn all non-checkChildren\n // observers into ones that behave as if `checkChildren` was turned on. We need a more\n // robust solution.\n cachedInfo.checkChildren = true;\n }\n\n return cachedInfo.subject;\n }\n\n // Create monitored element info.\n const info: MonitoredElementInfo = {\n checkChildren: checkChildren,\n subject: new Subject<FocusOrigin>(),\n rootNode,\n };\n this._elementInfo.set(nativeElement, info);\n this._registerGlobalListeners(info);\n\n return info.subject;\n }\n\n /**\n * Stops monitoring an element and removes all focus classes.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: HTMLElement): void;\n\n /**\n * Stops monitoring an element and removes all focus classes.\n * @param element The element to stop monitoring.\n */\n stopMonitoring(element: ElementRef<HTMLElement>): void;\n\n stopMonitoring(element: HTMLElement | ElementRef<HTMLElement>): void {\n const nativeElement = coerceElement(element);\n const elementInfo = this._elementInfo.get(nativeElement);\n\n if (elementInfo) {\n elementInfo.subject.complete();\n\n this._setClasses(nativeElement);\n this._elementInfo.delete(nativeElement);\n this._removeGlobalListeners(elementInfo);\n }\n }\n\n /**\n * Focuses the element via the specified focus origin.\n * @param element Element to focus.\n * @param origin Focus origin.\n * @param options Options that can be used to configure the focus behavior.\n */\n focusVia(element: HTMLElement, origin: FocusOrigin, options?: FocusOptions): void;\n\n /**\n * Focuses the element via the specified focus origin.\n * @param element Element to focus.\n * @param origin Focus origin.\n * @param options Options that can be used to configure the focus behavior.\n */\n focusVia(element: ElementRef<HTMLElement>, origin: FocusOrigin, options?: FocusOptions): void;\n\n focusVia(\n element: HTMLElement | ElementRef<HTMLElement>,\n origin: FocusOrigin,\n options?: FocusOptions,\n ): void {\n const nativeElement = coerceElement(element);\n const focusedElement = this._getDocument().activeElement;\n\n // If the element is focused already, calling `focus` again won't trigger the event listener\n // which means that the focus classes won't be updated. If that's the case, update the classes\n // directly without waiting for an event.\n if (nativeElement === focusedElement) {\n this._getClosestElementsInfo(nativeElement).forEach(([currentElement, info]) =>\n this._originChanged(currentElement, origin, info),\n );\n } else {\n this._setOrigin(origin);\n\n // `focus` isn't available on the server\n if (typeof nativeElement.focus === 'function') {\n nativeElement.focus(options);\n }\n }\n }\n\n ngOnDestroy() {\n this._elementInfo.forEach((_info, element) => this.stopMonitoring(element));\n }\n\n /** Access injected document if available or fallback to global document reference */\n private _getDocument(): Document {\n return this._document || document;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n\n private _getFocusOrigin(focusEventTarget: HTMLElement | null): FocusOrigin {\n if (this._origin) {\n // If the origin was realized via a touch interaction, we need to perform additional checks\n // to determine whether the focus origin should be attributed to touch or program.\n if (this._originFromTouchInteraction) {\n return this._shouldBeAttributedToTouch(focusEventTarget) ? 'touch' : 'program';\n } else {\n return this._origin;\n }\n }\n\n // If the window has just regained focus, we can restore the most recent origin from before the\n // window blurred. Otherwise, we've reached the point where we can't identify the source of the\n // focus. This typically means one of two things happened:\n //\n // 1) The element was programmatically focused, or\n // 2) The element was focused via screen reader navigation (which generally doesn't fire\n // events).\n //\n // Because we can't distinguish between these two cases, we default to setting `program`.\n if (this._windowFocused && this._lastFocusOrigin) {\n return this._lastFocusOrigin;\n }\n\n // If the interaction is coming from an input label, we consider it a mouse interactions.\n // This is a special case where focus moves on `click`, rather than `mousedown` which breaks\n // our detection, because all our assumptions are for `mousedown`. We need to handle this\n // special case, because it's very common for checkboxes and radio buttons.\n if (focusEventTarget && this._isLastInteractionFromInputLabel(focusEventTarget)) {\n return 'mouse';\n }\n\n return 'program';\n }\n\n /**\n * Returns whether the focus event should be attributed to touch. Recall that in IMMEDIATE mode, a\n * touch origin isn't immediately reset at the next tick (see _setOrigin). This means that when we\n * handle a focus event following a touch interaction, we need to determine whether (1) the focus\n * event was directly caused by the touch interaction or (2) the focus event was caused by a\n * subsequent programmatic focus call triggered by the touch interaction.\n * @param focusEventTarget The target of the focus event under examination.\n */\n private _shouldBeAttributedToTouch(focusEventTarget: HTMLElement | null): boolean {\n // Please note that this check is not perfect. Consider the following edge case:\n //\n // <div #parent tabindex=\"0\">\n // <div #child tabindex=\"0\" (click)=\"#parent.focus()\"></div>\n // </div>\n //\n // Suppose there is a FocusMonitor in IMMEDIATE mode attached to #parent. When the user touches\n // #child, #parent is programmatically focused. This code will attribute the focus to touch\n // instead of program. This is a relatively minor edge-case that can be worked around by using\n // focusVia(parent, 'program') to focus #parent.\n return (\n this._detectionMode === FocusMonitorDetectionMode.EVENTUAL ||\n !!focusEventTarget?.contains(this._inputModalityDetector._mostRecentTarget)\n );\n }\n\n /**\n * Sets the focus classes on the element based on the given focus origin.\n * @param element The element to update the classes on.\n * @param origin The focus origin.\n */\n private _setClasses(element: HTMLElement, origin?: FocusOrigin): void {\n element.classList.toggle('cdk-focused', !!origin);\n element.classList.toggle('cdk-touch-focused', origin === 'touch');\n element.classList.toggle('cdk-keyboard-focused', origin === 'keyboard');\n element.classList.toggle('cdk-mouse-focused', origin === 'mouse');\n element.classList.toggle('cdk-program-focused', origin === 'program');\n }\n\n /**\n * Updates the focus origin. If we're using immediate detection mode, we schedule an async\n * function to clear the origin at the end of a timeout. The duration of the timeout depends on\n * the origin being set.\n * @param origin The origin to set.\n * @param isFromInteraction Whether we are setting the origin from an interaction event.\n */\n private _setOrigin(origin: FocusOrigin, isFromInteraction = false): void {\n this._ngZone.runOutsideAngular(() => {\n this._origin = origin;\n this._originFromTouchInteraction = origin === 'touch' && isFromInteraction;\n\n // If we're in IMMEDIATE mode, reset the origin at the next tick (or in `TOUCH_BUFFER_MS` ms\n // for a touch event). We reset the origin at the next tick because Firefox focuses one tick\n // after the interaction event. We wait `TOUCH_BUFFER_MS` ms before resetting the origin for\n // a touch event because when a touch event is fired, the associated focus event isn't yet in\n // the event queue. Before doing so, clear any pending timeouts.\n if (this._detectionMode === FocusMonitorDetectionMode.IMMEDIATE) {\n clearTimeout(this._originTimeoutId);\n const ms = this._originFromTouchInteraction ? TOUCH_BUFFER_MS : 1;\n this._originTimeoutId = setTimeout(() => (this._origin = null), ms);\n }\n });\n }\n\n /**\n * Handles focus events on a registered element.\n * @param event The focus event.\n * @param element The monitored element.\n */\n private _onFocus(event: FocusEvent, element: HTMLElement) {\n // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent\n // focus event affecting the monitored element. If we want to use the origin of the first event\n // instead we should check for the cdk-focused class here and return if the element already has\n // it. (This only matters for elements that have includesChildren = true).\n\n // If we are not counting child-element-focus as focused, make sure that the event target is the\n // monitored element itself.\n const elementInfo = this._elementInfo.get(element);\n const focusEventTarget = _getEventTarget<HTMLElement>(event);\n if (!elementInfo || (!elementInfo.checkChildren && element !== focusEventTarget)) {\n return;\n }\n\n this._originChanged(element, this._getFocusOrigin(focusEventTarget), elementInfo);\n }\n\n /**\n * Handles blur events on a registered element.\n * @param event The blur event.\n * @param element The monitored element.\n */\n _onBlur(event: FocusEvent, element: HTMLElement) {\n // If we are counting child-element-focus as focused, make sure that we aren't just blurring in\n // order to focus another child of the monitored element.\n const elementInfo = this._elementInfo.get(element);\n\n if (\n !elementInfo ||\n (elementInfo.checkChildren &&\n event.relatedTarget instanceof Node &&\n element.contains(event.relatedTarget))\n ) {\n return;\n }\n\n this._setClasses(element);\n this._emitOrigin(elementInfo, null);\n }\n\n private _emitOrigin(info: MonitoredElementInfo, origin: FocusOrigin) {\n if (info.subject.observers.length) {\n this._ngZone.run(() => info.subject.next(origin));\n }\n }\n\n private _registerGlobalListeners(elementInfo: MonitoredElementInfo) {\n if (!this._platform.isBrowser) {\n return;\n }\n\n const rootNode = elementInfo.rootNode;\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode) || 0;\n\n if (!rootNodeFocusListeners) {\n this._ngZone.runOutsideAngular(() => {\n rootNode.addEventListener(\n 'focus',\n this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions,\n );\n rootNode.addEventListener(\n 'blur',\n this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions,\n );\n });\n }\n\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners + 1);\n\n // Register global listeners when first element is monitored.\n if (++this._monitoredElementCount === 1) {\n // Note: we listen to events in the capture phase so we\n // can detect them even if the user stops propagation.\n this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n window.addEventListener('focus', this._windowFocusListener);\n });\n\n // The InputModalityDetector is also just a collection of global listeners.\n this._inputModalityDetector.modalityDetected\n .pipe(takeUntil(this._stopInputModalityDetector))\n .subscribe(modality => {\n this._setOrigin(modality, true /* isFromInteraction */);\n });\n }\n }\n\n private _removeGlobalListeners(elementInfo: MonitoredElementInfo) {\n const rootNode = elementInfo.rootNode;\n\n if (this._rootNodeFocusListenerCount.has(rootNode)) {\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode)!;\n\n if (rootNodeFocusListeners > 1) {\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners - 1);\n } else {\n rootNode.removeEventListener(\n 'focus',\n this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions,\n );\n rootNode.removeEventListener(\n 'blur',\n this._rootNodeFocusAndBlurListener,\n captureEventListenerOptions,\n );\n this._rootNodeFocusListenerCount.delete(rootNode);\n }\n }\n\n // Unregister global listeners when last element is unmonitored.\n if (!--this._monitoredElementCount) {\n const window = this._getWindow();\n window.removeEventListener('focus', this._windowFocusListener);\n\n // Equivalently, stop our InputModalityDetector subscription.\n this._stopInputModalityDetector.next();\n\n // Clear timeouts for all potentially pending timeouts to prevent the leaks.\n clearTimeout(this._windowFocusTimeoutId);\n clearTimeout(this._originTimeoutId);\n }\n }\n\n /** Updates all the state on an element once its focus origin has changed. */\n private _originChanged(\n element: HTMLElement,\n origin: FocusOrigin,\n elementInfo: MonitoredElementInfo,\n ) {\n this._setClasses(element, origin);\n this._emitOrigin(elementInfo, origin);\n this._lastFocusOrigin = origin;\n }\n\n /**\n * Collects the `MonitoredElementInfo` of a particular element and\n * all of its ancestors that have enabled `checkChildren`.\n * @param element Element from which to start the search.\n */\n private _getClosestElementsInfo(element: HTMLElement): [HTMLElement, MonitoredElementInfo][] {\n const results: [HTMLElement, MonitoredElementInfo][] = [];\n\n this._elementInfo.forEach((info, currentElement) => {\n if (currentElement === element || (info.checkChildren && currentElement.contains(element))) {\n results.push([currentElement, info]);\n }\n });\n\n return results;\n }\n\n /**\n * Returns whether an interaction is likely to have come from the user clicking the `label` of\n * an `input` or `textarea` in order to focus it.\n * @param focusEventTarget Target currently receiving focus.\n */\n private _isLastInteractionFromInputLabel(focusEventTarget: HTMLElement): boolean {\n const {_mostRecentTarget: mostRecentTarget, mostRecentModality} = this._inputModalityDetector;\n\n // If the last interaction used the mouse on an element contained by one of the labels\n // of an `input`/`textarea` that is currently focused, it is very likely that the\n // user redirected focus using the label.\n if (\n mostRecentModality !== 'mouse' ||\n !mostRecentTarget ||\n mostRecentTarget === focusEventTarget ||\n (focusEventTarget.nodeName !== 'INPUT' && focusEventTarget.nodeName !== 'TEXTAREA') ||\n (focusEventTarget as HTMLInputElement | HTMLTextAreaElement).disabled\n ) {\n return false;\n }\n\n const labels = (focusEventTarget as HTMLInputElement | HTMLTextAreaElement).labels;\n\n if (labels) {\n for (let i = 0; i < labels.length; i++) {\n if (labels[i].contains(mostRecentTarget)) {\n return true;\n }\n }\n }\n\n return false;\n }\n}\n\n/**\n * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or\n * programmatically) and adds corresponding classes to the element.\n *\n * There are two variants of this directive:\n * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is\n * focused.\n * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.\n */\n@Directive({\n selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',\n exportAs: 'cdkMonitorFocus',\n standalone: true,\n})\nexport class CdkMonitorFocus implements AfterViewInit, OnDestroy {\n private _monitorSubscription: Subscription;\n private _focusOrigin: FocusOrigin = null;\n\n @Output() readonly cdkFocusChange = new EventEmitter<FocusOrigin>();\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _focusMonitor: FocusMonitor,\n ) {}\n\n get focusOrigin(): FocusOrigin {\n return this._focusOrigin;\n }\n\n ngAfterViewInit() {\n const element = this._elementRef.nativeElement;\n this._monitorSubscription = this._focusMonitor\n .monitor(element, element.nodeType === 1 && element.hasAttribute('cdkMonitorSubtreeFocus'))\n .subscribe(origin => {\n this._focusOrigin = origin;\n this.cdkFocusChange.emit(origin);\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n\n if (this._monitorSubscription) {\n this._monitorSubscription.unsubscribe();\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\nimport {inject, Inject, Injectable, OnDestroy} from '@angular/core';\nimport {BreakpointObserver} from '@angular/cdk/layout';\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\n/** Set of possible high-contrast mode backgrounds. */\nexport enum HighContrastMode {\n NONE,\n BLACK_ON_WHITE,\n WHITE_ON_BLACK,\n}\n\n/** CSS class applied to the document body when in black-on-white high-contrast mode. */\nexport const BLACK_ON_WHITE_CSS_CLASS = 'cdk-high-contrast-black-on-white';\n\n/** CSS class applied to the document body when in white-on-black high-contrast mode. */\nexport const WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black';\n\n/** CSS class applied to the document body when in high-contrast mode. */\nexport const HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active';\n\n/**\n * Service to determine whether the browser is currently in a high-contrast-mode environment.\n *\n * Microsoft Windows supports an accessibility feature called \"High Contrast Mode\". This mode\n * changes the appearance of all applications, including web applications, to dramatically increase\n * contrast.\n *\n * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast\n * Mode. This service does not detect high-contrast mode as added by the Chrome \"High Contrast\"\n * browser extension.\n */\n@Injectable({providedIn: 'root'})\nexport class HighContrastModeDetector implements OnDestroy {\n /**\n * Figuring out the high contrast mode and adding the body classes can cause\n * some expensive layouts. This flag is used to ensure that we only do it once.\n */\n private _hasCheckedHighContrastMode: boolean;\n private _document: Document;\n private _breakpointSubscription: Subscription;\n\n constructor(\n private _platform: Platform,\n @Inject(DOCUMENT) document: any,\n ) {\n this._document = document;\n\n this._breakpointSubscription = inject(BreakpointObserver)\n .observe('(forced-colors: active)')\n .subscribe(() => {\n if (this._hasCheckedHighContrastMode) {\n this._hasCheckedHighContrastMode = false;\n this._applyBodyHighContrastModeCssClasses();\n }\n });\n }\n\n /** Gets the current high-contrast-mode for the page. */\n getHighContrastMode(): HighContrastMode {\n if (!this._platform.isBrowser) {\n return HighContrastMode.NONE;\n }\n\n // Create a test element with an arbitrary background-color that is neither black nor\n // white; high-contrast mode will coerce the color to either black or white. Also ensure that\n // appending the test element to the DOM does not affect layout by absolutely positioning it\n const testElement = this._document.createElement('div');\n testElement.style.backgroundColor = 'rgb(1,2,3)';\n testElement.style.position = 'absolute';\n this._document.body.appendChild(testElement);\n\n // Get the computed style for the background color, collapsing spaces to normalize between\n // browsers. Once we get this color, we no longer need the test element. Access the `window`\n // via the document so we can fake it in tests. Note that we have extra null checks, because\n // this logic will likely run during app bootstrap and throwing can break the entire app.\n const documentWindow = this._document.defaultView || window;\n const computedStyle =\n documentWindow && documentWindow.getComputedStyle\n ? documentWindow.getComputedStyle(testElement)\n : null;\n const computedColor = ((computedStyle && computedStyle.backgroundColor) || '').replace(\n / /g,\n '',\n );\n testElement.remove();\n\n switch (computedColor) {\n // Pre Windows 11 dark theme.\n case 'rgb(0,0,0)':\n // Windows 11 dark themes.\n case 'rgb(45,50,54)':\n case 'rgb(32,32,32)':\n return HighContrastMode.WHITE_ON_BLACK;\n // Pre Windows 11 light theme.\n case 'rgb(255,255,255)':\n // Windows 11 light theme.\n case 'rgb(255,250,239)':\n return HighContrastMode.BLACK_ON_WHITE;\n }\n return HighContrastMode.NONE;\n }\n\n ngOnDestroy(): void {\n this._breakpointSubscription.unsubscribe();\n }\n\n /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */\n _applyBodyHighContrastModeCssClasses(): void {\n if (!this._hasCheckedHighContrastMode && this._platform.isBrowser && this._document.body) {\n const bodyClasses = this._document.body.classList;\n bodyClasses.remove(\n HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS,\n BLACK_ON_WHITE_CSS_CLASS,\n WHITE_ON_BLACK_CSS_CLASS,\n );\n this._hasCheckedHighContrastMode = true;\n\n const mode = this.getHighContrastMode();\n if (mode === HighContrastMode.BLACK_ON_WHITE) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS);\n } else if (mode === HighContrastMode.WHITE_ON_BLACK) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\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 */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {CdkMonitorFocus} from './focus-monitor/focus-monitor';\nimport {CdkTrapFocus} from './focus-trap/focus-trap';\nimport {HighContrastModeDetector} from './high-contrast-mode/high-contrast-mode-detector';\nimport {CdkAriaLive} from './live-announcer/live-announcer';\n\n@NgModule({\n imports: [ObserversModule, CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n})\nexport class A11yModule {\n constructor(highContrastModeDetector: HighContrastModeDetector) {\n highContrastModeDetector._applyBodyHighContrastModeCssClasses();\n }\n}\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate } from '@angular/router';\nimport { isPlatformServer } from '@angular/common';\n\nimport { Store } from '@ngrx/store';\n\nimport { CartStatus } from '@fcom/dapi/interfaces';\nimport { snapshot } from '@fcom/rx';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\n\nimport { cartStatus, cartUrl } from '../store/selectors';\nimport { BookingCartService } from './booking-cart.service';\n\n@Injectable()\nexport class BookingGuard implements CanActivate {\n private initialRoute = true;\n\n constructor(\n private cartService: BookingCartService,\n private store$: Store<BookingAppState>,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n canActivate(_route: ActivatedRouteSnapshot): boolean {\n if (isPlatformServer(this.platform)) {\n return true;\n }\n\n if (this.initialRoute) {\n const currentCartStatus: CartStatus = snapshot(this.store$.pipe(cartStatus()));\n const cUrl = snapshot(this.store$.pipe(cartUrl()));\n if ([CartStatus.INITIAL, CartStatus.OK].indexOf(currentCartStatus) === -1 && !!cUrl) {\n this.cartService.triggerLoadCart(cUrl); // This is called rarely from mobile app.\n }\n }\n\n this.initialRoute = false;\n return true;\n }\n}\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","<div\n [formGroup]=\"parentForm\"\n [class.ms-xlarge-b]=\"displayMargin\"\n (focusout)=\"closeDropDownOnFocusout($event)\"\n [class.enabled]=\"!parentForm.get(controlName)?.disabled\"\n>\n <div class=\"relative ps-xxsmall-b\">\n <label\n *ngIf=\"!disableLabel\"\n [attr.id]=\"id + '-label'\"\n class=\"font-body-1 regular-type flex ps-xxsmall-b\"\n [for]=\"idOrControlName\"\n [ngClass]=\"{\n 'nordic-blue-400-text': !control.invalid || !control.touched,\n 'error-900-text': control.invalid && control.touched,\n }\"\n >\n <div class=\"flex-1\">\n {{ label || (translationPrefix + '.label' | finLocalization) }}\n <span *ngIf=\"showAsterix\" class=\"flex-1 flex--nogrow\" data-testid=\"asterisk\"> *</span>\n </div>\n <ng-template #contentTooltip>\n <h2 class=\"font-body-1 bold-type nordic-blue-900-text\">{{ tooltipHeading }}</h2>\n <p class=\"pr-xxsmall-t nordic-blue-400-text\">{{ tooltipContent }}</p>\n </ng-template>\n <button\n type=\"button\"\n *ngIf=\"tooltipContent\"\n fcomPopover\n [options]=\"tooltipOptions\"\n [content]=\"contentTooltip\"\n [ariaCloseText]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.info' | finLocalization\"\n class=\"icon nordic-blue-900-text ms-small-r flex-1 flex--nogrow align-right\"\n [class.error-900-text]=\"control.invalid && control.touched\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.HELP_BLOCK\"></fcom-icon>\n </button>\n </label>\n\n <div class=\"relative\" #dropDown>\n <div #buttonContainer>\n <button\n *ngIf=\"searchable === false\"\n class=\"input flex flex--middle border rounded-large ps-small-l fill\"\n [ngClass]=\"{\n 'is-open': (dropDownOpen$ | async),\n 'link-hover': !parentForm.get(controlName)?.disabled,\n 'ps-small-r': !!buttonIcon,\n 'flex--space-between': !buttonIcon,\n }\"\n (click)=\"onInputEnter()\"\n (keydown)=\"handleKeyDown($event)\"\n role=\"combobox\"\n [id]=\"id + '-button'\"\n aria-haspopup=\"listbox\"\n tabindex=\"0\"\n [class.btn-disabled]=\"parentForm.get(controlName)?.disabled === true\"\n [attr.aria-activedescendant]=\"id + '-option-' + (activeIndex$ | async)\"\n [attr.aria-controls]=\"id + '-options'\"\n [attr.aria-expanded]=\"dropDownOpen$ | async\"\n [attr.aria-labelledby]=\"id + '-label'\"\n [attr.disabled]=\"parentForm.get(controlName)?.disabled ? 'disabled' : undefined\"\n [attr.aria-disabled]=\"parentForm.get(controlName)?.disabled === true\"\n #selectButton\n >\n <fcom-icon\n *ngIf=\"buttonIcon\"\n data-testid=\"button-icon\"\n class=\"icon-medium ms-small-r\"\n [name]=\"buttonIcon\"\n ></fcom-icon>\n <span\n data-testid=\"disabled-label\"\n class=\"font-body-1 medium-type grey-600-text\"\n *ngIf=\"parentForm.get(controlName)?.disabled === true\"\n >{{ selectedOption ? selectedOption.name : '-' }}</span\n >\n <ng-container *ngIf=\"parentForm.get(controlName)?.disabled === false\">\n <span data-testid=\"select-label\" class=\"font-body-1 medium-type grey-600-text\" *ngIf=\"!selectedOption\">{{\n selectLabel || (selectLabelTranslationKey | finLocalization)\n }}</span>\n <span class=\"font-body-1 medium-type nordic-blue-900-text\" *ngIf=\"selectedOption\">{{\n selectedOption.name\n ? selectedOption.name\n : (translationPrefix + '.' + selectedOption.value | finLocalization)\n }}</span>\n </ng-container>\n <fcom-icon\n *ngIf=\"!buttonIcon\"\n class=\"icon-medium ms-small-r ms-xsmall-l\"\n [ngClass]=\"{ 'grey-600-text': parentForm.get(controlName)?.disabled === true }\"\n [name]=\"(dropDownOpen$ | async) ? SvgLibraryIcon.CHEVRON_UP : SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </button>\n\n <div\n class=\"text-input relative\"\n *ngIf=\"searchable\"\n [ngClass]=\"{ 'link-hover': !parentForm.get(controlName)?.disabled }\"\n >\n <fcom-text-input\n [id]=\"idOrControlName\"\n [parentForm]=\"searchForm\"\n [translationPrefix]=\"translationPrefix\"\n [controlName]=\"'searchInput'\"\n [required]=\"false\"\n [placeHolderText]=\"searchLabel || (translationPrefix + '.searchLabel' | finLocalization)\"\n [hideLabel]=\"true\"\n [displayMargin]=\"false\"\n [disableAutoComplete]=\"true\"\n [ariaOptions]=\"{ activedescendant: id + '-option-' + (activeIndex$ | async), controls: id + '-options' }\"\n [cursorType]=\"CursorType.POINTER\"\n [hideLabel]=\"true\"\n aria-haspopup=\"listbox\"\n role=\"combobox\"\n (click)=\"openDropDown()\"\n (inputEvent)=\"handleSearch()\"\n (keydown)=\"handleKeyDown($event)\"\n (keydown.enter)=\"onInputEnter()\"\n #searchInput\n ></fcom-text-input>\n <fcom-icon\n *ngIf=\"(dropDownOpen$ | async) === false\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n class=\"absolute ms-small-t icon-medium ms-small-r link-hover\"\n (click)=\"openDropDown()\"\n data-testid=\"text-input-chevron\"\n ></fcom-icon>\n <fcom-icon-button\n *ngIf=\"dropDownOpen$ | async\"\n class=\"absolute ms-xxsmall-t ms-xxsmall-r\"\n [size]=\"IconButtonSize.MEDIUM\"\n [theme]=\"IconButtonTheme.DARK_PRIMARY_NORDIC_BLUE\"\n [icon]=\"{ name: SvgLibraryIcon.CLOSE_DELETE_BLOCK }\"\n [aria]=\"{\n label: clearSearchLabel,\n }\"\n data-testid=\"clear-search\"\n (click)=\"clearSearch($event)\"\n ></fcom-icon-button>\n </div>\n </div>\n <ul\n [ngClass]=\"{ 'is-vishidden': (dropDownOpen$ | async) !== true }\"\n [ngStyle]=\"dropDownStyle\"\n class=\"dropdown white-bg absolute rounded-large shadow fill ms-xxsmall-t z1\"\n tabindex=\"-1\"\n role=\"listbox\"\n [attr.id]=\"id + '-options'\"\n [attr.aria-labelledby]=\"id + '-label'\"\n #optionsList\n >\n <li\n *ngFor=\"let option of filteredOptions || options; let i = index\"\n class=\"flex link-hover\"\n [class.nordic-blue-50-bg]=\"i === (this.activeIndex$ | async)\"\n [class.nordic-blue-50-border]=\"i === (this.activeIndex$ | async)\"\n role=\"option\"\n [attr.id]=\"id + '-option-' + i\"\n [attr.aria-selected]=\"i === (this.activeIndex$ | async)\"\n (keydown)=\"handleKeyDown($event)\"\n >\n <span class=\"flex flex--column fill\" *ngIf=\"optionTemplate\" (click)=\"selectOption(option)\">\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate\"\n [ngTemplateOutletContext]=\"{ name: option.name, value: option.value }\"\n >\n </ng-container>\n </span>\n <span *ngIf=\"!optionTemplate\" class=\"flex flex--column ps-small fill\" (click)=\"selectOption(option)\">\n {{ option.name ? option.name : (translationPrefix + '.' + option.value | finLocalization) }}\n </span>\n </li>\n </ul>\n </div>\n <span class=\"divider\"></span>\n </div>\n <div *ngIf=\"infoText\" class=\"font-body-2 nordic-blue-400-text\">\n {{ infoText }}\n </div>\n <div *ngIf=\"control.invalid && control.touched\" class=\"error-label font-body-2\" aria-live=\"polite\">\n <span *ngIf=\"control.errors?.required\" class=\"error-900-text\">\n {{ translationPrefix + '.required' | finLocalization }}\n </span>\n </div>\n</div>\n","import {\n AfterViewChecked,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Output,\n PLATFORM_ID,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { isPlatformServer } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, take, map, filter } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { SelectOption } from '@fcom/common';\nimport { stopPropagation } from '@fcom/core/utils';\nimport { WindowRef } from '@fcom/core/providers';\n\nimport { IconButtonSize, IconButtonTheme } from '../../buttons';\nimport { SelectInputComponent } from '../select-input/select-input.component';\nimport { TextInputComponent } from '../text-input/text-input.component';\nimport { CursorType } from '../enums';\n\nconst BOTTOM_PADDING = 20;\nconst MIN_NUM_OF_ITEMS_IN_VIEW = 2;\n\n@Component({\n selector: 'fin-combo-box',\n templateUrl: './combo-box.component.html',\n styleUrls: ['./combo-box.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComboBoxComponent extends SelectInputComponent implements AfterViewInit, AfterViewChecked {\n readonly CursorType = CursorType;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n searchable = false;\n\n @Input()\n searchLabel: string;\n\n @Input()\n clearSearchLabel: string;\n\n @Input()\n selectLabel: string;\n\n @Input()\n infoText: string;\n\n @Input()\n optionTemplate?: TemplateRef<{ name: string; value: string }>;\n\n @Input()\n noMaxHeight = false;\n\n @Input()\n buttonIcon: SvgLibraryIcon;\n\n selectedOption: SelectOption;\n searchForm: UntypedFormGroup;\n filteredOptions: SelectOption[];\n dropDownStyle: { 'max-height': string };\n\n dropDownOpen$ = new BehaviorSubject<boolean>(false);\n activeIndex$ = new BehaviorSubject<number>(0);\n searchEnabled$ = new BehaviorSubject<boolean>(false);\n bottomPosition$ = new BehaviorSubject<number>(0);\n\n @ViewChild('dropDown')\n dropDown: ElementRef;\n\n @ViewChild('selectButton')\n selectButton: ElementRef;\n\n @ViewChild('buttonContainer')\n buttonContainer: ElementRef;\n\n @ViewChild('searchInput')\n searchInput: TextInputComponent;\n\n @ViewChild('optionsList')\n optionsList: ElementRef;\n\n @Output()\n dropDownOpen: EventEmitter<boolean> = new EventEmitter();\n\n @HostListener('document:click', ['$event'])\n clickout(event: Event): void {\n if (\n this.dropDownOpen$.getValue() &&\n !this.dropDown.nativeElement.contains(event.target) &&\n !event.composedPath().includes(this.buttonContainer.nativeElement)\n ) {\n this.closeDropDown();\n }\n }\n\n constructor(\n private fb: UntypedFormBuilder,\n private windowRef: WindowRef,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n super();\n\n this.searchForm = this.fb.group({\n searchInput: this.fb.control(''),\n });\n }\n\n ngAfterViewInit(): void {\n if (isPlatformServer(this.platform) && !this.noMaxHeight) {\n this.dropDownStyle = {\n 'max-height': '0px',\n };\n return;\n }\n\n this.subscriptions.add(\n this.ctrlField.valueChanges.subscribe((value) => {\n if (!value) {\n this.selectedOption = undefined;\n this.activeIndex$.next(0);\n } else {\n this.selectOptionByValue(this.ctrlField.value);\n }\n })\n );\n\n // select initial value\n if (this.ctrlField.value) {\n this.selectOptionByValue(this.ctrlField.value);\n }\n\n this.subscriptions.add(\n this.searchForm.controls['searchInput'].valueChanges.subscribe((value) => {\n if (value && !this.dropDownOpen$.getValue()) {\n this.openDropDown();\n }\n })\n );\n\n this.subscriptions.add(\n this.activeIndex$.subscribe((activeIndex) => {\n this.optionsList?.nativeElement.children[activeIndex]?.scrollIntoView?.({\n block: 'nearest',\n behaviour: 'smooth',\n });\n })\n );\n\n if (!this.noMaxHeight) {\n // Debounce to get the final (bottom) position of the button container for the dropdown\n this.subscriptions.add(\n this.bottomPosition$.pipe(distinctUntilChanged(), debounceTime(100), take(1)).subscribe((bottomPosition) => {\n const optionMultiplier =\n this.options && this.options.length >= MIN_NUM_OF_ITEMS_IN_VIEW ? MIN_NUM_OF_ITEMS_IN_VIEW : 1;\n const optionHeight = this.optionsList?.nativeElement?.children[0]?.offsetHeight ?? 0;\n const heightBasedOnMinNumOfOptions = optionHeight * optionMultiplier;\n const heightBasedOnBottomPosition =\n this.windowRef.nativeWindow.innerHeight - (bottomPosition + BOTTOM_PADDING);\n\n const maxHeight =\n heightBasedOnMinNumOfOptions > heightBasedOnBottomPosition\n ? heightBasedOnMinNumOfOptions\n : heightBasedOnBottomPosition;\n this.dropDownStyle = {\n 'max-height': `${maxHeight}px`,\n };\n })\n );\n }\n }\n\n ngAfterViewChecked(): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n if (!this.dropDownStyle) {\n const rect = this.buttonContainer.nativeElement.getBoundingClientRect();\n this.bottomPosition$.next(rect.bottom);\n }\n }\n\n selectOptionByValue(value: string): void {\n this.selectedOption = this.options.find((option) => option.value === value);\n\n if (this.searchable) {\n this.searchForm.controls.searchInput.setValue(this.selectedOption.name);\n }\n\n this.activeIndex$.next(this.options.indexOf(this.selectedOption));\n }\n\n selectOption(option: SelectOption): void {\n this.ctrlField.setValue(option.value);\n this.closeDropDown();\n }\n\n selectCurrentActiveOption(): void {\n this.subscriptions.add(\n combineLatest([this.activeIndex$, this.dropDownOpen$])\n .pipe(\n filter(([_activeIndex, dropDownOpen]) => dropDownOpen),\n map(([activeIndex]) => activeIndex),\n take(1)\n )\n .subscribe((activeIndex) => {\n this.selectOption((this.filteredOptions || this.options)[activeIndex]);\n })\n );\n }\n\n closeDropDownOnFocusout(e: FocusEvent): void {\n if (this.dropDownOpen$.getValue() && !this.dropDown.nativeElement.contains(e.relatedTarget)) {\n this.closeDropDown();\n }\n }\n\n closeDropDown(): void {\n this.searchEnabled$.next(false);\n this.filteredOptions = undefined;\n\n this.searchForm.controls['searchInput'].setValue(this.selectedOption?.name || '');\n\n this.dropDownOpen$.next(false);\n this.dropDownOpen.emit(false);\n }\n\n openDropDown(): void {\n this.dropDownOpen$.next(true);\n\n this.filteredOptions = undefined;\n\n this.searchForm.controls.searchInput.setValue('');\n\n if (this.searchable) {\n this.searchEnabled$.next(true);\n }\n\n this.dropDownOpen.emit(true);\n }\n\n onInputEnter(): void {\n const dropDownOpen = this.dropDownOpen$.getValue();\n\n if (dropDownOpen) {\n this.selectCurrentActiveOption();\n } else {\n this.openDropDown();\n }\n }\n\n handleKeyDown(e: KeyboardEvent): void {\n const currentActiveIndex = this.activeIndex$.getValue();\n const opts = this.filteredOptions || this.options || [];\n const maxIndex = Math.max(0, opts.length - 1);\n\n const dropDownOpen = this.dropDownOpen$.getValue();\n switch (e.key) {\n case 'Escape':\n this.closeDropDown();\n break;\n case 'Down':\n case 'ArrowDown':\n stopPropagation(e);\n if (dropDownOpen) {\n this.activeIndex$.next(currentActiveIndex + 1 > maxIndex ? 0 : currentActiveIndex + 1);\n } else {\n this.openDropDown();\n }\n break;\n case 'Up':\n case 'ArrowUp':\n stopPropagation(e);\n if (dropDownOpen) {\n this.activeIndex$.next(currentActiveIndex - 1 < 0 ? maxIndex : currentActiveIndex - 1);\n } else {\n this.openDropDown();\n this.activeIndex$.next(maxIndex);\n }\n break;\n }\n }\n\n handleSearch(): void {\n const query = this.searchForm.controls['searchInput'].value;\n\n this.filteredOptions = this.options.filter((option) => option.name?.toLowerCase().startsWith(query.toLowerCase()));\n }\n\n clearSearch(e: Event): void {\n this.searchForm.controls.searchInput.setValue('');\n this.closeDropDown();\n this.searchInput?.inputElement.nativeElement.focus();\n e.stopPropagation();\n }\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport {\n SelectedServiceData,\n SelectionsPerTraveler,\n ServiceAvailability,\n ServiceCatalog,\n TravelerService,\n} from '@fcom/dapi/interfaces';\nimport { Category } from '@fcom/dapi/api/models';\n\nexport const startLoading = createAction('[ServicesActions] LoadStart');\nexport const error = createAction('[ServicesActions] LoadError');\nexport const setSelectionsForFragment = createAction(\n '[ServicesActions] SetSelectionsForFragment',\n props<{ category: Category; fragmentId: string; selections: SelectionsPerTraveler<TravelerService[]> }>()\n);\nexport const setSelectionForFragmentForTraveler = createAction(\n '[ServicesActions] setSelectionForFragmentForTraveler',\n props<{\n category: Category;\n fragmentId: string;\n travelerId: string;\n selection: TravelerService;\n }>()\n);\nexport const setCoverForId = createAction(\n '[ServicesActions] SetCoverForJourney',\n props<{ journeyId: string; travelerId: string; service: TravelerService }>()\n);\nexport const setServiceCatalog = createAction(\n '[ServicesActions] SetServiceCatalog',\n props<{ catalog: ServiceCatalog }>()\n);\n\nexport const setServiceAvailability = createAction(\n '[ServicesActions] SetServiceAvailability',\n props<{ serviceAvailability: ServiceAvailability }>()\n);\nexport const setCampaignShown = createAction('[ServicesActions] SetCampaignShown', props<{ id: string }>());\nexport const setUpsell = createAction('[ServicesActions] setUpsell', props<SelectedServiceData>());\nexport const clearUpsell = createAction('[ServicesActions] clearUpsell');\nexport const reset = createAction('[ServicesActions] Reset');\n\nexport const resetCategory = createAction('[ServicesActions] ResetCategory', props<{ category: Category }>());\nconst all = union({\n startLoading,\n error,\n setCampaignShown,\n setSelectionsForFragment,\n setSelectionForFragmentForTraveler,\n setCoverForId,\n setServiceCatalog,\n setServiceAvailability,\n setUpsell,\n clearUpsell,\n reset,\n resetCategory,\n});\n\nexport type ActionsUnion = typeof all;\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\n\nimport { Observable, combineLatest } from 'rxjs';\nimport { switchMap, distinctUntilChanged } from 'rxjs/operators';\n\nimport { CurrencyService } from '@fcom/core';\n\n/**\n * Asynchronous offers price pipe that supports localizations.\n * Uses currencyService to get price in localized format.\n */\n@Injectable()\n@Pipe({\n name: 'finOffersPrice',\n pure: true,\n})\nexport class OffersPricePipe implements PipeTransform {\n constructor(private currencyService: CurrencyService) {}\n\n transform(\n offerPrice$: Observable<string>,\n offerCurrencyCode$: Observable<string>,\n doPriceRounding = false\n ): Observable<string> {\n return combineLatest([\n offerPrice$.pipe(distinctUntilChanged()),\n offerCurrencyCode$.pipe(distinctUntilChanged()),\n ]).pipe(\n switchMap(([amount, currencyCode]) =>\n this.currencyService.formatPrice({ amount, currencyCode }, { roundPrice: doPriceRounding })\n )\n );\n }\n}\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","<div class=\"ps-small-x\">\n <table\n class=\"monthWrapper fill\"\n role=\"grid\"\n [attr.aria-multiselectable]=\"isDateRange ? 'true' : 'false'\"\n (keydown)=\"onKeyDown($event)\"\n >\n <caption class=\"title font-body-1 nordic-blue-900-text bold-type ps-medium\">\n {{\n month.label\n }}\n </caption>\n <thead>\n <tr>\n @for (dayName of month?.weekDays?.weekdays; track dayName) {\n <th class=\"weekDay font-body-2 light-type\" scope=\"col\" id=\"{{ dayName }}\">\n <abbr title=\"{{ dayName }}\">{{ (month?.weekDays?.weekdaysShort)[$index] }}</abbr>\n </th>\n }\n </tr>\n </thead>\n <tbody class=\"calendarBlock\">\n @for (week of month.weeks; track week) {\n <tr>\n @for (day of week.days; track day) {\n @if (day?.spacer !== 7 || shouldShowEmptyWeeks) {\n <td\n class=\"dayWrapper\"\n [class.dayCell]=\"!day.spacer\"\n [attr.colspan]=\"day.spacer\"\n [attr.aria-selected]=\"day.selected\"\n >\n <ng-container [ngTemplateOutlet]=\"dayTemplate\" [ngTemplateOutletContext]=\"{ day }\"> </ng-container>\n </td>\n }\n }\n </tr>\n }\n </tbody>\n </table>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, TemplateRef } from '@angular/core';\n\nimport { Month, Day } from '../../../utils/date.interface';\nimport { CalendarService } from '../services/calendar.service';\n\n@Component({\n selector: 'fcom-calendar-month',\n styleUrls: ['./month.component.scss'],\n templateUrl: './month.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MonthComponent {\n @Input()\n set value(monthId: string) {\n this.month = this.calendarService.getMonth(monthId);\n }\n\n @Input() dayTemplate: TemplateRef<{ day: Day }>;\n\n @Input() isDateRange: boolean;\n\n /**\n * If we need to display empty weeks\n */\n @Input() set showEmptyWeeks(value: boolean) {\n this.shouldShowEmptyWeeks = value;\n }\n\n month: Month;\n shouldShowEmptyWeeks: boolean;\n\n constructor(private calendarService: CalendarService) {}\n\n onKeyDown(event: KeyboardEvent): void {\n this.calendarService.processKey(event);\n }\n}\n","import { createSelector, select } from '@ngrx/store';\n\nimport { BookingFeatureState, PaxDetailsState } from '@fcom/common/interfaces/booking';\n\nimport { bookingFeatureState } from './booking-feature-state.selector';\n\n// eslint-disable-next-line no-underscore-dangle\nconst _paxDetailsPassengers = createSelector(bookingFeatureState, (bfs: BookingFeatureState) => bfs?.paxDetails);\nconst _filteredPaxDetailsPassengers = (passengerIds: string[]) =>\n createSelector(_paxDetailsPassengers, (pxd: PaxDetailsState) => ({\n ...pxd,\n passengers: pxd?.passengers?.filter((p) => passengerIds.includes(p.travelerId)),\n }));\n\nconst _additionalEmails = createSelector(_paxDetailsPassengers, (pxd: PaxDetailsState) => pxd?.additionalEmails);\n\nexport const paxDetailTravelerSelector = createSelector(\n _paxDetailsPassengers,\n (pxd: PaxDetailsState) => pxd?.passengers\n);\n\nexport const paxDetails = () => select(_paxDetailsPassengers);\nexport const additionalEmails = () => select(_additionalEmails);\nexport const filteredPaxDetails = (passengerIds: string[]) => select(_filteredPaxDetailsPassengers(passengerIds));\n","/**\n * Parses user's text input to date\n * Format has to match the given pattern\n * Patterns can be combinations of yyyy MM dd using . / or - as separators\n * Numbers are automatically padded in case a leading zero is not provided\n * e.g. MM/dd/yyyy as pattern will work with 1/31/2020 as input returning 2020-31-01\n */\nimport { pad } from '@fcom/core/utils';\n\nexport class ParseUserInput {\n constructor(\n private date: string,\n private format: string\n ) {}\n\n getISOString(): string {\n let dateArray: string[];\n let formatArray: string[];\n if (this.format.includes('.')) {\n dateArray = this.date.split('.');\n formatArray = this.format.split('.');\n } else if (this.format.includes('/')) {\n dateArray = this.date.split('/');\n formatArray = this.format.split('/');\n } else if (this.format.includes('-')) {\n dateArray = this.date.split('-');\n formatArray = this.format.split('-');\n }\n const dateObj: any = formatArray.reduce((obj, key, index) => ({ ...obj, [key]: dateArray[index] }), {});\n\n if (\n parseInt(dateObj.yyyy, 10) < 2999 &&\n parseInt(dateObj.yyyy, 10) > 1900 &&\n parseInt(dateObj.MM, 10) < 13 &&\n parseInt(dateObj.MM, 10) > 0 &&\n parseInt(dateObj.dd, 10) < 32 &&\n parseInt(dateObj.dd, 10) > 0\n ) {\n return `${dateObj.yyyy as string}-${pad(dateObj.MM)}-${pad(dateObj.dd)}`;\n }\n return undefined;\n }\n}\n","<section class=\"calendarHeader border-bottom white-bg fill z2\">\n <div class=\"titleArea\" [ngClass]=\"titleAreaConfig.titleAreaStyle\">\n <div class=\"title grow flex\" [ngClass]=\"{ 'flex--column flex--baseline flex--align-start': subTitle }\">\n <h2\n *ngIf=\"titleAreaConfig?.title || uiLabels?.title\"\n class=\"overflow-hidden nordic-blue-900-text ms-clear-t\"\n [ngClass]=\"titleAreaConfig.titleStyle\"\n [class.flex--self-center]=\"subTitle === undefined\"\n tabindex=\"-1\"\n data-focus-on-modal-open\n data-testid=\"datepicker-title\"\n #titleElement\n >\n {{ dateSelectedLabel ? dateSelectedLabel : titleAreaConfig?.title ? titleAreaConfig.title : uiLabels?.title }}\n </h2>\n @if (subTitle) {\n <ng-container *ngTemplateOutlet=\"subTitle\"></ng-container>\n }\n </div>\n\n <div class=\"controls flex flex--middle flex--start\">\n <button\n (click)=\"clearDates()\"\n class=\"reset font-body-1 regular-type nordic-blue-900-text underline ms-small-r\"\n data-testid=\"datepicker-reset\"\n data-focus-on-modal-open\n >\n {{ uiLabels?.reset }}\n </button>\n\n <div class=\"inputs flex flex--wrap ms-xsmall-x\">\n <div class=\"fill flex border rounded\">\n <div\n class=\"inputArea flex flex-1 ps-xxsmall-x ps-xsmall-y\"\n [class.border-right]=\"isDateRange\"\n [class.invalid]=\"startDateError\"\n >\n <fcom-icon class=\"icon-medium flex--nogrow\" [name]=\"SvgLibraryIcon.DEPARTURE\"></fcom-icon>\n <input\n data-testid=\"datepicker-departure-date\"\n [attr.aria-label]=\"uiLabels?.selectStartDate\"\n aria-describedby=\"dp-startDate-error\"\n autocomplete=\"off\"\n class=\"flex-1 font-body-1 regular-type nordic-blue-900-text border-none mr-xxsmall-l\"\n id=\"dp-startDate\"\n maxlength=\"10\"\n [attr.placeholder]=\"uiLabels?.inputPlaceholder\"\n type=\"text\"\n name=\"startDate\"\n [(ngModel)]=\"startDate\"\n (blur)=\"setDate($event)\"\n (keyup.enter)=\"setDate($event)\"\n inputmode=\"text\"\n />\n </div>\n <div\n *ngIf=\"isDateRange\"\n class=\"inputArea flex flex-1 ps-xsmall-l ps-xxsmall-r ps-xsmall-y\"\n [class.invalid]=\"endDateError\"\n >\n <fcom-icon class=\"icon-medium flex--nogrow\" [name]=\"SvgLibraryIcon.ARRIVAL\"></fcom-icon>\n <input\n data-testid=\"datepicker-return-date\"\n [attr.aria-label]=\"uiLabels?.selectEndDate\"\n aria-describedby=\"dp-endDate-error\"\n autocomplete=\"off\"\n class=\"flex-1 font-body-1 regular-type nordic-blue-900-text border-none mr-xxsmall-l\"\n id=\"dp-endDate\"\n maxlength=\"10\"\n [attr.placeholder]=\"uiLabels?.inputPlaceholder\"\n type=\"text\"\n name=\"endDate\"\n [(ngModel)]=\"endDate\"\n (blur)=\"setDate($event)\"\n (keyup.enter)=\"setDate($event)\"\n inputmode=\"text\"\n />\n </div>\n </div>\n <span\n id=\"dp-startDate-error\"\n class=\"inputError fill ps-xxsmall-l font-body-1 heather-700-text heather-50-bg border heather-700-border rounded-bottom-left rounded-bottom-right\"\n [class.is-hidden]=\"!startDateError\"\n aria-live=\"assertive\"\n >\n {{ startDateError }}\n </span>\n <span\n *ngIf=\"isDateRange\"\n id=\"dp-endDate-error\"\n class=\"inputError fill ps-xxsmall-l font-body-1 heather-700-text heather-50-bg border heather-700-border rounded-bottom-left rounded-bottom-right\"\n [class.is-hidden]=\"!endDateError\"\n aria-live=\"assertive\"\n >\n {{ endDateError }}\n </span>\n </div>\n\n <fcom-button\n data-testid=\"datepicker-add-return\"\n *ngIf=\"showAddReturn\"\n [text]=\"'uiLabels.addReturn' | finLocalization\"\n [icon]=\"{ name: SvgLibraryIcon.PLUS, position: IconPosition.LEFT }\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n (click)=\"addReturn.emit()\"\n ></fcom-button>\n </div>\n\n <div class=\"close flex flex--end\">\n <button [attr.aria-label]=\"uiLabels?.close\" class=\"rounded\" (click)=\"closeDatepicker()\">\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"headerTemplate\" [ngTemplateOutlet]=\"headerTemplate\"></ng-container>\n</section>\n\n<fcom-notification\n data-testid=\"datepicker-top-notification\"\n *ngIf=\"topNotification\"\n class=\"block pr-small-t pr-clear-y\"\n [theme]=\"NotificationTheme.INFO\"\n [layout]=\"NotificationLayout.EDGE_TO_EDGE\"\n>\n {{ topNotification }}\n</fcom-notification>\n\n<fcom-calendar\n class=\"block ms-xsmall-x ms-xsmall-t\"\n [dateLabels]=\"dateLabels\"\n [uiLabels]=\"uiLabels\"\n [isDateRange]=\"isDateRange\"\n [selectedDates]=\"selectedDateSelection\"\n [disabledDateRanges]=\"disabledDateRanges\"\n [showTags]=\"showTags\"\n [dayTemplate]=\"dayTemplate\"\n [scrollToMonthIndex$]=\"scrollToMonthIndex$\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [showEnhancedCalendar]=\"showEnhancedCalendar\"\n (monthChange)=\"monthChange.emit($event)\"\n (datesSelected)=\"onDatesSelected($event)\"\n></fcom-calendar>\n\n<div data-testid=\"datepicker-vishidden-dates\" class=\"is-vishidden\" role=\"status\" *ngIf=\"startDate || endDate\">\n {{ uiLabels?.selectedDates }}: {{ startDate }}, {{ endDate }}\n</div>\n\n<section class=\"ps-large nordic-blue-50-bg fill flex--center flex stickyFooter\" *ngIf=\"!doneBtnHidden\">\n <fcom-button (clickBtn)=\"closeDatepicker()\" [text]=\"uiLabels?.done\" class=\"font-body-2\"></fcom-button>\n</section>\n","import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ChangeDetectionStrategy,\n ViewChild,\n ElementRef,\n AfterViewInit,\n TemplateRef,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { EMPTY, Observable, Subject, Subscription } from 'rxjs';\nimport { withLatestFrom, filter, map } from 'rxjs/operators';\n\nimport { DateFormat, LocalDate, TzDate, Pattern, unsubscribe, isPresent } from '@fcom/core/utils';\nimport { HistogramBar } from '@fcom/common';\nimport { MediaQueryService } from '@fcom/common/services/media-query/media-query.service';\n\nimport { DatepickerTitleAreaOptions } from '../../interfaces';\nimport { DateSelection, Day, Month } from '../../../utils/date.interface';\nimport { ParseUserInput } from '../../../utils/date.format.utils';\nimport { NotificationLayout, NotificationTheme } from '../../notifications';\nimport { DateRange } from '../interfaces';\nimport { ButtonTheme } from '../../buttons';\nimport { IconPosition } from '../../icons';\n\nconst DEFAULT_TITLE_AREA_CONFIGURATION: DatepickerTitleAreaOptions = {\n titleAreaStyle: 'ps-large',\n title: undefined,\n titleStyle: 'font-body-1',\n};\n\nconst DAYS_AMOUNT = 360; // Default calendar size\n\n@Component({\n selector: 'fcom-datepicker',\n styleUrls: ['./datepicker.component.scss'],\n templateUrl: './datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DatepickerComponent implements OnChanges, OnDestroy, AfterViewInit {\n @ViewChild('titleElement') titleElement: ElementRef<HTMLElement>;\n\n @Input() doneBtnHidden = false;\n\n /**\n * Object of translated and localized date labels\n * (e.g. month names, date formats)\n */\n @Input() dateLabels: any;\n\n /**\n * Object of translated UI labels\n * (e.g. error messages, instructions)\n */\n @Input() uiLabels: any;\n\n @Input() set titleAreaConfiguration(configuration: DatepickerTitleAreaOptions) {\n this.titleAreaConfig = { ...DEFAULT_TITLE_AREA_CONFIGURATION, ...configuration };\n }\n\n /**\n * H2 title to be shown in top left of modal\n */\n @Input() title: string = undefined;\n @Input() subTitle?: TemplateRef<ElementRef>;\n\n /**\n * Initially preselected dates\n * Array of (one or two) YYYY-MM-DD strings\n */\n @Input() selectedDates: [LocalDate] | DateRange;\n\n /**\n * Defined range of calendar (first and last selectable date)\n * Array of two YYYY-MM-DD strings\n */\n @Input() selectableDatesRange: DateRange;\n\n /**\n * Ranges where dates should be disabled\n * An array which includes array of two LocalDates\n */\n @Input() disabledDateRanges?: DateRange[];\n\n /**\n * If datepicker should select range or single date\n */\n @Input() isDateRange = false;\n\n /**\n * Focus header on init\n */\n @Input() focusHeaderOnInit = false;\n\n @Input() topNotification: string = undefined;\n\n /**\n * Show month chip buttons on top of calendar\n */\n @Input() showTags = true;\n\n /**\n * Show histogram on top of the calendar\n */\n @Input() headerTemplate?: TemplateRef<HistogramBar[]>;\n\n /**\n * Custom day template to be rendered within the calendar\n */\n @Input() dayTemplate?: TemplateRef<{ dayValue: Day; dayString: number; showEnhancedCalendar: boolean }>;\n\n /**\n * Set the month index where the calendar should scroll to\n */\n @Input() scrollToMonthIndex$: Observable<number> = EMPTY;\n\n @Input() showAddReturn = false;\n\n @Input() showEnhancedCalendar: boolean = false;\n /**\n * Event emitter for selected date or date range\n * Array of (one or two) YYYY-MM-DD strings\n */\n @Output() selectedDatesChange: EventEmitter<[string] | [string, string]> = new EventEmitter<\n [string] | [string, string]\n >();\n\n /**\n * Event emitter for close event\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() close: EventEmitter<void> = new EventEmitter();\n\n /**\n * Event emitter for monthChange\n */\n @Output() monthChange: EventEmitter<Month> = new EventEmitter();\n\n @Output() addReturn: EventEmitter<void> = new EventEmitter();\n\n readonly ButtonTheme = ButtonTheme;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n titleAreaConfig = DEFAULT_TITLE_AREA_CONFIGURATION;\n startDate = '';\n endDate = '';\n startDateError: string = undefined;\n endDateError: string = undefined;\n dateSelectedLabel: string = undefined;\n NotificationTheme = NotificationTheme;\n NotificationLayout = NotificationLayout;\n\n minDate: LocalDate;\n maxDate: LocalDate;\n selectedDateSelection: DateSelection;\n private currentDate: LocalDate = LocalDate.now();\n\n private clearDates$ = new Subject<void>();\n private subscription: Subscription = new Subscription();\n\n constructor(\n private mediaQueryService: MediaQueryService,\n private hostElement: ElementRef\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n // eslint-disable-next-line no-prototype-builtins\n if (changes.hasOwnProperty('selectableDatesRange') || changes.hasOwnProperty('disabledDateRanges')) {\n this.minDate = this.selectableDatesRange[0] ? this.selectableDatesRange[0] : this.currentDate;\n\n this.maxDate = this.selectableDatesRange[1]\n ? this.selectableDatesRange[1]\n : this.currentDate.plusDays(DAYS_AMOUNT).firstDayOfMonth.plusMonths(1).minusDays(1);\n }\n\n // eslint-disable-next-line no-prototype-builtins\n if (changes.hasOwnProperty('selectedDates')) {\n this.selectedDateSelection = this.dateArrayToDateSelection(this.selectedDates);\n }\n\n // eslint-disable-next-line no-prototype-builtins\n if (changes.hasOwnProperty('isDateRange')) {\n this.dateSelectedLabel = undefined;\n }\n }\n\n ngAfterViewInit(): void {\n if (this.focusHeaderOnInit) {\n this.titleElement.nativeElement.focus();\n }\n\n this.subscription.add(\n this.clearDates$\n .pipe(\n withLatestFrom(this.mediaQueryService.isBreakpoint$('laptop_up')),\n map(([_, isLaptopUp]) => isLaptopUp),\n filter(Boolean)\n )\n .subscribe(() => {\n this.scrollToTop();\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n onDatesSelected(dates: DateSelection): void {\n this.dateSelectedLabel = undefined;\n if (dates.startDate) {\n this.startDate = new DateFormat(this.dateLabels).format(\n dates.startDate,\n new Pattern('dateFormatUserInput', true)\n );\n } else {\n this.startDate = undefined;\n }\n\n if (dates.endDate) {\n this.endDate = new DateFormat(this.dateLabels).format(dates.endDate, new Pattern('dateFormatUserInput', true));\n } else {\n this.endDate = undefined;\n }\n\n if (this.isDateRange) {\n this.selectedDatesChange.emit([\n dates.startDate ? dates.startDate.toString() : undefined,\n dates.endDate ? dates.endDate.toString() : undefined,\n ]);\n } else {\n this.selectedDatesChange.emit([dates.startDate ? dates.startDate.toString() : undefined]);\n }\n\n if (this.isDateRange && this.startDate && this.endDate) {\n this.dateSelectedLabel = this.uiLabels.selectedDates;\n }\n if (!this.isDateRange && this.startDate) {\n this.dateSelectedLabel = this.uiLabels.selectedDate;\n }\n this.clearErrors();\n }\n\n setDate(event: Event): void {\n const element = event.target as HTMLInputElement;\n const isEndDate = element.name === 'endDate';\n let errorMessage;\n\n const userInputISOString = new ParseUserInput(element.value, this.dateLabels.dateFormatUserInput).getISOString();\n if (!userInputISOString && element.value !== '') {\n errorMessage = this.uiLabels.error.invalidDate;\n } else if (userInputISOString) {\n try {\n const date = LocalDate.fromTzDate(new TzDate(userInputISOString));\n if (\n !date.isBetween(this.minDate, this.maxDate) ||\n (this.disabledDateRanges && this.disabledDateRanges.some((range) => date.isBetween(range[0], range[1])))\n ) {\n errorMessage = this.uiLabels.error.outOfRange;\n } else {\n this.verifyDateSelection(date, isEndDate);\n errorMessage = undefined;\n }\n } catch (e) {\n switch (e.message) {\n case 'startAfterEnd':\n errorMessage = this.uiLabels.error.startAfterEnd;\n break;\n case 'endBeforeStart':\n errorMessage = this.uiLabels.error.endBeforeStart;\n break;\n case 'outOfRange':\n errorMessage = this.uiLabels.error.outOfRange;\n break;\n default:\n errorMessage = this.uiLabels.error.invalidDate;\n break;\n }\n }\n } else if (element.value === '') {\n this.verifyDateSelection(undefined, isEndDate);\n errorMessage = undefined;\n }\n\n if (isEndDate) {\n this.endDateError = errorMessage;\n } else {\n this.startDateError = errorMessage;\n }\n }\n\n clearErrors(): void {\n this.endDateError = undefined;\n this.startDateError = undefined;\n }\n\n clearDates(): void {\n // we act to clear dates only if any of start date or end date are previously set\n if (isPresent(this.selectedDateSelection?.startDate) || isPresent(this.selectedDateSelection?.endDate)) {\n this.clearDates$.next();\n this.selectedDateSelection = this.dateArrayToDateSelection([]);\n this.dateSelectedLabel = undefined;\n }\n }\n\n closeDatepicker(): void {\n this.close.emit();\n }\n\n private verifyDateSelection(date: LocalDate | undefined, isEndDate: boolean): void {\n const currentSelection: DateSelection = this.selectedDateSelection;\n const currentCorrespondingDateSelection = isEndDate ? currentSelection.endDate : currentSelection.startDate;\n const isAlreadySelected = currentCorrespondingDateSelection && date?.equals(currentCorrespondingDateSelection);\n const isEndBeforeStart = isEndDate && currentSelection.startDate && date?.lt(this.minDate);\n const isOutOfRange = date?.lt(this.minDate) || date?.gt(this.maxDate);\n\n if (isAlreadySelected) {\n return;\n } else if (isEndBeforeStart) {\n throw new Error('endBeforeStart');\n } else if (isOutOfRange) {\n throw new Error('outOfRange');\n } else {\n const newSelections = isEndDate ? { endDate: date } : { startDate: date };\n this.selectedDateSelection = { ...currentSelection, ...newSelections };\n }\n }\n\n private scrollToTop() {\n requestAnimationFrame(() => {\n this.hostElement.nativeElement.scrollIntoView();\n });\n }\n\n private dateArrayToDateSelection(dateArray: LocalDate[]): DateSelection {\n const dateSelection: DateSelection = { startDate: undefined, endDate: undefined };\n if (dateArray[0] && this.isWithinSelectableRange(dateArray[0])) {\n dateSelection.startDate = dateArray[0];\n if (dateArray[1] && this.isWithinSelectableRange(dateArray[1])) {\n dateSelection.endDate = dateArray[1];\n }\n }\n return dateSelection;\n }\n\n private isWithinSelectableRange(date: LocalDate): boolean {\n return this.minDate.lte(date) && this.maxDate.gte(date);\n }\n}\n","import { props, createAction, union } from '@ngrx/store';\n\nexport const setLanguage = createAction('[Language] Set language', props<{ language: string; locale: string }>());\nexport const setLocalizations = createAction(\n '[Language] Set language/locale',\n props<{ language: string; localization: any }>()\n);\n\nconst all = union({ setLanguage, setLocalizations });\n\nexport type LanguageActionUnion = typeof all;\n","import { Step } from '@fcom/common/interfaces';\n\nimport { VoluntaryChangeSteps, VoluntaryChangeErrorSteps } from './interfaces/step.interface';\n\nexport const VOLUNTARY_CHANGE_STEPS: VoluntaryChangeSteps = {\n SELECT_BOUNDS: {\n id: 0,\n path: 'bounds',\n translationKey: 'selectBounds',\n },\n SELECT_DATES: {\n id: 1,\n path: 'dates',\n translationKey: 'selectDates',\n },\n SELECT_MATRIX: {\n id: 2,\n path: 'matrix',\n translationKey: 'checkPrices',\n },\n FLIGHT_SELECTION: {\n id: 3,\n path: 'flight-selection',\n translationKey: 'selectNewFlights',\n },\n PURCHASE_REVIEW: {\n id: 4,\n path: 'purchase-review',\n translationKey: 'review',\n },\n CHECKOUT: {\n id: 5,\n path: 'checkout',\n translationKey: 'payment',\n },\n PURCHASE_SUCCESS: {\n id: 6,\n path: 'confirmation',\n translationKey: 'confirmation',\n },\n};\n\nexport const VOLUNTARY_CHANGE_ERROR_STEPS: VoluntaryChangeErrorSteps = {\n PAYMENT_ERROR: {\n path: 'payment/error',\n },\n ERROR: {\n path: 'error',\n },\n ERROR_ROUTE: {\n path: 'error/:error',\n },\n};\n\nexport const VOLUNTARY_CHANGE_STEPS_ARRAY: Step[] = Object.keys(VOLUNTARY_CHANGE_STEPS)\n .filter((key) => !VOLUNTARY_CHANGE_STEPS[key].disabled)\n .map((key) => VOLUNTARY_CHANGE_STEPS[key]);\n","<div [formGroup]=\"parentForm\" [class.ms-xlarge-b]=\"displayMargin\">\n <div class=\"relative ps-xxsmall-b\">\n <label class=\"font-body-1 grey-600-text\" [for]=\"idOrControlName\" [class.block]=\"type === FormInputType.TEXTAREA\">\n {{ labelPrefix }}\n {{ translationPrefix + '.label' | finLocalization }}\n {{ labelSuffix }}\n <span *ngIf=\"isRequired\"> *</span>\n </label>\n <input\n class=\"font-body-1 light-type\"\n *ngIf=\"type === FormInputType.INPUT\"\n [class.form-field-empty]=\"!(control.value || placeHolder)\"\n [class.sensitive]=\"isSensitive\"\n type=\"text\"\n [formControlName]=\"controlName\"\n [id]=\"idOrControlName\"\n [attr.placeholder]=\"placeHolder ? (placeHolder | finLocalization) : null\"\n [attr.aria-required]=\"isRequired\"\n [name]=\"controlName\"\n #inputElement\n />\n <span class=\"divider\" *ngIf=\"parentForm.get(controlName)?.disabled === false\"></span>\n <textarea\n class=\"font-body-1 border grey-200-bg fill ps-xsmall ms-small-t\"\n *ngIf=\"type === FormInputType.TEXTAREA\"\n [class.sensitive]=\"isSensitive\"\n [class.resizeable]=\"isResizeable\"\n type=\"text\"\n [formControlName]=\"controlName\"\n [id]=\"idOrControlName\"\n [rows]=\"rows\"\n #textareaElement\n ></textarea>\n </div>\n <div\n *ngIf=\"control.invalid && control.touched\"\n class=\"error-label error-900-text font-body-2 light-type\"\n aria-live=\"polite\"\n >\n <span *ngIf=\"control.errors?.required\">\n {{ translationPrefix + '.required' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.pattern\">\n {{ translationPrefix + '.pattern' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.duplicate\">\n {{ translationPrefix + '.duplicate' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.maxlength\">\n {{ translationPrefix + '.maxLength' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.minlength\">\n {{ translationPrefix + '.minLength' | finLocalization }}\n </span>\n </div>\n <div\n *ngIf=\"characterLimit && characterCount\"\n class=\"nordic-blue-900-text font-body-1\"\n [attr.data-testid]=\"'character-limit-for-' + controlName\"\n >\n {{ characterCount }} / {{ characterLimit }}\n </div>\n</div>\n","import { Component, Input, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core';\nimport { UntypedFormGroup, AbstractControl } from '@angular/forms';\n\nimport { Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { FormInputType } from '../../interfaces';\n\n@Component({\n selector: 'fin-form-input-text',\n templateUrl: 'form-input-text.component.html',\n styleUrls: ['./form-input-text.component.scss'],\n})\nexport class FormInputTextComponent implements OnInit, OnDestroy {\n public readonly FormInputType = FormInputType;\n\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n placeHolder: string = null;\n\n @Input()\n characterCount: number;\n\n @Input()\n characterLimit: number;\n\n @Input()\n isSensitive = false;\n\n @Input()\n isResizeable = false;\n\n @Input()\n type: FormInputType = FormInputType.INPUT;\n\n @Input()\n rows = 6;\n\n @Input()\n id: string;\n\n @Input()\n labelPrefix: string;\n\n @Input()\n labelSuffix: string;\n\n @Input()\n displayMargin = true;\n\n @Input()\n visualDisable = false;\n\n @Input()\n required = false;\n\n isRequired = false;\n idOrControlName: string;\n control: AbstractControl;\n\n @ViewChild('inputElement', { static: false })\n inputElement: ElementRef;\n\n @ViewChild('textareaElement', { static: false })\n textareaElement: ElementRef;\n\n private subscriptions: Subscription = new Subscription();\n\n get fieldRequired(): boolean {\n return this.required || this.ctrlField.errors?.required;\n }\n\n get ctrlField(): AbstractControl {\n return this.parentForm.get(this.controlName);\n }\n\n setFocus(): void {\n if (this.type === FormInputType.INPUT) {\n this.inputElement.nativeElement.focus();\n } else if (this.type === FormInputType.TEXTAREA) {\n this.textareaElement.nativeElement.focus();\n }\n }\n\n ngOnInit(): void {\n this.control = this.ctrlField;\n this.isRequired = this.fieldRequired;\n this.idOrControlName = this.id || this.controlName;\n\n this.subscriptions.add(\n this.control.statusChanges.subscribe(() => {\n if (this.control.value) {\n return;\n }\n this.isRequired = this.fieldRequired;\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","<ng-template #dateBlock let-date=\"date\">\n <div class=\"flex date-block flex--column flex--center\">\n <div class=\"is-vishidden\">\n {{ date | finDateFormat: 'VOICE_OVER_DATE' }}\n </div>\n <div class=\"font-body-2 regular-type\" aria-hidden=\"true\">\n {{ date | finDateFormat: 'WEEKDAY_SHORT' | finEmpty }}\n </div>\n <div class=\"nordic-blue-900-text weekday\" aria-hidden=\"true\">\n {{ date | finDateFormat: 'd' | finEmpty }}\n </div>\n </div>\n <div class=\"font-body-2 regular-type\" aria-hidden=\"true\">\n {{ date | finDateFormat: 'MONTH_SHORT' | finEmpty }}\n </div>\n</ng-template>\n\n<div>\n <span aria-live=\"polite\" class=\"is-vishidden\" *ngIf=\"(announceDates$ | async) === true\">\n {{ 'datepicker.selectedDates' | finLocalization }}:\n {{ selectedDeparture$ | async | finDateFormat: 'dd.MM.yyyy' | finEmpty }},\n {{ selectedReturn$ | async | finDateFormat: 'dd.MM.yyyy' | finEmpty }}\n </span>\n <table class=\"aircalendar-table center align-center\" [class.booking]=\"isBookingCalendar\">\n <caption class=\"is-vishidden\" data-testid=\"price-matrix-table-caption\">\n {{\n (isBookingCalendar ? 'airCalendar.title' : 'MMB.view.changeFlightsModal.tableCaption') | finLocalization\n }}\n </caption>\n <col *ngIf=\"isBookingCalendar && showReturn && showDeparture\" span=\"1\" class=\"left-side-filler\" />\n <tr *ngIf=\"isBookingCalendar\">\n <th *ngIf=\"showReturn && showDeparture\" scope=\"col\" colspan=\"2\" class=\"grey-100-bg\"></th>\n <!-- horizontal blue line -->\n <th colspan=\"7\" scope=\"col\" class=\"nordic-blue-900-bg white-text tr-xsmall align-left\">\n <div class=\"nowrap medium-type pr-xxsmall-l ps-xxsmall-y departure-date-title font-body-1\">\n <fcom-icon class=\"icon-medium flex--nogrow\" [name]=\"SvgLibraryIcon.DEPARTURE\"></fcom-icon>\n <span class=\"ms-xxsmall-l\">\n {{ 'bookingSearch.boundSelection.departureDate' | finLocalization }}\n </span>\n </div>\n </th>\n </tr>\n <tr>\n <th *ngIf=\"isBookingCalendar && showReturn && showDeparture\" scope=\"col\" colspan=\"2\" class=\"grey-100-bg\"></th>\n <th *ngIf=\"!isBookingCalendar\" scope=\"col\" class=\"border font-body-2 nordic-blue-900-text capitalize font-body-2\">\n <div class=\"ps-xxsmall-y\" [ngClass]=\"{ 'border-bottom': showDeparture && showReturn }\" *ngIf=\"showDeparture\">\n <span class=\"dn-laptop-down\" data-testid=\"price-matrix-departure-label\">{{\n (isBookingCalendar ? 'bookingSearch.departure' : 'MMB.view.changeFlightsModal.departure') | finLocalization\n }}</span>\n <fcom-icon class=\"icon-small dn-laptop dn-desktop\" [name]=\"SvgLibraryIcon.DEPARTURE\"></fcom-icon>\n <fcom-icon class=\"icon-small\" [name]=\"SvgLibraryIcon.CHEVRON_RIGHT\"></fcom-icon>\n </div>\n <div class=\"ps-xxsmall-y\" *ngIf=\"showReturn\">\n <span class=\"dn-laptop-down\" data-testid=\"price-matrix-return-label\">{{\n (isBookingCalendar ? 'bookingSearch.return' : 'MMB.view.changeFlightsModal.return') | finLocalization\n }}</span>\n\n <fcom-icon class=\"icon-small dn-laptop dn-desktop\" [name]=\"SvgLibraryIcon.ARRIVAL\"></fcom-icon>\n <fcom-icon\n *ngIf=\"showReturn && showDeparture\"\n class=\"icon-small\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n <fcom-icon\n *ngIf=\"showReturn && !showDeparture\"\n class=\"icon-small\"\n [name]=\"SvgLibraryIcon.CHEVRON_RIGHT\"\n ></fcom-icon>\n </div>\n </th>\n <th\n scope=\"col\"\n *ngFor=\"let departureDate of departureDates\"\n class=\"border ps-xxsmall-y\"\n [ngClass]=\"{\n 'nordic-blue-50-bg': (selectedDeparture$ | async) === departureDate,\n 'grey-100-bg': isBookingCalendar && showDeparture && (selectedDeparture$ | async) !== departureDate,\n }\"\n >\n <ng-container [ngTemplateOutlet]=\"dateBlock\" [ngTemplateOutletContext]=\"{ date: departureDate }\"></ng-container>\n </th>\n </tr>\n <tr *ngFor=\"let returnDate of returnDates; let row = index; let first = first\">\n <!-- vertical blue box -->\n <th\n *ngIf=\"isBookingCalendar && showReturn && showDeparture && first\"\n rowspan=\"7\"\n scope=\"row\"\n class=\"relative nordic-blue-900-bg white-text tr-xsmall return-date-title left-side-filler font-body-1\"\n >\n <div class=\"absolute nowrap medium-type tr-xsmall medium-type pr-xsmall-r\">\n <fcom-icon class=\"icon-medium flex--nogrow\" [name]=\"SvgLibraryIcon.ARRIVAL\"></fcom-icon>\n <span class=\"ms-xxsmall-l\">\n {{ 'bookingSearch.boundSelection.returnDate' | finLocalization }}\n </span>\n </div>\n </th>\n <th\n *ngIf=\"!isBookingCalendar || showReturn\"\n scope=\"row\"\n class=\"border ps-xxsmall-y\"\n [ngClass]=\"{\n 'nordic-blue-50-bg': (selectedReturn$ | async) === returnDate && (selectedReturn$ | async) !== '',\n 'grey-100-bg':\n isBookingCalendar &&\n showDeparture &&\n (selectedReturn$ | async) !== returnDate &&\n (selectedReturn$ | async) !== '',\n }\"\n >\n <ng-container [ngTemplateOutlet]=\"dateBlock\" [ngTemplateOutletContext]=\"{ date: returnDate }\"></ng-container>\n </th>\n <td\n class=\"day-price border font-body-2 ps-small-t ps-small-b\"\n [ngClass]=\"{\n 'nordic-blue-900-bg white-text':\n !isBookingCalendar &&\n (selectedReturn$ | async) === returnDate &&\n (selectedDeparture$ | async) === departureDate,\n 'nordic-blue-50-bg nordic-blue-900-text':\n (((selectedDeparture$ | async) === departureDate && (selectedReturn$ | async) >= returnDate) ||\n ((selectedReturn$ | async) !== '' &&\n (selectedReturn$ | async) === returnDate &&\n (selectedDeparture$ | async) >= departureDate)) &&\n (!((selectedReturn$ | async) === returnDate && (selectedDeparture$ | async) === departureDate) ||\n (isBookingCalendar &&\n (selectedReturn$ | async) === returnDate &&\n (selectedDeparture$ | async) === departureDate)),\n 'nordic-blue-900-text': (selectedReturn$ | async) === '' && (selectedDeparture$ | async) !== departureDate,\n 'bold-type selected':\n isBookingCalendar &&\n (selectedReturn$ | async) === returnDate &&\n (selectedDeparture$ | async) === departureDate,\n 'heather-700-text bold-type':\n isBookingCalendar &&\n cheapestPrice.toString() === (pricesForDates | finMap: [departureDate, returnDate] | finMap: 'amount'),\n }\"\n *ngFor=\"let departureDate of departureDates; let column = index\"\n [tabIndex]=\"0\"\n (keyup.space)=\"selectDate(departureDate, returnDate)\"\n (keyup.enter)=\"selectDate(departureDate, returnDate)\"\n (click)=\"selectDate(departureDate, returnDate)\"\n >\n {{\n isAward\n ? (pricesForDates\n | finMap: [departureDate, returnDate]\n | finMap: 'amount'\n | finPoints: true\n | finEmpty: '-')\n : (pricesForDates\n | finMap: [departureDate, returnDate]\n | finPrice: { abbreviate: isBookingCalendar }\n | finEmpty: '-')\n }}\n </td>\n </tr>\n </table>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { AirCalendarList, FinnairAirCalendarChangeListResponse, FinnairOrder } from '@fcom/dapi/api/models';\nimport { LocalDate, isPresent, rangeFrom } from '@fcom/core/utils';\nimport { Amount } from '@fcom/dapi';\n\nimport { GtmService } from '../../gtm';\nimport { GaContext, ElementTypes, ElementActions } from '../../interfaces';\nimport { isBookingCalendarList, isChangeItinerary } from '../../utils';\n\nenum GtmDateAvailability {\n AVAILABLE = 'available',\n UNAVAILABLE = 'unavailable',\n}\n\ninterface MatrixPrices {\n [departure: string]: {\n [arrival: string]: Amount;\n };\n}\n\n@Component({\n selector: 'fin-price-matrix',\n templateUrl: './price-matrix.component.html',\n styleUrls: ['./price-matrix.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PriceMatrixComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() isAward = false;\n @Input() calendarList: FinnairAirCalendarChangeListResponse | AirCalendarList;\n @Input() order?: FinnairOrder;\n\n @Output() selectedDates = new EventEmitter<{ dates: [string, string]; price?: Amount }>();\n\n selectedDeparture$: BehaviorSubject<string> = new BehaviorSubject<string>(null);\n selectedReturn$: BehaviorSubject<string> = new BehaviorSubject<string>(null);\n announceDates$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n showDeparture = false;\n showReturn = false;\n departureDates: string[];\n returnDates: string[];\n pricesForDates: MatrixPrices;\n isBookingCalendar: boolean;\n cheapestPrice: number;\n\n constructor(private gtmService: GtmService) {}\n\n ngOnInit(): void {\n this.isBookingCalendar = isBookingCalendarList(this.calendarList);\n const itinerary = this.isBookingCalendar\n ? (this.calendarList as AirCalendarList).finnairSearchParameters.itinerary\n : (this.calendarList as FinnairAirCalendarChangeListResponse).searchParameters.itinerary;\n const isChangeCalendar = isChangeItinerary(itinerary);\n\n this.showDeparture = isChangeCalendar ? itinerary[0]?.toChange : isPresent(itinerary[0]);\n this.showReturn = isChangeCalendar ? itinerary[1]?.toChange : isPresent(itinerary[1]);\n\n const departureDate = isChangeCalendar\n ? itinerary.find((b) => b.toChange).departureDate\n : itinerary[0].departureDate;\n this.departureDates = this.weekFromDate(new Date(departureDate));\n this.returnDates =\n this.showDeparture && this.showReturn ? this.weekFromDate(new Date(itinerary[1].departureDate)) : [''];\n\n this.pricesForDates = this.getMatrixPrices(this.calendarList, isChangeCalendar, this.isAward);\n this.cheapestPrice =\n isPresent(this.calendarList?.airCalendars) &&\n Math.min(...this.calendarList.airCalendars.map((item) => (this.isAward ? +item.totalPoints : +item.totalPrice)));\n\n const initialDeparture = this.departureDates[3];\n const initialReturn = this.returnDates[3] ?? '';\n this.selectedDeparture$.next(initialDeparture);\n this.selectedReturn$.next(initialReturn);\n const initialPrice = this.pricesForDates[initialDeparture]?.[initialReturn];\n\n if (initialPrice) {\n this.selectedDates.next({ dates: [initialDeparture, initialReturn], price: initialPrice });\n }\n\n if (isChangeCalendar) {\n const availability = initialPrice ? GtmDateAvailability.AVAILABLE : GtmDateAvailability.UNAVAILABLE;\n this.trackDateAvailability(availability);\n }\n }\n\n selectDate(departureDate: string, returnDate: string): void {\n if (this.hasPricesForDates(departureDate, returnDate)) {\n this.selectedDeparture$.next(departureDate);\n this.selectedReturn$.next(returnDate);\n this.selectedDates.next({\n dates: [departureDate, returnDate],\n price: this.isAward\n ? { amount: this.pricesForDates[departureDate][returnDate].amount, currencyCode: '' }\n : this.pricesForDates[departureDate][returnDate],\n });\n this.announceDates$.next(true);\n }\n }\n\n private weekFromDate(baseDate: Date): Array<string> {\n return rangeFrom(-3, 7).map((i) => LocalDate.forDateObj(baseDate).plusDays(i).toString());\n }\n\n private hasPricesForDates(departureDate: string, returnDate: string) {\n const departurePrices = this.pricesForDates[departureDate];\n if (departurePrices) {\n return Boolean(departurePrices[returnDate]);\n }\n return false;\n }\n\n private getMatrixPrices(\n calendarList: FinnairAirCalendarChangeListResponse | AirCalendarList,\n useBalancePrice: boolean,\n isAward = false\n ): MatrixPrices {\n return calendarList?.airCalendars?.reduce(\n (all: MatrixPrices, { arrival, balancePrice, departure, totalPrice, totalPoints }) => {\n const price: Amount = {\n amount: useBalancePrice ? balancePrice : isAward ? totalPoints : totalPrice,\n currencyCode: calendarList.currency,\n };\n\n return {\n ...all,\n [departure]: {\n ...all[departure],\n [arrival || '']: price,\n },\n };\n },\n {}\n );\n }\n\n private trackDateAvailability(availability: GtmDateAvailability): void {\n this.gtmService.trackElement(\n `view-pnr_change_dates-${availability}`,\n GaContext.MANAGE_BOOKING,\n ElementTypes.MODAL,\n undefined,\n ElementActions.VIEW,\n `recLoc-${this.order.otherInformation.analyticsToken}`\n );\n }\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { SeatMapForFlight } from '@fcom/common/interfaces/seat-map.interface';\nimport { FinnairCart, FinnairOrder, SeatInfo } from '@fcom/dapi/api/models';\n\nexport const startLoading = createAction('[SeatMapActions] LoadStart', props<{ flightId: string }>());\nexport const setNoAvailability = createAction('[SeatMapActions] SetNoAvailability', props<{ flightId: string }>());\nexport const error = createAction('[SeatMapActions] LoadError', props<{ flightId: string }>());\nexport const reset = createAction('[SeatMapActions] Reset');\nexport const clearSelections = createAction('[SeatMapActions] ClearSelections');\nexport const resetSeatSelections = createAction(\n '[SeatMapActions] ResetSeatSelections',\n props<{ cartOrOrder: FinnairCart | FinnairOrder }>()\n);\nexport const setSeatForFlight = createAction(\n '[SeatMapActions] SetSeatSelection',\n props<{ flightId: string; travelerId: string; seat: SeatInfo }>()\n);\nexport const setSeatMap = createAction('[SeatMapActions] SetSeatMap', props<{ seatMapForFlight: SeatMapForFlight }>());\nexport const loadSeatSelectionsFromCart = createAction(\n '[SeatMapActions] LoadSeatSelectionsFromCart',\n props<{ cartData: FinnairCart }>()\n);\n\nconst all = union({\n startLoading,\n setNoAvailability,\n error,\n reset,\n clearSelections,\n resetSeatSelections,\n setSeatForFlight,\n setSeatMap,\n loadSeatSelectionsFromCart,\n});\n\nexport type ActionsUnion = typeof all;\n","const { isArray } = Array;\nconst { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object;\n\n/**\n * Used in functions where either a list of arguments, a single array of arguments, or a\n * dictionary of arguments can be returned. Returns an object with an `args` property with\n * the arguments in an array, if it is a dictionary, it will also return the `keys` in another\n * property.\n */\nexport function argsArgArrayOrObject<T, O extends Record<string, T>>(args: T[] | [O] | [T[]]): { args: T[]; keys: string[] | null } {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return { args: first, keys: null };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map((key) => first[key]),\n keys,\n };\n }\n }\n\n return { args: args as T[], keys: null };\n}\n\nfunction isPOJO(obj: any): obj is object {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","<div *ngIf=\"(ondOffers$ | async)?.length > 0\" class=\"mr-large-y\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\" *ngIf=\"heading$ | async\">\n {{ heading$ | async }}\n </h2>\n\n <div class=\"ond-marketing-offers grid-col-12\">\n <div\n *ngFor=\"let ondOffer of ondOffers$ | async | slice: 0 : offerAmount; let i = index\"\n class=\"ond-marketing-offer-tile flex flex--column border rounded grey-50-bg pr-small animate-appear\"\n [ngClass]=\"\n i + 1 > offerAmount - moreOffersAmount ? 'animate-appear--' + (i - offerAmount + moreOffersAmount) : ''\n \"\n >\n <div class=\"flex-1\">\n <div class=\"light-type font-body-1 ms-xxsmall-b\">\n {{ ondOffer?.originLocationCode }} – {{ ondOffer?.destinationLocationCode }}\n </div>\n\n <div class=\"font-heading-3 nordic-blue-900-text bold-type ms-xxsmall-b\">\n {{ ondOffer.originCityName }} -\n {{ ondOffer.destinationCityName }}\n </div>\n\n <div class=\"light-type mr-small-b font-body-2\">\n {{ ondOffer?.departureDate | finDateFormat: 'FULL' }} – {{ ondOffer?.returnDate | finDateFormat: 'FULL' }}\n </div>\n\n <div class=\"mr-xsmall-b align-right\">\n <div class=\"nordic-blue-900-text light-type font-body-1 lowercase\">\n {{ 'pricesStartingFrom' | finLocalization }}\n </div>\n\n <span class=\"heather-700-text font-heading-2 bold-type\">\n {{ ondOffer?.price | finPrice: { roundPrice: true } }}\n </span>\n </div>\n </div>\n\n <button\n *ngIf=\"ondOffer.link\"\n (click)=\"navigateToUrl(ondOffer?.link)\"\n class=\"ond-marketing-offer-tile__link bold-type align-left font-body-1 nordic-blue-900-text no-underline underline-hover\"\n >\n {{ 'bookNow' | finLocalization }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </button>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"(ondOffers$ | async)?.length > offerAmount\" class=\"align-center\">\n <button class=\"btn bold-type\" (click)=\"loadMoreOffers()\">{{ 'ondMarketing.loadMore' | finLocalization }}</button>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, of } from 'rxjs';\n\nimport { OndMarketingOffer, OndPairEnhancedResponse } from '../interfaces';\nimport { OndMarketingOffersService } from '../services';\n\nconst INITIAL_OFFER_AMOUNT = 6;\nconst OFFERS_TO_LOAD_AMOUNT = 3;\n\n@Component({\n selector: 'fin-ond-marketing-offers',\n templateUrl: './ond-marketing-offers.component.html',\n styleUrls: ['./ond-marketing-offers.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OndMarketingOffersComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n originLocationCode$: Observable<string | undefined> = of(undefined);\n @Input()\n destinationLocationCode$: Observable<string | undefined> = of(undefined);\n @Input()\n links$: Observable<OndPairEnhancedResponse>;\n\n moreOffersAmount: number = OFFERS_TO_LOAD_AMOUNT;\n offerAmount: number = INITIAL_OFFER_AMOUNT;\n\n ondOffers$: Observable<OndMarketingOffer[]>;\n heading$: Observable<string>;\n\n constructor(\n private ondMarketingOffersService: OndMarketingOffersService,\n private router: Router\n ) {}\n\n ngOnInit(): void {\n this.ondOffers$ = this.ondMarketingOffersService.getOffersOrFlightData(\n this.originLocationCode$,\n this.destinationLocationCode$,\n this.links$\n );\n this.heading$ = this.ondMarketingOffersService.getHeading(\n this.originLocationCode$,\n this.destinationLocationCode$,\n this.ondOffers$,\n 'mostPopularDeals'\n );\n }\n\n loadMoreOffers(): void {\n this.offerAmount += this.moreOffersAmount;\n }\n\n navigateToUrl(url: string): void {\n if (url) {\n this.router.navigateByUrl(url);\n }\n }\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { Step } from '@fcom/common';\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { TravelType } from '@fcom/common/interfaces/booking';\n\nexport const reset = createAction('[BookingActions] Reset');\n\nexport const setStep = createAction('[BookingActions] SetStep', props<{ step: Step }>());\n\n// @todo Check do we need this because this fields was moved to the globalBooking?\nexport const selectTravelClass = createAction(\n '[BookingActions] SelectTravelClass',\n props<{ travelClass: GlobalBookingTravelClass }>()\n);\nexport const setTravelType = createAction('[BookingActions] SetTravelType', props<{ travelType: TravelType }>());\n\nconst all = union({\n reset,\n\n setStep,\n selectTravelClass,\n setTravelType,\n});\n\nexport type ActionsUnion = typeof all;\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { FareRuleCategory, FinnairCart } from '@fcom/dapi/api/models';\nimport { PartialCartFareRuleRecord } from '@fcom/dapi/interfaces/cart.interface';\n\nexport const creationStart = createAction('[CartActions] CreationStart');\nexport const creationSuccess = createAction('[CartActions] CreationSuccess', props<{ cartUrl: string }>());\nexport const creationError = createAction('[CartActions] CreationError');\nexport const loadStart = createAction('[CartActions] LoadStart');\nexport const loadError = createAction('[CartActions] LoadError');\nexport const updateStart = createAction('[CartActions] UpdateStart');\nexport const updateError = createAction('[CartActions] UpdateError');\n/**\n * The update was unsuccessful, but does not affect the whole cart\n * @type {string}\n */\nexport const updateNotCompleted = createAction('[CartActions] UpdateNotCompleted');\nexport const reset = createAction('[CartActions] Reset');\nexport const setCartData = createAction('[CartActions] SetCartData', props<{ cartData: FinnairCart }>());\nexport const isUpdatingPartialCart = createAction(\n '[CartActions] isUpdatingPartialCart',\n props<{ cartPartIds: string | string[] }>()\n);\nexport const errorUpdatingPartialCart = createAction(\n '[CartActions] ErrorUpdatingPartialCart',\n props<{ cartPartIds: string | string[] }>()\n);\nexport const clearUpdatingPartialCart = createAction(\n '[CartActions] clearUpdatingPartialCart',\n props<{ cartPartIds: string | string[] }>()\n);\nexport const acceptTerms = createAction('[CartActions] AcceptTerms');\n\nexport const fareRulesLoadStart = createAction(\n '[CartActions] FareRuleLoadStart',\n props<{ travelerId: string; category: FareRuleCategory }>()\n);\nexport const fareRulesLoadEnd = createAction(\n '[CartActions] FareRuleLoadEnd',\n props<{ travelerId: string; category: FareRuleCategory }>()\n);\nexport const fareRulesError = createAction(\n '[CartActions] FareRuleError',\n props<{ travelerId: string; category: FareRuleCategory }>()\n);\nexport const fareRulesCreateCategories = createAction(\n '[CartActions] FareRuleCreateCategory',\n props<{ travelerId: string; rules: PartialCartFareRuleRecord }>()\n);\nexport const fareRulesClear = createAction('[CartActions] FareRulesClear');\n\nexport const all = union({\n creationStart,\n creationSuccess,\n creationError,\n loadStart,\n loadError,\n updateStart,\n updateError,\n updateNotCompleted,\n reset,\n setCartData,\n isUpdatingPartialCart,\n errorUpdatingPartialCart,\n clearUpdatingPartialCart,\n acceptTerms,\n fareRulesLoadStart,\n fareRulesLoadEnd,\n fareRulesError,\n fareRulesCreateCategories,\n fareRulesClear,\n});\n\nexport type ActionsUnion = typeof all;\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { Cabin, OfferList } from '@fcom/dapi/api/models';\nimport { SortBy } from '@fcom/common-booking';\nimport { FlightTimeOption } from '@fcom/common-booking/interfaces/flight-filters.interface';\nimport { OfferListFetchParams } from '@fcom/common/interfaces';\n\nexport const startLoading = createAction('[OffersActions] LoadStart');\nexport const success = createAction('[OffersActions] LoadSuccess');\nexport const error = createAction('[OffersActions] LoadError');\nexport const invalidInput = createAction('[OffersActions] InvalidInput');\nexport const noFlightsFound = createAction('[OffersActions] NoFlightsFound');\nexport const reset = createAction('[OffersActions] Reset');\nexport const setDepartureTime = createAction(\n '[OffersActions], SetDepartureTime',\n props<{ departureTime: FlightTimeOption[] }>()\n);\n\nexport const resetDepartureTime = createAction('[OffersActions], ResetDepartureTime');\nexport const setArrivalTime = createAction(\n '[OffersActions], SetArrivalTime',\n props<{ arrivalTime: FlightTimeOption[] }>()\n);\n\nexport const resetArrivalTime = createAction('[OffersActions], ResetArrivalTime');\n\nexport const setStopsCount = createAction('[OffersActions], SetStopsCount', props<{ stopsCount: number }>());\n\nexport const resetStopsCount = createAction('[OffersActions], ResetStopsCount');\n\nexport const setCabin = createAction('[OffersActions], SetCabin', props<{ cabin: Cabin }>());\n\nexport const resetCabin = createAction('[OffersActions], ResetCabin');\nexport const resetAllFilters = createAction('[OffersActions] ResetAllFilters', props<{ keepCabin?: boolean }>());\nexport const setOffers = createAction('[OffersActions] SetOffers', props<{ offers: OfferList }>());\nexport const offerSetLastRequestParams = createAction(\n '[OfferActions] SetLastRequestParams',\n props<{ params: OfferListFetchParams }>()\n);\nexport const setOutboundId = createAction('[OfferActions] SetOutboundId', props<{ outboundId: string }>());\nexport const setOutboundFareFamily = createAction(\n '[OfferActions] SetOutboundFareFamily',\n props<{ outboundFareFamily: string }>()\n);\nexport const setInboundId = createAction('[OfferActions] SetInboundId', props<{ inboundId: string }>());\nexport const setInboundFareFamily = createAction(\n '[OfferActions] SetInboundFareFamily',\n props<{ inboundFareFamily: string }>()\n);\nexport const setSortBy = createAction('[OfferActions] SetSortBy', props<{ sortBy: SortBy }>());\n\nconst all = union({\n startLoading,\n success,\n error,\n invalidInput,\n noFlightsFound,\n reset,\n setOffers,\n offerSetLastRequestParams,\n setOutboundId,\n setOutboundFareFamily,\n setInboundId,\n setInboundFareFamily,\n setSortBy,\n resetAllFilters,\n setDepartureTime,\n resetDepartureTime,\n setArrivalTime,\n resetArrivalTime,\n setStopsCount,\n resetStopsCount,\n setCabin,\n resetCabin,\n});\n\nexport type ActionsUnion = typeof all;\n","<div\n [formGroup]=\"parentForm\"\n class=\"autocomplete-container ms-xlarge-b\"\n [class.theme-web2]=\"theme === AutocompleteTheme.WEB_2\"\n>\n <div class=\"relative ps-xxsmall-b\" matAutocompleteOrigin #origin=\"matAutocompleteOrigin\">\n <label\n class=\"font-body-1 flex ps-xxsmall-b\"\n [for]=\"controlName\"\n [ngClass]=\"{\n 'grey-600-text': !(ctrlField.invalid && ctrlField.touched) && theme === AutocompleteTheme.DEFAULT,\n 'nordic-blue-400-text': !(ctrlField.invalid && ctrlField.touched) && theme === AutocompleteTheme.WEB_2,\n 'error-900-text': ctrlField.invalid && ctrlField.touched,\n }\"\n >\n <div class=\"flex-1\">\n {{ translationPrefix + '.label' | finLocalization }}\n <span *ngIf=\"isRequired\" class=\"flex-1 flex--nogrow\"> *</span>\n </div>\n </label>\n <div class=\"absolute loader\" *ngIf=\"loading$ | async\">\n <fin-loader [type]=\"LoaderType.INLINE_TEXT\"></fin-loader>\n </div>\n <input\n class=\"font-body-1\"\n autocomplete=\"off\"\n [class.form-field-empty]=\"!(ctrlField.value || placeHolder)\"\n [formControlName]=\"controlName\"\n [id]=\"controlName\"\n [matAutocomplete]=\"auto\"\n [attr.placeholder]=\"placeHolder ? (placeHolder | finLocalization) : null\"\n [matAutocompleteConnectedTo]=\"origin\"\n [name]=\"controlName\"\n [ngClass]=\"{\n 'medium-type': theme === AutocompleteTheme.WEB_2,\n 'ps-small': theme === AutocompleteTheme.WEB_2,\n 'rounded-large': theme === AutocompleteTheme.WEB_2,\n }\"\n />\n <span class=\"divider\" *ngIf=\"theme !== AutocompleteTheme.WEB_2\"></span>\n </div>\n <div *ngIf=\"ctrlField.invalid && ctrlField.touched\" class=\"error-label error-900-text font-body-2\">\n <span *ngIf=\"ctrlField.errors?.required\">\n {{ translationPrefix + '.required' | finLocalization }}\n </span>\n <span *ngIf=\"ctrlField.errors?.forbiddenFormat || ctrlField.errors?.forbiddenLocation\">\n {{ translationPrefix + '.pattern' | finLocalization }}\n </span>\n </div>\n</div>\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n [displayWith]=\"displayLocation\"\n class=\"locations-autocomplete shadow font-body-1\"\n>\n <mat-option *ngFor=\"let option of options$ | async\" [value]=\"option\"\n >({{ option.locationCode }}) {{ option.title }}</mat-option\n >\n</mat-autocomplete>\n<div aria-live=\"polite\" class=\"result-helper is-vishidden\">\n <span tabindex=\"-1\" *ngIf=\"(loading$ | async) === false && (optionsAmount$ | async) as results\">\n {{ 'SERVICE_FORMS.NTServiceForms.helpers.autocomplete.results' | finLocalization: { amount: results } }}\n </span>\n <span tabindex=\"-1\" *ngIf=\"(loading$ | async) === false && (optionsAmount$ | async) === undefined\">\n {{ 'SERVICE_FORMS.NTServiceForms.helpers.autocomplete.noResults' | finLocalization }}\n </span>\n <div *ngIf=\"ctrlField.invalid && ctrlField.touched\">\n <span *ngIf=\"ctrlField.errors?.required\" tabindex=\"-1\">\n {{ translationPrefix + '.required' | finLocalization }}\n </span>\n <span *ngIf=\"ctrlField.errors?.forbiddenFormat || ctrlField.errors?.forbiddenLocation\" tabindex=\"-1\">\n {{ translationPrefix + '.pattern' | finLocalization }}\n </span>\n </div>\n</div>\n","import { AfterViewInit, Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { MatAutocompleteTrigger } from '@angular/material/autocomplete';\n\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LoaderType } from '@fcom/common/';\nimport { Location } from '@fcom/core-api';\nimport { unsubscribe } from '@fcom/core/utils';\n\nexport enum AutocompleteTheme {\n DEFAULT = 'default',\n WEB_2 = 'web-2',\n}\n\n@Component({\n selector: 'fin-locations-autocomplete',\n templateUrl: 'locations-autocomplete.component.html',\n styleUrls: ['./locations-autocomplete.component.scss'],\n})\nexport class LocationsAutocompleteComponent implements OnInit, AfterViewInit, OnDestroy {\n @ViewChild(MatAutocompleteTrigger, { static: true }) trigger;\n\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n inputLabel: string;\n\n @Input()\n inputType: string;\n\n @Input()\n placeHolder: string = null;\n\n @Input()\n options$: Subject<Location[]> = new Subject();\n\n @Input()\n loading$: Subject<boolean>;\n\n @Input()\n theme = AutocompleteTheme.DEFAULT;\n\n public readonly LoaderType = LoaderType;\n readonly AutocompleteTheme = AutocompleteTheme;\n optionsAmount$: Observable<number>;\n isRequired = false;\n\n private subscriptions: Subscription = new Subscription();\n\n constructor() {}\n\n ngAfterViewInit() {\n this.subscriptions.add(\n this.trigger.panelClosingActions.subscribe((e) => {\n if (!e?.source) {\n this.ctrlField.setValue(null);\n this.trigger.closePanel();\n }\n })\n );\n }\n\n displayLocation(location?: Location): string | undefined {\n return location ? `(${location.locationCode}) ${location.title}` : undefined;\n }\n\n ngOnInit() {\n this.isRequired = this.required;\n this.optionsAmount$ = this.options$.pipe(map((options) => options.length));\n }\n\n ngOnDestroy() {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n get required() {\n return this.ctrlField.errors?.required;\n }\n\n get ctrlField() {\n return this.parentForm.get(this.controlName);\n }\n}\n","<div *ngIf=\"cards?.length > 0\" class=\"ps-xsmall-t flex\" data-testid=\"ff-cards\">\n <div *ngFor=\"let ffCard of cards\" class=\"flex flex--wrap\">\n <fcom-icon\n [class]=\"ffCard.companyCode === 'AY' ? 'icon-medium' : 'icon-small'\"\n class=\"ps-xxsmall-r\"\n [name]=\"ffCard.companyCode === 'AY' ? SvgLibraryIcon.FINNAIR_PLUS : SvgLibraryIcon.ONEWORLD_LOGO\"\n ></fcom-icon>\n <div *ngIf=\"ffCard.companyCode === 'AY'\" class=\"ps-xxsmall-r\">\n {{ 'MMB.checkIn.funnel.steps.passengers.ffMessage' | finLocalization: { ffNumber: ffCard.cardNumber } }}\n </div>\n <span *ngIf=\"ffCard.companyCode !== 'AY'\" class=\"ps-xxsmall-r\">\n {{ (ffCard.translationKey | finLocalization) + ': ' + ffCard.cardNumber }}\n </span>\n <fcom-tag\n *ngIf=\"ffCard.companyCode === 'AY' && ffCard.tierLevelName\"\n class=\"ps-xxsmall-r font-body-2 medium-type\"\n [roundingStyle]=\"TagRoundingStyle.CHIP\"\n >\n <fcom-icon [class]=\"'icon-medium'\" class=\"ps-xxsmall-r\" [name]=\"SvgLibraryIcon.FINNAIR_PLUS\"></fcom-icon>\n {{ ffCard.tierLevelName }}\n </fcom-tag>\n <div *ngIf=\"ffCard.oneWorldTierName\" data-testid=\"oneworld-tier-info\">\n <span class=\"bold-type\">one</span>world\n {{ ffCard.oneWorldTierName }}\n </div>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { TagRoundingStyle } from '../../../ui-components';\nimport { FrequentFlyerCardItemWithTranslations } from '../../interfaces/passenger.interface';\n\n@Component({\n selector: 'fin-passenger-ff-cards',\n templateUrl: './passenger-ff-cards.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PassengerFfCardsComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagRoundingStyle = TagRoundingStyle;\n\n @Input() cards: FrequentFlyerCardItemWithTranslations[];\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { setIn } from '@fcom/core/utils';\n\nimport { BookingWidgetActions } from '../actions';\nimport { BookingWidgetState, NotificationWarning, WidgetTab } from '../../interfaces';\n\nexport const initialState: BookingWidgetState = {\n instantSearchMonitoring: {},\n prices: {},\n warnings: {},\n activeTab: WidgetTab.FLIGHT,\n};\n\nexport function bookingWidgetReducer(\n state: BookingWidgetState = initialState,\n action: BookingWidgetActions.BookingWidgetActionsUnion\n): BookingWidgetState {\n return stateReducer(state, action);\n}\n\nconst stateReducer = createReducer(\n initialState,\n on(BookingWidgetActions.clearState, () => ({ ...initialState })),\n on(BookingWidgetActions.setInstantSearchMonitoring, (state, { instantSearchMonitoring }) =>\n setIn(state, 'instantSearchMonitoring', instantSearchMonitoring)\n ),\n on(BookingWidgetActions.resetPrices, (state) => setIn(state, 'prices', initialState.prices)),\n on(BookingWidgetActions.setFullYearPrices, (state, { prices }) => setIn(state, 'prices.fullYear', prices)),\n on(BookingWidgetActions.setFollowingMonthPrices, (state, { prices }) =>\n setIn(state, 'prices.followingMonth', prices)\n ),\n on(BookingWidgetActions.setHistogramPrices, (state, { prices }) => setIn(state, 'prices.histogram', prices)),\n on(BookingWidgetActions.setNotificationWarning, (state, { key, isActive, data }) =>\n setIn(state, 'warnings', { ...state.warnings, [key]: { isActive, data } })\n ),\n on(BookingWidgetActions.clearNotificationWarning, (state, { key }) => {\n const { [key]: _, ...updatedWarnings } = state.warnings;\n return setIn(state, 'warnings', updatedWarnings);\n }),\n on(BookingWidgetActions.setAirCalendarPrices, (state, { prices }) => setIn(state, 'prices.airCalendar', prices)),\n on(BookingWidgetActions.clearServiceNotificationWarnings, (state) => {\n const {\n [NotificationWarning.NO_FLIGHTS]: _,\n [NotificationWarning.SEASONAL_ROUTE]: __,\n [NotificationWarning.NO_AWARD_FLIGHTS]: ___,\n [NotificationWarning.NO_FLIGHTS_FOR_ROUTE]: ____,\n [NotificationWarning.NO_AWARD_FLIGHTS_FOR_ROUTE]: _____,\n ...updatedWarnings\n } = state.warnings;\n return setIn(state, 'warnings', updatedWarnings);\n }),\n on(BookingWidgetActions.clearNoFlightsNotificationWarnings, (state) => {\n const {\n [NotificationWarning.NO_FLIGHTS]: _,\n [NotificationWarning.NO_AWARD_FLIGHTS]: __,\n [NotificationWarning.NO_FLIGHTS_FOR_ROUTE]: ___,\n [NotificationWarning.NO_AWARD_FLIGHTS_FOR_ROUTE]: ____,\n ...updatedWarnings\n } = state.warnings;\n return setIn(state, 'warnings', updatedWarnings);\n }),\n on(BookingWidgetActions.setActiveTab, (state, { activeTab }) => setIn(state, 'activeTab', activeTab))\n);\n","export interface NewsletterSignupPayload {\n firstName: string;\n lastName: string;\n email: string;\n country: string;\n language: string;\n pageUrl: string;\n source?: NewsLetterSource;\n marketingNewsletter?: boolean;\n advertising?: boolean;\n}\n\nexport enum NewsLetterSource {\n NEWSLETTER_FORM = 'newsletter_form',\n BOOKING_FLOW = 'Booking_flow',\n}\n\nexport interface NewsletterSignupResponse {\n message: string;\n}\n","<div [class.active]=\"(visible && position === ButtonPosition.GRID) || position === ButtonPosition.GRID_FULL\">\n <div\n class=\"cta-host\"\n [class.visible]=\"visible\"\n [ngClass]=\"{\n grid:\n position === ButtonPosition.GRID ||\n position === ButtonPosition.GRID_FULL ||\n position === ButtonPosition.GRID_TWO_THIRDS_RIGHT,\n full: position === ButtonPosition.FULL,\n }\"\n >\n <div\n class=\"cta-container\"\n [ngClass]=\"{\n 'grid-col-12 grid-max-width':\n position === ButtonPosition.GRID ||\n position === ButtonPosition.GRID_FULL ||\n position === ButtonPosition.GRID_TWO_THIRDS_RIGHT,\n }\"\n >\n <div\n class=\"cta-button ps-medium-t ps-xsmall-b\"\n [ngClass]=\"{\n 'col-1-12':\n position === ButtonPosition.GRID ||\n position === ButtonPosition.GRID_FULL ||\n position === ButtonPosition.GRID_TWO_THIRDS_RIGHT,\n 'sm-col-2-7 md-col-2-8': position === ButtonPosition.GRID,\n 'md-col-5-12': position === ButtonPosition.GRID_TWO_THIRDS_RIGHT,\n 'sm-col-3-10 xl-col-4-9': position === ButtonPosition.GRID_FULL,\n disabled: disabled,\n }\"\n data-testid=\"cta-button\"\n >\n <div\n class=\"cta-flex white-text font-body-1 nordic-blue-900-bg flex flex--center rounded-medium shadow\"\n [ngClass]=\"{ 'flex--column': layout === ButtonLayout.COLUMN }\"\n data-testid=\"cta-button-content\"\n >\n <div class=\"flex-1 flex--basis0 fill\">\n <div class=\"ps-xxsmall-x ps-xxsmall-t fill align-center\">\n <ng-content></ng-content>\n </div>\n </div>\n <div\n class=\"flex-1 flex--basis0 flex fill ps-xsmall\"\n [class.flex--row-reverse]=\"isTabletUp\"\n [class.flex--column]=\"!isTabletUp\"\n >\n <fcom-button\n class=\"ps-xxsmall fill\"\n data-testid=\"cta-main-button\"\n [disabled]=\"disabled\"\n [loading]=\"loading\"\n [aria]=\"{ loadingLabel: 'actions.loading' | finLocalization }\"\n [text]=\"title\"\n [theme]=\"theme\"\n [mode]=\"ButtonMode.FILL\"\n [icon]=\"icon\"\n (clickBtn)=\"buttonClicked.emit($event)\"\n ></fcom-button>\n <fcom-button\n *ngIf=\"showSecondaryButton\"\n class=\"ps-xxsmall fill\"\n data-testid=\"cta-secondary-button\"\n [disabled]=\"secondaryButtonDisabled\"\n [aria]=\"{ loadingLabel: 'actions.loading' | finLocalization }\"\n [loading]=\"loading\"\n [text]=\"secondaryButtonTitle\"\n [theme]=\"ButtonTheme.DARK_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n (clickBtn)=\"secondaryButtonClicked.emit($event)\"\n ></fcom-button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { ButtonIcon, ButtonMode, ButtonTheme } from '../button/index';\nimport { ButtonLayout, ButtonPosition } from './enums';\n\n/**\n * This component contains the cta button used during booking flows.\n *\n * @example\n * <b>Example with basic options</b>\n *\n * <code>\n * <pre>\n * <fcom-cta-button\n * [position]=\"position\"\n * [visible]=\"visible\"\n * [title]=\"title\"\n * [disabled]=\"disabled\"\n * (buttonClicked)=\"click($event)\">\n * <span [innerHTML]=\"content\"></span>\n * </fcom-cta-button>\n * </pre>\n * </code>\n */\n@Component({\n selector: 'fcom-cta-button',\n templateUrl: './cta-button.component.html',\n styleUrls: ['./cta-button.component.scss'],\n})\nexport class CtaButtonComponent {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonMode = ButtonMode;\n readonly ButtonPosition = ButtonPosition;\n readonly ButtonLayout = ButtonLayout;\n\n /**\n * The text to display in the button\n */\n @Input() title: string;\n\n @Input() secondaryButtonTitle: string;\n\n @Input() showSecondaryButton = false;\n\n /**\n * Whether the button should be visible or hidden (but still in the dom)\n */\n @Input() visible = true;\n\n /**\n * Disables the buttons\n */\n @Input() disabled = false;\n\n @Input() secondaryButtonDisabled = false;\n\n @Input() isTabletUp = false;\n\n @Input() loading = false;\n\n @Input() icon: ButtonIcon;\n\n @Input() theme: ButtonTheme = ButtonTheme.LIGHT_PRIMARY_CTA_HEATHER;\n\n /**\n * Controls the positioning of the button\n */\n @Input() position: ButtonPosition = ButtonPosition.GRID;\n\n @Input() layout: ButtonLayout = ButtonLayout.ROW;\n\n @Output() buttonClicked: EventEmitter<Event> = new EventEmitter<Event>();\n\n @Output() secondaryButtonClicked: EventEmitter<Event> = new EventEmitter<Event>();\n}\n","export enum Stage {\n LOGIN = '',\n LOADING = 'loading',\n PASSENGERS = 'passengers',\n FLIGHTS = 'flights',\n REVIEW = 'review',\n PROCESSING = 'processing',\n SUCCESS = 'success',\n ERROR = 'error',\n}\n","<ng-container *ngIf=\"visibility$ | async\">\n <button\n (click)=\"openModal($event)\"\n class=\"nordic-blue-900-text ps-large-x ps-xsmall-y bold font-body-1 nordic-blue-50-bg rounded-top-medium\"\n >\n {{ 'feedback.buttonTitle' | finLocalization }}\n </button>\n\n <fin-qualtrics\n *ngIf=\"feedbackSurvey$ | async as survey\"\n [survey]=\"survey\"\n [open]=\"openSurveyTrigger$ | async\"\n (openChange)=\"openSurveyTrigger$.next($event)\"\n >\n </fin-qualtrics>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core';\nimport { Event, NavigationEnd, Router } from '@angular/router';\n\nimport { combineLatest, Observable, of, startWith, Subject } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare } from '@fcom/rx';\nimport { pathIsWithinHardcodedPath } from '@fcom/core/utils/app-url-utils';\nimport { RootPaths } from '@fcom/core/constants';\n\nimport { getQualtricsUrl, QualtricsSurvey } from '../../qualtrics/qualtrics.utils';\nimport { FeedbackService } from '../../services/feedback/feedback.service';\nimport { MediaQueryService } from '../../services';\n\n@Component({\n selector: 'fin-feedback-widget',\n templateUrl: './feedback-widget.component.html',\n styleUrls: ['./feedback-widget.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FeedbackWidgetComponent implements OnInit, OnDestroy {\n qualtricsUrl$: Observable<string>;\n removeGlobalListener: Function;\n openSurveyTrigger$: Subject<boolean> = new Subject();\n visibility$: Observable<boolean>;\n feedbackSurvey$: Observable<QualtricsSurvey>;\n\n constructor(\n private languageService: LanguageService,\n private feedbackService: FeedbackService,\n private router: Router,\n private mediaQueryService: MediaQueryService\n ) {}\n\n ngOnInit(): void {\n const navigationEvent$ = this.router.events.pipe(\n filter((event: Event) => event instanceof NavigationEnd),\n startWith({ url: this.router.url } as NavigationEnd)\n );\n const canShowInViewport$ = this.mediaQueryService.isBreakpoint$('tablet_down').pipe(map((value) => !value));\n\n const canShowFeedbackButton$ = navigationEvent$.pipe(\n switchMap((event: NavigationEnd) => {\n if (\n pathIsWithinHardcodedPath(event.url, RootPaths.MANAGE_BOOKING_ROOT) ||\n pathIsWithinHardcodedPath(event.url, RootPaths.CHECK_IN_ROOT)\n ) {\n return of(true);\n }\n return canShowInViewport$;\n })\n );\n\n const serviceVisibility$ = this.feedbackService.visibility$.pipe(distinctUntilChanged(), finShare());\n this.visibility$ = canShowFeedbackButton$.pipe(switchMap((canShow) => (canShow ? serviceVisibility$ : of(false))));\n this.feedbackSurvey$ = this.feedbackService.feedbackSurvey$.pipe(distinctUntilChanged());\n\n this.qualtricsUrl$ = this.feedbackSurvey$.pipe(\n switchMap((survey) => combineLatest([this.languageService.langKey, this.languageService.translate(survey.url)])),\n map((params) => getQualtricsUrl(params[0], this.languageService.langValue, params[1]))\n );\n }\n\n ngOnDestroy(): void {\n if (this.removeGlobalListener) {\n this.removeGlobalListener();\n }\n }\n\n openModal(event: MouseEvent): void {\n event.stopPropagation();\n\n this.openSurveyTrigger$.next(true);\n }\n}\n","import { Subscription } from '../Subscription';\n\ninterface AnimationFrameProvider {\n schedule(callback: FrameRequestCallback): Subscription;\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n delegate:\n | {\n requestAnimationFrame: typeof requestAnimationFrame;\n cancelAnimationFrame: typeof cancelAnimationFrame;\n }\n | undefined;\n}\n\nexport const animationFrameProvider: AnimationFrameProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n // Clear the cancel function. The request has been fulfilled, so\n // attempting to cancel the request upon unsubscription would be\n // pointless.\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel?.(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n\n/**\n *\n * Animation Frame Scheduler\n *\n * <span class=\"informal\">Perform task when `window.requestAnimationFrame` would fire</span>\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * ## Example\n * Schedule div height animation\n * ```ts\n * // html: <div style=\"background: #0ff;\"></div>\n * import { animationFrameScheduler } from 'rxjs';\n *\n * const div = document.querySelector('div');\n *\n * animationFrameScheduler.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see a div element growing in height\n * ```\n */\n\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\n\n/**\n * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8.\n */\nexport const animationFrame = animationFrameScheduler;\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AnimationFrameScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction<any>): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n let flushId;\n if (action) {\n flushId = action.id;\n } else {\n flushId = this._scheduled;\n this._scheduled = undefined;\n }\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nimport { SchedulerAction } from '../types';\nimport { animationFrameProvider } from './animationFrameProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AnimationFrameAction<T> extends AsyncAction<T> {\n constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction<T>, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n\n protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested animation frame and set the scheduled flag to\n // undefined so the next AnimationFrameAction will request its own.\n const { actions } = scheduler;\n if (id != null && id === scheduler._scheduled && actions[actions.length - 1]?.id !== id) {\n animationFrameProvider.cancelAnimationFrame(id as number);\n scheduler._scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nimport { MonoTypeOperatorFunction, SchedulerLike } from '../types';\n\n/**\n * Ignores source values for `duration` milliseconds, then emits the most recent\n * value from the source Observable, then repeats this process.\n *\n * <span class=\"informal\">When it sees a source value, it ignores that plus\n * the next ones for `duration` milliseconds, and then it emits the most recent\n * value from the source.</span>\n *\n * ![](auditTime.png)\n *\n * `auditTime` is similar to `throttleTime`, but emits the last value from the\n * silenced time window, instead of the first value. `auditTime` emits the most\n * recent value from the source Observable on the output Observable as soon as\n * its internal timer becomes disabled, and ignores source values while the\n * timer is enabled. Initially, the timer is disabled. As soon as the first\n * source value arrives, the timer is enabled. After `duration` milliseconds (or\n * the time unit determined internally by the optional `scheduler`) has passed,\n * the timer is disabled, then the most recent source value is emitted on the\n * output Observable, and this process repeats for the next source value.\n * Optionally takes a {@link SchedulerLike} for managing timers.\n *\n * ## Example\n *\n * Emit clicks at a rate of at most one click per second\n *\n * ```ts\n * import { fromEvent, auditTime } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(auditTime(1000));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttleTime}\n *\n * @param duration Time to wait before emitting the most recent source value,\n * measured in milliseconds or the time unit determined internally by the\n * optional `scheduler`.\n * @param scheduler The {@link SchedulerLike} to use for managing the timers\n * that handle the rate-limiting behavior.\n * @return A function that returns an Observable that performs rate-limiting of\n * emissions from the source Observable.\n */\nexport function auditTime<T>(duration: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction<T> {\n return audit(() => timer(duration, scheduler));\n}\n","import { Subscriber } from '../Subscriber';\nimport { MonoTypeOperatorFunction, ObservableInput } from '../types';\n\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Ignores source values for a duration determined by another Observable, then\n * emits the most recent value from the source Observable, then repeats this\n * process.\n *\n * <span class=\"informal\">It's like {@link auditTime}, but the silencing\n * duration is determined by a second Observable.</span>\n *\n * ![](audit.svg)\n *\n * `audit` is similar to `throttle`, but emits the last value from the silenced\n * time window, instead of the first value. `audit` emits the most recent value\n * from the source Observable on the output Observable as soon as its internal\n * timer becomes disabled, and ignores source values while the timer is enabled.\n * Initially, the timer is disabled. As soon as the first source value arrives,\n * the timer is enabled by calling the `durationSelector` function with the\n * source value, which returns the \"duration\" Observable. When the duration\n * Observable emits a value, the timer is disabled, then the most\n * recent source value is emitted on the output Observable, and this process\n * repeats for the next source value.\n *\n * ## Example\n *\n * Emit clicks at a rate of at most one click per second\n *\n * ```ts\n * import { fromEvent, audit, interval } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(audit(ev => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttle}\n *\n * @param durationSelector A function\n * that receives a value from the source Observable, for computing the silencing\n * duration, returned as an Observable or a Promise.\n * @return A function that returns an Observable that performs rate-limiting of\n * emissions from the source Observable.\n */\nexport function audit<T>(durationSelector: (value: T) => ObservableInput<any>): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue: T | null = null;\n let durationSubscriber: Subscriber<any> | null = null;\n let isComplete = false;\n\n const endDuration = () => {\n durationSubscriber?.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue!;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe(\n (durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))\n );\n }\n },\n () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\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 */\n\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {ElementRef, Injectable, NgZone, OnDestroy, Optional, Inject} from '@angular/core';\nimport {fromEvent, of as observableOf, Subject, Subscription, Observable, Observer} from 'rxjs';\nimport {auditTime, filter} from 'rxjs/operators';\nimport type {CdkScrollable} from './scrollable';\nimport {DOCUMENT} from '@angular/common';\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollDispatcher implements OnDestroy {\n /** Used to reference correct document/window */\n protected _document: Document;\n\n constructor(\n private _ngZone: NgZone,\n private _platform: Platform,\n @Optional() @Inject(DOCUMENT) document: any,\n ) {\n this._document = document;\n }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private readonly _scrolled = new Subject<CdkScrollable | void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n if (!this.scrollContainers.has(scrollable)) {\n this.scrollContainers.set(\n scrollable,\n scrollable.elementScrolled().subscribe(() => this._scrolled.next(scrollable)),\n );\n }\n }\n\n /**\n * De-registers a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable | void> {\n if (!this._platform.isBrowser) {\n return observableOf<void>();\n }\n\n return new Observable((observer: Observer<CdkScrollable | void>) => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription =\n auditTimeInMs > 0\n ? this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer)\n : this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n });\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementOrElementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(\n elementOrElementRef: ElementRef | HTMLElement,\n auditTimeInMs?: number,\n ): Observable<CdkScrollable | void> {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n\n return this.scrolled(auditTimeInMs).pipe(\n filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }),\n );\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementOrElementRef: ElementRef | HTMLElement): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document.defaultView || window;\n }\n\n /** Returns true if the element is contained within the provided Scrollable. */\n private _scrollableContainsElement(\n scrollable: CdkScrollable,\n elementOrElementRef: ElementRef | HTMLElement,\n ): boolean {\n let element: HTMLElement | null = coerceElement(elementOrElementRef);\n let scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) {\n return true;\n }\n } while ((element = element!.parentElement));\n\n return false;\n }\n\n /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\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\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable, NgZone, OnDestroy, Optional, Inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {auditTime} from 'rxjs/operators';\nimport {DOCUMENT} from '@angular/common';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/** Object that holds the scroll position of the viewport in each direction. */\nexport interface ViewportScrollPosition {\n top: number;\n left: number;\n}\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number} | null;\n\n /** Stream of viewport change events. */\n private readonly _change = new Subject<Event>();\n\n /** Event listener that will be used to handle the viewport change events. */\n private _changeListener = (event: Event) => {\n this._change.next(event);\n };\n\n /** Used to reference correct document/window */\n protected _document: Document;\n\n constructor(\n private _platform: Platform,\n ngZone: NgZone,\n @Optional() @Inject(DOCUMENT) document: any,\n ) {\n this._document = document;\n\n ngZone.runOutsideAngular(() => {\n if (_platform.isBrowser) {\n const window = this._getWindow();\n\n // Note that bind the events ourselves, rather than going through something like RxJS's\n // `fromEvent` so that we can ensure that they're bound outside of the NgZone.\n window.addEventListener('resize', this._changeListener);\n window.addEventListener('orientationchange', this._changeListener);\n }\n\n // Clear the cached position so that the viewport is re-measured next time it is required.\n // We don't need to keep track of the subscription, because it is completed on destroy.\n this.change().subscribe(() => (this._viewportSize = null));\n });\n }\n\n ngOnDestroy() {\n if (this._platform.isBrowser) {\n const window = this._getWindow();\n window.removeEventListener('resize', this._changeListener);\n window.removeEventListener('orientationchange', this._changeListener);\n }\n\n this._change.complete();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number; height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize!.width, height: this._viewportSize!.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a DOMRect for the viewport's bounds. */\n getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition(): ViewportScrollPosition {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const document = this._document;\n const window = this._getWindow();\n const documentElement = document.documentElement!;\n const documentRect = documentElement.getBoundingClientRect();\n\n const top =\n -documentRect.top ||\n document.body.scrollTop ||\n window.scrollY ||\n documentElement.scrollTop ||\n 0;\n\n const left =\n -documentRect.left ||\n document.body.scrollLeft ||\n window.scrollX ||\n documentElement.scrollLeft ||\n 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * This stream emits outside of the Angular zone.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document.defaultView || window;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser\n ? {width: window.innerWidth, height: window.innerHeight}\n : {width: 0, height: 0};\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\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {NgModule} from '@angular/core';\nimport {CdkFixedSizeVirtualScroll} from './fixed-size-virtual-scroll';\nimport {CdkScrollable} from './scrollable';\nimport {CdkVirtualForOf} from './virtual-for-of';\nimport {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\nimport {CdkVirtualScrollableElement} from './virtual-scrollable-element';\nimport {CdkVirtualScrollableWindow} from './virtual-scrollable-window';\n\n@NgModule({\n exports: [CdkScrollable],\n imports: [CdkScrollable],\n})\nexport class CdkScrollableModule {}\n\n/**\n * @docs-primary-export\n */\n@NgModule({\n imports: [\n BidiModule,\n CdkScrollableModule,\n CdkVirtualScrollViewport,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement,\n ],\n exports: [\n BidiModule,\n CdkScrollableModule,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement,\n ],\n})\nexport class ScrollingModule {}\n","import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\n\nfunction last<T>(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\n\nexport function popScheduler(args: any[]): SchedulerLike | undefined {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\n\nexport function popNumber(args: any[], defaultValue: number): number {\n return typeof last(args) === 'number' ? args.pop()! : defaultValue;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PipesModule } from '@fcom/common/pipes';\n\nimport { PromoCardComponent } from './promo-card.component';\nimport { IconsModule } from '../icons/icons.module';\nimport { ButtonModule } from '../buttons/button.module';\nimport { ImagesModule } from '../images/images.module';\n\n@NgModule({\n declarations: [PromoCardComponent],\n imports: [CommonModule, IconsModule, ButtonModule, ImagesModule, PipesModule],\n providers: [],\n exports: [PromoCardComponent],\n})\nexport class PromoCardModule {}\n","import { LowestPriceForFlights, TravelClassDatePrice } from '@fcom/dapi/api/models';\nimport { entrySet } from '@fcom/core/utils';\nimport { GlobalBookingTravelClass } from '@fcom/core';\n\nimport { MarketingOffer, MarketingOfferPrices } from '../interfaces';\n\nconst getMarketingOfferPrice = (\n lowestPrice: TravelClassDatePrice[],\n currencyCode: string,\n travelClass: GlobalBookingTravelClass\n): MarketingOfferPrices[] =>\n lowestPrice && lowestPrice.length > 0\n ? lowestPrice.map((price) => ({\n travelClass,\n price: {\n amount: price.price.toFixed(2),\n tripType: price.tripType,\n currencyCode,\n },\n }))\n : [];\n\n// get marketing offer for both oneway and return price\nexport const mapToMarketingOffers = (lowestPriceForFlights: LowestPriceForFlights): MarketingOffer[] => {\n return entrySet(lowestPriceForFlights.prices)\n .map((currentPrice) => {\n const originLocation = currentPrice.key;\n return entrySet(currentPrice.value)\n .map((destinationAndPrices) => {\n const destinationLocation = destinationAndPrices.key;\n const lowestPriceForEconomy = destinationAndPrices.value.travelClassPrices.filter(\n (t) => t.travelClass?.toUpperCase() === GlobalBookingTravelClass.ECONOMY\n );\n const lowestPriceForPremiumEconomy = destinationAndPrices.value.travelClassPrices.filter(\n (t) => t.travelClass?.toUpperCase() === GlobalBookingTravelClass.ECOPREMIUM\n );\n const lowestPriceForBusiness = destinationAndPrices.value.travelClassPrices.filter(\n (t) => t.travelClass?.toUpperCase() === GlobalBookingTravelClass.BUSINESS\n );\n if (\n !lowestPriceForEconomy?.length &&\n !lowestPriceForPremiumEconomy?.length &&\n !lowestPriceForBusiness?.length\n ) {\n return null;\n }\n return {\n origin: originLocation,\n destination: destinationLocation,\n airportCode: destinationAndPrices.value.to,\n prices: [\n ...getMarketingOfferPrice(\n lowestPriceForEconomy,\n destinationAndPrices.value.currency,\n GlobalBookingTravelClass.ECONOMY\n ),\n ...getMarketingOfferPrice(\n lowestPriceForPremiumEconomy,\n destinationAndPrices.value.currency,\n GlobalBookingTravelClass.ECOPREMIUM\n ),\n ...getMarketingOfferPrice(\n lowestPriceForBusiness,\n destinationAndPrices.value.currency,\n GlobalBookingTravelClass.BUSINESS\n ),\n ],\n };\n })\n .filter(Boolean);\n })\n .reduceRight((accumulator, currentValue) => accumulator.concat(currentValue), []);\n};\n","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { OperatorFunction } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsContent, CmsContentType, CmsTemplate, CmsViewType } from '@fcom/core-api';\nimport { isPresent } from '@fcom/core/utils';\n\ntype FindByType<T extends CmsContent> = OperatorFunction<CmsContent[], T>;\n\nexport const findByType = <T extends CmsContent>(viewType: CmsViewType, exactMatch = true): FindByType<T> =>\n map(\n (contents: CmsContent[]) =>\n contents.find(\n ({ viewTypeName }: T) =>\n isPresent(viewTypeName) && (exactMatch ? viewTypeName === viewType : viewTypeName.endsWith(viewType))\n ) as T\n );\n\nexport const filterWithoutType = (\n viewType: CmsViewType,\n contentKey: 'header' | 'main' | 'footer'\n): OperatorFunction<CmsTemplate, CmsTemplate> =>\n map((template: CmsTemplate) => ({\n ...template,\n [contentKey]: template[contentKey].filter((c) => c.viewTypeName !== viewType),\n }));\n\nexport const filterWithoutContentType = (\n contentType: CmsContentType,\n contentKey: 'header' | 'main' | 'footer'\n): OperatorFunction<CmsTemplate, CmsTemplate> =>\n map((template: CmsTemplate) => ({\n ...template,\n [contentKey]: template[contentKey].filter((c) => c.contentType !== contentType),\n }));\n\nexport const transformListContent = (content: string, iconNameToUse: SvgLibraryIcon): string =>\n content\n .replace(/<ul(.*?)>/g, (_, item) => `<ul${item.replace(/ class=\"(.*?)\"/, '')} class=\"no-list-style\">`)\n .replace(\n /<li([^>]*)>([\\s\\S]*?)<\\/li>/gi,\n `<li$1><div class=\"flex flex--nowrap\">\n <fcom-icon class=\"mr-xsmall-r flex--nogrow\" name=\"${iconNameToUse}\"></fcom-icon>\n <div class=\"flex-1\">$2</div>\n </div></li>`\n );\n","import { Params } from '@angular/router';\n\nimport { DdsCountrySiteType, DdsLanguage, DdsLanguageType, JsConfig } from '..';\nimport { sanitizePath } from './app-url-utils';\nimport { entrySet, isString } from './utils';\n\n/**\n * @See /modules/cms/interfaces/personalization.interface.ts\n */\nconst cmsPersonalizationParameterValues = [\n 'tier',\n 'group',\n 'aktiavisacreditcard',\n 'aktiavisalightcreditcard',\n 'p13n_test',\n 'p13n_testcontext',\n 'previewDate',\n];\n\nconst cmsPagingParameter = 'pageNum';\n\n/**\n * Example:\n *\n * http://localhost.finnair.com:5000/master-en?view=fragmentPreview&p13n_test=true&p13n_testcontext=24060#hashparam=works\n * -> { view: 'fragmentPreview', p13n_test: 'true', p13n_testcontext: '24060', hashparam: 'works' }\n *\n * @param path\n */\nconst toParams = (path: string): Params => {\n const splitted = path.split(/[#?]/);\n const paramStrings = splitted.length > 1 ? splitted.slice(1) : splitted;\n const params = paramStrings.join('&').split(/[&;]/);\n return params.reduce(function (acc, cur) {\n const parts = cur.split('=');\n acc[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);\n return acc;\n }, {});\n};\n\nexport const pathToTemplateUrl = (cmsUrl: string, path: string, viewType = 'fin-json') => {\n const queryString = path.split('?')[1];\n const pathWithoutParams = `/${path}`.replace(/\\?.*$/, '').replace(/^\\/\\//g, '/');\n const baseUrl = `${cmsUrl}${pathWithoutParams}?view=${viewType}`;\n\n if (!queryString) {\n return baseUrl;\n }\n\n const whiteListedParams = getWhitelistedCmsParamsMapped(queryString).join('&');\n\n return whiteListedParams.length > 0 ? `${baseUrl}&${whiteListedParams}` : baseUrl;\n};\n\nexport const getWhitelistedCmsParams = (query: string | Params): Params => {\n const params = isString(query) ? toParams(query) : query;\n return entrySet<string>(params)\n .filter((param) => cmsPersonalizationParameterValues.indexOf(param.key) !== -1 || param.key === cmsPagingParameter)\n .reduce((acc, param) => {\n acc[param.key] = param.value;\n return acc;\n }, {} as Params);\n};\n\nexport const getWhitelistedCmsParamsMapped = (query: string | Params): string[] => {\n return entrySet<Params>(getWhitelistedCmsParams(query)).map((param) => `${param.key}=${param.value}`);\n};\n\nconst getCmsPagingParam = (query: string): string | undefined => {\n if (!isString(query)) {\n return;\n }\n const params: Params = toParams(query);\n const pageNum = params['pageNum'];\n if (pageNum) {\n return `pageNum=${pageNum}`;\n }\n};\n\n/**\n * Add dynamic lang params to hardcoded OLDWWWSITE path from cms\n * example input link:\n * https://www.finnair.com/$OLDWWWSITE/information-services/baggage/lost-delayed-damaged-baggage/trace-your-baggage\n * @param linkString\n * @param ddsLanguage\n */\ntype EmptyString = '';\n\nexport const symbolToLangPath = (linkString: string, ddsLocale: DdsLanguage): string => {\n const ddsCountrySite: DdsCountrySiteType | EmptyString = ddsLocale ? ddsLocale.countrySite : '';\n const ddsLanguageType: DdsLanguageType | EmptyString = ddsLocale ? ddsLocale.language : '';\n return linkString.replace(/\\$OLDWWWSITE/g, `${ddsCountrySite.toLowerCase()}/${ddsLanguageType.toLowerCase()}`);\n};\n\n/**\n * Used to return a route path with whitelisted hash or query params\n * @param path\n * @param config Current JsConfig\n */\nexport function sanitizeWhiteListedPath(path: string, config: JsConfig): string {\n const basePath = sanitizePath(path);\n const whiteListedQueryParams =\n config.cmsEnv !== 'prod' && config.isCmsPreview ? getWhitelistedCmsParamsMapped(path) : [];\n const pagingParams = getCmsPagingParam(path);\n let pathWithParams = basePath;\n if (whiteListedQueryParams.length > 0) {\n pathWithParams += `?${whiteListedQueryParams.join('&')}`;\n }\n if (pagingParams) {\n const separator = whiteListedQueryParams.length ? '&' : '?';\n pathWithParams += `${separator}${pagingParams}`;\n }\n return pathWithParams;\n}\n","<div class=\"booking-summary grow flex flex--column\">\n <div\n class=\"nordic-blue-900-bg flex flex--nogrow flex--end ps-xxsmall-y booking-summary-close cf font-body-1 pr-medium-x white-text fill dn-tablet-up\"\n >\n <div class=\"flex-1 flex flex--middle\">\n <fcom-icon\n class=\"flex--nogrow ms-xsmall-r icon-medium\"\n [name]=\"onlyShowAncillaries ? SvgLibraryIcon.SHOPPING_CART : SvgLibraryIcon.INFO_OUTLINE\"\n ></fcom-icon>\n <div class=\"font-body-1 ps-medium-y\">\n <span *ngIf=\"!onlyShowAncillaries\">{{ 'services.sidebar.title' | finLocalization }}</span>\n <span *ngIf=\"onlyShowAncillaries && (currentStep$ | async)?.phase !== STEPS.ANCILLARIES.phase\">{{\n 'cart.title' | finLocalization\n }}</span>\n </div>\n </div>\n <fcom-icon-button\n class=\"flex flex--middle\"\n [icon]=\"{\n name: SvgLibraryIcon.CLOSE_DELETE,\n }\"\n [aria]=\"{\n label: 'actions.close' | finLocalization,\n }\"\n [theme]=\"IconButtonTheme.DARK_TERTIARY_GHOST\"\n (clickBtn)=\"close.emit()\"\n ></fcom-icon-button>\n </div>\n <div class=\"mobile-scroll-wrapper\">\n <div class=\"sections flex-1 fill\" *ngIf=\"!onlyShowAncillaries\">\n <fin-booking-summary-section\n (edit)=\"edit.emit(STEPS.FLIGHT_SELECTION)\"\n [editText]=\"'services.sidebar.modifySearch' | finLocalization\"\n [skipEditAlign]=\"true\"\n [title]=\"'bookingSummary.tripDetails'\"\n [trackingContext]=\"flowContext\"\n [isContent]=\"false\"\n [isChangeButton]=\"true\"\n >\n </fin-booking-summary-section>\n <fin-booking-summary-section\n (edit)=\"edit.emit(STEPS.FLIGHT_SELECTION)\"\n [innerIconClass]=\"'dark-gray-color'\"\n [innerClass]=\"'pr-small-t'\"\n [isChangeButton]=\"true\"\n [trackingContext]=\"flowContext\"\n [isDisabled]=\"(currentStep$ | async)?.phase === STEPS.FLIGHT_SELECTION.phase\"\n >\n <fin-booking-summary-flight\n *ngFor=\"let bound of currentOffer$ | async; let i = index; let first = first\"\n class=\"block ps-large-b\"\n [ngClass]=\"{\n 'ps-large-t border-top': !first,\n }\"\n [title]=\"\n 'bookingSummary.boundTitle'\n | finLocalization\n : {\n index: i + 1,\n departureCity: bound.departure.cityName,\n arrivalCity: bound.arrival.cityName,\n }\n \"\n [bound$]=\"bound | finToObservable\"\n ></fin-booking-summary-flight>\n </fin-booking-summary-section>\n </div>\n\n <div\n class=\"sections flex-1 fill\"\n *ngIf=\"\n !onlyShowAncillaries &&\n (travelers$ | async)?.length &&\n (currentStep$ | async).phase > STEPS.FLIGHT_SELECTION.phase\n \"\n >\n <fin-booking-summary-section\n [icon]=\"SvgLibraryIcon.SINGLE_PAX\"\n [title]=\"'bookingSummary.passengers'\"\n (edit)=\"edit.emit(STEPS.PAXDETAILS)\"\n [trackingContext]=\"flowContext\"\n [isDisabled]=\"(currentStep$ | async)?.phase === STEPS.PAXDETAILS.phase\"\n >\n <fin-booking-summary-traveler\n *ngFor=\"let traveler of travelers$ | finObsToArray\"\n [traveler$]=\"traveler\"\n ></fin-booking-summary-traveler>\n </fin-booking-summary-section>\n </div>\n\n <div class=\"sections flex-1 fill ancillary-summary\" *ngIf=\"hasUnpaidServices$ | async\">\n <fin-booking-summary-section\n [icon]=\"SvgLibraryIcon.FLIGHT_OFFER\"\n [title]=\"'bookingSummary.ancillaries'\"\n [isChangeButton]=\"false\"\n [isContent]=\"false\"\n [trackingContext]=\"flowContext\"\n >\n </fin-booking-summary-section>\n\n <ng-container *ngFor=\"let service$ of unpaidServices$ | finObsToArray; index as i; last as isLast\">\n <fin-booking-summary-section\n class=\"ancillary\"\n [icon]=\"(service$ | async)?.icon\"\n [isChangeButton]=\"isLast && !hideChangeButton\"\n (edit)=\"edit.emit(STEPS.ANCILLARIES)\"\n [innerClass]=\"'ancillary-' + (service$ | async)?.code\"\n [innerIconClass]=\"'dark-gray-color'\"\n [trackingContext]=\"flowContext\"\n [isDisabled]=\"onlyShowAncillaries || (currentStep$ | async)?.phase === STEPS.ANCILLARIES.phase\"\n >\n <fin-booking-summary-ancillary\n [title]=\"'ancillaries.' + (service$ | async)?.code + '.extraTitle'\"\n [service$]=\"service$\"\n ></fin-booking-summary-ancillary>\n </fin-booking-summary-section>\n </ng-container>\n </div>\n </div>\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { combineLatest, Observable, of } from 'rxjs';\nimport { delay, filter, map } from 'rxjs/operators';\n\nimport { globalBookingFlights, globalBookingSelections } from '@fcom/common/store/selectors/global-booking.selectors';\nimport { AppConstants } from '@fcom/booking/app-constants';\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { BookingAndAppState } from '@fcom/common/interfaces/booking';\nimport { Step } from '@fcom/common/interfaces';\nimport { currentOfferSelection, currentPassengers } from '@fcom/booking/store/selectors/booking-cart-state.selector';\nimport { finShare } from '@fcom/rx';\nimport { TripType } from '@fcom/core/interfaces';\nimport { IconButtonTheme, IconButtonSize } from '@fcom/ui-components';\n\nimport {\n BookingSummaryBound,\n BookingSummaryPassenger,\n BookingSummaryService,\n SummaryTripDetails,\n} from '../../interfaces';\n\n@Component({\n selector: 'fin-booking-summary',\n styleUrls: ['./booking-summary.component.scss'],\n templateUrl: './booking-summary.component.html',\n})\nexport class BookingSummaryComponent implements OnInit {\n readonly C: typeof AppConstants = AppConstants;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n\n @Output()\n close: EventEmitter<any> = new EventEmitter<any>();\n\n @Output()\n edit: EventEmitter<Step> = new EventEmitter<Step>();\n\n @Input()\n currentStep$: Observable<Step>;\n\n @Input()\n unpaidServices$: Observable<BookingSummaryService[]>;\n\n @Input()\n onlyShowAncillaries = false;\n\n @Input()\n flowContext: string;\n\n @Input()\n hideChangeButton = false;\n\n STEPS: any = BOOKING_STEPS;\n\n tripDetails$: Observable<SummaryTripDetails>;\n travelers$: Observable<BookingSummaryPassenger[]>;\n isOneWay$: Observable<boolean>;\n currentOffer$: Observable<BookingSummaryBound[]>;\n hasUnpaidServices$: Observable<boolean>;\n ctaOpenDelayPassed$: Observable<boolean>;\n\n constructor(private store$: Store<BookingAndAppState>) {\n this.tripDetails$ = this.store$.pipe(globalBookingSelections()).pipe(\n map((common) => ({\n ...common,\n travelClass: common.travelClasses.selected,\n }))\n );\n\n this.currentOffer$ = combineLatest([\n this.store$.pipe(currentOfferSelection()),\n this.store$.pipe(globalBookingFlights()),\n ]).pipe(\n filter(([offers]) => offers && Boolean(offers.length)),\n map(([offers, flights]) => {\n return offers.map((offer, index) => {\n offer.departure.cityName = flights[index].origin.cityName;\n offer.arrival.cityName = flights[index].destination.cityName;\n\n return offer;\n });\n })\n );\n\n // Passenger details from cart\n this.travelers$ = this.store$.pipe(currentPassengers(), finShare());\n // Total\n this.ctaOpenDelayPassed$ = of(true).pipe(delay(350)); // Open (height) transition + 100ms\n this.isOneWay$ = this.tripDetails$.pipe(map((details) => details.tripType === TripType.ONEWAY));\n }\n\n ngOnInit(): void {\n this.hasUnpaidServices$ = this.unpaidServices$.pipe(map((services) => services.length > 0));\n }\n}\n","import { Injectable, OnDestroy, StateKey, TransferState } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\nimport { take, tap } from 'rxjs/operators';\n\nimport { finShare } from '@fcom/rx';\n\n@Injectable()\nexport class StateTransferService implements OnDestroy {\n private requested: Map<StateKey<any>, Observable<any>>;\n\n constructor(private state: TransferState) {\n this.requested = new Map<StateKey<any>, Observable<any>>();\n }\n\n ngOnDestroy(): void {\n this.requested.clear();\n }\n\n wrapToStateCache<T>(stateKey: StateKey<T>, getter: () => Observable<T>): Observable<T> {\n if (this.state.hasKey<T>(stateKey)) {\n this.requested.delete(stateKey);\n return of(this.state.get<T>(stateKey, null));\n }\n if (this.requested.has(stateKey)) {\n return this.requested.get(stateKey);\n }\n const ret$ = getter().pipe(\n take(1),\n tap((val) => this.state.set<T>(stateKey, val)),\n finShare({ bufferSize: 1, refCount: false })\n );\n this.requested.set(stateKey, ret$);\n return ret$;\n }\n}\n","import { RouterNavigatedAction } from '@ngrx/router-store';\nimport { createAction, props, union } from '@ngrx/store';\n\nimport { FinnairOrder } from '@fcom/dapi/api/models';\nimport { DapiErrorStatus, IdAndHash } from '@fcom/dapi';\n\nimport { PassengerNameRecord } from '../store.interface';\n\nexport const loadStart = createAction('[OrderActions] LoadStart');\nexport const loadError = createAction('[OrderActions] LoadError', props<{ status: DapiErrorStatus }>());\nexport const reset = createAction('[OrderActions] Reset');\nexport const setOrderData = createAction(\n '[OrderActions] SetOrderData',\n props<{ order: FinnairOrder; keepSeatsData?: boolean }>()\n);\nexport const setOrderFetchInformation = createAction(\n '[OrderActions] SetOrderInformation',\n props<{ orderInformation: IdAndHash }>()\n);\n\nexport const setCategoryUpdating = createAction(\n '[OrderActions] SetCategoryUpdating',\n props<{ orderPartIds: string | string[] }>()\n);\n\nexport const clearCategoryUpdating = createAction(\n '[OrderActions] ClearCategoryUpdating',\n props<{ orderPartIds: string | string[] }>()\n);\n\nexport const resetCategoriesUpdating = createAction('[OrderActions] resetCategoriesUpdating');\n\nexport const setPNR = createAction('[OrderActions] SetPNR', props<{ PNR: PassengerNameRecord }>());\nexport const clearPNR = createAction('[OrderActions] ClearPNR');\nexport const acceptTerms = createAction('[OrderActions] AcceptTerms', props<{ accept: boolean }>());\n\nconst all = union({\n loadStart,\n loadError,\n reset,\n setOrderData,\n setOrderFetchInformation,\n setPNR,\n clearPNR,\n setCategoryUpdating,\n clearCategoryUpdating,\n resetCategoriesUpdating,\n acceptTerms,\n});\n\nexport type ActionsUnion = typeof all | RouterNavigatedAction;\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { PaymentStatus } from '../../interfaces';\n\nexport const setPaymentStatus = createAction('[PaymentActions] SetPaymentStatus', props<{ status: PaymentStatus }>());\nexport const setPaymentRedirectionUrl = createAction(\n '[PaymentActions] SetPaymentRedirectionUrl',\n props<{ url: string }>()\n);\n\nconst all = union({ setPaymentStatus, setPaymentRedirectionUrl });\n\nexport type ActionsUnion = typeof all;\n","import { createAction, props, union } from '@ngrx/store';\nimport { RouterNavigatedAction } from '@ngrx/router-store';\n\nimport { UpgradeOfferState } from '../store.interface';\n\nexport const setUpgradeOffer = createAction(\n '[UpgradeOfferActions] SetUpgradeOffer',\n props<{ offer: UpgradeOfferState }>()\n);\nexport const clearUpgradeOffer = createAction('[UpgradeOfferActions] ClearUpgradeOffer');\n\nconst all = union({ setUpgradeOffer, clearUpgradeOffer });\n\nexport type ActionsUnion = typeof all | RouterNavigatedAction;\n","import { OndLocationsResponse, FlightPair, OndLink, OndLocationsCountryData, OndLocationData } from '../interfaces';\n\nconst COUNTRY_CODE_LENGTH = 2;\nconst DESTINATION_CODE_LENGTH = 3;\n\nexport const OND_LINK_LIST_SLICE_SIZE = 12;\n\nexport const LOCATION_API_DEBOUNCE_TIME_MS = 200;\n\nexport const isCountryCode = (code) => code && code.length === COUNTRY_CODE_LENGTH;\n\nexport const isDestinationCode = (code) => code && code.length === DESTINATION_CODE_LENGTH;\n\nexport const transformLocationCode = (locationCode): string => {\n let code = locationCode || '';\n\n // @TODO: override master to Norway for testing purposes since int is not supported yet\n if (code === 'master') {\n code = 'no';\n }\n\n return isCountryCode(code) ? code.toLowerCase() : code.toUpperCase();\n};\n\nexport const getFlightType = (flightPair: FlightPair, complex = true): string => {\n if (flightPair.origin && flightPair.destination) {\n if ((isDestinationCode(flightPair.origin) && isDestinationCode(flightPair.destination)) || !complex) {\n return 'fromTo';\n } else if (isCountryCode(flightPair.origin) && isDestinationCode(flightPair.destination)) {\n return 'to';\n } else {\n return 'countryToCountry';\n }\n } else if (flightPair.destination) {\n return 'to';\n } else {\n if (isDestinationCode(flightPair.origin) || !complex) {\n return 'from';\n } else {\n return 'fromCountry';\n }\n }\n};\n\nexport const constructOndHeadingPath = (headingType: string, flightPair: FlightPair): string => {\n const basePath = 'ondMarketing.headings';\n return `${basePath}.${getFlightType(flightPair)}.${headingType}`;\n};\n\nexport const getLocationName = (code: string, locationData: OndLocationsResponse): string => {\n const location = locationData[code];\n\n const cityName = location ? (location as OndLocationData).cityName : '';\n const countryName = location ? (location as OndLocationsCountryData).countryName : '';\n\n return cityName ? cityName : countryName;\n};\n\nexport const replaceSpaces = (text: string, separator = '-'): string => {\n return text.replace(/[ ]/g, separator);\n};\n\nexport const encodeBraces = (text: string): string => {\n return text.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n};\n\nexport const encodeIgnoredSEOTitle = (text: string): string => {\n return encodeBraces(encodeURIComponent(replaceSpaces(text)));\n};\n\nexport const sortLinkArray = (\n linkArray: OndLink[],\n locationData: OndLocationsResponse,\n sortProperty: string\n): OndLink[] => {\n const cloneArray = linkArray.slice(0);\n cloneArray.sort((a, b) => {\n if (locationData[a.origin] && locationData[b.origin]) {\n // sort by origin first\n if (locationData[a.origin][sortProperty] < locationData[b.origin][sortProperty]) {\n return -1;\n }\n if (locationData[a.origin][sortProperty] > locationData[b.origin][sortProperty]) {\n return 1;\n }\n }\n if (a.destination && b.destination && locationData[a.destination] && locationData[b.destination]) {\n // if same origin, sort by destination\n if (locationData[a.destination][sortProperty] < locationData[b.destination][sortProperty]) {\n return -1;\n }\n if (locationData[a.destination][sortProperty] > locationData[b.destination][sortProperty]) {\n return 1;\n }\n }\n return 0;\n });\n return cloneArray;\n};\n\nexport const getCurrentCountry = (langValue: string): string => {\n return langValue.split('-')[0] !== 'master' ? langValue.split('-')[0] : 'no'; // @TODO: handle master language\n // override master to Norway for testing purposes since int is not supported yet\n};\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fin-form-fields',\n styleUrls: ['form-fields.component.scss'],\n templateUrl: 'form-fields.component.html',\n})\nexport class FormFieldsComponent {}\n","<ng-content></ng-content>\n","import {\n FareRuleCategory,\n FinnairBoundItem,\n FinnairCart,\n FinnairCorporateUserInformation,\n FinnairPassengerItem,\n} from '../api/models';\nimport { Amount } from './dapi.interface';\nimport { Prices } from './price.interface';\nimport { CartService } from './services.interface';\n\nexport enum CartStatus {\n /**\n * The cart has not been initialized\n */\n INITIAL,\n\n /**\n * A request for creating the cart is in progress loading the air offers has been initiated, but not yet completed\n */\n PENDING_CREATION,\n\n /**\n * The cart was created successfully, but not yet loaded. The cart url should be available.\n */\n CREATION_SUCCESS,\n\n /**\n * The creation of the cart failed\n */\n CREATION_ERROR,\n\n /**\n * The cart is created, but is waiting for data to be refreshed from server\n */\n PENDING,\n\n /**\n * The cart failed to load from the given location\n */\n LOAD_ERROR,\n\n /**\n * The cart has been created and is ok\n */\n OK,\n}\n\nexport interface IdAndHash {\n id: string;\n hash: string;\n orderChangeId?: string;\n}\n\nexport interface FrequentFlyerCard {\n countryCode?: string;\n companyCode: string;\n cardNumber: string;\n}\n\nexport interface CartOffer {\n id: string;\n itemId: string;\n fareFamilyCode?: string;\n fareFamilyBrandName?: string;\n newBounds: FinnairBoundItem[];\n prices: Prices;\n}\n\n// TODO: refactor these to real cart services\nexport interface CartServices {\n baggage?: { [boundId: string]: CartService[] };\n seats?: CartServiceSelections;\n lounge?: CartServiceSelections;\n meals?: CartServiceSelections;\n wifi?: CartServiceSelections;\n cover?: CartServiceSelections;\n travelComforts?: CartServiceSelections;\n pet?: CartServiceSelections;\n sport?: CartServiceSelections;\n}\n\nexport interface CartPassengersRequest {\n passengers: FinnairPassengerItem[];\n joinFinnairPlus: boolean;\n corporateCode: string;\n additionalEmails: string[];\n corporateUserInformation?: FinnairCorporateUserInformation;\n}\n\n/**\n * Seat characteristics.\n */\nexport enum SeatCharacteristics {\n EXIT = 'E',\n SEAT_AND_MEAL = 'M',\n BASSINET = 'B',\n EXTRA_LEG_SPACE = 'L',\n FRONT_ROW = 'K',\n ECO_COMFORT = 'EK',\n PREFERRED = 'O',\n FRONT_OF_CABIN = 'FC',\n WINDOW = 'W',\n AISLE = 'A',\n CENTER = 'CH',\n PREMIUM = 'Q',\n}\n\nexport interface TravelerSeatBinding {\n /**\n * The Amadeus-supplied id for the passenger, e.g., SKH-21-EXT\n * NOTE: you must specify either travelerId or travelerTid\n */\n travelerId: string;\n\n /**\n * The selected seat for a given passenger. Set to `null` to remove seat.\n */\n seatNumber: string;\n\n /**\n * Type of seats\n */\n variant: string;\n\n /**\n * The quantity of service to buy\n */\n quantity: number;\n}\n\nexport interface CartTravelerSeatBinding {\n /**\n * The Amadeus-supplied id for the passenger, e.g., SKH-21-EXT\n * NOTE: you must specify either travelerId or travelerTid\n */\n travelerId: string;\n\n /**\n * The selected seat for a given passenger. Set to `null` to remove seat.\n */\n seatNumber: string;\n\n /**\n * Type of seats\n */\n seatType: string;\n\n characteristics: SeatCharacteristics[];\n\n displayPrice: Amount;\n}\n\nexport interface TravelerBinding {\n /**\n * @see BaseService#category\n */\n category: string;\n\n /**\n * @see BaseService#subCategory\n */\n subCategory: string;\n\n /**\n * @see BaseService#variant\n */\n variant: string;\n\n /**\n * The Amadeus-supplied id for the passenger, e.g., SKH-21-EXT\n * NOTE: you must specify either travelerId or travelerTid\n */\n travelerId: string;\n\n /**\n * The quantity of service to buy\n */\n quantity: number;\n}\n\nexport interface CartServiceSelections {\n [fragmentId: string]: TravelerBinding[] | CartTravelerSeatBinding[];\n}\n\nexport enum CartPartStatus {\n OK,\n UPDATING,\n ERROR,\n}\nexport interface UpdatingCartPart {\n [isUpdatingId: string]: CartPartStatus;\n}\n\nexport interface CartFareRule {\n flightId: string;\n rule: string;\n}\n\n/**\n * Partial record of fare rules for a given category.\n * This has to be a Partial because there are as many rules as the user has clicked and fetched from the server.\n */\nexport type PartialCartFareRuleRecord = Partial<Record<FareRuleCategory, CartFareRule[]>>;\n\nexport interface CartFareRules {\n [travelerID: string]: {\n isLoading: FareRuleCategory[];\n hasError: FareRuleCategory[];\n ticketRules: PartialCartFareRuleRecord;\n };\n}\n\nexport interface CartState {\n /**\n * The current status of the cart.\n */\n cartStatus: CartStatus;\n\n /**\n * When the cart has been created, this is the URL where the cart can be fetched / updated\n */\n cartUrl?: string;\n\n /**\n * This is the actual cart data from the `GET ${cartUrl}` response.\n */\n cartData?: FinnairCart;\n\n /**\n * Ancillaries updated\n */\n dirty?: boolean;\n\n isUpdating?: UpdatingCartPart;\n\n /** Are the terms accepted? */\n acceptTerms?: boolean;\n\n /** Full ticket rules in cryptic */\n fareRules: CartFareRules;\n}\n\nexport const NO_MEAL_VARIANT = '_NOMEAL';\n\nexport const SPECIAL_MEAL_VARIANT = '_SC_MEAL';\n\nexport const NO_UPGR_MEAL_VARIANT = '_NO_UPGRML';\n\nexport const NO_WIFI_VARIANT = '_NOWIFI';\n\nexport const NO_VARIANTS = [NO_MEAL_VARIANT, NO_UPGR_MEAL_VARIANT, NO_WIFI_VARIANT];\n","import { FinnairLocation } from '../api/models';\n\nexport interface Quotas {\n [fareFamilyCode: string]: number | null;\n}\n\nexport interface LocationInfoMap {\n [id: string]: FinnairLocation;\n}\n\nexport enum BoundType {\n outbound = 'outbound',\n inbound = 'inbound',\n multi = 'multi',\n}\n\nexport interface CheapestBoundPrice {\n boundId: string;\n cheapestPrice: string;\n}\n","import { HttpErrorResponse } from '@angular/common/http';\n\nimport { RestError, StatusCode } from '../api/models';\n\nexport class DapiHttpErrorResponse extends HttpErrorResponse {\n error: DapiError;\n\n constructor(init: Partial<DapiHttpErrorResponse>) {\n super(init);\n }\n}\n\nexport interface DapiError extends Omit<RestError, 'status'> {\n level: DapiErrorLevel;\n key: DapiErrorCode;\n status: DapiErrorStatus;\n uxErrorType?: string; // Added in ux\n}\n\nexport enum DapiErrorCode {\n OFFER_NOT_FOUND = 'OFFER_NOT_FOUND',\n UNABLE_TO_RETRIEVE_OFFER = 'UNABLE_TO_RETRIEVE_OFFER',\n UNEXPECTED_ERROR = 'UNEXPECTED_ERROR',\n AMADEUS_MESSAGE = 'AMADEUS_MESSAGE',\n INVALID_HMAC = 'INVALID_HMAC',\n ORDER_NOT_FOUND = 'ORDER_NOT_FOUND',\n ORDER_GROUP_ERROR = 'ORDER_GROUP_ERROR',\n ORDER_CANCELLED = 'ORDER_ALREADY_CANCELLED',\n ORDER_GROUP_FETCH_WITH_INFANT = 'ORDER_GROUP_FETCH_WITH_INFANT_ERROR',\n GROUP_ORDER_NOT_TICKETED = 'GROUP_ORDER_NOT_TICKETED',\n ALTERNATIVE_OFFERS_NOT_FOUND = 'ALTERNATIVE_OFFERS_NOT_FOUND',\n UNABLE_TO_DISPLAY_ORDER = 'AMADEUS_UNABLE_TO_DISPLAY_ORDER_ERROR',\n SEVERAL_RECORDS_FOR_TRAVEL_DOCUMENT = 'SEVERAL_RECORDS_FOUND_FOR_TRAVEL_DOC',\n ORDER_UNEXPECTED_ERROR = 'ORDER_UNEXPECTED_ERROR',\n ORDER_TIMEOUT_ERROR = 'ORDER_TIMEOUT_ERROR',\n CHECK_IN_ACCEPT_UNRECOVERABLE_FAILURE = 'CHECK_IN_ACCEPT_UNRECOVERABLE_FAILURE',\n CHECK_IN_ACCEPT_FAILED = 'CHECK_IN_ACCEPT_FAILED',\n}\n\nexport enum DapiErrorLevel {\n ERROR = 'ERROR',\n}\n\nexport enum UXDapiError {\n GENERIC_HTTP_ERROR = 'GENERIC_HTTP_ERROR', // When we don't have status we map it to this\n}\n\nexport const DapiErrorStatus = { ...StatusCode, ...UXDapiError };\nexport type DapiErrorStatus = StatusCode | UXDapiError;\n","export enum WidgetTab {\n FLIGHT = 'flight',\n AWARD = 'award',\n AM = 'am',\n CARTRAWLER = 'carTrawler',\n}\n\nexport interface InstantSearchBaseParams {\n departureLocationCode: string;\n destinationLocationCode: string;\n numberOfDays: number;\n travelClass?: string;\n oneway?: boolean;\n adults?: number;\n children?: number;\n infants?: number;\n directFlights?: boolean;\n locale?: string;\n}\n\nexport interface InstantSearchFullYearParams extends InstantSearchBaseParams {\n startDate: string;\n}\n\nexport interface InstantSearchFollowingMonthParams extends InstantSearchBaseParams {\n departureDate: string;\n}\n","// TODO: possibly rename the file to be more generic\n\nimport { PaxAmount } from '@fcom/dapi';\n\nexport enum AmountUpdateType {\n INCREMENT,\n DECREMENT,\n}\n\n// TODO: check if needed after store integration\ninterface PaxAmountTypeMinMax {\n max: number;\n min: number;\n}\n\nexport interface PaxAmountTypeConfig {\n adults: PaxAmountTypeMinMax;\n c15s: PaxAmountTypeMinMax;\n children: PaxAmountTypeMinMax;\n infants: PaxAmountTypeMinMax;\n}\n\nexport interface PaxUpdateEvent {\n paxType: keyof PaxAmount;\n amount: number;\n updateType: AmountUpdateType;\n}\n\nexport interface AmRoomSelection {\n numberOfAdults: number;\n childrenAges: number[];\n}\n","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { NotificationTheme } from '@fcom/ui-components';\nimport { ReplaceParams } from '@fcom/core/utils';\n\nexport enum NotificationWarning {\n NO_FLIGHTS = 'noFlights',\n NO_AWARD_FLIGHTS = 'noAwardFlights',\n NO_FLIGHTS_FOR_ROUTE = 'noFlightsForRoute',\n NO_AWARD_FLIGHTS_FOR_ROUTE = 'noAwardFlightsForRoute',\n SEASONAL_ROUTE = 'seasonalRoute',\n REGULATORY = 'regulatory',\n GENERAL = 'general',\n}\n\nexport enum NotificationSpecific {\n DESTINATION_SPECIFIC = 'destinationSpecific',\n BUS_CONNECTION = 'busConnection',\n TRAIN_CONNECTION = 'trainConnection',\n AM_EARN_POINTS = 'amEarnPoints',\n MULTICITY_NOT_CONSECUTIVE = 'multiCityNotConsecutive',\n MULTICITY_MAX_NUMBER_OF_FLIGHTS = 'multiCityMaxNumberOfFlights',\n CORPORATE_USER = 'corporateUser',\n}\n\nexport type NotificationType = NotificationWarning | NotificationSpecific;\n\nexport interface NotificationData {\n type: NotificationType;\n theme: NotificationTheme;\n icon?: SvgLibraryIcon;\n isCloseable?: boolean;\n text: {\n label: string;\n params?: ReplaceParams;\n };\n text1?: {\n label: string;\n params?: ReplaceParams;\n };\n link?: {\n text: string;\n url: string;\n external?: boolean;\n openInNewTab?: boolean;\n };\n removePadding?: boolean;\n}\n\nexport interface SeasonalNotificationData {\n start?: string;\n end?: string;\n start2?: string;\n end2?: string;\n}\n","export enum GtmLocationEventType {\n INPUT = 'input',\n CLOSE = 'close',\n SELECTION = 'selection',\n}\n\nexport interface GtmPassengers {\n adults: number;\n children: number;\n infants: number;\n}\n","<div\n class=\"relative flex\"\n [ngClass]=\"{ 'image-wrapper-top': imagePosition === 'top', 'image-wrapper-left': imagePosition === 'left' }\"\n *ngIf=\"image$ | async as imageData\"\n>\n <fcom-image [ratio]=\"aspectRatio$ | async\" [scale]=\"false\" [imageData]=\"imageData\" [fillParent]=\"true\"></fcom-image>\n</div>\n<div class=\"pr-small flex flex-1 flex--column fill\" [attr.data-testid]=\"'banner-' + translationPrefix\">\n <div class=\"flex flex-1 flex--column\">\n <h2 class=\"font-heading-4 nordic-blue-900-text ms-xsmall-b\">\n {{ translationPrefix + '.title' | finLocalization }}\n </h2>\n <p>\n {{ translationPrefix + '.text' | finLocalization }}\n </p>\n </div>\n <div class=\"flex flex--end\">\n <fcom-button\n [href]=\"url\"\n [externalLink]=\"isExternalLink\"\n [openInNewTab]=\"true\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n class=\"ms-medium-t pr-small-l\"\n [text]=\"translationPrefix + '.button' | finLocalization\"\n [icon]=\"buttonIcon\"\n (clickBtn)=\"trackPromoBanner(translationPrefix)\"\n ></fcom-button>\n </div>\n</div>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\nimport { filter, map, switchMap, take } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ButtonIcon, ButtonTheme, ResponsiveImage } from '@fcom/ui-components';\n\nimport { AspectRatioString, ElementActions, ElementTypes, GaContext } from '../../interfaces';\nimport { GtmService } from '../../gtm';\nimport { MediaQueryService } from '../../services';\n\n@Component({\n selector: 'fin-promotion-banner',\n templateUrl: './promotion-banner.component.html',\n styleUrls: ['./promotion-banner.component.scss'],\n})\nexport class PromotionBannerComponent implements OnInit {\n protected readonly ButtonTheme = ButtonTheme;\n\n @Input()\n image$: Observable<ResponsiveImage>;\n\n @Input()\n aspectRatio$: Observable<AspectRatioString>;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n url: string;\n\n @Input()\n imageFromFragment: string;\n\n @Input()\n buttonIcon: ButtonIcon;\n\n @Input()\n imagePosition: 'top' | 'left' = 'top';\n\n @Input() isExternalLink?: boolean;\n\n constructor(\n private gtmService: GtmService,\n private mediaQueryService: MediaQueryService,\n private languageService: LanguageService,\n private httpClient: HttpClient\n ) {}\n loadImageFromFragment = (fragment: string): Observable<ResponsiveImage> =>\n this.languageService.translate(fragment).pipe(\n take(1),\n map((translation) => translation?.picture?.jsonUrl),\n filter(Boolean),\n switchMap((jsonUrl: string) => this.httpClient.get<ResponsiveImage>(jsonUrl))\n );\n ngOnInit(): void {\n this.aspectRatio$ = this.mediaQueryService\n .isBreakpoint$('mobile')\n .pipe(map((isMobile: boolean) => (isMobile ? '1x1' : '16x9')));\n\n if (this.imageFromFragment) {\n this.image$ = this.loadImageFromFragment(this.imageFromFragment);\n }\n }\n\n trackPromoBanner(banner: string): void {\n this.gtmService.trackElement(\n `${banner}-promotion-banner`,\n GaContext.BOOKING_FLOW,\n ElementTypes.BANNER,\n banner,\n ElementActions.CLICK\n );\n }\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nimport { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';\n\n/**\n * Converts a higher-order Observable into a first-order Observable which\n * concurrently delivers all values that are emitted on the inner Observables.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables.</span>\n *\n * ![](mergeAll.png)\n *\n * `mergeAll` subscribes to an Observable that emits Observables, also known as\n * a higher-order Observable. Each time it observes one of these emitted inner\n * Observables, it subscribes to that and delivers all the values from the\n * inner Observable on the output Observable. The output Observable only\n * completes once all inner Observables have completed. Any error delivered by\n * a inner Observable will be immediately emitted on the output Observable.\n *\n * ## Examples\n *\n * Spawn a new interval Observable for each click event, and blend their outputs as one Observable\n *\n * ```ts\n * import { fromEvent, map, interval, mergeAll } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(map(() => interval(1000)));\n * const firstOrder = higherOrder.pipe(mergeAll());\n *\n * firstOrder.subscribe(x => console.log(x));\n * ```\n *\n * Count from 0 to 9 every second for each click, but only allow 2 concurrent timers\n *\n * ```ts\n * import { fromEvent, map, interval, take, mergeAll } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(\n * map(() => interval(1000).pipe(take(10)))\n * );\n * const firstOrder = higherOrder.pipe(mergeAll(2));\n *\n * firstOrder.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link combineLatestAll}\n * @see {@link concatAll}\n * @see {@link exhaustAll}\n * @see {@link merge}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link zipAll}\n *\n * @param concurrent Maximum number of inner Observables being subscribed to\n * concurrently.\n * @return A function that returns an Observable that emits values coming from\n * all the inner Observables emitted by the source Observable.\n */\nexport function mergeAll<O extends ObservableInput<any>>(concurrent: number = Infinity): OperatorFunction<O, ObservedValueOf<O>> {\n return mergeMap(identity, concurrent);\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { getIn, isPresent } from '@fcom/core/utils';\n\n@Pipe({\n name: 'finMap',\n})\nexport class MapPipe implements PipeTransform {\n transform<T, U extends keyof T>(input: Observable<T>, selector: U | [U]): Observable<T[U]>;\n transform(input: Observable<unknown>, selector: string | string[]): Observable<any>;\n transform<T, U extends keyof T>(input: T, selector: U | [U]): T[U];\n transform(input: unknown, selector: string | string[]): any;\n transform(input: unknown, selector: string | string[]): unknown {\n if (input && typeof (input as any[]).map === 'function') {\n return (input as any[]).map((inp) => getIn(inp, selector));\n } else if (input && input instanceof Observable) {\n return input.pipe(map((inp) => getIn(inp, selector)));\n } else if (!isPresent(selector)) {\n return input;\n }\n return getIn(input, selector);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { StepperComponent } from './stepper.component';\n\n@NgModule({\n declarations: [StepperComponent],\n imports: [CommonModule, UiTranslateModule],\n exports: [StepperComponent],\n})\nexport class StepperModule {}\n","import { Injectable } from '@angular/core';\n\nimport { BehaviorSubject, delay, Observable } from 'rxjs';\n\n@Injectable()\nexport class CampaignBannerService {\n public readonly visibility$: Observable<boolean>;\n private campaignBannerVisibility$: BehaviorSubject<boolean> = new BehaviorSubject(true);\n\n constructor() {\n this.visibility$ = this.campaignBannerVisibility$.asObservable().pipe(delay(0));\n }\n\n setCampaignBannerVisibility(visibility: boolean): void {\n this.campaignBannerVisibility$.next(visibility);\n }\n}\n","import { Segment } from '../interfaces/multivariate-test.interface';\n\nexport enum QualtricsMessageTypes {\n OPTIN_RESPONSE = 'optInResponse',\n SURVEY_DONE = 'surveyDone',\n CONFSURVEY_DONE = 'confSurveyDone',\n NPS_RATING_RESPONSE = 'npsRatingResponse',\n}\n\nexport const messageAllowedForSurvey = (surveyName: string, messageType: string): boolean => {\n return messageMap[messageType].indexOf(surveyName) !== -1;\n};\n\nexport const QUALTRICS_DOMAIN = 'https://finnair.eu.qualtrics.com';\n\nexport interface QualtricsSurvey {\n name: string;\n url: string;\n}\n\ninterface QualtricsSurveyMap {\n FEEDBACK: QualtricsSurvey;\n CORPORATE_FEEDBACK: QualtricsSurvey;\n MMB_FEEDBACK: QualtricsSurvey;\n CHECK_IN: QualtricsSurvey;\n PURCHASE_FEEDBACK: QualtricsSurvey;\n AWARD_FEEDBACK: QualtricsSurvey;\n UPGRADE_FEEDBACK: QualtricsSurvey;\n PAGE_FEEDBACK: QualtricsSurvey;\n CONFIRMATION_MULTI_CITY: QualtricsSurvey;\n MULTI_CITY: QualtricsSurvey;\n}\n\nexport const QualtricsSurveys: QualtricsSurveyMap = {\n FEEDBACK: { name: 'qualtrics-feedback', url: 'feedback.generalSurveyUrl' },\n CORPORATE_FEEDBACK: { name: 'qualtrics-corporate-feedback', url: 'feedback.corporateSurveyUrl' },\n MMB_FEEDBACK: { name: 'qualtrics-mmb-feedback', url: 'feedback.mmbSurveyUrl' },\n CHECK_IN: { name: 'qualtrics-check-in-feedback', url: 'feedback.checkInSurveyUrl' },\n PURCHASE_FEEDBACK: { name: 'qualtrics-purchase-feedback', url: 'feedback.postBookingSurveyUrl' },\n CONFIRMATION_MULTI_CITY: { name: 'qualtrics-multi-city-feedback', url: 'feedback.postBookingMultiCitySurveyUrl' },\n AWARD_FEEDBACK: { name: 'qualtrics-award-feedback', url: 'feedback.postAwardBookingSurveyUrl' },\n UPGRADE_FEEDBACK: { name: 'qualtrics-upgrade-feedback', url: 'feedback.upgradeSurveyUrl' },\n PAGE_FEEDBACK: { name: 'qualtrics-page-feedback', url: 'feedback.pageSurveyUrl' },\n MULTI_CITY: { name: 'qualtrics-multi-city', url: 'feedback.multiCitySurveyUrl' },\n};\n\nconst messageMap = {\n [QualtricsMessageTypes.OPTIN_RESPONSE]: [],\n [QualtricsMessageTypes.SURVEY_DONE]: [QualtricsSurveys.FEEDBACK.name],\n [QualtricsMessageTypes.CONFSURVEY_DONE]: [QualtricsSurveys.PURCHASE_FEEDBACK.name],\n [QualtricsMessageTypes.NPS_RATING_RESPONSE]: [],\n};\n\nconst getQualtricsLanguage = (languageSite: string, fallbackLanguage: string): string => {\n switch (languageSite) {\n case 'hk-zh':\n return 'zh-t';\n case 'cn-zh':\n return 'zh-s';\n case 'es-es':\n return 'es-es';\n default:\n return fallbackLanguage;\n }\n};\n\nexport const getQualtricsUrl = (\n fallbackLanguage: string,\n languageSite: string,\n url: string,\n segment?: Segment,\n hotjarUserId?: string\n): string => {\n if (!url) {\n return null;\n }\n\n let urlWithParams = `${url}?Q_Language=${getQualtricsLanguage(languageSite, fallbackLanguage)}&Site_Locale=${languageSite}`;\n\n if (hotjarUserId) {\n urlWithParams += `&Hotjar_UserId=${hotjarUserId}`;\n }\n\n if (segment) {\n urlWithParams += `&Test_Segment=${segment}`;\n }\n\n return urlWithParams;\n};\n","<section *ngIf=\"content$ | finMap: 'tabs' | async as tabs\">\n <h3 class=\"font-heading-3\" *ngIf=\"(content$ | finMap: 'teaserTitle' | async) !== ''\">\n {{ content$ | finMap: 'teaserTitle' | async }}\n </h3>\n <div\n *ngIf=\"(content$ | finMap: 'teaserText' | async) !== null\"\n class=\"pr-medium-b\"\n [innerHTML]=\"content$ | finMap: 'teaserText' | async | finSafe: 'html'\"\n ></div>\n\n <div role=\"tablist\" class=\"tablist\">\n <div *ngFor=\"let tab of tabs\" class=\"tab flex flex--column flex--align-stretch\">\n <fcom-button\n [text]=\"tab.title\"\n [aria]=\"{\n selected: (currentTab$ | async) === tab,\n controls: 'panel-' + tab.content.segment,\n role: 'tab',\n }\"\n [removeFromNavigation]=\"(currentTab$ | async) === tab\"\n [theme]=\"\n (currentTab$ | async) === tab ? ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE : ButtonTheme.LIGHT_TERTIARY_GHOST\n \"\n [id]=\"'tab-' + tab.content.segment\"\n (click)=\"selectTab(tab)\"\n ></fcom-button>\n </div>\n </div>\n\n <div\n *ngFor=\"let tab of tabs\"\n tabindex=\"0\"\n role=\"tabpanel\"\n [id]=\"'panel-' + tab.content.segment\"\n [class.is-hidden]=\"(currentTab$ | async) !== tab\"\n [attr.aria-labelledby]=\"'tab-' + tab.content.segment\"\n [attr.aria-hidden]=\"(currentTab$ | async) !== tab\"\n >\n <fin-cms-json-content [template$]=\"{ main: [tab.content] } | finToObservable\"></fin-cms-json-content>\n </div>\n</section>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Subject, Observable, merge } from 'rxjs';\nimport { take, map } from 'rxjs/operators';\n\nimport { CmsTab, CmsTabsCollection } from '@fcom/core-api';\nimport { KeyCodes, isKeyboardEvent } from '@fcom/core/utils';\nimport { ButtonTheme } from '@fcom/ui-components';\nimport { GtmService } from '@fcom/common/gtm';\nimport { ElementActions, ElementTypes, GaContext } from '@fcom/common/interfaces';\n\n@Component({\n selector: 'cms-content-switcher-tabs',\n templateUrl: './cms-content-switcher-tabs.component.html',\n styleUrls: ['./cms-content-switcher-tabs.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsContentSwitcherTabsComponent implements OnInit {\n @Input()\n content$: Observable<CmsTabsCollection>;\n\n currentTab$: Observable<CmsTab>;\n\n readonly ButtonTheme = ButtonTheme;\n\n private currentTabSub$: Subject<CmsTab> = new Subject();\n\n constructor(private gtmService: GtmService) {}\n\n ngOnInit(): void {\n this.currentTab$ = merge(\n this.content$.pipe(\n map((c) => c.tabs[0]),\n take(1)\n ),\n this.currentTabSub$\n );\n }\n\n selectTab(tab: CmsTab): void {\n this.currentTabSub$.next(tab);\n\n this.trackElement(tab.content.segment);\n }\n\n handleKeyPress(event: KeyboardEvent, tab: HTMLButtonElement): void {\n const element: HTMLElement = this.getElement(event, tab);\n const buttonElement: HTMLButtonElement = element?.querySelector('button');\n if (buttonElement) {\n buttonElement.click();\n buttonElement.focus();\n }\n }\n\n private getElement(event: KeyboardEvent, tab: HTMLButtonElement): HTMLElement {\n const lastChild = tab.parentElement.parentElement.children[tab.parentElement.parentElement.children.length - 1];\n const firstChild = tab.parentElement.parentElement.children[0];\n\n if (isKeyboardEvent(event, KeyCodes.HOME)) {\n return firstChild as HTMLElement;\n } else if (isKeyboardEvent(event, KeyCodes.END)) {\n return lastChild as HTMLElement;\n } else if (isKeyboardEvent(event, KeyCodes.RIGHT)) {\n return (tab.parentElement.nextElementSibling || firstChild) as HTMLElement;\n } else if (isKeyboardEvent(event, KeyCodes.LEFT)) {\n return (tab.parentElement.previousElementSibling || lastChild) as HTMLElement;\n } else {\n return undefined;\n }\n }\n\n private trackElement(label: string) {\n this.gtmService.trackElement(\n `tab-${label}`,\n GaContext.CONTENT,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n }\n}\n","@if ((isFlightSelectionFiltersTestVariant$ | async) && (isMobile$ | async) === false) {\n <div class=\"combo-wrapper\">\n <fin-combo-box\n data-testid=\"sort-flights-combo-box\"\n [id]=\"'sort-flights'\"\n [label]=\"'flightSorting.labelB' | finLocalization\"\n [disableLabel]=\"isMobile$ | async\"\n [parentForm]=\"sortingForm\"\n [controlName]=\"'flightSorting'\"\n [translationPrefix]=\"'flightSorting'\"\n [options]=\"sortingSelectOptions$ | async\"\n [searchable]=\"false\"\n [noMaxHeight]=\"true\"\n [displayMargin]=\"false\"\n ></fin-combo-box>\n </div>\n} @else {\n <ng-container *ngIf=\"(isMobile$ | async) === false; else mobileSort\">\n <div data-testid=\"sorting-desktop\" class=\"mr-small-t ms-small-b\">\n <fcom-tabs\n #tabs\n [prevButtonAriaLabel]=\"'carousel.previous' | finLocalization\"\n [nextButtonAriaLabel]=\"'carousel.next' | finLocalization\"\n [theme]=\"TabTheme.CLASSIC\"\n [layoutType]=\"TabLayoutType.STRETCH\"\n (clickedTab)=\"onSortChangeFromTabs($event)\"\n >\n <fcom-tab\n *ngIf=\"showBestFlightsTab\"\n [title]=\"\n (resultsAmount === 1 ? 'flightSorting.bestFlights.singular' : 'flightSorting.bestFlights.plural')\n | finLocalization\n \"\n [data]=\"SortBy.BEST\"\n [subtitle]=\"\n shouldShowTabSubtitle\n ? ('flightSorting.flightsFrom'\n | finLocalization: { amount: { amount: bestFlightPrice, currencyCode } | finPrice })\n : '-'\n \"\n [contentPopover]=\"contentPopover\"\n [active]=\"(selectedSortBy$ | async) === SortBy.BEST\"\n >\n </fcom-tab>\n <fcom-tab\n *ngIf=\"true\"\n [title]=\"'flightSorting.lowestPrice' | finLocalization\"\n [data]=\"SortBy.PRICE\"\n [subtitle]=\"\n shouldShowTabSubtitle\n ? ('flightSorting.flightsFrom'\n | finLocalization\n : {\n amount: showPoints\n ? ('award.points' | finLocalization: { pointsAmount: lowestPrice | finPoints })\n : ({ amount: lowestPrice, currencyCode } | finPrice),\n })\n : '-'\n \"\n [active]=\"(selectedSortBy$ | async) === SortBy.PRICE\"\n >\n </fcom-tab>\n <fcom-tab\n *ngIf=\"true\"\n [title]=\"'flightSorting.fastest' | finLocalization\"\n [data]=\"SortBy.DURATION\"\n [subtitle]=\"\n shouldShowTabSubtitle\n ? ('flightSorting.flightsFrom'\n | finLocalization\n : {\n amount: showPoints\n ? ('award.points' | finLocalization: { pointsAmount: fastestFlightPrice | finPoints })\n : ({ amount: fastestFlightPrice, currencyCode } | finPrice),\n })\n : '-'\n \"\n [active]=\"(selectedSortBy$ | async) === SortBy.DURATION\"\n >\n </fcom-tab>\n </fcom-tabs>\n\n <ng-template #contentPopover>\n <h2 class=\"align-left font-body-1 bold-type nordic-blue-900-text\">\n {{ 'flightSorting.tooltip.title' | finLocalization }}\n </h2>\n <p class=\"pr-xxsmall-t regular-type align-left\">{{ 'flightSorting.tooltip.text' | finLocalization }}</p>\n </ng-template>\n </div>\n </ng-container>\n\n <ng-template #mobileSort>\n <button\n data-testid=\"sorting-mobile\"\n class=\"sort-mobile-button ms-small-y flex flex--no-wrap flex--center rounded-medium font-body-1 white-bg border nordic-blue-400-border\"\n (click)=\"openSortingModal()\"\n >\n <fcom-icon\n class=\"icon-small ms-xxsmall-l flex flex--self-center\"\n [name]=\"(isFlightSelectionFiltersTestVariant$ | async) ? SvgLibraryIcon.SORT : SvgLibraryIcon.SORT_DESCENDING\"\n ></fcom-icon>\n <span class=\"ps-small-y ps-xxsmall-l\">\n @let isFlightSelectionFiltersTestVariant = isFlightSelectionFiltersTestVariant$ | async;\n <ng-container [ngSwitch]=\"selectedSortBy$ | async\">\n <span *ngIf=\"showBestFlightsTab\">\n <span *ngSwitchCase=\"SortBy.BEST\">{{\n (isFlightSelectionFiltersTestVariant\n ? 'flightSorting.recommended.mobileLabel'\n : resultsAmount === 1\n ? 'flightSorting.bestFlights.singular'\n : 'flightSorting.bestFlights.plural'\n ) | finLocalization\n }}</span>\n </span>\n <span *ngSwitchCase=\"SortBy.PRICE\">{{\n (isFlightSelectionFiltersTestVariant ? 'flightSorting.price.mobileLabel' : 'flightSorting.lowestPrice')\n | finLocalization\n }}</span>\n <span *ngSwitchCase=\"SortBy.DURATION\">{{\n (isFlightSelectionFiltersTestVariant ? 'flightSorting.duration.mobileLabel' : 'flightSorting.fastest')\n | finLocalization\n }}</span>\n <span *ngSwitchCase=\"SortBy.DEPARTURE\">{{\n 'flightSorting.departureTime.mobileLabel' | finLocalization\n }}</span>\n </ng-container>\n </span>\n </button>\n\n <fcom-modal\n [(open)]=\"modalOpen\"\n [title]=\"'flightSorting.sortingCriteria' | finLocalization\"\n (close)=\"closeSortingModal()\"\n data-testid=\"sorting-mobile-modal\"\n >\n <div class=\"ps-medium flex flex--column flex--left-center\">\n <fcom-radio-item-group\n [options]=\"(isFlightSelectionFiltersTestVariant$ | async) ? allSortingOptionsMobileB : sortingOptions\"\n [parentForm]=\"sortingForm\"\n [controlName]=\"'flightSorting'\"\n [translationPrefix]=\"'flightSorting'\"\n [titleText]=\"false\"\n >\n </fcom-radio-item-group>\n </div>\n </fcom-modal>\n </ng-template>\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, OnChanges, OnInit } from '@angular/core';\nimport { UntypedFormArray, UntypedFormGroup, UntypedFormControl, UntypedFormBuilder } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, distinctUntilChanged, filter, map, Observable, Subscription } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ElementActions, ElementTypes, GaContext, SelectOption } from '@fcom/common';\nimport { TabTheme, TabLayoutType, RadioItemGroupOption } from '@fcom/ui-components';\nimport { GtmService } from '@fcom/common/gtm';\nimport { TypedFormGroup, TypedFormArray } from '@fcom/service-forms';\n\nimport { SortBy } from '../../interfaces';\n\n@Component({\n selector: 'fin-flight-selection-sort-by',\n styleUrls: ['./flight-selection-sort-by.component.scss'],\n templateUrl: './flight-selection-sort-by.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlightSelectionSortByComponent implements OnChanges, OnInit {\n @Input()\n currencyCode: string;\n\n @Input()\n showPoints = false;\n\n @Input()\n resultsAmount: number;\n\n @Input()\n bestFlightPrice: string;\n\n @Input()\n fastestFlightPrice: string;\n\n @Input()\n lowestPrice: string;\n\n @Input()\n selectedSortBy$: Observable<SortBy>;\n\n @Input()\n isMobile$: Observable<boolean>;\n\n @Input()\n showBestFlightsTab = true;\n\n @Input()\n isFlightSelectionFiltersTestVariant$: Observable<boolean>;\n\n @Output()\n sortByChange: EventEmitter<SortBy> = new EventEmitter();\n\n shouldShowTabSubtitle = false;\n modalOpen = false;\n sortingForm: TypedFormGroup<UntypedFormArray | UntypedFormGroup | UntypedFormControl>;\n sortingOptions: RadioItemGroupOption[];\n sortingSelectOptions$: Observable<SelectOption[]>;\n allSortingOptions: RadioItemGroupOption[] = [\n { value: SortBy.BEST, label: 'flightSorting.bestFlights.plural', descriptionText: 'flightSorting.tooltip.text' },\n { value: SortBy.PRICE, label: 'flightSorting.lowestPrice' },\n { value: SortBy.DURATION, label: 'flightSorting.fastest' },\n ];\n allSortingOptionsDesktopB: RadioItemGroupOption[] = [\n {\n value: SortBy.BEST,\n label: 'flightSorting.recommended.desktopLabel',\n },\n { value: SortBy.PRICE, label: 'flightSorting.price.desktopLabel' },\n { value: SortBy.DEPARTURE, label: 'flightSorting.departureTime.desktopLabel' },\n { value: SortBy.DURATION, label: 'flightSorting.duration.desktopLabel' },\n ];\n allSortingOptionsMobileB: RadioItemGroupOption[] = [\n {\n value: SortBy.BEST,\n label: 'flightSorting.recommended.mobileLabel',\n descriptionText: 'flightSorting.recommended.description',\n },\n {\n value: SortBy.PRICE,\n label: 'flightSorting.price.mobileLabel',\n descriptionText: 'flightSorting.price.description',\n },\n {\n value: SortBy.DEPARTURE,\n label: 'flightSorting.departureTime.mobileLabel',\n descriptionText: 'flightSorting.departureTime.description',\n },\n {\n value: SortBy.DURATION,\n label: 'flightSorting.duration.mobileLabel',\n descriptionText: 'flightSorting.duration.description',\n },\n ];\n subscriptions: Subscription = new Subscription();\n\n readonly SortBy = SortBy;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TabLayoutType = TabLayoutType;\n readonly TabTheme = TabTheme;\n\n constructor(\n private gtmService: GtmService,\n private fb: UntypedFormBuilder,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n this.sortingForm = this.fb.group({\n flightSorting: this.fb.control(''),\n }) as TypedFormGroup<TypedFormArray<UntypedFormGroup> | UntypedFormControl>;\n\n if (this.showBestFlightsTab) {\n this.sortingOptions = this.allSortingOptions;\n } else {\n this.sortingOptions = this.allSortingOptions.filter((option) => {\n return option.value !== SortBy.BEST;\n });\n }\n\n this.sortingSelectOptions$ = this.languageService\n .translateMultiple(this.allSortingOptionsDesktopB.map(({ label }) => label))\n .pipe(\n map((translated) =>\n this.allSortingOptionsDesktopB.map(({ value }, i) => ({\n value,\n name: translated[i],\n }))\n )\n );\n\n this.subscriptions.add(\n combineLatest([this.isMobile$, this.selectedSortBy$, this.isFlightSelectionFiltersTestVariant$])\n .pipe(\n filter(\n ([isMobile, _, isFlightSelectionFiltersTestVariant]) =>\n isMobile === true || isFlightSelectionFiltersTestVariant === true\n ),\n map(([_, selectedSortBy]) => {\n setTimeout(() => {\n this.sortingForm.setValue({\n flightSorting: selectedSortBy,\n });\n });\n }),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n )\n .subscribe()\n );\n\n this.onSortChangeFromModal();\n }\n\n ngOnChanges(): void {\n this.shouldShowTabSubtitle = this.resultsAmount !== 0;\n }\n\n onSortChangeFromTabs(event: { index: number; data: unknown }): void {\n this.gtmService.trackElement(\n `booking-flow-sort-change-${event.data}`,\n GaContext.BOOKING_FLOW,\n ElementTypes.TAB,\n undefined,\n ElementActions.CLICK\n );\n this.sortByChange.emit(event.data as SortBy);\n }\n\n onSortChangeFromModal(): void {\n this.subscriptions.add(\n this.sortingForm.valueChanges\n .pipe(distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)))\n .subscribe((sort) => {\n this.gtmService.trackElement(\n `booking-flow-sort-change-${sort.flightSorting}`,\n GaContext.BOOKING_FLOW,\n ElementTypes.MODAL,\n undefined,\n ElementActions.CLICK\n );\n\n this.sortByChange.emit(sort.flightSorting);\n })\n );\n }\n\n openSortingModal(): void {\n this.modalOpen = true;\n }\n\n closeSortingModal(): void {\n this.modalOpen = false;\n }\n}\n","module.exports.CustomIcon = {\n \"APPLE_WALLET_EN\": \"apple-wallet-en\",\n \"APPLE_WALLET_FI\": \"apple-wallet-fi\",\n \"AVIOS_KEYLINE_NAVY\": \"avios-keyline-navy\",\n \"AVIOS_KEYLINE_WHITE\": \"avios-keyline-white\",\n \"AVIOS_SMALL_USE_NAVY\": \"avios-small-use-navy\",\n \"AVIOS_SMALL_USE_WHITE\": \"avios-small-use-white\",\n \"BAEC_EMBLEM\": \"baec-emblem\",\n \"BAEC_LOGO\": \"baec-logo\",\n \"BUSINESS_BASSINET_SEAT\": \"business-bassinet-seat\",\n \"CARTRAWLER_LOGO\": \"cartrawler-logo\",\n \"COMFORT_SEAT\": \"comfort-seat\",\n \"ECONOMY_BASSINET_SEAT\": \"economy-bassinet-seat\",\n \"EXIT_ROW_SEAT\": \"exit-row-seat\",\n \"EXTRA_LEGROOM_SEAT\": \"extra-legroom-seat\",\n \"FINNAIR_EMBLEM\": \"finnair-emblem\",\n \"FINNAIR_LOGO_100\": \"finnair-logo-100\",\n \"FINNAIR_LOGO_PLUS\": \"finnair-logo-plus\",\n \"FINNAIR_LOGO\": \"finnair-logo\",\n \"FRONT_ROW_SEAT\": \"front-row-seat\",\n \"PLUS_CARD_BASIC_BG\": \"plus-card-basic-bg\",\n \"PLUS_CARD_BASIC\": \"plus-card-basic\",\n \"PLUS_CARD_GOLD_BG\": \"plus-card-gold-bg\",\n \"PLUS_CARD_GOLD\": \"plus-card-gold\",\n \"PLUS_CARD_JUNIOR_BG\": \"plus-card-junior-bg\",\n \"PLUS_CARD_JUNIOR\": \"plus-card-junior\",\n \"PLUS_CARD_LUMO_BG\": \"plus-card-lumo-bg\",\n \"PLUS_CARD_LUMO\": \"plus-card-lumo\",\n \"PLUS_CARD_PLATINUM_BG\": \"plus-card-platinum-bg\",\n \"PLUS_CARD_PLATINUM\": \"plus-card-platinum\",\n \"PLUS_CARD_SILVER_BG\": \"plus-card-silver-bg\",\n \"PLUS_CARD_SILVER\": \"plus-card-silver\",\n \"PLUS_ICON_BASIC\": \"plus-icon-basic\",\n \"PLUS_ICON_GOLD\": \"plus-icon-gold\",\n \"PLUS_ICON_LUMO\": \"plus-icon-lumo\",\n \"PLUS_ICON_PLATINUM\": \"plus-icon-platinum\",\n \"PLUS_ICON_SILVER\": \"plus-icon-silver\",\n \"PREFERRED_SEAT\": \"preferred-seat\",\n \"PREMIUM_BASSINET_SEAT\": \"premium-bassinet-seat\",\n \"PREMIUM_SEAT\": \"premium-seat\",\n \"REGULAR_SEAT\": \"regular-seat\",\n \"SELECTED_SEAT\": \"selected-seat\",\n \"UNAVAILABLE_SEAT\": \"unavailable-seat\"\n};\n\nmodule.exports.PaymentsIcon = {\n \"ADYENPAYMENTCARD\": \"adyenpaymentcard\",\n \"AKTIA\": \"aktia\",\n \"ALANDSBANKEN\": \"alandsbanken\",\n \"ALIPAY\": \"alipay\",\n \"AMEX\": \"amex\",\n \"APPLEPAY\": \"applepay\",\n \"ARBEJDERNES\": \"arbejdernes\",\n \"BARCLAYS\": \"barclays\",\n \"CITADELE\": \"citadele\",\n \"COOPPANK\": \"cooppank\",\n \"DANSKEBANK\": \"danskebank\",\n \"DINERSCLUB\": \"dinersclub\",\n \"DNB\": \"dnb\",\n \"GIROPAY\": \"giropay\",\n \"HANDELSBANKEN\": \"handelsbanken\",\n \"HSBCUK\": \"hsbcuk\",\n \"IDEAL\": \"ideal\",\n \"INDIANETBANKING\": \"indianetbanking\",\n \"INDIAWALLET\": \"indiawallet\",\n \"JCB\": \"jcb\",\n \"JYSKEBANK\": \"jyskebank\",\n \"KLARNA\": \"klarna\",\n \"LANSFORSAKRINGAR\": \"lansforsakringar\",\n \"LHVPANK\": \"lhvpank\",\n \"LLOYDSBANK\": \"lloydsbank\",\n \"LUMINOR\": \"luminor\",\n \"LUNARBANK\": \"lunarbank\",\n \"MASTERCARD\": \"mastercard\",\n \"MOBILEPAY\": \"mobilepay\",\n \"NATWEST\": \"natwest\",\n \"NORDEA\": \"nordea\",\n \"NYKREDITBANK\": \"nykreditbank\",\n \"OMASP\": \"omasp\",\n \"OP\": \"op\",\n \"PAYPAL\": \"paypal\",\n \"POPPANKKI\": \"poppankki\",\n \"REVOLUT\": \"revolut\",\n \"RUPAY\": \"rupay\",\n \"SAASTOPANKKI\": \"saastopankki\",\n \"SANTANDERUK\": \"santanderuk\",\n \"SBANKEN\": \"sbanken\",\n \"SEB\": \"seb\",\n \"SOFORT\": \"sofort\",\n \"SPANKKI\": \"spankki\",\n \"SPAREBANK1NO\": \"sparebank1no\",\n \"SPAREBANK1SM\": \"sparebank1sm\",\n \"SPAREBANKOST\": \"sparebankost\",\n \"SWEDBANK\": \"swedbank\",\n \"SWISH\": \"swish\",\n \"TRUSTLY\": \"trustly\",\n \"UATP\": \"uatp\",\n \"UNIONPAY\": \"unionpay\",\n \"UPI\": \"upi\",\n \"VIPPS\": \"vipps\",\n \"VISA\": \"visa\",\n \"WECHATPAY\": \"wechatpay\"\n};\n\nmodule.exports.SvgLibraryIcon = {\n \"ADULT_INFANT_BLOCK\": \"adult-infant-block\",\n \"ADULT_INFANT_OUTLINE\": \"adult-infant-outline\",\n \"ADULT_INFANT\": \"adult-infant\",\n \"AIRCRAFT_HORIZONTAL_BLOCK\": \"aircraft-horizontal-block\",\n \"AIRCRAFT_HORIZONTAL_OUTLINE\": \"aircraft-horizontal-outline\",\n \"AIRCRAFT_HORIZONTAL\": \"aircraft-horizontal\",\n \"AIRCRAFT_TILTED_BLOCK\": \"aircraft-tilted-block\",\n \"AIRCRAFT_TILTED_OUTLINE\": \"aircraft-tilted-outline\",\n \"AIRCRAFT_TILTED\": \"aircraft-tilted\",\n \"AIRCRAFT_VERTICAL_BLOCK\": \"aircraft-vertical-block\",\n \"AIRCRAFT_VERTICAL_OUTLINE\": \"aircraft-vertical-outline\",\n \"AIRCRAFT_VERTICAL\": \"aircraft-vertical\",\n \"AIRPORT_BLOCK\": \"airport-block\",\n \"AIRPORT_OUTLINE\": \"airport-outline\",\n \"AIRPORT\": \"airport\",\n \"ALERT_BLOCK\": \"alert-block\",\n \"ALERT_OUTLINE\": \"alert-outline\",\n \"ALERT_TRIANGLE\": \"alert-triangle\",\n \"ALERT\": \"alert\",\n \"AM_LOGO\": \"am-logo\",\n \"AREA_MAP_BLOCK\": \"area-map-block\",\n \"AREA_MAP_OUTLINE\": \"area-map-outline\",\n \"AREA_MAP\": \"area-map\",\n \"ARRIVAL_BLOCK\": \"arrival-block\",\n \"ARRIVAL_OUTLINE\": \"arrival-outline\",\n \"ARRIVAL\": \"arrival\",\n \"ARROW_BACK_BLOCK\": \"arrow-back-block\",\n \"ARROW_BACK_OUTLINE\": \"arrow-back-outline\",\n \"ARROW_BACK\": \"arrow-back\",\n \"ARROW_DOWN_BLOCK\": \"arrow-down-block\",\n \"ARROW_DOWN_OUTLINE\": \"arrow-down-outline\",\n \"ARROW_DOWN\": \"arrow-down\",\n \"ARROW_LEFT_BLOCK\": \"arrow-left-block\",\n \"ARROW_LEFT_OUTLINE\": \"arrow-left-outline\",\n \"ARROW_LEFT\": \"arrow-left\",\n \"ARROW_RIGHT_BLOCK\": \"arrow-right-block\",\n \"ARROW_RIGHT_OUTLINE\": \"arrow-right-outline\",\n \"ARROW_RIGHT\": \"arrow-right\",\n \"ARROW_UP_BLOCK\": \"arrow-up-block\",\n \"ARROW_UP_OUTLINE\": \"arrow-up-outline\",\n \"ARROW_UP\": \"arrow-up\",\n \"ATTACHMENT_BLOCK\": \"attachment-block\",\n \"ATTACHMENT_OUTLINE\": \"attachment-outline\",\n \"ATTACHMENT\": \"attachment\",\n \"AVIOS_CURRENCY\": \"avios-currency\",\n \"AVIOS_GIFT_CARD_BLOCK\": \"avios-gift-card-block\",\n \"AVIOS_GIFT_CARD_OUTLINE\": \"avios-gift-card-outline\",\n \"AVIOS_GIFT_CARD\": \"avios-gift-card\",\n \"AVIOS_MONO\": \"avios-mono\",\n \"AVIOS_PLECTRUM\": \"avios-plectrum\",\n \"B2B_BLOCK\": \"b2b-block\",\n \"B2B_OUTLINE\": \"b2b-outline\",\n \"B2B\": \"b2b\",\n \"BABY_BASSINET_BLOCK\": \"baby-bassinet-block\",\n \"BABY_BASSINET_OUTLINE\": \"baby-bassinet-outline\",\n \"BABY_BASSINET\": \"baby-bassinet\",\n \"BACKPACK_BLOCK\": \"backpack-block\",\n \"BACKPACK_OUTLINE\": \"backpack-outline\",\n \"BACKPACK\": \"backpack\",\n \"BAGGAGE_CHECKED_IN_BLOCK\": \"baggage-checked-in-block\",\n \"BAGGAGE_CHECKED_IN_OUTLINE\": \"baggage-checked-in-outline\",\n \"BAGGAGE_CHECKED_IN\": \"baggage-checked-in\",\n \"BAGGAGE_CLAIM_BLOCK\": \"baggage-claim-block\",\n \"BAGGAGE_CLAIM_OUTLINE\": \"baggage-claim-outline\",\n \"BAGGAGE_CLAIM\": \"baggage-claim\",\n \"BAGGAGE_WEIGHT_BLOCK\": \"baggage-weight-block\",\n \"BAGGAGE_WEIGHT_OUTLINE\": \"baggage-weight-outline\",\n \"BAGGAGE_WEIGHT\": \"baggage-weight\",\n \"BAGGAGE_WITH_TAG_BLOCK\": \"baggage-with-tag-block\",\n \"BAGGAGE_WITH_TAG_OUTLINE\": \"baggage-with-tag-outline\",\n \"BAGGAGE_WITH_TAG\": \"baggage-with-tag\",\n \"BEER_BLOCK\": \"beer-block\",\n \"BEER_OUTLINE\": \"beer-outline\",\n \"BEER\": \"beer\",\n \"BIKE_BLOCK\": \"bike-block\",\n \"BIKE_OUTLINE\": \"bike-outline\",\n \"BIKE\": \"bike\",\n \"BLOG_BLOCK\": \"blog-block\",\n \"BLOG_OUTLINE\": \"blog-outline\",\n \"BLOG\": \"blog\",\n \"BLUEBERRY_JUICE_BLOCK\": \"blueberry-juice-block\",\n \"BLUEBERRY_JUICE_OUTLINE\": \"blueberry-juice-outline\",\n \"BLUEBERRY_JUICE\": \"blueberry-juice\",\n \"BOOK_FLIGHT_BLOCK\": \"book-flight-block\",\n \"BOOK_FLIGHT_OUTLINE\": \"book-flight-outline\",\n \"BOOK_FLIGHT\": \"book-flight\",\n \"BREAKFAST_BLOCK\": \"breakfast-block\",\n \"BREAKFAST_OUTLINE\": \"breakfast-outline\",\n \"BREAKFAST\": \"breakfast\",\n \"BRIGHTNESS_BLOCK\": \"brightness-block\",\n \"BRIGHTNESS_LOW_BLOCK\": \"brightness-low-block\",\n \"BRIGHTNESS_LOW_OUTLINE\": \"brightness-low-outline\",\n \"BRIGHTNESS_LOW\": \"brightness-low\",\n \"BRIGHTNESS_MEDIUM_BLOCK\": \"brightness-medium-block\",\n \"BRIGHTNESS_MEDIUM_OUTLINE\": \"brightness-medium-outline\",\n \"BRIGHTNESS_MEDIUM\": \"brightness-medium\",\n \"BRIGHTNESS_OUTLINE\": \"brightness-outline\",\n \"BRIGHTNESS\": \"brightness\",\n \"BUS_BLOCK\": \"bus-block\",\n \"BUS_OUTLINE\": \"bus-outline\",\n \"BUS\": \"bus\",\n \"BUSINESS_CLASS_BLOCK\": \"business-class-block\",\n \"BUSINESS_CLASS_OUTLINE\": \"business-class-outline\",\n \"BUSINESS_CLASS\": \"business-class\",\n \"CALENDAR_BLOCK\": \"calendar-block\",\n \"CALENDAR_OUTLINE\": \"calendar-outline\",\n \"CALENDAR\": \"calendar\",\n \"CAMERA_BLOCK\": \"camera-block\",\n \"CAMERA_OUTLINE\": \"camera-outline\",\n \"CAMERA\": \"camera\",\n \"CAR_BLOCK\": \"car-block\",\n \"CAR_OUTLINE\": \"car-outline\",\n \"CAR\": \"car\",\n \"CARGO\": \"cargo\",\n \"CARRY_ON_BAG_BLOCK\": \"carry-on-bag-block\",\n \"CARRY_ON_BAG_OUTLINE\": \"carry-on-bag-outline\",\n \"CARRY_ON_BAG_TROLLEY_BLOCK\": \"carry-on-bag-trolley-block\",\n \"CARRY_ON_BAG_TROLLEY_OUTLINE\": \"carry-on-bag-trolley-outline\",\n \"CARRY_ON_BAG_TROLLEY\": \"carry-on-bag-trolley\",\n \"CARRY_ON_BAG\": \"carry-on-bag\",\n \"CARRY_ON_BAGGAGE_BLOCK\": \"carry-on-baggage-block\",\n \"CARRY_ON_BAGGAGE_OUTLINE\": \"carry-on-baggage-outline\",\n \"CARRY_ON_BAGGAGE\": \"carry-on-baggage\",\n \"CARRY_ON_PROHIBITED\": \"carry-on-prohibited\",\n \"CHAT_BLOCK\": \"chat-block\",\n \"CHAT_OUTLINE\": \"chat-outline\",\n \"CHAT\": \"chat\",\n \"CHECK_IN_BLOCK\": \"check-in-block\",\n \"CHECK_IN_OUTLINE\": \"check-in-outline\",\n \"CHECK_IN\": \"check-in\",\n \"CHECKBOX_SELECTED_INVERTED\": \"checkbox-selected-inverted\",\n \"CHECKBOX_SELECTED\": \"checkbox-selected\",\n \"CHECKBOX_UNSELECTED_INVERTED\": \"checkbox-unselected-inverted\",\n \"CHECKBOX_UNSELECTED\": \"checkbox-unselected\",\n \"CHECKED_BAG_PROHIBITED\": \"checked-bag-prohibited\",\n \"CHECKED_BAGGAGE_BLOCK\": \"checked-baggage-block\",\n \"CHECKED_BAGGAGE_OUTLINE\": \"checked-baggage-outline\",\n \"CHECKED_BAGGAGE\": \"checked-baggage\",\n \"CHECKED_IN_BAGGAGE_BLOCK\": \"checked-in-baggage-block\",\n \"CHECKED_IN_BAGGAGE_NONE_BLOCK\": \"checked-in-baggage-none-block\",\n \"CHECKED_IN_BAGGAGE_NONE_OUTLINE\": \"checked-in-baggage-none-outline\",\n \"CHECKED_IN_BAGGAGE_NONE\": \"checked-in-baggage-none\",\n \"CHECKED_IN_BAGGAGE_OUTLINE\": \"checked-in-baggage-outline\",\n \"CHECKED_IN_BAGGAGE\": \"checked-in-baggage\",\n \"CHECKLIST_BLOCK\": \"checklist-block\",\n \"CHECKLIST_OUTLINE\": \"checklist-outline\",\n \"CHECKLIST\": \"checklist\",\n \"CHECKMARK_BLOCK\": \"checkmark-block\",\n \"CHECKMARK_BUTTON_SELECTED\": \"checkmark-button-selected\",\n \"CHECKMARK_BUTTON_UNSELECTED\": \"checkmark-button-unselected\",\n \"CHECKMARK_OUTLINE\": \"checkmark-outline\",\n \"CHECKMARK\": \"checkmark\",\n \"CHEVRON_DOWN_BLOCK\": \"chevron-down-block\",\n \"CHEVRON_DOWN_OUTLINE\": \"chevron-down-outline\",\n \"CHEVRON_DOWN\": \"chevron-down\",\n \"CHEVRON_LEFT_BLOCK\": \"chevron-left-block\",\n \"CHEVRON_LEFT_OUTLINE\": \"chevron-left-outline\",\n \"CHEVRON_LEFT\": \"chevron-left\",\n \"CHEVRON_RIGHT_BLOCK\": \"chevron-right-block\",\n \"CHEVRON_RIGHT_OUTLINE\": \"chevron-right-outline\",\n \"CHEVRON_RIGHT\": \"chevron-right\",\n \"CHEVRON_UP_BLOCK\": \"chevron-up-block\",\n \"CHEVRON_UP_OUTLINE\": \"chevron-up-outline\",\n \"CHEVRON_UP\": \"chevron-up\",\n \"CHILD_BLOCK\": \"child-block\",\n \"CHILD_OUTLINE\": \"child-outline\",\n \"CHILD\": \"child\",\n \"CLOCK\": \"clock\",\n \"CLOSE_DELETE_BLOCK\": \"close-delete-block\",\n \"CLOSE_DELETE_OUTLINE\": \"close-delete-outline\",\n \"CLOSE_DELETE\": \"close-delete\",\n \"CO2_BLOCK\": \"co2-block\",\n \"CO2_OUTLINE\": \"co2-outline\",\n \"CO2\": \"co2\",\n \"COFFEE_BLOCK\": \"coffee-block\",\n \"COFFEE_OUTLINE\": \"coffee-outline\",\n \"COFFEE\": \"coffee\",\n \"CONNECTING_FLIGHT_BLOCK\": \"connecting-flight-block\",\n \"CONNECTING_FLIGHT_OUTLINE\": \"connecting-flight-outline\",\n \"CONNECTING_FLIGHT\": \"connecting-flight\",\n \"COPY_BLOCK\": \"copy-block\",\n \"COPY_OUTLINE\": \"copy-outline\",\n \"COPY\": \"copy\",\n \"CORPORATE_BOOKING_BLOCK\": \"corporate-booking-block\",\n \"CORPORATE_BOOKING_OUTLINE\": \"corporate-booking-outline\",\n \"CORPORATE_BOOKING\": \"corporate-booking\",\n \"CORROSIVES_PROHIBITED\": \"corrosives-prohibited\",\n \"CORROSIVES\": \"corrosives\",\n \"COUPLE_BLOCK\": \"couple-block\",\n \"COUPLE_OUTLINE\": \"couple-outline\",\n \"COUPLE\": \"couple\",\n \"CREDIT_OR_DEBIT_CARD_BLOCK\": \"credit-or-debit-card-block\",\n \"CREDIT_OR_DEBIT_CARD_OUTLINE\": \"credit-or-debit-card-outline\",\n \"CREDIT_OR_DEBIT_CARD\": \"credit-or-debit-card\",\n \"CREW_CALLED_BLOCK\": \"crew-called-block\",\n \"CREW_CALLED_OUTLINE\": \"crew-called-outline\",\n \"CREW_CALLED\": \"crew-called\",\n \"CURRENCY_BLOCK\": \"currency-block\",\n \"CURRENCY_OUTLINE\": \"currency-outline\",\n \"CURRENCY\": \"currency\",\n \"CUSTOMER_SERVICE_BLOCK\": \"customer-service-block\",\n \"CUSTOMER_SERVICE_OUTLINE\": \"customer-service-outline\",\n \"CUSTOMER_SERVICE\": \"customer-service\",\n \"DAY_BLOCK\": \"day-block\",\n \"DAY_OUTLINE\": \"day-outline\",\n \"DAY\": \"day\",\n \"DEPARTURE_BLOCK\": \"departure-block\",\n \"DEPARTURE_GATE_BLOCK\": \"departure-gate-block\",\n \"DEPARTURE_GATE_OUTLINE\": \"departure-gate-outline\",\n \"DEPARTURE_GATE\": \"departure-gate\",\n \"DEPARTURE_OUTLINE\": \"departure-outline\",\n \"DEPARTURE\": \"departure\",\n \"DESTINATION_BLOCK\": \"destination-block\",\n \"DESTINATION_OUTLINE\": \"destination-outline\",\n \"DESTINATION\": \"destination\",\n \"DISCOUNT\": \"discount\",\n \"DISCOUNTED_PRICE_BLOCK\": \"discounted-price-block\",\n \"DISCOUNTED_PRICE_OUTLINE\": \"discounted-price-outline\",\n \"DISCOUNTED_PRICE\": \"discounted-price\",\n \"DOG_BLOCK\": \"dog-block\",\n \"DOG_OUTLINE\": \"dog-outline\",\n \"DOG\": \"dog\",\n \"DONATION_BLOCK\": \"donation-block\",\n \"DONATION_OUTLINE\": \"donation-outline\",\n \"DONATION\": \"donation\",\n \"DOWNLOAD_BLOCK\": \"download-block\",\n \"DOWNLOAD_OUTLINE\": \"download-outline\",\n \"DOWNLOAD\": \"download\",\n \"DRINK_SODA_BLOCK\": \"drink-soda-block\",\n \"DRINK_SODA_OUTLINE\": \"drink-soda-outline\",\n \"DRINK_SODA\": \"drink-soda\",\n \"E_CIGARETTE_PROHIBITED\": \"e-cigarette-prohibited\",\n \"E_CIGARETTE\": \"e-cigarette\",\n \"EDIT_BLOCK\": \"edit-block\",\n \"EDIT_OUTLINE\": \"edit-outline\",\n \"EDIT\": \"edit\",\n \"EIGHT_BLOCK\": \"eight-block\",\n \"EIGHT_OUTLINE\": \"eight-outline\",\n \"EIGHT\": \"eight\",\n \"ELECTRIC_SOCKET_BLOCK\": \"electric-socket-block\",\n \"ELECTRIC_SOCKET_OUTLINE\": \"electric-socket-outline\",\n \"ELECTRIC_SOCKET\": \"electric-socket\",\n \"EMAIL_BLOCK\": \"email-block\",\n \"EMAIL_OUTLINE\": \"email-outline\",\n \"EMAIL\": \"email\",\n \"EMPTY\": \"empty\",\n \"EXPAND_BLOCK\": \"expand-block\",\n \"EXPAND_OUTLINE\": \"expand-outline\",\n \"EXPAND\": \"expand\",\n \"EXPLOSIVES_PROHIBITED\": \"explosives-prohibited\",\n \"EXPLOSIVES\": \"explosives\",\n \"EXTERNAL_TAB_BLOCK\": \"external-tab-block\",\n \"EXTERNAL_TAB_OUTLINE\": \"external-tab-outline\",\n \"EXTERNAL_TAB\": \"external-tab\",\n \"EXTRA_CARRY_ON_BAG_BLOCK\": \"extra-carry-on-bag-block\",\n \"EXTRA_CARRY_ON_BAG_OUTLINE\": \"extra-carry-on-bag-outline\",\n \"EXTRA_CARRY_ON_BAG\": \"extra-carry-on-bag\",\n \"EXTRA_CHECK_IN_BAGGAGE_BLOCK\": \"extra-check-in-baggage-block\",\n \"EXTRA_CHECK_IN_BAGGAGE_OUTLINE\": \"extra-check-in-baggage-outline\",\n \"EXTRA_CHECK_IN_BAGGAGE\": \"extra-check-in-baggage\",\n \"EXTRA_LEG_ROOM_BLOCK\": \"extra-leg-room-block\",\n \"EXTRA_LEG_ROOM_OUTLINE\": \"extra-leg-room-outline\",\n \"EXTRA_LEG_ROOM\": \"extra-leg-room\",\n \"FACEBOOK_BLOCK\": \"facebook-block\",\n \"FACEBOOK_OUTLINE\": \"facebook-outline\",\n \"FACEBOOK\": \"facebook\",\n \"FACEMASK_BLOCK\": \"facemask-block\",\n \"FACEMASK_OUTLINE\": \"facemask-outline\",\n \"FACEMASK\": \"facemask\",\n \"FAMILY_BLOCK\": \"family-block\",\n \"FAMILY_OUTLINE\": \"family-outline\",\n \"FAMILY\": \"family\",\n \"FAVOURITE_ENTERTAINMENT_BLOCK\": \"favourite-entertainment-block\",\n \"FAVOURITE_ENTERTAINMENT_OUTLINE\": \"favourite-entertainment-outline\",\n \"FAVOURITE_ENTERTAINMENT\": \"favourite-entertainment\",\n \"FILTER_OPTIONS_BLOCK\": \"filter-options-block\",\n \"FILTER_OPTIONS_OUTLINE\": \"filter-options-outline\",\n \"FILTER_OPTIONS\": \"filter-options\",\n \"FINLAND_BLOCK\": \"finland-block\",\n \"FINLAND_OUTLINE\": \"finland-outline\",\n \"FINLAND\": \"finland\",\n \"FINNAIR_EMBLEM_BLOCK\": \"finnair-emblem-block\",\n \"FINNAIR_EMBLEM_OUTLINE\": \"finnair-emblem-outline\",\n \"FINNAIR_EMBLEM\": \"finnair-emblem\",\n \"FINNAIR_PLUS_BLOCK\": \"finnair-plus-block\",\n \"FINNAIR_PLUS_CARD_BLOCK\": \"finnair-plus-card-block\",\n \"FINNAIR_PLUS_CARD_OUTLINE\": \"finnair-plus-card-outline\",\n \"FINNAIR_PLUS_CARD\": \"finnair-plus-card\",\n \"FINNAIR_PLUS_OUTLINE\": \"finnair-plus-outline\",\n \"FINNAIR_PLUS\": \"finnair-plus\",\n \"FIRE_ARMS_PROHIBITED\": \"fire-arms-prohibited\",\n \"FIRE_ARMS\": \"fire-arms\",\n \"FIVE_BLOCK\": \"five-block\",\n \"FIVE_OUTLINE\": \"five-outline\",\n \"FIVE\": \"five\",\n \"FLAMMABLE_GASES_PROHIBITED\": \"flammable-gases-prohibited\",\n \"FLAMMABLE_GASES\": \"flammable-gases\",\n \"FLAMMABLE_LIQUIDS_PROHIBITED\": \"flammable-liquids-prohibited\",\n \"FLAMMABLE_LIQUIDS\": \"flammable-liquids\",\n \"FLAMMABLE_SOLIDS_PROHIBITED\": \"flammable-solids-prohibited\",\n \"FLAMMABLE_SOLIDS\": \"flammable-solids\",\n \"FLIGHT_CAMERA_BLOCK\": \"flight-camera-block\",\n \"FLIGHT_CAMERA_OUTLINE\": \"flight-camera-outline\",\n \"FLIGHT_CAMERA\": \"flight-camera\",\n \"FLIGHT_HOTEL\": \"flight-hotel\",\n \"FLIGHT_MAP_BLOCK\": \"flight-map-block\",\n \"FLIGHT_MAP_OUTLINE\": \"flight-map-outline\",\n \"FLIGHT_MAP\": \"flight-map\",\n \"FLIGHT_OFFER_BLOCK\": \"flight-offer-block\",\n \"FLIGHT_OFFER_OUTLINE\": \"flight-offer-outline\",\n \"FLIGHT_OFFER\": \"flight-offer\",\n \"FLIGHT_STATUS\": \"flight-status\",\n \"FLIGHTS_UNAVAILABLE_BLOCK\": \"flights-unavailable-block\",\n \"FLIGHTS_UNAVAILABLE_OUTLINE\": \"flights-unavailable-outline\",\n \"FLIGHTS_UNAVAILABLE\": \"flights-unavailable\",\n \"FOOD_BLOCK\": \"food-block\",\n \"FOOD_OUTLINE\": \"food-outline\",\n \"FOOD\": \"food\",\n \"FOUR_BLOCK\": \"four-block\",\n \"FOUR_OUTLINE\": \"four-outline\",\n \"FOUR\": \"four\",\n \"GAMES_BLOCK\": \"games-block\",\n \"GAMES_OUTLINE\": \"games-outline\",\n \"GAMES\": \"games\",\n \"GIFT_CARD_BLOCK\": \"gift-card-block\",\n \"GIFT_CARD_OUTLINE\": \"gift-card-outline\",\n \"GIFT_CARD\": \"gift-card\",\n \"GOLF_BLOCK\": \"golf-block\",\n \"GOLF_OUTLINE\": \"golf-outline\",\n \"GOLF_SKIS_BLOCK\": \"golf-skis-block\",\n \"GOLF_SKIS_OUTLINE\": \"golf-skis-outline\",\n \"GOLF_SKIS\": \"golf-skis\",\n \"GOLF\": \"golf\",\n \"GPS_LOCATION_BLOCK\": \"gps-location-block\",\n \"GPS_LOCATION_OUTLINE\": \"gps-location-outline\",\n \"GPS_LOCATION\": \"gps-location\",\n \"GROUP_BLOCK\": \"group-block\",\n \"GROUP_OUTLINE\": \"group-outline\",\n \"GROUP\": \"group\",\n \"HEADPHONES_BLOCK\": \"headphones-block\",\n \"HEADPHONES_OUTLINE\": \"headphones-outline\",\n \"HEADPHONES\": \"headphones\",\n \"HELP_BLOCK\": \"help-block\",\n \"HELP_OUTLINE\": \"help-outline\",\n \"HELP\": \"help\",\n \"HOLD_MY_BOOKING_BLOCK\": \"hold-my-booking-block\",\n \"HOLD_MY_BOOKING_OUTLINE\": \"hold-my-booking-outline\",\n \"HOLD_MY_BOOKING\": \"hold-my-booking\",\n \"HOME_BLOCK\": \"home-block\",\n \"HOME_OUTLINE\": \"home-outline\",\n \"HOME\": \"home\",\n \"HOTEL_BLOCK\": \"hotel-block\",\n \"HOTEL_OUTLINE\": \"hotel-outline\",\n \"HOTEL\": \"hotel\",\n \"IN_COMING_CALL_BLOCK\": \"in-coming-call-block\",\n \"IN_COMING_CALL_OUTLINE\": \"in-coming-call-outline\",\n \"IN_COMING_CALL\": \"in-coming-call\",\n \"INFANT_BLOCK\": \"infant-block\",\n \"INFANT_OUTLINE\": \"infant-outline\",\n \"INFANT\": \"infant\",\n \"INFO_BLOCK\": \"info-block\",\n \"INFO_OUTLINE\": \"info-outline\",\n \"INFO\": \"info\",\n \"INSTAGRAM\": \"instagram\",\n \"INSURANCE_BLOCK\": \"insurance-block\",\n \"INSURANCE_OUTLINE\": \"insurance-outline\",\n \"INSURANCE\": \"insurance\",\n \"INTERNET_DISRUPTION\": \"internet-disruption\",\n \"KEYBOARD_BLOCK\": \"keyboard-block\",\n \"KEYBOARD_OUTLINE\": \"keyboard-outline\",\n \"KEYBOARD\": \"keyboard\",\n \"LANGUAGE_BLOCK\": \"language-block\",\n \"LANGUAGE_OUTLINE\": \"language-outline\",\n \"LANGUAGE\": \"language\",\n \"LAPTOP_BLOCK\": \"laptop-block\",\n \"LAPTOP_OUTLINE\": \"laptop-outline\",\n \"LAPTOP\": \"laptop\",\n \"LAVATORY_BLOCK\": \"lavatory-block\",\n \"LAVATORY_MEN_BLOCK\": \"lavatory-men-block\",\n \"LAVATORY_MEN_OUTLINE\": \"lavatory-men-outline\",\n \"LAVATORY_MEN\": \"lavatory-men\",\n \"LAVATORY_OUTLINE\": \"lavatory-outline\",\n \"LAVATORY_WOMEN_BLOCK\": \"lavatory-women-block\",\n \"LAVATORY_WOMEN_OUTLINE\": \"lavatory-women-outline\",\n \"LAVATORY_WOMEN\": \"lavatory-women\",\n \"LAVATORY\": \"lavatory\",\n \"LEGISLATION_BLOCK\": \"legislation-block\",\n \"LEGISLATION_OUTLINE\": \"legislation-outline\",\n \"LEGISLATION\": \"legislation\",\n \"LIGHTERS_MATCHES_PROHIBITED\": \"lighters-matches-prohibited\",\n \"LIGHTERS_MATCHES\": \"lighters-matches\",\n \"LIGHTERS_PROHIBITED\": \"lighters-prohibited\",\n \"LIGHTERS\": \"lighters\",\n \"LIGHTS_OFF_BLOCK\": \"lights-off-block\",\n \"LIGHTS_OFF_OUTLINE\": \"lights-off-outline\",\n \"LIGHTS_OFF\": \"lights-off\",\n \"LIGHTS_ON_BLOCK\": \"lights-on-block\",\n \"LIGHTS_ON_OUTLINE\": \"lights-on-outline\",\n \"LIGHTS_ON\": \"lights-on\",\n \"LINK_BLOCK\": \"link-block\",\n \"LINK_OUTLINE\": \"link-outline\",\n \"LINK\": \"link\",\n \"LINKEDIN_BLOCK\": \"linkedin-block\",\n \"LINKEDIN_OUTLINE\": \"linkedin-outline\",\n \"LINKEDIN\": \"linkedin\",\n \"LIQUID_CONTAINER\": \"liquid-container\",\n \"LOCK_ACTIVE_BLOCK\": \"lock-active-block\",\n \"LOCK_ACTIVE_OUTLINE\": \"lock-active-outline\",\n \"LOCK_ACTIVE\": \"lock-active\",\n \"LOCK_CLOSED_BLOCK\": \"lock-closed-block\",\n \"LOCK_CLOSED_OUTLINE\": \"lock-closed-outline\",\n \"LOCK_CLOSED\": \"lock-closed\",\n \"LOCK_OPEN_BLOCK\": \"lock-open-block\",\n \"LOCK_OPEN_OUTLINE\": \"lock-open-outline\",\n \"LOCK_OPEN\": \"lock-open\",\n \"LOCKER_BLOCK\": \"locker-block\",\n \"LOCKER_OUTLINE\": \"locker-outline\",\n \"LOCKER\": \"locker\",\n \"LOGGED_IN_BLOCK\": \"logged-in-block\",\n \"LOGGED_IN_OUTLINE\": \"logged-in-outline\",\n \"LOGGED_IN\": \"logged-in\",\n \"LOGOUT_BLOCK\": \"logout-block\",\n \"LOGOUT_OUTLINE\": \"logout-outline\",\n \"LOGOUT\": \"logout\",\n \"LOST_BAGGAGE\": \"lost-baggage\",\n \"LOST_CARD\": \"lost-card\",\n \"LOUNGE_BLOCK\": \"lounge-block\",\n \"LOUNGE_OUTLINE\": \"lounge-outline\",\n \"LOUNGE\": \"lounge\",\n \"MAGAZINES_BLOCK\": \"magazines-block\",\n \"MAGAZINES_OUTLINE\": \"magazines-outline\",\n \"MAGAZINES\": \"magazines\",\n \"MAP_LAYERS_BLOCK\": \"map-layers-block\",\n \"MAP_LAYERS_OUTLINE\": \"map-layers-outline\",\n \"MAP_LAYERS\": \"map-layers\",\n \"MEAL_BLOCK\": \"meal-block\",\n \"MEAL_OUTLINE\": \"meal-outline\",\n \"MEAL\": \"meal\",\n \"MEDICAL_ASSISTANCE_BLOCK\": \"medical-assistance-block\",\n \"MEDICAL_ASSISTANCE_OUTLINE\": \"medical-assistance-outline\",\n \"MEDICAL_ASSISTANCE\": \"medical-assistance\",\n \"MENU_GRID_BLOCK\": \"menu-grid-block\",\n \"MENU_GRID_OUTLINE\": \"menu-grid-outline\",\n \"MENU_GRID\": \"menu-grid\",\n \"MENU_LIST_BLOCK\": \"menu-list-block\",\n \"MENU_LIST_OUTLINE\": \"menu-list-outline\",\n \"MENU_LIST_VIEW_BLOCK\": \"menu-list-view-block\",\n \"MENU_LIST_VIEW_OUTLINE\": \"menu-list-view-outline\",\n \"MENU_LIST_VIEW\": \"menu-list-view\",\n \"MENU_LIST\": \"menu-list\",\n \"MILESTONE_BLOCK\": \"milestone-block\",\n \"MILESTONE_OUTLINE\": \"milestone-outline\",\n \"MILESTONE\": \"milestone\",\n \"MINIMISE_BLOCK\": \"minimise-block\",\n \"MINIMISE_CHAT\": \"minimise-chat\",\n \"MINIMISE_OUTLINE\": \"minimise-outline\",\n \"MINIMISE\": \"minimise\",\n \"MINUS_BLOCK\": \"minus-block\",\n \"MINUS_OUTLINE\": \"minus-outline\",\n \"MINUS\": \"minus\",\n \"MMB_TICKET_CHANGES_BLOCK\": \"mmb-ticket-changes-block\",\n \"MMB_TICKET_CHANGES_OUTLINE\": \"mmb-ticket-changes-outline\",\n \"MMB_TICKET_CHANGES\": \"mmb-ticket-changes\",\n \"MOBILE_PHONE_BLOCK\": \"mobile-phone-block\",\n \"MOBILE_PHONE_OUTLINE\": \"mobile-phone-outline\",\n \"MOBILE_PHONE\": \"mobile-phone\",\n \"MORE_BLOCK\": \"more-block\",\n \"MORE_OUTLINE\": \"more-outline\",\n \"MORE\": \"more\",\n \"MOVIES_BLOCK\": \"movies-block\",\n \"MOVIES_OUTLINE\": \"movies-outline\",\n \"MOVIES\": \"movies\",\n \"MULTI_PAX_BLOCK\": \"multi-pax-block\",\n \"MULTI_PAX_OUTLINE\": \"multi-pax-outline\",\n \"MULTI_PAX\": \"multi-pax\",\n \"MULTISTOP_BLOCK\": \"multistop-block\",\n \"MULTISTOP_OUTLINE\": \"multistop-outline\",\n \"MULTISTOP\": \"multistop\",\n \"MUSIC_BLOCK\": \"music-block\",\n \"MUSIC_OUTLINE\": \"music-outline\",\n \"MUSIC\": \"music\",\n \"NIGHT_BLOCK\": \"night-block\",\n \"NIGHT_OUTLINE\": \"night-outline\",\n \"NIGHT\": \"night\",\n \"NINE_BLOCK\": \"nine-block\",\n \"NINE_OUTLINE\": \"nine-outline\",\n \"NINE\": \"nine\",\n \"NORDIC_PRODUCT_BLOCK\": \"nordic-product-block\",\n \"NORDIC_PRODUCT_OUTLINE\": \"nordic-product-outline\",\n \"NORDIC_PRODUCT\": \"nordic-product\",\n \"NOT_VISIBLE_BLOCK\": \"not-visible-block\",\n \"NOT_VISIBLE_OUTLINE\": \"not-visible-outline\",\n \"NOT_VISIBLE\": \"not-visible\",\n \"ONBOARD_SAFETY_BLOCK\": \"onboard-safety-block\",\n \"ONBOARD_SAFETY_OUTLINE\": \"onboard-safety-outline\",\n \"ONBOARD_SAFETY\": \"onboard-safety\",\n \"ONBOARD_SERVICE_BLOCK\": \"onboard-service-block\",\n \"ONBOARD_SERVICE_OUTLINE\": \"onboard-service-outline\",\n \"ONBOARD_SERVICE\": \"onboard-service\",\n \"ONE_BLOCK\": \"one-block\",\n \"ONE_OUTLINE\": \"one-outline\",\n \"ONE\": \"one\",\n \"ONEWORLD_LOGO\": \"oneworld-logo\",\n \"ONLINE_CHECKED_BLOCK\": \"online-checked-block\",\n \"ONLINE_CHECKED_OUTLINE\": \"online-checked-outline\",\n \"ONLINE_CHECKED\": \"online-checked\",\n \"PARKING\": \"parking\",\n \"PAUSE_BLOCK\": \"pause-block\",\n \"PAUSE_OUTLINE\": \"pause-outline\",\n \"PAUSE\": \"pause\",\n \"PAYMENT_METHODS_BLOCK\": \"payment-methods-block\",\n \"PAYMENT_METHODS_OUTLINE\": \"payment-methods-outline\",\n \"PAYMENT_METHODS\": \"payment-methods\",\n \"PERSON_BLOCK\": \"person-block\",\n \"PERSON_OUTLINE\": \"person-outline\",\n \"PERSON_SPECIAL_ASSIST_BLOCK\": \"person-special-assist-block\",\n \"PERSON_SPECIAL_ASSIST_OUTLINE\": \"person-special-assist-outline\",\n \"PERSON_SPECIAL_ASSIST\": \"person-special-assist\",\n \"PERSON_WALKING_BLOCK\": \"person-walking-block\",\n \"PERSON_WALKING_OUTLINE\": \"person-walking-outline\",\n \"PERSON_WALKING\": \"person-walking\",\n \"PERSON_WHEELCHAIR_BLOCK\": \"person-wheelchair-block\",\n \"PERSON_WHEELCHAIR_OUTLINE\": \"person-wheelchair-outline\",\n \"PERSON_WHEELCHAIR\": \"person-wheelchair\",\n \"PERSON\": \"person\",\n \"PET_IN_BAG_BLOCK\": \"pet-in-bag-block\",\n \"PET_IN_BAG_OUTLINE\": \"pet-in-bag-outline\",\n \"PET_IN_BAG\": \"pet-in-bag\",\n \"PET\": \"pet\",\n \"PHONE_BLOCK\": \"phone-block\",\n \"PHONE_OUTLINE\": \"phone-outline\",\n \"PHONE\": \"phone\",\n \"PICTURE_BLOCK\": \"picture-block\",\n \"PICTURE_OUTLINE\": \"picture-outline\",\n \"PICTURE\": \"picture\",\n \"PLAY_BLOCK\": \"play-block\",\n \"PLAY_NEXT_BLOCK\": \"play-next-block\",\n \"PLAY_NEXT_OUTLINE\": \"play-next-outline\",\n \"PLAY_NEXT\": \"play-next\",\n \"PLAY_OUTLINE\": \"play-outline\",\n \"PLAY_PREVIOUS_BLOCK\": \"play-previous-block\",\n \"PLAY_PREVIOUS_OUTLINE\": \"play-previous-outline\",\n \"PLAY_PREVIOUS\": \"play-previous\",\n \"PLAY\": \"play\",\n \"PLUS_BLOCK\": \"plus-block\",\n \"PLUS_OUTLINE\": \"plus-outline\",\n \"PLUS\": \"plus\",\n \"POINTS_OF_INTEREST_BLOCK\": \"points-of-interest-block\",\n \"POINTS_OF_INTEREST_OUTLINE\": \"points-of-interest-outline\",\n \"POINTS_OF_INTEREST\": \"points-of-interest\",\n \"POISON_PROHIBITED\": \"poison-prohibited\",\n \"POISON\": \"poison\",\n \"POWER_BANK_BLOCK\": \"power-bank-block\",\n \"POWER_BANK_OUTLINE\": \"power-bank-outline\",\n \"POWER_BANK_PROHIBITED\": \"power-bank-prohibited\",\n \"POWER_BANK\": \"power-bank\",\n \"POWER_BLOCK\": \"power-block\",\n \"POWER_OUTLINE\": \"power-outline\",\n \"POWER\": \"power\",\n \"PRE_ORDER_BLOCK\": \"pre-order-block\",\n \"PRE_ORDER_OUTLINE\": \"pre-order-outline\",\n \"PRE_ORDER\": \"pre-order\",\n \"PREMIUM_ECONOMY_BLOCK\": \"premium-economy-block\",\n \"PREMIUM_ECONOMY_OUTLINE\": \"premium-economy-outline\",\n \"PREMIUM_ECONOMY\": \"premium-economy\",\n \"PRICE_BLOCK\": \"price-block\",\n \"PRICE_OUTLINE\": \"price-outline\",\n \"PRICE\": \"price\",\n \"PRINT_BAG_TAG_BLOCK\": \"print-bag-tag-block\",\n \"PRINT_BAG_TAG_OUTLINE\": \"print-bag-tag-outline\",\n \"PRINT_BAG_TAG\": \"print-bag-tag\",\n \"PRIORITY_CHECK_IN_BLOCK\": \"priority-check-in-block\",\n \"PRIORITY_CHECK_IN_OUTLINE\": \"priority-check-in-outline\",\n \"PRIORITY_CHECK_IN\": \"priority-check-in\",\n \"PRIORITY_SECURITY_BLOCK\": \"priority-security-block\",\n \"PRIORITY_SECURITY_OUTLINE\": \"priority-security-outline\",\n \"PRIORITY_SECURITY\": \"priority-security\",\n \"QRCODE_BLOCK\": \"qrcode-block\",\n \"QRCODE_OUTLINE\": \"qrcode-outline\",\n \"QRCODE\": \"qrcode\",\n \"RADIOACTIVE_PROHIBITED\": \"radioactive-prohibited\",\n \"RADIOACTIVE\": \"radioactive\",\n \"RADIOBUTTON_INVERTED_FILLED\": \"radiobutton-inverted-filled\",\n \"RADIOBUTTON_SELECTED\": \"radiobutton-selected\",\n \"RADIOBUTTON_UNSELECTED\": \"radiobutton-unselected\",\n \"RE_FOCUS_BLOCK\": \"re-focus-block\",\n \"RE_FOCUS_OUTLINE\": \"re-focus-outline\",\n \"RE_FOCUS\": \"re-focus\",\n \"RENTAL_CAR_BLOCK\": \"rental-car-block\",\n \"RENTAL_CAR_OUTLINE\": \"rental-car-outline\",\n \"RENTAL_CAR\": \"rental-car\",\n \"RESERVATION_BLOCK\": \"reservation-block\",\n \"RESERVATION_OUTLINE\": \"reservation-outline\",\n \"RESERVATION\": \"reservation\",\n \"REST_BLOCK\": \"rest-block\",\n \"REST_OUTLINE\": \"rest-outline\",\n \"REST\": \"rest\",\n \"RETURN_TRIP_BLOCK\": \"return-trip-block\",\n \"RETURN_TRIP_OUTLINE\": \"return-trip-outline\",\n \"RETURN_TRIP\": \"return-trip\",\n \"RIDE_SHARE_BLOCK\": \"ride-share-block\",\n \"RIDE_SHARE_OUTLINE\": \"ride-share-outline\",\n \"RIDE_SHARE\": \"ride-share\",\n \"SAF_BLOCK\": \"saf-block\",\n \"SAF_OUTLINE\": \"saf-outline\",\n \"SAF\": \"saf\",\n \"SAVE_TIME\": \"save-time\",\n \"SCOOTER_PROHIBITED\": \"scooter-prohibited\",\n \"SCOOTER\": \"scooter\",\n \"SEAFOOD_BLOCK\": \"seafood-block\",\n \"SEAFOOD_OUTLINE\": \"seafood-outline\",\n \"SEAFOOD\": \"seafood\",\n \"SEARCH_BLOCK\": \"search-block\",\n \"SEARCH_OUTLINE\": \"search-outline\",\n \"SEARCH\": \"search\",\n \"SEAT_OR_ECONOMY_BLOCK\": \"seat-or-economy-block\",\n \"SEAT_OR_ECONOMY_OUTLINE\": \"seat-or-economy-outline\",\n \"SEAT_OR_ECONOMY\": \"seat-or-economy\",\n \"SEATBELTS_OFF_BLOCK\": \"seatbelts-off-block\",\n \"SEATBELTS_OFF_OUTLINE\": \"seatbelts-off-outline\",\n \"SEATBELTS_OFF\": \"seatbelts-off\",\n \"SEATBELTS_ON_BLOCK\": \"seatbelts-on-block\",\n \"SEATBELTS_ON_OUTLINE\": \"seatbelts-on-outline\",\n \"SEATBELTS_ON\": \"seatbelts-on\",\n \"SECURE_PAYMENT_BLOCK\": \"secure-payment-block\",\n \"SECURE_PAYMENT_OUTLINE\": \"secure-payment-outline\",\n \"SECURE_PAYMENT\": \"secure-payment\",\n \"SECURITY_BLOCK\": \"security-block\",\n \"SECURITY_OUTLINE\": \"security-outline\",\n \"SECURITY\": \"security\",\n \"SERVICE_DESK_BLOCK\": \"service-desk-block\",\n \"SERVICE_DESK_OUTLINE\": \"service-desk-outline\",\n \"SERVICE_DESK\": \"service-desk\",\n \"SETTINGS_BLOCK\": \"settings-block\",\n \"SETTINGS_OUTLINE\": \"settings-outline\",\n \"SETTINGS\": \"settings\",\n \"SEVEN_BLOCK\": \"seven-block\",\n \"SEVEN_OUTLINE\": \"seven-outline\",\n \"SEVEN\": \"seven\",\n \"SHARE_ANDROID_BLOCK\": \"share-android-block\",\n \"SHARE_ANDROID_OUTLINE\": \"share-android-outline\",\n \"SHARE_ANDROID\": \"share-android\",\n \"SHARP_OBJECTS_PROHIBITED\": \"sharp-objects-prohibited\",\n \"SHARP_OBJECTS\": \"sharp-objects\",\n \"SHOPPING_CART_ACTIVE\": \"shopping-cart-active\",\n \"SHOPPING_CART_BLOCK\": \"shopping-cart-block\",\n \"SHOPPING_CART_OUTLINE\": \"shopping-cart-outline\",\n \"SHOPPING_CART\": \"shopping-cart\",\n \"SHOWER_BLOCK\": \"shower-block\",\n \"SHOWER_OUTLINE\": \"shower-outline\",\n \"SHOWER\": \"shower\",\n \"SINGLE_PAX_BLOCK\": \"single-pax-block\",\n \"SINGLE_PAX_OUTLINE\": \"single-pax-outline\",\n \"SINGLE_PAX\": \"single-pax\",\n \"SIX_BLOCK\": \"six-block\",\n \"SIX_OUTLINE\": \"six-outline\",\n \"SIX\": \"six\",\n \"SKIP_15S_BACK_BLOCK\": \"skip-15s-back-block\",\n \"SKIP_15S_BACK_OUTLINE\": \"skip-15s-back-outline\",\n \"SKIP_15S_BACK\": \"skip-15s-back\",\n \"SKIP_15S_FORWARD_BLOCK\": \"skip-15s-forward-block\",\n \"SKIP_15S_FORWARD_OUTLINE\": \"skip-15s-forward-outline\",\n \"SKIP_15S_FORWARD\": \"skip-15s-forward\",\n \"SKIS_BLOCK\": \"skis-block\",\n \"SKIS_OUTLINE\": \"skis-outline\",\n \"SKIS\": \"skis\",\n \"SMOKING_BLOCK\": \"smoking-block\",\n \"SMOKING_OUTLINE\": \"smoking-outline\",\n \"SMOKING_PROHIBITED\": \"smoking-prohibited\",\n \"SMOKING\": \"smoking\",\n \"SNACKS_BLOCK\": \"snacks-block\",\n \"SNACKS_OUTLINE\": \"snacks-outline\",\n \"SNACKS\": \"snacks\",\n \"SORT_ASCENDING_BLOCK\": \"sort-ascending-block\",\n \"SORT_ASCENDING_OUTLINE\": \"sort-ascending-outline\",\n \"SORT_ASCENDING\": \"sort-ascending\",\n \"SORT_BLOCK\": \"sort-block\",\n \"SORT_DESCENDING_BLOCK\": \"sort-descending-block\",\n \"SORT_DESCENDING_OUTLINE\": \"sort-descending-outline\",\n \"SORT_DESCENDING\": \"sort-descending\",\n \"SORT_OUTLINE\": \"sort-outline\",\n \"SORT\": \"sort\",\n \"SPARE_LITHIUM_BATTERIES\": \"spare-lithium-batteries\",\n \"SPARKLING_WINE_BLOCK\": \"sparkling-wine-block\",\n \"SPARKLING_WINE_GLASS_BLOCK\": \"sparkling-wine-glass-block\",\n \"SPARKLING_WINE_GLASS_OUTLINE\": \"sparkling-wine-glass-outline\",\n \"SPARKLING_WINE_GLASS\": \"sparkling-wine-glass\",\n \"SPARKLING_WINE_OUTLINE\": \"sparkling-wine-outline\",\n \"SPARKLING_WINE\": \"sparkling-wine\",\n \"SPORTS_EQUIPMENT_BLOCK\": \"sports-equipment-block\",\n \"SPORTS_EQUIPMENT_OUTLINE\": \"sports-equipment-outline\",\n \"SPORTS_EQUIPMENT\": \"sports-equipment\",\n \"STAR_BLOCK\": \"star-block\",\n \"STAR_OUTLINE\": \"star-outline\",\n \"STAR\": \"star\",\n \"STOPOVER_BLOCK\": \"stopover-block\",\n \"STOPOVER_OUTLINE\": \"stopover-outline\",\n \"STOPOVER\": \"stopover\",\n \"SUBTITLES_BLOCK\": \"subtitles-block\",\n \"SUBTITLES_OUTLINE\": \"subtitles-outline\",\n \"SUBTITLES\": \"subtitles\",\n \"SURFBOARD_BLOCK\": \"surfboard-block\",\n \"SURFBOARD_OUTLINE\": \"surfboard-outline\",\n \"SURFBOARD\": \"surfboard\",\n \"SUSTAINABILITY_BLOCK\": \"sustainability-block\",\n \"SUSTAINABILITY_OUTLINE\": \"sustainability-outline\",\n \"SUSTAINABILITY\": \"sustainability\",\n \"SWITCH_FLIGHTS_BLOCK\": \"switch-flights-block\",\n \"SWITCH_FLIGHTS_OUTLINE\": \"switch-flights-outline\",\n \"SWITCH_FLIGHTS\": \"switch-flights\",\n \"TABLET_BLOCK\": \"tablet-block\",\n \"TABLET_OUTLINE\": \"tablet-outline\",\n \"TABLET\": \"tablet\",\n \"TAIL_BLOCK\": \"tail-block\",\n \"TAIL_OUTLINE\": \"tail-outline\",\n \"TAIL\": \"tail\",\n \"TAXI_BLOCK\": \"taxi-block\",\n \"TAXI_OUTLINE\": \"taxi-outline\",\n \"TAXI\": \"taxi\",\n \"TAZER_PROHIBITED\": \"tazer-prohibited\",\n \"TAZER\": \"tazer\",\n \"TEA_BLOCK\": \"tea-block\",\n \"TEA_OUTLINE\": \"tea-outline\",\n \"TEA\": \"tea\",\n \"THREE_BLOCK\": \"three-block\",\n \"THREE_OUTLINE\": \"three-outline\",\n \"THREE\": \"three\",\n \"TICKET_REFUND_BLOCK\": \"ticket-refund-block\",\n \"TICKET_REFUND_OUTLINE\": \"ticket-refund-outline\",\n \"TICKET_REFUND\": \"ticket-refund\",\n \"TIER_POINTS_BLOCK\": \"tier-points-block\",\n \"TIER_POINTS_OUTLINE\": \"tier-points-outline\",\n \"TIER_POINTS\": \"tier-points\",\n \"TIER_PROGRESS_BLOCK\": \"tier-progress-block\",\n \"TIER_PROGRESS_OUTLINE\": \"tier-progress-outline\",\n \"TIER_PROGRESS\": \"tier-progress\",\n \"TIKTOK_BLOCK\": \"tiktok-block\",\n \"TIKTOK_OUTLINE\": \"tiktok-outline\",\n \"TIKTOK\": \"tiktok\",\n \"TIME_ZONE_BLOCK\": \"time-zone-block\",\n \"TIME_ZONE_OUTLINE\": \"time-zone-outline\",\n \"TIME_ZONE\": \"time-zone\",\n \"TIMETABLE\": \"timetable\",\n \"TOOLS_AND_BLUNT_INSTRUMENTS_PROHIBITED\": \"tools-and-blunt-instruments-prohibited\",\n \"TOOLS_AND_BLUNT_INSTRUMENTS\": \"tools-and-blunt-instruments\",\n \"TRACK_PLAYING_BLOCK\": \"track-playing-block\",\n \"TRACK_PLAYING_OUTLINE\": \"track-playing-outline\",\n \"TRACK_PLAYING\": \"track-playing\",\n \"TRAIN_BLOCK\": \"train-block\",\n \"TRAIN_OUTLINE\": \"train-outline\",\n \"TRAIN\": \"train\",\n \"TRANSFER_LOADER_BLOCK\": \"transfer-loader-block\",\n \"TRANSFER_LOADER_OUTLINE\": \"transfer-loader-outline\",\n \"TRANSFER_LOADER\": \"transfer-loader\",\n \"TRASH_BLOCK\": \"trash-block\",\n \"TRASH_OUTLINE\": \"trash-outline\",\n \"TRASH\": \"trash\",\n \"TRAVEL_DOCUMENTS_BLOCK\": \"travel-documents-block\",\n \"TRAVEL_DOCUMENTS_OUTLINE\": \"travel-documents-outline\",\n \"TRAVEL_DOCUMENTS\": \"travel-documents\",\n \"TRAVEL_INSURANCE_BLOCK\": \"travel-insurance-block\",\n \"TRAVEL_INSURANCE_OUTLINE\": \"travel-insurance-outline\",\n \"TRAVEL_INSURANCE\": \"travel-insurance\",\n \"TREATS_BLOCK\": \"treats-block\",\n \"TREATS_OUTLINE\": \"treats-outline\",\n \"TREATS\": \"treats\",\n \"TRENDING_ARROW_UP\": \"trending-arrow-up\",\n \"TWITTER\": \"twitter\",\n \"TWO_BLOCK\": \"two-block\",\n \"TWO_OUTLINE\": \"two-outline\",\n \"TWO\": \"two\",\n \"UPDATE_BLOCK\": \"update-block\",\n \"UPDATE_CART_BLOCK\": \"update-cart-block\",\n \"UPDATE_CART_OUTLINE\": \"update-cart-outline\",\n \"UPDATE_CART\": \"update-cart\",\n \"UPDATE_OUTLINE\": \"update-outline\",\n \"UPDATE\": \"update\",\n \"UPGRADE_BLOCK\": \"upgrade-block\",\n \"UPGRADE_OUTLINE\": \"upgrade-outline\",\n \"UPGRADE\": \"upgrade\",\n \"UPLOAD_BLOCK\": \"upload-block\",\n \"UPLOAD_OUTLINE\": \"upload-outline\",\n \"UPLOAD\": \"upload\",\n \"VAT_RECEIPT_DOWNLOAD_BLOCK\": \"vat-receipt-download-block\",\n \"VAT_RECEIPT_DOWNLOAD_OUTLINE\": \"vat-receipt-download-outline\",\n \"VAT_RECEIPT_DOWNLOAD\": \"vat-receipt-download\",\n \"VIDEO_SERIES_BLOCK\": \"video-series-block\",\n \"VIDEO_SERIES_OUTLINE\": \"video-series-outline\",\n \"VIDEO_SERIES\": \"video-series\",\n \"VISIBLE_BLOCK\": \"visible-block\",\n \"VISIBLE_OUTLINE\": \"visible-outline\",\n \"VISIBLE\": \"visible\",\n \"VOLUME_BLOCK\": \"volume-block\",\n \"VOLUME_LOW_BLOCK\": \"volume-low-block\",\n \"VOLUME_LOW_OUTLINE\": \"volume-low-outline\",\n \"VOLUME_LOW\": \"volume-low\",\n \"VOLUME_MEDIUM_BLOCK\": \"volume-medium-block\",\n \"VOLUME_MEDIUM_OUTLINE\": \"volume-medium-outline\",\n \"VOLUME_MEDIUM\": \"volume-medium\",\n \"VOLUME_MUTE_BLOCK\": \"volume-mute-block\",\n \"VOLUME_MUTE_OUTLINE\": \"volume-mute-outline\",\n \"VOLUME_MUTE\": \"volume-mute\",\n \"VOLUME_OUTLINE\": \"volume-outline\",\n \"VOLUME\": \"volume\",\n \"VOUCHER_BLOCK\": \"voucher-block\",\n \"VOUCHER_OUTLINE\": \"voucher-outline\",\n \"VOUCHER\": \"voucher\",\n \"WALLET_CLOSED_BLOCK\": \"wallet-closed-block\",\n \"WALLET_CLOSED_OUTLINE\": \"wallet-closed-outline\",\n \"WALLET_CLOSED\": \"wallet-closed\",\n \"WALLET_OPEN_BLOCK\": \"wallet-open-block\",\n \"WALLET_OPEN_OUTLINE\": \"wallet-open-outline\",\n \"WALLET_OPEN\": \"wallet-open\",\n \"WATER_BLOCK\": \"water-block\",\n \"WATER_OUTLINE\": \"water-outline\",\n \"WATER\": \"water\",\n \"WECHAT\": \"wechat\",\n \"WEIBO\": \"weibo\",\n \"WELLBEING_BLOCK\": \"wellbeing-block\",\n \"WELLBEING_OUTLINE\": \"wellbeing-outline\",\n \"WELLBEING\": \"wellbeing\",\n \"WHATSAPP_BLOCK\": \"whatsapp-block\",\n \"WHATSAPP_OUTLINE\": \"whatsapp-outline\",\n \"WHATSAPP\": \"whatsapp\",\n \"WIFI_AIRCRAFT\": \"wifi-aircraft\",\n \"WIFI_BLOCK\": \"wifi-block\",\n \"WIFI_LOW_BLOCK\": \"wifi-low-block\",\n \"WIFI_LOW_OUTLINE\": \"wifi-low-outline\",\n \"WIFI_LOW\": \"wifi-low\",\n \"WIFI_MEDIUM_BLOCK\": \"wifi-medium-block\",\n \"WIFI_MEDIUM_OUTLINE\": \"wifi-medium-outline\",\n \"WIFI_MEDIUM\": \"wifi-medium\",\n \"WIFI_OFFLINE_BLOCK\": \"wifi-offline-block\",\n \"WIFI_OFFLINE_OUTLINE\": \"wifi-offline-outline\",\n \"WIFI_OFFLINE\": \"wifi-offline\",\n \"WIFI_OUTLINE\": \"wifi-outline\",\n \"WIFI\": \"wifi\",\n \"WINE_BLOCK\": \"wine-block\",\n \"WINE_GLASS_BLOCK\": \"wine-glass-block\",\n \"WINE_GLASS_OUTLINE\": \"wine-glass-outline\",\n \"WINE_GLASS\": \"wine-glass\",\n \"WINE_OUTLINE\": \"wine-outline\",\n \"WINE\": \"wine\",\n \"WORLD_MAP_BLOCK\": \"world-map-block\",\n \"WORLD_MAP_OUTLINE\": \"world-map-outline\",\n \"WORLD_MAP\": \"world-map\",\n \"X_BLOCK\": \"x-block\",\n \"X_OUTLINE\": \"x-outline\",\n \"X\": \"x\",\n \"YOUKU\": \"youku\",\n \"YOUTUBE\": \"youtube\",\n \"ZERO_BLOCK\": \"zero-block\",\n \"ZERO_OUTLINE\": \"zero-outline\",\n \"ZERO\": \"zero\"\n};\n\nmodule.exports.TailsIcon = {\n \"TAIL_3K\": \"tail_3k\",\n \"TAIL_6I\": \"tail_6i\",\n \"TAIL_9W\": \"tail_9w\",\n \"TAIL_A3\": \"tail_a3\",\n \"TAIL_AA\": \"tail_aa\",\n \"TAIL_AB\": \"tail_ab\",\n \"TAIL_AF\": \"tail_af\",\n \"TAIL_AI\": \"tail_ai\",\n \"TAIL_AS\": \"tail_as\",\n \"TAIL_AT\": \"tail_at\",\n \"TAIL_AY\": \"tail_ay\",\n \"TAIL_AZ\": \"tail_az\",\n \"TAIL_B6\": \"tail_b6\",\n \"TAIL_BA\": \"tail_ba\",\n \"TAIL_BR\": \"tail_br\",\n \"TAIL_BT\": \"tail_bt\",\n \"TAIL_BUS\": \"tail_bus\",\n \"TAIL_CA\": \"tail_ca\",\n \"TAIL_CI\": \"tail_ci\",\n \"TAIL_CX\": \"tail_cx\",\n \"TAIL_CZ\": \"tail_cz\",\n \"TAIL_DX\": \"tail_dx\",\n \"TAIL_EI\": \"tail_ei\",\n \"TAIL_EK\": \"tail_ek\",\n \"TAIL_ET\": \"tail_et\",\n \"TAIL_FI\": \"tail_fi\",\n \"TAIL_FJ\": \"tail_fj\",\n \"TAIL_GA\": \"tail_ga\",\n \"TAIL_GL\": \"tail_gl\",\n \"TAIL_HO\": \"tail_ho\",\n \"TAIL_HU\": \"tail_hu\",\n \"TAIL_IB\": \"tail_ib\",\n \"TAIL_IG\": \"tail_ig\",\n \"TAIL_JL\": \"tail_jl\",\n \"TAIL_JP\": \"tail_jp\",\n \"TAIL_JQ\": \"tail_jq\",\n \"TAIL_JU\": \"tail_ju\",\n \"TAIL_KA\": \"tail_ka\",\n \"TAIL_KE\": \"tail_ke\",\n \"TAIL_KL\": \"tail_kl\",\n \"TAIL_KM\": \"tail_km\",\n \"TAIL_LA\": \"tail_la\",\n \"TAIL_LG\": \"tail_lg\",\n \"TAIL_LH\": \"tail_lh\",\n \"TAIL_LM\": \"tail_lm\",\n \"TAIL_LO\": \"tail_lo\",\n \"TAIL_LX\": \"tail_lx\",\n \"TAIL_MH\": \"tail_mh\",\n \"TAIL_MI\": \"tail_mi\",\n \"TAIL_MU\": \"tail_mu\",\n \"TAIL_NT\": \"tail_nt\",\n \"TAIL_NZ\": \"tail_nz\",\n \"TAIL_OK\": \"tail_ok\",\n \"TAIL_OO\": \"tail_oo\",\n \"TAIL_OS\": \"tail_os\",\n \"TAIL_OU\": \"tail_ou\",\n \"TAIL_OZ\": \"tail_oz\",\n \"TAIL_PG\": \"tail_pg\",\n \"TAIL_PR\": \"tail_pr\",\n \"TAIL_PS\": \"tail_ps\",\n \"TAIL_QF\": \"tail_qf\",\n \"TAIL_QR\": \"tail_qr\",\n \"TAIL_RJ\": \"tail_rj\",\n \"TAIL_S7\": \"tail_s7\",\n \"TAIL_SB\": \"tail_sb\",\n \"TAIL_SK\": \"tail_sk\",\n \"TAIL_SN\": \"tail_sn\",\n \"TAIL_SQ\": \"tail_sq\",\n \"TAIL_SU\": \"tail_su\",\n \"TAIL_SV\": \"tail_sv\",\n \"TAIL_TF\": \"tail_tf\",\n \"TAIL_TG\": \"tail_tg\",\n \"TAIL_TK\": \"tail_tk\",\n \"TAIL_TN\": \"tail_tn\",\n \"TAIL_TP\": \"tail_tp\",\n \"TAIL_TRN\": \"tail_trn\",\n \"TAIL_UK\": \"tail_uk\",\n \"TAIL_UL\": \"tail_ul\",\n \"TAIL_VN\": \"tail_vn\",\n \"TAIL_WF\": \"tail_wf\",\n \"TAIL_WY\": \"tail_wy\"\n};module.exports.IconLibrary = {\n \"CUSTOM\": \"custom\",\n \"PAYMENTS\": \"payments\",\n \"SVG_LIBRARY\": \"svg-library\",\n \"TAILS\": \"tails\"\n};","import { Component, Input, OnDestroy, Output, EventEmitter } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { NavigationMenuService } from '../../../../services';\n\n@Component({\n selector: 'fin-navigation-trigger',\n styleUrls: ['./navigation-trigger.component.scss'],\n templateUrl: './navigation-trigger.component.html',\n})\nexport class NavigationTriggerComponent implements OnDestroy {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n isNavigationMenuOpen$: Observable<boolean>;\n isOpen: boolean;\n\n @Input()\n whiteIcon = false;\n\n @Output()\n toggleMenuGtmEvent: EventEmitter<Event> = new EventEmitter<Event>();\n private subscription: Subscription = new Subscription();\n\n constructor(private navigationMenuService: NavigationMenuService) {\n this.isNavigationMenuOpen$ = this.navigationMenuService.isNavigationMenuOpen$;\n this.subscription.add(this.isNavigationMenuOpen$.subscribe((isOpen) => (this.isOpen = isOpen)));\n }\n\n toggleMenu(_event: any): void {\n this.navigationMenuService.toggleMenuOpen();\n this.toggleMenuGtmEvent.emit();\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n}\n","<button class=\"btn--no-outline focus-inset flex flex--center\" (click)=\"toggleMenu($event)\">\n <span [class.open]=\"isOpen\" class=\"menu-icon\" [class.menu-icon--white]=\"whiteIcon\">\n <span class=\"is-vishidden\">{{ (isOpen ? 'menu.close' : 'menu.open') | finLocalization }}</span>\n <fcom-icon class=\"menu icon-medium\" [name]=\"SvgLibraryIcon.MENU_LIST\"></fcom-icon>\n <fcom-icon class=\"chevron icon-medium\" [name]=\"SvgLibraryIcon.CHEVRON_LEFT\"></fcom-icon>\n </span>\n</button>\n","export interface Trip {\n journeys: Journey[];\n passengers: Passengers[];\n lastName: string;\n recLoc: string;\n}\n\nexport interface OutboundJourney {\n departure: string;\n arrival: string;\n scheduledDateTime: string;\n scheduledDateTimeUnix: number;\n passengerAmount: number;\n bookingRef: string;\n mmbLink: string;\n}\n\nexport interface Journey {\n departure: FlightDetail;\n arrival: FlightDetail;\n passengerAmount?: number;\n recLoc: string;\n}\n\nexport interface Passengers {\n firstName?: string;\n lastName: string;\n passengerNum?: string;\n}\n\ninterface FlightDetail {\n airport: string;\n airportName: string;\n municipality: string;\n scheduledDateTime: string;\n}\n\nexport enum AddFrequentFlyerError {\n PASSENGER_NOT_FOUND = 'passenger_not_found',\n BOOKING_NOT_FOUND = 'booking_not_found',\n ALREADY_EXISTS = 'other_ff_already_exists',\n GROUP_BOOKING = 'group_booking',\n}\n\nexport interface AddFrequentFlyerResponse {\n status: {\n code: number;\n status: string;\n message: string;\n };\n error?: {\n status: {\n message: AddFrequentFlyerError;\n };\n };\n}\n","import { OperatorFunction, ObservableInputTuple } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\n\nexport function withLatestFrom<T, O extends unknown[]>(...inputs: [...ObservableInputTuple<O>]): OperatorFunction<T, [T, ...O]>;\n\nexport function withLatestFrom<T, O extends unknown[], R>(\n ...inputs: [...ObservableInputTuple<O>, (...value: [T, ...O]) => R]\n): OperatorFunction<T, R>;\n\n/**\n * Combines the source Observable with other Observables to create an Observable\n * whose values are calculated from the latest values of each, only when the\n * source emits.\n *\n * <span class=\"informal\">Whenever the source Observable emits a value, it\n * computes a formula using that value plus the latest values from other input\n * Observables, then emits the output of that formula.</span>\n *\n * ![](withLatestFrom.png)\n *\n * `withLatestFrom` combines each value from the source Observable (the\n * instance) with the latest values from the other input Observables only when\n * the source emits a value, optionally using a `project` function to determine\n * the value to be emitted on the output Observable. All input Observables must\n * emit at least one value before the output Observable will emit a value.\n *\n * ## Example\n *\n * On every click event, emit an array with the latest timer event plus the click event\n *\n * ```ts\n * import { fromEvent, interval, withLatestFrom } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const timer = interval(1000);\n * const result = clicks.pipe(withLatestFrom(timer));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link combineLatest}\n *\n * @param inputs An input Observable to combine with the source Observable. More\n * than one input Observables may be given as argument. If the last parameter is\n * a function, it will be used as a projection function for combining values\n * together. When the function is called, it receives all values in order of the\n * Observables passed, where the first parameter is a value from the source\n * Observable. (e.g.\n * `a.pipe(withLatestFrom(b, c), map(([a1, b1, c1]) => a1 + b1 + c1))`). If this\n * is not passed, arrays will be emitted on the output Observable.\n * @return A function that returns an Observable of projected values from the\n * most recent values from each input Observable, or an array of the most\n * recent values from each input Observable.\n */\nexport function withLatestFrom<T, R>(...inputs: any[]): OperatorFunction<T, R | any[]> {\n const project = popResultSelector(inputs) as ((...args: any[]) => R) | undefined;\n\n return operate((source, subscriber) => {\n const len = inputs.length;\n const otherValues = new Array(len);\n // An array of whether or not the other sources have emitted. Matched with them by index.\n // TODO: At somepoint, we should investigate the performance implications here, and look\n // into using a `Set()` and checking the `size` to see if we're ready.\n let hasValue = inputs.map(() => false);\n // Flipped true when we have at least one value from all other sources and\n // we are ready to start emitting values.\n let ready = false;\n\n // Other sources. Note that here we are not checking `subscriber.closed`,\n // this causes all inputs to be subscribed to, even if nothing can be emitted\n // from them. This is an important distinction because subscription constitutes\n // a side-effect.\n for (let i = 0; i < len; i++) {\n innerFrom(inputs[i]).subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n // If we're not ready yet, flag to show this observable has emitted.\n hasValue[i] = true;\n // Intentionally terse code.\n // If all of our other observables have emitted, set `ready` to `true`,\n // so we know we can start emitting values, then clean up the `hasValue` array,\n // because we don't need it anymore.\n (ready = hasValue.every(identity)) && (hasValue = null!);\n }\n },\n // Completing one of the other sources has\n // no bearing on the completion of our result.\n noop\n )\n );\n }\n\n // Source subscription\n source.subscribe(\n createOperatorSubscriber(subscriber, (value) => {\n if (ready) {\n // We have at least one value from the other sources. Go ahead and emit.\n const values = [value, ...otherValues];\n subscriber.next(project ? project(...values) : values);\n }\n })\n );\n });\n}\n","/**\n * This is the width that is used for devices not supporting srcSet attribute. Found on every crop ratio.\n */\nexport const FALLBACK_WIDTH = 768;\n\n/**\n * This is the width we use for initial default image as thumbnail\n */\nexport const THUMBNAIL_WIDTH = 40;\n\n/**\n * ImageWidths to request and use for responsive sizing.\n * Sorted high to low\n */\nexport const IMAGE_WIDTHS = [1920, 1200, 1024, 768, 608, 600, 320, 300, 144];\n","<ng-template #pricePromo let-price=\"price\" let-type=\"type\" let-isInCampaign=\"campaign\">\n <div class=\"price-promo-text ps-xxsmall-t\" *ngIf=\"price && type\">\n <div class=\"promo__price-from light-type font-body-2 nordic-blue-900-text\" [class.align-right]=\"!isInCampaign\">\n <div>{{ 'travelType.' + type | finLocalization }}</div>\n </div>\n </div>\n <div\n class=\"price-promo-value heather-700-text font-heading-3 flex flex--self-center\"\n *ngIf=\"price && type\"\n [attr.data-testid]=\"'hero-price-' + type\"\n >\n {{ price | finPrice: { roundPrice: true } }}\n </div>\n</ng-template>\n\n<section class=\"hero pr-small-t\">\n <div class=\"hero__top grid-col-12 grid-max-width no-row-gap\">\n <div class=\"hero__top-left mr-medium-b col-1-12 sm-col-1-6 flex--self-start\">\n <!--\n TODO: Phase 2, destination main page\n <div>Button to go back</div>\n -->\n <h1 data-testid=\"destination-hero-title\" class=\"font-heading-3\">\n <div class=\"hero__top-lead font-body-1 nordic-blue-900-text light-type\">\n {{ 'flightsTo' | finLocalization }}\n </div>\n <div class=\"hero__top-destination font-heading-1 nordic-blue-900-text\">\n {{ title }}\n </div>\n </h1>\n </div>\n <div\n class=\"hero__top-right promo mr-medium-b col-1-12 sm-col-7-12\"\n *ngIf=\"destinationCode | finCheapestPricePipe: originLocationCode$ | async as prices\"\n >\n <ng-container *ngIf=\"selectedOriginLocationName$ | async as selectedOriginLocationName\">\n <div class=\"flex bold-type\" data-testid=\"hero-promo-best-price-container\">\n <div [class.promo__prices-wrapper]=\"!isInCampaign\">\n <div\n *ngIf=\"!isInCampaign\"\n class=\"font-body-1 nordic-blue-900-text\"\n data-testid=\"hero-promo-best-price-label\"\n >\n {{ 'economyClass' | finLocalization }}\n </div>\n <div\n *ngIf=\"isInCampaign\"\n class=\"font-body-1 white-text\"\n [class.black-bg]=\"enableBlackTeaser\"\n [class.heather-700-bg]=\"!enableBlackTeaser\"\n data-testid=\"hero-campaign-badge\"\n >\n <p class=\"ps-xsmall\">\n {{ 'destinationSearch.' + campaignLabel | finLocalization }}\n {{ campaignEndText }}\n </p>\n </div>\n <div class=\"promo__prices grid-col-12 ps-xxsmall-t ps-clear-x no-row-gap\" [class.campaign]=\"isInCampaign\">\n <ng-container *ngIf=\"showOneWayPrice$ | async\">\n <ng-container\n *ngTemplateOutlet=\"\n pricePromo;\n context: {\n price: prices[TripType.ONEWAY],\n type: CmsTripTypeMap[TripType.ONEWAY],\n isInCampaign: isInCampaign,\n }\n \"\n ></ng-container>\n </ng-container>\n <ng-container\n *ngTemplateOutlet=\"\n pricePromo;\n context: {\n price: prices[TripType.RETURN],\n type: CmsTripTypeMap[TripType.RETURN],\n isInCampaign: isInCampaign,\n }\n \"\n ></ng-container>\n </div>\n </div>\n </div>\n <div class=\"light-type font-body-2 ms-xxsmall-t nordic-blue-900-text\">\n {{ 'destinationSearch.bestFareForThisDestination' | finLocalization: { origin: selectedOriginLocationName } }}\n </div>\n </ng-container>\n </div>\n </div>\n <cms-full-width-booking-widget\n [backgroundImage]=\"backgroundImage\"\n [locations]=\"[\n { originLocationCode: originLocationCodeFromStore$ | async, destinationLocationCode: destinationCode },\n ]\"\n [enableAward]=\"enableAward\"\n [enableAurinkomatkat]=\"enableAurinkomatkat\"\n [enablePromoCode]=\"enablePromoCode\"\n [contentType]=\"contentType\"\n ></cms-full-width-booking-widget>\n</section>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { combineLatest, distinctUntilChanged, map, Observable, switchMap, tap } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { CmsImageData, Location } from '@fcom/core-api';\nimport { PageMetaService } from '@fcom/common';\nimport { TripType } from '@fcom/core/interfaces';\nimport { SchemaService } from '@fcom/common/services';\nimport { LocationRouteCffService, AppState } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare } from '@fcom/rx';\nimport { ContentType } from '@fcom/common/interfaces';\nimport { globalBookingOrigin } from '@fcom/common/store';\nimport { CmsTripTypeMap } from '@fcom/core/utils/tripType.utils';\n\n/**\n * Hero component for destination page\n *\n * @example\n * <fin-destination-hero\n * [title]=\"\"\n * [backgroundImage]=\"\"\n * [destinationCode]=\"\"\n * [enableAward]=\"\"\n * [enableAurinkomatkat]=\"\"\n * [enablePromoCode]=\"\"\n * >\n * </fin-destination-hero>\n */\n@Component({\n selector: 'fin-destination-hero',\n templateUrl: './destination-hero.component.html',\n styleUrls: ['./destination-hero.component.scss'],\n})\nexport class DestinationHeroComponent implements OnInit {\n readonly TripType = TripType;\n readonly CmsTripTypeMap = CmsTripTypeMap;\n\n @Input()\n title: string;\n @Input()\n backgroundImage: CmsImageData;\n @Input()\n destinationCode: string;\n @Input()\n enableAward: boolean;\n @Input()\n enableAurinkomatkat: boolean;\n @Input()\n enablePromoCode: boolean;\n @Input()\n contentType: ContentType;\n @Input()\n isInCampaign: boolean;\n @Input()\n campaignLabel: string;\n @Input()\n campaignEndText: string;\n @Input()\n enableBlackTeaser: boolean;\n\n selectedOriginLocationName$: Observable<string>;\n showOneWayPrice$: Observable<boolean>;\n origin$: Observable<Location>;\n originLocationCode$: Observable<string>;\n originLocationCodeFromStore$: Observable<string>;\n\n constructor(\n private languageService: LanguageService,\n private locationRouteCffService: LocationRouteCffService,\n private pageMetaService: PageMetaService,\n private store$: Store<AppState>,\n private schemaService: SchemaService\n ) {\n this.originLocationCodeFromStore$ = this.store$.pipe(globalBookingOrigin());\n\n this.origin$ = combineLatest([\n this.originLocationCodeFromStore$,\n this.pageMetaService.defaultOriginLocationCode$,\n ]).pipe(\n switchMap(([selectedOrigin, defaultOrigin]) =>\n this.locationRouteCffService.bestGuessFor(selectedOrigin ?? defaultOrigin, this.languageService.localeValue)\n ),\n distinctUntilChanged(),\n finShare()\n );\n\n this.originLocationCode$ = combineLatest([\n this.origin$,\n this.pageMetaService.defaultOriginLocationCode$,\n this.originLocationCodeFromStore$,\n ]).pipe(\n map(\n ([origin, defaultLocationCode, selectedOrigin]) => selectedOrigin ?? origin.locationCode ?? defaultLocationCode\n )\n );\n\n this.selectedOriginLocationName$ = combineLatest([\n this.pageMetaService.defaultOriginLocationCode$,\n this.origin$,\n ]).pipe(map(([originLocationCode, originLocation]) => originLocation.cityName ?? originLocationCode));\n }\n\n ngOnInit(): void {\n const destination$ = this.locationRouteCffService.bestGuessFor(\n this.destinationCode,\n this.languageService.localeValue\n );\n\n this.showOneWayPrice$ = combineLatest([this.origin$, destination$]).pipe(\n tap(([origin, destination]) => {\n this.schemaService.addFlightSchema({\n departureAirportName: origin.title,\n departureAirportIataCode: origin.locationCode,\n arrivalAirportName: destination.title,\n arrivalAirportIataCode: destination.locationCode,\n });\n }),\n map(([origin, destination]) => origin.continentCode === 'eu' && destination.continentCode === 'eu')\n );\n }\n}\n","<div class=\"flex flex--row stepper\" *ngIf=\"mode === StepperMode.HORIZONTAL\">\n <div\n role=\"tablist\"\n *ngFor=\"let step of steps; let last = last; let index = index\"\n [class.ms-xxsmall-r]=\"!last\"\n [ngClass]=\"{\n 'align-center center flex-1 flex--basis0': showLabels,\n }\"\n >\n <button\n role=\"tab\"\n (click)=\"selectStep($event, steps[index])\"\n [attr.aria-label]=\"step.ariaLabel | finLocalization\"\n [class.inverted]=\"theme === StepperTheme.DARK\"\n [disabled]=\"index > activeStep\"\n >\n <span\n *ngIf=\"showLabels\"\n [ngClass]=\"{\n 'nordic-blue-100-text regular-type': index > activeStep && theme === StepperTheme.LIGHT,\n 'nordic-blue-300-text': index > activeStep && theme === StepperTheme.DARK,\n }\"\n [class.white-text]=\"theme === StepperTheme.DARK\"\n [class.medium-type]=\"index <= activeStep\"\n class=\"block ps-small-b font-body-2\"\n >{{ step.title | finLocalization }}</span\n >\n <div class=\"atom inline-block rounded-large ps-xxsmall-y ps-xxlarge-l center\"></div>\n </button>\n </div>\n</div>\n<div *ngIf=\"mode === StepperMode.RADIAL\" class=\"flex flex--middle\">\n <div\n *ngIf=\"showLabels\"\n class=\"ps-xsmall-r font-body-1 bold-type\"\n [class.nordic-blue-400-text]=\"theme === StepperTheme.LIGHT\"\n [class.white-text]=\"theme === StepperTheme.DARK\"\n >\n {{ steps?.[activeStep]?.title || steps?.[activeStep]?.ariaLabel | finLocalization }}\n </div>\n <div class=\"progress relative\" [class]=\"theme\">\n <svg\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 48 48\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"(activeStep / steps.length) * 100\"\n >\n <circle class=\"progress-bg\" cx=\"24\" cy=\"24\" r=\"22\" stroke-width=\"4\" fill=\"none\" />\n <circle\n class=\"progress-circle\"\n cx=\"24\"\n cy=\"24\"\n r=\"22\"\n [attr.stroke]=\"theme === StepperTheme.LIGHT ? '' : ''\"\n stroke-width=\"4\"\n fill=\"none\"\n stroke-dasharray=\"138.23\"\n stroke-linecap=\"round\"\n [attr.stroke-dashoffset]=\"(1 - (activeStep + 1) / steps.length) * 138.23\"\n transform=\"rotate(-90 24 24)\"\n id=\"progress-circle-bar\"\n />\n </svg>\n <div class=\"progress-text absolute z1 nordic-blue-900-text bold-type font-body-1\">\n {{ activeStep + 1 }}/{{ steps.length }}\n </div>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { stopPropagation } from '@fcom/core/index';\n\nimport { StepperStep } from './interfaces';\nimport { StepperMode, StepperTheme } from './enums';\n\n@Component({\n selector: 'fcom-stepper',\n styleUrls: ['./stepper.component.scss'],\n templateUrl: './stepper.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class StepperComponent {\n readonly StepperTheme = StepperTheme;\n readonly StepperMode = StepperMode;\n\n @Input()\n showLabels = true;\n\n @Input()\n steps: StepperStep[] = [];\n\n @Input()\n activeStep = 0;\n\n @Input()\n theme = StepperTheme.LIGHT;\n\n @Input()\n mode = StepperMode.HORIZONTAL;\n\n @Output()\n clicked: EventEmitter<StepperStep> = new EventEmitter<StepperStep>();\n\n selectStep(event: Event, step: StepperStep): void {\n stopPropagation(event);\n this.clicked.emit(step);\n }\n}\n","<div class=\"flex\">\n <button\n [ngClass]=\"{ 'control-box pr-xxsmall-x': buttonPadding }\"\n [class.nordic-blue-900-text]=\"model > min\"\n [class.btn--disabled]=\"model === min\"\n (click)=\"decrease($event)\"\n [attr.aria-disabled]=\"model === min\"\n [attr.aria-label]=\"decreaseLabel\"\n [attr.aria-controls]=\"controls\"\n data-testid=\"plus-minus-button-decrease\"\n >\n <span class=\"circle inline-block\">\n <fcom-icon [ngClass]=\"iconSize\" [name]=\"SvgLibraryIcon.MINUS_OUTLINE\"></fcom-icon>\n </span>\n </button>\n <div class=\"control-box align-center flex flex--column flex--center\" aria-live=\"polite\">\n <span\n class=\"block\"\n [ngClass]=\"textSize\"\n [class.nordic-blue-900-text]=\"model >= min && model > 0\"\n [class.grey-600-text]=\"model === 0\"\n >\n {{ title }}\n </span>\n <span *ngIf=\"description\" class=\"block font-body-1 nordic-blue-900-text\">\n {{ description | finEmpty }}\n </span>\n </div>\n <button\n [ngClass]=\"{ 'control-box pr-xxsmall-x': buttonPadding }\"\n [class.nordic-blue-900-text]=\"model < max\"\n [class.btn--disabled]=\"model === max\"\n (click)=\"increase($event)\"\n [attr.aria-disabled]=\"model === max\"\n [attr.aria-label]=\"increaseLabel\"\n [attr.aria-controls]=\"controls\"\n data-testid=\"plus-minus-button-increase\"\n >\n <span class=\"circle inline-block\">\n <fcom-icon [ngClass]=\"iconSize\" [name]=\"SvgLibraryIcon.PLUS_OUTLINE\"></fcom-icon>\n </span>\n </button>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { stopPropagation } from '@fcom/core/utils';\n\ntype IconSizeUnit = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';\ntype FontSizeUnit =\n | 'heading-1'\n | 'heading-2'\n | 'heading-3'\n | 'heading-4'\n | 'heading-5'\n | 'body-1'\n | 'body-2'\n | 'caption-1';\ntype TextSize = `${'font'}-${FontSizeUnit}`;\ntype IconSize = `${'icon'}-${IconSizeUnit}`;\n\n@Component({\n selector: 'fin-plus-minus-selector',\n styleUrls: ['./plus-minus-selector.component.scss'],\n templateUrl: './plus-minus-selector.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PlusMinusSelectorComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n min: number;\n @Input()\n max: number;\n @Input()\n model: number;\n @Input()\n title: string;\n @Input()\n description: string;\n @Input()\n decreaseLabel: string;\n @Input()\n increaseLabel: string;\n @Input()\n controls: string;\n @Input()\n iconSize?: IconSize = 'icon-large';\n @Input()\n textSize?: TextSize = 'font-heading-5';\n @Input()\n buttonPadding = true;\n\n /**\n * Emits the number the value should be increased with\n * @type {EventEmitter}\n */\n @Output()\n increment: EventEmitter<number> = new EventEmitter<number>();\n\n /**\n * Emits the number the value should be decreased with\n * @type {EventEmitter}\n */\n @Output()\n decrement: EventEmitter<number> = new EventEmitter<number>();\n\n increase(event: Event): void {\n if (this.model < this.max) {\n this.increment.emit(1);\n }\n stopPropagation(event);\n }\n\n decrease(event: Event): void {\n if (this.model > this.min) {\n this.decrement.emit(1);\n }\n stopPropagation(event);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { stripSpaces } from '@fcom/ui-components/utils/string.utils';\n\nconst CARD_NUMBER_LENGTH = 16;\n\n@Pipe({\n name: 'finFormatCardNumber',\n})\nexport class FormatCardNumberPipe implements PipeTransform {\n /**\n * Formats card numbers to a human readable format.\n *\n * @example '1234567812345678' (16) => '1234 5678 1234 5678'\n */\n transform(value: string): string {\n if ('string' !== typeof value) {\n throw new TypeError('Card number must be a string.');\n }\n return this.formatCardNumber(value);\n }\n\n private formatCardNumber(value: string): string {\n return value.length === CARD_NUMBER_LENGTH\n ? stripSpaces(value)\n .match(/.{1,4}/g)\n .join(' ')\n : value;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { OndMarketingDataService } from '@fcom/ond-marketing-landing-core/services';\nimport { UiComponentsModule } from '@fcom/ui-components';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { DestinationSearchService } from './services/destination-search.service';\nimport { AmDestinationService } from './services/am-destination.service';\nimport { AmDestinationContinueModalComponent } from './am-destination-continue-modal/am-destination-continue-modal.component';\n@NgModule({\n imports: [CommonModule, UiComponentsModule, ComponentsModule, UiTranslateModule],\n declarations: [AmDestinationContinueModalComponent],\n exports: [AmDestinationContinueModalComponent],\n providers: [DestinationSearchService, OndMarketingDataService, AmDestinationService],\n})\nexport class DestinationSearchModule {}\n","import { isBlank } from '@fcom/core/utils/utils';\n\nimport { ResponsiveImage, StaticImage } from '.';\n\nexport const buildUrl = (baseUrl = '', parameters: any, joinChar = '&'): string => {\n let urlParamSeparator = '';\n if (!isBlank(baseUrl)) {\n if (!baseUrl.includes('?')) {\n urlParamSeparator = '?';\n } else {\n urlParamSeparator = joinChar;\n }\n }\n return (\n baseUrl +\n urlParamSeparator +\n Object.keys(parameters)\n .map((key) => `${key}=${String(parameters[key])}`)\n .join(joinChar)\n );\n};\n\n/**\n * TypeGuard to distinguish between ResponsiveImage and StaticImage.\n * Returns true if StaticImage\n */\nexport const isStaticImage = (image: ResponsiveImage | StaticImage): image is StaticImage => {\n return (\n !!image && ((image as StaticImage).fullSizeUrl !== undefined || (image as StaticImage).thumbnailSrc !== undefined)\n );\n};\n\nconst gcd = (a: number, b: number): number => (b ? gcd(b, a % b) : a);\n\nexport const aspectRatio = (width: number, height: number): string => {\n const divisor = gcd(width, height);\n\n return `${width / divisor}/${height / divisor}`;\n};\n\n/**\n * Get the max image size Url from the responsiveImageLinksData\n */\nexport const getWidestImageWidth = (imageWidthMap: { [key: number]: string }): number => {\n return Math.max(\n ...Object.keys(imageWidthMap)\n .map((key) => +key)\n .filter(Boolean),\n 0\n );\n};\n","<ng-container *ngIf=\"fallbackSrc && thumbnailSrc\">\n <picture *ngIf=\"isLazyLoad; else isPreload\">\n <source\n *ngFor=\"let source of srcSet; trackBy: trackByFn\"\n [attr.lazyLoad]=\"source.src\"\n media=\"(min-width: {{ source.width }}px)\"\n [attr.defaultImage]=\"thumbnailSrc\"\n />\n <img\n [attr.fetchpriority]=\"fetchPriority\"\n [attr.alt]=\"alt || ''\"\n [class]=\"hasAspectRatio ? 'ratio-' + ratio : ''\"\n [attr.src]=\"thumbnailSrc\"\n [lazyLoad]=\"fallbackSrc\"\n [ngClass]=\"{ fill: true, 'fill-parent': fillParent, scale: scale }\"\n [style.aspect-ratio]=\"customAspectRatio\"\n />\n </picture>\n</ng-container>\n<ng-template #isPreload>\n <img\n [attr.srcset]=\"(isDefaultImageLoaded$ | async) ? preloadImages : null\"\n [attr.sizes]=\"(isDefaultImageLoaded$ | async) ? preloadImagesWidth : null\"\n [attr.src]=\"thumbnailSrc\"\n [attr.alt]=\"alt || ''\"\n [attr.fetchpriority]=\"fetchPriority\"\n [ngClass]=\"{ fill: true, 'fill-parent': fillParent, scale: scale, blur: (isDefaultImageLoaded$ | async) === false }\"\n [style.aspect-ratio]=\"customAspectRatio\"\n [class]=\"hasAspectRatio ? 'ratio-' + ratio : ''\"\n (load)=\"onImageLoaded()\"\n loading=\"eager\"\n />\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Renderer2,\n RendererFactory2,\n} from '@angular/core';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { SentryLogger } from '@fcom/core/services';\nimport { isTruthy } from '@fcom/core/utils/utils';\nimport { PageMetaService } from '@fcom/common/services';\n\nimport { ResponsiveImage, ResponsiveImageData, SrcSet, StaticImage } from '../interfaces';\nimport { FALLBACK_WIDTH, IMAGE_WIDTHS, THUMBNAIL_WIDTH } from '../constants';\nimport { AspectRatios, FetchPriorityEnum } from '../enums';\nimport { aspectRatio, buildUrl, getWidestImageWidth, isStaticImage } from '../utils';\n\n/**\n * Displays an image with lazyloading and a blurred placeholder.\n * This component uses ng-lazyload-image to load the images.\n * If a ResponsiveImage is passed, then the component selects the image\n * with the corresponding ratio and uses a srcset to adjust the image width\n * based on screensize.\n *\n * @example\n * <fcom-image\n * [alt]=\"alt\n * [imageData]=\"imageData\"\n * [ratio]=\"ratio\">\n * </fcom-image>\n */\n@Component({\n selector: 'fcom-image',\n templateUrl: './image.component.html',\n styleUrls: ['./image.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ImageComponent implements OnChanges, OnDestroy {\n /**\n * text for the images alt attribute.\n */\n @Input() alt = '';\n\n /**\n * Stretches image to fill the container.\n */\n @Input() fillParent = false;\n\n /**\n * Image data to use.\n * Can be ResponsiveImage data in which case the ratio to use should be set.\n * Or this can be staticImage data in which case no ratio is required.\n */\n @Input() imageData: ResponsiveImage | StaticImage;\n\n /**\n * The preferred aspect ratio of the image. Defaults to 16x9\n */\n @Input() ratio: keyof typeof AspectRatios = '16x9';\n\n /**\n * Scale the picture size with transform or not. Defaults to 1.1 scale.\n */\n @Input() scale = true;\n\n @Input()\n maxWidthImage = IMAGE_WIDTHS[0];\n\n /**\n * Define fetch priority of the image\n */\n @Input() fetchPriority?: keyof typeof FetchPriorityEnum;\n\n @Input() isLazyLoad = true;\n\n thumbnailSrc: string;\n fallbackSrc: string;\n srcSet: SrcSet;\n hasAspectRatio: boolean;\n customAspectRatio?: string;\n renderer: Renderer2;\n preloadImages = null;\n preloadImagesWidth = null;\n isDefaultImageLoaded$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private cdr: ChangeDetectorRef,\n @Optional() private logger: SentryLogger,\n private pageMetaService: PageMetaService,\n rendererFactory: RendererFactory2\n ) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n onImageLoaded(): void {\n this.isDefaultImageLoaded$.next(true);\n }\n\n ngOnChanges(): void {\n if (!this.imageData || this.invalidResponsiveImageRatio(this.imageData, this.ratio)) {\n this.logger?.error(\n 'Both imageData and ratio must be set if imageData is ResponsiveImage. If ratio is ORIGINAL, the properties data, width and height are required.'\n );\n return;\n }\n\n const { fallbackSrc, thumbnailSrc, srcSet, hasAspectRatio, customAspectRatio } = this.mapToResponsiveImage(\n this.imageData,\n AspectRatios[this.ratio]\n );\n\n if (!this.isLazyLoad && srcSet?.length > 0) {\n srcSet.forEach((item) => {\n this.pageMetaService.movePreloadImageLinksToHead(this.renderer, item.src, item?.width);\n });\n this.preloadImages = srcSet.map((source) => source.src + ' ' + source.width + 'w').join(', ');\n this.preloadImagesWidth = srcSet.map((source) => `(min-width: ${source.width}px) 100vw`).join(', ');\n }\n\n this.hasAspectRatio = hasAspectRatio;\n this.thumbnailSrc = thumbnailSrc;\n this.fallbackSrc = fallbackSrc;\n this.customAspectRatio = !this.fillParent ? customAspectRatio : undefined;\n this.srcSet = srcSet;\n this.cdr.markForCheck();\n }\n\n trackByFn(_index: number, item: { width: number; src: string }): string {\n return item.src;\n }\n\n ngOnDestroy(): void {\n if (!this.isLazyLoad && this.srcSet?.length > 0) {\n this.srcSet.forEach((item) => {\n this.pageMetaService.removePreloadImageLinksFromHead(this.renderer, item.src);\n });\n }\n }\n\n /**\n * Process the ImageData and ratio to get the image data to pass to the template\n */\n private mapToResponsiveImage(pic: ResponsiveImage | StaticImage, aspect: AspectRatios): ResponsiveImageData {\n if (isStaticImage(pic)) {\n return {\n fallbackSrc: pic.fullSizeUrl,\n thumbnailSrc: pic.thumbnailSrc,\n srcSet: [],\n hasAspectRatio: false,\n };\n }\n const images =\n aspect === AspectRatios.ORIGINAL\n ? { [FALLBACK_WIDTH]: buildUrl(pic.data, { impolicy: 'crop', width: pic.width, height: pic.height }) }\n : pic.responsiveImageLinksData[aspect];\n const widestWidth = aspect === AspectRatios.ORIGINAL ? FALLBACK_WIDTH : getWidestImageWidth(images);\n\n const srcSet = IMAGE_WIDTHS.filter((item) => item <= this.maxWidthImage).map((width) => {\n return {\n width,\n src: buildUrl(images[widestWidth], { imwidth: width }),\n };\n });\n\n const disableCropping = isTruthy(pic.disableCropping) && !!pic.width && !!pic.height;\n\n const fallbackSrc = buildUrl(images[FALLBACK_WIDTH], { imwidth: FALLBACK_WIDTH });\n\n return {\n fallbackSrc,\n thumbnailSrc: buildUrl(images[FALLBACK_WIDTH], { imwidth: THUMBNAIL_WIDTH }),\n srcSet,\n hasAspectRatio:\n aspect === AspectRatios.ORIGINAL || disableCropping ? false : fallbackSrc.includes('impolicy=crop'),\n customAspectRatio: disableCropping ? aspectRatio(pic.width, pic.height) : undefined,\n };\n }\n\n /**\n * Checks if the pic is invalid as a ResponsiveImage type.\n *\n * This checks that the pic is a ResponsiveImage type,\n * has a ratio and the ResponsiveImage can handle the requested ratio\n */\n private invalidResponsiveImageRatio(pic: ResponsiveImage | StaticImage, ratio: keyof typeof AspectRatios): boolean {\n if (isStaticImage(pic)) {\n return false;\n }\n\n return (\n !ratio ||\n !(\n (ratio !== 'ORIGINAL' && pic.responsiveImageLinksData && pic.responsiveImageLinksData[AspectRatios[ratio]]) ||\n (ratio === 'ORIGINAL' && pic.data && pic.width && pic.height)\n )\n );\n }\n}\n","import { Action } from './scheduler/Action';\nimport { Subscription } from './Subscription';\nimport { SchedulerLike, SchedulerAction } from './types';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\n\n/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an `Action`.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}. Will be made internal in v8.\n */\nexport class Scheduler implements SchedulerLike {\n public static now: () => number = dateTimestampProvider.now;\n\n constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) {\n this.now = now;\n }\n\n /**\n * A getter method that returns a number representing the current time\n * (at the time this function was called) according to the scheduler's own\n * internal clock.\n * @return A number that represents the current time. May or may not\n * have a relation to wall-clock time. May or may not refer to a time unit\n * (e.g. milliseconds).\n */\n public now: () => number;\n\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param work A function representing a task, or some unit of work to be\n * executed by the Scheduler.\n * @param delay Time to wait before executing the work, where the time unit is\n * implicit and defined by the Scheduler itself.\n * @param state Some contextual data that the `work` function uses when called\n * by the Scheduler.\n * @return A subscription in order to be able to unsubscribe the scheduled work.\n */\n public schedule<T>(work: (this: SchedulerAction<T>, state?: T) => void, delay: number = 0, state?: T): Subscription {\n return new this.schedulerActionCtor<T>(this, work).schedule(state, delay);\n }\n}\n","import { Scheduler } from '../Scheduler';\nimport { Action } from './Action';\nimport { AsyncAction } from './AsyncAction';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsyncScheduler extends Scheduler {\n public actions: Array<AsyncAction<any>> = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @internal\n */\n public _active: boolean = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @internal\n */\n public _scheduled: TimerHandle | undefined;\n\n constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) {\n super(SchedulerAction, now);\n }\n\n public flush(action: AsyncAction<any>): void {\n const { actions } = this;\n\n if (this._active) {\n actions.push(action);\n return;\n }\n\n let error: any;\n this._active = true;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()!)); // exhaust the scheduler queue\n\n this._active = false;\n\n if (error) {\n while ((action = actions.shift()!)) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { TripType } from '@fcom/core/interfaces';\nimport { PopoverOptions, PopoverPosition } from '@fcom/ui-components';\n\nimport { NotificationWarning } from './interfaces';\n\nexport const PREVIOUS_SEARCHES_KEY = 'previousSearches';\nexport const ANIMATION_DURATION = 250;\nexport const AVAILABLE_TRIP_TYPES: TripType[] = Object.values(TripType);\nexport const GLOBAL_BOOKING_WIDGET_EXPANDER_KEY = 'global-booking-widget-expander';\nexport const BOOKING_WIDGET_CONTEXT = 'booking-widget';\n\nexport const defaultWidgetPopoverOptions: PopoverOptions = {\n context: BOOKING_WIDGET_CONTEXT,\n popoverPosition: PopoverPosition.BOTTOM,\n roundedCorners: true,\n showArrowCaret: false,\n zIndex: 4,\n useFixedPosition: true,\n showLeftBorder: false,\n hasPadding: false,\n showFullscreenOnBreakpoint: 'tablet_down',\n shadow: true,\n};\n\nexport const warningNotificationPriorityOrder = {\n [NotificationWarning.NO_FLIGHTS]: 0,\n [NotificationWarning.NO_AWARD_FLIGHTS]: 1,\n [NotificationWarning.GENERAL]: 2,\n [NotificationWarning.SEASONAL_ROUTE]: 3,\n};\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { HistogramBar } from '@fcom/common';\nimport { AirCalendarList } from '@fcom/dapi/api/models';\n\nimport {\n CalendarPrices,\n InstantSearchMonitoring,\n NotificationWarning,\n SeasonalNotificationData,\n WidgetTab,\n} from '../../interfaces';\n\nexport const clearState = createAction('[BookingWidget] clearState');\n\nexport const setInstantSearchMonitoring = createAction(\n '[BookingWidget] setInstantSearchMonitoring',\n props<{ instantSearchMonitoring: InstantSearchMonitoring }>()\n);\n\nexport const resetPrices = createAction('[BookingWidget] resetPrices');\nexport const setFullYearPrices = createAction('[BookingWidget] setFullYearPrices', props<{ prices: CalendarPrices }>());\nexport const setFollowingMonthPrices = createAction(\n '[BookingWidget] setFollowingMonthPrices',\n props<{ prices: CalendarPrices }>()\n);\nexport const setHistogramPrices = createAction(\n '[BookingWidget] setHistogramPrices',\n props<{ prices: HistogramBar[] }>()\n);\nexport const setAirCalendarPrices = createAction(\n '[BookingWidget] setAirCalendarPrices',\n props<{ prices: AirCalendarList }>()\n);\n\nexport const setNotificationWarning = createAction(\n '[BookingWidget] setNotificationWarning',\n props<{ key: NotificationWarning; isActive: boolean; data?: SeasonalNotificationData }>()\n);\n\nexport const clearNotificationWarning = createAction(\n '[BookingWidget] clearNotificationWarning',\n props<{ key: NotificationWarning }>()\n);\n\nexport const setActiveTab = createAction('[BookingWidget] SetActiveTab', props<{ activeTab: WidgetTab }>());\n\nexport const clearServiceNotificationWarnings = createAction('[BookingWidget] clearServiceNotificationWarnings');\n\nexport const clearNoFlightsNotificationWarnings = createAction('[BookingWidget] clearNoFlightsNotificationWarnings');\n\nconst all = union({\n clearState,\n setInstantSearchMonitoring,\n resetPrices,\n setFullYearPrices,\n setFollowingMonthPrices,\n setHistogramPrices,\n setNotificationWarning,\n clearNotificationWarning,\n clearServiceNotificationWarnings,\n clearNoFlightsNotificationWarnings,\n setAirCalendarPrices,\n setActiveTab,\n});\n\nexport type BookingWidgetActionsUnion = typeof all;\n","<div\n *ngIf=\"links$ | async as links\"\n class=\"flex flex--space-between white-bg\"\n [ngClass]=\"{\n 'border rounded-large ps-large': showBorder,\n }\"\n>\n <a\n *ngFor=\"let link of links\"\n class=\"flex flex--column flex--center align-center no-underline font-body-1 bold-type nordic-blue-900-text\"\n [finLink]=\"link.url\"\n [external]=\"link.external\"\n (click)=\"clickLink.emit(link)\"\n >\n <fcom-icon\n *ngIf=\"link.iconName\"\n class=\"ms-small-b\"\n [ngClass]=\"{\n 'ms-xsmall-b': (isMobile$ | async) === false || showCompact,\n 'ms-small-b': (isMobile$ | async) === true || !showCompact,\n 'icon-xlarge': (isMobile$ | async) === false && !showCompact,\n 'icon-large': (isMobile$ | async) === true || showCompact,\n }\"\n [name]=\"link.iconName\"\n ></fcom-icon>\n {{ link.title }}\n </a>\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { MediaQueryService } from '@fcom/common/services';\n\nimport { QuickLink } from './interfaces';\n\n@Component({\n selector: 'fcom-quick-links',\n templateUrl: './quick-links.component.html',\n styleUrl: './quick-links.component.scss',\n})\nexport class QuickLinksComponent implements OnInit {\n isMobile$: Observable<boolean>;\n\n @Input()\n links$: Observable<QuickLink[]>;\n\n @Input()\n showBorder = true;\n\n @Input()\n showCompact = false;\n\n @Output() clickLink = new EventEmitter<QuickLink>();\n\n constructor(private mediaQueryService: MediaQueryService) {}\n\n ngOnInit(): void {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n }\n}\n","import { combineLatest, Observable } from 'rxjs';\nimport { filter, map, scan } from 'rxjs/operators';\n\nimport {\n Amount,\n NO_MEAL_VARIANT,\n NO_UPGR_MEAL_VARIANT,\n SeatCharacteristics,\n SelectionsPerTraveler,\n TravelerService,\n} from '@fcom/dapi/interfaces';\nimport {\n Category,\n FinnairAmount,\n FinnairCart,\n FinnairItineraryItemFlight,\n FinnairItineraryItemType,\n FinnairOrder,\n FinnairPassengerItem,\n FinnairPassengerServiceItem,\n FinnairPassengerServiceSelectionItem,\n FinnairServiceBoundItem,\n FinnairServiceItem,\n FinnairServices,\n FinnairServiceSegmentItem,\n SeatInfo,\n SeatmapSvgAndControlData,\n SeatPrice,\n} from '@fcom/dapi/api/models';\nimport { capitalize, isEmpty, PreciseNumber, uniqueBy, valuesOf } from '@fcom/core/utils';\nimport { SeatMapFlightInfo, SeatMapSeatInfo } from '@fcom/common/interfaces';\n\nimport { getCMSTier } from '../../../utils/service.utils';\nimport { PriceAndFragment, seatCharacteristicsOrder, SeatMapTraveler, seatTypeInfo } from '../interfaces';\nimport { isBoundBasedCategory } from './category.utils';\n\nexport const getDefaultMealVariant = (flight: FinnairItineraryItemFlight): string => {\n if (flight && (!flight.isShortHaul || flight.cabinClass === 'BUSINESS')) {\n return NO_UPGR_MEAL_VARIANT;\n }\n return NO_MEAL_VARIANT;\n};\n\nexport const getSeatPrice = (seat: SeatInfo, travelerId: string): SeatPrice => {\n return seat?.prices.find((p: SeatPrice) => p.travelerIds.indexOf(travelerId) !== -1);\n};\n\nexport const getSeatInfoForTracking = (\n seatMap: SeatmapSvgAndControlData,\n seatElement: Element,\n activePax: SeatMapTraveler\n): SeatMapSeatInfo => {\n const seatNo = seatElement.getAttribute('data-id');\n const seatInfo = seatMap.seats.find((s) => s.seatNumber === seatNo);\n const price = getSeatPrice(seatInfo, activePax.id);\n return {\n seatNo,\n seatType: getSeatType(seatInfo?.characteristics).className,\n price: price?.price?.amount,\n currency: price?.price?.currencyCode,\n };\n};\n\nexport const getSeatMapFlightInfoFromCart = (\n cartOrOrder: FinnairCart | FinnairOrder\n): SeatMapFlightInfo | undefined => {\n if (!cartOrOrder) {\n return undefined;\n }\n const bound = cartOrOrder.bounds[0];\n const itinerary = bound.itinerary.find(\n (i) => i.type === FinnairItineraryItemType.FLIGHT\n ) as FinnairItineraryItemFlight;\n const price = cartOrOrder.prices?.unpaid?.flight?.total.totalAmount;\n return {\n origin: bound.departure.locationCode,\n destination: bound.arrival.locationCode,\n departureTime: bound.departure.dateTime,\n acType: itinerary.aircraft.name,\n flightNo: itinerary.flightNumber,\n ticketType: bound.fareFamily.name,\n price: price?.amount,\n currency: price?.currencyCode,\n };\n};\n\nexport const getSeatMapFlight = (flight: FinnairItineraryItemFlight): SeatMapFlightInfo | undefined => {\n if (!flight) {\n return undefined;\n }\n return {\n origin: flight.departure.locationCode,\n destination: flight.arrival.locationCode,\n departureTime: flight.departure.dateTime,\n acType: flight.aircraft?.name,\n flightNo: flight.flightNumber,\n ticketType: flight.bookingClass,\n };\n};\n\nexport const getSeatType = (characteristics: string[] = []): { className: string; label: string; cmsKey: string } => {\n if (characteristics.length === 0) {\n return seatTypeInfo['regular'];\n }\n\n const orderedCharacteristics = [...characteristics].sort((a: SeatCharacteristics, b: SeatCharacteristics) => {\n const aIndex = seatCharacteristicsOrder.indexOf(a);\n const bIndex = seatCharacteristicsOrder.indexOf(b);\n\n // Deprioritise characteristics not in ordering array\n const aValue = aIndex === -1 ? seatCharacteristicsOrder.length + 1 : aIndex;\n const bValue = bIndex === -1 ? seatCharacteristicsOrder.length + 1 : bIndex;\n\n return aValue - bValue;\n });\n\n return seatTypeInfo[orderedCharacteristics[0]] || seatTypeInfo['regular'];\n};\n\nexport const sumOfPricesForTravelersServiceSelection = (\n selections: SelectionsPerTraveler<TravelerService | TravelerService[]>\n): Amount => {\n const prices: Amount[] = valuesOf(selections)\n .filter(Boolean)\n .reduce<TravelerService[]>((all: TravelerService[], service: TravelerService | TravelerService[]) => {\n const services = Array.isArray(service) ? service : [service];\n return all.concat(\n services.filter(Boolean).flatMap((s) => (s.quantity > 1 ? Array.from({ length: s.quantity }, () => s) : s))\n );\n }, [])\n .map((service) => service.pricePerItem);\n\n if (isEmpty(prices)) {\n return undefined;\n }\n\n const currencyCode: string = prices[0].currencyCode;\n const currencyCodesMatch = !prices.find((a: Amount) => a.currencyCode !== currencyCode);\n if (!currencyCodesMatch) {\n // Do not show price if we can't calculate it\n return undefined;\n }\n\n const amount: string = prices\n .map((p: Amount) => p.amount)\n .reduce((total: PreciseNumber, current: string) => total.add(PreciseNumber.fromString(current)), PreciseNumber.ZERO)\n .toString();\n return { amount, currencyCode };\n};\n\nexport const calculateSubTotalPrice = (\n subtotalPriceSub$: Observable<Amount & { category: Category; fragmentId: string }>,\n categorySubject$: Observable<Category>\n): Observable<Amount> => {\n const categoryPrices$ = subtotalPriceSub$.pipe(\n scan((acc: { [key: string]: PriceAndFragment[] }, value: Amount & { category: Category; fragmentId: string }) => {\n const newValue: PriceAndFragment = {\n price: { currencyCode: value.currencyCode, amount: value.amount },\n fragmentId: value.fragmentId,\n };\n if (!acc[value.category.toString()]) {\n acc[value.category.toString()] = [newValue];\n } else {\n const oldFragment = acc[value.category.toString()].find((v) => v.fragmentId === newValue.fragmentId);\n if (oldFragment) {\n oldFragment.price = newValue.price;\n } else {\n acc[value.category.toString()].push(newValue);\n }\n }\n return acc;\n }, {})\n );\n\n return combineLatest([categoryPrices$, categorySubject$.pipe(filter(Boolean))]).pipe(\n map(([categoryPrices, category]) => {\n const prices = categoryPrices[category.toString()];\n\n if (Array.isArray(prices) && prices?.length) {\n return prices\n .filter((a) => !!a.price.amount)\n .reduce(\n (all: Amount, priceAndFragment: PriceAndFragment) => {\n if (!all.currencyCode) {\n all.currencyCode = priceAndFragment.price.currencyCode;\n }\n all.amount = String(+priceAndFragment.price.amount + +all.amount);\n return all;\n },\n { amount: '0', currencyCode: null }\n );\n } else {\n return { amount: '0', currencyCode: null };\n }\n })\n );\n};\n\nconst filterServicesByFunction = (\n serviceItems: FinnairServiceItem[],\n filterFunction: (service: FinnairPassengerServiceSelectionItem) => boolean\n): FinnairServiceItem[] => {\n return serviceItems.reduce((allItems, serviceItem) => {\n if (\n serviceItem.bounds.some((b) =>\n b.segments.some((s) => s.passengers.some((p) => p.services.some((s) => filterFunction(s))))\n )\n ) {\n allItems.push({\n ...serviceItem,\n bounds: serviceItem.bounds.reduce((bounds, bound) => {\n if (bound.segments.some((s) => s.passengers.some((p) => p.services.some((s) => filterFunction(s))))) {\n const segments = bound.segments.reduce((segments, segment) => {\n if (segment.passengers.some((p) => p.services.some((s) => filterFunction(s)))) {\n const passengers = segment.passengers.reduce((passengers, passenger) => {\n if (passenger.services.some((s) => filterFunction(s))) {\n const services = passenger.services.filter((s) => filterFunction(s));\n const totalPrice = calculateTotalPrice(services.map((s) => s.totalPrice));\n const originalTotalPrice = calculateTotalPrice(services.map((s) => s.originalTotalPrice));\n\n passengers.push({\n ...passenger,\n quantity: services.length,\n totalPrice,\n originalTotalPrice,\n services,\n });\n }\n return passengers;\n }, [] as FinnairPassengerServiceItem[]);\n const totalPrice = calculateTotalPrice(passengers.map((s) => s.totalPrice));\n const originalTotalPrice = calculateTotalPrice(passengers.map((s) => s.originalTotalPrice));\n segments.push({\n ...segment,\n quantity: passengers.reduce((count, passenger) => count + passenger.quantity, 0),\n totalPrice,\n originalTotalPrice,\n passengers,\n });\n }\n return segments;\n }, [] as FinnairServiceSegmentItem[]);\n const divider = isBoundBasedCategory(serviceItem.category) ? segments.length : 1;\n const totalPrice = calculateTotalPrice(segments.map((s) => s.totalPrice));\n const originalTotalPrice = calculateTotalPrice(segments.map((s) => s.originalTotalPrice));\n bounds.push({\n ...bound,\n quantity: Math.floor(segments.reduce((count, segment) => count + segment.quantity, 0) / divider),\n totalPrice,\n originalTotalPrice,\n segments,\n });\n }\n return bounds;\n }, [] as FinnairServiceBoundItem[]),\n });\n }\n return allItems;\n }, [] as FinnairServiceItem[]);\n};\n\nconst calculateTotalPrice = (prices: FinnairAmount[]): FinnairAmount | undefined => {\n const items = prices.filter(Boolean);\n if (items.length === 0) {\n return undefined;\n }\n\n const amount = items\n .reduce((totalPrice, price) => totalPrice.add(PreciseNumber.fromString(price.amount)), PreciseNumber.ZERO)\n .toString();\n\n return {\n amount,\n currencyCode: items[0].currencyCode,\n };\n};\n\nexport const filterServices = (\n finnairServiceItems: FinnairServiceItem[] = [],\n filterFunction?: (service: FinnairPassengerServiceSelectionItem) => boolean\n): FinnairServiceItem[] => {\n if (filterFunction) {\n return filterServicesByFunction([...finnairServiceItems], filterFunction);\n }\n\n return [...finnairServiceItems];\n};\n\nconst isNotIncludedOrZeroPriced = (service: FinnairPassengerServiceSelectionItem): boolean => {\n return !(\n service.includedInTicketType ||\n service.includedInTierBenefit ||\n !service.totalPrice?.amount ||\n parseFloat(service.totalPrice?.amount) <= 0\n );\n};\n\nexport const getServicesToShow = (\n services: FinnairServices | undefined,\n keyToShow: keyof Omit<FinnairServices, 'servicesOrder'>,\n removeIncludedInTicketTypeAndTierBenefitAndZeroPricedServices = false,\n showFallback = false\n): FinnairServiceItem[] => {\n if (services?.[keyToShow]?.length) {\n return filterServices(\n services?.[keyToShow],\n removeIncludedInTicketTypeAndTierBenefitAndZeroPricedServices ? isNotIncludedOrZeroPriced : undefined\n );\n }\n if (showFallback) {\n return filterServices(\n services?.included,\n removeIncludedInTicketTypeAndTierBenefitAndZeroPricedServices ? isNotIncludedOrZeroPriced : undefined\n );\n }\n\n return [];\n};\n\nexport const combineServices = <T extends FinnairServiceItem>(listOfServices: T[][]): T[] =>\n listOfServices.filter(Boolean).reduce(\n (combinedServices, services) =>\n services.reduce((allServices, service) => {\n const currentService = allServices.find((s) => s.category === service.category);\n if (!currentService) {\n allServices.push({ ...service });\n } else {\n currentService.bounds = [...currentService.bounds, ...service.bounds].reduce((allBounds, bound) => {\n const currentBound = allBounds.find((b) => b.id === bound.id);\n if (!currentBound) {\n allBounds.push({ ...bound });\n } else {\n currentBound.segments = [...currentBound.segments, ...bound.segments].reduce((allSegments, segment) => {\n const currentSegment = allSegments.find((s) => s.id === segment.id);\n if (!currentSegment) {\n allSegments.push({ ...segment });\n } else {\n currentSegment.passengers = [...currentSegment.passengers, ...segment.passengers].reduce(\n (allPassengers, passenger) => {\n const currentPassenger = allPassengers.find((p) => p.id === passenger.id);\n if (!currentPassenger) {\n allPassengers.push({ ...passenger });\n } else {\n currentPassenger.services = [...currentPassenger.services, ...passenger.services].filter(\n uniqueBy((service) => service.id)\n );\n }\n return allPassengers;\n },\n []\n );\n }\n return allSegments;\n }, []);\n return allBounds;\n }\n return allBounds;\n }, []);\n }\n return allServices;\n }, combinedServices),\n []\n );\n\nexport const getPassengerTierLevel = (\n passengerId: string,\n passengerItems: FinnairPassengerItem[]\n): string | undefined => {\n const passenger = passengerItems.find(({ id }) => id === passengerId);\n const tier = (passenger?.frequentFlyerCards || [])\n .find((c) => c.companyCode && c.companyCode.toLowerCase() === 'ay')\n ?.tierLevel?.toString();\n return tier ? capitalize(getCMSTier(tier)) : undefined;\n};\n","import { Component, EventEmitter, Injector, Input, Output, ChangeDetectorRef } from '@angular/core';\n\nimport { CheckBoxTheme } from '../enums';\nimport { AbstractInputComponent } from './abstract-input.component';\n\n@Component({ template: '' })\nexport class AbstractCheckboxComponent extends AbstractInputComponent<boolean> {\n @Input()\n get checked(): boolean {\n return this.pValue;\n }\n set checked(value: boolean) {\n if (value !== this.checked) {\n this.pValue = value;\n this.cdRef.markForCheck();\n }\n }\n protected pValue = false;\n\n @Input()\n name: string | null = null;\n\n @Input()\n tabIndex: number;\n\n @Input()\n theme: CheckBoxTheme = CheckBoxTheme.SQUARE;\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output()\n change = new EventEmitter<boolean>();\n\n constructor(cdRef: ChangeDetectorRef, injector: Injector) {\n super(cdRef, injector);\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any): void {\n this.checked = !!value;\n }\n\n clickEvent(event: Event): void {\n event.stopPropagation();\n\n if (!this.disabled || (this.disabled && this.checked)) {\n this.toggle();\n this._emitChangeEvent();\n }\n }\n\n interactionEvent(event: Event): void {\n event.stopPropagation();\n }\n\n toggle(): void {\n this.checked = !this.checked;\n }\n\n private _emitChangeEvent(): void {\n this.notifyValueChange();\n this.change.emit(this.checked);\n }\n}\n","import { createAction } from '@ngrx/store';\n\nexport const leaveError = createAction('[ErrorActions] leaveError');\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fin-link',\n templateUrl: 'link.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n url: string;\n\n @Input()\n text: string;\n}\n","<a [finLink]=\"url\" class=\"block nordic-blue-900-text medium-type no-underline\" data-testid=\"link-cta\">\n <span>{{ text }}</span>\n <fcom-icon [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n</a>\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-skip-link',\n templateUrl: './skip-link.component.html',\n styleUrls: ['./skip-link.component.scss'],\n})\nexport class SkipLinkComponent {\n @Input() main: HTMLElement;\n\n skipToMainContent() {\n this.main.setAttribute('tabindex', '-1');\n this.main.focus();\n }\n}\n","<a (click)=\"skipToMainContent()\" href onclick=\"return false;\" class=\"skip-link\">\n {{ 'navigation.skipToMain' | finLocalization }}\n</a>\n","<fcom-notification\n *ngIf=\"showNotification\"\n [isClosable]=\"true\"\n [layout]=\"NotificationLayout.EDGE_TO_EDGE\"\n [theme]=\"NotificationTheme.SUCCESS\"\n (closeClick)=\"showNotification = false\"\n>\n {{ 'newsletterSubscribedNotification' | finLocalization }}\n</fcom-notification>\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\n\nimport { NotificationLayout, NotificationTheme } from '@fcom/ui-components';\n\nimport { GtmService } from '../../gtm';\nimport { GtmEvent } from '../../interfaces';\n\n@Component({\n selector: 'fin-newsletter-notification',\n templateUrl: './newsletter-notification.component.html',\n})\nexport class NewsletterNotificationComponent implements OnInit {\n readonly NotificationTheme = NotificationTheme;\n readonly NotificationLayout = NotificationLayout;\n\n showNotification = false;\n\n constructor(\n private router: Router,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n const route: ActivatedRouteSnapshot = this.router.routerState.snapshot.root;\n\n if (route.queryParamMap.has('newsletterSubscribed')) {\n this.gtmService.pushEventToDataLayer(GtmEvent.NEWSLETTER_SUBSCRIPTION_COMPLETED);\n this.showNotification = true;\n this.router.navigate([], {\n replaceUrl: true,\n state: { skipFilterSet: true },\n });\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { LazyLoadImageModule, LAZYLOAD_IMAGE_HOOKS } from 'ng-lazyload-image';\n\nimport { ImagesModule as FcomImagesModule } from '@fcom/ui-components';\n\nimport { PipesModule } from '../../pipes/pipes.module';\nimport { BlockImageComponent } from './block-image.component';\nimport { ContentImageComponent } from './content-image.component';\nimport { LazyLoadImageHooks } from './images.utils';\n@NgModule({\n imports: [CommonModule, PipesModule, FcomImagesModule, LazyLoadImageModule],\n providers: [{ provide: LAZYLOAD_IMAGE_HOOKS, useClass: LazyLoadImageHooks }],\n declarations: [BlockImageComponent, ContentImageComponent],\n exports: [BlockImageComponent, ContentImageComponent, FcomImagesModule],\n})\nexport class ImagesModule {}\n","import { SchedulerLike } from '../types';\nimport { isFunction } from './isFunction';\n\nexport function isScheduler(value: any): value is SchedulerLike {\n return value && isFunction(value.schedule);\n}\n","export const DRAWER_ANIMATION_DELAY = 325;\n","<ng-template #buttonTmpl>\n <div class=\"nordic-blue-25-bg\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n</ng-template>\n\n<div class=\"drawer-overlay\" *ngIf=\"showDrawer$ | async\" @overlayInOut></div>\n<dialog\n *ngIf=\"showDrawer$ | async\"\n (fcomClickOutside)=\"open = false\"\n class=\"drawer flex flex--column no-outline border-none\"\n [class.rounded-top-large]=\"direction === DrawerDirection.FROM_BOTTOM\"\n [attr.aria-labelledby]=\"drawerTitleId\"\n [attr.aria-describedby]=\"drawerDescriptionId\"\n [ngClass]=\"direction\"\n fcomTrapFocus\n [@sliderInOut]=\"direction\"\n>\n <header class=\"modal-header flex--nogrow flex--basis-header flex flex--row flex--center fill relative white-bg\">\n <h2\n #drawerHeading\n [id]=\"drawerTitleId\"\n data-testid=\"drawer-title\"\n class=\"font-heading-3 flex-1 truncate overflow-hidden nordic-blue-900-text pr-large-x pr-xsmall-y\"\n tabindex=\"-1\"\n >\n {{ title }}\n </h2>\n <fcom-icon-button\n class=\"close-button flex--nogrow flex--self-stretch pr-large-x pr-xsmall-y\"\n [icon]=\"{ name: SvgLibraryIcon.CLOSE_DELETE }\"\n [theme]=\"IconButtonTheme.DARK_PRIMARY_NORDIC_BLUE\"\n [aria]=\"{ label: ariaClose }\"\n [title]=\"ariaClose\"\n (clickBtn)=\"open = false\"\n ></fcom-icon-button>\n </header>\n <div class=\"flex flex-1 scroll white-bg\" [attr.id]=\"drawerDescriptionId\" data-testid=\"drawer-content\">\n <ng-content></ng-content>\n </div>\n\n <ng-container *ngIf=\"showButtons\">\n <ng-container *ngTemplateOutlet=\"buttonTmpl\"></ng-container>\n </ng-container>\n</dialog>\n","import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject } from 'rxjs';\nimport { v4 as uuid } from 'uuid';\n\nimport { DRAWER_ANIMATION_DELAY } from './constants';\nimport { DrawerDirection } from './enums';\nimport { IconButtonTheme } from '../buttons';\n\n/**\n * The drawer component contains only the design of the drawer and the open/close mechanism.\n *\n * The content is displayed thanks to the `ng-content` tags. The `open` input is using angular 2\n * way data binding, and you should set a boolean property (such as `drawerOpen` in the example\n * below) in the parent component to control open and close behavior.\n *\n * By default, the z-index is the same as the one used for the modal.\n *\n * The drawer will be displayed either on the left, right or the bottom of the page depending on the input value\n * and will be automatically closed after clicking on the * overlay thanks to the `fcomFocusOut` directive.\n *\n * @example\n * <button (click)=\"drawerOpen = true\">Open drawer</button>\n * <fcom-drawer [(open)]=\"drawerOpen\">\n * <header>\n * <h2 class=\"font-heading-3 flex-1 truncate overflow-hidden nordic-blue-900-text\">\n * TRIP\n * </h2>\n * <button type=\"button\" (click)=\"drawerOpen = false\">\n * <fcom-icon class=\"icon-small\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n * </button>\n * </header>\n * </fcom-drawer>\n */\n@Component({\n selector: 'fcom-drawer',\n templateUrl: './drawer.component.html',\n styleUrls: ['./drawer.component.scss'],\n animations: [\n trigger('sliderInOut', [\n state('right', style({ transform: 'translateX(0)' })),\n state('left', style({ transform: 'translateX(0)' })),\n state('bottom', style({ transform: 'translateY(0)' })),\n transition('void => right', [style({ transform: 'translateX(100%)' }), animate(DRAWER_ANIMATION_DELAY)]),\n transition('right => void', [animate(DRAWER_ANIMATION_DELAY, style({ transform: 'translateX(100%)' }))]),\n transition('void => left', [style({ transform: 'translateX(-100%)' }), animate(DRAWER_ANIMATION_DELAY)]),\n transition('left => void', [animate(DRAWER_ANIMATION_DELAY, style({ transform: 'translateX(-100%)' }))]),\n transition('void => bottom', [style({ transform: 'translateY(100%)' }), animate(DRAWER_ANIMATION_DELAY)]),\n transition('bottom => void', [animate(DRAWER_ANIMATION_DELAY, style({ transform: 'translateY(100%)' }))]),\n ]),\n trigger('overlayInOut', [\n state('void', style({ opacity: 0 })),\n state('*', style({ opacity: 1 })),\n transition(':enter', [animate(DRAWER_ANIMATION_DELAY)]),\n transition(':leave', [animate(DRAWER_ANIMATION_DELAY)]),\n ]),\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DrawerComponent {\n public readonly drawerId = uuid();\n public readonly drawerTitleId = `drawer-${this.drawerId}-title`;\n public readonly drawerDescriptionId = `drawer-${this.drawerId}-description`;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n public readonly DrawerDirection = DrawerDirection;\n public readonly IconButtonTheme = IconButtonTheme;\n\n @HostBinding('class') hostClasses = 'flex flex--center';\n\n @ViewChild('drawerHeading')\n drawerHeading: ElementRef;\n\n private _openState = false;\n\n @Input()\n set open(_open: boolean) {\n this._openState = _open;\n\n if (_open) {\n this.onOpen();\n } else {\n this.onClose();\n }\n\n this.openChange.emit(this._openState);\n }\n\n get open(): boolean {\n return this._openState;\n }\n\n /**\n * The title to use in the header of the drawer.\n */\n @Input()\n title: string;\n\n /**\n * The direction from which the drawer will appear.\n *\n * This variable defines the side of the screen from which the drawer will slide out.\n *\n * Possible values are:\n * - DrawerDirection.FROM_LEFT: The drawer will appear from the left side of the screen.\n * - DrawerDirection.FROM_RIGHT: The drawer will appear from the right side of the screen.\n * - DrawerDirection.FROM_BOTTOM: The drawer will appear from the bottom of the screen.\n *\n * Default value is DrawerDirection.FROM_RIGHT.\n */\n @Input()\n direction: DrawerDirection = DrawerDirection.FROM_RIGHT;\n\n /**\n * Indicates whether fixed CTA area should be displayed.\n */\n @Input()\n showButtons: boolean;\n\n /**\n * The aria tag for the close icon button.\n */\n @Input()\n ariaClose = 'Close';\n\n /**\n * Emits an event when the drawer is closed\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output()\n closed: EventEmitter<void> = new EventEmitter();\n\n @Output()\n openChange = new EventEmitter<boolean>();\n\n showDrawer$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n constructor(\n private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(DOCUMENT) private readonly document: Document,\n private readonly renderer: Renderer2\n ) {}\n\n onOpen(): void {\n this.showDrawer$.next(true);\n this.renderer.addClass(this.document.body, 'modal-open');\n this.changeDetectorRef.detectChanges();\n this.drawerHeading.nativeElement.focus();\n }\n\n onClose(): void {\n this.showDrawer$.next(false);\n this.closed.emit();\n this.renderer.removeClass(this.document.body, 'modal-open');\n this.changeDetectorRef.detectChanges();\n }\n}\n","import { Observable } from '../Observable';\nimport { ObservableInputTuple, SchedulerLike } from '../types';\nimport { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\n\nexport function concat<T extends readonly unknown[]>(...inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;\nexport function concat<T extends readonly unknown[]>(\n ...inputsAndScheduler: [...ObservableInputTuple<T>, SchedulerLike]\n): Observable<T[number]>;\n\n/**\n * Creates an output Observable which sequentially emits all values from the first given\n * Observable and then moves on to the next.\n *\n * <span class=\"informal\">Concatenates multiple Observables together by\n * sequentially emitting their values, one Observable after the other.</span>\n *\n * ![](concat.png)\n *\n * `concat` joins multiple Observables together, by subscribing to them one at a time and\n * merging their results into the output Observable. You can pass either an array of\n * Observables, or put them directly as arguments. Passing an empty array will result\n * in Observable that completes immediately.\n *\n * `concat` will subscribe to first input Observable and emit all its values, without\n * changing or affecting them in any way. When that Observable completes, it will\n * subscribe to then next Observable passed and, again, emit its values. This will be\n * repeated, until the operator runs out of Observables. When last input Observable completes,\n * `concat` will complete as well. At any given moment only one Observable passed to operator\n * emits values. If you would like to emit values from passed Observables concurrently, check out\n * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact,\n * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`.\n *\n * Note that if some input Observable never completes, `concat` will also never complete\n * and Observables following the one that did not complete will never be subscribed. On the other\n * hand, if some Observable simply completes immediately after it is subscribed, it will be\n * invisible for `concat`, which will just move on to the next Observable.\n *\n * If any Observable in chain errors, instead of passing control to the next Observable,\n * `concat` will error immediately as well. Observables that would be subscribed after\n * the one that emitted error, never will.\n *\n * If you pass to `concat` the same Observable many times, its stream of values\n * will be \"replayed\" on every subscription, which means you can repeat given Observable\n * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious,\n * you can always use {@link repeat}.\n *\n * ## Examples\n *\n * Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10\n *\n * ```ts\n * import { interval, take, range, concat } from 'rxjs';\n *\n * const timer = interval(1000).pipe(take(4));\n * const sequence = range(1, 10);\n * const result = concat(timer, sequence);\n * result.subscribe(x => console.log(x));\n *\n * // results in:\n * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10\n * ```\n *\n * Concatenate 3 Observables\n *\n * ```ts\n * import { interval, take, concat } from 'rxjs';\n *\n * const timer1 = interval(1000).pipe(take(10));\n * const timer2 = interval(2000).pipe(take(6));\n * const timer3 = interval(500).pipe(take(10));\n *\n * const result = concat(timer1, timer2, timer3);\n * result.subscribe(x => console.log(x));\n *\n * // results in the following:\n * // (Prints to console sequentially)\n * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9\n * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5\n * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9\n * ```\n *\n * Concatenate the same Observable to repeat it\n *\n * ```ts\n * import { interval, take, concat } from 'rxjs';\n *\n * const timer = interval(1000).pipe(take(2));\n *\n * concat(timer, timer) // concatenating the same Observable!\n * .subscribe({\n * next: value => console.log(value),\n * complete: () => console.log('...and it is done!')\n * });\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 0 after 3s\n * // 1 after 4s\n * // '...and it is done!' also after 4s\n * ```\n *\n * @see {@link concatAll}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n * @see {@link startWith}\n * @see {@link endWith}\n *\n * @param args `ObservableInput`s to concatenate.\n */\nexport function concat(...args: any[]): Observable<unknown> {\n return concatAll()(from(args, popScheduler(args)));\n}\n","import { mergeAll } from './mergeAll';\nimport { OperatorFunction, ObservableInput, ObservedValueOf } from '../types';\n\n/**\n * Converts a higher-order Observable into a first-order Observable by\n * concatenating the inner Observables in order.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables by putting one\n * inner Observable after the other.</span>\n *\n * ![](concatAll.svg)\n *\n * Joins every Observable emitted by the source (a higher-order Observable), in\n * a serial fashion. It subscribes to each inner Observable only after the\n * previous inner Observable has completed, and merges all of their values into\n * the returned observable.\n *\n * __Warning:__ If the source Observable emits Observables quickly and\n * endlessly, and the inner Observables it emits generally complete slower than\n * the source emits, you can run into memory issues as the incoming Observables\n * collect in an unbounded buffer.\n *\n * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set\n * to `1`.\n *\n * ## Example\n *\n * For each click event, tick every second from 0 to 3, with no concurrency\n *\n * ```ts\n * import { fromEvent, map, interval, take, concatAll } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const higherOrder = clicks.pipe(\n * map(() => interval(1000).pipe(take(4)))\n * );\n * const firstOrder = higherOrder.pipe(concatAll());\n * firstOrder.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n * ```\n *\n * @see {@link combineLatestAll}\n * @see {@link concat}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n * @see {@link exhaustAll}\n * @see {@link mergeAll}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link zipAll}\n *\n * @return A function that returns an Observable emitting values from all the\n * inner Observables concatenated.\n */\nexport function concatAll<O extends ObservableInput<any>>(): OperatorFunction<O, ObservedValueOf<O>> {\n return mergeAll(1);\n}\n","import { Injectable, makeStateKey, StateKey } from '@angular/core';\n\nimport { EMPTY, Observable, of } from 'rxjs';\nimport { catchError, filter, map, mergeMap, switchMap, take } from 'rxjs/operators';\n\nimport { SentryLogger, StateTransferService, GlobalBookingTravelClass } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { InstantsearchService } from '@fcom/dapi/api/services';\nimport { DestinationSearchItem, DestinationSearchItemType } from '@fcom/destination-search/interfaces';\nimport { DestinationSearchService } from '@fcom/destination-search/services/destination-search.service';\nimport { flattenDestinations } from '@fcom/destination-search/utils/flatten';\nimport { isNotEmpty } from '@fcom/core/utils';\nimport { PageMetaService } from '@fcom/common';\nimport { TripType } from '@fcom/core/interfaces';\nimport { finShare } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { MarketingOffer } from '../../interfaces';\nimport { mapToMarketingOffers } from '../../utils';\n\n@Injectable()\nexport class CheapestPriceForAllDestinationsService {\n private marketingOffers$: Observable<MarketingOffer[]>;\n private marketingOffersOneWay$: Observable<MarketingOffer[]>;\n private marketingOffersBothWay$: Observable<MarketingOffer[]>;\n private marketingOffersByOriginOneWay: { [origin: string]: Observable<MarketingOffer[]> } = {};\n private marketingOffersByOriginBothWay: { [origin: string]: Observable<MarketingOffer[]> } = {};\n\n static createStateKey = (originLocationCode: string, tripTypes: TripType[]): StateKey<MarketingOffer[]> =>\n makeStateKey<MarketingOffer[]>(`mos-${originLocationCode}${tripTypes.toString()}`);\n\n constructor(\n private configService: ConfigService,\n private sentryLogger: SentryLogger,\n private stateTransferService: StateTransferService,\n private destinationSearchService: DestinationSearchService,\n private instantSearchService: InstantsearchService,\n private pageMetaService: PageMetaService,\n private languageService: LanguageService\n ) {\n if (!configService.cfg.showMarketingOffers) {\n this.marketingOffers$ = EMPTY;\n this.marketingOffersOneWay$ = EMPTY;\n this.marketingOffersBothWay$ = EMPTY;\n return;\n }\n this.marketingOffers$ = this.pageMetaService.defaultOriginLocationCode$.pipe(\n switchMap((origin) => this.getMarketingOffers(origin, [TripType.RETURN])),\n catchError((e: unknown) => this.handleError(e, [TripType.RETURN])),\n finShare()\n );\n\n this.marketingOffersOneWay$ = this.pageMetaService.defaultOriginLocationCode$.pipe(\n switchMap((origin) => this.getMarketingOffers(origin, [TripType.ONEWAY])),\n catchError((e: unknown) => this.handleError(e, [TripType.ONEWAY])),\n finShare()\n );\n\n this.marketingOffersBothWay$ = this.pageMetaService.defaultOriginLocationCode$.pipe(\n switchMap((origin) => this.getMarketingOffers(origin, [TripType.ONEWAY, TripType.RETURN])),\n catchError((e: unknown) => this.handleError(e, [TripType.ONEWAY, TripType.RETURN])),\n finShare()\n );\n }\n\n offerForSingleTrip(destination: string, oneWay = false, origin?: string): Observable<MarketingOffer> {\n const offers$ = origin\n ? this.getOffers(oneWay, origin)\n : oneWay\n ? this.marketingOffersOneWay$\n : this.marketingOffers$;\n return offers$.pipe(\n map((marketingOffers: MarketingOffer[]) =>\n marketingOffers.filter((marketingOffer) => marketingOffer.destination === destination)\n ),\n filter(isNotEmpty),\n map(\n (data: MarketingOffer[]): MarketingOffer => ({\n ...data[0],\n prices: data[0].prices.filter((price) =>\n oneWay ? price.price.tripType === TripType.ONEWAY : price.price.tripType === TripType.RETURN\n ),\n })\n )\n );\n }\n\n offerFor(destination: string, tripType: TripType): Observable<MarketingOffer> {\n return this.marketingOffersBothWay$.pipe(\n map((marketingOffers: MarketingOffer[]) =>\n marketingOffers.filter((marketingOffer) => marketingOffer.destination === destination)\n ),\n filter(isNotEmpty),\n map((data: MarketingOffer[]): MarketingOffer => {\n const targetPrice = data[0].prices.filter((offer) => offer.price.tripType === tripType);\n return { ...data[0], prices: targetPrice };\n })\n );\n }\n\n offers(): Observable<MarketingOffer[]> {\n return this.marketingOffers$;\n }\n\n oneWayOffers(selectedOriginLocationCode?: string): Observable<MarketingOffer[]> {\n return this.getOffers(true, selectedOriginLocationCode);\n }\n\n bothWayOffers(selectedOriginLocationCode?: string): Observable<MarketingOffer[]> {\n return this.getOffers(false, selectedOriginLocationCode);\n }\n\n private getOffers(isOneWay: boolean, originLocationCode?: string): Observable<MarketingOffer[]> {\n return this.pageMetaService.defaultOriginLocationCode$.pipe(\n switchMap((defaultOrigin) => {\n if (!originLocationCode || defaultOrigin === originLocationCode) {\n return isOneWay ? this.marketingOffersOneWay$ : this.marketingOffersBothWay$;\n }\n\n const offers = isOneWay ? this.marketingOffersByOriginOneWay : this.marketingOffersByOriginBothWay;\n\n if (offers[originLocationCode]) {\n return offers[originLocationCode];\n }\n\n offers[originLocationCode] = this.getMarketingOffers(\n originLocationCode,\n isOneWay ? [TripType.ONEWAY] : [TripType.ONEWAY, TripType.RETURN]\n );\n\n return offers[originLocationCode];\n })\n );\n }\n\n private getMarketingOffers(originLocationCode: string, tripTypes: TripType[]): Observable<MarketingOffer[]> {\n return this.stateTransferService.wrapToStateCache(\n CheapestPriceForAllDestinationsService.createStateKey(originLocationCode, tripTypes),\n () => {\n return this.destinationSearchService.destinationSearch().pipe(\n take(1),\n map((destinationItems: DestinationSearchItem[]) => {\n return flattenDestinations(destinationItems)\n .filter((item) => item.type === DestinationSearchItemType.DESTINATION && item.locationCode)\n .map((item) => item.locationCode);\n }),\n mergeMap((destinationLocationCodes: string[]) =>\n this.instantSearchService.getPricesForFlights(this.configService.cfg.instantSearchUrl, {\n departureLocationCodes: [originLocationCode],\n destinationLocationCodes: destinationLocationCodes.sort(),\n travelClasses: [\n GlobalBookingTravelClass.ECONOMY.toLowerCase(),\n GlobalBookingTravelClass.ECOPREMIUM.toLowerCase(),\n GlobalBookingTravelClass.BUSINESS.toLowerCase(),\n ],\n tripTypes,\n locale: this.languageService.langValue,\n })\n ),\n map(mapToMarketingOffers)\n );\n }\n );\n }\n\n private handleError(error: unknown, tripTypes: string[]): Observable<[]> {\n this.sentryLogger.error(`Error getting destination ${tripTypes.toString()} offer data`, { error });\n return of([]);\n }\n}\n","import { createAction, props, union } from '@ngrx/store';\n\nimport { MultiCityOffer, MultiCityState, MultiCityStatus } from '@fcom/common/interfaces/booking';\nimport { Bound, FinnairLocation } from '@fcom/dapi/api/models';\n\nexport const setMultiCityOffers = createAction('[MultiCityActions] setOffers', props<{ offers: MultiCityState }>());\nexport const addMultiCityOffers = createAction(\n 'MultiCityActions] addOffers',\n props<{\n offers: MultiCityOffer[];\n bounds: {\n [key: string]: Bound;\n };\n hashMap: {\n [key: string]: string;\n };\n locations: {\n [key: string]: FinnairLocation;\n };\n }>()\n);\nexport const setMultiCitySelectedFareFamily = createAction(\n '[MultiCityActions setSelectedFareFamily',\n props<{\n fareFamily: string;\n }>()\n);\n\nexport const addMultiCitySelectedItinerary = createAction(\n '[MultiCityActions] addSelectedItinerary',\n props<{ itinerary: string }>()\n);\nexport const setMultiCitySelectedItinerary = createAction(\n '[MultiCityActions] setSelectedItinerary',\n props<{ itinerary: string[] }>()\n);\n\nexport const reset = createAction('[MultiCityActions] reset');\n\nexport const resetSelections = createAction('[MultiCityActions] resetSelections');\n\nexport const setStatus = createAction('[MultiCityActions] setStatus', props<{ status: MultiCityStatus }>());\n\nexport const addRequestedMoreFlightOfferIds = createAction(\n '[MultiCityActions] addRequestedMoreFlightOfferIds',\n props<{\n offerId: string;\n }>()\n);\n\nconst all = union({\n setMultiCityOffers,\n addMultiCityOffers,\n setMultiCitySelectedFareFamily,\n addMultiCitySelectedItinerary,\n setMultiCitySelectedItinerary,\n resetSelections,\n reset,\n setStatus,\n addRequestedMoreFlightOfferIds,\n});\n\nexport type ActionsUnion = typeof all;\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","import {\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationStart,\n RoutesRecognized,\n} from '@angular/router';\n\nimport { BaseRouterStoreState } from './serializers/base';\nimport { SerializedRouterStateSnapshot } from './serializers/full_serializer';\nimport { createAction, props } from '@ngrx/store';\n\n/**\n * An action dispatched when a router navigation request is fired.\n */\nexport const ROUTER_REQUEST = '@ngrx/router-store/request';\n\n/**\n * Payload of ROUTER_REQUEST\n */\nexport type RouterRequestPayload<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n routerState: T;\n event: NavigationStart;\n};\n\n/**\n * An action dispatched when a router navigation request is fired.\n */\nexport type RouterRequestAction<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n type: typeof ROUTER_REQUEST;\n payload: RouterRequestPayload<T>;\n};\n\nexport const routerRequestAction = createAction(\n ROUTER_REQUEST,\n props<{ payload: RouterRequestPayload<SerializedRouterStateSnapshot> }>()\n);\n/**\n * An action dispatched when the router navigates.\n */\nexport const ROUTER_NAVIGATION = '@ngrx/router-store/navigation';\n\n/**\n * Payload of ROUTER_NAVIGATION.\n */\nexport type RouterNavigationPayload<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n routerState: T;\n event: RoutesRecognized;\n};\n\n/**\n * An action dispatched when the router navigates.\n */\nexport type RouterNavigationAction<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n type: typeof ROUTER_NAVIGATION;\n payload: RouterNavigationPayload<T>;\n};\n\nexport const routerNavigationAction = createAction(\n ROUTER_NAVIGATION,\n props<{ payload: RouterNavigationPayload<SerializedRouterStateSnapshot> }>()\n);\n\n/**\n * An action dispatched when the router cancels navigation.\n */\nexport const ROUTER_CANCEL = '@ngrx/router-store/cancel';\n\n/**\n * Payload of ROUTER_CANCEL.\n */\nexport type RouterCancelPayload<\n T,\n V extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n routerState: V;\n storeState: T;\n event: NavigationCancel;\n};\n\n/**\n * An action dispatched when the router cancels navigation.\n */\nexport type RouterCancelAction<\n T,\n V extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n type: typeof ROUTER_CANCEL;\n payload: RouterCancelPayload<T, V>;\n};\n\nexport const routerCancelAction = createAction(\n ROUTER_CANCEL,\n props<{ payload: RouterCancelPayload<SerializedRouterStateSnapshot> }>()\n);\n\n/**\n * An action dispatched when the router errors.\n */\nexport const ROUTER_ERROR = '@ngrx/router-store/error';\n\n/**\n * Payload of ROUTER_ERROR.\n */\nexport type RouterErrorPayload<\n T,\n V extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n routerState: V;\n storeState: T;\n event: NavigationError;\n};\n\n/**\n * An action dispatched when the router errors.\n */\nexport type RouterErrorAction<\n T,\n V extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n type: typeof ROUTER_ERROR;\n payload: RouterErrorPayload<T, V>;\n};\n\nexport const routerErrorAction = createAction(\n ROUTER_ERROR,\n props<{ payload: RouterErrorPayload<SerializedRouterStateSnapshot> }>()\n);\n\n/**\n * An action dispatched after navigation has ended and new route is active.\n */\nexport const ROUTER_NAVIGATED = '@ngrx/router-store/navigated';\n\n/**\n * Payload of ROUTER_NAVIGATED.\n */\nexport type RouterNavigatedPayload<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n routerState: T;\n event: NavigationEnd;\n};\n\n/**\n * An action dispatched after navigation has ended and new route is active.\n */\nexport type RouterNavigatedAction<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n type: typeof ROUTER_NAVIGATED;\n payload: RouterNavigatedPayload<T>;\n};\n\nexport const routerNavigatedAction = createAction(\n ROUTER_NAVIGATED,\n props<{ payload: RouterNavigatedPayload<SerializedRouterStateSnapshot> }>()\n);\n\n/**\n * A union type of router actions.\n */\nexport type RouterAction<\n T,\n V extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> =\n | RouterRequestAction<V>\n | RouterNavigationAction<V>\n | RouterCancelAction<T, V>\n | RouterErrorAction<T, V>\n | RouterNavigatedAction<V>;\n","import { Action } from '@ngrx/store';\nimport {\n ROUTER_CANCEL,\n ROUTER_ERROR,\n ROUTER_NAVIGATION,\n RouterAction,\n} from './actions';\nimport { BaseRouterStoreState } from './serializers/base';\nimport { SerializedRouterStateSnapshot } from './serializers/full_serializer';\n\nexport type RouterReducerState<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = {\n state: T;\n navigationId: number;\n};\n\nexport function routerReducer<\n RouterState extends BaseRouterStoreState = SerializedRouterStateSnapshot,\n Result = RouterReducerState<RouterState>\n>(state: Result | undefined, action: Action): Result {\n // Allow compilation with strictFunctionTypes - ref: #1344\n const routerAction = action as RouterAction<any, RouterState>;\n switch (routerAction.type) {\n case ROUTER_NAVIGATION:\n case ROUTER_ERROR:\n case ROUTER_CANCEL:\n return {\n state: routerAction.payload.routerState,\n navigationId: routerAction.payload.event.id,\n } as unknown as Result;\n default:\n return state as Result;\n }\n}\n","import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { BaseRouterStoreState, RouterStateSerializer } from './base';\n\nexport interface MinimalActivatedRouteSnapshot {\n routeConfig: ActivatedRouteSnapshot['routeConfig'];\n url: ActivatedRouteSnapshot['url'];\n params: ActivatedRouteSnapshot['params'];\n queryParams: ActivatedRouteSnapshot['queryParams'];\n fragment: ActivatedRouteSnapshot['fragment'];\n data: ActivatedRouteSnapshot['data'];\n outlet: ActivatedRouteSnapshot['outlet'];\n title: ActivatedRouteSnapshot['title'];\n firstChild?: MinimalActivatedRouteSnapshot;\n children: MinimalActivatedRouteSnapshot[];\n}\n\nexport interface MinimalRouterStateSnapshot extends BaseRouterStoreState {\n root: MinimalActivatedRouteSnapshot;\n url: string;\n}\n\nexport class MinimalRouterStateSerializer\n implements RouterStateSerializer<MinimalRouterStateSnapshot>\n{\n serialize(routerState: RouterStateSnapshot): MinimalRouterStateSnapshot {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url,\n };\n }\n\n private serializeRoute(\n route: ActivatedRouteSnapshot\n ): MinimalActivatedRouteSnapshot {\n const children = route.children.map((c) => this.serializeRoute(c));\n return {\n params: route.params,\n data: route.data,\n url: route.url,\n outlet: route.outlet,\n title: route.title,\n routeConfig: route.routeConfig\n ? {\n path: route.routeConfig.path,\n pathMatch: route.routeConfig.pathMatch,\n redirectTo: route.routeConfig.redirectTo,\n outlet: route.routeConfig.outlet,\n title:\n typeof route.routeConfig.title === 'string'\n ? route.routeConfig.title\n : undefined,\n }\n : null,\n queryParams: route.queryParams,\n fragment: route.fragment,\n firstChild: children[0],\n children,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { Selector } from '@ngrx/store';\nimport { RouterReducerState } from './reducer';\nimport {\n BaseRouterStoreState,\n RouterStateSerializer,\n} from './serializers/base';\nimport { SerializedRouterStateSnapshot } from './serializers/full_serializer';\nimport { MinimalRouterStateSerializer } from './serializers/minimal_serializer';\n\nexport type StateKeyOrSelector<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> = string | Selector<any, RouterReducerState<T>>;\n\nexport enum NavigationActionTiming {\n PreActivation = 1,\n PostActivation = 2,\n}\nexport const DEFAULT_ROUTER_FEATURENAME = 'router';\n\nexport const _ROUTER_CONFIG = new InjectionToken(\n '@ngrx/router-store Internal Configuration'\n);\nexport const ROUTER_CONFIG = new InjectionToken(\n '@ngrx/router-store Configuration'\n);\n\n/**\n * Minimal = Serializes the router event with MinimalRouterStateSerializer\n * Full = Serializes the router event with FullRouterStateSerializer\n */\nexport const enum RouterState {\n Full,\n Minimal,\n}\n\nexport function _createRouterConfig(\n config: StoreRouterConfig\n): StoreRouterConfig {\n return {\n stateKey: DEFAULT_ROUTER_FEATURENAME,\n serializer: MinimalRouterStateSerializer,\n navigationActionTiming: NavigationActionTiming.PreActivation,\n ...config,\n };\n}\n\nexport interface StoreRouterConfig<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n> {\n stateKey?: StateKeyOrSelector<T>;\n serializer?: new (...args: any[]) => RouterStateSerializer;\n /**\n * By default, ROUTER_NAVIGATION is dispatched before guards and resolvers run.\n * Therefore, the action could run too soon, for example\n * there may be a navigation cancel due to a guard saying the navigation is not allowed.\n * To run ROUTER_NAVIGATION after guards and resolvers,\n * set this property to NavigationActionTiming.PostActivation.\n */\n navigationActionTiming?: NavigationActionTiming;\n /**\n * Decides which router serializer should be used, if there is none provided, and the metadata on the dispatched @ngrx/router-store action payload.\n * Set to `Minimal` to use the `MinimalRouterStateSerializer` and to set a minimal router event with the navigation id and url as payload.\n * Set to `Full` to use the `FullRouterStateSerializer` and to set the angular router events as payload.\n */\n routerState?: RouterState;\n}\n","import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { BaseRouterStoreState, RouterStateSerializer } from './base';\n\nexport interface SerializedRouterStateSnapshot extends BaseRouterStoreState {\n root: ActivatedRouteSnapshot;\n url: string;\n}\n\nexport class FullRouterStateSerializer\n implements RouterStateSerializer<SerializedRouterStateSnapshot>\n{\n serialize(routerState: RouterStateSnapshot): SerializedRouterStateSnapshot {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url,\n };\n }\n\n private serializeRoute(\n route: ActivatedRouteSnapshot\n ): ActivatedRouteSnapshot {\n const children = route.children.map((c) => this.serializeRoute(c));\n return {\n params: route.params,\n paramMap: route.paramMap,\n data: route.data,\n url: route.url,\n outlet: route.outlet,\n title: route.title,\n routeConfig: route.routeConfig\n ? {\n component: route.routeConfig.component,\n path: route.routeConfig.path,\n pathMatch: route.routeConfig.pathMatch,\n redirectTo: route.routeConfig.redirectTo,\n outlet: route.routeConfig.outlet,\n title: route.routeConfig.title,\n }\n : null,\n queryParams: route.queryParams,\n queryParamMap: route.queryParamMap,\n fragment: route.fragment,\n component: (route.routeConfig\n ? route.routeConfig.component\n : undefined) as any,\n root: undefined as any,\n parent: undefined as any,\n firstChild: children[0],\n pathFromRoot: undefined as any,\n children,\n };\n }\n}\n","import { RouterStateSnapshot } from '@angular/router';\n\n/**\n * Simple router state.\n * All custom router states / state serializers should have at least\n * the properties of this interface.\n */\nexport interface BaseRouterStoreState {\n url: string;\n}\n\nexport abstract class RouterStateSerializer<\n T extends BaseRouterStoreState = BaseRouterStoreState\n> {\n abstract serialize(routerState: RouterStateSnapshot): T;\n}\n","import { ErrorHandler, Inject, Injectable, isDevMode } from '@angular/core';\nimport {\n Event,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationStart,\n Router,\n RouterEvent,\n RoutesRecognized,\n} from '@angular/router';\nimport {\n ACTIVE_RUNTIME_CHECKS,\n isNgrxMockEnvironment,\n RuntimeChecks,\n select,\n Store,\n} from '@ngrx/store';\nimport { withLatestFrom } from 'rxjs/operators';\nimport {\n ROUTER_CANCEL,\n ROUTER_ERROR,\n ROUTER_NAVIGATED,\n ROUTER_NAVIGATION,\n ROUTER_REQUEST,\n} from './actions';\nimport {\n NavigationActionTiming,\n ROUTER_CONFIG,\n RouterState,\n StateKeyOrSelector,\n StoreRouterConfig,\n} from './router_store_config';\nimport {\n FullRouterStateSerializer,\n SerializedRouterStateSnapshot,\n} from './serializers/full_serializer';\nimport { RouterReducerState } from './reducer';\nimport { RouterStateSerializer } from './serializers/base';\n\nenum RouterTrigger {\n NONE = 1,\n ROUTER = 2,\n STORE = 3,\n}\n\ninterface StoreRouterActionPayload {\n event: RouterEvent;\n routerState?: SerializedRouterStateSnapshot;\n storeState?: any;\n}\n\n/**\n * Shared router initialization logic used alongside both the StoreRouterConnectingModule and the provideRouterStore\n * function\n */\n@Injectable()\nexport class StoreRouterConnectingService {\n private lastEvent: Event | null = null;\n private routerState: SerializedRouterStateSnapshot | null = null;\n private storeState: any;\n private trigger = RouterTrigger.NONE;\n private readonly stateKey: StateKeyOrSelector;\n\n constructor(\n private store: Store<any>,\n private router: Router,\n private serializer: RouterStateSerializer<SerializedRouterStateSnapshot>,\n private errorHandler: ErrorHandler,\n @Inject(ROUTER_CONFIG) private readonly config: StoreRouterConfig,\n @Inject(ACTIVE_RUNTIME_CHECKS)\n private readonly activeRuntimeChecks: RuntimeChecks\n ) {\n this.stateKey = this.config.stateKey as StateKeyOrSelector;\n\n if (\n !isNgrxMockEnvironment() &&\n isDevMode() &&\n (activeRuntimeChecks?.strictActionSerializability ||\n activeRuntimeChecks?.strictStateSerializability) &&\n this.serializer instanceof FullRouterStateSerializer\n ) {\n console.warn(\n '@ngrx/router-store: The serializability runtime checks cannot be enabled ' +\n 'with the FullRouterStateSerializer. The FullRouterStateSerializer ' +\n 'has an unserializable router state and actions that are not serializable. ' +\n 'To use the serializability runtime checks either use ' +\n 'the MinimalRouterStateSerializer or implement a custom router state serializer.'\n );\n }\n\n this.setUpStoreStateListener();\n this.setUpRouterEventsListener();\n }\n\n private setUpStoreStateListener(): void {\n this.store\n .pipe(select(this.stateKey as any), withLatestFrom(this.store))\n .subscribe(([routerStoreState, storeState]) => {\n this.navigateIfNeeded(routerStoreState, storeState);\n });\n }\n\n private navigateIfNeeded(\n routerStoreState: RouterReducerState,\n storeState: any\n ): void {\n if (!routerStoreState || !routerStoreState.state) {\n return;\n }\n if (this.trigger === RouterTrigger.ROUTER) {\n return;\n }\n if (this.lastEvent instanceof NavigationStart) {\n return;\n }\n\n const url = routerStoreState.state.url;\n if (!isSameUrl(this.router.url, url)) {\n this.storeState = storeState;\n this.trigger = RouterTrigger.STORE;\n this.router.navigateByUrl(url).catch((error) => {\n this.errorHandler.handleError(error);\n });\n }\n }\n\n private setUpRouterEventsListener(): void {\n const dispatchNavLate =\n this.config.navigationActionTiming ===\n NavigationActionTiming.PostActivation;\n let routesRecognized: RoutesRecognized;\n\n this.router.events\n .pipe(withLatestFrom(this.store))\n .subscribe(([event, storeState]) => {\n this.lastEvent = event;\n\n if (event instanceof NavigationStart) {\n this.routerState = this.serializer.serialize(\n this.router.routerState.snapshot\n );\n if (this.trigger !== RouterTrigger.STORE) {\n this.storeState = storeState;\n this.dispatchRouterRequest(event);\n }\n } else if (event instanceof RoutesRecognized) {\n routesRecognized = event;\n\n if (!dispatchNavLate && this.trigger !== RouterTrigger.STORE) {\n this.dispatchRouterNavigation(event);\n }\n } else if (event instanceof NavigationCancel) {\n this.dispatchRouterCancel(event);\n this.reset();\n } else if (event instanceof NavigationError) {\n this.dispatchRouterError(event);\n this.reset();\n } else if (event instanceof NavigationEnd) {\n if (this.trigger !== RouterTrigger.STORE) {\n if (dispatchNavLate) {\n this.dispatchRouterNavigation(routesRecognized);\n }\n this.dispatchRouterNavigated(event);\n }\n this.reset();\n }\n });\n }\n\n private dispatchRouterRequest(event: NavigationStart): void {\n this.dispatchRouterAction(ROUTER_REQUEST, { event });\n }\n\n private dispatchRouterNavigation(\n lastRoutesRecognized: RoutesRecognized\n ): void {\n const nextRouterState = this.serializer.serialize(\n lastRoutesRecognized.state\n );\n this.dispatchRouterAction(ROUTER_NAVIGATION, {\n routerState: nextRouterState,\n event: new RoutesRecognized(\n lastRoutesRecognized.id,\n lastRoutesRecognized.url,\n lastRoutesRecognized.urlAfterRedirects,\n nextRouterState\n ),\n });\n }\n\n private dispatchRouterCancel(event: NavigationCancel): void {\n this.dispatchRouterAction(ROUTER_CANCEL, {\n storeState: this.storeState,\n event,\n });\n }\n\n private dispatchRouterError(event: NavigationError): void {\n this.dispatchRouterAction(ROUTER_ERROR, {\n storeState: this.storeState,\n event: new NavigationError(event.id, event.url, `${event}`),\n });\n }\n\n private dispatchRouterNavigated(event: NavigationEnd): void {\n const routerState = this.serializer.serialize(\n this.router.routerState.snapshot\n );\n this.dispatchRouterAction(ROUTER_NAVIGATED, { event, routerState });\n }\n\n private dispatchRouterAction(\n type: string,\n payload: StoreRouterActionPayload\n ): void {\n this.trigger = RouterTrigger.ROUTER;\n try {\n this.store.dispatch({\n type,\n payload: {\n routerState: this.routerState,\n ...payload,\n event:\n this.config.routerState === RouterState.Full\n ? payload.event\n : {\n id: payload.event.id,\n url: payload.event.url,\n // safe, as it will just be `undefined` for non-NavigationEnd router events\n urlAfterRedirects: (payload.event as NavigationEnd)\n .urlAfterRedirects,\n },\n },\n });\n } finally {\n this.trigger = RouterTrigger.NONE;\n }\n }\n\n private reset() {\n this.trigger = RouterTrigger.NONE;\n this.storeState = null;\n this.routerState = null;\n }\n}\n\n/**\n * Check if the URLs are matching. Accounts for the possibility of trailing \"/\" in url.\n */\nfunction isSameUrl(first: string, second: string): boolean {\n return stripTrailingSlash(first) === stripTrailingSlash(second);\n}\n\nfunction stripTrailingSlash(text: string): string {\n if (text?.length > 0 && text[text.length - 1] === '/') {\n return text.substring(0, text.length - 1);\n }\n return text;\n}\n","import {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n _createRouterConfig,\n _ROUTER_CONFIG,\n ROUTER_CONFIG,\n RouterState,\n StoreRouterConfig,\n} from './router_store_config';\nimport {\n FullRouterStateSerializer,\n SerializedRouterStateSnapshot,\n} from './serializers/full_serializer';\nimport { MinimalRouterStateSerializer } from './serializers/minimal_serializer';\nimport {\n BaseRouterStoreState,\n RouterStateSerializer,\n} from './serializers/base';\nimport { StoreRouterConnectingService } from './store_router_connecting.service';\n\n/**\n * Connects the Angular Router to the Store.\n *\n * @usageNotes\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStore({ router: routerReducer }),\n * provideRouterStore(),\n * ],\n * });\n * ```\n */\nexport function provideRouterStore<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n>(config: StoreRouterConfig<T> = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: _ROUTER_CONFIG, useValue: config },\n {\n provide: ROUTER_CONFIG,\n useFactory: _createRouterConfig,\n deps: [_ROUTER_CONFIG],\n },\n {\n provide: RouterStateSerializer,\n useClass: config.serializer\n ? config.serializer\n : config.routerState === RouterState.Full\n ? FullRouterStateSerializer\n : MinimalRouterStateSerializer,\n },\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => inject(StoreRouterConnectingService);\n },\n },\n StoreRouterConnectingService,\n ]);\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { BaseRouterStoreState } from './serializers/base';\nimport { SerializedRouterStateSnapshot } from './serializers/full_serializer';\nimport { StoreRouterConfig } from './router_store_config';\nimport { provideRouterStore } from './provide_router_store';\n\n/**\n * Connects RouterModule with StoreModule.\n *\n * During the navigation, before any guards or resolvers run, the router will dispatch\n * a ROUTER_NAVIGATION action, which has the following signature:\n *\n * ```\n * export type RouterNavigationPayload = {\n * routerState: SerializedRouterStateSnapshot,\n * event: RoutesRecognized\n * }\n * ```\n *\n * Either a reducer or an effect can be invoked in response to this action.\n * If the invoked reducer throws, the navigation will be canceled.\n *\n * If navigation gets canceled because of a guard, a ROUTER_CANCEL action will be\n * dispatched. If navigation results in an error, a ROUTER_ERROR action will be dispatched.\n *\n * Both ROUTER_CANCEL and ROUTER_ERROR contain the store state before the navigation\n * which can be used to restore the consistency of the store.\n *\n * Usage:\n *\n * ```typescript\n * @NgModule({\n * declarations: [AppCmp, SimpleCmp],\n * imports: [\n * BrowserModule,\n * StoreModule.forRoot(mapOfReducers),\n * RouterModule.forRoot([\n * { path: '', component: SimpleCmp },\n * { path: 'next', component: SimpleCmp }\n * ]),\n * StoreRouterConnectingModule.forRoot()\n * ],\n * bootstrap: [AppCmp]\n * })\n * export class AppModule {\n * }\n * ```\n */\n@NgModule({})\nexport class StoreRouterConnectingModule {\n static forRoot<\n T extends BaseRouterStoreState = SerializedRouterStateSnapshot\n >(\n config: StoreRouterConfig<T> = {}\n ): ModuleWithProviders<StoreRouterConnectingModule> {\n return {\n ngModule: StoreRouterConnectingModule,\n providers: [provideRouterStore(config)],\n };\n }\n}\n","import { FinnairServiceItemWithUpsell, ServiceStatus } from '@fcom/dapi/interfaces';\nimport {\n Category,\n FinnairBoundItem,\n FinnairItineraryItemFlight,\n FinnairPassengerCode,\n FinnairPassengerItem,\n FinnairPassengerServiceSelectionItem,\n} from '@fcom/dapi/api/models';\n\nimport { getServiceStatus, isFlight, isNotIncludedService } from './common-booking.utils';\n\nconst isInfant = (passenger: FinnairPassengerItem) => passenger.passengerTypeCode === FinnairPassengerCode.INF;\n\nexport enum ServiceType {\n INCLUDED = 'included',\n NON_INCLUDED = 'noneIncluded',\n PAID = 'paid',\n}\n\nexport interface ServiceSummaryTranslationKey {\n quantity?: number;\n description: string;\n text?: string;\n type?: ServiceType;\n}\n\nexport interface FlightWithSeats {\n flight: string;\n seats: string[];\n}\n\nexport const getSeatsByFlight = (\n passengers: FinnairPassengerItem[],\n currentBound: FinnairBoundItem,\n serviceItem: FinnairServiceItemWithUpsell\n): FlightWithSeats[] => {\n return currentBound.itinerary\n .filter(isFlight)\n .map((flight) => {\n const seats = passengers\n .filter((passenger) => !isInfant(passenger))\n .map((passenger) => {\n return (\n serviceItem.bounds\n .filter((bound) => bound.id === currentBound.id)\n .flatMap((bound) => bound.segments)\n .filter((serviceSegment) => serviceSegment.id === flight.id)\n .flatMap((serviceSegment) => serviceSegment.passengers)\n .filter((servicePax) => servicePax.id === passenger.id)\n .flatMap((servicePax) => servicePax.services)\n .flatMap((servicePaxService) => servicePaxService.seatNumber)\n .filter((seatNumber) => seatNumber !== null && seatNumber.length > 0)?.[0] ?? '--'\n );\n });\n return {\n flight: `${flight.departure.locationCode}-${flight.arrival.locationCode}`,\n seats,\n };\n })\n .filter((seatInfo) => seatInfo.seats.length > 0);\n};\n\nconst EXCLUDE_FROM_SUMMARY_VARIANTS = ['SH_ECO_MEAL_DEFAULT_1', 'SH_ECO_MEAL_DEFAULT_2', 'SH_ECO_DRINK_DEFAULT_1'];\n\nexport const getSummary = (\n currentBound: FinnairBoundItem,\n service: FinnairServiceItemWithUpsell\n): ServiceSummaryTranslationKey => {\n if (service.category === Category.OTHER) {\n return { description: 'MMB.services.other' };\n }\n const { anyIncluded, totalQuantity } = calculateIsIncludedAndQuantity(service, currentBound);\n\n const serviceCategory = resolveCategory(service.category);\n\n if (totalQuantity > 0) {\n return { quantity: totalQuantity, description: `MMB.services.${serviceCategory}.paid`, type: ServiceType.PAID };\n } else if (anyIncluded) {\n if ([Category.SPORT, Category.LOUNGE, Category.WIFI].includes(service.category) && totalQuantity === 0) {\n return { quantity: 1, description: `MMB.services.${serviceCategory}.included`, type: ServiceType.INCLUDED };\n }\n\n return { description: `MMB.services.${serviceCategory}.included`, type: ServiceType.INCLUDED };\n }\n return { description: `MMB.services.${serviceCategory}.noneIncluded`, type: ServiceType.NON_INCLUDED };\n};\n\nconst getMealSummary = (\n currentBound: FinnairBoundItem,\n service: FinnairServiceItemWithUpsell,\n isShortHaulFlight: boolean\n): ServiceSummaryTranslationKey => {\n const { anyIncluded, totalQuantity } = calculateIsIncludedAndQuantity(service, currentBound);\n\n const serviceCategory = resolveCategory(service.category);\n\n if (totalQuantity > 0) {\n return { quantity: totalQuantity, description: `MMB.services.${serviceCategory}.paid`, type: ServiceType.PAID };\n }\n\n if (anyIncluded && !isShortHaulFlight) {\n return { description: `MMB.services.${serviceCategory}.included`, type: ServiceType.INCLUDED };\n }\n return { description: `MMB.services.${serviceCategory}.noneIncluded`, type: ServiceType.NON_INCLUDED };\n};\n\nconst getViewServiceSummary = (\n currentBound: FinnairBoundItem,\n service: FinnairServiceItemWithUpsell\n): ServiceSummaryTranslationKey => {\n return isServicePending(service, currentBound)\n ? { description: 'MMB.services.viewServiceSummary.pending' }\n : { description: 'MMB.services.viewServiceSummary.confirmed' };\n};\n\nfunction calculateIsIncludedAndQuantity(\n service: FinnairServiceItemWithUpsell,\n currentBound: FinnairBoundItem\n): { anyIncluded: boolean; totalQuantity: number } {\n const allSelectedItems = service.bounds\n .filter((bound) => bound.id === currentBound.id)\n .flatMap((bound) => bound.segments)\n .flatMap((flight) => flight.passengers)\n .flatMap((pax) => pax.services)\n .filter(({ variant }) => !EXCLUDE_FROM_SUMMARY_VARIANTS.includes(variant));\n\n const totalQuantity = allSelectedItems\n .filter((paxService) => isNotIncludedService(paxService))\n .flatMap((paxService) => paxService.quantity)\n .reduce((total, count) => {\n total += count;\n return total;\n }, 0);\n\n const anyIncluded = allSelectedItems.some(\n (paxService) => paxService.includedInTicketType || paxService.includedInTierBenefit\n );\n\n return { anyIncluded, totalQuantity };\n}\n\nfunction isServicePending(service: FinnairServiceItemWithUpsell, currentBound: FinnairBoundItem): boolean {\n return service.bounds\n .filter((bound) => bound.id === currentBound.id)\n .flatMap((bound) => bound.segments)\n .flatMap((flight) => flight.passengers)\n .flatMap((pax) => pax.services)\n .some((paxService) => isNotIncludedService(paxService) && !paxService.ticketed);\n}\n\nexport const getSummaryForCategory = (\n category: Category,\n bound: FinnairBoundItem,\n service: FinnairServiceItemWithUpsell,\n isShortHaulFlight: boolean\n): ServiceSummaryTranslationKey[] => {\n switch (category) {\n case Category.CABIN_BAGGAGE:\n return getCabinBaggageSummary(bound, service);\n case Category.BAGGAGE:\n return getCheckedBaggageSummary(bound, service);\n case Category.MEAL:\n return [getMealSummary(bound, service, isShortHaulFlight)];\n case Category.CHILD:\n case Category.FIREARM:\n return [getViewServiceSummary(bound, service)];\n case Category.WIFI:\n case Category.LOUNGE:\n case Category.SPORT:\n case Category.PET:\n case Category.PRIORITY:\n case Category.SPECIAL_NEED:\n case Category.COVER:\n case Category.SAF:\n case Category.OTHER:\n return [getSummary(bound, service)];\n default:\n return [];\n }\n};\n\nconst EXCLUDE_FROM_SUMMARY_CABIN_BAGGAGE_VARIANTS = [\n 'CABIN_WEIGHT',\n 'CABIN_WEIGHT_COMBINED_OLD',\n 'CABIN_WEIGHT_COMBINED',\n];\n\nconst getCabinBaggageSummary = (\n currentBound: FinnairBoundItem,\n service: FinnairServiceItemWithUpsell\n): ServiceSummaryTranslationKey[] => {\n if (\n currentBound.itinerary\n .filter(isFlight)\n .some((flight: FinnairItineraryItemFlight) => flight.operatingAirline.code !== 'AY')\n ) {\n return [{ description: 'MMB.services.baggage.summary-title' }];\n }\n\n const segments = service.bounds.find((b) => b.id === currentBound.id)?.segments.length ?? 1;\n return service.bounds\n .filter((bound) => bound.id === currentBound.id)\n .flatMap((bound) => bound.segments)\n .flatMap((flight) => flight.passengers)\n .flatMap((pax) => pax.services)\n .filter(\n (s) =>\n !EXCLUDE_FROM_SUMMARY_CABIN_BAGGAGE_VARIANTS.includes(s.variant) &&\n getServiceStatus(s) === ServiceStatus.CONFIRMED\n )\n .reduce((all, s) => {\n const current = all.find((oldService) => oldService.variant === s.variant);\n\n if (current) {\n current.quantity = current.quantity + (s.quantity || 0);\n } else {\n all.push({ ...s });\n }\n\n return all;\n }, [])\n .map((s) => {\n const quantity = Math.ceil(s.quantity / segments);\n\n if (quantity === 0) {\n return { description: `MMB.services.cabinBaggage.${s.variant.toLowerCase()}` };\n }\n\n return {\n quantity,\n description: `MMB.services.cabinBaggage.amount.${s.variant.toLowerCase()}`,\n };\n });\n};\n\nconst getPaxServiceDisplayName = (paxService: FinnairPassengerServiceSelectionItem): string => {\n return paxService.parameters?.baggageWeight > 0\n ? paxService.displayName.replace('{weight}', '' + paxService.parameters.baggageWeight)\n : paxService.displayName;\n};\n\nconst normalizeDisplayNames = (service: FinnairPassengerServiceSelectionItem): FinnairPassengerServiceSelectionItem => {\n if (!service.includedInTierBenefit) {\n return {\n ...service,\n displayName: getPaxServiceDisplayName(service),\n };\n }\n\n const startIndex = service.displayName.indexOf('x') <= 2 ? 3 : 0;\n const endIndex = service.displayName.indexOf(',', startIndex);\n\n const trimmedDisplayName = service.displayName\n .slice(startIndex, endIndex !== -1 ? endIndex : service.displayName.length)\n .trim();\n\n return {\n ...service,\n displayName: trimmedDisplayName.charAt(0).toUpperCase() + trimmedDisplayName.slice(1),\n };\n};\n\nconst getCheckedBaggageSummary = (\n currentBound: FinnairBoundItem,\n service: FinnairServiceItemWithUpsell\n): ServiceSummaryTranslationKey[] => {\n if (\n currentBound.itinerary\n .filter(isFlight)\n .some((flight: FinnairItineraryItemFlight) => flight.operatingAirline.code !== 'AY')\n ) {\n return [{ description: 'MMB.services.baggage.summary-title' }];\n }\n\n const segments = service.bounds.find((b) => b.id === currentBound.id)?.segments.length ?? 1;\n const services = service.bounds\n .filter((bound) => bound.id === currentBound.id)\n .flatMap((bound) => bound.segments)\n .flatMap((flight) => flight.passengers)\n .flatMap((pax) => pax.services)\n .filter((s) => getServiceStatus(s) === ServiceStatus.CONFIRMED)\n .map(normalizeDisplayNames)\n .reduce((all, s) => {\n const current = all.find((oldService) => oldService.displayName === s.displayName);\n\n if (current) {\n current.quantity = current.quantity + (s.quantity || 0);\n } else {\n all.push({ ...s });\n }\n\n return all;\n }, [])\n .map((s) => ({\n quantity: Math.ceil(s.quantity / segments),\n description: '',\n text: s.displayName,\n }));\n\n if (services.length === 0) {\n return [{ description: 'MMB.services.baggage.noneIncluded', type: ServiceType.NON_INCLUDED }];\n }\n\n return services;\n};\n\nexport const resolveCategory = (category: Category): string => {\n switch (category) {\n case Category.MEAL:\n return 'meals';\n case Category.BAGGAGE:\n return 'bags';\n default:\n return category;\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\nimport {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {Platform} from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n booleanAttribute,\n Directive,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport {MatRipple, MatRippleLoader} from '@angular/material/core';\n\n/** Object that can be used to configure the default options for the button component. */\nexport interface MatButtonConfig {\n /** Whether disabled buttons should be interactive. */\n disabledInteractive?: boolean;\n}\n\n/** Injection token that can be used to provide the default options the button component. */\nexport const MAT_BUTTON_CONFIG = new InjectionToken<MatButtonConfig>('MAT_BUTTON_CONFIG');\n\n/** Shared host configuration for all buttons */\nexport const MAT_BUTTON_HOST = {\n '[attr.disabled]': '_getDisabledAttribute()',\n '[attr.aria-disabled]': '_getAriaDisabled()',\n '[class.mat-mdc-button-disabled]': 'disabled',\n '[class.mat-mdc-button-disabled-interactive]': 'disabledInteractive',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n // MDC automatically applies the primary theme color to the button, but we want to support\n // an unthemed version. If color is undefined, apply a CSS class that makes it easy to\n // select and style this \"theme\".\n '[class.mat-unthemed]': '!color',\n // Add a class that applies to all buttons. This makes it easier to target if somebody\n // wants to target all Material buttons.\n '[class.mat-mdc-button-base]': 'true',\n '[class]': 'color ? \"mat-\" + color : \"\"',\n};\n\n/** List of classes to add to buttons instances based on host attribute selector. */\nconst HOST_SELECTOR_MDC_CLASS_PAIR: {attribute: string; mdcClasses: string[]}[] = [\n {\n attribute: 'mat-button',\n mdcClasses: ['mdc-button', 'mat-mdc-button'],\n },\n {\n attribute: 'mat-flat-button',\n mdcClasses: ['mdc-button', 'mdc-button--unelevated', 'mat-mdc-unelevated-button'],\n },\n {\n attribute: 'mat-raised-button',\n mdcClasses: ['mdc-button', 'mdc-button--raised', 'mat-mdc-raised-button'],\n },\n {\n attribute: 'mat-stroked-button',\n mdcClasses: ['mdc-button', 'mdc-button--outlined', 'mat-mdc-outlined-button'],\n },\n {\n attribute: 'mat-fab',\n mdcClasses: ['mdc-fab', 'mat-mdc-fab'],\n },\n {\n attribute: 'mat-mini-fab',\n mdcClasses: ['mdc-fab', 'mdc-fab--mini', 'mat-mdc-mini-fab'],\n },\n {\n attribute: 'mat-icon-button',\n mdcClasses: ['mdc-icon-button', 'mat-mdc-icon-button'],\n },\n];\n\n/** Base class for all buttons. */\n@Directive()\nexport class MatButtonBase implements AfterViewInit, OnDestroy {\n private readonly _focusMonitor = inject(FocusMonitor);\n\n /**\n * Handles the lazy creation of the MatButton ripple.\n * Used to improve initial load time of large applications.\n */\n _rippleLoader: MatRippleLoader = inject(MatRippleLoader);\n\n /** Whether this button is a FAB. Used to apply the correct class on the ripple. */\n _isFab = false;\n\n /**\n * Reference to the MatRipple instance of the button.\n * @deprecated Considered an implementation detail. To be removed.\n * @breaking-change 17.0.0\n */\n get ripple(): MatRipple {\n return this._rippleLoader?.getRipple(this._elementRef.nativeElement)!;\n }\n set ripple(v: MatRipple) {\n this._rippleLoader?.attachRipple(this._elementRef.nativeElement, v);\n }\n\n /** Theme color palette of the button */\n @Input() color?: string | null;\n\n /** Whether the ripple effect is disabled or not. */\n @Input({transform: booleanAttribute})\n get disableRipple(): boolean {\n return this._disableRipple;\n }\n set disableRipple(value: any) {\n this._disableRipple = value;\n this._updateRippleDisabled();\n }\n private _disableRipple: boolean = false;\n\n /** Whether the button is disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: any) {\n this._disabled = value;\n this._updateRippleDisabled();\n }\n private _disabled: boolean = false;\n\n /** `aria-disabled` value of the button. */\n @Input({transform: booleanAttribute, alias: 'aria-disabled'})\n ariaDisabled: boolean | undefined;\n\n /**\n * Natively disabled buttons prevent focus and any pointer events from reaching the button.\n * In some scenarios this might not be desirable, because it can prevent users from finding out\n * why the button is disabled (e.g. via tooltip).\n *\n * Enabling this input will change the button so that it is styled to be disabled and will be\n * marked as `aria-disabled`, but it will allow the button to receive events and focus.\n *\n * Note that by enabling this, you need to set the `tabindex` yourself if the button isn't\n * meant to be tabbable and you have to prevent the button action (e.g. form submissions).\n */\n @Input({transform: booleanAttribute})\n disabledInteractive: boolean;\n\n constructor(\n public _elementRef: ElementRef,\n public _platform: Platform,\n public _ngZone: NgZone,\n public _animationMode?: string,\n ) {\n const config = inject(MAT_BUTTON_CONFIG, {optional: true});\n const element = _elementRef.nativeElement;\n const classList = (element as HTMLElement).classList;\n\n this.disabledInteractive = config?.disabledInteractive ?? false;\n this._rippleLoader?.configureRipple(element, {className: 'mat-mdc-button-ripple'});\n\n // For each of the variant selectors that is present in the button's host\n // attributes, add the correct corresponding MDC classes.\n for (const {attribute, mdcClasses} of HOST_SELECTOR_MDC_CLASS_PAIR) {\n if (element.hasAttribute(attribute)) {\n classList.add(...mdcClasses);\n }\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._rippleLoader?.destroyRipple(this._elementRef.nativeElement);\n }\n\n /** Focuses the button. */\n focus(origin: FocusOrigin = 'program', options?: FocusOptions): void {\n if (origin) {\n this._focusMonitor.focusVia(this._elementRef.nativeElement, origin, options);\n } else {\n this._elementRef.nativeElement.focus(options);\n }\n }\n\n protected _getAriaDisabled() {\n if (this.ariaDisabled != null) {\n return this.ariaDisabled;\n }\n\n return this.disabled && this.disabledInteractive ? true : null;\n }\n\n protected _getDisabledAttribute() {\n return this.disabledInteractive || !this.disabled ? null : true;\n }\n\n private _updateRippleDisabled(): void {\n this._rippleLoader?.setDisabled(\n this._elementRef.nativeElement,\n this.disableRipple || this.disabled,\n );\n }\n}\n\n/** Shared host configuration for buttons using the `<a>` tag. */\nexport const MAT_ANCHOR_HOST = {\n '[attr.disabled]': '_getDisabledAttribute()',\n '[class.mat-mdc-button-disabled]': 'disabled',\n '[class.mat-mdc-button-disabled-interactive]': 'disabledInteractive',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n\n // Note that we ignore the user-specified tabindex when it's disabled for\n // consistency with the `mat-button` applied on native buttons where even\n // though they have an index, they're not tabbable.\n '[attr.tabindex]': 'disabled && !disabledInteractive ? -1 : tabIndex',\n '[attr.aria-disabled]': '_getDisabledAttribute()',\n // MDC automatically applies the primary theme color to the button, but we want to support\n // an unthemed version. If color is undefined, apply a CSS class that makes it easy to\n // select and style this \"theme\".\n '[class.mat-unthemed]': '!color',\n // Add a class that applies to all buttons. This makes it easier to target if somebody\n // wants to target all Material buttons.\n '[class.mat-mdc-button-base]': 'true',\n '[class]': 'color ? \"mat-\" + color : \"\"',\n};\n\n/**\n * Anchor button base.\n */\n@Directive()\nexport class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {\n @Input({\n transform: (value: unknown) => {\n return value == null ? undefined : numberAttribute(value);\n },\n })\n tabIndex: number;\n\n constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string) {\n super(elementRef, platform, ngZone, animationMode);\n }\n\n ngOnInit(): void {\n this._ngZone.runOutsideAngular(() => {\n this._elementRef.nativeElement.addEventListener('click', this._haltDisabledEvents);\n });\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._elementRef.nativeElement.removeEventListener('click', this._haltDisabledEvents);\n }\n\n _haltDisabledEvents = (event: Event): void => {\n // A disabled button shouldn't apply any actions\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n protected override _getAriaDisabled() {\n return this.ariaDisabled == null ? this.disabled : this.ariaDisabled;\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\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n ViewEncapsulation,\n ANIMATION_MODULE_TYPE,\n} from '@angular/core';\n\nimport {MAT_ANCHOR_HOST, MAT_BUTTON_HOST, MatAnchorBase, MatButtonBase} from './button-base';\n\n/**\n * Material Design button component. Users interact with a button to perform an action.\n * See https://material.io/components/buttons\n *\n * The `MatButton` class applies to native button elements and captures the appearances for\n * \"text button\", \"outlined button\", and \"contained button\" per the Material Design\n * specification. `MatButton` additionally captures an additional \"flat\" appearance, which matches\n * \"contained\" but without elevation.\n */\n@Component({\n selector: `\n button[mat-button], button[mat-raised-button], button[mat-flat-button],\n button[mat-stroked-button]\n `,\n templateUrl: 'button.html',\n styleUrls: ['button.css', 'button-high-contrast.css'],\n host: MAT_BUTTON_HOST,\n exportAs: 'matButton',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class MatButton extends MatButtonBase {\n constructor(\n elementRef: ElementRef,\n platform: Platform,\n ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n ) {\n super(elementRef, platform, ngZone, animationMode);\n }\n}\n\n/**\n * Material Design button component for anchor elements. Anchor elements are used to provide\n * links for the user to navigate across different routes or pages.\n * See https://material.io/components/buttons\n *\n * The `MatAnchor` class applies to native anchor elements and captures the appearances for\n * \"text button\", \"outlined button\", and \"contained button\" per the Material Design\n * specification. `MatAnchor` additionally captures an additional \"flat\" appearance, which matches\n * \"contained\" but without elevation.\n */\n@Component({\n selector: `a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]`,\n exportAs: 'matButton, matAnchor',\n host: MAT_ANCHOR_HOST,\n templateUrl: 'button.html',\n styleUrls: ['button.css', 'button-high-contrast.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class MatAnchor extends MatAnchorBase {\n constructor(\n elementRef: ElementRef,\n platform: Platform,\n ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n ) {\n super(elementRef, platform, ngZone, animationMode);\n }\n}\n","<span\n class=\"mat-mdc-button-persistent-ripple\"\n [class.mdc-button__ripple]=\"!_isFab\"\n [class.mdc-fab__ripple]=\"_isFab\"></span>\n\n<ng-content select=\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\">\n</ng-content>\n\n<span class=\"mdc-button__label\"><ng-content></ng-content></span>\n\n<ng-content select=\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\">\n</ng-content>\n\n<!--\n The indicator can't be directly on the button, because MDC uses ::before for high contrast\n indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\n-->\n<span class=\"mat-mdc-focus-indicator\"></span>\n\n<span class=\"mat-mdc-button-touch-target\"></span>\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\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n ViewEncapsulation,\n ANIMATION_MODULE_TYPE,\n} from '@angular/core';\nimport {MAT_ANCHOR_HOST, MAT_BUTTON_HOST, MatAnchorBase, MatButtonBase} from './button-base';\n\n/**\n * Material Design icon button component. This type of button displays a single interactive icon for\n * users to perform an action.\n * See https://material.io/develop/web/components/buttons/icon-buttons/\n */\n@Component({\n selector: `button[mat-icon-button]`,\n templateUrl: 'icon-button.html',\n styleUrls: ['icon-button.css', 'button-high-contrast.css'],\n host: MAT_BUTTON_HOST,\n exportAs: 'matButton',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class MatIconButton extends MatButtonBase {\n constructor(\n elementRef: ElementRef,\n platform: Platform,\n ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n ) {\n super(elementRef, platform, ngZone, animationMode);\n\n this._rippleLoader.configureRipple(this._elementRef.nativeElement, {centered: true});\n }\n}\n\n/**\n * Material Design icon button component for anchor elements. This button displays a single\n * interaction icon that allows users to navigate across different routes or pages.\n * See https://material.io/develop/web/components/buttons/icon-buttons/\n */\n@Component({\n selector: `a[mat-icon-button]`,\n templateUrl: 'icon-button.html',\n styleUrls: ['icon-button.css', 'button-high-contrast.css'],\n host: MAT_ANCHOR_HOST,\n exportAs: 'matButton, matAnchor',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class MatIconAnchor extends MatAnchorBase {\n constructor(\n elementRef: ElementRef,\n platform: Platform,\n ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n ) {\n super(elementRef, platform, ngZone, animationMode);\n }\n}\n","<span class=\"mat-mdc-button-persistent-ripple mdc-icon-button__ripple\"></span>\n\n<ng-content></ng-content>\n\n<!--\n The indicator can't be directly on the button, because MDC uses ::before for high contrast\n indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\n-->\n<span class=\"mat-mdc-focus-indicator\"></span>\n\n<span class=\"mat-mdc-button-touch-target\"></span>\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\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatAnchor, MatButton} from './button';\nimport {MatFabAnchor, MatFabButton, MatMiniFabAnchor, MatMiniFabButton} from './fab';\nimport {MatIconAnchor, MatIconButton} from './icon-button';\n\n@NgModule({\n imports: [\n MatCommonModule,\n MatRippleModule,\n MatAnchor,\n MatButton,\n MatIconAnchor,\n MatMiniFabAnchor,\n MatMiniFabButton,\n MatIconButton,\n MatFabAnchor,\n MatFabButton,\n ],\n exports: [\n MatAnchor,\n MatButton,\n MatIconAnchor,\n MatIconButton,\n MatMiniFabAnchor,\n MatMiniFabButton,\n MatFabAnchor,\n MatFabButton,\n MatCommonModule,\n ],\n})\nexport class MatButtonModule {}\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\nimport {InjectionToken} from '@angular/core';\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR = new InjectionToken<{value: any}>(\n 'MAT_INPUT_VALUE_ACCESSOR',\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/** @docs-private */\nexport function createMissingDateImplError(provider: string) {\n return Error(\n `MatDatepicker: No provider found for ${provider}. You must add one of the following ` +\n `to your app config: provideNativeDateAdapter, provideDateFnsAdapter, ` +\n `provideLuxonDateAdapter, provideMomentDateAdapter, or provide a custom implementation.`,\n );\n}\n","<!--\n If there's not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\n-->\n@if (_firstRowOffset < labelMinRequiredCells) {\n <tr aria-hidden=\"true\">\n <td class=\"mat-calendar-body-label\"\n [attr.colspan]=\"numCols\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{label}}\n </td>\n </tr>\n}\n\n<!-- Create the first row separately so we can include a special spacer cell. -->\n@for (row of rows; track row; let rowIndex = $index) {\n <tr role=\"row\">\n <!--\n This cell is purely decorative, but we can't put `aria-hidden` or `role=\"presentation\"` on it,\n because it throws off the week days for the rest of the row on NVDA. The aspect ratio of the\n table cells is maintained by setting the top and bottom padding as a percentage of the width\n (a variant of the trick described here: https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n -->\n @if (rowIndex === 0 && _firstRowOffset) {\n <td\n class=\"mat-calendar-body-label\"\n [attr.colspan]=\"_firstRowOffset\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\n </td>\n }\n <!--\n Each gridcell in the calendar contains a button, which signals to assistive technology that the\n cell is interactable, as well as the selection state via `aria-pressed`. See #23476 for\n background.\n -->\n @for (item of row; track item; let colIndex = $index) {\n <td\n role=\"gridcell\"\n class=\"mat-calendar-body-cell-container\"\n [style.width]=\"_cellWidth\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\"\n [attr.data-mat-row]=\"rowIndex\"\n [attr.data-mat-col]=\"colIndex\"\n >\n <button\n type=\"button\"\n class=\"mat-calendar-body-cell\"\n [ngClass]=\"item.cssClasses\"\n [tabindex]=\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [class.mat-calendar-body-disabled]=\"!item.enabled\"\n [class.mat-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\"\n [class.mat-calendar-body-range-start]=\"_isRangeStart(item.compareValue)\"\n [class.mat-calendar-body-range-end]=\"_isRangeEnd(item.compareValue)\"\n [class.mat-calendar-body-in-range]=\"_isInRange(item.compareValue)\"\n [class.mat-calendar-body-comparison-bridge-start]=\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-bridge-end]=\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-start]=\"_isComparisonStart(item.compareValue)\"\n [class.mat-calendar-body-comparison-end]=\"_isComparisonEnd(item.compareValue)\"\n [class.mat-calendar-body-in-comparison-range]=\"_isInComparisonRange(item.compareValue)\"\n [class.mat-calendar-body-preview-start]=\"_isPreviewStart(item.compareValue)\"\n [class.mat-calendar-body-preview-end]=\"_isPreviewEnd(item.compareValue)\"\n [class.mat-calendar-body-in-preview]=\"_isInPreview(item.compareValue)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-pressed]=\"_isSelected(item.compareValue)\"\n [attr.aria-current]=\"todayValue === item.compareValue ? 'date' : null\"\n [attr.aria-describedby]=\"_getDescribedby(item.compareValue)\"\n (click)=\"_cellClicked(item, $event)\"\n (focus)=\"_emitActiveDateChange(item, $event)\">\n <span class=\"mat-calendar-body-cell-content mat-focus-indicator\"\n [class.mat-calendar-body-selected]=\"_isSelected(item.compareValue)\"\n [class.mat-calendar-body-comparison-identical]=\"_isComparisonIdentical(item.compareValue)\"\n [class.mat-calendar-body-today]=\"todayValue === item.compareValue\">\n {{item.displayValue}}\n </span>\n <span class=\"mat-calendar-body-cell-preview\" aria-hidden=\"true\"></span>\n </button>\n </td>\n }\n </tr>\n}\n\n<label [id]=\"_startDateLabelId\" class=\"mat-calendar-body-hidden-label\">\n {{startDateAccessibleName}}\n</label>\n<label [id]=\"_endDateLabelId\" class=\"mat-calendar-body-hidden-label\">\n {{endDateAccessibleName}}\n</label>\n","<table class=\"mat-calendar-table\" role=\"grid\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n @for (day of _weekdays; track day) {\n <th scope=\"col\">\n <span class=\"cdk-visually-hidden\">{{day.long}}</span>\n <span aria-hidden=\"true\">{{day.narrow}}</span>\n </th>\n }\n </tr>\n <tr aria-hidden=\"true\"><th class=\"mat-calendar-table-header-divider\" colspan=\"7\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n [startDateAccessibleName]=\"startDateAccessibleName\"\n [endDateAccessibleName]=\"endDateAccessibleName\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (activeDateChange)=\"_updateActiveDate($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (dragStarted)=\"dragStarted.emit($event)\"\n (dragEnded)=\"_dragEnded($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n","<ng-template [cdkPortalOutlet]=\"_calendarHeaderPortal\"></ng-template>\n\n<div class=\"mat-calendar-content\" cdkMonitorSubtreeFocus tabindex=\"-1\">\n @switch (currentView) {\n @case ('month') {\n <mat-month-view\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [startDateAccessibleName]=\"startDateAccessibleName\"\n [endDateAccessibleName]=\"endDateAccessibleName\"\n (_userSelection)=\"_dateSelected($event)\"\n (dragStarted)=\"_dragStarted($event)\"\n (dragEnded)=\"_dragEnded($event)\"\n [activeDrag]=\"_activeDrag\"></mat-month-view>\n }\n\n @case ('year') {\n <mat-year-view\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (monthSelected)=\"_monthSelectedInYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'month')\"></mat-year-view>\n }\n\n @case ('multi-year') {\n <mat-multi-year-view\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (yearSelected)=\"_yearSelectedInMultiYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'year')\"></mat-multi-year-view>\n }\n }\n</div>\n","<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\">\n\n @if (!_customIcon) {\n <svg\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n }\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\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\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/** Datepicker data that requires internationalization. */\n@Injectable({providedIn: 'root'})\nexport class MatDatepickerIntl {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the calendar popup (used by screen readers). */\n calendarLabel = 'Calendar';\n\n /** A label for the button used to open the calendar popup (used by screen readers). */\n openCalendarLabel = 'Open calendar';\n\n /** Label for the button used to close the calendar popup. */\n closeCalendarLabel = 'Close calendar';\n\n /** A label for the previous month button (used by screen readers). */\n prevMonthLabel = 'Previous month';\n\n /** A label for the next month button (used by screen readers). */\n nextMonthLabel = 'Next month';\n\n /** A label for the previous year button (used by screen readers). */\n prevYearLabel = 'Previous year';\n\n /** A label for the next year button (used by screen readers). */\n nextYearLabel = 'Next year';\n\n /** A label for the previous multi-year button (used by screen readers). */\n prevMultiYearLabel = 'Previous 24 years';\n\n /** A label for the next multi-year button (used by screen readers). */\n nextMultiYearLabel = 'Next 24 years';\n\n /** A label for the 'switch to month view' button (used by screen readers). */\n switchToMonthViewLabel = 'Choose date';\n\n /** A label for the 'switch to year view' button (used by screen readers). */\n switchToMultiYearViewLabel = 'Choose month and year';\n\n /**\n * A label for the first date of a range of dates (used by screen readers).\n * @deprecated Provide your own internationalization string.\n * @breaking-change 17.0.0\n */\n startDateLabel = 'Start date';\n\n /**\n * A label for the last date of a range of dates (used by screen readers).\n * @deprecated Provide your own internationalization string.\n * @breaking-change 17.0.0\n */\n endDateLabel = 'End date';\n\n /** Formats a range of years (used for visuals). */\n formatYearRange(start: string, end: string): string {\n return `${start} \\u2013 ${end}`;\n }\n\n /** Formats a label for a range of years (used by screen readers). */\n formatYearRangeLabel(start: string, end: string): string {\n return `${start} to ${end}`;\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\nimport {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n NgZone,\n OnChanges,\n SimpleChanges,\n OnDestroy,\n AfterViewChecked,\n inject,\n} from '@angular/core';\nimport {take} from 'rxjs/operators';\nimport {NgClass} from '@angular/common';\n\n/** Extra CSS classes that can be associated with a calendar cell. */\nexport type MatCalendarCellCssClasses = string | string[] | Set<string> | {[key: string]: any};\n\n/** Function that can generate the extra classes that should be added to a calendar cell. */\nexport type MatCalendarCellClassFunction<D> = (\n date: D,\n view: 'month' | 'year' | 'multi-year',\n) => MatCalendarCellCssClasses;\n\n/**\n * An internal class that represents the data corresponding to a single calendar cell.\n * @docs-private\n */\nexport class MatCalendarCell<D = any> {\n constructor(\n public value: number,\n public displayValue: string,\n public ariaLabel: string,\n public enabled: boolean,\n public cssClasses: MatCalendarCellCssClasses = {},\n public compareValue = value,\n public rawValue?: D,\n ) {}\n}\n\n/** Event emitted when a date inside the calendar is triggered as a result of a user action. */\nexport interface MatCalendarUserEvent<D> {\n value: D;\n event: Event;\n}\n\nlet calendarBodyId = 1;\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = normalizePassiveListenerOptions({\n passive: false,\n capture: true,\n});\n\n/** Event options that can be used to bind a passive, capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n\n/** Event options that can be used to bind a passive, non-capturing event. */\nconst passiveEventOptions = normalizePassiveListenerOptions({passive: true});\n\n/**\n * An internal component used to display calendar data in a table.\n * @docs-private\n */\n@Component({\n selector: '[mat-calendar-body]',\n templateUrl: 'calendar-body.html',\n styleUrl: 'calendar-body.css',\n host: {\n 'class': 'mat-calendar-body',\n },\n exportAs: 'matCalendarBody',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgClass],\n})\nexport class MatCalendarBody<D = any> implements OnChanges, OnDestroy, AfterViewChecked {\n private _platform = inject(Platform);\n\n /**\n * Used to skip the next focus event when rendering the preview range.\n * We need a flag like this, because some browsers fire focus events asynchronously.\n */\n private _skipNextFocus: boolean;\n\n /**\n * Used to focus the active cell after change detection has run.\n */\n private _focusActiveCellAfterViewChecked = false;\n\n /** The label for the table. (e.g. \"Jan 2017\"). */\n @Input() label: string;\n\n /** The cells to display in the table. */\n @Input() rows: MatCalendarCell[][];\n\n /** The value in the table that corresponds to today. */\n @Input() todayValue: number;\n\n /** Start value of the selected date range. */\n @Input() startValue: number;\n\n /** End value of the selected date range. */\n @Input() endValue: number;\n\n /** The minimum number of free cells needed to fit the label in the first row. */\n @Input() labelMinRequiredCells: number;\n\n /** The number of columns in the table. */\n @Input() numCols: number = 7;\n\n /** The cell number of the active cell in the table. */\n @Input() activeCell: number = 0;\n\n ngAfterViewChecked() {\n if (this._focusActiveCellAfterViewChecked) {\n this._focusActiveCell();\n this._focusActiveCellAfterViewChecked = false;\n }\n }\n\n /** Whether a range is being selected. */\n @Input() isRange: boolean = false;\n\n /**\n * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be\n * maintained even as the table resizes.\n */\n @Input() cellAspectRatio: number = 1;\n\n /** Start of the comparison range. */\n @Input() comparisonStart: number | null;\n\n /** End of the comparison range. */\n @Input() comparisonEnd: number | null;\n\n /** Start of the preview range. */\n @Input() previewStart: number | null = null;\n\n /** End of the preview range. */\n @Input() previewEnd: number | null = null;\n\n /** ARIA Accessible name of the `<input matStartDate/>` */\n @Input() startDateAccessibleName: string | null;\n\n /** ARIA Accessible name of the `<input matEndDate/>` */\n @Input() endDateAccessibleName: string | null;\n\n /** Emits when a new value is selected. */\n @Output() readonly selectedValueChange = new EventEmitter<MatCalendarUserEvent<number>>();\n\n /** Emits when the preview has changed as a result of a user action. */\n @Output() readonly previewChange = new EventEmitter<\n MatCalendarUserEvent<MatCalendarCell | null>\n >();\n\n @Output() readonly activeDateChange = new EventEmitter<MatCalendarUserEvent<number>>();\n\n /** Emits the date at the possible start of a drag event. */\n @Output() readonly dragStarted = new EventEmitter<MatCalendarUserEvent<D>>();\n\n /** Emits the date at the conclusion of a drag, or null if mouse was not released on a date. */\n @Output() readonly dragEnded = new EventEmitter<MatCalendarUserEvent<D | null>>();\n\n /** The number of blank cells to put at the beginning for the first row. */\n _firstRowOffset: number;\n\n /** Padding for the individual date cells. */\n _cellPadding: string;\n\n /** Width of an individual cell. */\n _cellWidth: string;\n\n private _didDragSinceMouseDown = false;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _ngZone: NgZone,\n ) {\n _ngZone.runOutsideAngular(() => {\n const element = _elementRef.nativeElement;\n\n // `touchmove` is active since we need to call `preventDefault`.\n element.addEventListener('touchmove', this._touchmoveHandler, activeCapturingEventOptions);\n\n element.addEventListener('mouseenter', this._enterHandler, passiveCapturingEventOptions);\n element.addEventListener('focus', this._enterHandler, passiveCapturingEventOptions);\n element.addEventListener('mouseleave', this._leaveHandler, passiveCapturingEventOptions);\n element.addEventListener('blur', this._leaveHandler, passiveCapturingEventOptions);\n\n element.addEventListener('mousedown', this._mousedownHandler, passiveEventOptions);\n element.addEventListener('touchstart', this._mousedownHandler, passiveEventOptions);\n\n if (this._platform.isBrowser) {\n window.addEventListener('mouseup', this._mouseupHandler);\n window.addEventListener('touchend', this._touchendHandler);\n }\n });\n }\n\n /** Called when a cell is clicked. */\n _cellClicked(cell: MatCalendarCell, event: MouseEvent): void {\n // Ignore \"clicks\" that are actually canceled drags (eg the user dragged\n // off and then went back to this cell to undo).\n if (this._didDragSinceMouseDown) {\n return;\n }\n\n if (cell.enabled) {\n this.selectedValueChange.emit({value: cell.value, event});\n }\n }\n\n _emitActiveDateChange(cell: MatCalendarCell, event: FocusEvent): void {\n if (cell.enabled) {\n this.activeDateChange.emit({value: cell.value, event});\n }\n }\n\n /** Returns whether a cell should be marked as selected. */\n _isSelected(value: number) {\n return this.startValue === value || this.endValue === value;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const columnChanges = changes['numCols'];\n const {rows, numCols} = this;\n\n if (changes['rows'] || columnChanges) {\n this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;\n }\n\n if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {\n this._cellPadding = `${(50 * this.cellAspectRatio) / numCols}%`;\n }\n\n if (columnChanges || !this._cellWidth) {\n this._cellWidth = `${100 / numCols}%`;\n }\n }\n\n ngOnDestroy() {\n const element = this._elementRef.nativeElement;\n\n element.removeEventListener('touchmove', this._touchmoveHandler, activeCapturingEventOptions);\n\n element.removeEventListener('mouseenter', this._enterHandler, passiveCapturingEventOptions);\n element.removeEventListener('focus', this._enterHandler, passiveCapturingEventOptions);\n element.removeEventListener('mouseleave', this._leaveHandler, passiveCapturingEventOptions);\n element.removeEventListener('blur', this._leaveHandler, passiveCapturingEventOptions);\n\n element.removeEventListener('mousedown', this._mousedownHandler, passiveEventOptions);\n element.removeEventListener('touchstart', this._mousedownHandler, passiveEventOptions);\n\n if (this._platform.isBrowser) {\n window.removeEventListener('mouseup', this._mouseupHandler);\n window.removeEventListener('touchend', this._touchendHandler);\n }\n }\n\n /** Returns whether a cell is active. */\n _isActiveCell(rowIndex: number, colIndex: number): boolean {\n let cellNumber = rowIndex * this.numCols + colIndex;\n\n // Account for the fact that the first row may not have as many cells.\n if (rowIndex) {\n cellNumber -= this._firstRowOffset;\n }\n\n return cellNumber == this.activeCell;\n }\n\n /**\n * Focuses the active cell after the microtask queue is empty.\n *\n * Adding a 0ms setTimeout seems to fix Voiceover losing focus when pressing PageUp/PageDown\n * (issue #24330).\n *\n * Determined a 0ms by gradually increasing duration from 0 and testing two use cases with screen\n * reader enabled:\n *\n * 1. Pressing PageUp/PageDown repeatedly with pausing between each key press.\n * 2. Pressing and holding the PageDown key with repeated keys enabled.\n *\n * Test 1 worked roughly 95-99% of the time with 0ms and got a little bit better as the duration\n * increased. Test 2 got slightly better until the duration was long enough to interfere with\n * repeated keys. If the repeated key speed was faster than the timeout duration, then pressing\n * and holding pagedown caused the entire page to scroll.\n *\n * Since repeated key speed can verify across machines, determined that any duration could\n * potentially interfere with repeated keys. 0ms would be best because it almost entirely\n * eliminates the focus being lost in Voiceover (#24330) without causing unintended side effects.\n * Adding delay also complicates writing tests.\n */\n _focusActiveCell(movePreview = true) {\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n setTimeout(() => {\n const activeCell: HTMLElement | null = this._elementRef.nativeElement.querySelector(\n '.mat-calendar-body-active',\n );\n\n if (activeCell) {\n if (!movePreview) {\n this._skipNextFocus = true;\n }\n\n activeCell.focus();\n }\n });\n });\n });\n }\n\n /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n _scheduleFocusActiveCellAfterViewChecked() {\n this._focusActiveCellAfterViewChecked = true;\n }\n\n /** Gets whether a value is the start of the main range. */\n _isRangeStart(value: number) {\n return isStart(value, this.startValue, this.endValue);\n }\n\n /** Gets whether a value is the end of the main range. */\n _isRangeEnd(value: number) {\n return isEnd(value, this.startValue, this.endValue);\n }\n\n /** Gets whether a value is within the currently-selected range. */\n _isInRange(value: number): boolean {\n return isInRange(value, this.startValue, this.endValue, this.isRange);\n }\n\n /** Gets whether a value is the start of the comparison range. */\n _isComparisonStart(value: number) {\n return isStart(value, this.comparisonStart, this.comparisonEnd);\n }\n\n /** Whether the cell is a start bridge cell between the main and comparison ranges. */\n _isComparisonBridgeStart(value: number, rowIndex: number, colIndex: number) {\n if (!this._isComparisonStart(value) || this._isRangeStart(value) || !this._isInRange(value)) {\n return false;\n }\n\n let previousCell: MatCalendarCell | undefined = this.rows[rowIndex][colIndex - 1];\n\n if (!previousCell) {\n const previousRow = this.rows[rowIndex - 1];\n previousCell = previousRow && previousRow[previousRow.length - 1];\n }\n\n return previousCell && !this._isRangeEnd(previousCell.compareValue);\n }\n\n /** Whether the cell is an end bridge cell between the main and comparison ranges. */\n _isComparisonBridgeEnd(value: number, rowIndex: number, colIndex: number) {\n if (!this._isComparisonEnd(value) || this._isRangeEnd(value) || !this._isInRange(value)) {\n return false;\n }\n\n let nextCell: MatCalendarCell | undefined = this.rows[rowIndex][colIndex + 1];\n\n if (!nextCell) {\n const nextRow = this.rows[rowIndex + 1];\n nextCell = nextRow && nextRow[0];\n }\n\n return nextCell && !this._isRangeStart(nextCell.compareValue);\n }\n\n /** Gets whether a value is the end of the comparison range. */\n _isComparisonEnd(value: number) {\n return isEnd(value, this.comparisonStart, this.comparisonEnd);\n }\n\n /** Gets whether a value is within the current comparison range. */\n _isInComparisonRange(value: number) {\n return isInRange(value, this.comparisonStart, this.comparisonEnd, this.isRange);\n }\n\n /**\n * Gets whether a value is the same as the start and end of the comparison range.\n * For context, the functions that we use to determine whether something is the start/end of\n * a range don't allow for the start and end to be on the same day, because we'd have to use\n * much more specific CSS selectors to style them correctly in all scenarios. This is fine for\n * the regular range, because when it happens, the selected styles take over and still show where\n * the range would've been, however we don't have these selected styles for a comparison range.\n * This function is used to apply a class that serves the same purpose as the one for selected\n * dates, but it only applies in the context of a comparison range.\n */\n _isComparisonIdentical(value: number) {\n // Note that we don't need to null check the start/end\n // here, because the `value` will always be defined.\n return this.comparisonStart === this.comparisonEnd && value === this.comparisonStart;\n }\n\n /** Gets whether a value is the start of the preview range. */\n _isPreviewStart(value: number) {\n return isStart(value, this.previewStart, this.previewEnd);\n }\n\n /** Gets whether a value is the end of the preview range. */\n _isPreviewEnd(value: number) {\n return isEnd(value, this.previewStart, this.previewEnd);\n }\n\n /** Gets whether a value is inside the preview range. */\n _isInPreview(value: number) {\n return isInRange(value, this.previewStart, this.previewEnd, this.isRange);\n }\n\n /** Gets ids of aria descriptions for the start and end of a date range. */\n _getDescribedby(value: number): string | null {\n if (!this.isRange) {\n return null;\n }\n\n if (this.startValue === value && this.endValue === value) {\n return `${this._startDateLabelId} ${this._endDateLabelId}`;\n } else if (this.startValue === value) {\n return this._startDateLabelId;\n } else if (this.endValue === value) {\n return this._endDateLabelId;\n }\n return null;\n }\n\n /**\n * Event handler for when the user enters an element\n * inside the calendar body (e.g. by hovering in or focus).\n */\n private _enterHandler = (event: Event) => {\n if (this._skipNextFocus && event.type === 'focus') {\n this._skipNextFocus = false;\n return;\n }\n\n // We only need to hit the zone when we're selecting a range.\n if (event.target && this.isRange) {\n const cell = this._getCellFromElement(event.target as HTMLElement);\n\n if (cell) {\n this._ngZone.run(() => this.previewChange.emit({value: cell.enabled ? cell : null, event}));\n }\n }\n };\n\n private _touchmoveHandler = (event: TouchEvent) => {\n if (!this.isRange) return;\n\n const target = getActualTouchTarget(event);\n const cell = target ? this._getCellFromElement(target as HTMLElement) : null;\n\n if (target !== event.target) {\n this._didDragSinceMouseDown = true;\n }\n\n // If the initial target of the touch is a date cell, prevent default so\n // that the move is not handled as a scroll.\n if (getCellElement(event.target as HTMLElement)) {\n event.preventDefault();\n }\n\n this._ngZone.run(() => this.previewChange.emit({value: cell?.enabled ? cell : null, event}));\n };\n\n /**\n * Event handler for when the user's pointer leaves an element\n * inside the calendar body (e.g. by hovering out or blurring).\n */\n private _leaveHandler = (event: Event) => {\n // We only need to hit the zone when we're selecting a range.\n if (this.previewEnd !== null && this.isRange) {\n if (event.type !== 'blur') {\n this._didDragSinceMouseDown = true;\n }\n\n // Only reset the preview end value when leaving cells. This looks better, because\n // we have a gap between the cells and the rows and we don't want to remove the\n // range just for it to show up again when the user moves a few pixels to the side.\n if (\n event.target &&\n this._getCellFromElement(event.target as HTMLElement) &&\n !(\n (event as MouseEvent).relatedTarget &&\n this._getCellFromElement((event as MouseEvent).relatedTarget as HTMLElement)\n )\n ) {\n this._ngZone.run(() => this.previewChange.emit({value: null, event}));\n }\n }\n };\n\n /**\n * Triggered on mousedown or touchstart on a date cell.\n * Respsonsible for starting a drag sequence.\n */\n private _mousedownHandler = (event: Event) => {\n if (!this.isRange) return;\n\n this._didDragSinceMouseDown = false;\n // Begin a drag if a cell within the current range was targeted.\n const cell = event.target && this._getCellFromElement(event.target as HTMLElement);\n if (!cell || !this._isInRange(cell.compareValue)) {\n return;\n }\n\n this._ngZone.run(() => {\n this.dragStarted.emit({\n value: cell.rawValue,\n event,\n });\n });\n };\n\n /** Triggered on mouseup anywhere. Respsonsible for ending a drag sequence. */\n private _mouseupHandler = (event: Event) => {\n if (!this.isRange) return;\n\n const cellElement = getCellElement(event.target as HTMLElement);\n if (!cellElement) {\n // Mouseup happened outside of datepicker. Cancel drag.\n this._ngZone.run(() => {\n this.dragEnded.emit({value: null, event});\n });\n return;\n }\n\n if (cellElement.closest('.mat-calendar-body') !== this._elementRef.nativeElement) {\n // Mouseup happened inside a different month instance.\n // Allow it to handle the event.\n return;\n }\n\n this._ngZone.run(() => {\n const cell = this._getCellFromElement(cellElement);\n this.dragEnded.emit({value: cell?.rawValue ?? null, event});\n });\n };\n\n /** Triggered on touchend anywhere. Respsonsible for ending a drag sequence. */\n private _touchendHandler = (event: TouchEvent) => {\n const target = getActualTouchTarget(event);\n\n if (target) {\n this._mouseupHandler({target} as unknown as Event);\n }\n };\n\n /** Finds the MatCalendarCell that corresponds to a DOM node. */\n private _getCellFromElement(element: HTMLElement): MatCalendarCell | null {\n const cell = getCellElement(element);\n\n if (cell) {\n const row = cell.getAttribute('data-mat-row');\n const col = cell.getAttribute('data-mat-col');\n\n if (row && col) {\n return this.rows[parseInt(row)][parseInt(col)];\n }\n }\n\n return null;\n }\n\n private _id = `mat-calendar-body-${calendarBodyId++}`;\n\n _startDateLabelId = `${this._id}-start-date`;\n\n _endDateLabelId = `${this._id}-end-date`;\n}\n\n/** Checks whether a node is a table cell element. */\nfunction isTableCell(node: Node | undefined | null): node is HTMLTableCellElement {\n return node?.nodeName === 'TD';\n}\n\n/**\n * Gets the date table cell element that is or contains the specified element.\n * Or returns null if element is not part of a date cell.\n */\nfunction getCellElement(element: HTMLElement): HTMLElement | null {\n let cell: HTMLElement | undefined;\n if (isTableCell(element)) {\n cell = element;\n } else if (isTableCell(element.parentNode)) {\n cell = element.parentNode as HTMLElement;\n } else if (isTableCell(element.parentNode?.parentNode)) {\n cell = element.parentNode!.parentNode as HTMLElement;\n }\n\n return cell?.getAttribute('data-mat-row') != null ? cell : null;\n}\n\n/** Checks whether a value is the start of a range. */\nfunction isStart(value: number, start: number | null, end: number | null): boolean {\n return end !== null && start !== end && value < end && value === start;\n}\n\n/** Checks whether a value is the end of a range. */\nfunction isEnd(value: number, start: number | null, end: number | null): boolean {\n return start !== null && start !== end && value >= start && value === end;\n}\n\n/** Checks whether a value is inside of a range. */\nfunction isInRange(\n value: number,\n start: number | null,\n end: number | null,\n rangeEnabled: boolean,\n): boolean {\n return (\n rangeEnabled &&\n start !== null &&\n end !== null &&\n start !== end &&\n value >= start &&\n value <= end\n );\n}\n\n/**\n * Extracts the element that actually corresponds to a touch event's location\n * (rather than the element that initiated the sequence of touch events).\n */\nfunction getActualTouchTarget(event: TouchEvent): Element | null {\n const touchLocation = event.changedTouches[0];\n return document.elementFromPoint(touchLocation.clientX, touchLocation.clientY);\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\nimport {FactoryProvider, Injectable, Optional, SkipSelf, OnDestroy} from '@angular/core';\nimport {DateAdapter} from '@angular/material/core';\nimport {Observable, Subject} from 'rxjs';\n\n/** A class representing a range of dates. */\nexport class DateRange<D> {\n /**\n * Ensures that objects with a `start` and `end` property can't be assigned to a variable that\n * expects a `DateRange`\n */\n // tslint:disable-next-line:no-unused-variable\n private _disableStructuralEquivalency: never;\n\n constructor(\n /** The start date of the range. */\n readonly start: D | null,\n /** The end date of the range. */\n readonly end: D | null,\n ) {}\n}\n\n/**\n * Conditionally picks the date type, if a DateRange is passed in.\n * @docs-private\n */\nexport type ExtractDateTypeFromSelection<T> = T extends DateRange<infer D> ? D : NonNullable<T>;\n\n/**\n * Event emitted by the date selection model when its selection changes.\n * @docs-private\n */\nexport interface DateSelectionModelChange<S> {\n /** New value for the selection. */\n selection: S;\n\n /** Object that triggered the change. */\n source: unknown;\n\n /** Previous value */\n oldValue?: S;\n}\n\n/**\n * A selection model containing a date selection.\n * @docs-private\n */\n@Injectable()\nexport abstract class MatDateSelectionModel<S, D = ExtractDateTypeFromSelection<S>>\n implements OnDestroy\n{\n private readonly _selectionChanged = new Subject<DateSelectionModelChange<S>>();\n\n /** Emits when the selection has changed. */\n selectionChanged: Observable<DateSelectionModelChange<S>> = this._selectionChanged;\n\n protected constructor(\n /** The current selection. */\n readonly selection: S,\n protected _adapter: DateAdapter<D>,\n ) {\n this.selection = selection;\n }\n\n /**\n * Updates the current selection in the model.\n * @param value New selection that should be assigned.\n * @param source Object that triggered the selection change.\n */\n updateSelection(value: S, source: unknown) {\n const oldValue = (this as {selection: S}).selection;\n (this as {selection: S}).selection = value;\n this._selectionChanged.next({selection: value, source, oldValue});\n }\n\n ngOnDestroy() {\n this._selectionChanged.complete();\n }\n\n protected _isValidDateInstance(date: D): boolean {\n return this._adapter.isDateInstance(date) && this._adapter.isValid(date);\n }\n\n /** Adds a date to the current selection. */\n abstract add(date: D | null): void;\n\n /** Checks whether the current selection is valid. */\n abstract isValid(): boolean;\n\n /** Checks whether the current selection is complete. */\n abstract isComplete(): boolean;\n\n /** Clones the selection model. */\n abstract clone(): MatDateSelectionModel<S, D>;\n}\n\n/**\n * A selection model that contains a single date.\n * @docs-private\n */\n@Injectable()\nexport class MatSingleDateSelectionModel<D> extends MatDateSelectionModel<D | null, D> {\n constructor(adapter: DateAdapter<D>) {\n super(null, adapter);\n }\n\n /**\n * Adds a date to the current selection. In the case of a single date selection, the added date\n * simply overwrites the previous selection\n */\n add(date: D | null) {\n super.updateSelection(date, this);\n }\n\n /** Checks whether the current selection is valid. */\n isValid(): boolean {\n return this.selection != null && this._isValidDateInstance(this.selection);\n }\n\n /**\n * Checks whether the current selection is complete. In the case of a single date selection, this\n * is true if the current selection is not null.\n */\n isComplete() {\n return this.selection != null;\n }\n\n /** Clones the selection model. */\n clone() {\n const clone = new MatSingleDateSelectionModel<D>(this._adapter);\n clone.updateSelection(this.selection, this);\n return clone;\n }\n}\n\n/**\n * A selection model that contains a date range.\n * @docs-private\n */\n@Injectable()\nexport class MatRangeDateSelectionModel<D> extends MatDateSelectionModel<DateRange<D>, D> {\n constructor(adapter: DateAdapter<D>) {\n super(new DateRange<D>(null, null), adapter);\n }\n\n /**\n * Adds a date to the current selection. In the case of a date range selection, the added date\n * fills in the next `null` value in the range. If both the start and the end already have a date,\n * the selection is reset so that the given date is the new `start` and the `end` is null.\n */\n add(date: D | null): void {\n let {start, end} = this.selection;\n\n if (start == null) {\n start = date;\n } else if (end == null) {\n end = date;\n } else {\n start = date;\n end = null;\n }\n\n super.updateSelection(new DateRange<D>(start, end), this);\n }\n\n /** Checks whether the current selection is valid. */\n isValid(): boolean {\n const {start, end} = this.selection;\n\n // Empty ranges are valid.\n if (start == null && end == null) {\n return true;\n }\n\n // Complete ranges are only valid if both dates are valid and the start is before the end.\n if (start != null && end != null) {\n return (\n this._isValidDateInstance(start) &&\n this._isValidDateInstance(end) &&\n this._adapter.compareDate(start, end) <= 0\n );\n }\n\n // Partial ranges are valid if the start/end is valid.\n return (\n (start == null || this._isValidDateInstance(start)) &&\n (end == null || this._isValidDateInstance(end))\n );\n }\n\n /**\n * Checks whether the current selection is complete. In the case of a date range selection, this\n * is true if the current selection has a non-null `start` and `end`.\n */\n isComplete(): boolean {\n return this.selection.start != null && this.selection.end != null;\n }\n\n /** Clones the selection model. */\n clone() {\n const clone = new MatRangeDateSelectionModel<D>(this._adapter);\n clone.updateSelection(this.selection, this);\n return clone;\n }\n}\n\n/** @docs-private */\nexport function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(\n parent: MatSingleDateSelectionModel<unknown>,\n adapter: DateAdapter<unknown>,\n) {\n return parent || new MatSingleDateSelectionModel(adapter);\n}\n\n/**\n * Used to provide a single selection model to a component.\n * @docs-private\n */\nexport const MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider = {\n provide: MatDateSelectionModel,\n deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],\n useFactory: MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY,\n};\n\n/** @docs-private */\nexport function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(\n parent: MatSingleDateSelectionModel<unknown>,\n adapter: DateAdapter<unknown>,\n) {\n return parent || new MatRangeDateSelectionModel(adapter);\n}\n\n/**\n * Used to provide a range selection model to a component.\n * @docs-private\n */\nexport const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider = {\n provide: MatDateSelectionModel,\n deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],\n useFactory: MAT_RANGE_DATE_SELECTION_MODEL_FACTORY,\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\nimport {Injectable, InjectionToken, Optional, SkipSelf, FactoryProvider} from '@angular/core';\nimport {DateAdapter} from '@angular/material/core';\nimport {DateRange} from './date-selection-model';\n\n/** Injection token used to customize the date range selection behavior. */\nexport const MAT_DATE_RANGE_SELECTION_STRATEGY = new InjectionToken<\n MatDateRangeSelectionStrategy<any>\n>('MAT_DATE_RANGE_SELECTION_STRATEGY');\n\n/** Object that can be provided in order to customize the date range selection behavior. */\nexport interface MatDateRangeSelectionStrategy<D> {\n /**\n * Called when the user has finished selecting a value.\n * @param date Date that was selected. Will be null if the user cleared the selection.\n * @param currentRange Range that is currently show in the calendar.\n * @param event DOM event that triggered the selection. Currently only corresponds to a `click`\n * event, but it may get expanded in the future.\n */\n selectionFinished(date: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;\n\n /**\n * Called when the user has activated a new date (e.g. by hovering over\n * it or moving focus) and the calendar tries to display a date range.\n *\n * @param activeDate Date that the user has activated. Will be null if the user moved\n * focus to an element that's no a calendar cell.\n * @param currentRange Range that is currently shown in the calendar.\n * @param event DOM event that caused the preview to be changed. Will be either a\n * `mouseenter`/`mouseleave` or `focus`/`blur` depending on how the user is navigating.\n */\n createPreview(activeDate: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;\n\n /**\n * Called when the user has dragged a date in the currently selected range to another\n * date. Returns the date updated range that should result from this interaction.\n *\n * @param dateOrigin The date the user started dragging from.\n * @param originalRange The originally selected date range.\n * @param newDate The currently targeted date in the drag operation.\n * @param event DOM event that triggered the updated drag state. Will be\n * `mouseenter`/`mouseup` or `touchmove`/`touchend` depending on the device type.\n */\n createDrag?(\n dragOrigin: D,\n originalRange: DateRange<D>,\n newDate: D,\n event: Event,\n ): DateRange<D> | null;\n}\n\n/** Provides the default date range selection behavior. */\n@Injectable()\nexport class DefaultMatCalendarRangeStrategy<D> implements MatDateRangeSelectionStrategy<D> {\n constructor(private _dateAdapter: DateAdapter<D>) {}\n\n selectionFinished(date: D, currentRange: DateRange<D>) {\n let {start, end} = currentRange;\n\n if (start == null) {\n start = date;\n } else if (end == null && date && this._dateAdapter.compareDate(date, start) >= 0) {\n end = date;\n } else {\n start = date;\n end = null;\n }\n\n return new DateRange<D>(start, end);\n }\n\n createPreview(activeDate: D | null, currentRange: DateRange<D>) {\n let start: D | null = null;\n let end: D | null = null;\n\n if (currentRange.start && !currentRange.end && activeDate) {\n start = currentRange.start;\n end = activeDate;\n }\n\n return new DateRange<D>(start, end);\n }\n\n createDrag(dragOrigin: D, originalRange: DateRange<D>, newDate: D) {\n let start = originalRange.start;\n let end = originalRange.end;\n\n if (!start || !end) {\n // Can't drag from an incomplete range.\n return null;\n }\n\n const adapter = this._dateAdapter;\n\n const isRange = adapter.compareDate(start, end) !== 0;\n const diffYears = adapter.getYear(newDate) - adapter.getYear(dragOrigin);\n const diffMonths = adapter.getMonth(newDate) - adapter.getMonth(dragOrigin);\n const diffDays = adapter.getDate(newDate) - adapter.getDate(dragOrigin);\n\n if (isRange && adapter.sameDate(dragOrigin, originalRange.start)) {\n start = newDate;\n if (adapter.compareDate(newDate, end) > 0) {\n end = adapter.addCalendarYears(end, diffYears);\n end = adapter.addCalendarMonths(end, diffMonths);\n end = adapter.addCalendarDays(end, diffDays);\n }\n } else if (isRange && adapter.sameDate(dragOrigin, originalRange.end)) {\n end = newDate;\n if (adapter.compareDate(newDate, start) < 0) {\n start = adapter.addCalendarYears(start, diffYears);\n start = adapter.addCalendarMonths(start, diffMonths);\n start = adapter.addCalendarDays(start, diffDays);\n }\n } else {\n start = adapter.addCalendarYears(start, diffYears);\n start = adapter.addCalendarMonths(start, diffMonths);\n start = adapter.addCalendarDays(start, diffDays);\n end = adapter.addCalendarYears(end, diffYears);\n end = adapter.addCalendarMonths(end, diffMonths);\n end = adapter.addCalendarDays(end, diffDays);\n }\n\n return new DateRange<D>(start, end);\n }\n}\n\n/** @docs-private */\nexport function MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(\n parent: MatDateRangeSelectionStrategy<unknown>,\n adapter: DateAdapter<unknown>,\n) {\n return parent || new DefaultMatCalendarRangeStrategy(adapter);\n}\n\n/** @docs-private */\nexport const MAT_CALENDAR_RANGE_STRATEGY_PROVIDER: FactoryProvider = {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n deps: [[new Optional(), new SkipSelf(), MAT_DATE_RANGE_SELECTION_STRATEGY], DateAdapter],\n useFactory: MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY,\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\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n ESCAPE,\n hasModifierKey,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n ViewEncapsulation,\n ViewChild,\n OnDestroy,\n SimpleChanges,\n OnChanges,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n MatCalendarBody,\n MatCalendarCell,\n MatCalendarUserEvent,\n MatCalendarCellClassFunction,\n} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {Subscription} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\nimport {DateRange} from './date-selection-model';\nimport {\n MatDateRangeSelectionStrategy,\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n} from './date-range-selection-strategy';\n\nconst DAYS_PER_WEEK = 7;\n\n/**\n * An internal component used to display a single month in the datepicker.\n * @docs-private\n */\n@Component({\n selector: 'mat-month-view',\n templateUrl: 'month-view.html',\n exportAs: 'matMonthView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatCalendarBody],\n})\nexport class MatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy {\n private _rerenderSubscription = Subscription.EMPTY;\n\n /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n private _selectionKeyPressed: boolean;\n\n /**\n * The date to display in this month view (everything other than the month and year is ignored).\n */\n @Input()\n get activeDate(): D {\n return this._activeDate;\n }\n set activeDate(value: D) {\n const oldActiveDate = this._activeDate;\n const validDate =\n this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): DateRange<D> | D | null {\n return this._selected;\n }\n set selected(value: DateRange<D> | D | null) {\n if (value instanceof DateRange) {\n this._selected = value;\n } else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n\n this._setRanges(this._selected);\n }\n private _selected: DateRange<D> | D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null {\n return this._minDate;\n }\n set minDate(value: D | null) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null {\n return this._maxDate;\n }\n set maxDate(value: D | null) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** Function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: MatCalendarCellClassFunction<D>;\n\n /** Start of the comparison range. */\n @Input() comparisonStart: D | null;\n\n /** End of the comparison range. */\n @Input() comparisonEnd: D | null;\n\n /** ARIA Accessible name of the `<input matStartDate/>` */\n @Input() startDateAccessibleName: string | null;\n\n /** ARIA Accessible name of the `<input matEndDate/>` */\n @Input() endDateAccessibleName: string | null;\n\n /** Origin of active drag, or null when dragging is not active. */\n @Input() activeDrag: MatCalendarUserEvent<D> | null = null;\n\n /** Emits when a new date is selected. */\n @Output() readonly selectedChange: EventEmitter<D | null> = new EventEmitter<D | null>();\n\n /** Emits when any date is selected. */\n @Output() readonly _userSelection: EventEmitter<MatCalendarUserEvent<D | null>> =\n new EventEmitter<MatCalendarUserEvent<D | null>>();\n\n /** Emits when the user initiates a date range drag via mouse or touch. */\n @Output() readonly dragStarted = new EventEmitter<MatCalendarUserEvent<D>>();\n\n /**\n * Emits when the user completes or cancels a date range drag.\n * Emits null when the drag was canceled or the newly selected date range if completed.\n */\n @Output() readonly dragEnded = new EventEmitter<MatCalendarUserEvent<DateRange<D> | null>>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody) _matCalendarBody: MatCalendarBody;\n\n /** The label for this month (e.g. \"January 2017\"). */\n _monthLabel: string;\n\n /** Grid of calendar cells representing the dates of the month. */\n _weeks: MatCalendarCell[][];\n\n /** The number of blank cells in the first row before the 1st of the month. */\n _firstWeekOffset: number;\n\n /** Start value of the currently-shown date range. */\n _rangeStart: number | null;\n\n /** End value of the currently-shown date range. */\n _rangeEnd: number | null;\n\n /** Start value of the currently-shown comparison date range. */\n _comparisonRangeStart: number | null;\n\n /** End value of the currently-shown comparison date range. */\n _comparisonRangeEnd: number | null;\n\n /** Start of the preview range. */\n _previewStart: number | null;\n\n /** End of the preview range. */\n _previewEnd: number | null;\n\n /** Whether the user is currently selecting a range of dates. */\n _isRange: boolean;\n\n /** The date of the month that today falls on. Null if today is in another month. */\n _todayDate: number | null;\n\n /** The names of the weekdays. */\n _weekdays: {long: string; narrow: string}[];\n\n constructor(\n readonly _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality,\n @Inject(MAT_DATE_RANGE_SELECTION_STRATEGY)\n @Optional()\n private _rangeStrategy?: MatDateRangeSelectionStrategy<D>,\n ) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._rerenderSubscription = this._dateAdapter.localeChanges\n .pipe(startWith(null))\n .subscribe(() => this._init());\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const comparisonChange = changes['comparisonStart'] || changes['comparisonEnd'];\n\n if (comparisonChange && !comparisonChange.firstChange) {\n this._setRanges(this.selected);\n }\n\n if (changes['activeDrag'] && !this.activeDrag) {\n this._clearPreview();\n }\n }\n\n ngOnDestroy() {\n this._rerenderSubscription.unsubscribe();\n }\n\n /** Handles when a new date is selected. */\n _dateSelected(event: MatCalendarUserEvent<number>) {\n const date = event.value;\n const selectedDate = this._getDateFromDayOfMonth(date);\n let rangeStartDate: number | null;\n let rangeEndDate: number | null;\n\n if (this._selected instanceof DateRange) {\n rangeStartDate = this._getDateInCurrentMonth(this._selected.start);\n rangeEndDate = this._getDateInCurrentMonth(this._selected.end);\n } else {\n rangeStartDate = rangeEndDate = this._getDateInCurrentMonth(this._selected);\n }\n\n if (rangeStartDate !== date || rangeEndDate !== date) {\n this.selectedChange.emit(selectedDate);\n }\n\n this._userSelection.emit({value: selectedDate, event: event.event});\n this._clearPreview();\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Takes the index of a calendar body cell wrapped in an event as argument. For the date that\n * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n * that date.\n *\n * This function is used to match each component's model of the active date with the calendar\n * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n * updated value asynchronously via the `activeCell` Input.\n */\n _updateActiveDate(event: MatCalendarUserEvent<number>) {\n const month = event.value;\n const oldActiveDate = this._activeDate;\n this.activeDate = this._getDateFromDayOfMonth(month);\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this._activeDate);\n }\n }\n\n /** Handles keydown events on the calendar body when calendar is in month view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarDays(\n this._activeDate,\n 1 - this._dateAdapter.getDate(this._activeDate),\n );\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarDays(\n this._activeDate,\n this._dateAdapter.getNumDaysInMonth(this._activeDate) -\n this._dateAdapter.getDate(this._activeDate),\n );\n break;\n case PAGE_UP:\n this.activeDate = event.altKey\n ? this._dateAdapter.addCalendarYears(this._activeDate, -1)\n : this._dateAdapter.addCalendarMonths(this._activeDate, -1);\n break;\n case PAGE_DOWN:\n this.activeDate = event.altKey\n ? this._dateAdapter.addCalendarYears(this._activeDate, 1)\n : this._dateAdapter.addCalendarMonths(this._activeDate, 1);\n break;\n case ENTER:\n case SPACE:\n this._selectionKeyPressed = true;\n\n if (this._canSelect(this._activeDate)) {\n // Prevent unexpected default actions such as form submission.\n // Note that we only prevent the default action here while the selection happens in\n // `keyup` below. We can't do the selection here, because it can cause the calendar to\n // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n // because it's too late (see #23305).\n event.preventDefault();\n }\n return;\n case ESCAPE:\n // Abort the current range selection if the user presses escape mid-selection.\n if (this._previewEnd != null && !hasModifierKey(event)) {\n this._clearPreview();\n // If a drag is in progress, cancel the drag without changing the\n // current selection.\n if (this.activeDrag) {\n this.dragEnded.emit({value: null, event});\n } else {\n this.selectedChange.emit(null);\n this._userSelection.emit({value: null, event});\n }\n event.preventDefault();\n event.stopPropagation(); // Prevents the overlay from closing.\n }\n return;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n\n this._focusActiveCellAfterViewChecked();\n }\n\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Handles keyup events on the calendar body when calendar is in month view. */\n _handleCalendarBodyKeyup(event: KeyboardEvent): void {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this._selectionKeyPressed && this._canSelect(this._activeDate)) {\n this._dateSelected({value: this._dateAdapter.getDate(this._activeDate), event});\n }\n\n this._selectionKeyPressed = false;\n }\n }\n\n /** Initializes this month view. */\n _init() {\n this._setRanges(this.selected);\n this._todayDate = this._getCellCompareValue(this._dateAdapter.today());\n this._monthLabel = this._dateFormats.display.monthLabel\n ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)\n : this._dateAdapter\n .getMonthNames('short')\n [this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();\n\n let firstOfMonth = this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate),\n 1,\n );\n this._firstWeekOffset =\n (DAYS_PER_WEEK +\n this._dateAdapter.getDayOfWeek(firstOfMonth) -\n this._dateAdapter.getFirstDayOfWeek()) %\n DAYS_PER_WEEK;\n\n this._initWeekdays();\n this._createWeekCells();\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell(movePreview?: boolean) {\n this._matCalendarBody._focusActiveCell(movePreview);\n }\n\n /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n _focusActiveCellAfterViewChecked() {\n this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n }\n\n /** Called when the user has activated a new cell and the preview needs to be updated. */\n _previewChanged({event, value: cell}: MatCalendarUserEvent<MatCalendarCell<D> | null>) {\n if (this._rangeStrategy) {\n // We can assume that this will be a range, because preview\n // events aren't fired for single date selections.\n const value = cell ? cell.rawValue! : null;\n const previewRange = this._rangeStrategy.createPreview(\n value,\n this.selected as DateRange<D>,\n event,\n );\n this._previewStart = this._getCellCompareValue(previewRange.start);\n this._previewEnd = this._getCellCompareValue(previewRange.end);\n\n if (this.activeDrag && value) {\n const dragRange = this._rangeStrategy.createDrag?.(\n this.activeDrag.value,\n this.selected as DateRange<D>,\n value,\n event,\n );\n\n if (dragRange) {\n this._previewStart = this._getCellCompareValue(dragRange.start);\n this._previewEnd = this._getCellCompareValue(dragRange.end);\n }\n }\n\n // Note that here we need to use `detectChanges`, rather than `markForCheck`, because\n // the way `_focusActiveCell` is set up at the moment makes it fire at the wrong time\n // when navigating one month back using the keyboard which will cause this handler\n // to throw a \"changed after checked\" error when updating the preview state.\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /**\n * Called when the user has ended a drag. If the drag/drop was successful,\n * computes and emits the new range selection.\n */\n protected _dragEnded(event: MatCalendarUserEvent<D | null>) {\n if (!this.activeDrag) return;\n\n if (event.value) {\n // Propagate drag effect\n const dragDropResult = this._rangeStrategy?.createDrag?.(\n this.activeDrag.value,\n this.selected as DateRange<D>,\n event.value,\n event.event,\n );\n\n this.dragEnded.emit({value: dragDropResult ?? null, event: event.event});\n } else {\n this.dragEnded.emit({value: null, event: event.event});\n }\n }\n\n /**\n * Takes a day of the month and returns a new date in the same month and year as the currently\n * active date. The returned date will have the same day of the month as the argument date.\n */\n private _getDateFromDayOfMonth(dayOfMonth: number): D {\n return this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate),\n dayOfMonth,\n );\n }\n\n /** Initializes the weekdays. */\n private _initWeekdays() {\n const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();\n const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');\n const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');\n\n // Rotate the labels for days of the week based on the configured first day of the week.\n let weekdays = longWeekdays.map((long, i) => {\n return {long, narrow: narrowWeekdays[i]};\n });\n this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\n }\n\n /** Creates MatCalendarCells for the dates in this month. */\n private _createWeekCells() {\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);\n const dateNames = this._dateAdapter.getDateNames();\n this._weeks = [[]];\n for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {\n if (cell == DAYS_PER_WEEK) {\n this._weeks.push([]);\n cell = 0;\n }\n const date = this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n this._dateAdapter.getMonth(this.activeDate),\n i + 1,\n );\n const enabled = this._shouldEnableDate(date);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date, 'month') : undefined;\n\n this._weeks[this._weeks.length - 1].push(\n new MatCalendarCell<D>(\n i + 1,\n dateNames[i],\n ariaLabel,\n enabled,\n cellClasses,\n this._getCellCompareValue(date)!,\n date,\n ),\n );\n }\n }\n\n /** Date filter for the month */\n private _shouldEnableDate(date: D): boolean {\n return (\n !!date &&\n (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&\n (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0) &&\n (!this.dateFilter || this.dateFilter(date))\n );\n }\n\n /**\n * Gets the date in this month that the given Date falls on.\n * Returns null if the given Date is in another month.\n */\n private _getDateInCurrentMonth(date: D | null): number | null {\n return date && this._hasSameMonthAndYear(date, this.activeDate)\n ? this._dateAdapter.getDate(date)\n : null;\n }\n\n /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */\n private _hasSameMonthAndYear(d1: D | null, d2: D | null): boolean {\n return !!(\n d1 &&\n d2 &&\n this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&\n this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2)\n );\n }\n\n /** Gets the value that will be used to one cell to another. */\n private _getCellCompareValue(date: D | null): number | null {\n if (date) {\n // We use the time since the Unix epoch to compare dates in this view, rather than the\n // cell values, because we need to support ranges that span across multiple months/years.\n const year = this._dateAdapter.getYear(date);\n const month = this._dateAdapter.getMonth(date);\n const day = this._dateAdapter.getDate(date);\n return new Date(year, month, day).getTime();\n }\n\n return null;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n\n /** Sets the current range based on a model value. */\n private _setRanges(selectedValue: DateRange<D> | D | null) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n } else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }\n\n /** Gets whether a date can be selected in the month view. */\n private _canSelect(date: D) {\n return !this.dateFilter || this.dateFilter(date);\n }\n\n /** Clears out preview state. */\n private _clearPreview() {\n this._previewStart = this._previewEnd = null;\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\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n OnDestroy,\n} from '@angular/core';\nimport {DateAdapter} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n MatCalendarBody,\n MatCalendarCell,\n MatCalendarUserEvent,\n MatCalendarCellClassFunction,\n} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {Subscription} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\nimport {DateRange} from './date-selection-model';\n\nexport const yearsPerPage = 24;\n\nexport const yearsPerRow = 4;\n\n/**\n * An internal component used to display a year selector in the datepicker.\n * @docs-private\n */\n@Component({\n selector: 'mat-multi-year-view',\n templateUrl: 'multi-year-view.html',\n exportAs: 'matMultiYearView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatCalendarBody],\n})\nexport class MatMultiYearView<D> implements AfterContentInit, OnDestroy {\n private _rerenderSubscription = Subscription.EMPTY;\n\n /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n private _selectionKeyPressed: boolean;\n\n /** The date to display in this multi-year view (everything other than the year is ignored). */\n @Input()\n get activeDate(): D {\n return this._activeDate;\n }\n set activeDate(value: D) {\n let oldActiveDate = this._activeDate;\n const validDate =\n this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n\n if (\n !isSameMultiYearView(\n this._dateAdapter,\n oldActiveDate,\n this._activeDate,\n this.minDate,\n this.maxDate,\n )\n ) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): DateRange<D> | D | null {\n return this._selected;\n }\n set selected(value: DateRange<D> | D | null) {\n if (value instanceof DateRange) {\n this._selected = value;\n } else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n\n this._setSelectedYear(value);\n }\n private _selected: DateRange<D> | D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null {\n return this._minDate;\n }\n set minDate(value: D | null) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null {\n return this._maxDate;\n }\n set maxDate(value: D | null) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** A function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to date cells. */\n @Input() dateClass: MatCalendarCellClassFunction<D>;\n\n /** Emits when a new year is selected. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits the selected year. This doesn't imply a change on the selected date */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody) _matCalendarBody: MatCalendarBody;\n\n /** Grid of calendar cells representing the currently displayed years. */\n _years: MatCalendarCell[][];\n\n /** The year that today falls on. */\n _todayYear: number;\n\n /** The year of the selected date. Null if the selected date is null. */\n _selectedYear: number | null;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality,\n ) {\n if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._rerenderSubscription = this._dateAdapter.localeChanges\n .pipe(startWith(null))\n .subscribe(() => this._init());\n }\n\n ngOnDestroy() {\n this._rerenderSubscription.unsubscribe();\n }\n\n /** Initializes this multi-year view. */\n _init() {\n this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());\n\n // We want a range years such that we maximize the number of\n // enabled dates visible at once. This prevents issues where the minimum year\n // is the last item of a page OR the maximum year is the first item of a page.\n\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view.\n const activeYear = this._dateAdapter.getYear(this._activeDate);\n const minYearOfPage =\n activeYear - getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n\n this._years = [];\n for (let i = 0, row: number[] = []; i < yearsPerPage; i++) {\n row.push(minYearOfPage + i);\n if (row.length == yearsPerRow) {\n this._years.push(row.map(year => this._createCellForYear(year)));\n row = [];\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n\n /** Handles when a new year is selected. */\n _yearSelected(event: MatCalendarUserEvent<number>) {\n const year = event.value;\n const selectedYear = this._dateAdapter.createDate(year, 0, 1);\n const selectedDate = this._getDateFromYear(year);\n\n this.yearSelected.emit(selectedYear);\n this.selectedChange.emit(selectedDate);\n }\n\n /**\n * Takes the index of a calendar body cell wrapped in an event as argument. For the date that\n * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n * that date.\n *\n * This function is used to match each component's model of the active date with the calendar\n * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n * updated value asynchronously via the `activeCell` Input.\n */\n _updateActiveDate(event: MatCalendarUserEvent<number>) {\n const year = event.value;\n const oldActiveDate = this._activeDate;\n\n this.activeDate = this._getDateFromYear(year);\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n }\n\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarYears(\n this._activeDate,\n -getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate),\n );\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarYears(\n this._activeDate,\n yearsPerPage -\n getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate) -\n 1,\n );\n break;\n case PAGE_UP:\n this.activeDate = this._dateAdapter.addCalendarYears(\n this._activeDate,\n event.altKey ? -yearsPerPage * 10 : -yearsPerPage,\n );\n break;\n case PAGE_DOWN:\n this.activeDate = this._dateAdapter.addCalendarYears(\n this._activeDate,\n event.altKey ? yearsPerPage * 10 : yearsPerPage,\n );\n break;\n case ENTER:\n case SPACE:\n // Note that we only prevent the default action here while the selection happens in\n // `keyup` below. We can't do the selection here, because it can cause the calendar to\n // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n // because it's too late (see #23305).\n this._selectionKeyPressed = true;\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n\n this._focusActiveCellAfterViewChecked();\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Handles keyup events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeyup(event: KeyboardEvent): void {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this._selectionKeyPressed) {\n this._yearSelected({value: this._dateAdapter.getYear(this._activeDate), event});\n }\n\n this._selectionKeyPressed = false;\n }\n }\n\n _getActiveCell(): number {\n return getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n _focusActiveCellAfterViewChecked() {\n this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n }\n\n /**\n * Takes a year and returns a new date on the same day and month as the currently active date\n * The returned date will have the same year as the argument date.\n */\n private _getDateFromYear(year: number) {\n const activeMonth = this._dateAdapter.getMonth(this.activeDate);\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(\n this._dateAdapter.createDate(year, activeMonth, 1),\n );\n const normalizedDate = this._dateAdapter.createDate(\n year,\n activeMonth,\n Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth),\n );\n return normalizedDate;\n }\n\n /** Creates an MatCalendarCell for the given year. */\n private _createCellForYear(year: number) {\n const date = this._dateAdapter.createDate(year, 0, 1);\n const yearName = this._dateAdapter.getYearName(date);\n const cellClasses = this.dateClass ? this.dateClass(date, 'multi-year') : undefined;\n\n return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year), cellClasses);\n }\n\n /** Whether the given year is enabled. */\n private _shouldEnableYear(year: number) {\n // disable if the year is greater than maxDate lower than minDate\n if (\n year === undefined ||\n year === null ||\n (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||\n (this.minDate && year < this._dateAdapter.getYear(this.minDate))\n ) {\n return false;\n }\n\n // enable if it reaches here and there's no filter defined\n if (!this.dateFilter) {\n return true;\n }\n\n const firstOfYear = this._dateAdapter.createDate(year, 0, 1);\n\n // If any date in the year is enabled count the year as enabled.\n for (\n let date = firstOfYear;\n this._dateAdapter.getYear(date) == year;\n date = this._dateAdapter.addCalendarDays(date, 1)\n ) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n\n return false;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n\n /** Sets the currently-highlighted year based on a model value. */\n private _setSelectedYear(value: DateRange<D> | D | null) {\n this._selectedYear = null;\n\n if (value instanceof DateRange) {\n const displayValue = value.start || value.end;\n\n if (displayValue) {\n this._selectedYear = this._dateAdapter.getYear(displayValue);\n }\n } else if (value) {\n this._selectedYear = this._dateAdapter.getYear(value);\n }\n }\n}\n\nexport function isSameMultiYearView<D>(\n dateAdapter: DateAdapter<D>,\n date1: D,\n date2: D,\n minDate: D | null,\n maxDate: D | null,\n): boolean {\n const year1 = dateAdapter.getYear(date1);\n const year2 = dateAdapter.getYear(date2);\n const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n return (\n Math.floor((year1 - startingYear) / yearsPerPage) ===\n Math.floor((year2 - startingYear) / yearsPerPage)\n );\n}\n\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nexport function getActiveOffset<D>(\n dateAdapter: DateAdapter<D>,\n activeDate: D,\n minDate: D | null,\n maxDate: D | null,\n): number {\n const activeYear = dateAdapter.getYear(activeDate);\n return euclideanModulo(activeYear - getStartingYear(dateAdapter, minDate, maxDate), yearsPerPage);\n}\n\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear<D>(\n dateAdapter: DateAdapter<D>,\n minDate: D | null,\n maxDate: D | null,\n): number {\n let startingYear = 0;\n if (maxDate) {\n const maxYear = dateAdapter.getYear(maxDate);\n startingYear = maxYear - yearsPerPage + 1;\n } else if (minDate) {\n startingYear = dateAdapter.getYear(minDate);\n }\n return startingYear;\n}\n\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo(a: number, b: number): number {\n return ((a % b) + b) % b;\n}\n","<table class=\"mat-calendar-table\" role=\"grid\">\n <thead aria-hidden=\"true\" class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]=\"_years\"\n [todayValue]=\"_todayYear\"\n [startValue]=\"_selectedYear!\"\n [endValue]=\"_selectedYear!\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_getActiveCell()\"\n (selectedValueChange)=\"_yearSelected($event)\"\n (activeDateChange)=\"_updateActiveDate($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\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\nimport {\n DOWN_ARROW,\n END,\n ENTER,\n HOME,\n LEFT_ARROW,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n SPACE,\n} from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n OnDestroy,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n MatCalendarBody,\n MatCalendarCell,\n MatCalendarUserEvent,\n MatCalendarCellClassFunction,\n} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {Subscription} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\nimport {DateRange} from './date-selection-model';\n\n/**\n * An internal component used to display a single year in the datepicker.\n * @docs-private\n */\n@Component({\n selector: 'mat-year-view',\n templateUrl: 'year-view.html',\n exportAs: 'matYearView',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatCalendarBody],\n})\nexport class MatYearView<D> implements AfterContentInit, OnDestroy {\n private _rerenderSubscription = Subscription.EMPTY;\n\n /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n private _selectionKeyPressed: boolean;\n\n /** The date to display in this year view (everything other than the year is ignored). */\n @Input()\n get activeDate(): D {\n return this._activeDate;\n }\n set activeDate(value: D) {\n let oldActiveDate = this._activeDate;\n const validDate =\n this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n this._dateAdapter.today();\n this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {\n this._init();\n }\n }\n private _activeDate: D;\n\n /** The currently selected date. */\n @Input()\n get selected(): DateRange<D> | D | null {\n return this._selected;\n }\n set selected(value: DateRange<D> | D | null) {\n if (value instanceof DateRange) {\n this._selected = value;\n } else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n\n this._setSelectedMonth(value);\n }\n private _selected: DateRange<D> | D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null {\n return this._minDate;\n }\n set minDate(value: D | null) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null {\n return this._maxDate;\n }\n set maxDate(value: D | null) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** A function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to date cells. */\n @Input() dateClass: MatCalendarCellClassFunction<D>;\n\n /** Emits when a new month is selected. */\n @Output() readonly selectedChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits the selected month. This doesn't imply a change on the selected date */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /** Emits when any date is activated. */\n @Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>();\n\n /** The body of calendar table */\n @ViewChild(MatCalendarBody) _matCalendarBody: MatCalendarBody;\n\n /** Grid of calendar cells representing the months of the year. */\n _months: MatCalendarCell[][];\n\n /** The label for this year (e.g. \"2017\"). */\n _yearLabel: string;\n\n /** The month in this year that today falls on. Null if today is in a different year. */\n _todayMonth: number | null;\n\n /**\n * The month in this year that the selected Date falls on.\n * Null if the selected Date is in a different year.\n */\n _selectedMonth: number | null;\n\n constructor(\n readonly _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() private _dir?: Directionality,\n ) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n\n this._activeDate = this._dateAdapter.today();\n }\n\n ngAfterContentInit() {\n this._rerenderSubscription = this._dateAdapter.localeChanges\n .pipe(startWith(null))\n .subscribe(() => this._init());\n }\n\n ngOnDestroy() {\n this._rerenderSubscription.unsubscribe();\n }\n\n /** Handles when a new month is selected. */\n _monthSelected(event: MatCalendarUserEvent<number>) {\n const month = event.value;\n\n const selectedMonth = this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n month,\n 1,\n );\n this.monthSelected.emit(selectedMonth);\n\n const selectedDate = this._getDateFromMonth(month);\n this.selectedChange.emit(selectedDate);\n }\n\n /**\n * Takes the index of a calendar body cell wrapped in an event as argument. For the date that\n * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n * that date.\n *\n * This function is used to match each component's model of the active date with the calendar\n * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n * updated value asynchronously via the `activeCell` Input.\n */\n _updateActiveDate(event: MatCalendarUserEvent<number>) {\n const month = event.value;\n const oldActiveDate = this._activeDate;\n\n this.activeDate = this._getDateFromMonth(month);\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n }\n }\n\n /** Handles keydown events on the calendar body when calendar is in year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void {\n // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n // disabled ones from being selected. This may not be ideal, we should look into whether\n // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n\n const oldActiveDate = this._activeDate;\n const isRtl = this._isRtl();\n\n switch (event.keyCode) {\n case LEFT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);\n break;\n case RIGHT_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);\n break;\n case UP_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);\n break;\n case DOWN_ARROW:\n this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);\n break;\n case HOME:\n this.activeDate = this._dateAdapter.addCalendarMonths(\n this._activeDate,\n -this._dateAdapter.getMonth(this._activeDate),\n );\n break;\n case END:\n this.activeDate = this._dateAdapter.addCalendarMonths(\n this._activeDate,\n 11 - this._dateAdapter.getMonth(this._activeDate),\n );\n break;\n case PAGE_UP:\n this.activeDate = this._dateAdapter.addCalendarYears(\n this._activeDate,\n event.altKey ? -10 : -1,\n );\n break;\n case PAGE_DOWN:\n this.activeDate = this._dateAdapter.addCalendarYears(\n this._activeDate,\n event.altKey ? 10 : 1,\n );\n break;\n case ENTER:\n case SPACE:\n // Note that we only prevent the default action here while the selection happens in\n // `keyup` below. We can't do the selection here, because it can cause the calendar to\n // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n // because it's too late (see #23305).\n this._selectionKeyPressed = true;\n break;\n default:\n // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n return;\n }\n\n if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n this.activeDateChange.emit(this.activeDate);\n this._focusActiveCellAfterViewChecked();\n }\n\n // Prevent unexpected default actions such as form submission.\n event.preventDefault();\n }\n\n /** Handles keyup events on the calendar body when calendar is in year view. */\n _handleCalendarBodyKeyup(event: KeyboardEvent): void {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this._selectionKeyPressed) {\n this._monthSelected({value: this._dateAdapter.getMonth(this._activeDate), event});\n }\n\n this._selectionKeyPressed = false;\n }\n }\n\n /** Initializes this year view. */\n _init() {\n this._setSelectedMonth(this.selected);\n this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());\n this._yearLabel = this._dateAdapter.getYearName(this.activeDate);\n\n let monthNames = this._dateAdapter.getMonthNames('short');\n // First row of months only contains 5 elements so we can fit the year label on the same row.\n this._months = [\n [0, 1, 2, 3],\n [4, 5, 6, 7],\n [8, 9, 10, 11],\n ].map(row => row.map(month => this._createCellForMonth(month, monthNames[month])));\n this._changeDetectorRef.markForCheck();\n }\n\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell() {\n this._matCalendarBody._focusActiveCell();\n }\n\n /** Schedules the matCalendarBody to focus the active cell after change detection has run */\n _focusActiveCellAfterViewChecked() {\n this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n }\n\n /**\n * Gets the month in this year that the given Date falls on.\n * Returns null if the given Date is in another year.\n */\n private _getMonthInCurrentYear(date: D | null) {\n return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate)\n ? this._dateAdapter.getMonth(date)\n : null;\n }\n\n /**\n * Takes a month and returns a new date in the same day and year as the currently active date.\n * The returned date will have the same month as the argument date.\n */\n private _getDateFromMonth(month: number) {\n const normalizedDate = this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n month,\n 1,\n );\n\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);\n\n return this._dateAdapter.createDate(\n this._dateAdapter.getYear(this.activeDate),\n month,\n Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth),\n );\n }\n\n /** Creates an MatCalendarCell for the given month. */\n private _createCellForMonth(month: number, monthName: string) {\n const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.monthYearA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date, 'year') : undefined;\n\n return new MatCalendarCell(\n month,\n monthName.toLocaleUpperCase(),\n ariaLabel,\n this._shouldEnableMonth(month),\n cellClasses,\n );\n }\n\n /** Whether the given month is enabled. */\n private _shouldEnableMonth(month: number) {\n const activeYear = this._dateAdapter.getYear(this.activeDate);\n\n if (\n month === undefined ||\n month === null ||\n this._isYearAndMonthAfterMaxDate(activeYear, month) ||\n this._isYearAndMonthBeforeMinDate(activeYear, month)\n ) {\n return false;\n }\n\n if (!this.dateFilter) {\n return true;\n }\n\n const firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);\n\n // If any date in the month is enabled count the month as enabled.\n for (\n let date = firstOfMonth;\n this._dateAdapter.getMonth(date) == month;\n date = this._dateAdapter.addCalendarDays(date, 1)\n ) {\n if (this.dateFilter(date)) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Tests whether the combination month/year is after this.maxDate, considering\n * just the month and year of this.maxDate\n */\n private _isYearAndMonthAfterMaxDate(year: number, month: number) {\n if (this.maxDate) {\n const maxYear = this._dateAdapter.getYear(this.maxDate);\n const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n\n return year > maxYear || (year === maxYear && month > maxMonth);\n }\n\n return false;\n }\n\n /**\n * Tests whether the combination month/year is before this.minDate, considering\n * just the month and year of this.minDate\n */\n private _isYearAndMonthBeforeMinDate(year: number, month: number) {\n if (this.minDate) {\n const minYear = this._dateAdapter.getYear(this.minDate);\n const minMonth = this._dateAdapter.getMonth(this.minDate);\n\n return year < minYear || (year === minYear && month < minMonth);\n }\n\n return false;\n }\n\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl() {\n return this._dir && this._dir.value === 'rtl';\n }\n\n /** Sets the currently-selected month based on a model value. */\n private _setSelectedMonth(value: DateRange<D> | D | null) {\n if (value instanceof DateRange) {\n this._selectedMonth =\n this._getMonthInCurrentYear(value.start) || this._getMonthInCurrentYear(value.end);\n } else {\n this._selectedMonth = this._getMonthInCurrentYear(value);\n }\n }\n}\n","<table class=\"mat-calendar-table\" role=\"grid\">\n <thead aria-hidden=\"true\" class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth!\"\n [startValue]=\"_selectedMonth!\"\n [endValue]=\"_selectedMonth!\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"_monthSelected($event)\"\n (activeDateChange)=\"_updateActiveDate($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\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\nimport {CdkPortalOutlet, ComponentPortal, ComponentType, Portal} from '@angular/cdk/portal';\nimport {\n AfterContentInit,\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChange,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\nimport {Subject, Subscription} from 'rxjs';\nimport {MatCalendarUserEvent, MatCalendarCellClassFunction} from './calendar-body';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatMonthView} from './month-view';\nimport {\n getActiveOffset,\n isSameMultiYearView,\n MatMultiYearView,\n yearsPerPage,\n} from './multi-year-view';\nimport {MatYearView} from './year-view';\nimport {MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, DateRange} from './date-selection-model';\nimport {MatIconButton, MatButton} from '@angular/material/button';\nimport {CdkMonitorFocus} from '@angular/cdk/a11y';\n\nlet calendarHeaderId = 1;\n\n/**\n * Possible views for the calendar.\n * @docs-private\n */\nexport type MatCalendarView = 'month' | 'year' | 'multi-year';\n\n/** Default header for MatCalendar */\n@Component({\n selector: 'mat-calendar-header',\n templateUrl: 'calendar-header.html',\n exportAs: 'matCalendarHeader',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatButton, MatIconButton],\n})\nexport class MatCalendarHeader<D> {\n constructor(\n private _intl: MatDatepickerIntl,\n @Inject(forwardRef(() => MatCalendar)) public calendar: MatCalendar<D>,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n changeDetectorRef: ChangeDetectorRef,\n ) {\n this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());\n }\n\n /** The display text for the current calendar view. */\n get periodButtonText(): string {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter\n .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n return this._intl.formatYearRange(...this._formatMinAndMaxYearLabels());\n }\n\n /** The aria description for the current calendar view. */\n get periodButtonDescription(): string {\n if (this.calendar.currentView == 'month') {\n return this._dateAdapter\n .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n .toLocaleUpperCase();\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYearName(this.calendar.activeDate);\n }\n\n // Format a label for the window of years displayed in the multi-year calendar view. Use\n // `formatYearRangeLabel` because it is TTS friendly.\n return this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels());\n }\n\n /** The `aria-label` for changing the calendar view. */\n get periodButtonLabel(): string {\n return this.calendar.currentView == 'month'\n ? this._intl.switchToMultiYearViewLabel\n : this._intl.switchToMonthViewLabel;\n }\n\n /** The label for the previous button. */\n get prevButtonLabel(): string {\n return {\n 'month': this._intl.prevMonthLabel,\n 'year': this._intl.prevYearLabel,\n 'multi-year': this._intl.prevMultiYearLabel,\n }[this.calendar.currentView];\n }\n\n /** The label for the next button. */\n get nextButtonLabel(): string {\n return {\n 'month': this._intl.nextMonthLabel,\n 'year': this._intl.nextYearLabel,\n 'multi-year': this._intl.nextMultiYearLabel,\n }[this.calendar.currentView];\n }\n\n /** Handles user clicks on the period label. */\n currentPeriodClicked(): void {\n this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n }\n\n /** Handles user clicks on the previous button. */\n previousClicked(): void {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1)\n : this._dateAdapter.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? -1 : -yearsPerPage,\n );\n }\n\n /** Handles user clicks on the next button. */\n nextClicked(): void {\n this.calendar.activeDate =\n this.calendar.currentView == 'month'\n ? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1)\n : this._dateAdapter.addCalendarYears(\n this.calendar.activeDate,\n this.calendar.currentView == 'year' ? 1 : yearsPerPage,\n );\n }\n\n /** Whether the previous period button is enabled. */\n previousEnabled(): boolean {\n if (!this.calendar.minDate) {\n return true;\n }\n return (\n !this.calendar.minDate || !this._isSameView(this.calendar.activeDate, this.calendar.minDate)\n );\n }\n\n /** Whether the next period button is enabled. */\n nextEnabled(): boolean {\n return (\n !this.calendar.maxDate || !this._isSameView(this.calendar.activeDate, this.calendar.maxDate)\n );\n }\n\n /** Whether the two dates represent the same view in the current view mode (month or year). */\n private _isSameView(date1: D, date2: D): boolean {\n if (this.calendar.currentView == 'month') {\n return (\n this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2)\n );\n }\n if (this.calendar.currentView == 'year') {\n return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n }\n // Otherwise we are in 'multi-year' view.\n return isSameMultiYearView(\n this._dateAdapter,\n date1,\n date2,\n this.calendar.minDate,\n this.calendar.maxDate,\n );\n }\n\n /**\n * Format two individual labels for the minimum year and maximum year available in the multi-year\n * calendar view. Returns an array of two strings where the first string is the formatted label\n * for the minimum year, and the second string is the formatted label for the maximum year.\n */\n private _formatMinAndMaxYearLabels(): [minYearLabel: string, maxYearLabel: string] {\n // The offset from the active year to the \"slot\" for the starting year is the\n // *actual* first rendered year in the multi-year view, and the last year is\n // just yearsPerPage - 1 away.\n const activeYear = this._dateAdapter.getYear(this.calendar.activeDate);\n const minYearOfPage =\n activeYear -\n getActiveOffset(\n this._dateAdapter,\n this.calendar.activeDate,\n this.calendar.minDate,\n this.calendar.maxDate,\n );\n const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\n const minYearLabel = this._dateAdapter.getYearName(\n this._dateAdapter.createDate(minYearOfPage, 0, 1),\n );\n const maxYearLabel = this._dateAdapter.getYearName(\n this._dateAdapter.createDate(maxYearOfPage, 0, 1),\n );\n\n return [minYearLabel, maxYearLabel];\n }\n\n private _id = `mat-calendar-header-${calendarHeaderId++}`;\n\n _periodButtonLabelId = `${this._id}-period-label`;\n}\n\n/** A calendar that is used as part of the datepicker. */\n@Component({\n selector: 'mat-calendar',\n templateUrl: 'calendar.html',\n styleUrl: 'calendar.css',\n host: {\n 'class': 'mat-calendar',\n },\n exportAs: 'matCalendar',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER],\n standalone: true,\n imports: [CdkPortalOutlet, CdkMonitorFocus, MatMonthView, MatYearView, MatMultiYearView],\n})\nexport class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {\n /** An input indicating the type of the header component, if set. */\n @Input() headerComponent: ComponentType<any>;\n\n /** A portal containing the header component type for this calendar. */\n _calendarHeaderPortal: Portal<any>;\n\n private _intlChanges: Subscription;\n\n /**\n * Used for scheduling that focus should be moved to the active cell on the next tick.\n * We need to schedule it, rather than do it immediately, because we have to wait\n * for Angular to re-evaluate the view children.\n */\n private _moveFocusOnNextTick = false;\n\n /** A date representing the period (month or year) to start the calendar in. */\n @Input()\n get startAt(): D | null {\n return this._startAt;\n }\n set startAt(value: D | null) {\n this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _startAt: D | null;\n\n /** Whether the calendar should be started in month or year view. */\n @Input() startView: MatCalendarView = 'month';\n\n /** The currently selected date. */\n @Input()\n get selected(): DateRange<D> | D | null {\n return this._selected;\n }\n set selected(value: DateRange<D> | D | null) {\n if (value instanceof DateRange) {\n this._selected = value;\n } else {\n this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n }\n private _selected: DateRange<D> | D | null;\n\n /** The minimum selectable date. */\n @Input()\n get minDate(): D | null {\n return this._minDate;\n }\n set minDate(value: D | null) {\n this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _minDate: D | null;\n\n /** The maximum selectable date. */\n @Input()\n get maxDate(): D | null {\n return this._maxDate;\n }\n set maxDate(value: D | null) {\n this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _maxDate: D | null;\n\n /** Function used to filter which dates are selectable. */\n @Input() dateFilter: (date: D) => boolean;\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: MatCalendarCellClassFunction<D>;\n\n /** Start of the comparison range. */\n @Input() comparisonStart: D | null;\n\n /** End of the comparison range. */\n @Input() comparisonEnd: D | null;\n\n /** ARIA Accessible name of the `<input matStartDate/>` */\n @Input() startDateAccessibleName: string | null;\n\n /** ARIA Accessible name of the `<input matEndDate/>` */\n @Input() endDateAccessibleName: string | null;\n\n /** Emits when the currently selected date changes. */\n @Output() readonly selectedChange: EventEmitter<D | null> = new EventEmitter<D | null>();\n\n /**\n * Emits the year chosen in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits the month chosen in year view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits when the current view changes.\n */\n @Output() readonly viewChanged: EventEmitter<MatCalendarView> = new EventEmitter<MatCalendarView>(\n true,\n );\n\n /** Emits when any date is selected. */\n @Output() readonly _userSelection: EventEmitter<MatCalendarUserEvent<D | null>> =\n new EventEmitter<MatCalendarUserEvent<D | null>>();\n\n /** Emits a new date range value when the user completes a drag drop operation. */\n @Output() readonly _userDragDrop = new EventEmitter<MatCalendarUserEvent<DateRange<D>>>();\n\n /** Reference to the current month view component. */\n @ViewChild(MatMonthView) monthView: MatMonthView<D>;\n\n /** Reference to the current year view component. */\n @ViewChild(MatYearView) yearView: MatYearView<D>;\n\n /** Reference to the current multi-year view component. */\n @ViewChild(MatMultiYearView) multiYearView: MatMultiYearView<D>;\n\n /**\n * The current active date. This determines which time period is shown and which date is\n * highlighted when using keyboard navigation.\n */\n get activeDate(): D {\n return this._clampedActiveDate;\n }\n set activeDate(value: D) {\n this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);\n this.stateChanges.next();\n this._changeDetectorRef.markForCheck();\n }\n private _clampedActiveDate: D;\n\n /** Whether the calendar is in month view. */\n get currentView(): MatCalendarView {\n return this._currentView;\n }\n set currentView(value: MatCalendarView) {\n const viewChangedResult = this._currentView !== value ? value : null;\n this._currentView = value;\n this._moveFocusOnNextTick = true;\n this._changeDetectorRef.markForCheck();\n if (viewChangedResult) {\n this.viewChanged.emit(viewChangedResult);\n }\n }\n private _currentView: MatCalendarView;\n\n /** Origin of active drag, or null when dragging is not active. */\n protected _activeDrag: MatCalendarUserEvent<D> | null = null;\n\n /**\n * Emits whenever there is a state change that the header may need to respond to.\n */\n readonly stateChanges = new Subject<void>();\n\n constructor(\n _intl: MatDatepickerIntl,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n private _changeDetectorRef: ChangeDetectorRef,\n ) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n\n this._intlChanges = _intl.changes.subscribe(() => {\n _changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n }\n\n ngAfterContentInit() {\n this._calendarHeaderPortal = new ComponentPortal(this.headerComponent || MatCalendarHeader);\n this.activeDate = this.startAt || this._dateAdapter.today();\n\n // Assign to the private property since we don't want to move focus on init.\n this._currentView = this.startView;\n }\n\n ngAfterViewChecked() {\n if (this._moveFocusOnNextTick) {\n this._moveFocusOnNextTick = false;\n this.focusActiveCell();\n }\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n this.stateChanges.complete();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Ignore date changes that are at a different time on the same day. This fixes issues where\n // the calendar re-renders when there is no meaningful change to [minDate] or [maxDate]\n // (#24435).\n const minDateChange: SimpleChange | undefined =\n changes['minDate'] &&\n !this._dateAdapter.sameDate(changes['minDate'].previousValue, changes['minDate'].currentValue)\n ? changes['minDate']\n : undefined;\n const maxDateChange: SimpleChange | undefined =\n changes['maxDate'] &&\n !this._dateAdapter.sameDate(changes['maxDate'].previousValue, changes['maxDate'].currentValue)\n ? changes['maxDate']\n : undefined;\n\n const change = minDateChange || maxDateChange || changes['dateFilter'];\n\n if (change && !change.firstChange) {\n const view = this._getCurrentViewComponent();\n\n if (view) {\n // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are\n // passed down to the view via data bindings which won't be up-to-date when we call `_init`.\n this._changeDetectorRef.detectChanges();\n view._init();\n }\n }\n\n this.stateChanges.next();\n }\n\n /** Focuses the active date. */\n focusActiveCell() {\n this._getCurrentViewComponent()._focusActiveCell(false);\n }\n\n /** Updates today's date after an update of the active date */\n updateTodaysDate() {\n this._getCurrentViewComponent()._init();\n }\n\n /** Handles date selection in the month view. */\n _dateSelected(event: MatCalendarUserEvent<D | null>): void {\n const date = event.value;\n\n if (\n this.selected instanceof DateRange ||\n (date && !this._dateAdapter.sameDate(date, this.selected))\n ) {\n this.selectedChange.emit(date);\n }\n\n this._userSelection.emit(event);\n }\n\n /** Handles year selection in the multiyear view. */\n _yearSelectedInMultiYearView(normalizedYear: D) {\n this.yearSelected.emit(normalizedYear);\n }\n\n /** Handles month selection in the year view. */\n _monthSelectedInYearView(normalizedMonth: D) {\n this.monthSelected.emit(normalizedMonth);\n }\n\n /** Handles year/month selection in the multi-year/year views. */\n _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void {\n this.activeDate = date;\n this.currentView = view;\n }\n\n /** Called when the user starts dragging to change a date range. */\n _dragStarted(event: MatCalendarUserEvent<D>) {\n this._activeDrag = event;\n }\n\n /**\n * Called when a drag completes. It may end in cancelation or in the selection\n * of a new range.\n */\n _dragEnded(event: MatCalendarUserEvent<DateRange<D> | null>) {\n if (!this._activeDrag) return;\n\n if (event.value) {\n this._userDragDrop.emit(event as MatCalendarUserEvent<DateRange<D>>);\n }\n\n this._activeDrag = null;\n }\n\n /** Returns the component instance that corresponds to the current calendar view. */\n private _getCurrentViewComponent(): MatMonthView<D> | MatYearView<D> | MatMultiYearView<D> {\n // The return type is explicitly written as a union to ensure that the Closure compiler does\n // not optimize calls to _init(). Without the explicit return type, TypeScript narrows it to\n // only the first component type. See https://github.com/angular/components/issues/22996.\n return this.monthView || this.yearView || this.multiYearView;\n }\n}\n","<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533] \n Relocated label next to related button and made visually hidden via cdk-visually-hidden\n to enable label to appear in a11y tree for SR when using Firefox -->\n <label [id]=\"_periodButtonLabelId\" class=\"cdk-visually-hidden\">{{periodButtonDescription}}</label>\n <button mat-button type=\"button\" class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\" [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\" aria-live=\"polite\">\n <span aria-hidden=\"true\">{{periodButtonText}}</span>\n <svg class=\"mat-calendar-arrow\" [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\" focusable=\"false\" aria-hidden=\"true\">\n <polygon points=\"0,0 5,5 10,0\"/>\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content></ng-content>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-previous-button\"\n [disabled]=\"!previousEnabled()\" (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\">\n </button>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-next-button\"\n [disabled]=\"!nextEnabled()\" (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\">\n </button>\n </div>\n</div>\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 */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n keyframes,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/**\n * Animations used by the Material datepicker.\n * @docs-private\n */\nexport const matDatepickerAnimations: {\n readonly transformPanel: AnimationTriggerMetadata;\n readonly fadeInCalendar: AnimationTriggerMetadata;\n} = {\n /** Transforms the height of the datepicker's calendar. */\n transformPanel: trigger('transformPanel', [\n transition(\n 'void => enter-dropdown',\n animate(\n '120ms cubic-bezier(0, 0, 0.2, 1)',\n keyframes([\n style({opacity: 0, transform: 'scale(1, 0.8)'}),\n style({opacity: 1, transform: 'scale(1, 1)'}),\n ]),\n ),\n ),\n transition(\n 'void => enter-dialog',\n animate(\n '150ms cubic-bezier(0, 0, 0.2, 1)',\n keyframes([\n style({opacity: 0, transform: 'scale(0.7)'}),\n style({transform: 'none', opacity: 1}),\n ]),\n ),\n ),\n transition('* => void', animate('100ms linear', style({opacity: 0}))),\n ]),\n\n /** Fades in the content of the calendar. */\n fadeInCalendar: trigger('fadeInCalendar', [\n state('void', style({opacity: 0})),\n state('enter', style({opacity: 1})),\n\n // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we\n // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.\n transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')),\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\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceStringArray} from '@angular/cdk/coercion';\nimport {\n DOWN_ARROW,\n ESCAPE,\n hasModifierKey,\n LEFT_ARROW,\n ModifierKey,\n PAGE_DOWN,\n PAGE_UP,\n RIGHT_ARROW,\n UP_ARROW,\n} from '@angular/cdk/keycodes';\nimport {\n Overlay,\n OverlayConfig,\n OverlayRef,\n ScrollStrategy,\n FlexibleConnectedPositionStrategy,\n} from '@angular/cdk/overlay';\nimport {CdkPortalOutlet, ComponentPortal, ComponentType, TemplatePortal} from '@angular/cdk/portal';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n ChangeDetectorRef,\n Directive,\n OnChanges,\n SimpleChanges,\n OnInit,\n inject,\n booleanAttribute,\n} from '@angular/core';\nimport {DateAdapter, ThemePalette} from '@angular/material/core';\nimport {AnimationEvent} from '@angular/animations';\nimport {merge, Subject, Observable, Subscription} from 'rxjs';\nimport {filter, take} from 'rxjs/operators';\nimport {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform';\nimport {MatCalendar, MatCalendarView} from './calendar';\nimport {matDatepickerAnimations} from './datepicker-animations';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {MatCalendarUserEvent, MatCalendarCellClassFunction} from './calendar-body';\nimport {DateFilterFn} from './datepicker-input-base';\nimport {\n ExtractDateTypeFromSelection,\n MatDateSelectionModel,\n DateRange,\n} from './date-selection-model';\nimport {\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n MatDateRangeSelectionStrategy,\n} from './date-range-selection-strategy';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {DOCUMENT} from '@angular/common';\nimport {MatButton} from '@angular/material/button';\nimport {CdkTrapFocus} from '@angular/cdk/a11y';\n\n/** Used to generate a unique ID for each datepicker instance. */\nlet datepickerUid = 0;\n\n/** Injection token that determines the scroll handling while the calendar is open. */\nexport const MAT_DATEPICKER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'mat-datepicker-scroll-strategy',\n {\n providedIn: 'root',\n factory: () => {\n const overlay = inject(Overlay);\n return () => overlay.scrollStrategies.reposition();\n },\n },\n);\n\n/** @docs-private */\nexport function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** Possible positions for the datepicker dropdown along the X axis. */\nexport type DatepickerDropdownPositionX = 'start' | 'end';\n\n/** Possible positions for the datepicker dropdown along the Y axis. */\nexport type DatepickerDropdownPositionY = 'above' | 'below';\n\n/** @docs-private */\nexport const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_DATEPICKER_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,\n};\n\n/**\n * Component used as the content for the datepicker overlay. We use this instead of using\n * MatCalendar directly as the content so we can control the initial focus. This also gives us a\n * place to put additional features of the overlay that are not part of the calendar itself in the\n * future. (e.g. confirmation buttons).\n * @docs-private\n */\n@Component({\n selector: 'mat-datepicker-content',\n templateUrl: 'datepicker-content.html',\n styleUrl: 'datepicker-content.css',\n host: {\n 'class': 'mat-datepicker-content',\n '[class]': 'color ? \"mat-\" + color : \"\"',\n '[@transformPanel]': '_animationState',\n '(@transformPanel.start)': '_handleAnimationEvent($event)',\n '(@transformPanel.done)': '_handleAnimationEvent($event)',\n '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',\n },\n animations: [matDatepickerAnimations.transformPanel, matDatepickerAnimations.fadeInCalendar],\n exportAs: 'matDatepickerContent',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [CdkTrapFocus, MatCalendar, CdkPortalOutlet, MatButton],\n})\nexport class MatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>>\n implements OnInit, AfterViewInit, OnDestroy\n{\n private _subscriptions = new Subscription();\n private _model: MatDateSelectionModel<S, D>;\n /** Reference to the internal calendar component. */\n @ViewChild(MatCalendar) _calendar: MatCalendar<D>;\n\n /** Palette color of the internal calendar. */\n @Input() color: ThemePalette;\n\n /** Reference to the datepicker that created the overlay. */\n datepicker: MatDatepickerBase<any, S, D>;\n\n /** Start of the comparison range. */\n comparisonStart: D | null;\n\n /** End of the comparison range. */\n comparisonEnd: D | null;\n\n /** ARIA Accessible name of the `<input matStartDate/>` */\n startDateAccessibleName: string | null;\n\n /** ARIA Accessible name of the `<input matEndDate/>` */\n endDateAccessibleName: string | null;\n\n /** Whether the datepicker is above or below the input. */\n _isAbove: boolean;\n\n /** Current state of the animation. */\n _animationState: 'enter-dropdown' | 'enter-dialog' | 'void';\n\n /** Emits when an animation has finished. */\n readonly _animationDone = new Subject<void>();\n\n /** Whether there is an in-progress animation. */\n _isAnimating = false;\n\n /** Text for the close button. */\n _closeButtonText: string;\n\n /** Whether the close button currently has focus. */\n _closeButtonFocused: boolean;\n\n /** Portal with projected action buttons. */\n _actionsPortal: TemplatePortal | null = null;\n\n /** Id of the label for the `role=\"dialog\"` element. */\n _dialogLabelId: string | null;\n\n constructor(\n protected _elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef,\n private _globalModel: MatDateSelectionModel<S, D>,\n private _dateAdapter: DateAdapter<D>,\n @Optional()\n @Inject(MAT_DATE_RANGE_SELECTION_STRATEGY)\n private _rangeSelectionStrategy: MatDateRangeSelectionStrategy<D>,\n intl: MatDatepickerIntl,\n ) {\n this._closeButtonText = intl.closeCalendarLabel;\n }\n\n ngOnInit() {\n this._animationState = this.datepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';\n }\n\n ngAfterViewInit() {\n this._subscriptions.add(\n this.datepicker.stateChanges.subscribe(() => {\n this._changeDetectorRef.markForCheck();\n }),\n );\n this._calendar.focusActiveCell();\n }\n\n ngOnDestroy() {\n this._subscriptions.unsubscribe();\n this._animationDone.complete();\n }\n\n _handleUserSelection(event: MatCalendarUserEvent<D | null>) {\n const selection = this._model.selection;\n const value = event.value;\n const isRange = selection instanceof DateRange;\n\n // If we're selecting a range and we have a selection strategy, always pass the value through\n // there. Otherwise don't assign null values to the model, unless we're selecting a range.\n // A null value when picking a range means that the user cancelled the selection (e.g. by\n // pressing escape), whereas when selecting a single value it means that the value didn't\n // change. This isn't very intuitive, but it's here for backwards-compatibility.\n if (isRange && this._rangeSelectionStrategy) {\n const newSelection = this._rangeSelectionStrategy.selectionFinished(\n value,\n selection as unknown as DateRange<D>,\n event.event,\n );\n this._model.updateSelection(newSelection as unknown as S, this);\n } else if (\n value &&\n (isRange || !this._dateAdapter.sameDate(value, selection as unknown as D))\n ) {\n this._model.add(value);\n }\n\n // Delegate closing the overlay to the actions.\n if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {\n this.datepicker.close();\n }\n }\n\n _handleUserDragDrop(event: MatCalendarUserEvent<DateRange<D>>) {\n this._model.updateSelection(event.value as unknown as S, this);\n }\n\n _startExitAnimation() {\n this._animationState = 'void';\n this._changeDetectorRef.markForCheck();\n }\n\n _handleAnimationEvent(event: AnimationEvent) {\n this._isAnimating = event.phaseName === 'start';\n\n if (!this._isAnimating) {\n this._animationDone.next();\n }\n }\n\n _getSelected() {\n return this._model.selection as unknown as D | DateRange<D> | null;\n }\n\n /** Applies the current pending selection to the global model. */\n _applyPendingSelection() {\n if (this._model !== this._globalModel) {\n this._globalModel.updateSelection(this._model.selection, this);\n }\n }\n\n /**\n * Assigns a new portal containing the datepicker actions.\n * @param portal Portal with the actions to be assigned.\n * @param forceRerender Whether a re-render of the portal should be triggered. This isn't\n * necessary if the portal is assigned during initialization, but it may be required if it's\n * added at a later point.\n */\n _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean) {\n // If we have actions, clone the model so that we have the ability to cancel the selection,\n // otherwise update the global model directly. Note that we want to assign this as soon as\n // possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.\n this._model = portal ? this._globalModel.clone() : this._globalModel;\n this._actionsPortal = portal;\n\n if (forceRerender) {\n this._changeDetectorRef.detectChanges();\n }\n }\n}\n\n/** Form control that can be associated with a datepicker. */\nexport interface MatDatepickerControl<D> {\n getStartValue(): D | null;\n getThemePalette(): ThemePalette;\n min: D | null;\n max: D | null;\n disabled: boolean;\n dateFilter: DateFilterFn<D>;\n getConnectedOverlayOrigin(): ElementRef;\n getOverlayLabelId(): string | null;\n stateChanges: Observable<void>;\n}\n\n/** A datepicker that can be attached to a {@link MatDatepickerControl}. */\nexport interface MatDatepickerPanel<\n C extends MatDatepickerControl<D>,\n S,\n D = ExtractDateTypeFromSelection<S>,\n> {\n /** Stream that emits whenever the date picker is closed. */\n closedStream: EventEmitter<void>;\n /** Color palette to use on the datepicker's calendar. */\n color: ThemePalette;\n /** The input element the datepicker is associated with. */\n datepickerInput: C;\n /** Whether the datepicker pop-up should be disabled. */\n disabled: boolean;\n /** The id for the datepicker's calendar. */\n id: string;\n /** Whether the datepicker is open. */\n opened: boolean;\n /** Stream that emits whenever the date picker is opened. */\n openedStream: EventEmitter<void>;\n /** Emits when the datepicker's state changes. */\n stateChanges: Subject<void>;\n /** Opens the datepicker. */\n open(): void;\n /** Register an input with the datepicker. */\n registerInput(input: C): MatDateSelectionModel<S, D>;\n}\n\n/** Base class for a datepicker. */\n@Directive()\nexport abstract class MatDatepickerBase<\n C extends MatDatepickerControl<D>,\n S,\n D = ExtractDateTypeFromSelection<S>,\n >\n implements MatDatepickerPanel<C, S, D>, OnDestroy, OnChanges\n{\n private _scrollStrategy: () => ScrollStrategy;\n private _inputStateChanges = Subscription.EMPTY;\n private _document = inject(DOCUMENT);\n\n /** An input indicating the type of the custom header component for the calendar, if set. */\n @Input() calendarHeaderComponent: ComponentType<any>;\n\n /** The date to open the calendar to initially. */\n @Input()\n get startAt(): D | null {\n // If an explicit startAt is set we start there, otherwise we start at whatever the currently\n // selected value is.\n return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);\n }\n set startAt(value: D | null) {\n this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n }\n private _startAt: D | null;\n\n /** The view that the calendar should start in. */\n @Input() startView: 'month' | 'year' | 'multi-year' = 'month';\n\n /** Color palette to use on the datepicker's calendar. */\n @Input()\n get color(): ThemePalette {\n return (\n this._color || (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined)\n );\n }\n set color(value: ThemePalette) {\n this._color = value;\n }\n _color: ThemePalette;\n\n /**\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\n * than a dropdown and elements have more padding to allow for bigger touch targets.\n */\n @Input({transform: booleanAttribute})\n touchUi: boolean = false;\n\n /** Whether the datepicker pop-up should be disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled === undefined && this.datepickerInput\n ? this.datepickerInput.disabled\n : !!this._disabled;\n }\n set disabled(value: boolean) {\n if (value !== this._disabled) {\n this._disabled = value;\n this.stateChanges.next(undefined);\n }\n }\n private _disabled: boolean;\n\n /** Preferred position of the datepicker in the X axis. */\n @Input()\n xPosition: DatepickerDropdownPositionX = 'start';\n\n /** Preferred position of the datepicker in the Y axis. */\n @Input()\n yPosition: DatepickerDropdownPositionY = 'below';\n\n /**\n * Whether to restore focus to the previously-focused element when the calendar is closed.\n * Note that automatic focus restoration is an accessibility feature and it is recommended that\n * you provide your own equivalent, if you decide to turn it off.\n */\n @Input({transform: booleanAttribute})\n restoreFocus: boolean = true;\n\n /**\n * Emits selected year in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits selected month in year view.\n * This doesn't imply a change on the selected date.\n */\n @Output() readonly monthSelected: EventEmitter<D> = new EventEmitter<D>();\n\n /**\n * Emits when the current view changes.\n */\n @Output() readonly viewChanged: EventEmitter<MatCalendarView> = new EventEmitter<MatCalendarView>(\n true,\n );\n\n /** Function that can be used to add custom CSS classes to dates. */\n @Input() dateClass: MatCalendarCellClassFunction<D>;\n\n /** Emits when the datepicker has been opened. */\n @Output('opened') readonly openedStream = new EventEmitter<void>();\n\n /** Emits when the datepicker has been closed. */\n @Output('closed') readonly closedStream = new EventEmitter<void>();\n\n /** Classes to be passed to the date picker panel. */\n @Input()\n get panelClass(): string | string[] {\n return this._panelClass;\n }\n set panelClass(value: string | string[]) {\n this._panelClass = coerceStringArray(value);\n }\n private _panelClass: string[];\n\n /** Whether the calendar is open. */\n @Input({transform: booleanAttribute})\n get opened(): boolean {\n return this._opened;\n }\n set opened(value: boolean) {\n if (value) {\n this.open();\n } else {\n this.close();\n }\n }\n private _opened = false;\n\n /** The id for the datepicker calendar. */\n id: string = `mat-datepicker-${datepickerUid++}`;\n\n /** The minimum selectable date. */\n _getMinDate(): D | null {\n return this.datepickerInput && this.datepickerInput.min;\n }\n\n /** The maximum selectable date. */\n _getMaxDate(): D | null {\n return this.datepickerInput && this.datepickerInput.max;\n }\n\n _getDateFilter(): DateFilterFn<D> {\n return this.datepickerInput && this.datepickerInput.dateFilter;\n }\n\n /** A reference to the overlay into which we've rendered the calendar. */\n private _overlayRef: OverlayRef | null;\n\n /** Reference to the component instance rendered in the overlay. */\n private _componentRef: ComponentRef<MatDatepickerContent<S, D>> | null;\n\n /** The element that was focused before the datepicker was opened. */\n private _focusedElementBeforeOpen: HTMLElement | null = null;\n\n /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */\n private _backdropHarnessClass = `${this.id}-backdrop`;\n\n /** Currently-registered actions portal. */\n private _actionsPortal: TemplatePortal | null;\n\n /** The input element this datepicker is associated with. */\n datepickerInput: C;\n\n /** Emits when the datepicker's state changes. */\n readonly stateChanges = new Subject<void>();\n\n constructor(\n private _overlay: Overlay,\n private _ngZone: NgZone,\n private _viewContainerRef: ViewContainerRef,\n @Inject(MAT_DATEPICKER_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dateAdapter: DateAdapter<D>,\n @Optional() private _dir: Directionality,\n private _model: MatDateSelectionModel<S, D>,\n ) {\n if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw createMissingDateImplError('DateAdapter');\n }\n\n this._scrollStrategy = scrollStrategy;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const positionChange = changes['xPosition'] || changes['yPosition'];\n\n if (positionChange && !positionChange.firstChange && this._overlayRef) {\n const positionStrategy = this._overlayRef.getConfig().positionStrategy;\n\n if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {\n this._setConnectedPositions(positionStrategy);\n\n if (this.opened) {\n this._overlayRef.updatePosition();\n }\n }\n }\n\n this.stateChanges.next(undefined);\n }\n\n ngOnDestroy() {\n this._destroyOverlay();\n this.close();\n this._inputStateChanges.unsubscribe();\n this.stateChanges.complete();\n }\n\n /** Selects the given date */\n select(date: D): void {\n this._model.add(date);\n }\n\n /** Emits the selected year in multiyear view */\n _selectYear(normalizedYear: D): void {\n this.yearSelected.emit(normalizedYear);\n }\n\n /** Emits selected month in year view */\n _selectMonth(normalizedMonth: D): void {\n this.monthSelected.emit(normalizedMonth);\n }\n\n /** Emits changed view */\n _viewChanged(view: MatCalendarView): void {\n this.viewChanged.emit(view);\n }\n\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n * @returns Selection model that the input should hook itself up to.\n */\n registerInput(input: C): MatDateSelectionModel<S, D> {\n if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('A MatDatepicker can only be associated with a single input.');\n }\n this._inputStateChanges.unsubscribe();\n this.datepickerInput = input;\n this._inputStateChanges = input.stateChanges.subscribe(() => this.stateChanges.next(undefined));\n return this._model;\n }\n\n /**\n * Registers a portal containing action buttons with the datepicker.\n * @param portal Portal to be registered.\n */\n registerActions(portal: TemplatePortal): void {\n if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('A MatDatepicker can only be associated with a single actions row.');\n }\n this._actionsPortal = portal;\n this._componentRef?.instance._assignActions(portal, true);\n }\n\n /**\n * Removes a portal containing action buttons from the datepicker.\n * @param portal Portal to be removed.\n */\n removeActions(portal: TemplatePortal): void {\n if (portal === this._actionsPortal) {\n this._actionsPortal = null;\n this._componentRef?.instance._assignActions(null, true);\n }\n }\n\n /** Open the calendar. */\n open(): void {\n // Skip reopening if there's an in-progress animation to avoid overlapping\n // sequences which can cause \"changed after checked\" errors. See #25837.\n if (this._opened || this.disabled || this._componentRef?.instance._isAnimating) {\n return;\n }\n\n if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempted to open an MatDatepicker with no associated input.');\n }\n\n this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();\n this._openOverlay();\n this._opened = true;\n this.openedStream.emit();\n }\n\n /** Close the calendar. */\n close(): void {\n // Skip reopening if there's an in-progress animation to avoid overlapping\n // sequences which can cause \"changed after checked\" errors. See #25837.\n if (!this._opened || this._componentRef?.instance._isAnimating) {\n return;\n }\n\n const canRestoreFocus =\n this.restoreFocus &&\n this._focusedElementBeforeOpen &&\n typeof this._focusedElementBeforeOpen.focus === 'function';\n\n const completeClose = () => {\n // The `_opened` could've been reset already if\n // we got two events in quick succession.\n if (this._opened) {\n this._opened = false;\n this.closedStream.emit();\n }\n };\n\n if (this._componentRef) {\n const {instance, location} = this._componentRef;\n instance._startExitAnimation();\n instance._animationDone.pipe(take(1)).subscribe(() => {\n const activeElement = this._document.activeElement;\n\n // Since we restore focus after the exit animation, we have to check that\n // the user didn't move focus themselves inside the `close` handler.\n if (\n canRestoreFocus &&\n (!activeElement ||\n activeElement === this._document.activeElement ||\n location.nativeElement.contains(activeElement))\n ) {\n this._focusedElementBeforeOpen!.focus();\n }\n\n this._focusedElementBeforeOpen = null;\n this._destroyOverlay();\n });\n }\n\n if (canRestoreFocus) {\n // Because IE moves focus asynchronously, we can't count on it being restored before we've\n // marked the datepicker as closed. If the event fires out of sequence and the element that\n // we're refocusing opens the datepicker on focus, the user could be stuck with not being\n // able to close the calendar at all. We work around it by making the logic, that marks\n // the datepicker as closed, async as well.\n setTimeout(completeClose);\n } else {\n completeClose();\n }\n }\n\n /** Applies the current pending selection on the overlay to the model. */\n _applyPendingSelection() {\n this._componentRef?.instance?._applyPendingSelection();\n }\n\n /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */\n protected _forwardContentValues(instance: MatDatepickerContent<S, D>) {\n instance.datepicker = this;\n instance.color = this.color;\n instance._dialogLabelId = this.datepickerInput.getOverlayLabelId();\n instance._assignActions(this._actionsPortal, false);\n }\n\n /** Opens the overlay with the calendar. */\n private _openOverlay(): void {\n this._destroyOverlay();\n\n const isDialog = this.touchUi;\n const portal = new ComponentPortal<MatDatepickerContent<S, D>>(\n MatDatepickerContent,\n this._viewContainerRef,\n );\n const overlayRef = (this._overlayRef = this._overlay.create(\n new OverlayConfig({\n positionStrategy: isDialog ? this._getDialogStrategy() : this._getDropdownStrategy(),\n hasBackdrop: true,\n backdropClass: [\n isDialog ? 'cdk-overlay-dark-backdrop' : 'mat-overlay-transparent-backdrop',\n this._backdropHarnessClass,\n ],\n direction: this._dir,\n scrollStrategy: isDialog ? this._overlay.scrollStrategies.block() : this._scrollStrategy(),\n panelClass: `mat-datepicker-${isDialog ? 'dialog' : 'popup'}`,\n }),\n ));\n\n this._getCloseStream(overlayRef).subscribe(event => {\n if (event) {\n event.preventDefault();\n }\n this.close();\n });\n\n // The `preventDefault` call happens inside the calendar as well, however focus moves into\n // it inside a timeout which can give browsers a chance to fire off a keyboard event in-between\n // that can scroll the page (see #24969). Always block default actions of arrow keys for the\n // entire overlay so the page doesn't get scrolled by accident.\n overlayRef.keydownEvents().subscribe(event => {\n const keyCode = event.keyCode;\n\n if (\n keyCode === UP_ARROW ||\n keyCode === DOWN_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW ||\n keyCode === PAGE_UP ||\n keyCode === PAGE_DOWN\n ) {\n event.preventDefault();\n }\n });\n\n this._componentRef = overlayRef.attach(portal);\n this._forwardContentValues(this._componentRef.instance);\n\n // Update the position once the calendar has rendered. Only relevant in dropdown mode.\n if (!isDialog) {\n this._ngZone.onStable.pipe(take(1)).subscribe(() => overlayRef.updatePosition());\n }\n }\n\n /** Destroys the current overlay. */\n private _destroyOverlay() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = this._componentRef = null;\n }\n }\n\n /** Gets a position strategy that will open the calendar as a dropdown. */\n private _getDialogStrategy() {\n return this._overlay.position().global().centerHorizontally().centerVertically();\n }\n\n /** Gets a position strategy that will open the calendar as a dropdown. */\n private _getDropdownStrategy() {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())\n .withTransformOriginOn('.mat-datepicker-content')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withLockedPosition();\n\n return this._setConnectedPositions(strategy);\n }\n\n /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */\n private _setConnectedPositions(strategy: FlexibleConnectedPositionStrategy) {\n const primaryX = this.xPosition === 'end' ? 'end' : 'start';\n const secondaryX = primaryX === 'start' ? 'end' : 'start';\n const primaryY = this.yPosition === 'above' ? 'bottom' : 'top';\n const secondaryY = primaryY === 'top' ? 'bottom' : 'top';\n\n return strategy.withPositions([\n {\n originX: primaryX,\n originY: secondaryY,\n overlayX: primaryX,\n overlayY: primaryY,\n },\n {\n originX: primaryX,\n originY: primaryY,\n overlayX: primaryX,\n overlayY: secondaryY,\n },\n {\n originX: secondaryX,\n originY: secondaryY,\n overlayX: secondaryX,\n overlayY: primaryY,\n },\n {\n originX: secondaryX,\n originY: primaryY,\n overlayX: secondaryX,\n overlayY: secondaryY,\n },\n ]);\n }\n\n /** Gets an observable that will emit when the overlay is supposed to be closed. */\n private _getCloseStream(overlayRef: OverlayRef) {\n const ctrlShiftMetaModifiers: ModifierKey[] = ['ctrlKey', 'shiftKey', 'metaKey'];\n return merge(\n overlayRef.backdropClick(),\n overlayRef.detachments(),\n overlayRef.keydownEvents().pipe(\n filter(event => {\n // Closing on alt + up is only valid when there's an input associated with the datepicker.\n return (\n (event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n (this.datepickerInput &&\n hasModifierKey(event, 'altKey') &&\n event.keyCode === UP_ARROW &&\n ctrlShiftMetaModifiers.every(\n (modifier: ModifierKey) => !hasModifierKey(event, modifier),\n ))\n );\n }),\n ),\n );\n }\n}\n","<div\n cdkTrapFocus\n role=\"dialog\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"_dialogLabelId ?? undefined\"\n class=\"mat-datepicker-content-container\"\n [class.mat-datepicker-content-container-with-custom-header]=\"datepicker.calendarHeaderComponent\"\n [class.mat-datepicker-content-container-with-actions]=\"_actionsPortal\">\n <mat-calendar\n [id]=\"datepicker.id\"\n [class]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [@fadeInCalendar]=\"'enter'\"\n [startDateAccessibleName]=\"startDateAccessibleName\"\n [endDateAccessibleName]=\"endDateAccessibleName\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"\n (_userDragDrop)=\"_handleUserDragDrop($event)\"></mat-calendar>\n\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\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\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {MatDatepickerBase, MatDatepickerControl} from './datepicker-base';\nimport {MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER} from './date-selection-model';\n\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDatepicker\"). We can change this to a directive\n// if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the datepicker popup/dialog. */\n@Component({\n selector: 'mat-datepicker',\n template: '',\n exportAs: 'matDatepicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,\n {provide: MatDatepickerBase, useExisting: MatDatepicker},\n ],\n standalone: true,\n})\nexport class MatDatepicker<D> extends MatDatepickerBase<MatDatepickerControl<D>, D | null, D> {}\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\nimport {DOWN_ARROW, hasModifierKey, ModifierKey} from '@angular/cdk/keycodes';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Output,\n AfterViewInit,\n OnChanges,\n SimpleChanges,\n booleanAttribute,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n ValidationErrors,\n Validator,\n ValidatorFn,\n} from '@angular/forms';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats, ThemePalette} from '@angular/material/core';\nimport {Subscription, Subject} from 'rxjs';\nimport {createMissingDateImplError} from './datepicker-errors';\nimport {\n ExtractDateTypeFromSelection,\n MatDateSelectionModel,\n DateSelectionModelChange,\n} from './date-selection-model';\n\n/**\n * An event used for datepicker input and change events. We don't always have access to a native\n * input or change event because the event may have been triggered by the user clicking on the\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\n */\nexport class MatDatepickerInputEvent<D, S = unknown> {\n /** The new value for the target datepicker input. */\n value: D | null;\n\n constructor(\n /** Reference to the datepicker input component that emitted the event. */\n public target: MatDatepickerInputBase<S, D>,\n /** Reference to the native input element associated with the datepicker input. */\n public targetElement: HTMLElement,\n ) {\n this.value = this.target.value;\n }\n}\n\n/** Function that can be used to filter out dates from a calendar. */\nexport type DateFilterFn<D> = (date: D | null) => boolean;\n\n/**\n * Partial representation of `MatFormField` that is used for backwards-compatibility\n * between the legacy and non-legacy variants.\n */\nexport interface _MatFormFieldPartial {\n getConnectedOverlayOrigin(): ElementRef;\n getLabelId(): string | null;\n color: ThemePalette;\n _elementRef: ElementRef;\n _shouldLabelFloat(): boolean;\n _hasFloatingLabel(): boolean;\n _labelId: string;\n}\n\n/** Base class for datepicker inputs. */\n@Directive({standalone: true})\nexport abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection<S>>\n implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, Validator\n{\n /** Whether the component has been initialized. */\n private _isInitialized: boolean;\n\n /** The value of the input. */\n @Input()\n get value(): D | null {\n return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;\n }\n set value(value: any) {\n this._assignValueProgrammatically(value);\n }\n protected _model: MatDateSelectionModel<S, D> | undefined;\n\n /** Whether the datepicker-input is disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return !!this._disabled || this._parentDisabled();\n }\n set disabled(value: boolean) {\n const newValue = value;\n const element = this._elementRef.nativeElement;\n\n if (this._disabled !== newValue) {\n this._disabled = newValue;\n this.stateChanges.next(undefined);\n }\n\n // We need to null check the `blur` method, because it's undefined during SSR.\n // In Ivy static bindings are invoked earlier, before the element is attached to the DOM.\n // This can cause an error to be thrown in some browsers (IE/Edge) which assert that the\n // element has been inserted.\n if (newValue && this._isInitialized && element.blur) {\n // Normally, native input elements automatically blur if they turn disabled. This behavior\n // is problematic, because it would mean that it triggers another change detection cycle,\n // which then causes a changed after checked error if the input element was focused before.\n element.blur();\n }\n }\n private _disabled: boolean;\n\n /** Emits when a `change` event is fired on this `<input>`. */\n @Output() readonly dateChange: EventEmitter<MatDatepickerInputEvent<D, S>> = new EventEmitter<\n MatDatepickerInputEvent<D, S>\n >();\n\n /** Emits when an `input` event is fired on this `<input>`. */\n @Output() readonly dateInput: EventEmitter<MatDatepickerInputEvent<D, S>> = new EventEmitter<\n MatDatepickerInputEvent<D, S>\n >();\n\n /** Emits when the internal state has changed */\n readonly stateChanges = new Subject<void>();\n\n _onTouched = () => {};\n _validatorOnChange = () => {};\n\n private _cvaOnChange: (value: any) => void = () => {};\n private _valueChangesSubscription = Subscription.EMPTY;\n private _localeSubscription = Subscription.EMPTY;\n\n /**\n * Since the value is kept on the model which is assigned in an Input,\n * we might get a value before we have a model. This property keeps track\n * of the value until we have somewhere to assign it.\n */\n private _pendingValue: D | null;\n\n /** The form control validator for whether the input parses. */\n private _parseValidator: ValidatorFn = (): ValidationErrors | null => {\n return this._lastValueValid\n ? null\n : {'matDatepickerParse': {'text': this._elementRef.nativeElement.value}};\n };\n\n /** The form control validator for the date filter. */\n private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._dateAdapter.getValidDateOrNull(\n this._dateAdapter.deserialize(control.value),\n );\n return !controlValue || this._matchesFilter(controlValue)\n ? null\n : {'matDatepickerFilter': true};\n };\n\n /** The form control validator for the min date. */\n private _minValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._dateAdapter.getValidDateOrNull(\n this._dateAdapter.deserialize(control.value),\n );\n const min = this._getMinDate();\n return !min || !controlValue || this._dateAdapter.compareDate(min, controlValue) <= 0\n ? null\n : {'matDatepickerMin': {'min': min, 'actual': controlValue}};\n };\n\n /** The form control validator for the max date. */\n private _maxValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const controlValue = this._dateAdapter.getValidDateOrNull(\n this._dateAdapter.deserialize(control.value),\n );\n const max = this._getMaxDate();\n return !max || !controlValue || this._dateAdapter.compareDate(max, controlValue) >= 0\n ? null\n : {'matDatepickerMax': {'max': max, 'actual': controlValue}};\n };\n\n /** Gets the base validator functions. */\n protected _getValidators(): ValidatorFn[] {\n return [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator];\n }\n\n /** Gets the minimum date for the input. Used for validation. */\n abstract _getMinDate(): D | null;\n\n /** Gets the maximum date for the input. Used for validation. */\n abstract _getMaxDate(): D | null;\n\n /** Gets the date filter function. Used for validation. */\n protected abstract _getDateFilter(): DateFilterFn<D> | undefined;\n\n /** Registers a date selection model with the input. */\n _registerModel(model: MatDateSelectionModel<S, D>): void {\n this._model = model;\n this._valueChangesSubscription.unsubscribe();\n\n if (this._pendingValue) {\n this._assignValue(this._pendingValue);\n }\n\n this._valueChangesSubscription = this._model.selectionChanged.subscribe(event => {\n if (this._shouldHandleChangeEvent(event)) {\n const value = this._getValueFromModel(event.selection);\n this._lastValueValid = this._isValidValue(value);\n this._cvaOnChange(value);\n this._onTouched();\n this._formatValue(value);\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n });\n }\n\n /** Opens the popup associated with the input. */\n protected abstract _openPopup(): void;\n\n /** Assigns a value to the input's model. */\n protected abstract _assignValueToModel(model: D | null): void;\n\n /** Converts a value from the model into a native value for the input. */\n protected abstract _getValueFromModel(modelValue: S): D | null;\n\n /** Combined form control validator for this input. */\n protected abstract _validator: ValidatorFn | null;\n\n /** Predicate that determines whether the input should handle a particular change event. */\n protected abstract _shouldHandleChangeEvent(event: DateSelectionModelChange<S>): boolean;\n\n /** Whether the last value set on the input was valid. */\n protected _lastValueValid = false;\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement>,\n @Optional() public _dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats,\n ) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._dateAdapter) {\n throw createMissingDateImplError('DateAdapter');\n }\n if (!this._dateFormats) {\n throw createMissingDateImplError('MAT_DATE_FORMATS');\n }\n }\n\n // Update the displayed date when the locale changes.\n this._localeSubscription = _dateAdapter.localeChanges.subscribe(() => {\n this._assignValueProgrammatically(this.value);\n });\n }\n\n ngAfterViewInit() {\n this._isInitialized = true;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (dateInputsHaveChanged(changes, this._dateAdapter)) {\n this.stateChanges.next(undefined);\n }\n }\n\n ngOnDestroy() {\n this._valueChangesSubscription.unsubscribe();\n this._localeSubscription.unsubscribe();\n this.stateChanges.complete();\n }\n\n /** @docs-private */\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n /** @docs-private */\n validate(c: AbstractControl): ValidationErrors | null {\n return this._validator ? this._validator(c) : null;\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: D): void {\n this._assignValueProgrammatically(value);\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void): void {\n this._cvaOnChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _onKeydown(event: KeyboardEvent) {\n const ctrlShiftMetaModifiers: ModifierKey[] = ['ctrlKey', 'shiftKey', 'metaKey'];\n const isAltDownArrow =\n hasModifierKey(event, 'altKey') &&\n event.keyCode === DOWN_ARROW &&\n ctrlShiftMetaModifiers.every((modifier: ModifierKey) => !hasModifierKey(event, modifier));\n\n if (isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n this._openPopup();\n event.preventDefault();\n }\n }\n\n _onInput(value: string) {\n const lastValueWasValid = this._lastValueValid;\n let date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);\n this._lastValueValid = this._isValidValue(date);\n date = this._dateAdapter.getValidDateOrNull(date);\n const hasChanged = !this._dateAdapter.sameDate(date, this.value);\n\n // We need to fire the CVA change event for all\n // nulls, otherwise the validators won't run.\n if (!date || hasChanged) {\n this._cvaOnChange(date);\n } else {\n // Call the CVA change handler for invalid values\n // since this is what marks the control as dirty.\n if (value && !this.value) {\n this._cvaOnChange(date);\n }\n\n if (lastValueWasValid !== this._lastValueValid) {\n this._validatorOnChange();\n }\n }\n\n if (hasChanged) {\n this._assignValue(date);\n this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n }\n\n _onChange() {\n this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n }\n\n /** Handles blur events on the input. */\n _onBlur() {\n // Reformat the input only if we have a valid value.\n if (this.value) {\n this._formatValue(this.value);\n }\n\n this._onTouched();\n }\n\n /** Formats a value and sets it on the input element. */\n protected _formatValue(value: D | null) {\n this._elementRef.nativeElement.value =\n value != null ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';\n }\n\n /** Assigns a value to the model. */\n private _assignValue(value: D | null) {\n // We may get some incoming values before the model was\n // assigned. Save the value so that we can assign it later.\n if (this._model) {\n this._assignValueToModel(value);\n this._pendingValue = null;\n } else {\n this._pendingValue = value;\n }\n }\n\n /** Whether a value is considered valid. */\n private _isValidValue(value: D | null): boolean {\n return !value || this._dateAdapter.isValid(value);\n }\n\n /**\n * Checks whether a parent control is disabled. This is in place so that it can be overridden\n * by inputs extending this one which can be placed inside of a group that can be disabled.\n */\n protected _parentDisabled() {\n return false;\n }\n\n /** Programmatically assigns a value to the input. */\n protected _assignValueProgrammatically(value: D | null) {\n value = this._dateAdapter.deserialize(value);\n this._lastValueValid = this._isValidValue(value);\n value = this._dateAdapter.getValidDateOrNull(value);\n this._assignValue(value);\n this._formatValue(value);\n }\n\n /** Gets whether a value matches the current date filter. */\n _matchesFilter(value: D | null): boolean {\n const filter = this._getDateFilter();\n return !filter || filter(value);\n }\n}\n\n/**\n * Checks whether the `SimpleChanges` object from an `ngOnChanges`\n * callback has any changes, accounting for date objects.\n */\nexport function dateInputsHaveChanged(\n changes: SimpleChanges,\n adapter: DateAdapter<unknown>,\n): boolean {\n const keys = Object.keys(changes);\n\n for (let key of keys) {\n const {previousValue, currentValue} = changes[key];\n\n if (adapter.isDateInstance(previousValue) && adapter.isDateInstance(currentValue)) {\n if (!adapter.sameDate(previousValue, currentValue)) {\n return true;\n }\n } else {\n return true;\n }\n }\n\n return false;\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\nimport {Directive, ElementRef, forwardRef, Inject, Input, OnDestroy, Optional} from '@angular/core';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidatorFn, Validators} from '@angular/forms';\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats, ThemePalette} from '@angular/material/core';\nimport {MAT_FORM_FIELD} from '@angular/material/form-field';\nimport {MAT_INPUT_VALUE_ACCESSOR} from '@angular/material/input';\nimport {Subscription} from 'rxjs';\nimport {MatDatepickerInputBase, DateFilterFn, _MatFormFieldPartial} from './datepicker-input-base';\nimport {MatDatepickerControl, MatDatepickerPanel} from './datepicker-base';\nimport {DateSelectionModelChange} from './date-selection-model';\n\n/** @docs-private */\nexport const MAT_DATEPICKER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true,\n};\n\n/** @docs-private */\nexport const MAT_DATEPICKER_VALIDATORS: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatDatepickerInput),\n multi: true,\n};\n\n/** Directive used to connect an input to a MatDatepicker. */\n@Directive({\n selector: 'input[matDatepicker]',\n providers: [\n MAT_DATEPICKER_VALUE_ACCESSOR,\n MAT_DATEPICKER_VALIDATORS,\n {provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput},\n ],\n host: {\n 'class': 'mat-datepicker-input',\n '[attr.aria-haspopup]': '_datepicker ? \"dialog\" : null',\n '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',\n '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',\n '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',\n // Used by the test harness to tie this input to its calendar. We can't depend on\n // `aria-owns` for this, because it's only defined while the calendar is open.\n '[attr.data-mat-calendar]': '_datepicker ? _datepicker.id : null',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event.target.value)',\n '(change)': '_onChange()',\n '(blur)': '_onBlur()',\n '(keydown)': '_onKeydown($event)',\n },\n exportAs: 'matDatepickerInput',\n standalone: true,\n})\nexport class MatDatepickerInput<D>\n extends MatDatepickerInputBase<D | null, D>\n implements MatDatepickerControl<D | null>, OnDestroy\n{\n private _closedSubscription = Subscription.EMPTY;\n\n /** The datepicker that this input is associated with. */\n @Input()\n set matDatepicker(datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>) {\n if (datepicker) {\n this._datepicker = datepicker;\n this._closedSubscription = datepicker.closedStream.subscribe(() => this._onTouched());\n this._registerModel(datepicker.registerInput(this));\n }\n }\n _datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>;\n\n /** The minimum valid date. */\n @Input()\n get min(): D | null {\n return this._min;\n }\n set min(value: D | null) {\n const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n\n if (!this._dateAdapter.sameDate(validValue, this._min)) {\n this._min = validValue;\n this._validatorOnChange();\n }\n }\n private _min: D | null;\n\n /** The maximum valid date. */\n @Input()\n get max(): D | null {\n return this._max;\n }\n set max(value: D | null) {\n const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n\n if (!this._dateAdapter.sameDate(validValue, this._max)) {\n this._max = validValue;\n this._validatorOnChange();\n }\n }\n private _max: D | null;\n\n /** Function that can be used to filter out dates within the datepicker. */\n @Input('matDatepickerFilter')\n get dateFilter() {\n return this._dateFilter;\n }\n set dateFilter(value: DateFilterFn<D | null>) {\n const wasMatchingValue = this._matchesFilter(this.value);\n this._dateFilter = value;\n\n if (this._matchesFilter(this.value) !== wasMatchingValue) {\n this._validatorOnChange();\n }\n }\n private _dateFilter: DateFilterFn<D | null>;\n\n /** The combined form control validator for this input. */\n protected _validator: ValidatorFn | null;\n\n constructor(\n elementRef: ElementRef<HTMLInputElement>,\n @Optional() dateAdapter: DateAdapter<D>,\n @Optional() @Inject(MAT_DATE_FORMATS) dateFormats: MatDateFormats,\n @Optional() @Inject(MAT_FORM_FIELD) private _formField?: _MatFormFieldPartial,\n ) {\n super(elementRef, dateAdapter, dateFormats);\n this._validator = Validators.compose(super._getValidators());\n }\n\n /**\n * Gets the element that the datepicker popup should be connected to.\n * @return The element to connect the popup to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n\n /** Gets the ID of an element that should be used a description for the calendar overlay. */\n getOverlayLabelId(): string | null {\n if (this._formField) {\n return this._formField.getLabelId();\n }\n\n return this._elementRef.nativeElement.getAttribute('aria-labelledby');\n }\n\n /** Returns the palette used by the input's form field, if any. */\n getThemePalette(): ThemePalette {\n return this._formField ? this._formField.color : undefined;\n }\n\n /** Gets the value at which the calendar should start. */\n getStartValue(): D | null {\n return this.value;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n this._closedSubscription.unsubscribe();\n }\n\n /** Opens the associated datepicker. */\n protected _openPopup(): void {\n if (this._datepicker) {\n this._datepicker.open();\n }\n }\n\n protected _getValueFromModel(modelValue: D | null): D | null {\n return modelValue;\n }\n\n protected _assignValueToModel(value: D | null): void {\n if (this._model) {\n this._model.updateSelection(value, this);\n }\n }\n\n /** Gets the input's minimum date. */\n _getMinDate() {\n return this._min;\n }\n\n /** Gets the input's maximum date. */\n _getMaxDate() {\n return this._max;\n }\n\n /** Gets the input's date filtering function. */\n protected _getDateFilter() {\n return this._dateFilter;\n }\n\n protected _shouldHandleChangeEvent(event: DateSelectionModelChange<D>) {\n return event.source !== this;\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\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n Directive,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n ViewEncapsulation,\n ViewChild,\n booleanAttribute,\n} from '@angular/core';\nimport {MatButton, MatIconButton} from '@angular/material/button';\nimport {merge, Observable, of as observableOf, Subscription} from 'rxjs';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatDatepickerControl, MatDatepickerPanel} from './datepicker-base';\n\n/** Can be used to override the icon of a `matDatepickerToggle`. */\n@Directive({\n selector: '[matDatepickerToggleIcon]',\n standalone: true,\n})\nexport class MatDatepickerToggleIcon {}\n\n@Component({\n selector: 'mat-datepicker-toggle',\n templateUrl: 'datepicker-toggle.html',\n styleUrl: 'datepicker-toggle.css',\n host: {\n 'class': 'mat-datepicker-toggle',\n '[attr.tabindex]': 'null',\n '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',\n '[class.mat-accent]': 'datepicker && datepicker.color === \"accent\"',\n '[class.mat-warn]': 'datepicker && datepicker.color === \"warn\"',\n // Used by the test harness to tie this toggle to its datepicker.\n '[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',\n // Bind the `click` on the host, rather than the inner `button`, so that we can call\n // `stopPropagation` on it without affecting the user's `click` handlers. We need to stop\n // it so that the input doesn't get focused automatically by the form field (See #21836).\n '(click)': '_open($event)',\n },\n exportAs: 'matDatepickerToggle',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatIconButton],\n})\nexport class MatDatepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {\n private _stateChanges = Subscription.EMPTY;\n\n /** Datepicker instance that the button will toggle. */\n @Input('for') datepicker: MatDatepickerPanel<MatDatepickerControl<any>, D>;\n\n /** Tabindex for the toggle. */\n @Input() tabIndex: number | null;\n\n /** Screen-reader label for the button. */\n @Input('aria-label') ariaLabel: string;\n\n /** Whether the toggle button is disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n if (this._disabled === undefined && this.datepicker) {\n return this.datepicker.disabled;\n }\n\n return !!this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n }\n private _disabled: boolean;\n\n /** Whether ripples on the toggle should be disabled. */\n @Input() disableRipple: boolean;\n\n /** Custom icon set by the consumer. */\n @ContentChild(MatDatepickerToggleIcon) _customIcon: MatDatepickerToggleIcon;\n\n /** Underlying button element. */\n @ViewChild('button') _button: MatButton;\n\n constructor(\n public _intl: MatDatepickerIntl,\n private _changeDetectorRef: ChangeDetectorRef,\n @Attribute('tabindex') defaultTabIndex: string,\n ) {\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['datepicker']) {\n this._watchStateChanges();\n }\n }\n\n ngOnDestroy() {\n this._stateChanges.unsubscribe();\n }\n\n ngAfterContentInit() {\n this._watchStateChanges();\n }\n\n _open(event: Event): void {\n if (this.datepicker && !this.disabled) {\n this.datepicker.open();\n event.stopPropagation();\n }\n }\n\n private _watchStateChanges() {\n const datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : observableOf();\n const inputStateChanged =\n this.datepicker && this.datepicker.datepickerInput\n ? this.datepicker.datepickerInput.stateChanges\n : observableOf();\n const datepickerToggled = this.datepicker\n ? merge(this.datepicker.openedStream, this.datepicker.closedStream)\n : observableOf();\n\n this._stateChanges.unsubscribe();\n this._stateChanges = merge(\n this._intl.changes,\n datepickerStateChanged as Observable<void>,\n inputStateChanged,\n datepickerToggled,\n ).subscribe(() => this._changeDetectorRef.markForCheck());\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\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {PortalModule} from '@angular/cdk/portal';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatCalendar, MatCalendarHeader} from './calendar';\nimport {MatCalendarBody} from './calendar-body';\nimport {MatDatepicker} from './datepicker';\nimport {\n MatDatepickerContent,\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './datepicker-base';\nimport {MatDatepickerInput} from './datepicker-input';\nimport {MatDatepickerIntl} from './datepicker-intl';\nimport {MatDatepickerToggle, MatDatepickerToggleIcon} from './datepicker-toggle';\nimport {MatMonthView} from './month-view';\nimport {MatMultiYearView} from './multi-year-view';\nimport {MatYearView} from './year-view';\nimport {MatDateRangeInput} from './date-range-input';\nimport {MatStartDate, MatEndDate} from './date-range-input-parts';\nimport {MatDateRangePicker} from './date-range-picker';\nimport {MatDatepickerActions, MatDatepickerApply, MatDatepickerCancel} from './datepicker-actions';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n OverlayModule,\n A11yModule,\n PortalModule,\n MatCommonModule,\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n MatDateRangeInput,\n MatStartDate,\n MatEndDate,\n MatDateRangePicker,\n MatDatepickerActions,\n MatDatepickerCancel,\n MatDatepickerApply,\n ],\n exports: [\n CdkScrollableModule,\n MatCalendar,\n MatCalendarBody,\n MatDatepicker,\n MatDatepickerContent,\n MatDatepickerInput,\n MatDatepickerToggle,\n MatDatepickerToggleIcon,\n MatMonthView,\n MatYearView,\n MatMultiYearView,\n MatCalendarHeader,\n MatDateRangeInput,\n MatStartDate,\n MatEndDate,\n MatDateRangePicker,\n MatDatepickerActions,\n MatDatepickerCancel,\n MatDatepickerApply,\n ],\n providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatDatepickerModule {}\n","<div class=\"flex\">\n <div class=\"flex-1 separator pr-small-r mr-small-r overflow-hidden\">\n <fcom-timeline\n *ngIf=\"arrival && departure\"\n [arrival]=\"arrival\"\n [departure]=\"departure\"\n [isByBusOnly]=\"isByBusOnly\"\n [isByTrainOnly]=\"isByTrainOnly\"\n ></fcom-timeline>\n </div>\n <div class=\"bound-details flex\" [style.minWidth]=\"0\">\n <div *ngIf=\"tails.length\" class=\"flex--nogrow flex mr-xxsmall-r ms-xxsmall-b\" aria-hidden=\"true\">\n <div\n *ngFor=\"let tail of tails; let i = index\"\n class=\"flex--nogrow tail {{ tail }}\"\n [class.first]=\"i === 0\"\n [class.minus-margin]=\"i !== 0\"\n ></div>\n </div>\n\n <div class=\"font-body-2 flex flex--column grow\">\n <div *ngIf=\"airlines.length > 0\" class=\"flex--nogrow nordic-blue-900-text overflow-hidden two-lines-ellipsis\">\n <span class=\"is-vishidden\">\n {{ 'bookingSummary.operatedBy' | finLocalization }}\n </span>\n {{ airlines.join(', ') }}\n </div>\n\n <div\n data-testid=\"flight-numbers\"\n *ngIf=\"showFlightNumber && flightNumbers?.length > 0\"\n class=\"truncate overflow-hidden font-body-2 nordic-blue-400-text ps-xxsmall-b\"\n >\n {{ flightNumbers }}\n </div>\n\n <div *ngIf=\"duration || stops !== undefined\" class=\"flex--nogrow flex flex--wrap overflow-hidden\">\n <span class=\"truncate overflow-hidden bold-type\" *ngIf=\"stops !== undefined\">\n <ng-container\n >{{\n 'flightItinerary.' + (stops === 0 ? 'direct' : 'stopOver.' + (stops === 1 ? 'singular' : 'plural'))\n | finLocalization: [stops]\n }}<span> </span></ng-container\n >\n </span>\n <span *ngIf=\"duration\" class=\"truncate overflow-hidden\">{{ duration }}</span>\n </div>\n\n <div *ngIf=\"showViewDetails\" class=\"flex-2 flex flex--align-end ms-xxsmall-t\">\n <!-- TODO: use global translation key for view Details instead of booking translation key -->\n <button\n class=\"font-body-2 nordic-blue-900-text blue-light-hover medium-type underline overflow-hidden align-left\"\n #viewDetailsBtn\n data-testid=\"ufo-open-modal-button\"\n (click)=\"viewDetails.emit($event)\"\n >\n {{ viewDetailsBtnKey | finLocalization }}\n </button>\n </div>\n </div>\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport { Observable, of, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils/unsubscribe';\nimport { Airport } from '@fcom/common/interfaces/booking';\nimport { ConfigService } from '@fcom/core/services';\n\n/**\n * @Unstable\n * Warning! This component is in active development and is not production ready.\n *\n * Documentation can be found in `storybook/stories/flights/unified-flight-object.stories.mdx`\n */\n@Component({\n selector: 'fcom-ufo',\n templateUrl: 'unified-flight-object.component.html',\n styleUrls: ['./unified-flight-object.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UnifiedFlightObjectComponent implements OnInit, OnDestroy {\n /**\n * Object containing the information for the Departure airport, including\n * - city name\n * - airport name\n * - airport code\n * - formatted dateTime of departure @example \"08:45 Thu\"\n *\n * Required\n */\n @Input({ required: true })\n departure: Airport;\n\n /**\n * Object containing the information for the Arrival airport, including\n * - city name\n * - airport name\n * - airport code\n * - formatted dateTime of arrival @example \"08:45 Thu\"\n *\n * Required\n */\n @Input({ required: true })\n arrival: Airport;\n\n /**\n * An array of tails for the bound, these should follow the format of \"tail_ay\" and will be\n * loaded from @finnairoyj/fcom-ui-styles. So you can check the available tails there.\n */\n @Input()\n tails: string[] = [];\n\n /**\n * Formatted string showing the duration of the flight\n */\n @Input()\n duration = '';\n\n /**\n * An array of airline names\n */\n @Input()\n airlines: string[] = [];\n\n /**\n * Number of stops on the flight. Used for determining \"Direct\", \"1 stop\", \"2 stops\" text.\n */\n @Input()\n stops = 0;\n\n /**\n * Boolean indicating if the view Details button should be shown\n */\n @Input()\n showViewDetails = true;\n\n /**\n * Boolean indicating if the bound is a bus connection\n */\n @Input()\n isByBusOnly = false;\n\n /**\n * Boolean indicating if the bound/segment is a bus connection\n */\n @Input()\n isByTrainOnly = false;\n\n @Input()\n focusOnViewDetails$: Observable<boolean> = of(false);\n\n /**\n * Formatted string showing the flight numbers\n */\n\n @Input()\n flightNumbers = '';\n\n @Input()\n viewDetailsBtnKey = 'manageMyBooking.widget.viewFullOrder';\n\n /**\n * Output event emitter used to indicate when the view Details button has been clicked.\n * This should be listened to for determining if a modal should be displayed.\n */\n @Output()\n viewDetails = new EventEmitter<MouseEvent>();\n\n @ViewChild('viewDetailsBtn', { static: false, read: ElementRef }) viewDetailsBtn: ElementRef;\n\n showFlightNumber = false;\n private subscriptions: Subscription = new Subscription();\n\n constructor(configService: ConfigService) {\n this.showFlightNumber = configService.cfg.enableShowFlightNumbers;\n }\n\n ngOnInit(): void {\n this.subscriptions.add(\n this.focusOnViewDetails$\n .pipe(filter((focus) => this.showViewDetails && focus))\n .subscribe(() => setTimeout(() => this.viewDetailsBtn.nativeElement.focus(), 0))\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairAlternativeOfferConfirmationStatus } from '../models/finnair-alternative-offer-confirmation-status';\nimport { FinnairSelfReacAcknowledgeRequest } from '../models/finnair-self-reac-acknowledge-request';\nimport { FinnairSelfReacConfirmationRequest } from '../models/finnair-self-reac-confirmation-request';\nimport { FinnairSelfReacConfirmationResponse } from '../models/finnair-self-reac-confirmation-response';\n\n\n/**\n * Order resources in use\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SelfReaccService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation disruptionConfirmAcknowledge\n */\n static readonly DisruptionConfirmAcknowledgePath = '/api/order/{orderId}/disruption-rebooking/confirm-acknowledge';\n\n /**\n * disruptionConfirmAcknowledge.\n *\n * Confirm full acknowledge\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `disruptionConfirmAcknowledge()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n disruptionConfirmAcknowledge$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: FinnairSelfReacAcknowledgeRequest\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<FinnairSelfReacConfirmationResponse>> {\n const rb = new DapiRequestBuilder(rootUrl, SelfReaccService.DisruptionConfirmAcknowledgePath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<FinnairSelfReacConfirmationResponse>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * disruptionConfirmAcknowledge.\n *\n * Confirm full acknowledge\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `disruptionConfirmAcknowledge$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n disruptionConfirmAcknowledge(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: FinnairSelfReacAcknowledgeRequest\n },\n context?: HttpContext\n\n): Observable<FinnairSelfReacConfirmationResponse> {\n return this.disruptionConfirmAcknowledge$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<FinnairSelfReacConfirmationResponse>) => r.body as FinnairSelfReacConfirmationResponse)\n );\n }\n\n /**\n * Path part for operation disruptionConfirmAlternative\n */\n static readonly DisruptionConfirmAlternativePath = '/api/order/{orderId}/disruption-rebooking/confirm-alternative';\n\n /**\n * confirm alternative offer.\n *\n * Confirm alternative offer in self reac\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `disruptionConfirmAlternative()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n disruptionConfirmAlternative$Response(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: FinnairSelfReacConfirmationRequest\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<FinnairSelfReacConfirmationResponse>> {\n const rb = new DapiRequestBuilder(rootUrl, SelfReaccService.DisruptionConfirmAlternativePath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<FinnairSelfReacConfirmationResponse>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * confirm alternative offer.\n *\n * Confirm alternative offer in self reac\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `disruptionConfirmAlternative$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n disruptionConfirmAlternative(rootUrl: string, params: {\n orderId: string;\n locale?: string;\n hash?: string;\n body: FinnairSelfReacConfirmationRequest\n },\n context?: HttpContext\n\n): Observable<FinnairSelfReacConfirmationResponse> {\n return this.disruptionConfirmAlternative$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<FinnairSelfReacConfirmationResponse>) => r.body as FinnairSelfReacConfirmationResponse)\n );\n }\n\n /**\n * Path part for operation disruptionConfirmStatus\n */\n static readonly DisruptionConfirmStatusPath = '/api/order/{orderId}/disruption-rebooking/confirm-alternative/{jobId}';\n\n /**\n * disruptionConfirmStatus.\n *\n * Returns the status of an ongoing alternative confirm process.\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `disruptionConfirmStatus()` instead.\n *\n * This method doesn't expect any request body.\n */\n disruptionConfirmStatus$Response(rootUrl: string, params: {\n orderId: string;\n jobId: string;\n locale?: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<FinnairAlternativeOfferConfirmationStatus>> {\n const rb = new DapiRequestBuilder(rootUrl, SelfReaccService.DisruptionConfirmStatusPath, 'get');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.path('jobId', params.jobId, {});\n rb.query('locale', params.locale, {});\n rb.query('hash', params.hash, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as DapiHttpResponse<FinnairAlternativeOfferConfirmationStatus>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * disruptionConfirmStatus.\n *\n * Returns the status of an ongoing alternative confirm process.\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `disruptionConfirmStatus$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n disruptionConfirmStatus(rootUrl: string, params: {\n orderId: string;\n jobId: string;\n locale?: string;\n hash?: string;\n },\n context?: HttpContext\n\n): Observable<FinnairAlternativeOfferConfirmationStatus> {\n return this.disruptionConfirmStatus$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<FinnairAlternativeOfferConfirmationStatus>) => r.body as FinnairAlternativeOfferConfirmationStatus)\n );\n }\n\n}\n","@if ((isMobile$ | async) || (isFlightSelectionFiltersTestVariant$ | async)) {\n <div data-testid=\"fcom-filters-mobile\">\n <button\n class=\"filters-button flex flex--no-wrap flex--center rounded-medium width--100 font-body-1 white-bg border nordic-blue-400-border\"\n [ngClass]=\"{\n 'medium-type': isFlightSelectionFiltersTestVariant$ | async,\n 'pr-xxsmall-x': (isFlightSelectionFiltersTestVariant$ | async) && (isMobile$ | async) !== true,\n }\"\n [disabled]=\"disabled\"\n (click)=\"showModal.emit()\"\n >\n <fcom-icon\n class=\"icon-small ms-xxsmall-l flex flex--self-center\"\n [name]=\"SvgLibraryIcon.FILTER_OPTIONS\"\n ></fcom-icon>\n <span class=\"ms-xxsmall-l ps-small-y flex\">\n {{ buttonText }}\n <span\n *ngIf=\"hasFiltering\"\n class=\"ms-xxsmall-l font-body-2 flex flex--self-center nordic-blue-900-bg white-text dot\"\n >\n {{ numberToShowWhenFiltered }}\n </span>\n </span>\n </button>\n\n <fcom-modal\n [fullHeight]=\"(isFlightSelectionFiltersTestVariant$ | async) && (isMobile$ | async) === false\"\n [title]=\"modalTitle\"\n [(open)]=\"isModalOpen\"\n (close)=\"closeModal.emit()\"\n [buttons]=\"ModalButtons.CUSTOM\"\n >\n <ng-content select=\"[modal-content]\"></ng-content>\n <fcom-notification\n data-testid=\"fcom-filters-mobile-notification\"\n *ngIf=\"displayNotification\"\n messageBox\n [theme]=\"NotificationTheme.WARNING\"\n [layout]=\"NotificationLayout.EDGE_TO_EDGE\"\n [excludeColumns]=\"true\"\n [iconCategory]=\"IconLibrary.SVG_LIBRARY\"\n [iconName]=\"SvgLibraryIcon.INFO_BLOCK\"\n [compact]=\"true\"\n >\n <span> {{ notificationContent }}</span>\n </fcom-notification>\n <div buttons>\n <div class=\"flex flex--center flex--row-reverse grey-50-bg ps-medium rounded-bottom-large\">\n <fcom-button\n class=\"ms-small-l\"\n [text]=\"primaryFooterButtonTitle\"\n (clickBtn)=\"primaryFooterButtonClick.emit()\"\n ></fcom-button>\n <fcom-button\n [text]=\"secondaryFooterButtonTitle\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n (clickBtn)=\"secondaryFooterButtonClick.emit()\"\n ></fcom-button>\n </div>\n </div>\n </fcom-modal>\n </div>\n} @else {\n <div data-testid=\"fcom-filters-desktop\">\n <button\n class=\"filters-button flex flex--no-wrap rounded-medium ps-small-x font-body-1 white-bg border nordic-blue-400-border\"\n fcomPopover\n [options]=\"popoverOptions$ | async\"\n [content]=\"contentPopover\"\n [disabled]=\"disabled\"\n [ngClass]=\"{ 'has-filtering': hasFiltering }\"\n aria-controls=\"expandContainerId\"\n [id]=\"expandButtonId\"\n (click)=\"popoverOpeningClick.emit()\"\n (popoverClosed)=\"popoverClosed.emit()\"\n >\n <span class=\"ps-small-y\">{{ hasFiltering ? buttonTextWhenFiltered : buttonText }}</span>\n <span>{{ hasFiltering && numberToShowWhenFiltered ? '+' + numberToShowWhenFiltered : '' }}</span>\n <fcom-icon\n *ngIf=\"!disabled\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n class=\"rotate icon-small ms-xxsmall-l flex flex--self-center\"\n ></fcom-icon>\n </button>\n\n <ng-template #contentPopover>\n <div [attr.aria-labelledby]=\"expandButtonId\" id=\"expandContainerId\" class=\"flex flex--space-between ps-medium\">\n <h4 class=\"font-heading-5\">{{ headerText }}</h4>\n </div>\n <ng-content select=\"[popover-content]\"></ng-content>\n <div class=\"flex flex--row-reverse grey-50-bg ps-medium rounded-bottom-large\">\n <fcom-button\n class=\"ms-small-l\"\n [text]=\"primaryFooterButtonTitle\"\n (clickBtn)=\"primaryFooterButtonClick.emit()\"\n ></fcom-button>\n <fcom-button\n [text]=\"secondaryFooterButtonTitle\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n (clickBtn)=\"secondaryFooterButtonClick.emit()\"\n ></fcom-button>\n </div>\n </ng-template>\n </div>\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\nimport { Observable, map, of } from 'rxjs';\n\nimport { PopoverOptions } from '../popover/popover.interface';\nimport { PopoverPosition } from '../popover/popover.enum';\nimport { ButtonTheme } from '../buttons/button';\nimport { ModalButtons } from '../modal';\nimport { NotificationLayout, NotificationTheme } from '../../components/notifications';\n\n/**\n * A expandable area controllable via inputs.\n *\n * This only handles the expandable area and not the button to trigger this content area. This\n * should be done in a case-by-case basis.\n *\n * @example\n *\n * <code>\n * <pre>\n * <fcom-filters\n [hasFiltering]=\"hasFiltering\"\n [numberToShowWhenFiltered]=\"number\"\n [headerText]=\"headerText\"\n [buttonText]=\"buttonText\"\n [buttonTextWhenFiltered]=\"'Filtered'\"\n (primaryFooterButtonClick)=\"showResults()\"\n (secondaryFooterButtonClick)=\"showResults()\"\n * >\n * <div>\n * <p>Can have some static and non-interactable content...</p>\n * <fcom-checkbox [checked]=\"checked\" (change)=\"changeHandledInParentComponent()\">\n * <span class=\"font-body-1\">...but I understand that the point is to have interaction here</span>\n * </fcom-checkbox>\n * </div>\n * </fcom-filters>\n * </pre>\n * </code>\n */\n@Component({\n selector: 'fcom-filters',\n templateUrl: './filters.component.html',\n styleUrls: ['./filters.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FiltersComponent implements OnInit {\n readonly ButtonTheme = ButtonTheme;\n readonly IconLibrary = IconLibrary;\n readonly ModalButtons = ModalButtons;\n readonly NotificationTheme = NotificationTheme;\n readonly NotificationLayout = NotificationLayout;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n expandButtonId = uuid();\n\n @Input()\n disabled = false;\n\n @Input()\n buttonText: string;\n\n @Input()\n buttonTextWhenFiltered: string;\n\n @Input()\n headerText: string;\n\n @Input()\n hasFiltering = false;\n\n @Input()\n numberToShowWhenFiltered?: number;\n\n @Input()\n primaryFooterButtonTitle: string;\n\n @Input()\n modalTitle: string;\n\n @Input()\n notificationContent: string;\n\n @Input()\n isModalOpen: boolean;\n\n @Input()\n displayNotification: boolean;\n\n @Input()\n isMobile$: Observable<boolean>;\n\n @Input()\n popoverOptionsOverride$: Observable<Partial<PopoverOptions>> = of({});\n\n @Input()\n isFlightSelectionFiltersTestVariant$: Observable<boolean>;\n\n @Output()\n primaryFooterButtonClick: EventEmitter<void> = new EventEmitter();\n\n @Input()\n secondaryFooterButtonTitle: string;\n\n @Output()\n secondaryFooterButtonClick: EventEmitter<void> = new EventEmitter();\n\n @Output()\n popoverOpeningClick: EventEmitter<void> = new EventEmitter();\n\n @Output()\n showModal = new EventEmitter();\n\n @Output()\n closeModal = new EventEmitter();\n\n @Output()\n popoverClosed = new EventEmitter();\n\n popoverOptions$: Observable<PopoverOptions>;\n\n ngOnInit(): void {\n this.popoverOptions$ = this.popoverOptionsOverride$.pipe(\n map((override) => ({\n popoverID: `filters-popover-${this.expandButtonId}`,\n openByDefault: false,\n enableOnClick: true,\n showCloseButton: true,\n showArrowCaret: false,\n showLeftBorder: false,\n popoverPosition: PopoverPosition.BOTTOM,\n roundedCorners: true,\n hasPadding: false,\n ...override,\n }))\n );\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTarget, CmsTaxonomyGeneral } from '@fcom/core-api';\n\nimport { toLinkData } from '../../services';\n\n@Component({\n selector: 'cms-link-block',\n template: `\n <ng-container [ngSwitch]=\"linkType$ | async\">\n <fin-cta-big-link\n *ngSwitchCase=\"'cmstyle-arrow-link'\"\n [target$]=\"cmsTarget$\"\n [teaserTitle$]=\"content$ | finMap: 'teaserTitle'\"\n [teaserText$]=\"content$ | finMap: 'teaserText'\"\n [layout]=\"'xsmall'\"\n class=\"mr-xxsmall-b\"\n >\n </fin-cta-big-link>\n <fin-link-block\n class=\"mr-large-b block\"\n [class.align-center]=\"isCentered$ | async\"\n *ngSwitchDefault\n [target$]=\"cmsTarget$\"\n [teaserTitle$]=\"content$ | finMap: 'teaserTitle'\"\n [cmsTags$]=\"cmsTags$\"\n ></fin-link-block>\n </ng-container>\n `,\n})\nexport class CmsLinkBlockComponent implements OnInit {\n @Input()\n content$: Observable<any>;\n\n cmsTarget$: Observable<CmsTarget>;\n linkType$: Observable<string>;\n cmsTags$: Observable<Array<CmsTaxonomyGeneral | string>>;\n isCentered$: Observable<boolean>;\n\n ngOnInit(): void {\n this.cmsTarget$ = this.content$.pipe(map((d) => toLinkData(d.target)));\n\n this.cmsTags$ = this.content$.pipe(map((content) => content.subjectTaxonomyTags));\n\n this.linkType$ = this.cmsTags$.pipe(\n map((tags) =>\n tags.find((tag) => {\n return tag.startsWith('cmstyle-');\n })\n )\n );\n\n this.isCentered$ = this.cmsTags$.pipe(map((a) => a.includes(CmsTaxonomyGeneral.CENTERED)));\n }\n}\n","/* eslint-disable no-underscore-dangle */\nimport { createSelector } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { Step } from '@fcom/common/interfaces';\nimport { BookingFeatureState } from '@fcom/common/interfaces/booking';\n\nimport { bookingFeatureState } from './booking-feature-state.selector';\n\nconst _bookingState = createSelector(bookingFeatureState, (_bs: BookingFeatureState) => _bs?.booking);\n\nconst _bookingStep = createSelector(_bookingState, (_state) => _state?.step);\n\nexport const bookingStep = (): StateSelector<BookingFeatureState, Step> => safeSelect(_bookingStep);\n","import { createSelector } from '@ngrx/store';\n\nimport { BookingFeatureState } from '@fcom/common/interfaces/booking';\nimport { findCheapestMultiCityOffer } from '@fcom/common/utils/booking.utils';\nimport { ExtendedFareFamily } from '@fcom/common-booking/interfaces';\n\nimport { bookingFeatureState } from './booking-feature-state.selector';\n\nexport const selectMultiCity = createSelector(bookingFeatureState, (state: BookingFeatureState) => state.multiCity);\n\nexport const selectMultiCityOffers = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.offers\n);\n\nexport const selectMultiCityAmountOfBounds = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.offers?.[0]?.itinerary?.length\n);\n\nexport const selectMultiCitySelectedFareFamily = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.selectedFareFamily\n);\n\nexport const selectMultiCitySelectedItinerary = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.selectedItinerary\n);\n\nexport const selectMultiCitySelectedBounds = createSelector(bookingFeatureState, (state: BookingFeatureState) => {\n return state.multiCity.selectedItinerary.map((itineraryId) => {\n return state.multiCity.bounds[itineraryId];\n });\n});\n\nexport const selectMultiCitySelectedItineraryDetails = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => {\n return state.multiCity.selectedItinerary.map((itineraryId) => {\n return state.multiCity.bounds[itineraryId].itinerary;\n });\n }\n);\n\nexport const selectMultiCityAvailableFareFamilies = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => {\n const offers = state.multiCity;\n\n return Object.values(offers.fareFamilies)\n .map((fareFamily): ExtendedFareFamily => {\n const offersForFareFamily = offers.offers.filter((offer) => {\n return Object.values(offer.offerItems[0].fareFamilyCodePerBound)[0] === fareFamily.fareFamilyCode;\n });\n const cheapestPrice = findCheapestMultiCityOffer(offersForFareFamily);\n\n return {\n ...fareFamily,\n totalPrice: String(cheapestPrice.price),\n } as ExtendedFareFamily;\n })\n .sort((fareA, fareB) => {\n const order = offers.sorting?.fareFamilies || [];\n\n return order.indexOf(fareA.fareFamilyCode) - order.indexOf(fareB.fareFamilyCode);\n });\n }\n);\n\nexport const selectMultiCityStatus = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.status\n);\n\nexport const selectMultiCityRequestedMoreFlightOfferIds = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.requestedMoreFlightOfferIds\n);\n\nexport const selectMultiCityFareFamiliesPerCabin = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.fareFamiliesPerCabin\n);\n\nexport const selectMultiCityCurrency = createSelector(\n bookingFeatureState,\n (state: BookingFeatureState) => state.multiCity.currency\n);\n","import {\n Directive,\n Input,\n HostListener,\n ComponentFactoryResolver,\n ElementRef,\n Injector,\n ComponentRef,\n ApplicationRef,\n EmbeddedViewRef,\n EventEmitter,\n Output,\n OnInit,\n OnDestroy,\n TemplateRef,\n Renderer2,\n AfterViewInit,\n Inject,\n PLATFORM_ID,\n OnChanges,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { fromEvent, Subscription } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { v4 as uuid } from 'uuid';\n\nimport { stopPropagation, unsubscribe } from '@fcom/core/utils';\n\nimport { PopoverComponent } from '../component/popover.component';\nimport { PopoverData, PopoverOptions } from '../popover.interface';\nimport { PopoverService } from '../service/popover.service';\n\n@Directive({\n selector: '[fcomPopover]',\n})\nexport class PopoverDirective implements OnInit, OnDestroy, AfterViewInit, OnChanges {\n private cid = uuid();\n private _options: PopoverOptions;\n\n @Input()\n set options(value: PopoverOptions) {\n this._options = value;\n if (value && value.popoverID) {\n this.cid = value.popoverID;\n }\n }\n\n get options(): PopoverOptions {\n return {\n ...this._options,\n popoverID: this.cid,\n };\n }\n\n @Input()\n content: TemplateRef<ElementRef>;\n\n @Input()\n closeText: string;\n\n @Input()\n ariaCloseText: string;\n\n @Output()\n closeClick: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @Output()\n popoverClosed: EventEmitter<void> = new EventEmitter();\n\n private componentRef: ComponentRef<any>;\n private isPopoverDestroyed = true;\n private onContent = false;\n private subscriptions = new Subscription();\n\n @HostListener('click', ['$event'])\n onClick(clickEvent: Event): void {\n if (this.options && this.options.enableOnClick) {\n if (this.options.enableStopPropagation) {\n stopPropagation(clickEvent);\n }\n this.togglePopover();\n }\n }\n\n @HostListener('focusin')\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.options && this.options.enableOnHover && this.isPopoverDestroyed) {\n this.createPopover();\n }\n }\n\n @HostListener('focusout')\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.options && this.options.enableOnHover && !this.isPopoverDestroyed) {\n setTimeout(() => {\n if (!this.onContent) {\n this.destroyPopover();\n }\n }, 10);\n }\n }\n\n @HostListener('document:keydown.escape')\n onKeydownHandler(): void {\n this.tryDestroyPopover(true);\n }\n\n // Prevents triggering behaviour of focused element in the popover when pressing enter\n @HostListener('keydown.enter', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (this.options && this.options.enableOnClick) {\n event.preventDefault();\n this.createPopover({ focusReady: false });\n }\n }\n\n @HostListener('keyup.enter', ['$event'])\n onKeyup(): void {\n if (this.isPopoverDestroyed === false) {\n this.componentRef.instance.focusReady$.next(true);\n }\n }\n\n constructor(\n private readonly triggerRef: ElementRef,\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n private readonly injector: Injector,\n private readonly appRef: ApplicationRef,\n private readonly renderer: Renderer2,\n private readonly popoverService: PopoverService,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnDestroy(): void {\n this.destroyPopover();\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n ngOnInit(): void {\n if (!this.options || (!this.options.enableOnClick && !this.options.enableOnHover && !this.options.openByDefault)) {\n this.options = Object.assign({}, this.options, { enableOnClick: true });\n }\n if (this.options && this.options.enableOnClick) {\n this.renderer.setAttribute(this.triggerRef.nativeElement, 'aria-expanded', 'false');\n this.renderer.setAttribute(this.triggerRef.nativeElement, 'aria-controls', this.cid);\n } else if (this.options && this.options.enableOnHover) {\n this.renderer.setAttribute(this.triggerRef.nativeElement, 'aria-describedby', this.cid);\n }\n }\n\n ngAfterViewInit(): void {\n if (this.options.openByDefault) {\n this.createPopover();\n }\n }\n\n updatePopoverData(): void {\n if (!this.componentRef?.instance) {\n return;\n }\n\n this.componentRef.instance.popoverData = {\n content: this.content,\n closeText: this.closeText,\n ariaCloseText: this.ariaCloseText,\n } as PopoverData;\n\n this.componentRef.instance.popoverOptions = this.options;\n this.subscriptions.add(\n this.componentRef.instance.closeClick.pipe(take(1)).subscribe((closeClick: boolean) => {\n this.closeClick.emit(closeClick);\n this.destroyPopover(true);\n })\n );\n }\n\n private appendComponentToElement(component: any, focusReady: boolean): void {\n if (this.isPopoverDestroyed === false) {\n return;\n }\n\n this.componentRef = this.componentFactoryResolver.resolveComponentFactory(component).create(this.injector);\n this.componentRef.instance.mouseOnContent.subscribe((onContent: boolean) => {\n this.onContent = onContent;\n });\n\n this.componentRef.instance.focusReady$?.next(focusReady);\n this.componentRef.instance.triggerRef = this.triggerRef;\n this.updatePopoverData();\n this.appRef.attachView(this.componentRef.hostView);\n const domElem = (this.componentRef.hostView as EmbeddedViewRef<unknown>).rootNodes[0] as HTMLElement;\n\n if (this.options && this.options.enableOnHover) {\n domElem.setAttribute('aria-hidden', 'true');\n }\n this.renderer.appendChild(document.body, domElem);\n }\n\n ngOnChanges(): void {\n this.updatePopoverData();\n\n if (this.componentRef) {\n this.componentRef.instance?.changeDetectorRef?.detectChanges();\n }\n }\n\n createPopover({ focusReady } = { focusReady: true }): void {\n this.popoverService.open(this);\n if (this.options && this.options.enableOnClick) {\n this.renderer.setAttribute(this.triggerRef.nativeElement, 'aria-expanded', 'true');\n this.triggerRef.nativeElement.classList.add('popover-open');\n }\n this.appendComponentToElement(PopoverComponent, focusReady);\n this.addScrollListener();\n this.isPopoverDestroyed = false;\n }\n\n addScrollListener(): void {\n if (this.options.closeOnScroll && !isPlatformServer(this.platform)) {\n this.subscriptions.add(\n fromEvent(window, 'scroll')\n .pipe(\n filter(() => {\n return !this.isPopoverDestroyed;\n }),\n take(1)\n )\n .subscribe(() => this.tryDestroyPopover())\n );\n }\n }\n\n togglePopover(): void {\n if (!this.componentRef || this.isPopoverDestroyed) {\n this.createPopover();\n } else if (!this.isPopoverDestroyed) {\n this.destroyPopover(true);\n }\n }\n\n private tryDestroyPopover(shouldFocusOnHost = false): void {\n if (!this.isPopoverDestroyed) {\n this.destroyPopover(shouldFocusOnHost);\n }\n }\n\n destroyPopover(shouldFocusOnHost = false): void {\n if (this.isPopoverDestroyed) {\n return;\n }\n\n if (this.options && this.options.enableOnClick) {\n if (shouldFocusOnHost) {\n this.triggerRef.nativeElement.focus();\n }\n this.renderer.setAttribute(this.triggerRef.nativeElement, 'aria-expanded', 'false');\n this.triggerRef.nativeElement.classList.remove('popover-open');\n }\n\n const domElem = (this.componentRef.hostView as EmbeddedViewRef<unknown>).rootNodes[0] as HTMLElement;\n if (!document.body.contains(domElem)) {\n return;\n }\n document.body.removeChild(domElem);\n\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.popoverService.close();\n this.popoverClosed.emit();\n this.isPopoverDestroyed = true;\n }\n}\n","import { RootPaths } from '@fcom/core/constants';\n\nimport { OndLinkTranslations, OndMarketingRoutesPath, OndPairEnhanced } from '../interfaces';\nimport { encodeIgnoredSEOTitle } from './utils';\n\nexport const createFromCityLink = (\n language: string,\n city: string,\n linkTranslations: OndLinkTranslations,\n ondPair: OndPairEnhanced\n): string => {\n return `\n /${language}\n /${RootPaths.OND_MARKETING_LANDING_ROOT}\n /${OndMarketingRoutesPath.FROM}\n /${city.toLowerCase()}\n /${encodeIgnoredSEOTitle(linkTranslations.from.replace('{origin}', ondPair.originCityName))}\n `.replace(/\\s/g, '');\n};\n\nexport const createFromCountryLink = (\n language: string,\n country: string,\n countryName: string,\n linkTranslations: OndLinkTranslations\n): string => {\n return `\n /${language}\n /${RootPaths.OND_MARKETING_LANDING_ROOT}\n /${OndMarketingRoutesPath.FROM_COUNTRY}\n /${country}\n /${encodeIgnoredSEOTitle(linkTranslations.from.replace('{origin}', countryName))}\n `.replace(/\\s/g, '');\n};\n\nexport const createCityToCityLink = (\n language: string,\n origin: string,\n destination: string,\n linkTranslations: OndLinkTranslations,\n pair: OndPairEnhanced\n): string => {\n return `\n /${language}\n /${RootPaths.OND_MARKETING_LANDING_ROOT}\n /${OndMarketingRoutesPath.CITY_TO_CITY}\n /${origin.toLowerCase()}\n /${destination.toLowerCase()}\n /${encodeIgnoredSEOTitle(\n linkTranslations.fromTo.replace('{origin}', pair.originCityName).replace('{destination}', pair.destinationCityName)\n )}\n `.replace(/\\s/g, '');\n};\n\nexport const createCountryToCountryLink = (\n language: string,\n origin: string,\n destination: string,\n linkTranslations: OndLinkTranslations,\n pair: OndPairEnhanced\n): string => {\n return `\n /${language}\n /${RootPaths.OND_MARKETING_LANDING_ROOT}\n /${OndMarketingRoutesPath.COUNTRY_TO_COUNTRY}\n /${origin}\n /${destination}\n /${encodeIgnoredSEOTitle(\n linkTranslations.fromTo\n .replace('{origin}', pair.originCountryName)\n .replace('{destination}', pair.destinationCountryName)\n )}\n `.replace(/\\s/g, '');\n};\n","<div *ngIf=\"ondPageType === ondPageTypes.LANDING\" [ngSwitch]=\"route[0].path\">\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.CITY_TO_CITY\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\">\n {{ 'ondMarketing.popularRoutesHeading' | finLocalization }}\n </h2>\n\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div class=\"ond-marketing-crosslinking-tile flex flex--column\">\n <a\n *ngIf=\"fromLink$ | async as fromLink\"\n [finLink]=\"fromLink.link\"\n class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\"\n >\n {{ 'ondMarketing.crossLinking.from' | finLocalization: { city: fromLink.locationName } }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.FROM\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\">\n {{ 'ondMarketing.exploreRoutesHeading' | finLocalization }}\n </h2>\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div\n *ngFor=\"let link of ondLinks$ | async | slice: 0 : linkListSliceSize\"\n class=\"ond-marketing-crosslinking-tile flex-1 flex--column\"\n >\n <a [finLink]=\"link.link\" class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\">\n {{ link.originCityName }} -\n {{ link.destinationCityName }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.FROM_COUNTRY\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\">\n {{ 'ondMarketing.exploreRoutesHeading' | finLocalization }}\n </h2>\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div\n *ngFor=\"let link of ondLinks$ | async | slice: 0 : linkListSliceSize\"\n class=\"ond-marketing-crosslinking-tile flex-1 flex--column\"\n >\n <a [finLink]=\"link.link\" class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\">\n {{ link.originCountryName }} -\n {{ link.destinationCountryName }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.COUNTRY_TO_COUNTRY\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\">\n {{ 'ondMarketing.popularRoutesHeading' | finLocalization }}\n </h2>\n\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div class=\"ond-marketing-crosslinking-tile flex flex--column\">\n <a\n *ngIf=\"fromCountry$ | async as fromCountry\"\n [finLink]=\"fromCountry.link\"\n class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\"\n >\n {{ 'ondMarketing.crossLinking.from' | finLocalization: { city: fromCountry.locationName } }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchDefault>\n <ng-container *ngIf=\"(ondLinks$ | async)?.length\">\n <h2 class=\"mr-small-b font-heading-3 nordic-blue-900-text\">\n {{ 'ondMarketing.exploreRoutesHeading' | finLocalization }}\n </h2>\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div\n *ngFor=\"let link of ondLinks$ | async | slice: 0 : linkListSliceSize\"\n class=\"ond-marketing-crosslinking-tile flex-1 flex--column\"\n >\n <a [finLink]=\"link.link\" class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\">\n {{ link.originCityName }} -\n {{ link.destinationCityName }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </ng-container>\n </div>\n</div>\n\n<div *ngIf=\"ondPageType === ondPageTypes.LISTING\" [ngSwitch]=\"route[0].path\">\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.CITY_TO_CITY\">\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div *ngFor=\"let link of ondLinks$ | async\" class=\"ond-marketing-crosslinking-tile flex-1 flex--column\">\n <a [finLink]=\"link.link\" class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\">\n {{ link.originCityName }} -\n {{ link.destinationCityName }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.FROM_COUNTRY\">\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div *ngIf=\"fromCountry$ | async as fromCountry\" class=\"ond-marketing-crosslinking-tile flex flex--column\">\n <a\n *ngIf=\"fromCountry.link\"\n [finLink]=\"fromCountry.link\"\n class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\"\n >\n {{ 'ondMarketing.crossLinking.from' | finLocalization: { city: fromCountry.locationName } }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.COUNTRY_TO_COUNTRY\">\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div *ngFor=\"let link of ondLinks$ | async\" class=\"ond-marketing-crosslinking-tile flex-1 flex--column\">\n <a [finLink]=\"link.link\" class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\">\n {{ link.originCountryName }} -\n {{ link.destinationCountryName }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n\n <div class=\"mr-large-y\" *ngSwitchCase=\"ondMarketingRoutesPath.FROM\">\n <div class=\"ond-marketing-crosslinking grid-col-12\">\n <div *ngFor=\"let link of ondLinks$ | async\" class=\"ond-marketing-crosslinking-tile flex-1 flex--column\">\n <a [finLink]=\"link.link\" class=\"bold-type font-body-1 nordic-blue-900-text no-underline underline-hover\">\n {{ 'ondMarketing.crossLinking.from' | finLocalization: { city: link.originCityName } }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon>\n </a>\n </div>\n </div>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { UrlSegment } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { uniqueBy, valuesOf } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\n\nimport { getCurrentCountry, OND_LINK_LIST_SLICE_SIZE } from '../services/utils';\nimport {\n createCityToCityLink,\n createCountryToCountryLink,\n createFromCityLink,\n createFromCountryLink,\n} from '../services/link-utils';\nimport {\n OndLink,\n OndLinkObject,\n OndLinkTranslations,\n OndMarketingRoutesPath,\n OndPageType,\n OndPairEnhanced,\n OndPairEnhancedResponse,\n} from '../interfaces/';\n\nconst byCityName = (a: OndPairEnhanced, b: OndPairEnhanced) => {\n if (a.originCityName === b.originCityName) {\n return a.destinationCityName < b.destinationCityName ? -1 : a.destinationCityName > b.destinationCityName ? 1 : 0;\n } else {\n return a.originCityName < b.originCityName ? -1 : 1;\n }\n};\n\nconst byCountryName = (a: OndPairEnhanced, b: OndPairEnhanced) => {\n if (a.originCountryName === b.originCountryName) {\n return a.destinationCountryName < b.destinationCountryName\n ? -1\n : a.destinationCountryName > b.destinationCountryName\n ? 1\n : 0;\n } else {\n return a.originCountryName < b.originCountryName ? -1 : 1;\n }\n};\n\n@Component({\n selector: 'fin-ond-marketing-cross-linking',\n templateUrl: './ond-marketing-cross-linking.component.html',\n styleUrls: ['./ond-marketing-cross-linking.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OndMarketingCrossLinkingComponent implements OnInit {\n readonly ondMarketingRoutesPath = OndMarketingRoutesPath;\n readonly ondPageTypes = OndPageType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n route: UrlSegment[];\n @Input()\n links$: Observable<OndPairEnhancedResponse>;\n @Input()\n ondPageType: OndPageType;\n\n ondLinks$: Observable<OndLink[]>;\n fromLink$: Observable<OndLinkObject>;\n fromCountry$: Observable<OndLinkObject>;\n linkListSliceSize: number = OND_LINK_LIST_SLICE_SIZE;\n\n constructor(private languageService: LanguageService) {}\n\n ngOnInit(): void {\n const linkTranslations$ = this.languageService.translateMultiple([\n 'ondMarketing.seoUrl.to',\n 'ondMarketing.seoUrl.from',\n 'ondMarketing.seoUrl.fromTo',\n ]);\n\n const linksAndTranslations$ = combineLatest([this.links$, linkTranslations$]);\n\n this.fromLink$ = linksAndTranslations$.pipe(\n map(([ondPairs, translations]) => {\n const linkTranslations = this.handleLinkTranslations(translations);\n\n const locationCode = this.route[1].path.toUpperCase();\n const ondFromLocationCode = valuesOf(ondPairs).find((pair) => pair.origin === locationCode);\n\n const locationName =\n this.route.some((route) => route.path === OndMarketingRoutesPath.CITY_TO_CITY) &&\n this.route.length > 1 &&\n ondFromLocationCode\n ? ondFromLocationCode.originCityName || ondFromLocationCode.originCountryName\n : '';\n const link =\n this.ondPageType === OndPageType.LANDING && this.route.length > 1\n ? createFromCityLink(this.languageService.langValue, locationCode, linkTranslations, ondFromLocationCode)\n : '';\n\n return { link, locationName };\n })\n );\n\n this.fromCountry$ = linksAndTranslations$.pipe(\n map(([ondPairs, translations]) => {\n const linkTranslations = this.handleLinkTranslations(translations);\n\n const countryCode =\n this.ondPageType === OndPageType.LANDING\n ? this.route[1].path\n : getCurrentCountry(this.languageService.langValue);\n\n const countryName =\n valuesOf(ondPairs).find((pair) => pair.originCountry === countryCode)?.originCountryName ?? '';\n\n return {\n countryCode,\n link: createFromCountryLink(this.languageService.langValue, countryCode, countryName, linkTranslations),\n locationName: countryName,\n };\n })\n );\n\n this.ondLinks$ = linksAndTranslations$.pipe(\n map(([ondPairs, translations]) => {\n const linkTranslations = this.handleLinkTranslations(translations);\n if (this.shouldCreateCountryToCountryLinks()) {\n return this.createCountryToCountryLinks(ondPairs, linkTranslations);\n } else if (\n this.ondPageType === OndPageType.LISTING &&\n this.route.some((route) => route.path === OndMarketingRoutesPath.FROM)\n ) {\n return this.createFromCityLinks(ondPairs, linkTranslations);\n } else {\n return this.createCityToCityLinks(ondPairs, linkTranslations);\n }\n }),\n finShare()\n );\n }\n\n private shouldCreateCountryToCountryLinks(): boolean {\n return (\n (this.links$ && this.route.some((route) => route.path === OndMarketingRoutesPath.FROM_COUNTRY)) ||\n (this.ondPageType === OndPageType.LISTING &&\n this.route.some((route) => route.path === OndMarketingRoutesPath.COUNTRY_TO_COUNTRY))\n );\n }\n\n private createCountryToCountryLinks(\n ondPairs: OndPairEnhancedResponse,\n linkTranslations: OndLinkTranslations\n ): OndLink[] {\n const pairsToUse =\n this.ondPageType === OndPageType.LISTING ? valuesOf(ondPairs).sort(byCountryName) : valuesOf(ondPairs);\n\n return pairsToUse\n .map((ondPair) => ({\n destination: ondPair.destinationCountry,\n origin: ondPair.originCountry,\n link: createCountryToCountryLink(\n this.languageService.langValue,\n ondPair.originCountry,\n ondPair.destinationCountry,\n linkTranslations,\n ondPair\n ),\n originCityName: ondPair.originCityName,\n originCountryName: ondPair.originCountryName,\n destinationCityName: ondPair.destinationCityName,\n destinationCountryName: ondPair.destinationCountryName,\n }))\n .filter(uniqueBy((pair) => pair.originCountryName + pair.destinationCountryName))\n .filter((pair) => pair.origin !== pair.destination);\n }\n\n private createFromCityLinks(ondPairs: OndPairEnhancedResponse, linkTranslations: OndLinkTranslations): OndLink[] {\n const pairsToUse =\n this.ondPageType === OndPageType.LISTING ? valuesOf(ondPairs).sort(byCityName) : valuesOf(ondPairs);\n\n return pairsToUse\n .map((ondPair) => ({\n origin: ondPair.origin,\n link: createFromCityLink(this.languageService.langValue, ondPair.origin, linkTranslations, ondPair),\n originCityName: ondPair.originCityName,\n originCountryName: ondPair.originCountryName,\n destinationCityName: ondPair.destinationCityName,\n destinationCountryName: ondPair.destinationCountryName,\n }))\n .filter(uniqueBy((pair) => pair.origin));\n }\n\n private createCityToCityLinks(ondPairs: OndPairEnhancedResponse, linkTranslations: OndLinkTranslations): OndLink[] {\n const pairsToUse =\n this.ondPageType === OndPageType.LISTING ? valuesOf(ondPairs).sort(byCityName) : valuesOf(ondPairs);\n return pairsToUse.map((ondPair) => ({\n origin: ondPair.origin,\n destination: ondPair.destination,\n link: createCityToCityLink(\n this.languageService.langValue,\n ondPair.origin,\n ondPair.destination,\n linkTranslations,\n ondPair\n ),\n originCityName: ondPair.originCityName,\n originCountryName: ondPair.originCountryName,\n destinationCityName: ondPair.destinationCityName,\n destinationCountryName: ondPair.destinationCountryName,\n }));\n }\n\n private handleLinkTranslations([to, from, fromTo]: string[]): OndLinkTranslations {\n return {\n to,\n from,\n fromTo,\n };\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { share, map } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\n\nimport { combineTemplate } from '@fcom/rx';\nimport { Amount } from '@fcom/dapi';\n\nimport { Offer } from '../../interfaces';\n\n// TODO: is this component really used? Should we remove it\n@Component({\n selector: 'fin-offer-details',\n templateUrl: './offer-details.component.html',\n})\nexport class OfferDetailsComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n offer: Offer;\n @Input()\n currencyCode$: Observable<string>;\n @Input()\n language$: Observable<string>;\n\n linkUrl$: Observable<string>;\n price$: Observable<Amount>;\n\n constructor(private router: Router) {}\n\n ngOnInit(): void {\n this.price$ = combineTemplate<Amount>({\n amount: this.offer.price.toString(),\n currencyCode: this.currencyCode$,\n }).pipe(share());\n\n this.linkUrl$ = this.language$.pipe(\n map((lang) => {\n return `/${lang}/booking?destination=${this.offer.iata}`;\n }),\n share()\n );\n }\n\n navigate(event: Event): void {\n event.preventDefault();\n this.router.navigateByUrl((event.currentTarget as HTMLAnchorElement).pathname);\n }\n}\n","<a class=\"pr-xxsmall-y cf\" [finLink]=\"linkUrl$\" (click)=\"navigate($event)\">\n <span class=\"float-left nordic-blue-900-text\">{{ offer.name }}</span>\n <span class=\"float-right heather-700-text bold-type\"\n >{{ price$ | async | finPrice }}\n <fcom-icon class=\"nordic-blue-900-text mr-xxsmall-l icon-medium\" [name]=\"SvgLibraryIcon.ARROW_RIGHT\"></fcom-icon\n ></span>\n</a>\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.dev/license\n */\n\nimport {ɵDomAdapter as DomAdapter} from '@angular/common';\n\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport abstract class GenericBrowserDomAdapter extends DomAdapter {\n override readonly supportsDOMEvents: boolean = true;\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.dev/license\n */\n\nimport {\n ɵparseCookieValue as parseCookieValue,\n ɵsetRootDomAdapter as setRootDomAdapter,\n} from '@angular/common';\n\nimport {GenericBrowserDomAdapter} from './generic_browser_adapter';\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nexport class BrowserDomAdapter extends GenericBrowserDomAdapter {\n static makeCurrent() {\n setRootDomAdapter(new BrowserDomAdapter());\n }\n\n override onAndCancel(el: Node, evt: any, listener: any): Function {\n el.addEventListener(evt, listener);\n return () => {\n el.removeEventListener(evt, listener);\n };\n }\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n }\n override remove(node: Node): void {\n (node as Element | Text | Comment).remove();\n }\n override createElement(tagName: string, doc?: Document): HTMLElement {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n }\n override createHtmlDocument(): Document {\n return document.implementation.createHTMLDocument('fakeTitle');\n }\n override getDefaultDocument(): Document {\n return document;\n }\n\n override isElementNode(node: Node): boolean {\n return node.nodeType === Node.ELEMENT_NODE;\n }\n\n override isShadowRoot(node: any): boolean {\n return node instanceof DocumentFragment;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n override getBaseHref(doc: Document): string | null {\n const href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n }\n override resetBaseElement(): void {\n baseElement = null;\n }\n override getUserAgent(): string {\n return window.navigator.userAgent;\n }\n override getCookie(name: string): string | null {\n return parseCookieValue(document.cookie, name);\n }\n}\n\nlet baseElement: HTMLElement | null = null;\nfunction getBaseElementHref(): string | null {\n baseElement = baseElement || document.querySelector('base');\n return baseElement ? baseElement.getAttribute('href') : null;\n}\n\nfunction relativePath(url: string): string {\n // The base URL doesn't really matter, we just need it so relative paths have something\n // to resolve against. In the browser `HTMLBaseElement.href` is always absolute.\n return new URL(url, document.baseURI).pathname;\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.dev/license\n */\n\nimport {XhrFactory} from '@angular/common';\nimport {Injectable} from '@angular/core';\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\n@Injectable()\nexport class BrowserXhr implements XhrFactory {\n build(): XMLHttpRequest {\n return new XMLHttpRequest();\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.dev/license\n */\n\nimport {\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../../errors';\n\n/**\n * The injection token for plugins of the `EventManager` service.\n *\n * @publicApi\n */\nexport const EVENT_MANAGER_PLUGINS = new InjectionToken<EventManagerPlugin[]>(\n ngDevMode ? 'EventManagerPlugins' : '',\n);\n\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\n@Injectable()\nexport class EventManager {\n private _plugins: EventManagerPlugin[];\n private _eventNameToPlugin = new Map<string, EventManagerPlugin>();\n\n /**\n * Initializes an instance of the event-manager service.\n */\n constructor(\n @Inject(EVENT_MANAGER_PLUGINS) plugins: EventManagerPlugin[],\n private _zone: NgZone,\n ) {\n plugins.forEach((plugin) => {\n plugin.manager = this;\n });\n this._plugins = plugins.slice().reverse();\n }\n\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n const plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n }\n\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n getZone(): NgZone {\n return this._zone;\n }\n\n /** @internal */\n _findPluginFor(eventName: string): EventManagerPlugin {\n let plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n\n const plugins = this._plugins;\n plugin = plugins.find((plugin) => plugin.supports(eventName));\n if (!plugin) {\n throw new RuntimeError(\n RuntimeErrorCode.NO_PLUGIN_FOR_EVENT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `No event manager plugin found for event ${eventName}`,\n );\n }\n\n this._eventNameToPlugin.set(eventName, plugin);\n return plugin;\n }\n}\n\n/**\n * The plugin definition for the `EventManager` class\n *\n * It can be used as a base class to create custom manager plugins, i.e. you can create your own\n * class that extends the `EventManagerPlugin` one.\n *\n * @publicApi\n */\nexport abstract class EventManagerPlugin {\n // TODO: remove (has some usage in G3)\n constructor(private _doc: any) {}\n\n // Using non-null assertion because it's set by EventManager's constructor\n manager!: EventManager;\n\n /**\n * Should return `true` for every event name that should be supported by this plugin\n */\n abstract supports(eventName: string): boolean;\n\n /**\n * Implement the behaviour for the supported events\n */\n abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;\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.dev/license\n */\n\nimport {DOCUMENT, isPlatformServer} from '@angular/common';\nimport {\n APP_ID,\n CSP_NONCE,\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n PLATFORM_ID,\n} from '@angular/core';\n\n/** The style elements attribute name used to set value of `APP_ID` token. */\nconst APP_ID_ATTRIBUTE_NAME = 'ng-app-id';\n\n@Injectable()\nexport class SharedStylesHost implements OnDestroy {\n // Maps all registered host nodes to a list of style nodes that have been added to the host node.\n private readonly styleRef = new Map<\n string /** Style string */,\n {\n elements: HTMLStyleElement[];\n usage: number;\n }\n >();\n private readonly hostNodes = new Set<Node>();\n private readonly styleNodesInDOM: Map<string, HTMLStyleElement> | null;\n private readonly platformIsServer: boolean;\n\n constructor(\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(APP_ID) private readonly appId: string,\n @Inject(CSP_NONCE) @Optional() private nonce?: string | null,\n @Inject(PLATFORM_ID) readonly platformId: object = {},\n ) {\n this.styleNodesInDOM = this.collectServerRenderedStyles();\n this.platformIsServer = isPlatformServer(platformId);\n this.resetHostNodes();\n }\n\n addStyles(styles: string[]): void {\n for (const style of styles) {\n const usageCount = this.changeUsageCount(style, 1);\n\n if (usageCount === 1) {\n this.onStyleAdded(style);\n }\n }\n }\n\n removeStyles(styles: string[]): void {\n for (const style of styles) {\n const usageCount = this.changeUsageCount(style, -1);\n\n if (usageCount <= 0) {\n this.onStyleRemoved(style);\n }\n }\n }\n\n ngOnDestroy(): void {\n const styleNodesInDOM = this.styleNodesInDOM;\n if (styleNodesInDOM) {\n styleNodesInDOM.forEach((node) => node.remove());\n styleNodesInDOM.clear();\n }\n\n for (const style of this.getAllStyles()) {\n this.onStyleRemoved(style);\n }\n\n this.resetHostNodes();\n }\n\n addHost(hostNode: Node): void {\n this.hostNodes.add(hostNode);\n\n for (const style of this.getAllStyles()) {\n this.addStyleToHost(hostNode, style);\n }\n }\n\n removeHost(hostNode: Node): void {\n this.hostNodes.delete(hostNode);\n }\n\n private getAllStyles(): IterableIterator<string> {\n return this.styleRef.keys();\n }\n\n private onStyleAdded(style: string): void {\n for (const host of this.hostNodes) {\n this.addStyleToHost(host, style);\n }\n }\n\n private onStyleRemoved(style: string): void {\n const styleRef = this.styleRef;\n styleRef.get(style)?.elements?.forEach((node) => node.remove());\n styleRef.delete(style);\n }\n\n private collectServerRenderedStyles(): Map<string, HTMLStyleElement> | null {\n const styles = this.doc.head?.querySelectorAll<HTMLStyleElement>(\n `style[${APP_ID_ATTRIBUTE_NAME}=\"${this.appId}\"]`,\n );\n\n if (styles?.length) {\n const styleMap = new Map<string, HTMLStyleElement>();\n\n styles.forEach((style) => {\n if (style.textContent != null) {\n styleMap.set(style.textContent, style);\n }\n });\n\n return styleMap;\n }\n\n return null;\n }\n\n private changeUsageCount(style: string, delta: number): number {\n const map = this.styleRef;\n if (map.has(style)) {\n const styleRefValue = map.get(style)!;\n styleRefValue.usage += delta;\n\n return styleRefValue.usage;\n }\n\n map.set(style, {usage: delta, elements: []});\n return delta;\n }\n\n private getStyleElement(host: Node, style: string): HTMLStyleElement {\n const styleNodesInDOM = this.styleNodesInDOM;\n const styleEl = styleNodesInDOM?.get(style);\n if (styleEl?.parentNode === host) {\n // `styleNodesInDOM` cannot be undefined due to the above `styleNodesInDOM?.get`.\n styleNodesInDOM!.delete(style);\n\n styleEl.removeAttribute(APP_ID_ATTRIBUTE_NAME);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // This attribute is solely used for debugging purposes.\n styleEl.setAttribute('ng-style-reused', '');\n }\n\n return styleEl;\n } else {\n const styleEl = this.doc.createElement('style');\n\n if (this.nonce) {\n styleEl.setAttribute('nonce', this.nonce);\n }\n\n styleEl.textContent = style;\n\n if (this.platformIsServer) {\n styleEl.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);\n }\n\n host.appendChild(styleEl);\n\n return styleEl;\n }\n }\n\n private addStyleToHost(host: Node, style: string): void {\n const styleEl = this.getStyleElement(host, style);\n const styleRef = this.styleRef;\n const styleElRef = styleRef.get(style)?.elements;\n if (styleElRef) {\n styleElRef.push(styleEl);\n } else {\n styleRef.set(style, {elements: [styleEl], usage: 1});\n }\n }\n\n private resetHostNodes(): void {\n const hostNodes = this.hostNodes;\n hostNodes.clear();\n // Re-add the head element back since this is the default host.\n hostNodes.add(this.doc.head);\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.dev/license\n */\n\nimport {DOCUMENT, isPlatformServer, ɵgetDOM as getDOM} from '@angular/common';\nimport {\n APP_ID,\n CSP_NONCE,\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ViewEncapsulation,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nimport {EventManager} from './events/event_manager';\nimport {SharedStylesHost} from './shared_styles_host';\n\nexport const NAMESPACE_URIS: {[ns: string]: string} = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n 'math': 'http://www.w3.org/1998/Math/MathML',\n};\n\nconst COMPONENT_REGEX = /%COMP%/g;\n\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;\n\n/**\n * A DI token that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `true`.\n * @publicApi\n */\nexport const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken<boolean>(\n ngDevMode ? 'RemoveStylesOnCompDestroy' : '',\n {\n providedIn: 'root',\n factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,\n },\n);\n\nexport function shimContentAttribute(componentShortId: string): string {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimHostAttribute(componentShortId: string): string {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimStylesContent(compId: string, styles: string[]): string[] {\n return styles.map((s) => s.replace(COMPONENT_REGEX, compId));\n}\n\n@Injectable()\nexport class DomRendererFactory2 implements RendererFactory2, OnDestroy {\n private readonly rendererByCompId = new Map<\n string,\n EmulatedEncapsulationDomRenderer2 | NoneEncapsulationDomRenderer\n >();\n private readonly defaultRenderer: Renderer2;\n private readonly platformIsServer: boolean;\n\n constructor(\n private readonly eventManager: EventManager,\n private readonly sharedStylesHost: SharedStylesHost,\n @Inject(APP_ID) private readonly appId: string,\n @Inject(REMOVE_STYLES_ON_COMPONENT_DESTROY) private removeStylesOnCompDestroy: boolean,\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(PLATFORM_ID) readonly platformId: Object,\n readonly ngZone: NgZone,\n @Inject(CSP_NONCE) private readonly nonce: string | null = null,\n ) {\n this.platformIsServer = isPlatformServer(platformId);\n this.defaultRenderer = new DefaultDomRenderer2(\n eventManager,\n doc,\n ngZone,\n this.platformIsServer,\n );\n }\n\n createRenderer(element: any, type: RendererType2 | null): Renderer2 {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n\n if (this.platformIsServer && type.encapsulation === ViewEncapsulation.ShadowDom) {\n // Domino does not support shadow DOM.\n type = {...type, encapsulation: ViewEncapsulation.Emulated};\n }\n\n const renderer = this.getOrCreateRenderer(element, type);\n // Renderers have different logic due to different encapsulation behaviours.\n // Ex: for emulated, an attribute is added to the element.\n if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n renderer.applyToHost(element);\n } else if (renderer instanceof NoneEncapsulationDomRenderer) {\n renderer.applyStyles();\n }\n\n return renderer;\n }\n\n private getOrCreateRenderer(element: any, type: RendererType2): Renderer2 {\n const rendererByCompId = this.rendererByCompId;\n let renderer = rendererByCompId.get(type.id);\n\n if (!renderer) {\n const doc = this.doc;\n const ngZone = this.ngZone;\n const eventManager = this.eventManager;\n const sharedStylesHost = this.sharedStylesHost;\n const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;\n const platformIsServer = this.platformIsServer;\n\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated:\n renderer = new EmulatedEncapsulationDomRenderer2(\n eventManager,\n sharedStylesHost,\n type,\n this.appId,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n );\n break;\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(\n eventManager,\n sharedStylesHost,\n element,\n type,\n doc,\n ngZone,\n this.nonce,\n platformIsServer,\n );\n default:\n renderer = new NoneEncapsulationDomRenderer(\n eventManager,\n sharedStylesHost,\n type,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n );\n break;\n }\n\n rendererByCompId.set(type.id, renderer);\n }\n\n return renderer;\n }\n\n ngOnDestroy() {\n this.rendererByCompId.clear();\n }\n}\n\nclass DefaultDomRenderer2 implements Renderer2 {\n data: {[key: string]: any} = Object.create(null);\n\n /**\n * By default this renderer throws when encountering synthetic properties\n * This can be disabled for example by the AsyncAnimationRendererFactory\n */\n throwOnSyntheticProps = true;\n\n constructor(\n private readonly eventManager: EventManager,\n private readonly doc: Document,\n private readonly ngZone: NgZone,\n private readonly platformIsServer: boolean,\n ) {}\n\n destroy(): void {}\n\n destroyNode = null;\n\n createElement(name: string, namespace?: string): any {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\n return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n\n return this.doc.createElement(name);\n }\n\n createComment(value: string): any {\n return this.doc.createComment(value);\n }\n\n createText(value: string): any {\n return this.doc.createTextNode(value);\n }\n\n appendChild(parent: any, newChild: any): void {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any): void {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.insertBefore(newChild, refChild);\n }\n }\n\n removeChild(_parent: any, oldChild: any): void {\n oldChild.remove();\n }\n\n selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any {\n let el: any =\n typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode;\n if (!el) {\n throw new RuntimeError(\n RuntimeErrorCode.ROOT_NODE_NOT_FOUND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `The selector \"${selectorOrNode}\" did not match any elements`,\n );\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n }\n\n parentNode(node: any): any {\n return node.parentNode;\n }\n\n nextSibling(node: any): any {\n return node.nextSibling;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n if (namespace) {\n name = namespace + ':' + name;\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n } else {\n el.setAttribute(name, value);\n }\n } else {\n el.setAttribute(name, value);\n }\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n if (namespace) {\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n } else {\n el.removeAttribute(`${namespace}:${name}`);\n }\n } else {\n el.removeAttribute(name);\n }\n }\n\n addClass(el: any, name: string): void {\n el.classList.add(name);\n }\n\n removeClass(el: any, name: string): void {\n el.classList.remove(name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n } else {\n el.style[style] = value;\n }\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n if (flags & RendererStyleFlags2.DashCase) {\n // removeProperty has no effect when used on camelCased properties.\n el.style.removeProperty(style);\n } else {\n el.style[style] = '';\n }\n }\n\n setProperty(el: any, name: string, value: any): void {\n if (el == null) {\n return;\n }\n\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n this.throwOnSyntheticProps &&\n checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n\n setValue(node: any, value: string): void {\n node.nodeValue = value;\n }\n\n listen(\n target: 'window' | 'document' | 'body' | any,\n event: string,\n callback: (event: any) => boolean,\n ): () => void {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n this.throwOnSyntheticProps &&\n checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n target = getDOM().getGlobalEventTarget(this.doc, target);\n if (!target) {\n throw new Error(`Unsupported event target ${target} for event ${event}`);\n }\n }\n\n return this.eventManager.addEventListener(\n target,\n event,\n this.decoratePreventDefault(callback),\n ) as VoidFunction;\n }\n\n private decoratePreventDefault(eventHandler: Function): Function {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle\n // the two differently. In the first case, the special '__ngUnwrap__' token is passed to the\n // unwrap the listener (see below).\n return (event: any) => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The\n // debug_node can inspect the listener toString contents for the existence of this special\n // token. Because the token is a string literal, it is ensured to not be modified by compiled\n // code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n\n // Run the event handler inside the ngZone because event handlers are not patched\n // by Zone on the server. This is required only for tests.\n const allowDefaultBehavior = this.platformIsServer\n ? this.ngZone.runGuarded(() => eventHandler(event))\n : eventHandler(event);\n if (allowDefaultBehavior === false) {\n event.preventDefault();\n }\n\n return undefined;\n };\n }\n}\n\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name: string, nameKind: string) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_SYNTHETIC_PROPERTY,\n `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`,\n );\n }\n}\n\nfunction isTemplateNode(node: any): node is HTMLTemplateElement {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\n\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n private shadowRoot: any;\n\n constructor(\n eventManager: EventManager,\n private sharedStylesHost: SharedStylesHost,\n private hostEl: any,\n component: RendererType2,\n doc: Document,\n ngZone: NgZone,\n nonce: string | null,\n platformIsServer: boolean,\n ) {\n super(eventManager, doc, ngZone, platformIsServer);\n this.shadowRoot = (hostEl as any).attachShadow({mode: 'open'});\n\n this.sharedStylesHost.addHost(this.shadowRoot);\n const styles = shimStylesContent(component.id, component.styles);\n\n for (const style of styles) {\n const styleEl = document.createElement('style');\n\n if (nonce) {\n styleEl.setAttribute('nonce', nonce);\n }\n\n styleEl.textContent = style;\n this.shadowRoot.appendChild(styleEl);\n }\n }\n\n private nodeOrShadowRoot(node: any): any {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n\n override appendChild(parent: any, newChild: any): void {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n override insertBefore(parent: any, newChild: any, refChild: any): void {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n override removeChild(_parent: any, oldChild: any): void {\n return super.removeChild(null, oldChild);\n }\n override parentNode(node: any): any {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n\n override destroy() {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n}\n\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n private readonly styles: string[];\n\n constructor(\n eventManager: EventManager,\n private readonly sharedStylesHost: SharedStylesHost,\n component: RendererType2,\n private removeStylesOnCompDestroy: boolean,\n doc: Document,\n ngZone: NgZone,\n platformIsServer: boolean,\n compId?: string,\n ) {\n super(eventManager, doc, ngZone, platformIsServer);\n this.styles = compId ? shimStylesContent(compId, component.styles) : component.styles;\n }\n\n applyStyles(): void {\n this.sharedStylesHost.addStyles(this.styles);\n }\n\n override destroy(): void {\n if (!this.removeStylesOnCompDestroy) {\n return;\n }\n\n this.sharedStylesHost.removeStyles(this.styles);\n }\n}\n\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n private contentAttr: string;\n private hostAttr: string;\n\n constructor(\n eventManager: EventManager,\n sharedStylesHost: SharedStylesHost,\n component: RendererType2,\n appId: string,\n removeStylesOnCompDestroy: boolean,\n doc: Document,\n ngZone: NgZone,\n platformIsServer: boolean,\n ) {\n const compId = appId + '-' + component.id;\n super(\n eventManager,\n sharedStylesHost,\n component,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n compId,\n );\n this.contentAttr = shimContentAttribute(compId);\n this.hostAttr = shimHostAttribute(compId);\n }\n\n applyToHost(element: any): void {\n this.applyStyles();\n this.setAttribute(element, this.hostAttr, '');\n }\n\n override createElement(parent: any, name: string): Element {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\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.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager';\n\n@Injectable()\nexport class DomEventsPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) doc: any) {\n super(doc);\n }\n\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n override supports(eventName: string): boolean {\n return true;\n }\n\n override addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n element.addEventListener(eventName, handler as EventListener, false);\n return () => this.removeEventListener(element, eventName, handler as EventListener);\n }\n\n removeEventListener(target: any, eventName: string, callback: Function): void {\n return target.removeEventListener(eventName, callback as EventListener);\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.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, NgZone} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager';\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap: {[k: string]: string} = {\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS',\n};\n\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS: {[key: string]: (event: KeyboardEvent) => boolean} = {\n 'alt': (event: KeyboardEvent) => event.altKey,\n 'control': (event: KeyboardEvent) => event.ctrlKey,\n 'meta': (event: KeyboardEvent) => event.metaKey,\n 'shift': (event: KeyboardEvent) => event.shiftKey,\n};\n\n/**\n * A browser plug-in that provides support for handling of key events in Angular.\n */\n@Injectable()\nexport class KeyEventsPlugin extends EventManagerPlugin {\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n constructor(@Inject(DOCUMENT) doc: any) {\n super(doc);\n }\n\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n override supports(eventName: string): boolean {\n return KeyEventsPlugin.parseEventName(eventName) != null;\n }\n\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n override addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n const parsedEvent = KeyEventsPlugin.parseEventName(eventName)!;\n\n const outsideHandler = KeyEventsPlugin.eventCallback(\n parsedEvent['fullKey'],\n handler,\n this.manager.getZone(),\n );\n\n return this.manager.getZone().runOutsideAngular(() => {\n return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n }\n\n /**\n * Parses the user provided full keyboard event definition and normalizes it for\n * later internal use. It ensures the string is all lowercase, converts special\n * characters to a standard spelling, and orders all the values consistently.\n *\n * @param eventName The name of the key event to listen for.\n * @returns an object with the full, normalized string, and the dom event name\n * or null in the case when the event doesn't match a keyboard event.\n */\n static parseEventName(eventName: string): {fullKey: string; domEventName: string} | null {\n const parts: string[] = eventName.toLowerCase().split('.');\n\n const domEventName = parts.shift();\n if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n\n const key = KeyEventsPlugin._normalizeKey(parts.pop()!);\n\n let fullKey = '';\n let codeIX = parts.indexOf('code');\n if (codeIX > -1) {\n parts.splice(codeIX, 1);\n fullKey = 'code.';\n }\n MODIFIER_KEYS.forEach((modifierName) => {\n const index: number = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n\n // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n // The code must remain in the `result['domEventName']` form.\n // return {domEventName, fullKey};\n const result: {fullKey: string; domEventName: string} = {} as any;\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n }\n\n /**\n * Determines whether the actual keys pressed match the configured key code string.\n * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n * event is attached to the DOM during the `addEventListener` call. This is unseen\n * by the end user and is normalized for internal consistency and parsing.\n *\n * @param event The keyboard event.\n * @param fullKeyCode The normalized user defined expected key event string\n * @returns boolean.\n */\n static matchEventFullKeyCode(event: KeyboardEvent, fullKeyCode: string): boolean {\n let keycode = _keyMap[event.key] || event.key;\n let key = '';\n if (fullKeyCode.indexOf('code.') > -1) {\n keycode = event.code;\n key = 'code.';\n }\n // the keycode could be unidentified so we have to check here\n if (keycode == null || !keycode) return false;\n keycode = keycode.toLowerCase();\n if (keycode === ' ') {\n keycode = 'space'; // for readability\n } else if (keycode === '.') {\n keycode = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach((modifierName) => {\n if (modifierName !== keycode) {\n const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n key += modifierName + '.';\n }\n }\n });\n key += keycode;\n return key === fullKeyCode;\n }\n\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n static eventCallback(fullKey: string, handler: Function, zone: NgZone): Function {\n return (event: KeyboardEvent) => {\n if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n zone.runGuarded(() => handler(event));\n }\n };\n }\n\n /** @internal */\n static _normalizeKey(keyName: string): string {\n return keyName === 'esc' ? 'escape' : keyName;\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.dev/license\n */\n\nimport {\n CommonModule,\n DOCUMENT,\n XhrFactory,\n ɵPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID,\n} from '@angular/common';\nimport {\n APP_ID,\n ApplicationConfig as ApplicationConfigFromCore,\n ApplicationModule,\n ApplicationRef,\n createPlatformFactory,\n ErrorHandler,\n Inject,\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n NgZone,\n Optional,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n RendererFactory2,\n SkipSelf,\n StaticProvider,\n Testability,\n TestabilityRegistry,\n Type,\n ɵINJECTOR_SCOPE as INJECTOR_SCOPE,\n ɵinternalCreateApplication as internalCreateApplication,\n ɵRuntimeError as RuntimeError,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n ɵTESTABILITY_GETTER as TESTABILITY_GETTER,\n} from '@angular/core';\n\nimport {BrowserDomAdapter} from './browser/browser_adapter';\nimport {BrowserGetTestability} from './browser/testability';\nimport {BrowserXhr} from './browser/xhr';\nimport {DomRendererFactory2} from './dom/dom_renderer';\nimport {DomEventsPlugin} from './dom/events/dom_events';\nimport {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';\nimport {KeyEventsPlugin} from './dom/events/key_events';\nimport {SharedStylesHost} from './dom/shared_styles_host';\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * Set of config options available during the application bootstrap operation.\n *\n * @publicApi\n *\n * @deprecated\n * `ApplicationConfig` has moved, please import `ApplicationConfig` from `@angular/core` instead.\n */\n// The below is a workaround to add a deprecated message.\ntype ApplicationConfig = ApplicationConfigFromCore;\nexport {ApplicationConfig};\n\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n * ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(SomeNgModule)\n * ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nexport function bootstrapApplication(\n rootComponent: Type<unknown>,\n options?: ApplicationConfig,\n): Promise<ApplicationRef> {\n return internalCreateApplication({rootComponent, ...createProvidersConfig(options)});\n}\n\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nexport function createApplication(options?: ApplicationConfig) {\n return internalCreateApplication(createProvidersConfig(options));\n}\n\nfunction createProvidersConfig(options?: ApplicationConfig) {\n return {\n appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])],\n platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS,\n };\n}\n\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n * available for testing using Protractor.\n *\n * @publicApi\n */\nexport function provideProtractorTestingSupport(): Provider[] {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideProtractorTestingSupport` call results in app\n // code.\n return [...TESTABILITY_PROVIDERS];\n}\n\nexport function initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n}\n\nexport function errorHandler(): ErrorHandler {\n return new ErrorHandler();\n}\n\nexport function _document(): any {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\nexport const INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID},\n {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},\n {provide: DOCUMENT, useFactory: _document, deps: []},\n];\n\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nexport const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef =\n createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'BrowserModule Providers Marker' : '',\n);\n\nconst TESTABILITY_PROVIDERS = [\n {\n provide: TESTABILITY_GETTER,\n useClass: BrowserGetTestability,\n deps: [],\n },\n {\n provide: TESTABILITY,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, TESTABILITY_GETTER],\n },\n {\n provide: Testability, // Also provide as `Testability` for backwards-compatibility.\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, TESTABILITY_GETTER],\n },\n];\n\nconst BROWSER_MODULE_PROVIDERS: Provider[] = [\n {provide: INJECTOR_SCOPE, useValue: 'root'},\n {provide: ErrorHandler, useFactory: errorHandler, deps: []},\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n deps: [DOCUMENT, NgZone, PLATFORM_ID],\n },\n {provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT]},\n DomRendererFactory2,\n SharedStylesHost,\n EventManager,\n {provide: RendererFactory2, useExisting: DomRendererFactory2},\n {provide: XhrFactory, useClass: BrowserXhr, deps: []},\n typeof ngDevMode === 'undefined' || ngDevMode\n ? {provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true}\n : [],\n];\n\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\n@NgModule({\n providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],\n exports: [CommonModule, ApplicationModule],\n})\nexport class BrowserModule {\n constructor(\n @Optional()\n @SkipSelf()\n @Inject(BROWSER_MODULE_PROVIDERS_MARKER)\n providersAlreadyPresent: boolean | null,\n ) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && providersAlreadyPresent) {\n throw new RuntimeError(\n RuntimeErrorCode.BROWSER_MODULE_ALREADY_LOADED,\n `Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`,\n );\n }\n }\n\n /**\n * Configures a browser-based app to transition from a server-rendered app, if\n * one is present on the page.\n *\n * @param params An object containing an identifier for the app to transition.\n * The ID must match between the client and server versions of the app.\n * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n *\n * @deprecated Use {@link APP_ID} instead to set the application ID.\n */\n static withServerTransition(params: {appId: string}): ModuleWithProviders<BrowserModule> {\n return {\n ngModule: BrowserModule,\n providers: [{provide: APP_ID, useValue: params.appId}],\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.dev/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {\n GetTestability,\n Testability,\n TestabilityRegistry,\n ɵglobal as global,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport class BrowserGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {\n global['getAngularTestability'] = (elem: any, findInAncestors: boolean = true) => {\n const testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new RuntimeError(\n RuntimeErrorCode.TESTABILITY_NOT_FOUND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Could not find testability for element.',\n );\n }\n return testability;\n };\n\n global['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n\n global['getAllAngularRootElements'] = () => registry.getAllRootElements();\n\n const whenAllStable = (callback: () => void) => {\n const testabilities = global['getAllAngularTestabilities']() as Testability[];\n let count = testabilities.length;\n const decrement = function () {\n count--;\n if (count == 0) {\n callback();\n }\n };\n testabilities.forEach((testability) => {\n testability.whenStable(decrement);\n });\n };\n\n if (!global['frameworkStabilizers']) {\n global['frameworkStabilizers'] = [];\n }\n global['frameworkStabilizers'].push(whenAllStable);\n }\n\n findTestabilityInTree(\n registry: TestabilityRegistry,\n elem: any,\n findInAncestors: boolean,\n ): Testability | null {\n if (elem == null) {\n return null;\n }\n const t = registry.getTestability(elem);\n if (t != null) {\n return t;\n } else if (!findInAncestors) {\n return null;\n }\n if (getDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, (<any>elem).host, true);\n }\n return this.findTestabilityInTree(registry, elem.parentElement, true);\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.dev/license\n */\n\nimport {DOCUMENT, ɵDomAdapter as DomAdapter, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n/**\n * Represents the attributes of an HTML `<meta>` element. The element itself is\n * represented by the internal `HTMLMetaElement`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see {@link Meta}\n *\n * @publicApi\n */\nexport type MetaDefinition = {\n charset?: string;\n content?: string;\n httpEquiv?: string;\n id?: string;\n itemprop?: string;\n name?: string;\n property?: string;\n scheme?: string;\n url?: string;\n} & {\n // TODO(IgorMinar): this type looks wrong\n [prop: string]: string;\n};\n\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Meta {\n private _dom: DomAdapter;\n constructor(@Inject(DOCUMENT) private _doc: any) {\n this._dom = getDOM();\n }\n /**\n * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * If an existing element is found, it is returned and is not modified in any way.\n * @param tag The definition of a `<meta>` element to match or create.\n * @param forceCreation True to create a new element without checking whether one already exists.\n * @returns The existing element with the same attributes and values if found,\n * the new element if no match is found, or `null` if the tag parameter is not defined.\n */\n addTag(tag: MetaDefinition, forceCreation: boolean = false): HTMLMetaElement | null {\n if (!tag) return null;\n return this._getOrCreateElement(tag, forceCreation);\n }\n\n /**\n * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * @param tags An array of tag definitions to match or create.\n * @param forceCreation True to create new elements without checking whether they already exist.\n * @returns The matching elements if found, or the new elements.\n */\n addTags(tags: MetaDefinition[], forceCreation: boolean = false): HTMLMetaElement[] {\n if (!tags) return [];\n return tags.reduce((result: HTMLMetaElement[], tag: MetaDefinition) => {\n if (tag) {\n result.push(this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n }\n\n /**\n * Retrieves a `<meta>` tag element in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching element, if any.\n */\n getTag(attrSelector: string): HTMLMetaElement | null {\n if (!attrSelector) return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }\n\n /**\n * Retrieves a set of `<meta>` tag elements in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching elements, if any.\n */\n getTags(attrSelector: string): HTMLMetaElement[] {\n if (!attrSelector) return [];\n const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n return list ? [].slice.call(list) : [];\n }\n\n /**\n * Modifies an existing `<meta>` tag element in the current HTML document.\n * @param tag The tag description with which to replace the existing tag content.\n * @param selector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n * replacement tag.\n * @return The modified element.\n */\n updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null {\n if (!tag) return null;\n selector = selector || this._parseSelector(tag);\n const meta: HTMLMetaElement = this.getTag(selector)!;\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n }\n\n /**\n * Removes an existing `<meta>` tag element from the current HTML document.\n * @param attrSelector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n */\n removeTag(attrSelector: string): void {\n this.removeTagElement(this.getTag(attrSelector)!);\n }\n\n /**\n * Removes an existing `<meta>` tag element from the current HTML document.\n * @param meta The tag definition to match against to identify an existing tag.\n */\n removeTagElement(meta: HTMLMetaElement): void {\n if (meta) {\n this._dom.remove(meta);\n }\n }\n\n private _getOrCreateElement(\n meta: MetaDefinition,\n forceCreation: boolean = false,\n ): HTMLMetaElement {\n if (!forceCreation) {\n const selector: string = this._parseSelector(meta);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n const elem = this.getTags(selector).filter((elem) => this._containsAttributes(meta, elem))[0];\n if (elem !== undefined) return elem;\n }\n const element: HTMLMetaElement = this._dom.createElement('meta') as HTMLMetaElement;\n this._setMetaElementAttributes(meta, element);\n const head = this._doc.getElementsByTagName('head')[0];\n head.appendChild(element);\n return element;\n }\n\n private _setMetaElementAttributes(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\n Object.keys(tag).forEach((prop: string) =>\n el.setAttribute(this._getMetaKeyMap(prop), tag[prop]),\n );\n return el;\n }\n\n private _parseSelector(tag: MetaDefinition): string {\n const attr: string = tag.name ? 'name' : 'property';\n return `${attr}=\"${tag[attr]}\"`;\n }\n\n private _containsAttributes(tag: MetaDefinition, elem: HTMLMetaElement): boolean {\n return Object.keys(tag).every(\n (key: string) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key],\n );\n }\n\n private _getMetaKeyMap(prop: string): string {\n return META_KEYS_MAP[prop] || prop;\n }\n}\n\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP: {[prop: string]: string} = {\n httpEquiv: 'http-equiv',\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.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Title {\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n /**\n * Get the title of the current HTML document.\n */\n getTitle(): string {\n return this._doc.title;\n }\n\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n setTitle(newTitle: string) {\n this._doc.title = newTitle || '';\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.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n forwardRef,\n Inject,\n Injectable,\n Sanitizer,\n SecurityContext,\n ɵ_sanitizeHtml as _sanitizeHtml,\n ɵ_sanitizeUrl as _sanitizeUrl,\n ɵallowSanitizationBypassAndThrow as allowSanitizationBypassOrThrow,\n ɵbypassSanitizationTrustHtml as bypassSanitizationTrustHtml,\n ɵbypassSanitizationTrustResourceUrl as bypassSanitizationTrustResourceUrl,\n ɵbypassSanitizationTrustScript as bypassSanitizationTrustScript,\n ɵbypassSanitizationTrustStyle as bypassSanitizationTrustStyle,\n ɵbypassSanitizationTrustUrl as bypassSanitizationTrustUrl,\n ɵBypassType as BypassType,\n ɵRuntimeError as RuntimeError,\n ɵunwrapSafeValue as unwrapSafeValue,\n ɵXSS_SECURITY_URL as XSS_SECURITY_URL,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport {SecurityContext};\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl)})\nexport abstract class DomSanitizer implements Sanitizer {\n /**\n * Gets a safe value from either a known safe value or a value with unknown safety.\n *\n * If the given value is already a `SafeValue`, this method returns the unwrapped value.\n * If the security context is HTML and the given value is a plain string, this method\n * sanitizes the string, removing any potentially unsafe content.\n * For any other security context, this method throws an error if provided\n * with a plain string.\n */\n abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;\n\n /**\n * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML\n * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will\n * leave safe HTML intact, so in most situations this method should not be used.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustHtml(value: string): SafeHtml;\n\n /**\n * Bypass security and trust the given value to be safe style value (CSS).\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustStyle(value: string): SafeStyle;\n\n /**\n * Bypass security and trust the given value to be safe JavaScript.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustScript(value: string): SafeScript;\n\n /**\n * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used\n * in hyperlinks or `<img src>`.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustUrl(value: string): SafeUrl;\n\n /**\n * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may\n * be used to load executable code from, like `<script src>`, or `<iframe src>`.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;\n}\n\n@Injectable({providedIn: 'root'})\nexport class DomSanitizerImpl extends DomSanitizer {\n constructor(@Inject(DOCUMENT) private _doc: any) {\n super();\n }\n\n override sanitize(ctx: SecurityContext, value: SafeValue | string | null): string | null {\n if (value == null) return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value as string;\n case SecurityContext.HTML:\n if (allowSanitizationBypassOrThrow(value, BypassType.Html)) {\n return unwrapSafeValue(value);\n }\n return _sanitizeHtml(this._doc, String(value)).toString();\n case SecurityContext.STYLE:\n if (allowSanitizationBypassOrThrow(value, BypassType.Style)) {\n return unwrapSafeValue(value);\n }\n return value as string;\n case SecurityContext.SCRIPT:\n if (allowSanitizationBypassOrThrow(value, BypassType.Script)) {\n return unwrapSafeValue(value);\n }\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNSAFE_SCRIPT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'unsafe value used in a script context',\n );\n case SecurityContext.URL:\n if (allowSanitizationBypassOrThrow(value, BypassType.Url)) {\n return unwrapSafeValue(value);\n }\n return _sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (allowSanitizationBypassOrThrow(value, BypassType.ResourceUrl)) {\n return unwrapSafeValue(value);\n }\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNSAFE_RESOURCE_URL,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`,\n );\n default:\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNEXPECTED_CTX,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unexpected SecurityContext ${ctx} (see ${XSS_SECURITY_URL})`,\n );\n }\n }\n\n override bypassSecurityTrustHtml(value: string): SafeHtml {\n return bypassSanitizationTrustHtml(value);\n }\n override bypassSecurityTrustStyle(value: string): SafeStyle {\n return bypassSanitizationTrustStyle(value);\n }\n override bypassSecurityTrustScript(value: string): SafeScript {\n return bypassSanitizationTrustScript(value);\n }\n override bypassSecurityTrustUrl(value: string): SafeUrl {\n return bypassSanitizationTrustUrl(value);\n }\n override bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl {\n return bypassSanitizationTrustResourceUrl(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.dev/license\n */\n\nimport {HttpTransferCacheOptions, ɵwithHttpTransferCache} from '@angular/common/http';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n NgZone,\n Provider,\n ɵConsole as Console,\n ɵformatRuntimeError as formatRuntimeError,\n ɵwithDomHydration as withDomHydration,\n ɵwithEventReplay,\n ɵwithI18nSupport,\n ɵZONELESS_ENABLED as ZONELESS_ENABLED,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * The list of features as an enum to uniquely type each `HydrationFeature`.\n * @see {@link HydrationFeature}\n *\n * @publicApi\n */\nexport enum HydrationFeatureKind {\n NoHttpTransferCache,\n HttpTransferCacheOptions,\n I18nSupport,\n EventReplay,\n}\n\n/**\n * Helper type to represent a Hydration feature.\n *\n * @publicApi\n */\nexport interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {\n ɵkind: FeatureKind;\n ɵproviders: Provider[];\n}\n\n/**\n * Helper function to create an object that represents a Hydration feature.\n */\nfunction hydrationFeature<FeatureKind extends HydrationFeatureKind>(\n ɵkind: FeatureKind,\n ɵproviders: Provider[] = [],\n ɵoptions: unknown = {},\n): HydrationFeature<FeatureKind> {\n return {ɵkind, ɵproviders};\n}\n\n/**\n * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the\n * server and other one on the browser.\n *\n * @publicApi\n */\nexport function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache> {\n // This feature has no providers and acts as a flag that turns off\n // HTTP transfer cache (which otherwise is turned on by default).\n return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache);\n}\n\n/**\n * The function accepts an object, which allows to configure cache parameters,\n * such as which headers should be included (no headers are included by default),\n * whether POST requests should be cached or a callback function to determine if a\n * particular request should be cached.\n *\n * @publicApi\n */\nexport function withHttpTransferCacheOptions(\n options: HttpTransferCacheOptions,\n): HydrationFeature<HydrationFeatureKind.HttpTransferCacheOptions> {\n // This feature has no providers and acts as a flag to pass options to the HTTP transfer cache.\n return hydrationFeature(\n HydrationFeatureKind.HttpTransferCacheOptions,\n ɵwithHttpTransferCache(options),\n );\n}\n\n/**\n * Enables support for hydrating i18n blocks.\n *\n * @developerPreview\n * @publicApi\n */\nexport function withI18nSupport(): HydrationFeature<HydrationFeatureKind.I18nSupport> {\n return hydrationFeature(HydrationFeatureKind.I18nSupport, ɵwithI18nSupport());\n}\n\n/**\n * Enables support for replaying user events (e.g. `click`s) that happened on a page\n * before hydration logic has completed. Once an application is hydrated, all captured\n * events are replayed and relevant event listeners are executed.\n *\n * @usageNotes\n *\n * Basic example of how you can enable event replay in your application when\n * `bootstrapApplication` function is used:\n * ```\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration(withEventReplay())]\n * });\n * ```\n * @developerPreview\n * @publicApi\n * @see {@link provideClientHydration}\n */\nexport function withEventReplay(): HydrationFeature<HydrationFeatureKind.EventReplay> {\n return hydrationFeature(HydrationFeatureKind.EventReplay, ɵwithEventReplay());\n}\n\n/**\n * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function\n * that verifies whether compatible ZoneJS was used in an application\n * and logs a warning in a console if it's not the case.\n */\nfunction provideZoneJsCompatibilityDetector(): Provider[] {\n return [\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n const ngZone = inject(NgZone);\n const isZoneless = inject(ZONELESS_ENABLED);\n // Checking `ngZone instanceof NgZone` would be insufficient here,\n // because custom implementations might use NgZone as a base class.\n if (!isZoneless && ngZone.constructor !== NgZone) {\n const console = inject(Console);\n const message = formatRuntimeError(\n RuntimeErrorCode.UNSUPPORTED_ZONEJS_INSTANCE,\n 'Angular detected that hydration was enabled for an application ' +\n 'that uses a custom or a noop Zone.js implementation. ' +\n 'This is not yet a fully supported configuration.',\n );\n // tslint:disable-next-line:no-console\n console.warn(message);\n }\n },\n multi: true,\n },\n ];\n}\n\n/**\n * Sets up providers necessary to enable hydration functionality for the application.\n *\n * By default, the function enables the recommended set of features for the optimal\n * performance for most of the applications. It includes the following features:\n *\n * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).\n * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and\n * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching\n * [here](guide/ssr#caching-data-when-using-httpclient).\n *\n * These functions allow you to disable some of the default features or enable new ones:\n *\n * * {@link withNoHttpTransferCache} to disable HTTP transfer cache\n * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options\n * * {@link withI18nSupport} to enable hydration support for i18n blocks\n * * {@link withEventReplay} to enable support for replaying user events\n *\n * @usageNotes\n *\n * Basic example of how you can enable hydration in your application when\n * `bootstrapApplication` function is used:\n * ```\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration()]\n * });\n * ```\n *\n * Alternatively if you are using NgModules, you would add `provideClientHydration`\n * to your root app module's provider list.\n * ```\n * @NgModule({\n * declarations: [RootCmp],\n * bootstrap: [RootCmp],\n * providers: [provideClientHydration()],\n * })\n * export class AppModule {}\n * ```\n *\n * @see {@link withNoHttpTransferCache}\n * @see {@link withHttpTransferCacheOptions}\n * @see {@link withI18nSupport}\n * @see {@link withEventReplay}\n *\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to enable hydration.\n *\n * @publicApi\n */\nexport function provideClientHydration(\n ...features: HydrationFeature<HydrationFeatureKind>[]\n): EnvironmentProviders {\n const providers: Provider[] = [];\n const featuresKind = new Set<HydrationFeatureKind>();\n const hasHttpTransferCacheOptions = featuresKind.has(\n HydrationFeatureKind.HttpTransferCacheOptions,\n );\n\n for (const {ɵproviders, ɵkind} of features) {\n featuresKind.add(ɵkind);\n\n if (ɵproviders.length) {\n providers.push(ɵproviders);\n }\n }\n\n if (\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) &&\n hasHttpTransferCacheOptions\n ) {\n // TODO: Make this a runtime error\n throw new Error(\n 'Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.',\n );\n }\n\n return makeEnvironmentProviders([\n typeof ngDevMode !== 'undefined' && ngDevMode ? provideZoneJsCompatibilityDetector() : [],\n withDomHydration(),\n featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions\n ? []\n : ɵwithHttpTransferCache({}),\n providers,\n ]);\n}\n","<ng-container *ngIf=\"breadcrumbItems$ | async as items\">\n <nav\n *ngIf=\"items.length > 0\"\n [attr.aria-label]=\"'navigation.breadcrumb' | finLocalization\"\n class=\"breadcrumbs-container nordic-blue-900-text grid-max-width padding-left-gutter padding-right-gutter ps-small-t ps-xsmall-b center light-type\"\n >\n <ul class=\"no-list-style\">\n <li class=\"font-body-2\">\n <a [finLink]=\"'/' + (currentLanguage$ | async)\" class=\"nordic-blue-900-text no-decoration breadcrumb-item\">{{\n 'actions.home' | finLocalization\n }}</a>\n </li>\n <ng-container *ngFor=\"let item of items\">\n <li *ngIf=\"item.url && item.url !== '/' + (currentLanguage$ | async)\" class=\"font-body-2\">\n <span aria-hidden=\"true\" class=\"ps-xxsmall-x\">/</span>\n <span>\n <a\n *ngIf=\"item.url !== (currentPath$ | async)\"\n [finLink]=\"item.url\"\n class=\"nordic-blue-900-text no-decoration breadcrumb-item\"\n >{{ item.title }}</a\n >\n <span\n *ngIf=\"item.url === (currentPath$ | async)\"\n class=\"nordic-blue-900-text no-decoration medium-type breadcrumb-item\"\n [attr.aria-current]=\"'page'\"\n >{{ item.title }}\n </span>\n </span>\n </li>\n </ng-container>\n </ul>\n </nav>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\n\nimport { combineLatest, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { BreadcrumbItem } from '../../../interfaces';\nimport { BreadcrumbService, NavigationMenuService } from '../../../services';\n\n@Component({\n selector: 'fin-breadcrumb',\n styleUrls: ['./breadcrumb.component.scss'],\n templateUrl: './breadcrumb.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BreadcrumbComponent implements OnInit {\n readonly currentLanguage$: Observable<string>;\n breadcrumbItems$: Observable<BreadcrumbItem[]>;\n currentPath$: Observable<string>;\n\n constructor(\n private languageService: LanguageService,\n private navigationMenuService: NavigationMenuService,\n private breadcrumbService: BreadcrumbService\n ) {\n this.currentLanguage$ = this.languageService.lang;\n }\n\n ngOnInit(): void {\n const serviceBreadcrumb$ = this.breadcrumbService.breadcrumb$;\n const isLandingPage$ = this.navigationMenuService.isLandingPage$;\n\n this.currentPath$ = this.navigationMenuService.currentPath$;\n this.breadcrumbItems$ = combineLatest([serviceBreadcrumb$, isLandingPage$]).pipe(\n map(([serviceBreadcrumb, isLandingPage]) => {\n return isLandingPage ? [] : serviceBreadcrumb;\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { ButtonModule, IconsModule } from '@fcom/ui-components';\nimport { PersonalizationModule } from '@fcom/loyalty-personalization';\n\nimport { GtmModule } from '../../gtm';\nimport { PipesModule } from '../../pipes';\nimport { DirectiveModule } from '../../directives';\nimport { LoginModule } from '../../login/login.module';\nimport { BreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { CampaignBannerComponent } from './campaign-banner/campaign-banner.component';\nimport { HeaderComponent } from './header.component';\nimport { NavigationComponent } from './navigation/navigation.component';\nimport { NavigationTriggerModule } from './navigation-trigger.module';\nimport { ComponentsModule } from '../components.module';\nimport { MultivariateTestModule } from './../../multivariate-test/multivariate-test.module';\n\n@NgModule({\n imports: [\n CommonModule,\n ComponentsModule,\n PipesModule,\n DirectiveModule,\n NavigationTriggerModule,\n LoginModule,\n GtmModule,\n UiTranslateModule,\n IconsModule,\n PersonalizationModule,\n MultivariateTestModule,\n ButtonModule,\n ],\n declarations: [HeaderComponent, NavigationComponent, BreadcrumbComponent, CampaignBannerComponent],\n exports: [HeaderComponent, NavigationComponent, BreadcrumbComponent, CampaignBannerComponent],\n})\nexport class NavigationModule {}\n","<div class=\"wrapper\" [class.disabled]=\"disabled\">\n <button\n class=\"block fill relative ps-medium\"\n [attr.aria-controls]=\"expandContainerId\"\n [disabled]=\"disabled\"\n (click)=\"toggleOpen()\"\n >\n <div class=\"header flex flex--top\">\n <div class=\"header-icon flex--nogrow flex flex--top ps-small-r\" [class.dn-mobile]=\"hideIconInMobile\">\n <fcom-icon [category]=\"iconCategory\" [name]=\"iconName\" class=\"icon-large\" [ngClass]=\"iconClasses\"> </fcom-icon>\n </div>\n <div class=\"\">\n <div class=\"header-content flex flex--align-end align-left\">\n <h4\n class=\"header-title nordic-blue-900-text font-heading-4 ps-small-r\"\n [class.capitalize]=\"capitalizeTitle\"\n [attr.aria-describedby]=\"'subtitle-' + expandContainerId\"\n >\n {{ title }}\n </h4>\n <div\n *ngIf=\"subTitle || subTitleIcon\"\n class=\"header-subtitle-wrapper flex--nogrow flex flex--center\"\n [ngClass]=\"{ 'dn-mobile': !showSubTitleOnMobile }\"\n >\n <fcom-icon\n *ngIf=\"subTitleIcon\"\n [name]=\"subTitleIcon\"\n [category]=\"iconCategory\"\n class=\"icon-small ps-xxsmall-r\"\n [ngClass]=\"iconClasses\"\n >\n </fcom-icon>\n <div\n *ngIf=\"subTitle\"\n class=\"header-subtitle font-body-1 nordic-blue-900-text\"\n [attr.id]=\"'subtitle-' + expandContainerId\"\n >\n {{ subTitle }}\n </div>\n </div>\n </div>\n\n <div\n *ngIf=\"(!expandOpen || showDescriptionAlways) && descriptionContent\"\n [ngClass]=\"descriptionClasses\"\n class=\"nordic-blue-900-text font-body-1 align-left\"\n data-testid=\"booking-expander-description\"\n data-hj-suppress\n >\n <ng-container *ngTemplateOutlet=\"descriptionContent\"></ng-container>\n </div>\n </div>\n </div>\n\n <fcom-icon\n class=\"ms-medium chevron-down rotate absolute nordic-blue-900-text\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n [class.rotate-active]=\"expandOpen\"\n ></fcom-icon>\n </button>\n\n <fcom-expand\n [ariaId]=\"expandContainerId\"\n class=\"block\"\n [open]=\"expandOpen\"\n [ariaLabelledBy]=\"'pax-expander-' + expandContainerId\"\n >\n <ng-content select=\"expandedContent\"></ng-content>\n </fcom-expand>\n\n <ng-content select=\"content\"></ng-content>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n TemplateRef,\n} from '@angular/core';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\n\nimport { type IconName } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-expander-card',\n templateUrl: 'expander-card.component.html',\n styleUrls: ['expander-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ExpanderCardComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() iconName: IconName = SvgLibraryIcon.SINGLE_PAX;\n @Input() iconCategory: IconLibrary = IconLibrary.SVG_LIBRARY;\n @Input() iconClasses: string;\n @Input() title: string;\n @Input() capitalizeTitle = true;\n @Input() subTitle: string | number;\n @Input() subTitleIcon: IconName;\n @Input() showSubTitleOnMobile = false;\n @Input() description: string;\n @Input() descriptionClasses: string;\n @Input() expandOpen: boolean;\n @Input() descriptionContent: TemplateRef<ElementRef>;\n @Input() disabled = false;\n @Input() hideIconInMobile = true;\n @Input() showDescriptionAlways = false;\n\n expandContainerId: string;\n\n @Output()\n expandChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n ngOnInit(): void {\n this.expandContainerId = uuid();\n }\n\n toggleOpen(): void {\n this.expandChange.emit(this.expandOpen);\n }\n}\n","<article class=\"flex ps-medium-b ps-medium-l ps-medium-t ps-medium-r\" [ngClass]=\"styleClasses$ | async\">\n <div class=\"icon-container ms-small-r flex flex--center\">\n <fcom-icon *ngFor=\"let icon of icons$ | finObsToArray\" [name]=\"icon | async\" class=\"icon-large\"></fcom-icon>\n </div>\n <div class=\"text-container flex flex--center\">\n <div [innerHTML]=\"content$ | async | finSafe: 'html'\"></div>\n </div>\n</article>\n","import { Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\n@Component({\n selector: 'fin-icon-with-text',\n styleUrls: ['./icon-with-text.component.scss'],\n templateUrl: './icon-with-text.component.html',\n})\nexport class IconWithTextComponent {\n @Input()\n title$: Observable<string>;\n @Input()\n content$: Observable<string>;\n @Input()\n icons$: Observable<SvgLibraryIcon[]>;\n @Input()\n styleClasses$: Observable<string[]>;\n}\n","import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way\n * you can connect to it.\n *\n * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if\n * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it\n * unsubscribes from the source. This way you can make sure that everything before the *published*\n * refCount has only a single subscription independently of the number of subscribers to the target\n * observable.\n *\n * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator\n * (making the observable hot) and the *refCount* operator in a sequence.\n *\n * ![](refCount.png)\n *\n * ## Example\n *\n * In the following example there are two intervals turned into connectable observables\n * by using the *publish* operator. The first one uses the *refCount* operator, the\n * second one does not use it. You will notice that a connectable observable does nothing\n * until you call its connect function.\n *\n * ```ts\n * import { interval, tap, publish, refCount } from 'rxjs';\n *\n * // Turn the interval observable into a ConnectableObservable (hot)\n * const refCountInterval = interval(400).pipe(\n * tap(num => console.log(`refCount ${ num }`)),\n * publish(),\n * refCount()\n * );\n *\n * const publishedInterval = interval(400).pipe(\n * tap(num => console.log(`publish ${ num }`)),\n * publish()\n * );\n *\n * refCountInterval.subscribe();\n * refCountInterval.subscribe();\n * // 'refCount 0' -----> 'refCount 1' -----> etc\n * // All subscriptions will receive the same value and the tap (and\n * // every other operator) before the `publish` operator will be executed\n * // only once per event independently of the number of subscriptions.\n *\n * publishedInterval.subscribe();\n * // Nothing happens until you call .connect() on the observable.\n * ```\n *\n * @return A function that returns an Observable that automates the connection\n * to ConnectableObservable.\n * @see {@link ConnectableObservable}\n * @see {@link share}\n * @see {@link publish}\n * @deprecated Replaced with the {@link share} operator. How `share` is used\n * will depend on the connectable observable you created just prior to the\n * `refCount` operator.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\nexport function refCount<T>(): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n let connection: Subscription | null = null;\n\n (source as any)._refCount++;\n\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || (source as any)._refCount <= 0 || 0 < --(source as any)._refCount) {\n connection = null;\n return;\n }\n\n ///\n // Compare the local RefCountSubscriber's connection Subscription to the\n // connection Subscription on the shared ConnectableObservable. In cases\n // where the ConnectableObservable source synchronously emits values, and\n // the RefCountSubscriber's downstream Observers synchronously unsubscribe,\n // execution continues to here before the RefCountOperator has a chance to\n // supply the RefCountSubscriber with the shared connection Subscription.\n // For example:\n // ```\n // range(0, 10).pipe(\n // publish(),\n // refCount(),\n // take(5),\n // )\n // .subscribe();\n // ```\n // In order to account for this case, RefCountSubscriber should only dispose\n // the ConnectableObservable's shared connection Subscription if the\n // connection Subscription exists, *and* either:\n // a. RefCountSubscriber doesn't have a reference to the shared connection\n // Subscription yet, or,\n // b. RefCountSubscriber's connection Subscription reference is identical\n // to the shared connection Subscription\n ///\n\n const sharedConnection = (source as any)._connection;\n const conn = connection;\n connection = null;\n\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n\n subscriber.unsubscribe();\n });\n\n source.subscribe(refCounter);\n\n if (!refCounter.closed) {\n connection = (source as ConnectableObservable<T>).connect();\n }\n });\n}\n","import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\n\n/**\n * @class ConnectableObservable<T>\n * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.\n * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator\n * instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\nexport class ConnectableObservable<T> extends Observable<T> {\n protected _subject: Subject<T> | null = null;\n protected _refCount: number = 0;\n protected _connection: Subscription | null = null;\n\n /**\n * @param source The source observable\n * @param subjectFactory The factory that creates the subject used internally.\n * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable.\n * `new ConnectableObservable(source, factory)` is equivalent to\n * `connectable(source, { connector: factory })`.\n * When the `refCount()` method is needed, the {@link share} operator should be used instead:\n * `new ConnectableObservable(source, factory).refCount()` is equivalent to\n * `source.pipe(share({ connector: factory }))`.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n constructor(public source: Observable<T>, protected subjectFactory: () => Subject<T>) {\n super();\n // If we have lift, monkey patch that here. This is done so custom observable\n // types will compose through multicast. Otherwise the resulting observable would\n // simply be an instance of `ConnectableObservable`.\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber<T>) {\n return this.getSubject().subscribe(subscriber);\n }\n\n protected getSubject(): Subject<T> {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject!;\n }\n\n protected _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection?.unsubscribe();\n }\n\n /**\n * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n connect(): Subscription {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(\n this.source.subscribe(\n createOperatorSubscriber(\n subject as any,\n undefined,\n () => {\n this._teardown();\n subject.complete();\n },\n (err) => {\n this._teardown();\n subject.error(err);\n },\n () => this._teardown()\n )\n )\n );\n\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n\n /**\n * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead.\n * Details: https://rxjs.dev/deprecations/multicasting\n */\n refCount(): Observable<T> {\n return higherOrderRefCount()(this) as Observable<T>;\n }\n}\n","import { EMPTY } from '../observable/empty';\nimport { MonoTypeOperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Waits for the source to complete, then emits the last N values from the source,\n * as specified by the `count` argument.\n *\n * ![](takeLast.png)\n *\n * `takeLast` results in an observable that will hold values up to `count` values in memory,\n * until the source completes. It then pushes all values in memory to the consumer, in the\n * order they were received from the source, then notifies the consumer that it is\n * complete.\n *\n * If for some reason the source completes before the `count` supplied to `takeLast` is reached,\n * all values received until that point are emitted, and then completion is notified.\n *\n * **Warning**: Using `takeLast` with an observable that never completes will result\n * in an observable that never emits a value.\n *\n * ## Example\n *\n * Take the last 3 values of an Observable with many values\n *\n * ```ts\n * import { range, takeLast } from 'rxjs';\n *\n * const many = range(1, 100);\n * const lastThree = many.pipe(takeLast(3));\n * lastThree.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link take}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @param count The maximum number of values to emit from the end of\n * the sequence of values emitted by the source Observable.\n * @return A function that returns an Observable that emits at most the last\n * `count` values emitted by the source Observable.\n */\nexport function takeLast<T>(count: number): MonoTypeOperatorFunction<T> {\n return count <= 0\n ? () => EMPTY\n : operate((source, subscriber) => {\n // This buffer will hold the values we are going to emit\n // when the source completes. Since we only want to take the\n // last N values, we can't emit until we're sure we're not getting\n // any more values.\n let buffer: T[] = [];\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n // Add the most recent value onto the end of our buffer.\n buffer.push(value);\n // If our buffer is now larger than the number of values we\n // want to take, we remove the oldest value from the buffer.\n count < buffer.length && buffer.shift();\n },\n () => {\n // The source completed, we now know what are last values\n // are, emit them in the order they were received.\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n },\n // Errors are passed through to the consumer\n undefined,\n () => {\n // During finalization release the values in our buffer.\n buffer = null!;\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.dev/license\n */\n\nimport {Route, UrlMatchResult} from './models';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nexport const RouteTitleKey = /* @__PURE__ */ Symbol('RouteTitle');\n\n/**\n * A collection of matrix and query URL parameters.\n * @see {@link convertToParamMap}\n * @see {@link ParamMap}\n *\n * @publicApi\n */\nexport type Params = {\n [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n /**\n * Reports whether the map contains a given parameter.\n * @param name The parameter name.\n * @returns True if the map contains the given parameter, false otherwise.\n */\n has(name: string): boolean;\n /**\n * Retrieves a single value for a parameter.\n * @param name The parameter name.\n * @return The parameter's single value,\n * or the first value if the parameter has multiple values,\n * or `null` when there is no such parameter.\n */\n get(name: string): string | null;\n /**\n * Retrieves multiple values for a parameter.\n * @param name The parameter name.\n * @return An array containing one or more values,\n * or an empty array if there is no such parameter.\n *\n */\n getAll(name: string): string[];\n\n /** Names of the parameters in the map. */\n readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n private params: Params;\n\n constructor(params: Params) {\n this.params = params || {};\n }\n\n has(name: string): boolean {\n return Object.prototype.hasOwnProperty.call(this.params, name);\n }\n\n get(name: string): string | null {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n\n return null;\n }\n\n getAll(name: string): string[] {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n\n return [];\n }\n\n get keys(): string[] {\n return Object.keys(this.params);\n }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n return new ParamsAsMap(params);\n}\n\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see {@link UrlMatchResult}\n * @see {@link Route}\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nexport function defaultUrlMatcher(\n segments: UrlSegment[],\n segmentGroup: UrlSegmentGroup,\n route: Route,\n): UrlMatchResult | null {\n const parts = route.path!.split('/');\n\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n\n if (\n route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)\n ) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n\n const posParams: {[key: string]: UrlSegment} = {};\n\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part[0] === ':';\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n\n return {consumed: segments.slice(0, parts.length), posParams};\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.dev/license\n */\n\nimport {ɵisPromise as isPromise} from '@angular/core';\nimport {from, isObservable, Observable, of} from 'rxjs';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\n\nexport function shallowEqual(\n a: {[key: string | symbol]: any},\n b: {[key: string | symbol]: any},\n): boolean {\n // While `undefined` should never be possible, it would sometimes be the case in IE 11\n // and pre-chromium Edge. The check below accounts for this edge case.\n const k1 = a ? getDataKeys(a) : undefined;\n const k2 = b ? getDataKeys(b) : undefined;\n if (!k1 || !k2 || k1.length != k2.length) {\n return false;\n }\n let key: string | symbol;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (!equalArraysOrString(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Gets the keys of an object, including `symbol` keys.\n */\nexport function getDataKeys(obj: Object): Array<string | symbol> {\n return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string | string[], b: string | string[]) {\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false;\n const aSorted = [...a].sort();\n const bSorted = [...b].sort();\n return aSorted.every((val, index) => bSorted[index] === val);\n } else {\n return a === b;\n }\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T | null {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n\nexport function wrapIntoObservable<T>(value: T | Promise<T> | Observable<T>): Observable<T> {\n if (isObservable(value)) {\n return value;\n }\n\n if (isPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n\n return of(value);\n}\n","/** prettier */\nimport { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\n\n/**\n * Tests to see if the object is an RxJS {@link Observable}\n * @param obj the object to test\n */\nexport function isObservable(obj: any): obj is Observable<unknown> {\n // The !! is to ensure that this publicly exposed function returns\n // `false` if something like `null` or `0` is passed.\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\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.dev/license\n */\n\nimport {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, shallowEqual} from './utils/collection';\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see {@link Router#isActive}\n */\nexport interface IsActiveMatchOptions {\n /**\n * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n *\n * The matrix parameter matching is dependent on the strategy for matching the\n * segments. That is, if the `paths` option is set to `'subset'`, only\n * the matrix parameters of the matching segments will be compared.\n *\n * - `'exact'`: Requires that matching segments also have exact matrix parameter\n * matches.\n * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n */\n matrixParams: 'exact' | 'subset' | 'ignored';\n /**\n * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n *\n * - `'exact'`: the query parameters must match exactly.\n * - `'subset'`: the active `UrlTree` may contain extra parameters,\n * but must match the key and value of any that exist in the `UrlTree` in question.\n * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n */\n queryParams: 'exact' | 'subset' | 'ignored';\n /**\n * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n *\n * - `'exact'`: all segments in each `UrlTree` must match.\n * - `'subset'`: a `UrlTree` will be determined to be active if it\n * is a subtree of the active route. That is, the active route may contain extra\n * segments, but must at least have all the segments of the `UrlTree` in question.\n */\n paths: 'exact' | 'subset';\n /**\n * - `'exact'`: indicates that the `UrlTree` fragments must be equal.\n * - `'ignored'`: the fragments will not be compared when determining if a\n * `UrlTree` is active.\n */\n fragment: 'exact' | 'ignored';\n}\n\ntype ParamMatchOptions = 'exact' | 'subset' | 'ignored';\n\ntype PathCompareFn = (\n container: UrlSegmentGroup,\n containee: UrlSegmentGroup,\n matrixParams: ParamMatchOptions,\n) => boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n 'exact': equalSegmentGroups,\n 'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n 'exact': equalParams,\n 'subset': containsParams,\n 'ignored': () => true,\n};\n\nexport function containsTree(\n container: UrlTree,\n containee: UrlTree,\n options: IsActiveMatchOptions,\n): boolean {\n return (\n pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n !(options.fragment === 'exact' && container.fragment !== containee.fragment)\n );\n}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n container: UrlSegmentGroup,\n containee: UrlSegmentGroup,\n matrixParams: ParamMatchOptions,\n): boolean {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n return false;\n }\n return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n return (\n Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every((key) => equalArraysOrString(container[key], containee[key]))\n );\n}\n\nfunction containsSegmentGroup(\n container: UrlSegmentGroup,\n containee: UrlSegmentGroup,\n matrixParams: ParamMatchOptions,\n): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n container: UrlSegmentGroup,\n containee: UrlSegmentGroup,\n containeePaths: UrlSegment[],\n matrixParams: ParamMatchOptions,\n): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n return true;\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n return false;\n }\n }\n return true;\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(\n container.children[PRIMARY_OUTLET],\n containee,\n next,\n matrixParams,\n );\n }\n}\n\nfunction matrixParamsMatch(\n containerPaths: UrlSegment[],\n containeePaths: UrlSegment[],\n options: ParamMatchOptions,\n) {\n return containeePaths.every((containeeSegment, i) => {\n return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n });\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n /** @internal */\n _queryParamMap?: ParamMap;\n\n constructor(\n /** The root segment group of the URL tree */\n public root: UrlSegmentGroup = new UrlSegmentGroup([], {}),\n /** The query params of the URL */\n public queryParams: Params = {},\n /** The fragment of the URL */\n public fragment: string | null = null,\n ) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (root.segments.length > 0) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT,\n 'The root `UrlSegmentGroup` should not contain `segments`. ' +\n 'Instead, these segments belong in the `children` so they can be associated with a named outlet.',\n );\n }\n }\n }\n\n get queryParamMap(): ParamMap {\n this._queryParamMap ??= convertToParamMap(this.queryParams);\n return this._queryParamMap;\n }\n\n /** @docsNotRequired */\n toString(): string {\n return DEFAULT_SERIALIZER.serialize(this);\n }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n /** The parent node in the url tree */\n parent: UrlSegmentGroup | null = null;\n\n constructor(\n /** The URL segments of this group. See `UrlSegment` for more information */\n public segments: UrlSegment[],\n /** The list of children of this group */\n public children: {[key: string]: UrlSegmentGroup},\n ) {\n Object.values(children).forEach((v) => (v.parent = this));\n }\n\n /** Whether the segment has child segments */\n hasChildren(): boolean {\n return this.numberOfChildren > 0;\n }\n\n /** Number of child segments */\n get numberOfChildren(): number {\n return Object.keys(this.children).length;\n }\n\n /** @docsNotRequired */\n toString(): string {\n return serializePaths(this);\n }\n}\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n /** @internal */\n _parameterMap?: ParamMap;\n\n constructor(\n /** The path part of a URL segment */\n public path: string,\n\n /** The matrix parameters associated with a segment */\n public parameters: {[name: string]: string},\n ) {}\n\n get parameterMap(): ParamMap {\n this._parameterMap ??= convertToParamMap(this.parameters);\n return this._parameterMap;\n }\n\n /** @docsNotRequired */\n toString(): string {\n return serializePath(this);\n }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n segment: UrlSegmentGroup,\n fn: (v: UrlSegmentGroup, k: string) => T[],\n): T[] {\n let res: T[] = [];\n Object.entries(segment.children).forEach(([childOutlet, child]) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n Object.entries(segment.children).forEach(([childOutlet, child]) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: () => new DefaultUrlSerializer()})\nexport abstract class UrlSerializer {\n /** Parse a url into a `UrlTree` */\n abstract parse(url: string): UrlTree;\n\n /** Converts a `UrlTree` into a url */\n abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url: string): UrlTree {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n\n /** Converts a `UrlTree` into a url */\n serialize(tree: UrlTree): string {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment =\n typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n return `${segment}${query}${fragment}`;\n }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n return segment.segments.map((p) => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET]\n ? serializeSegment(segment.children[PRIMARY_OUTLET], false)\n : '';\n const children: string[] = [];\n\n Object.entries(segment.children).forEach(([k, v]) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n } else {\n const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n\n return [`${k}:${serializeSegment(v, false)}`];\n });\n\n // use no parenthesis if the only child is a primary outlet route\n if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n return `${serializePaths(segment)}/${children[0]}`;\n }\n\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n return Object.entries(params)\n .map(([key, value]) => `;${encodeUriSegment(key)}=${encodeUriSegment(value)}`)\n .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n const strParams: string[] = Object.entries(params)\n .map(([name, value]) => {\n return Array.isArray(value)\n ? value.map((v) => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&')\n : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n })\n .filter((s) => s);\n\n return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;#]+/;\nfunction matchSegments(str: string): string {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst MATRIX_PARAM_SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchMatrixKeySegments(str: string): string {\n const match = str.match(MATRIX_PARAM_SEGMENT_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\n\nclass UrlParser {\n private remaining: string;\n\n constructor(private url: string) {\n this.remaining = url;\n }\n\n parseRootSegment(): UrlSegmentGroup {\n this.consumeOptional('/');\n\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n\n parseQueryParams(): Params {\n const params: Params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n\n parseFragment(): string | null {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n\n private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n if (this.remaining === '') {\n return {};\n }\n\n this.consumeOptional('/');\n\n const segments: UrlSegment[] = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n\n let children: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n\n let res: {[outlet: string]: UrlSegmentGroup} = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n\n return res;\n }\n\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n private parseSegment(): UrlSegment {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new RuntimeError(\n RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Empty path url segment cannot have parameters: '${this.remaining}'.`,\n );\n }\n\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n\n private parseMatrixParams(): {[key: string]: string} {\n const params: {[key: string]: string} = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n\n private parseParam(params: {[key: string]: string}): void {\n const key = matchMatrixKeySegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n params[decode(key)] = decode(value);\n }\n\n // Parse a single query parameter `name[=value]`\n private parseQueryParam(params: Params): void {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value: any = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n\n // parse `(a/b//outlet_name:c/d)`\n private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n const segments: {[key: string]: UrlSegmentGroup} = {};\n this.capture('(');\n\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n\n const next = this.remaining[path.length];\n\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new RuntimeError(\n RuntimeErrorCode.UNPARSABLE_URL,\n (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot parse url '${this.url}'`,\n );\n }\n\n let outletName: string = undefined!;\n if (path.indexOf(':') > -1) {\n outletName = path.slice(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n\n const children = this.parseChildren();\n segments[outletName] =\n Object.keys(children).length === 1\n ? children[PRIMARY_OUTLET]\n : new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n\n return segments;\n }\n\n private peekStartsWith(str: string): boolean {\n return this.remaining.startsWith(str);\n }\n\n // Consumes the prefix when it is present and returns whether it has been consumed\n private consumeOptional(str: string): boolean {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n\n private capture(str: string): void {\n if (!this.consumeOptional(str)) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL,\n (typeof ngDevMode === 'undefined' || ngDevMode) && `Expected \"${str}\".`,\n );\n }\n }\n}\n\nexport function createRoot(rootCandidate: UrlSegmentGroup) {\n return rootCandidate.segments.length > 0\n ? new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate})\n : rootCandidate;\n}\n\n/**\n * Recursively\n * - merges primary segment children into their parents\n * - drops empty children (those which have no segments and no children themselves). This latter\n * prevents serializing a group into something like `/a(aux:)`, where `aux` is an empty child\n * segment.\n * - merges named outlets without a primary segment sibling into the children. This prevents\n * serializing a URL like `//(a:a)(b:b) instead of `/(a:a//b:b)` when the aux b route lives on the\n * root but the `a` route lives under an empty path primary route.\n */\nexport function squashSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n const newChildren: Record<string, UrlSegmentGroup> = {};\n for (const [childOutlet, child] of Object.entries(segmentGroup.children)) {\n const childCandidate = squashSegmentGroup(child);\n // moves named children in an empty path primary child into this group\n if (\n childOutlet === PRIMARY_OUTLET &&\n childCandidate.segments.length === 0 &&\n childCandidate.hasChildren()\n ) {\n for (const [grandChildOutlet, grandChild] of Object.entries(childCandidate.children)) {\n newChildren[grandChildOutlet] = grandChild;\n }\n } // don't add empty children\n else if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n newChildren[childOutlet] = childCandidate;\n }\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n return mergeTrivialChildren(s);\n}\n\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n\n return s;\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n return v instanceof UrlTree;\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.dev/license\n */\n\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {createRoot, squashSegmentGroup, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last, shallowEqual} from './utils/collection';\n\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n * any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nexport function createUrlTreeFromSnapshot(\n relativeTo: ActivatedRouteSnapshot,\n commands: any[],\n queryParams: Params | null = null,\n fragment: string | null = null,\n): UrlTree {\n const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\n\nexport function createSegmentGroupFromRoute(route: ActivatedRouteSnapshot): UrlSegmentGroup {\n let targetGroup: UrlSegmentGroup | undefined;\n\n function createSegmentGroupFromRouteRecursive(\n currentRoute: ActivatedRouteSnapshot,\n ): UrlSegmentGroup {\n const childOutlets: {[outlet: string]: UrlSegmentGroup} = {};\n for (const childSnapshot of currentRoute.children) {\n const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n childOutlets[childSnapshot.outlet] = root;\n }\n const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n if (currentRoute === route) {\n targetGroup = segmentGroup;\n }\n return segmentGroup;\n }\n const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n const rootSegmentGroup = createRoot(rootCandidate);\n\n return targetGroup ?? rootSegmentGroup;\n}\n\nexport function createUrlTreeFromSegmentGroup(\n relativeTo: UrlSegmentGroup,\n commands: any[],\n queryParams: Params | null,\n fragment: string | null,\n): UrlTree {\n let root = relativeTo;\n while (root.parent) {\n root = root.parent;\n }\n // There are no commands so the `UrlTree` goes to the same path as the one created from the\n // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n // applying any other logic.\n if (commands.length === 0) {\n return tree(root, root, root, queryParams, fragment);\n }\n\n const nav = computeNavigation(commands);\n\n if (nav.toRoot()) {\n return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n\n const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n const newSegmentGroup = position.processChildren\n ? updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands)\n : updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command: any): command is {outlets: {[key: string]: any}} {\n return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n oldRoot: UrlSegmentGroup,\n oldSegmentGroup: UrlSegmentGroup,\n newSegmentGroup: UrlSegmentGroup,\n queryParams: Params | null,\n fragment: string | null,\n): UrlTree {\n let qp: any = {};\n if (queryParams) {\n Object.entries(queryParams).forEach(([name, value]) => {\n qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n });\n }\n\n let rootCandidate: UrlSegmentGroup;\n if (oldRoot === oldSegmentGroup) {\n rootCandidate = newSegmentGroup;\n } else {\n rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n }\n\n const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n return new UrlTree(newRoot, qp, fragment);\n}\n\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(\n current: UrlSegmentGroup,\n oldSegment: UrlSegmentGroup,\n newSegment: UrlSegmentGroup,\n): UrlSegmentGroup {\n const children: {[key: string]: UrlSegmentGroup} = {};\n Object.entries(current.children).forEach(([outletName, c]) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n constructor(\n public isAbsolute: boolean,\n public numberOfDoubleDots: number,\n public commands: any[],\n ) {\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new RuntimeError(\n RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Root segment cannot have matrix parameters',\n );\n }\n\n const cmdWithOutlet = commands.find(isCommandWithOutlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new RuntimeError(\n RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n '{outlets:{}} has to be the last command',\n );\n }\n }\n\n public toRoot(): boolean {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n if (typeof commands[0] === 'string' && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n\n const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets: {[k: string]: any} = {};\n Object.entries(cmd.outlets).forEach(([name, commands]) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {outlets}];\n }\n\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') {\n // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') {\n // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n\n return res;\n }\n\n return [...res, cmd];\n }, []);\n\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n constructor(\n public segmentGroup: UrlSegmentGroup,\n public processChildren: boolean,\n public index: number,\n ) {}\n}\n\nfunction findStartingPositionForTargetGroup(\n nav: Navigation,\n root: UrlSegmentGroup,\n target: UrlSegmentGroup,\n): Position {\n if (nav.isAbsolute) {\n return new Position(root, true, 0);\n }\n\n if (!target) {\n // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n return new Position(root, false, NaN);\n }\n if (target.parent === null) {\n return new Position(target, true, 0);\n }\n\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = target.segments.length - 1 + modifier;\n return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n group: UrlSegmentGroup,\n index: number,\n numberOfDoubleDots: number,\n): Position {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent!;\n if (!g) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_DOUBLE_DOTS,\n (typeof ngDevMode === 'undefined' || ngDevMode) && \"Invalid number of '../'\",\n );\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[] | string} {\n if (isCommandWithOutlets(commands[0])) {\n return commands[0].outlets;\n }\n\n return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n segmentGroup: UrlSegmentGroup | undefined,\n startIndex: number,\n commands: any[],\n): UrlSegmentGroup {\n segmentGroup ??= new UrlSegmentGroup([], {});\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(\n segmentGroup.segments.slice(m.pathIndex),\n segmentGroup.children,\n );\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\n\nfunction updateSegmentGroupChildren(\n segmentGroup: UrlSegmentGroup,\n startIndex: number,\n commands: any[],\n): UrlSegmentGroup {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children: {[key: string]: UrlSegmentGroup} = {};\n // If the set of commands applies to anything other than the primary outlet and the child\n // segment is an empty path primary segment on its own, we want to apply the commands to the\n // empty child path rather than here. The outcome is that the empty primary child is effectively\n // removed from the final output UrlTree. Imagine the following config:\n //\n // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n //\n // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n // navigation with commands\n // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n // root segment because that would result in\n // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n // the `ActivatedRoute` rather than updating the existing one.\n //\n // Because empty paths do not appear in the URL segments and the fact that the segments used in\n // the output `UrlTree` are squashed to eliminate these empty paths where possible\n // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n // it can be hard to determine what is the right thing to do when applying commands to a\n // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n // the same level of the tree.\n if (\n Object.keys(outlets).some((o) => o !== PRIMARY_OUTLET) &&\n segmentGroup.children[PRIMARY_OUTLET] &&\n segmentGroup.numberOfChildren === 1 &&\n segmentGroup.children[PRIMARY_OUTLET].segments.length === 0\n ) {\n const childrenOfEmptyChild = updateSegmentGroupChildren(\n segmentGroup.children[PRIMARY_OUTLET],\n startIndex,\n commands,\n );\n return new UrlSegmentGroup(segmentGroup.segments, childrenOfEmptyChild.children);\n }\n\n Object.entries(outlets).forEach(([outlet, commands]) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n\n Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n\n const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const command = commands[currentCommandIndex];\n // Do not try to consume command as part of the prefixing if it has outlets because it can\n // contain outlets other than the one being processed. Consuming the outlets command would\n // result in other outlets being ignored.\n if (isCommandWithOutlets(command)) {\n break;\n }\n const curr = `${command}`;\n const next =\n currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n if (currentPathIndex > 0 && curr === undefined) break;\n\n if (curr && next && typeof next === 'object' && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n\n return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n segmentGroup: UrlSegmentGroup,\n startIndex: number,\n commands: any[],\n): UrlSegmentGroup {\n const paths = segmentGroup.segments.slice(0, startIndex);\n\n let i = 0;\n while (i < commands.length) {\n const command = commands[i];\n if (isCommandWithOutlets(command)) {\n const children = createNewSegmentChildren(command.outlets);\n return new UrlSegmentGroup(paths, children);\n }\n\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, stringify(commands[0])));\n i++;\n continue;\n }\n\n const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n const next = i < commands.length - 1 ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[] | string}): {\n [outlet: string]: UrlSegmentGroup;\n} {\n const children: {[outlet: string]: UrlSegmentGroup} = {};\n Object.entries(outlets).forEach(([outlet, commands]) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n const res: {[key: string]: string} = {};\n Object.entries(params).forEach(([k, v]) => (res[k] = `${v}`));\n return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n return path == segment.path && shallowEqual(params, segment.parameters);\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.dev/license\n */\n\nimport {NavigationBehaviorOptions, Route} from './models';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\nimport {UrlTree} from './url_tree';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative' | 'popstate' | 'hashchange';\nexport const IMPERATIVE_NAVIGATION = 'imperative';\n\n/**\n * Identifies the type of a router event.\n *\n * @publicApi\n */\nexport enum EventType {\n NavigationStart,\n NavigationEnd,\n NavigationCancel,\n NavigationError,\n RoutesRecognized,\n ResolveStart,\n ResolveEnd,\n GuardsCheckStart,\n GuardsCheckEnd,\n RouteConfigLoadStart,\n RouteConfigLoadEnd,\n ChildActivationStart,\n ChildActivationEnd,\n ActivationStart,\n ActivationEnd,\n Scroll,\n NavigationSkipped,\n}\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n * constructor(public router: Router) {\n * router.events.pipe(\n * filter((e: Event | RouterEvent): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * // Do something\n * });\n * }\n * }\n * ```\n *\n * @see {@link Event}\n * @see [Router events summary](guide/routing/router-reference#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n constructor(\n /** A unique ID that the router assigns to every router navigation. */\n public id: number,\n /** The URL that is the destination for this navigation. */\n public url: string,\n ) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n readonly type = EventType.NavigationStart;\n\n /**\n * Identifies the call or event that triggered the navigation.\n * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n *\n * @see {@link NavigationEnd}\n * @see {@link NavigationCancel}\n * @see {@link NavigationError}\n */\n navigationTrigger?: NavigationTrigger;\n\n /**\n * The navigation state that was previously supplied to the `pushState` call,\n * when the navigation is triggered by a `popstate` event. Otherwise null.\n *\n * The state object is defined by `NavigationExtras`, and contains any\n * developer-defined state value, as well as a unique ID that\n * the router assigns to every router transition/navigation.\n *\n * From the perspective of the router, the router never \"goes back\".\n * When the user clicks on the back button in the browser,\n * a new navigation ID is created.\n *\n * Use the ID in this previous-state object to differentiate between a newly created\n * state and one returned to by a `popstate` event, so that you can restore some\n * remembered state, such as scroll position.\n *\n */\n restoredState?: {[k: string]: any; navigationId: number} | null;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n navigationTrigger: NavigationTrigger = 'imperative',\n /** @docsNotRequired */\n restoredState: {[k: string]: any; navigationId: number} | null = null,\n ) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n\n /** @docsNotRequired */\n override toString(): string {\n return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationCancel}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n readonly type = EventType.NavigationEnd;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n ) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n override toString(): string {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n\n/**\n * A code for the `NavigationCancel` event of the `Router` to indicate the\n * reason a navigation failed.\n *\n * @publicApi\n */\nexport enum NavigationCancellationCode {\n /**\n * A navigation failed because a guard returned a `UrlTree` to redirect.\n */\n Redirect,\n /**\n * A navigation failed because a more recent navigation started.\n */\n SupersededByNewNavigation,\n /**\n * A navigation failed because one of the resolvers completed without emitting a value.\n */\n NoDataFromResolver,\n /**\n * A navigation failed because a guard returned `false`.\n */\n GuardRejected,\n}\n\n/**\n * A code for the `NavigationSkipped` event of the `Router` to indicate the\n * reason a navigation was skipped.\n *\n * @publicApi\n */\nexport enum NavigationSkippedCode {\n /**\n * A navigation was skipped because the navigation URL was the same as the current Router URL.\n */\n IgnoredSameUrlNavigation,\n /**\n * A navigation was skipped because the configured `UrlHandlingStrategy` return `false` for both\n * the current Router URL and the target of the navigation.\n *\n * @see {@link UrlHandlingStrategy}\n */\n IgnoredByUrlHandlingStrategy,\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n readonly type = EventType.NavigationCancel;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /**\n * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n * instead for a stable cancellation reason that can be used in production.\n */\n public reason: string,\n /**\n * A code to indicate why the navigation was canceled. This cancellation code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n readonly code?: NavigationCancellationCode,\n ) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n override toString(): string {\n return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n }\n}\n\n/**\n * An event triggered when a navigation is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nexport class NavigationSkipped extends RouterEvent {\n readonly type = EventType.NavigationSkipped;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /**\n * A description of why the navigation was skipped. For debug purposes only. Use `code`\n * instead for a stable skipped reason that can be used in production.\n */\n public reason: string,\n /**\n * A code to indicate why the navigation was skipped. This code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n readonly code?: NavigationSkippedCode,\n ) {\n super(id, url);\n }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationCancel}\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n readonly type = EventType.NavigationError;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public error: any,\n /**\n * The target of the navigation when the error occurred.\n *\n * Note that this can be `undefined` because an error could have occurred before the\n * `RouterStateSnapshot` was created for the navigation.\n */\n readonly target?: RouterStateSnapshot,\n ) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n override toString(): string {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n readonly type = EventType.RoutesRecognized;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n ) {\n super(id, url);\n }\n\n /** @docsNotRequired */\n override toString(): string {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see {@link GuardsCheckEnd}\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n readonly type = EventType.GuardsCheckStart;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n ) {\n super(id, url);\n }\n\n override toString(): string {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see {@link GuardsCheckStart}\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n readonly type = EventType.GuardsCheckEnd;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n /** @docsNotRequired */\n public shouldActivate: boolean,\n ) {\n super(id, url);\n }\n\n override toString(): string {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see {@link ResolveEnd}\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n readonly type = EventType.ResolveStart;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n ) {\n super(id, url);\n }\n\n override toString(): string {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n readonly type = EventType.ResolveEnd;\n\n constructor(\n /** @docsNotRequired */\n id: number,\n /** @docsNotRequired */\n url: string,\n /** @docsNotRequired */\n public urlAfterRedirects: string,\n /** @docsNotRequired */\n public state: RouterStateSnapshot,\n ) {\n super(id, url);\n }\n\n override toString(): string {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see {@link RouteConfigLoadEnd}\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n readonly type = EventType.RouteConfigLoadStart;\n\n constructor(\n /** @docsNotRequired */\n public route: Route,\n ) {}\n toString(): string {\n return `RouteConfigLoadStart(path: ${this.route.path})`;\n }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see {@link RouteConfigLoadStart}\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n readonly type = EventType.RouteConfigLoadEnd;\n\n constructor(\n /** @docsNotRequired */\n public route: Route,\n ) {}\n toString(): string {\n return `RouteConfigLoadEnd(path: ${this.route.path})`;\n }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see {@link ChildActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n readonly type = EventType.ChildActivationStart;\n\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot,\n ) {}\n toString(): string {\n const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see {@link ChildActivationStart}\n * @see {@link ResolveStart}\n * @publicApi\n */\nexport class ChildActivationEnd {\n readonly type = EventType.ChildActivationEnd;\n\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot,\n ) {}\n toString(): string {\n const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nexport class ActivationStart {\n readonly type = EventType.ActivationStart;\n\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot,\n ) {}\n toString(): string {\n const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationStart}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nexport class ActivationEnd {\n readonly type = EventType.ActivationEnd;\n\n constructor(\n /** @docsNotRequired */\n public snapshot: ActivatedRouteSnapshot,\n ) {}\n toString(): string {\n const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n readonly type = EventType.Scroll;\n\n constructor(\n /** @docsNotRequired */\n readonly routerEvent: NavigationEnd | NavigationSkipped,\n\n /** @docsNotRequired */\n readonly position: [number, number] | null,\n\n /** @docsNotRequired */\n readonly anchor: string | null,\n ) {}\n\n toString(): string {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\n\nexport class BeforeActivateRoutes {}\nexport class RedirectRequest {\n constructor(\n readonly url: UrlTree,\n readonly navigationBehaviorOptions: NavigationBehaviorOptions | undefined,\n ) {}\n}\nexport type PrivateRouterEvents = BeforeActivateRoutes | RedirectRequest;\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](guide/routing/common-router-tasks#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event =\n | NavigationStart\n | NavigationEnd\n | NavigationCancel\n | NavigationError\n | RoutesRecognized\n | GuardsCheckStart\n | GuardsCheckEnd\n | RouteConfigLoadStart\n | RouteConfigLoadEnd\n | ChildActivationStart\n | ChildActivationEnd\n | ActivationStart\n | ActivationEnd\n | Scroll\n | ResolveStart\n | ResolveEnd\n | NavigationSkipped;\n\nexport function stringifyEvent(routerEvent: Event): string {\n switch (routerEvent.type) {\n case EventType.ActivationEnd:\n return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ActivationStart:\n return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ChildActivationEnd:\n return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ChildActivationStart:\n return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.GuardsCheckEnd:\n return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n case EventType.GuardsCheckStart:\n return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.NavigationCancel:\n return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.NavigationSkipped:\n return `NavigationSkipped(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.NavigationEnd:\n return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n case EventType.NavigationError:\n return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n case EventType.NavigationStart:\n return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.ResolveEnd:\n return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.ResolveStart:\n return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.RouteConfigLoadEnd:\n return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n case EventType.RouteConfigLoadStart:\n return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n case EventType.RoutesRecognized:\n return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.Scroll:\n const pos = routerEvent.position\n ? `${routerEvent.position[0]}, ${routerEvent.position[1]}`\n : null;\n return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\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.dev/license\n */\n\nimport {\n createEnvironmentInjector,\n EnvironmentInjector,\n isStandalone,\n Type,\n ɵisNgModule as isNgModule,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\nimport {Route, Routes} from '../models';\nimport {ActivatedRouteSnapshot} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nexport function getOrCreateRouteInjectorIfNeeded(\n route: Route,\n currentInjector: EnvironmentInjector,\n) {\n if (route.providers && !route._injector) {\n route._injector = createEnvironmentInjector(\n route.providers,\n currentInjector,\n `Route: ${route.path}`,\n );\n }\n return route._injector ?? currentInjector;\n}\n\nexport function getLoadedRoutes(route: Route): Route[] | undefined {\n return route._loadedRoutes;\n}\n\nexport function getLoadedInjector(route: Route): EnvironmentInjector | undefined {\n return route._loadedInjector;\n}\nexport function getLoadedComponent(route: Route): Type<unknown> | undefined {\n return route._loadedComponent;\n}\n\nexport function getProvidersInjector(route: Route): EnvironmentInjector | undefined {\n return route._injector;\n}\n\nexport function validateConfig(\n config: Routes,\n parentPath: string = '',\n requireStandaloneComponents = false,\n): void {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route: Route = config[i];\n const fullPath: string = getFullPath(parentPath, route);\n validateNode(route, fullPath, requireStandaloneComponents);\n }\n}\n\nexport function assertStandalone(fullPath: string, component: Type<unknown> | undefined) {\n if (component && isNgModule(component)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +\n `but it must be used with standalone components. Use 'loadChildren' instead.`,\n );\n } else if (component && !isStandalone(component)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}'. The component must be standalone.`,\n );\n }\n}\n\nfunction validateNode(route: Route, fullPath: string, requireStandaloneComponents: boolean): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!route) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `,\n );\n }\n if (Array.isArray(route)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': Array cannot be specified`,\n );\n }\n if (\n !route.redirectTo &&\n !route.component &&\n !route.loadComponent &&\n !route.children &&\n !route.loadChildren &&\n route.outlet &&\n route.outlet !== PRIMARY_OUTLET\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`,\n );\n }\n if (route.redirectTo && route.children) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`,\n );\n }\n if (route.redirectTo && route.loadChildren) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`,\n );\n }\n if (route.children && route.loadChildren) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`,\n );\n }\n if (route.redirectTo && (route.component || route.loadComponent)) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`,\n );\n }\n if (route.component && route.loadComponent) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`,\n );\n }\n if (route.redirectTo && route.canActivate) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n `so canActivate will never be executed.`,\n );\n }\n if (route.path && route.matcher) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`,\n );\n }\n if (\n route.redirectTo === void 0 &&\n !route.component &&\n !route.loadComponent &&\n !route.children &&\n !route.loadChildren\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`,\n );\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`,\n );\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '${fullPath}': path cannot start with a slash`,\n );\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTE_CONFIG,\n `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`,\n );\n }\n if (requireStandaloneComponents) {\n assertStandalone(fullPath, route.component);\n }\n }\n if (route.children) {\n validateConfig(route.children, fullPath, requireStandaloneComponents);\n }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n const sortedConfig = routes.filter((r) => getOutlet(r) === outletName);\n sortedConfig.push(...routes.filter((r) => getOutlet(r) !== outletName));\n return sortedConfig;\n}\n\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nexport function getClosestRouteInjector(\n snapshot: ActivatedRouteSnapshot | undefined,\n): EnvironmentInjector | null {\n if (!snapshot) return null;\n\n // If the current route has its own injector, which is created from the static providers on the\n // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n // include the lazy loaded injector from this route.\n if (snapshot.routeConfig?._injector) {\n return snapshot.routeConfig._injector;\n }\n\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n // Note that the order here is important. `_loadedInjector` stored on the route with\n // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n // is created from the static providers on that parent route, so it applies to the children as\n // well, but only if there is no lazy loaded NgModuleRef injector.\n if (route?._loadedInjector) return route._loadedInjector;\n if (route?._injector) return route._injector;\n }\n\n return null;\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.dev/license\n */\n\nimport {ComponentRef, EnvironmentInjector, Injectable} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\nimport {getClosestRouteInjector} from './utils/config';\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n outlet: RouterOutletContract | null = null;\n route: ActivatedRoute | null = null;\n children = new ChildrenOutletContexts(this.rootInjector);\n attachRef: ComponentRef<any> | null = null;\n get injector(): EnvironmentInjector {\n return getClosestRouteInjector(this.route?.snapshot) ?? this.rootInjector;\n }\n // TODO(atscott): Only here to avoid a \"breaking\" change in a patch/minor. Remove in v19.\n set injector(_: EnvironmentInjector) {}\n\n constructor(private readonly rootInjector: EnvironmentInjector) {}\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class ChildrenOutletContexts {\n // contexts for child outlets, by name.\n private contexts = new Map<string, OutletContext>();\n\n /** @nodoc */\n constructor(private rootInjector: EnvironmentInjector) {}\n\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName: string): void {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n context.attachRef = null;\n }\n }\n\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated(): Map<string, OutletContext> {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n\n onOutletReAttached(contexts: Map<string, OutletContext>) {\n this.contexts = contexts;\n }\n\n getOrCreateContext(childName: string): OutletContext {\n let context = this.getContext(childName);\n\n if (!context) {\n context = new OutletContext(this.rootInjector);\n this.contexts.set(childName, context);\n }\n\n return context;\n }\n\n getContext(childName: string): OutletContext | null {\n return this.contexts.get(childName) || null;\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.dev/license\n */\n\nexport class Tree<T> {\n /** @internal */\n _root: TreeNode<T>;\n\n constructor(root: TreeNode<T>) {\n this._root = root;\n }\n\n get root(): T {\n return this._root.value;\n }\n\n /**\n * @internal\n */\n parent(t: T): T | null {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n\n /**\n * @internal\n */\n children(t: T): T[] {\n const n = findNode(t, this._root);\n return n ? n.children.map((t) => t.value) : [];\n }\n\n /**\n * @internal\n */\n firstChild(t: T): T | null {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n\n /**\n * @internal\n */\n siblings(t: T): T[] {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n\n const c = p[p.length - 2].children.map((c) => c.value);\n return c.filter((cc) => cc !== t);\n }\n\n /**\n * @internal\n */\n pathFromRoot(t: T): T[] {\n return findPath(t, this._root).map((s) => s.value);\n }\n}\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T> | null {\n if (value === node.value) return node;\n\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n\n return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n if (value === node.value) return [node];\n\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n\n return [];\n}\n\nexport class TreeNode<T> {\n constructor(\n public value: T,\n public children: TreeNode<T>[],\n ) {}\n\n toString(): string {\n return `TreeNode(${this.value})`;\n }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T> | null) {\n const map: {[outlet: string]: TreeNode<T>} = {};\n\n if (node) {\n node.children.forEach((child) => (map[child.value.outlet] = child));\n }\n\n return map;\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.dev/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './models';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET, RouteTitleKey} from './shared';\nimport {equalSegments, UrlSegment} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @see {@link ActivatedRoute}\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n /** @internal */\n constructor(\n root: TreeNode<ActivatedRoute>,\n /** The current snapshot of the router state */\n public snapshot: RouterStateSnapshot,\n ) {\n super(root);\n setRouterState(<RouterState>this, root);\n }\n\n override toString(): string {\n return this.snapshot.toString();\n }\n}\n\nexport function createEmptyState(rootComponent: Type<any> | null): RouterState {\n const snapshot = createEmptyStateSnapshot(rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject<string | null>('');\n const activated = new ActivatedRoute(\n emptyUrl,\n emptyParams,\n emptyQueryParams,\n fragment,\n emptyData,\n PRIMARY_OUTLET,\n rootComponent,\n snapshot.root,\n );\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(rootComponent: Type<any> | null): RouterStateSnapshot {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot(\n [],\n emptyParams,\n emptyQueryParams,\n fragment,\n emptyData,\n PRIMARY_OUTLET,\n rootComponent,\n null,\n {},\n );\n return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n * header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n /** The current snapshot of this route */\n snapshot!: ActivatedRouteSnapshot;\n /** @internal */\n _futureSnapshot: ActivatedRouteSnapshot;\n /** @internal */\n _routerState!: RouterState;\n /** @internal */\n _paramMap?: Observable<ParamMap>;\n /** @internal */\n _queryParamMap?: Observable<ParamMap>;\n\n /** An Observable of the resolved route title */\n readonly title: Observable<string | undefined>;\n\n /** An observable of the URL segments matched by this route. */\n public url: Observable<UrlSegment[]>;\n /** An observable of the matrix parameters scoped to this route. */\n public params: Observable<Params>;\n /** An observable of the query parameters shared by all the routes. */\n public queryParams: Observable<Params>;\n /** An observable of the URL fragment shared by all the routes. */\n public fragment: Observable<string | null>;\n /** An observable of the static and resolved data of this route. */\n public data: Observable<Data>;\n\n /** @internal */\n constructor(\n /** @internal */\n public urlSubject: BehaviorSubject<UrlSegment[]>,\n /** @internal */\n public paramsSubject: BehaviorSubject<Params>,\n /** @internal */\n public queryParamsSubject: BehaviorSubject<Params>,\n /** @internal */\n public fragmentSubject: BehaviorSubject<string | null>,\n /** @internal */\n public dataSubject: BehaviorSubject<Data>,\n /** The outlet name of the route, a constant. */\n public outlet: string,\n /** The component of the route, a constant. */\n public component: Type<any> | null,\n futureSnapshot: ActivatedRouteSnapshot,\n ) {\n this._futureSnapshot = futureSnapshot;\n this.title = this.dataSubject?.pipe(map((d: Data) => d[RouteTitleKey])) ?? of(undefined);\n // TODO(atscott): Verify that these can be changed to `.asObservable()` with TGP.\n this.url = urlSubject;\n this.params = paramsSubject;\n this.queryParams = queryParamsSubject;\n this.fragment = fragmentSubject;\n this.data = dataSubject;\n }\n\n /** The configuration used to match this route. */\n get routeConfig(): Route | null {\n return this._futureSnapshot.routeConfig;\n }\n\n /** The root of the router state. */\n get root(): ActivatedRoute {\n return this._routerState.root;\n }\n\n /** The parent of this route in the router state tree. */\n get parent(): ActivatedRoute | null {\n return this._routerState.parent(this);\n }\n\n /** The first child of this route in the router state tree. */\n get firstChild(): ActivatedRoute | null {\n return this._routerState.firstChild(this);\n }\n\n /** The children of this route in the router state tree. */\n get children(): ActivatedRoute[] {\n return this._routerState.children(this);\n }\n\n /** The path from the root of the router state tree to this route. */\n get pathFromRoot(): ActivatedRoute[] {\n return this._routerState.pathFromRoot(this);\n }\n\n /**\n * An Observable that contains a map of the required and optional parameters\n * specific to the route.\n * The map supports retrieving single and multiple values from the same parameter.\n */\n get paramMap(): Observable<ParamMap> {\n this._paramMap ??= this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n return this._paramMap;\n }\n\n /**\n * An Observable that contains a map of the query parameters available to all routes.\n * The map supports retrieving single and multiple values from the query parameter.\n */\n get queryParamMap(): Observable<ParamMap> {\n this._queryParamMap ??= this.queryParams.pipe(\n map((p: Params): ParamMap => convertToParamMap(p)),\n );\n return this._queryParamMap;\n }\n\n toString(): string {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly' | 'always';\n\n/** @internal */\nexport type Inherited = {\n params: Params;\n data: Data;\n resolve: Data;\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n *\n * By default, we do not inherit parent data unless the current route is path-less or the parent\n * route is component-less.\n */\nexport function getInherited(\n route: ActivatedRouteSnapshot,\n parent: ActivatedRouteSnapshot | null,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n): Inherited {\n let inherited: Inherited;\n const {routeConfig} = route;\n if (\n parent !== null &&\n (paramsInheritanceStrategy === 'always' ||\n // inherit parent data if route is empty path\n routeConfig?.path === '' ||\n // inherit parent data if parent was componentless\n (!parent.component && !parent.routeConfig?.loadComponent))\n ) {\n inherited = {\n params: {...parent.params, ...route.params},\n data: {...parent.data, ...route.data},\n resolve: {\n // Snapshots are created with data inherited from parent and guards (i.e. canActivate) can\n // change data because it's not frozen...\n // This first line could be deleted chose to break/disallow mutating the `data` object in\n // guards.\n // Note that data from parents still override this mutated data so anyone relying on this\n // might be surprised that it doesn't work if parent data is inherited but otherwise does.\n ...route.data,\n // Ensure inherited resolved data overrides inherited static data\n ...parent.data,\n // static data from the current route overrides any inherited data\n ...routeConfig?.data,\n // resolved data from current route overrides everything\n ...route._resolvedData,\n },\n };\n } else {\n inherited = {\n params: {...route.params},\n data: {...route.data},\n resolve: {...route.data, ...(route._resolvedData ?? {})},\n };\n }\n\n if (routeConfig && hasStaticTitle(routeConfig)) {\n inherited.resolve[RouteTitleKey] = routeConfig.title;\n }\n return inherited;\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n /** The configuration used to match this route **/\n public readonly routeConfig: Route | null;\n /** @internal */\n _resolve: ResolveData;\n /** @internal */\n _resolvedData?: Data;\n /** @internal */\n _routerState!: RouterStateSnapshot;\n /** @internal */\n _paramMap?: ParamMap;\n /** @internal */\n _queryParamMap?: ParamMap;\n\n /** The resolved route title */\n get title(): string | undefined {\n // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n // available at the time of class instantiation.\n return this.data?.[RouteTitleKey];\n }\n\n /** @internal */\n constructor(\n /** The URL segments matched by this route */\n public url: UrlSegment[],\n /**\n * The matrix parameters scoped to this route.\n *\n * You can compute all params (or data) in the router state or to get params outside\n * of an activated component by traversing the `RouterState` tree as in the following\n * example:\n * ```\n * collectRouteParams(router: Router) {\n * let params = {};\n * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n * while (stack.length > 0) {\n * const route = stack.pop()!;\n * params = {...params, ...route.params};\n * stack.push(...route.children);\n * }\n * return params;\n * }\n * ```\n */\n public params: Params,\n /** The query parameters shared by all the routes */\n public queryParams: Params,\n /** The URL fragment shared by all the routes */\n public fragment: string | null,\n /** The static and resolved data of this route */\n public data: Data,\n /** The outlet name of the route */\n public outlet: string,\n /** The component of the route */\n public component: Type<any> | null,\n routeConfig: Route | null,\n resolve: ResolveData,\n ) {\n this.routeConfig = routeConfig;\n this._resolve = resolve;\n }\n\n /** The root of the router state */\n get root(): ActivatedRouteSnapshot {\n return this._routerState.root;\n }\n\n /** The parent of this route in the router state tree */\n get parent(): ActivatedRouteSnapshot | null {\n return this._routerState.parent(this);\n }\n\n /** The first child of this route in the router state tree */\n get firstChild(): ActivatedRouteSnapshot | null {\n return this._routerState.firstChild(this);\n }\n\n /** The children of this route in the router state tree */\n get children(): ActivatedRouteSnapshot[] {\n return this._routerState.children(this);\n }\n\n /** The path from the root of the router state tree to this route */\n get pathFromRoot(): ActivatedRouteSnapshot[] {\n return this._routerState.pathFromRoot(this);\n }\n\n get paramMap(): ParamMap {\n this._paramMap ??= convertToParamMap(this.params);\n return this._paramMap;\n }\n\n get queryParamMap(): ParamMap {\n this._queryParamMap ??= convertToParamMap(this.queryParams);\n return this._queryParamMap;\n }\n\n toString(): string {\n const url = this.url.map((segment) => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable<string> = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n /** @internal */\n constructor(\n /** The url from which this snapshot was created */\n public url: string,\n root: TreeNode<ActivatedRouteSnapshot>,\n ) {\n super(root);\n setRouterState(<RouterStateSnapshot>this, root);\n }\n\n override toString(): string {\n return serializeNode(this._root);\n }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n node.value._routerState = state;\n node.children.forEach((c) => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParamsSubject.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragmentSubject.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.paramsSubject.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.urlSubject.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.dataSubject.next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n\n // this is for resolved data\n route.dataSubject.next(route._futureSnapshot.data);\n }\n}\n\nexport function equalParamsAndUrlSegments(\n a: ActivatedRouteSnapshot,\n b: ActivatedRouteSnapshot,\n): boolean {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n\n return (\n equalUrlParams &&\n !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!))\n );\n}\n\nexport function hasStaticTitle(config: Route) {\n return typeof config.title === 'string' || config.title === null;\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.dev/license\n */\n\nimport {\n ChangeDetectorRef,\n ComponentRef,\n Directive,\n EnvironmentInjector,\n EventEmitter,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Output,\n reflectComponentType,\n SimpleChanges,\n ViewContainerRef,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {combineLatest, of, Subscription} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from '../errors';\nimport {Data} from '../models';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see {@link ChildrenOutletContexts}\n * @publicApi\n */\nexport interface RouterOutletContract {\n /**\n * Whether the given outlet is activated.\n *\n * An outlet is considered \"activated\" if it has an active component.\n */\n isActivated: boolean;\n\n /** The instance of the activated component or `null` if the outlet is not activated. */\n component: Object | null;\n\n /**\n * The `Data` of the `ActivatedRoute` snapshot.\n */\n activatedRouteData: Data;\n\n /**\n * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n */\n activatedRoute: ActivatedRoute | null;\n\n /**\n * Called by the `Router` when the outlet should activate (create a component).\n */\n activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector): void;\n\n /**\n * A request to destroy the currently activated component.\n *\n * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n * later re-use rather than destroyed, the `Router` will call `detach` instead.\n */\n deactivate(): void;\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n *\n * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n * Instead, it is returned so that it can be reattached later via the `attach` method.\n */\n detach(): ComponentRef<unknown>;\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n */\n attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n /**\n * Emits an activate event when a new component is instantiated\n **/\n activateEvents?: EventEmitter<unknown>;\n\n /**\n * Emits a deactivate event when a component is destroyed.\n */\n deactivateEvents?: EventEmitter<unknown>;\n\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n attachEvents?: EventEmitter<unknown>;\n\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n detachEvents?: EventEmitter<unknown>;\n\n /**\n * Used to indicate that the outlet is able to bind data from the `Router` to the outlet\n * component's inputs.\n *\n * When this is `undefined` or `false` and the developer has opted in to the\n * feature using `withComponentInputBinding`, a warning will be logged in dev mode if this outlet\n * is used in the application.\n */\n readonly supportsBindingToComponentInputs?: true;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'\n * (attach)='onAttach($event)'\n * (detach)='onDetach($event)'></router-outlet>\n * ```\n *\n * @see {@link RouterLink}\n * @see {@link Route}\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: 'router-outlet',\n exportAs: 'outlet',\n standalone: true,\n})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n private activated: ComponentRef<any> | null = null;\n /** @internal */\n get activatedComponentRef(): ComponentRef<any> | null {\n return this.activated;\n }\n private _activatedRoute: ActivatedRoute | null = null;\n /**\n * The name of the outlet\n *\n */\n @Input() name = PRIMARY_OUTLET;\n\n @Output('activate') activateEvents = new EventEmitter<any>();\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n @Output('attach') attachEvents = new EventEmitter<unknown>();\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n @Output('detach') detachEvents = new EventEmitter<unknown>();\n\n private parentContexts = inject(ChildrenOutletContexts);\n private location = inject(ViewContainerRef);\n private changeDetector = inject(ChangeDetectorRef);\n private inputBinder = inject(INPUT_BINDER, {optional: true});\n /** @nodoc */\n readonly supportsBindingToComponentInputs = true;\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges) {\n if (changes['name']) {\n const {firstChange, previousValue} = changes['name'];\n if (firstChange) {\n // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n // input is set at all, we need to centrally handle the first change there.\n return;\n }\n\n // unregister with the old name\n if (this.isTrackedInParentContexts(previousValue)) {\n this.deactivate();\n this.parentContexts.onChildOutletDestroyed(previousValue);\n }\n // register the new name\n this.initializeOutletWithName();\n }\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n // Ensure that the registered outlet is this one before removing it on the context.\n if (this.isTrackedInParentContexts(this.name)) {\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n this.inputBinder?.unsubscribeFromRouteData(this);\n }\n\n private isTrackedInParentContexts(outletName: string) {\n return this.parentContexts.getContext(outletName)?.outlet === this;\n }\n\n /** @nodoc */\n ngOnInit(): void {\n this.initializeOutletWithName();\n }\n\n private initializeOutletWithName() {\n this.parentContexts.onChildOutletCreated(this.name, this);\n if (this.activated) {\n return;\n }\n\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.injector);\n }\n }\n }\n\n get isActivated(): boolean {\n return !!this.activated;\n }\n\n /**\n * @returns The currently activated component instance.\n * @throws An error if the outlet is not activated.\n */\n get component(): Object {\n if (!this.activated)\n throw new RuntimeError(\n RuntimeErrorCode.OUTLET_NOT_ACTIVATED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated',\n );\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated)\n throw new RuntimeError(\n RuntimeErrorCode.OUTLET_NOT_ACTIVATED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated',\n );\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.activated)\n throw new RuntimeError(\n RuntimeErrorCode.OUTLET_NOT_ACTIVATED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated',\n );\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(cmp.instance);\n return cmp;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n this.attachEvents.emit(ref.instance);\n }\n\n deactivate(): void {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector) {\n if (this.isActivated) {\n throw new RuntimeError(\n RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Cannot activate an already activated outlet',\n );\n }\n this._activatedRoute = activatedRoute;\n const location = this.location;\n const snapshot = activatedRoute.snapshot;\n const component = snapshot.component!;\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n\n this.activated = location.createComponent(component, {\n index: location.length,\n injector,\n environmentInjector: environmentInjector,\n });\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n this.activateEvents.emit(this.activated.instance);\n }\n}\n\nclass OutletInjector implements Injector {\n /**\n * This injector has a special handing for the `ActivatedRoute` and\n * `ChildrenOutletContexts` tokens: it returns corresponding values for those\n * tokens dynamically. This behavior is different from the regular injector logic,\n * when we initialize and store a value, which is later returned for all inject\n * requests.\n *\n * In some cases (e.g. when using `@defer`), this dynamic behavior requires special\n * handling. This function allows to identify an instance of the `OutletInjector` and\n * create an instance of it without referring to the class itself (so this logic can\n * be invoked from the `core` package). This helps to retain dynamic behavior for the\n * mentioned tokens.\n *\n * Note: it's a temporary solution and we should explore how to support this case better.\n */\n private __ngOutletInjector(parentInjector: Injector) {\n return new OutletInjector(this.route, this.childContexts, parentInjector);\n }\n\n constructor(\n private route: ActivatedRoute,\n private childContexts: ChildrenOutletContexts,\n private parent: Injector,\n ) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n\nexport const INPUT_BINDER = new InjectionToken<RoutedComponentInputBinder>('');\n\n/**\n * Injectable used as a tree-shakable provider for opting in to binding router data to component\n * inputs.\n *\n * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or\n * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,\n * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. If it were not done this way, the previous information would be\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n *\n * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that\n * the subscriptions are cleaned up.\n */\n@Injectable()\nexport class RoutedComponentInputBinder {\n private outletDataSubscriptions = new Map<RouterOutlet, Subscription>();\n\n bindActivatedRouteToOutletComponent(outlet: RouterOutlet) {\n this.unsubscribeFromRouteData(outlet);\n this.subscribeToRouteData(outlet);\n }\n\n unsubscribeFromRouteData(outlet: RouterOutlet) {\n this.outletDataSubscriptions.get(outlet)?.unsubscribe();\n this.outletDataSubscriptions.delete(outlet);\n }\n\n private subscribeToRouteData(outlet: RouterOutlet) {\n const {activatedRoute} = outlet;\n const dataSubscription = combineLatest([\n activatedRoute.queryParams,\n activatedRoute.params,\n activatedRoute.data,\n ])\n .pipe(\n switchMap(([queryParams, params, data], index) => {\n data = {...queryParams, ...params, ...data};\n // Get the first result from the data subscription synchronously so it's available to\n // the component as soon as possible (and doesn't require a second change detection).\n if (index === 0) {\n return of(data);\n }\n // Promise.resolve is used to avoid synchronously writing the wrong data when\n // two of the Observables in the `combineLatest` stream emit one after\n // another.\n return Promise.resolve(data);\n }),\n )\n .subscribe((data) => {\n // Outlet may have been deactivated or changed names to be associated with a different\n // route\n if (\n !outlet.isActivated ||\n !outlet.activatedComponentRef ||\n outlet.activatedRoute !== activatedRoute ||\n activatedRoute.component === null\n ) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n\n const mirror = reflectComponentType(activatedRoute.component);\n if (!mirror) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n\n for (const {templateName} of mirror.inputs) {\n outlet.activatedComponentRef.setInput(templateName, data[templateName]);\n }\n });\n\n this.outletDataSubscriptions.set(outlet, dataSubscription);\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.dev/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {\n ActivatedRoute,\n ActivatedRouteSnapshot,\n RouterState,\n RouterStateSnapshot,\n} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n routeReuseStrategy: RouteReuseStrategy,\n curr: RouterStateSnapshot,\n prevState: RouterState,\n): RouterState {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\n\nfunction createNode(\n routeReuseStrategy: RouteReuseStrategy,\n curr: TreeNode<ActivatedRouteSnapshot>,\n prevState?: TreeNode<ActivatedRoute>,\n): TreeNode<ActivatedRoute> {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode<ActivatedRoute>(value, children);\n } else {\n if (routeReuseStrategy.shouldAttach(curr.value)) {\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle !== null) {\n const tree = (detachedRouteHandle as DetachedRouteHandleInternal).route;\n tree.value._futureSnapshot = curr.value;\n tree.children = curr.children.map((c) => createNode(routeReuseStrategy, c));\n return tree;\n }\n }\n\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map((c) => createNode(routeReuseStrategy, c));\n return new TreeNode<ActivatedRoute>(value, children);\n }\n}\n\nfunction createOrReuseChildren(\n routeReuseStrategy: RouteReuseStrategy,\n curr: TreeNode<ActivatedRouteSnapshot>,\n prevState: TreeNode<ActivatedRoute>,\n) {\n return curr.children.map((child) => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n return new ActivatedRoute(\n new BehaviorSubject(c.url),\n new BehaviorSubject(c.params),\n new BehaviorSubject(c.queryParams),\n new BehaviorSubject(c.fragment),\n new BehaviorSubject(c.data),\n c.outlet,\n c.component,\n c,\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.dev/license\n */\n\nimport {\n EnvironmentInjector,\n EnvironmentProviders,\n NgModuleFactory,\n Provider,\n ProviderToken,\n Type,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\n\n/**\n * How to handle a navigation request to the current URL. One of:\n *\n * - `'ignore'` : The router ignores the request it is the same as the current state.\n * - `'reload'` : The router processes the URL even if it is not different from the current state.\n * One example of when you might want this option is if a `canMatch` guard depends on\n * application state and initially rejects navigation to a route. After fixing the state, you want\n * to re-navigate to the same URL so the route with the `canMatch` guard can activate.\n *\n * Note that this only configures whether the Route reprocesses the URL and triggers related\n * action and events like redirects, guards, and resolvers. By default, the router re-uses a\n * component instance when it re-navigates to the same component type without visiting a different\n * component first. This behavior is configured by the `RouteReuseStrategy`. In order to reload\n * routed components on same url navigation, you need to set `onSameUrlNavigation` to `'reload'`\n * _and_ provide a `RouteReuseStrategy` which returns `false` for `shouldReuseRoute`. Additionally,\n * resolvers and most guards for routes do not run unless the path or path params changed\n * (configured by `runGuardsAndResolvers`).\n *\n * @publicApi\n * @see {@link RouteReuseStrategy}\n * @see {@link RunGuardsAndResolvers}\n * @see {@link NavigationBehaviorOptions}\n * @see {@link RouterConfigOptions}\n */\nexport type OnSameUrlNavigation = 'reload' | 'ignore';\n\n/**\n * The `InjectionToken` and `@Injectable` classes for guards and resolvers are deprecated in favor\n * of plain JavaScript functions instead.. Dependency injection can still be achieved using the\n * [`inject`](api/core/inject) function from `@angular/core` and an injectable class can be used as\n * a functional guard using [`inject`](api/core/inject): `canActivate: [() =>\n * inject(myGuard).canActivate()]`.\n *\n * @deprecated\n * @see {@link CanMatchFn}\n * @see {@link CanLoadFn}\n * @see {@link CanActivateFn}\n * @see {@link CanActivateChildFn}\n * @see {@link CanDeactivateFn}\n * @see {@link ResolveFn}\n * @see {@link core/inject}\n * @publicApi\n */\nexport type DeprecatedGuard = ProviderToken<any> | any;\n\n/**\n * The supported types that can be returned from a `Router` guard.\n *\n * @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)\n * @publicApi\n */\nexport type GuardResult = boolean | UrlTree | RedirectCommand;\n\n/**\n * Can be returned by a `Router` guard to instruct the `Router` to redirect rather than continue\n * processing the path of the in-flight navigation. The `redirectTo` indicates _where_ the new\n * navigation should go to and the optional `navigationBehaviorOptions` can provide more information\n * about _how_ to perform the navigation.\n *\n * ```ts\n * const route: Route = {\n * path: \"user/:userId\",\n * component: User,\n * canActivate: [\n * () => {\n * const router = inject(Router);\n * const authService = inject(AuthenticationService);\n *\n * if (!authService.isLoggedIn()) {\n * const loginPath = router.parseUrl(\"/login\");\n * return new RedirectCommand(loginPath, {\n * skipLocationChange: \"true\",\n * });\n * }\n *\n * return true;\n * },\n * ],\n * };\n * ```\n * @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)\n *\n * @publicApi\n */\nexport class RedirectCommand {\n constructor(\n readonly redirectTo: UrlTree,\n readonly navigationBehaviorOptions?: NavigationBehaviorOptions,\n ) {}\n}\n\n/**\n * Type used to represent a value which may be synchronous or async.\n *\n * @publicApi\n */\nexport type MaybeAsync<T> = T | Observable<T> | Promise<T>;\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see {@link Route}\n * @see {@link Router}\n * @see [Router configuration guide](guide/routing/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see {@link UrlMatcher}\n * @publicApi\n */\nexport type UrlMatchResult = {\n consumed: UrlSegment[];\n posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n * return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (\n segments: UrlSegment[],\n group: UrlSegmentGroup,\n route: Route,\n) => UrlMatchResult | null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see {@link Route#data}\n *\n * @publicApi\n */\nexport type Data = {\n [key: string | symbol]: any;\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * Returning a `RedirectCommand` directs the router to cancel the current navigation and redirect to\n * the location provided in the `RedirectCommand`. Note that there are no ordering guarantees when\n * resolvers execute. If multiple resolvers would return a `RedirectCommand`, only the first one\n * returned will be used.\n *\n * @see {@link Route#resolve}\n *\n * @publicApi\n */\nexport type ResolveData = {\n [key: string | symbol]: ResolveFn<unknown> | DeprecatedGuard;\n};\n\n/**\n * An ES Module object with a default export of the given type.\n *\n * @see {@link Route#loadComponent}\n * @see {@link LoadChildrenCallback}\n *\n * @publicApi\n */\nexport interface DefaultExport<T> {\n /**\n * Default exports are bound under the name `\"default\"`, per the ES Module spec:\n * https://tc39.es/ecma262/#table-export-forms-mapping-to-exportentry-records\n */\n default: T;\n}\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n * or\n * `() => import('...').then(mod => mod.ROUTES)`\n *\n * For example:\n *\n * ```\n * [{\n * path: 'lazy',\n * loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n * or\n * ```\n * [{\n * path: 'lazy',\n * loadChildren: () => import('./lazy-route/lazy.routes').then(mod => mod.ROUTES),\n * }];\n * ```\n *\n * If the lazy-loaded routes are exported via a `default` export, the `.then` can be omitted:\n * ```\n * [{\n * path: 'lazy',\n * loadChildren: () => import('./lazy-route/lazy.routes'),\n * }];\n * ```\n *\n * @see {@link Route#loadChildren}\n * @publicApi\n */\nexport type LoadChildrenCallback = () =>\n | Type<any>\n | NgModuleFactory<any>\n | Routes\n | Observable<Type<any> | Routes | DefaultExport<Type<any>> | DefaultExport<Routes>>\n | Promise<\n NgModuleFactory<any> | Type<any> | Routes | DefaultExport<Type<any>> | DefaultExport<Routes>\n >;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * @see {@link LoadChildrenCallback}\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `\"merge\"` : Merge new parameters with current parameters.\n * - `\"preserve\"` : Preserve current parameters.\n * - `\"replace\"` : Replace current parameters with new parameters. This is the default behavior.\n * - `\"\"` : For legacy reasons, the same as `'replace'`.\n *\n * @see {@link UrlCreationOptions#queryParamsHandling}\n * @see {@link RouterLink}\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge' | 'preserve' | 'replace' | '';\n\n/**\n * The type for the function that can be used to handle redirects when the path matches a `Route` config.\n *\n * The `RedirectFunction` does have access to the full\n * `ActivatedRouteSnapshot` interface. Some data are not accurately known\n * at the route matching phase. For example, resolvers are not run until\n * later, so any resolved title would not be populated. The same goes for lazy\n * loaded components. This is also true for all the snapshots up to the\n * root, so properties that include parents (root, parent, pathFromRoot)\n * are also excluded. And naturally, the full route matching hasn't yet\n * happened so firstChild and children are not available either.\n *\n * @see {@link Route#redirectTo}\n * @publicApi\n */\nexport type RedirectFunction = (\n redirectData: Pick<\n ActivatedRouteSnapshot,\n 'routeConfig' | 'url' | 'params' | 'queryParams' | 'fragment' | 'data' | 'outlet' | 'title'\n >,\n) => string | UrlTree;\n\n/**\n * A policy for when to run guards and resolvers on a route.\n *\n * Guards and/or resolvers will always run when a route is activated or deactivated. When a route is\n * unchanged, the default behavior is the same as `paramsChange`.\n *\n * `paramsChange` : Rerun the guards and resolvers when path or\n * path param changes. This does not include query parameters. This option is the default.\n * - `always` : Run on every execution.\n * - `pathParamsChange` : Rerun guards and resolvers when the path params\n * change. This does not compare matrix or query parameters.\n * - `paramsOrQueryParamsChange` : Run when path, matrix, or query parameters change.\n * - `pathParamsOrQueryParamsChange` : Rerun guards and resolvers when the path params\n * change or query params have changed. This does not include matrix parameters.\n *\n * @see {@link Route#runGuardsAndResolvers}\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n | 'pathParamsChange'\n | 'pathParamsOrQueryParamsChange'\n | 'paramsChange'\n | 'paramsOrQueryParamsChange'\n | 'always'\n | ((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/routing/common-router-tasks).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team\n * }, {\n * path: 'chat/:user',\n * component: Chat\n * outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n * path: '**',\n * component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: 'legacy/user/:name',\n * redirectTo: 'user/:name'\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: AllUsers\n * }, {\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n * path: 'team/:id',\n * component: Team,\n * children: [{\n * path: '',\n * component: WrapperCmp,\n * children: [{\n * path: 'user/:name',\n * component: User\n * }]\n * }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'prefix', //default\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n * path: '',\n * pathMatch: 'full',\n * redirectTo: 'main'\n * }, {\n * path: 'main',\n * component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: 'a', component: MainChild },\n * { path: 'b', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n * path: 'parent/:id',\n * children: [\n * { path: '', component: MainChild },\n * { path: '', component: AuxChild, outlet: 'aux' }\n * ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n * path: 'lazy',\n * loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n /**\n * Used to define a page title for the route. This can be a static string or an `Injectable` that\n * implements `Resolve`.\n *\n * @see {@link TitleStrategy}\n */\n title?: string | Type<Resolve<string>> | ResolveFn<string>;\n\n /**\n * The path to match against. Cannot be used together with a custom `matcher` function.\n * A URL string that uses router matching notation.\n * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n * Default is \"/\" (the root path).\n *\n */\n path?: string;\n /**\n * The path-matching strategy, one of 'prefix' or 'full'.\n * Default is 'prefix'.\n *\n * By default, the router checks URL elements from the left to see if the URL\n * matches a given path and stops when there is a config match. Importantly there must still be a\n * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n * '/team/11/user' matches the config\n * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n *\n * The path-match strategy 'full' matches against the entire URL.\n * It is important to do this when redirecting empty-path routes.\n * Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating\n * to the redirect destination, creating an endless loop.\n *\n */\n pathMatch?: 'prefix' | 'full';\n /**\n * A custom URL-matching function. Cannot be used together with `path`.\n */\n matcher?: UrlMatcher;\n /**\n * The component to instantiate when the path matches.\n * Can be empty if child routes specify components.\n */\n component?: Type<any>;\n\n /**\n * An object specifying a lazy-loaded component.\n */\n loadComponent?: () =>\n | Type<unknown>\n | Observable<Type<unknown> | DefaultExport<Type<unknown>>>\n | Promise<Type<unknown> | DefaultExport<Type<unknown>>>;\n /**\n * Filled for routes `loadComponent` once the component is loaded.\n * @internal\n */\n _loadedComponent?: Type<unknown>;\n\n /**\n * A URL or function that returns a URL to redirect to when the path matches.\n *\n * Absolute if the URL begins with a slash (/) or the function returns a `UrlTree`, otherwise\n * relative to the path URL.\n *\n * The `RedirectFunction` is run in an injection context so it can call `inject` to get any\n * required dependencies.\n *\n * When not present, router does not redirect.\n */\n redirectTo?: string | RedirectFunction;\n /**\n * Name of a `RouterOutlet` object where the component can be placed\n * when the path matches.\n */\n outlet?: string;\n /**\n * An array of `CanActivateFn` or DI tokens used to look up `CanActivate()`\n * handlers, in order to determine if the current user is allowed to\n * activate the component. By default, any user can activate.\n *\n * When using a function rather than DI tokens, the function can call `inject` to get any required\n * dependencies. This `inject` call must be done in a synchronous context.\n */\n canActivate?: Array<CanActivateFn | DeprecatedGuard>;\n /**\n * An array of `CanMatchFn` or DI tokens used to look up `CanMatch()`\n * handlers, in order to determine if the current user is allowed to\n * match the `Route`. By default, any route can match.\n *\n * When using a function rather than DI tokens, the function can call `inject` to get any required\n * dependencies. This `inject` call must be done in a synchronous context.\n */\n canMatch?: Array<CanMatchFn | DeprecatedGuard>;\n /**\n * An array of `CanActivateChildFn` or DI tokens used to look up `CanActivateChild()` handlers,\n * in order to determine if the current user is allowed to activate\n * a child of the component. By default, any user can activate a child.\n *\n * When using a function rather than DI tokens, the function can call `inject` to get any required\n * dependencies. This `inject` call must be done in a synchronous context.\n */\n canActivateChild?: Array<CanActivateChildFn | DeprecatedGuard>;\n /**\n * An array of `CanDeactivateFn` or DI tokens used to look up `CanDeactivate()`\n * handlers, in order to determine if the current user is allowed to\n * deactivate the component. By default, any user can deactivate.\n *\n * When using a function rather than DI tokens, the function can call `inject` to get any required\n * dependencies. This `inject` call must be done in a synchronous context.\n */\n canDeactivate?: Array<CanDeactivateFn<any> | DeprecatedGuard>;\n /**\n * An array of `CanLoadFn` or DI tokens used to look up `CanLoad()`\n * handlers, in order to determine if the current user is allowed to\n * load the component. By default, any user can load.\n *\n * When using a function rather than DI tokens, the function can call `inject` to get any required\n * dependencies. This `inject` call must be done in a synchronous context.\n * @deprecated Use `canMatch` instead\n */\n canLoad?: Array<CanLoadFn | DeprecatedGuard>;\n /**\n * Additional developer-defined data provided to the component via\n * `ActivatedRoute`. By default, no additional data is passed.\n */\n data?: Data;\n /**\n * A map of DI tokens used to look up data resolvers. See `Resolve`.\n */\n resolve?: ResolveData;\n /**\n * An array of child `Route` objects that specifies a nested route\n * configuration.\n */\n children?: Routes;\n /**\n * An object specifying lazy-loaded child routes.\n */\n loadChildren?: LoadChildren;\n\n /**\n * A policy for when to run guards and resolvers on a route.\n *\n * Guards and/or resolvers will always run when a route is activated or deactivated. When a route\n * is unchanged, the default behavior is the same as `paramsChange`.\n *\n * `paramsChange` : Rerun the guards and resolvers when path or\n * path param changes. This does not include query parameters. This option is the default.\n * - `always` : Run on every execution.\n * - `pathParamsChange` : Rerun guards and resolvers when the path params\n * change. This does not compare matrix or query parameters.\n * - `paramsOrQueryParamsChange` : Run when path, matrix, or query parameters change.\n * - `pathParamsOrQueryParamsChange` : Rerun guards and resolvers when the path params\n * change or query params have changed. This does not include matrix parameters.\n *\n * @see {@link RunGuardsAndResolvers}\n */\n runGuardsAndResolvers?: RunGuardsAndResolvers;\n\n /**\n * A `Provider` array to use for this `Route` and its `children`.\n *\n * The `Router` will create a new `EnvironmentInjector` for this\n * `Route` and use it for this `Route` and its `children`. If this\n * route also has a `loadChildren` function which returns an `NgModuleRef`, this injector will be\n * used as the parent of the lazy loaded module.\n */\n providers?: Array<Provider | EnvironmentProviders>;\n\n /**\n * Injector created from the static route providers\n * @internal\n */\n _injector?: EnvironmentInjector;\n\n /**\n * Filled for routes with `loadChildren` once the routes are loaded.\n * @internal\n */\n _loadedRoutes?: Route[];\n\n /**\n * Filled for routes with `loadChildren` once the routes are loaded\n * @internal\n */\n _loadedInjector?: EnvironmentInjector;\n}\n\nexport interface LoadedRouterConfig {\n routes: Route[];\n injector: EnvironmentInjector | undefined;\n}\n\n/**\n * @description\n *\n * Interface that a class can implement to be a guard deciding if a route can be activated.\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, the current navigation\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\n *\n * The following example implements a `CanActivate` function that checks whether the\n * current user has permission to activate the requested route.\n *\n * ```\n * class UserToken {}\n * class Permissions {\n * canActivate(): boolean {\n * return true;\n * }\n * }\n *\n * @Injectable()\n * class CanActivateTeam implements CanActivate {\n * constructor(private permissions: Permissions, private currentUser: UserToken) {}\n *\n * canActivate(\n * route: ActivatedRouteSnapshot,\n * state: RouterStateSnapshot\n * ): MaybeAsync<GuardResult> {\n * return this.permissions.canActivate(this.currentUser, route.params.id);\n * }\n * }\n * ```\n *\n * Here, the defined guard function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot([\n * {\n * path: 'team/:id',\n * component: TeamComponent,\n * canActivate: [CanActivateTeam]\n * }\n * ])\n * ],\n * providers: [CanActivateTeam, UserToken, Permissions]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport interface CanActivate {\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): MaybeAsync<GuardResult>;\n}\n\n/**\n * The signature of a function used as a `canActivate` guard on a `Route`.\n *\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, the current navigation\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\n *\n * The following example implements and uses a `CanActivateFn` that checks whether the\n * current user has permission to activate the requested route.\n *\n * ```ts\n * @Injectable()\n * class UserToken {}\n *\n * @Injectable()\n * class PermissionsService {\n * canActivate(currentUser: UserToken, userId: string): boolean {\n * return true;\n * }\n * canMatch(currentUser: UserToken): boolean {\n * return true;\n * }\n * }\n *\n * const canActivateTeam: CanActivateFn = (\n * route: ActivatedRouteSnapshot,\n * state: RouterStateSnapshot,\n * ) => {\n * return inject(PermissionsService).canActivate(inject(UserToken), route.params['id']);\n * };\n * ```\n *\n * Here, the defined guard function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [\n * provideRouter([\n * {\n * path: 'team/:id',\n * component: TeamComponent,\n * canActivate: [canActivateTeam],\n * },\n * ]),\n * ],\n * });\n * ```\n *\n * @publicApi\n * @see {@link Route}\n */\nexport type CanActivateFn = (\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot,\n) => MaybeAsync<GuardResult>;\n\n/**\n * @description\n *\n * Interface that a class can implement to be a guard deciding if a child route can be activated.\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\n *\n * The following example implements a `CanActivateChild` function that checks whether the\n * current user has permission to activate the requested child route.\n *\n * ```\n * class UserToken {}\n * class Permissions {\n * canActivate(user: UserToken, id: string): boolean {\n * return true;\n * }\n * }\n *\n * @Injectable()\n * class CanActivateTeam implements CanActivateChild {\n * constructor(private permissions: Permissions, private currentUser: UserToken) {}\n *\n * canActivateChild(\n * route: ActivatedRouteSnapshot,\n * state: RouterStateSnapshot\n * ): MaybeAsync<GuardResult> {\n * return this.permissions.canActivate(this.currentUser, route.params.id);\n * }\n * }\n * ```\n *\n * Here, the defined guard function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot([\n * {\n * path: 'root',\n * canActivateChild: [CanActivateTeam],\n * children: [\n * {\n * path: 'team/:id',\n * component: TeamComponent\n * }\n * ]\n * }\n * ])\n * ],\n * providers: [CanActivateTeam, UserToken, Permissions]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport interface CanActivateChild {\n canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot,\n ): MaybeAsync<GuardResult>;\n}\n\n/**\n * The signature of a function used as a `canActivateChild` guard on a `Route`.\n *\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, the current navigation\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\n *\n * The following example implements a `canActivate` function that checks whether the\n * current user has permission to activate the requested route.\n *\n * {@example router/route_functional_guards.ts region=\"CanActivateChildFn\"}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport type CanActivateChildFn = (\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot,\n) => MaybeAsync<GuardResult>;\n\n/**\n * @description\n *\n * Interface that a class can implement to be a guard deciding if a route can be deactivated.\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\n *\n * The following example implements a `CanDeactivate` function that checks whether the\n * current user has permission to deactivate the requested route.\n *\n * ```\n * class UserToken {}\n * class Permissions {\n * canDeactivate(user: UserToken, id: string): boolean {\n * return true;\n * }\n * }\n * ```\n *\n * Here, the defined guard function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```\n *\n * @Injectable()\n * class CanDeactivateTeam implements CanDeactivate<TeamComponent> {\n * constructor(private permissions: Permissions, private currentUser: UserToken) {}\n *\n * canDeactivate(\n * component: TeamComponent,\n * currentRoute: ActivatedRouteSnapshot,\n * currentState: RouterStateSnapshot,\n * nextState: RouterStateSnapshot\n * ): MaybeAsync<GuardResult> {\n * return this.permissions.canDeactivate(this.currentUser, route.params.id);\n * }\n * }\n *\n * @NgModule({\n * imports: [\n * RouterModule.forRoot([\n * {\n * path: 'team/:id',\n * component: TeamComponent,\n * canDeactivate: [CanDeactivateTeam]\n * }\n * ])\n * ],\n * providers: [CanDeactivateTeam, UserToken, Permissions]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport interface CanDeactivate<T> {\n canDeactivate(\n component: T,\n currentRoute: ActivatedRouteSnapshot,\n currentState: RouterStateSnapshot,\n nextState: RouterStateSnapshot,\n ): MaybeAsync<GuardResult>;\n}\n\n/**\n * The signature of a function used as a `canDeactivate` guard on a `Route`.\n *\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, the current navigation\n * is cancelled and a new navigation begins to the `UrlTree` returned from the guard.\n *\n * The following example implements and uses a `CanDeactivateFn` that checks whether the\n * user component has unsaved changes before navigating away from the route.\n *\n * {@example router/route_functional_guards.ts region=\"CanDeactivateFn\"}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport type CanDeactivateFn<T> = (\n component: T,\n currentRoute: ActivatedRouteSnapshot,\n currentState: RouterStateSnapshot,\n nextState: RouterStateSnapshot,\n) => MaybeAsync<GuardResult>;\n\n/**\n * @description\n *\n * Interface that a class can implement to be a guard deciding if a `Route` can be matched.\n * If all guards return `true`, navigation continues and the `Router` will use the `Route` during\n * activation. If any guard returns `false`, the `Route` is skipped for matching and other `Route`\n * configurations are processed instead.\n *\n * The following example implements a `CanMatch` function that decides whether the\n * current user has permission to access the users page.\n *\n *\n * ```\n * class UserToken {}\n * class Permissions {\n * canAccess(user: UserToken, route: Route, segments: UrlSegment[]): boolean {\n * return true;\n * }\n * }\n *\n * @Injectable()\n * class CanMatchTeamSection implements CanMatch {\n * constructor(private permissions: Permissions, private currentUser: UserToken) {}\n *\n * canMatch(route: Route, segments: UrlSegment[]): Observable<boolean>|Promise<boolean>|boolean {\n * return this.permissions.canAccess(this.currentUser, route, segments);\n * }\n * }\n * ```\n *\n * Here, the defined guard function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```\n *\n * @NgModule({\n * imports: [\n * RouterModule.forRoot([\n * {\n * path: 'team/:id',\n * component: TeamComponent,\n * loadChildren: () => import('./team').then(mod => mod.TeamModule),\n * canMatch: [CanMatchTeamSection]\n * },\n * {\n * path: '**',\n * component: NotFoundComponent\n * }\n * ])\n * ],\n * providers: [CanMatchTeamSection, UserToken, Permissions]\n * })\n * class AppModule {}\n * ```\n *\n * If the `CanMatchTeamSection` were to return `false`, the router would continue navigating to the\n * `team/:id` URL, but would load the `NotFoundComponent` because the `Route` for `'team/:id'`\n * could not be used for a URL match but the catch-all `**` `Route` did instead.\n *\n * @publicApi\n */\nexport interface CanMatch {\n canMatch(route: Route, segments: UrlSegment[]): MaybeAsync<GuardResult>;\n}\n\n/**\n * The signature of a function used as a `canMatch` guard on a `Route`.\n *\n * If all guards return `true`, navigation continues and the `Router` will use the `Route` during\n * activation. If any guard returns `false`, the `Route` is skipped for matching and other `Route`\n * configurations are processed instead.\n *\n * The following example implements and uses a `CanMatchFn` that checks whether the\n * current user has permission to access the team page.\n *\n * {@example router/route_functional_guards.ts region=\"CanMatchFn\"}\n *\n * @param route The route configuration.\n * @param segments The URL segments that have not been consumed by previous parent route evaluations.\n *\n * @publicApi\n * @see {@link Route}\n */\nexport type CanMatchFn = (route: Route, segments: UrlSegment[]) => MaybeAsync<GuardResult>;\n\n/**\n * @description\n *\n * Interface that classes can implement to be a data provider.\n * A data provider class can be used with the router to resolve data during navigation.\n * The interface defines a `resolve()` method that is invoked right after the `ResolveStart`\n * router event. The router waits for the data to be resolved before the route is finally activated.\n *\n * The following example implements a `resolve()` method that retrieves the data\n * needed to activate the requested route.\n *\n * ```\n * @Injectable({ providedIn: 'root' })\n * export class HeroResolver implements Resolve<Hero> {\n * constructor(private service: HeroService) {}\n *\n * resolve(\n * route: ActivatedRouteSnapshot,\n * state: RouterStateSnapshot\n * ): Observable<Hero>|Promise<Hero>|Hero {\n * return this.service.getHero(route.paramMap.get('id'));\n * }\n * }\n * ```\n *\n * Here, the defined `resolve()` function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```\n\n * @NgModule({\n * imports: [\n * RouterModule.forRoot([\n * {\n * path: 'detail/:id',\n * component: HeroDetailComponent,\n * resolve: {\n * hero: HeroResolver\n * }\n * }\n * ])\n * ],\n * exports: [RouterModule]\n * })\n * export class AppRoutingModule {}\n * ```\n *\n * And you can access to your resolved data from `HeroComponent`:\n *\n * ```\n * @Component({\n * selector: \"app-hero\",\n * templateUrl: \"hero.component.html\",\n * })\n * export class HeroComponent {\n *\n * constructor(private activatedRoute: ActivatedRoute) {}\n *\n * ngOnInit() {\n * this.activatedRoute.data.subscribe(({ hero }) => {\n * // do something with your resolved data ...\n * })\n * }\n *\n * }\n * ```\n *\n * @usageNotes\n *\n * When both guard and resolvers are specified, the resolvers are not executed until\n * all guards have run and succeeded.\n * For example, consider the following route configuration:\n *\n * ```\n * {\n * path: 'base'\n * canActivate: [BaseGuard],\n * resolve: {data: BaseDataResolver}\n * children: [\n * {\n * path: 'child',\n * guards: [ChildGuard],\n * component: ChildComponent,\n * resolve: {childData: ChildDataResolver}\n * }\n * ]\n * }\n * ```\n * The order of execution is: BaseGuard, ChildGuard, BaseDataResolver, ChildDataResolver.\n *\n * @publicApi\n * @see {@link ResolveFn}\n */\nexport interface Resolve<T> {\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): MaybeAsync<T>;\n}\n\n/**\n * Function type definition for a data provider.\n *\n * A data provider can be used with the router to resolve data during navigation.\n * The router waits for the data to be resolved before the route is finally activated.\n *\n * A resolver can also redirect a `RedirectCommand` and the Angular router will use\n * it to redirect the current navigation to the new destination.\n *\n * @usageNotes\n *\n * The following example implements a function that retrieves the data\n * needed to activate the requested route.\n *\n * ```ts\n * interface Hero {\n * name: string;\n * }\n * @Injectable()\n * export class HeroService {\n * getHero(id: string) {\n * return {name: `Superman-${id}`};\n * }\n * }\n *\n * export const heroResolver: ResolveFn<Hero> = (\n * route: ActivatedRouteSnapshot,\n * state: RouterStateSnapshot,\n * ) => {\n * return inject(HeroService).getHero(route.paramMap.get('id')!);\n * };\n *\n * bootstrapApplication(App, {\n * providers: [\n * provideRouter([\n * {\n * path: 'detail/:id',\n * component: HeroDetailComponent,\n * resolve: {hero: heroResolver},\n * },\n * ]),\n * ],\n * });\n * ```\n *\n * And you can access to your resolved data from `HeroComponent`:\n *\n * ```ts\n * @Component({template: ''})\n * export class HeroDetailComponent {\n * private activatedRoute = inject(ActivatedRoute);\n *\n * ngOnInit() {\n * this.activatedRoute.data.subscribe(({hero}) => {\n * // do something with your resolved data ...\n * });\n * }\n * }\n * ```\n *\n * If resolved data cannot be retrieved, you may want to redirect the user\n * to a new page instead:\n *\n * ```ts\n * export const heroResolver: ResolveFn<Hero> = async (\n * route: ActivatedRouteSnapshot,\n * state: RouterStateSnapshot,\n * ) => {\n * const router = inject(Router);\n * const heroService = inject(HeroService);\n * try {\n * return await heroService.getHero(route.paramMap.get('id')!);\n * } catch {\n * return new RedirectCommand(router.parseUrl('/404'));\n * }\n * };\n * ```\n *\n * When both guard and resolvers are specified, the resolvers are not executed until\n * all guards have run and succeeded.\n * For example, consider the following route configuration:\n *\n * ```\n * {\n * path: 'base'\n * canActivate: [baseGuard],\n * resolve: {data: baseDataResolver}\n * children: [\n * {\n * path: 'child',\n * canActivate: [childGuard],\n * component: ChildComponent,\n * resolve: {childData: childDataResolver}\n * }\n * ]\n * }\n * ```\n * The order of execution is: baseGuard, childGuard, baseDataResolver, childDataResolver.\n *\n * @publicApi\n * @see {@link Route}\n */\nexport type ResolveFn<T> = (\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot,\n) => MaybeAsync<T | RedirectCommand>;\n\n/**\n * @description\n *\n * Interface that a class can implement to be a guard deciding if children can be loaded.\n * If all guards return `true`, navigation continues. If any guard returns `false`,\n * navigation is cancelled. If any guard returns a `UrlTree`, current navigation\n * is cancelled and a new navigation starts to the `UrlTree` returned from the guard.\n *\n * The following example implements a `CanLoad` function that decides whether the\n * current user has permission to load requested child routes.\n *\n *\n * ```\n * class UserToken {}\n * class Permissions {\n * canLoadChildren(user: UserToken, id: string, segments: UrlSegment[]): boolean {\n * return true;\n * }\n * }\n *\n * @Injectable()\n * class CanLoadTeamSection implements CanLoad {\n * constructor(private permissions: Permissions, private currentUser: UserToken) {}\n *\n * canLoad(route: Route, segments: UrlSegment[]): Observable<boolean>|Promise<boolean>|boolean {\n * return this.permissions.canLoadChildren(this.currentUser, route, segments);\n * }\n * }\n * ```\n *\n * Here, the defined guard function is provided as part of the `Route` object\n * in the router configuration:\n *\n * ```\n *\n * @NgModule({\n * imports: [\n * RouterModule.forRoot([\n * {\n * path: 'team/:id',\n * component: TeamComponent,\n * loadChildren: () => import('./team').then(mod => mod.TeamModule),\n * canLoad: [CanLoadTeamSection]\n * }\n * ])\n * ],\n * providers: [CanLoadTeamSection, UserToken, Permissions]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n * @deprecated Use {@link CanMatch} instead\n */\nexport interface CanLoad {\n canLoad(route: Route, segments: UrlSegment[]): MaybeAsync<GuardResult>;\n}\n\n/**\n * The signature of a function used as a `canLoad` guard on a `Route`.\n *\n * @publicApi\n * @see {@link CanLoad}\n * @see {@link Route}\n * @see {@link CanMatch}\n * @deprecated Use `Route.canMatch` and `CanMatchFn` instead\n */\nexport type CanLoadFn = (route: Route, segments: UrlSegment[]) => MaybeAsync<GuardResult>;\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see {@link Router#navigate}\n * @see {@link Router#navigateByUrl}\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n /**\n * How to handle a navigation request to the current URL.\n *\n * This value is a subset of the options available in `OnSameUrlNavigation` and\n * will take precedence over the default value set for the `Router`.\n *\n * @see {@link OnSameUrlNavigation}\n * @see {@link RouterConfigOptions}\n */\n onSameUrlNavigation?: OnSameUrlNavigation;\n\n /**\n * When true, navigates without pushing a new state into history.\n *\n * ```\n * // Navigate silently to /view\n * this.router.navigate(['/view'], { skipLocationChange: true });\n * ```\n */\n skipLocationChange?: boolean;\n\n /**\n * When true, navigates while replacing the current state in history.\n *\n * ```\n * // Navigate to /view\n * this.router.navigate(['/view'], { replaceUrl: true });\n * ```\n */\n replaceUrl?: boolean;\n\n /**\n * Developer-defined state that can be passed to any navigation.\n * Access this value through the `Navigation.extras` object\n * returned from the [Router.getCurrentNavigation()\n * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n *\n * After a navigation completes, the router writes an object containing this\n * value together with a `navigationId` to `history.state`.\n * The value is written when `location.go()` or `location.replaceState()`\n * is called before activating this route.\n *\n * Note that `history.state` does not pass an object equality test because\n * the router adds the `navigationId` on each navigation.\n *\n */\n state?: {[k: string]: any};\n\n /**\n * Use this to convey transient information about this particular navigation, such as how it\n * happened. In this way, it's different from the persisted value `state` that will be set to\n * `history.state`. This object is assigned directly to the Router's current `Navigation`\n * (it is not copied or cloned), so it should be mutated with caution.\n *\n * One example of how this might be used is to trigger different single-page navigation animations\n * depending on how a certain route was reached. For example, consider a photo gallery app, where\n * you can reach the same photo URL and state via various routes:\n *\n * - Clicking on it in a gallery view\n * - Clicking\n * - \"next\" or \"previous\" when viewing another photo in the album\n * - Etc.\n *\n * Each of these wants a different animation at navigate time. This information doesn't make sense\n * to store in the persistent URL or history entry state, but it's still important to communicate\n * from the rest of the application, into the router.\n *\n * This information could be used in coordination with the View Transitions feature and the\n * `onViewTransitionCreated` callback. The information might be used in the callback to set\n * classes on the document in order to control the transition animations and remove the classes\n * when the transition has finished animating.\n */\n readonly info?: unknown;\n\n /**\n * When set, the Router will update the browser's address bar to match the given `UrlTree` instead\n * of the one used for route matching.\n *\n *\n * @usageNotes\n *\n * This feature is useful for redirects, such as redirecting to an error page, without changing\n * the value that will be displayed in the browser's address bar.\n *\n * ```\n * const canActivate: CanActivateFn = (route: ActivatedRouteSnapshot) => {\n * const userService = inject(UserService);\n * const router = inject(Router);\n * if (!userService.isLoggedIn()) {\n * const targetOfCurrentNavigation = router.getCurrentNavigation()?.finalUrl;\n * const redirect = router.parseUrl('/404');\n * return new RedirectCommand(redirect, {browserUrl: targetOfCurrentNavigation});\n * }\n * return true;\n * };\n * ```\n *\n * This value is used directly, without considering any `UrlHandingStrategy`. In this way,\n * `browserUrl` can also be used to use a different value for the browser URL than what would have\n * been produced by from the navigation due to `UrlHandlingStrategy.merge`.\n *\n * This value only affects the path presented in the browser's address bar. It does not apply to\n * the internal `Router` state. Information such as `params` and `data` will match the internal\n * state used to match routes which will be different from the browser URL when using this feature\n * The same is true when using other APIs that cause the browser URL the differ from the Router\n * state, such as `skipLocationChange`.\n */\n readonly browserUrl?: UrlTree | string;\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.dev/license\n */\n\nimport {NavigationCancellationCode} from './events';\nimport {NavigationBehaviorOptions, RedirectCommand} from './models';\nimport {isUrlTree, UrlSerializer, UrlTree} from './url_tree';\n\nexport const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport type NavigationCancelingError = Error & {\n [NAVIGATION_CANCELING_ERROR]: true;\n cancellationCode: NavigationCancellationCode;\n};\nexport type RedirectingNavigationCancelingError = NavigationCancelingError & {\n url: UrlTree;\n navigationBehaviorOptions?: NavigationBehaviorOptions;\n cancellationCode: NavigationCancellationCode.Redirect;\n};\n\nexport function redirectingNavigationError(\n urlSerializer: UrlSerializer,\n redirect: UrlTree | RedirectCommand,\n): RedirectingNavigationCancelingError {\n const {redirectTo, navigationBehaviorOptions} = isUrlTree(redirect)\n ? {redirectTo: redirect, navigationBehaviorOptions: undefined}\n : redirect;\n const error = navigationCancelingError(\n ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`,\n NavigationCancellationCode.Redirect,\n ) as RedirectingNavigationCancelingError;\n error.url = redirectTo;\n error.navigationBehaviorOptions = navigationBehaviorOptions;\n return error;\n}\n\nexport function navigationCancelingError(\n message: string | null | false,\n code: NavigationCancellationCode,\n) {\n const error = new Error(`NavigationCancelingError: ${message || ''}`) as NavigationCancelingError;\n error[NAVIGATION_CANCELING_ERROR] = true;\n error.cancellationCode = code;\n return error;\n}\n\nexport function isRedirectingNavigationCancelingError(\n error: unknown | RedirectingNavigationCancelingError,\n): error is RedirectingNavigationCancelingError {\n return (\n isNavigationCancelingError(error) &&\n isUrlTree((error as RedirectingNavigationCancelingError).url)\n );\n}\n\nexport function isNavigationCancelingError(error: unknown): error is NavigationCancelingError {\n return !!error && (error as NavigationCancelingError)[NAVIGATION_CANCELING_ERROR];\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.dev/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {NavigationTransition} from '../navigation_transition';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, advanceActivatedRoute, RouterState} from '../router_state';\nimport {getClosestRouteInjector} from '../utils/config';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nlet warnedAboutUnsupportedInputBinding = false;\n\nexport const activateRoutes = (\n rootContexts: ChildrenOutletContexts,\n routeReuseStrategy: RouteReuseStrategy,\n forwardEvent: (evt: Event) => void,\n inputBindingEnabled: boolean,\n): MonoTypeOperatorFunction<NavigationTransition> =>\n map((t) => {\n new ActivateRoutes(\n routeReuseStrategy,\n t.targetRouterState!,\n t.currentRouterState,\n forwardEvent,\n inputBindingEnabled,\n ).activate(rootContexts);\n return t;\n });\n\nexport class ActivateRoutes {\n constructor(\n private routeReuseStrategy: RouteReuseStrategy,\n private futureState: RouterState,\n private currState: RouterState,\n private forwardEvent: (evt: Event) => void,\n private inputBindingEnabled: boolean,\n ) {}\n\n activate(parentContexts: ChildrenOutletContexts): void {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n\n // De-activate the child route that are not re-used for the future state\n private deactivateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>,\n currNode: TreeNode<ActivatedRoute> | null,\n contexts: ChildrenOutletContexts,\n ): void {\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach((futureChild) => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n\n // De-activate the routes that will not be re-used\n Object.values(children).forEach((v: TreeNode<ActivatedRoute>) => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n\n private deactivateRoutes(\n futureNode: TreeNode<ActivatedRoute>,\n currNode: TreeNode<ActivatedRoute>,\n parentContext: ChildrenOutletContexts,\n ): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n\n private deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts,\n ): void {\n // If there is no component, the Route is never attached to an outlet (because there is no\n // component to attach).\n if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n\n private detachAndStoreRouteSubtree(\n route: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts,\n ): void {\n const context = parentContexts.getContext(route.value.outlet);\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n for (const treeNode of Object.values(children)) {\n this.deactivateRouteAndItsChildren(treeNode, contexts);\n }\n\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n }\n }\n\n private deactivateRouteAndOutlet(\n route: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts,\n ): void {\n const context = parentContexts.getContext(route.value.outlet);\n // The context could be `null` if we are on a componentless route but there may still be\n // children that need deactivating.\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n for (const treeNode of Object.values(children)) {\n this.deactivateRouteAndItsChildren(treeNode, contexts);\n }\n\n if (context) {\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet. Clear even if outlet was not yet activated to avoid activating later with old\n // info\n context.attachRef = null;\n context.route = null;\n }\n }\n\n private activateChildRoutes(\n futureNode: TreeNode<ActivatedRoute>,\n currNode: TreeNode<ActivatedRoute> | null,\n contexts: ChildrenOutletContexts,\n ): void {\n const children: {[outlet: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n futureNode.children.forEach((c) => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n\n private activateRoutes(\n futureNode: TreeNode<ActivatedRoute>,\n currNode: TreeNode<ActivatedRoute>,\n parentContexts: ChildrenOutletContexts,\n ): void {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n\n advanceActivatedRoute(future);\n\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored = <DetachedRouteHandleInternal>(\n this.routeReuseStrategy.retrieve(future.snapshot)\n );\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n\n advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n } else {\n context.attachRef = null;\n context.route = future;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, context.injector);\n }\n\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const context = parentContexts.getOrCreateContext(future.outlet);\n const outlet = context.outlet;\n if (\n outlet &&\n this.inputBindingEnabled &&\n !outlet.supportsBindingToComponentInputs &&\n !warnedAboutUnsupportedInputBinding\n ) {\n console.warn(\n `'withComponentInputBinding' feature is enabled but ` +\n `this application is using an outlet that may not support binding to component inputs.`,\n );\n warnedAboutUnsupportedInputBinding = true;\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.dev/license\n */\n\nimport {Injector, ProviderToken, ɵisInjectable as isInjectable} from '@angular/core';\n\nimport {RunGuardsAndResolvers} from '../models';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {\n ActivatedRouteSnapshot,\n equalParamsAndUrlSegments,\n RouterStateSnapshot,\n} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n readonly route: ActivatedRouteSnapshot;\n constructor(public path: ActivatedRouteSnapshot[]) {\n this.route = this.path[this.path.length - 1];\n }\n}\n\nexport class CanDeactivate {\n constructor(\n public component: Object | null,\n public route: ActivatedRouteSnapshot,\n ) {}\n}\n\nexport declare type Checks = {\n canDeactivateChecks: CanDeactivate[];\n canActivateChecks: CanActivate[];\n};\n\nexport function getAllRouteGuards(\n future: RouterStateSnapshot,\n curr: RouterStateSnapshot,\n parentContexts: ChildrenOutletContexts,\n) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(\n p: ActivatedRouteSnapshot,\n): {node: ActivatedRouteSnapshot; guards: any[]} | null {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {node: p, guards: canActivateChild};\n}\n\nexport function getTokenOrFunctionIdentity<T>(\n tokenOrFunction: Function | ProviderToken<T>,\n injector: Injector,\n): Function | T {\n const NOT_FOUND = Symbol();\n const result = injector.get<T | Symbol>(tokenOrFunction, NOT_FOUND);\n if (result === NOT_FOUND) {\n if (typeof tokenOrFunction === 'function' && !isInjectable(tokenOrFunction)) {\n // We think the token is just a function so return it as-is\n return tokenOrFunction;\n } else {\n // This will throw the not found error\n return injector.get<T>(tokenOrFunction);\n }\n }\n return result as T;\n}\n\nfunction getChildRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>,\n currNode: TreeNode<ActivatedRouteSnapshot> | null,\n contexts: ChildrenOutletContexts | null,\n futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: [],\n },\n): Checks {\n const prevChildren = nodeChildrenAsMap(currNode);\n\n // Process the children of the future route\n futureNode.children.forEach((c) => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n\n // Process any children left from the current route (not active for the future route)\n Object.entries(prevChildren).forEach(([k, v]: [string, TreeNode<ActivatedRouteSnapshot>]) =>\n deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks),\n );\n\n return checks;\n}\n\nfunction getRouteGuards(\n futureNode: TreeNode<ActivatedRouteSnapshot>,\n currNode: TreeNode<ActivatedRouteSnapshot>,\n parentContexts: ChildrenOutletContexts | null,\n futurePath: ActivatedRouteSnapshot[],\n checks: Checks = {\n canDeactivateChecks: [],\n canActivateChecks: [],\n },\n): Checks {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun = shouldRunGuardsAndResolvers(\n curr,\n future,\n future.routeConfig!.runGuardsAndResolvers,\n );\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(\n futureNode,\n currNode,\n context ? context.children : null,\n futurePath,\n checks,\n );\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n\n if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n\n return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n curr: ActivatedRouteSnapshot,\n future: ActivatedRouteSnapshot,\n mode: RunGuardsAndResolvers | undefined,\n): boolean {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n\n case 'pathParamsOrQueryParamsChange':\n return (\n !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams)\n );\n\n case 'always':\n return true;\n\n case 'paramsOrQueryParamsChange':\n return (\n !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams)\n );\n\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\n\nfunction deactivateRouteAndItsChildren(\n route: TreeNode<ActivatedRouteSnapshot>,\n context: OutletContext | null,\n checks: Checks,\n): void {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n\n Object.entries(children).forEach(([childName, node]) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\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.dev/license\n */\n\nimport {EmptyError} from 'rxjs';\n\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn, CanLoadFn, CanMatchFn} from '../models';\nimport {\n NAVIGATION_CANCELING_ERROR,\n NavigationCancelingError,\n RedirectingNavigationCancelingError,\n} from '../navigation_canceling_error';\nimport {isUrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n return typeof v === 'boolean';\n}\n\nexport function isCanLoad(guard: any): guard is {canLoad: CanLoadFn} {\n return guard && isFunction<CanLoadFn>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is {canActivate: CanActivateFn} {\n return guard && isFunction<CanActivateFn>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is {canActivateChild: CanActivateChildFn} {\n return guard && isFunction<CanActivateChildFn>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is {canDeactivate: CanDeactivateFn<T>} {\n return guard && isFunction<CanDeactivateFn<T>>(guard.canDeactivate);\n}\nexport function isCanMatch(guard: any): guard is {canMatch: CanMatchFn} {\n return guard && isFunction<CanMatchFn>(guard.canMatch);\n}\n\nexport function isEmptyError(e: Error): e is EmptyError {\n return e instanceof EmptyError || e?.name === 'EmptyError';\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.dev/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {GuardResult, RedirectCommand} from '../models';\nimport {isUrlTree, UrlTree} from '../url_tree';\n\nconst INITIAL_VALUE = /* @__PURE__ */ Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | GuardResult;\n\nexport function prioritizedGuardValue(): OperatorFunction<Observable<GuardResult>[], GuardResult> {\n return switchMap((obs) => {\n return combineLatest(\n obs.map((o) => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))),\n ).pipe(\n map((results: INTERIM_VALUES[]) => {\n for (const result of results) {\n if (result === true) {\n // If result is true, check the next one\n continue;\n } else if (result === INITIAL_VALUE) {\n // If guard has not finished, we need to stop processing.\n return INITIAL_VALUE;\n } else if (result === false || isRedirect(result)) {\n // Result finished and was not true. Return the result.\n // Note that we only allow false/UrlTree/RedirectCommand. Other values are considered invalid and\n // ignored.\n return result;\n }\n }\n // Everything resolved to true. Return true.\n return true;\n }),\n filter((item): item is GuardResult => item !== INITIAL_VALUE),\n take(1),\n );\n });\n}\n\nfunction isRedirect(val: INTERIM_VALUES): val is UrlTree | RedirectCommand {\n return isUrlTree(val) || val instanceof RedirectCommand;\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.dev/license\n */\n\nimport {EnvironmentInjector, ProviderToken, runInInjectionContext} from '@angular/core';\nimport {\n concat,\n defer,\n from,\n MonoTypeOperatorFunction,\n Observable,\n of,\n OperatorFunction,\n pipe,\n} from 'rxjs';\nimport {concatMap, first, map, mergeMap, tap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {\n CanActivateChildFn,\n CanActivateFn,\n CanDeactivateFn,\n GuardResult,\n CanLoadFn,\n CanMatchFn,\n Route,\n} from '../models';\nimport {navigationCancelingError, redirectingNavigationError} from '../navigation_canceling_error';\nimport {NavigationTransition} from '../navigation_transition';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {isUrlTree, UrlSegment, UrlSerializer, UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getClosestRouteInjector} from '../utils/config';\nimport {\n CanActivate,\n CanDeactivate,\n getCanActivateChild,\n getTokenOrFunctionIdentity,\n} from '../utils/preactivation';\nimport {\n isBoolean,\n isCanActivate,\n isCanActivateChild,\n isCanDeactivate,\n isCanLoad,\n isCanMatch,\n} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(\n injector: EnvironmentInjector,\n forwardEvent?: (evt: Event) => void,\n): MonoTypeOperatorFunction<NavigationTransition> {\n return mergeMap((t) => {\n const {\n targetSnapshot,\n currentSnapshot,\n guards: {canActivateChecks, canDeactivateChecks},\n } = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of({...t, guardsResult: true});\n }\n\n return runCanDeactivateChecks(\n canDeactivateChecks,\n targetSnapshot!,\n currentSnapshot,\n injector,\n ).pipe(\n mergeMap((canDeactivate) => {\n return canDeactivate && isBoolean(canDeactivate)\n ? runCanActivateChecks(targetSnapshot!, canActivateChecks, injector, forwardEvent)\n : of(canDeactivate);\n }),\n map((guardsResult) => ({...t, guardsResult})),\n );\n });\n}\n\nfunction runCanDeactivateChecks(\n checks: CanDeactivate[],\n futureRSS: RouterStateSnapshot,\n currRSS: RouterStateSnapshot,\n injector: EnvironmentInjector,\n) {\n return from(checks).pipe(\n mergeMap((check) =>\n runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector),\n ),\n first((result) => {\n return result !== true;\n }, true),\n );\n}\n\nfunction runCanActivateChecks(\n futureSnapshot: RouterStateSnapshot,\n checks: CanActivate[],\n injector: EnvironmentInjector,\n forwardEvent?: (evt: Event) => void,\n) {\n return from(checks).pipe(\n concatMap((check: CanActivate) => {\n return concat(\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, injector),\n runCanActivate(futureSnapshot, check.route, injector),\n );\n }),\n first((result) => {\n return result !== true;\n }, true),\n );\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void,\n): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n snapshot: ActivatedRouteSnapshot | null,\n forwardEvent?: (evt: Event) => void,\n): Observable<boolean> {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n}\n\nfunction runCanActivate(\n futureRSS: RouterStateSnapshot,\n futureARS: ActivatedRouteSnapshot,\n injector: EnvironmentInjector,\n): Observable<GuardResult> {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of(true);\n\n const canActivateObservables = canActivate.map(\n (canActivate: CanActivateFn | ProviderToken<unknown>) => {\n return defer(() => {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const guard = getTokenOrFunctionIdentity<CanActivate>(canActivate, closestInjector);\n const guardVal = isCanActivate(guard)\n ? guard.canActivate(futureARS, futureRSS)\n : runInInjectionContext(closestInjector, () =>\n (guard as CanActivateFn)(futureARS, futureRSS),\n );\n return wrapIntoObservable(guardVal).pipe(first());\n });\n },\n );\n return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n futureRSS: RouterStateSnapshot,\n path: ActivatedRouteSnapshot[],\n injector: EnvironmentInjector,\n): Observable<GuardResult> {\n const futureARS = path[path.length - 1];\n\n const canActivateChildGuards = path\n .slice(0, path.length - 1)\n .reverse()\n .map((p) => getCanActivateChild(p))\n .filter((_) => _ !== null);\n\n const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n return defer(() => {\n const guardsMapped = d.guards.map(\n (canActivateChild: CanActivateChildFn | ProviderToken<unknown>) => {\n const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n const guard = getTokenOrFunctionIdentity<{canActivateChild: CanActivateChildFn}>(\n canActivateChild,\n closestInjector,\n );\n const guardVal = isCanActivateChild(guard)\n ? guard.canActivateChild(futureARS, futureRSS)\n : runInInjectionContext(closestInjector, () =>\n (guard as CanActivateChildFn)(futureARS, futureRSS),\n );\n return wrapIntoObservable(guardVal).pipe(first());\n },\n );\n return of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n component: Object | null,\n currARS: ActivatedRouteSnapshot,\n currRSS: RouterStateSnapshot,\n futureRSS: RouterStateSnapshot,\n injector: EnvironmentInjector,\n): Observable<GuardResult> {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of(true);\n const canDeactivateObservables = canDeactivate.map((c: any) => {\n const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n const guard = getTokenOrFunctionIdentity<any>(c, closestInjector);\n const guardVal = isCanDeactivate(guard)\n ? guard.canDeactivate(component, currARS, currRSS, futureRSS)\n : runInInjectionContext(closestInjector, () =>\n (guard as CanDeactivateFn<any>)(component, currARS, currRSS, futureRSS),\n );\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n\nexport function runCanLoadGuards(\n injector: EnvironmentInjector,\n route: Route,\n segments: UrlSegment[],\n urlSerializer: UrlSerializer,\n): Observable<boolean> {\n const canLoad = route.canLoad;\n if (canLoad === undefined || canLoad.length === 0) {\n return of(true);\n }\n\n const canLoadObservables = canLoad.map((injectionToken: any) => {\n const guard = getTokenOrFunctionIdentity<any>(injectionToken, injector);\n const guardVal = isCanLoad(guard)\n ? guard.canLoad(route, segments)\n : runInInjectionContext(injector, () => (guard as CanLoadFn)(route, segments));\n return wrapIntoObservable(guardVal);\n });\n\n return of(canLoadObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\n\nfunction redirectIfUrlTree(urlSerializer: UrlSerializer): OperatorFunction<GuardResult, boolean> {\n return pipe(\n tap((result: GuardResult) => {\n if (typeof result === 'boolean') return;\n\n throw redirectingNavigationError(urlSerializer, result);\n }),\n map((result) => result === true),\n );\n}\n\nexport function runCanMatchGuards(\n injector: EnvironmentInjector,\n route: Route,\n segments: UrlSegment[],\n urlSerializer: UrlSerializer,\n): Observable<GuardResult> {\n const canMatch = route.canMatch;\n if (!canMatch || canMatch.length === 0) return of(true);\n\n const canMatchObservables = canMatch.map((injectionToken) => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanMatch(guard)\n ? guard.canMatch(route, segments)\n : runInInjectionContext(injector, () => (guard as CanMatchFn)(route, segments));\n return wrapIntoObservable(guardVal);\n });\n\n return of(canMatchObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\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.dev/license\n */\n\nimport {Injector, runInInjectionContext, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {Observable, of, throwError} from 'rxjs';\n\nimport {RuntimeErrorCode} from './errors';\nimport {NavigationCancellationCode} from './events';\nimport {LoadedRouterConfig, RedirectFunction, Route} from './models';\nimport {navigationCancelingError} from './navigation_canceling_error';\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\n\nexport class NoMatch {\n public segmentGroup: UrlSegmentGroup | null;\n\n constructor(segmentGroup?: UrlSegmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n}\n\nexport class AbsoluteRedirect extends Error {\n constructor(public urlTree: UrlTree) {\n super();\n }\n}\n\nexport function noMatch(segmentGroup: UrlSegmentGroup): Observable<any> {\n return throwError(new NoMatch(segmentGroup));\n}\n\nexport function absoluteRedirect(newTree: UrlTree): Observable<any> {\n return throwError(new AbsoluteRedirect(newTree));\n}\n\nexport function namedOutletsRedirect(redirectTo: string): Observable<any> {\n return throwError(\n new RuntimeError(\n RuntimeErrorCode.NAMED_OUTLET_REDIRECT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`,\n ),\n );\n}\n\nexport function canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n return throwError(\n navigationCancelingError(\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`,\n NavigationCancellationCode.GuardRejected,\n ),\n );\n}\n\nexport class ApplyRedirects {\n constructor(\n private urlSerializer: UrlSerializer,\n private urlTree: UrlTree,\n ) {}\n\n lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n let res: UrlSegment[] = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(`${route.redirectTo!}`);\n }\n\n c = c.children[PRIMARY_OUTLET];\n }\n }\n\n applyRedirectCommands(\n segments: UrlSegment[],\n redirectTo: string | RedirectFunction,\n posParams: {[k: string]: UrlSegment},\n currentSnapshot: ActivatedRouteSnapshot,\n injector: Injector,\n ): UrlTree {\n if (typeof redirectTo !== 'string') {\n const redirectToFn = redirectTo;\n const {queryParams, fragment, routeConfig, url, outlet, params, data, title} =\n currentSnapshot;\n const newRedirect = runInInjectionContext(injector, () =>\n redirectToFn({params, data, queryParams, fragment, routeConfig, url, outlet, title}),\n );\n if (newRedirect instanceof UrlTree) {\n throw new AbsoluteRedirect(newRedirect);\n }\n\n redirectTo = newRedirect;\n }\n\n const newTree = this.applyRedirectCreateUrlTree(\n redirectTo,\n this.urlSerializer.parse(redirectTo),\n segments,\n posParams,\n );\n if (redirectTo[0] === '/') {\n throw new AbsoluteRedirect(newTree);\n }\n return newTree;\n }\n\n applyRedirectCreateUrlTree(\n redirectTo: string,\n urlTree: UrlTree,\n segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment},\n ): UrlTree {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(\n newRoot,\n this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n urlTree.fragment,\n );\n }\n\n createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n const res: Params = {};\n Object.entries(redirectToParams).forEach(([k, v]) => {\n const copySourceValue = typeof v === 'string' && v[0] === ':';\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n\n createSegmentGroup(\n redirectTo: string,\n group: UrlSegmentGroup,\n segments: UrlSegment[],\n posParams: {[k: string]: UrlSegment},\n ): UrlSegmentGroup {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n let children: {[n: string]: UrlSegmentGroup} = {};\n Object.entries(group.children).forEach(([name, child]) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n\n return new UrlSegmentGroup(updatedSegments, children);\n }\n\n createSegments(\n redirectTo: string,\n redirectToSegments: UrlSegment[],\n actualSegments: UrlSegment[],\n posParams: {[k: string]: UrlSegment},\n ): UrlSegment[] {\n return redirectToSegments.map((s) =>\n s.path[0] === ':'\n ? this.findPosParam(redirectTo, s, posParams)\n : this.findOrReturn(s, actualSegments),\n );\n }\n\n findPosParam(\n redirectTo: string,\n redirectToUrlSegment: UrlSegment,\n posParams: {[k: string]: UrlSegment},\n ): UrlSegment {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_REDIRECT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`,\n );\n return pos;\n }\n\n findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\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.dev/license\n */\n\nimport {EnvironmentInjector} from '@angular/core';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Route} from '../models';\nimport {runCanMatchGuards} from '../operators/check_guards';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer} from '../url_tree';\n\nimport {last} from './collection';\nimport {getOrCreateRouteInjectorIfNeeded, getOutlet} from './config';\n\nexport interface MatchResult {\n matched: boolean;\n consumedSegments: UrlSegment[];\n remainingSegments: UrlSegment[];\n parameters: {[k: string]: string};\n positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n matched: false,\n consumedSegments: [],\n remainingSegments: [],\n parameters: {},\n positionalParamSegments: {},\n};\n\nexport function matchWithChecks(\n segmentGroup: UrlSegmentGroup,\n route: Route,\n segments: UrlSegment[],\n injector: EnvironmentInjector,\n urlSerializer: UrlSerializer,\n): Observable<MatchResult> {\n const result = match(segmentGroup, route, segments);\n if (!result.matched) {\n return of(result);\n }\n\n // Only create the Route's `EnvironmentInjector` if it matches the attempted\n // navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n return runCanMatchGuards(injector, route, segments, urlSerializer).pipe(\n map((v) => (v === true ? result : {...noMatch})),\n );\n}\n\nexport function match(\n segmentGroup: UrlSegmentGroup,\n route: Route,\n segments: UrlSegment[],\n): MatchResult {\n if (route.path === '**') {\n return createWildcardMatchResult(segments);\n }\n\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {...noMatch};\n }\n\n return {\n matched: true,\n consumedSegments: [],\n remainingSegments: segments,\n parameters: {},\n positionalParamSegments: {},\n };\n }\n\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) return {...noMatch};\n\n const posParams: {[n: string]: string} = {};\n Object.entries(res.posParams ?? {}).forEach(([k, v]) => {\n posParams[k] = v.path;\n });\n const parameters =\n res.consumed.length > 0\n ? {...posParams, ...res.consumed[res.consumed.length - 1].parameters}\n : posParams;\n\n return {\n matched: true,\n consumedSegments: res.consumed,\n remainingSegments: segments.slice(res.consumed.length),\n // TODO(atscott): investigate combining parameters and positionalParamSegments\n parameters,\n positionalParamSegments: res.posParams ?? {},\n };\n}\n\nfunction createWildcardMatchResult(segments: UrlSegment[]): MatchResult {\n return {\n matched: true,\n parameters: segments.length > 0 ? last(segments)!.parameters : {},\n consumedSegments: segments,\n remainingSegments: [],\n positionalParamSegments: {},\n };\n}\n\nexport function split(\n segmentGroup: UrlSegmentGroup,\n consumedSegments: UrlSegment[],\n slicedSegments: UrlSegment[],\n config: Route[],\n) {\n if (\n slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)\n ) {\n const s = new UrlSegmentGroup(\n consumedSegments,\n createChildrenForEmptyPaths(\n config,\n new UrlSegmentGroup(slicedSegments, segmentGroup.children),\n ),\n );\n return {segmentGroup: s, slicedSegments: []};\n }\n\n if (\n slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)\n ) {\n const s = new UrlSegmentGroup(\n segmentGroup.segments,\n addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children),\n );\n return {segmentGroup: s, slicedSegments};\n }\n\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n segmentGroup: UrlSegmentGroup,\n slicedSegments: UrlSegment[],\n routes: Route[],\n children: {[name: string]: UrlSegmentGroup},\n): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n res[getOutlet(r)] = s;\n }\n }\n return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n routes: Route[],\n primarySegment: UrlSegmentGroup,\n): {[name: string]: UrlSegmentGroup} {\n const res: {[name: string]: UrlSegmentGroup} = {};\n res[PRIMARY_OUTLET] = primarySegment;\n\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n segmentGroup: UrlSegmentGroup,\n slicedSegments: UrlSegment[],\n routes: Route[],\n): boolean {\n return routes.some(\n (r) => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET,\n );\n}\n\nfunction containsEmptyPathMatches(\n segmentGroup: UrlSegmentGroup,\n slicedSegments: UrlSegment[],\n routes: Route[],\n): boolean {\n return routes.some((r) => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nexport function emptyPathMatch(\n segmentGroup: UrlSegmentGroup,\n slicedSegments: UrlSegment[],\n r: Route,\n): boolean {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n\n return r.path === '';\n}\n\nexport function noLeftoversInUrl(\n segmentGroup: UrlSegmentGroup,\n segments: UrlSegment[],\n outlet: string,\n): boolean {\n return segments.length === 0 && !segmentGroup.children[outlet];\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.dev/license\n */\n\nimport {EnvironmentInjector, Type, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\nimport {\n catchError,\n concatMap,\n defaultIfEmpty,\n first,\n last,\n map,\n mergeMap,\n scan,\n switchMap,\n tap,\n} from 'rxjs/operators';\n\nimport {AbsoluteRedirect, ApplyRedirects, canLoadFails, noMatch, NoMatch} from './apply_redirects';\nimport {createUrlTreeFromSnapshot} from './create_url_tree';\nimport {RuntimeErrorCode} from './errors';\nimport {Data, LoadedRouterConfig, ResolveData, Route, Routes} from './models';\nimport {runCanLoadGuards} from './operators/check_guards';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {\n ActivatedRouteSnapshot,\n getInherited,\n ParamsInheritanceStrategy,\n RouterStateSnapshot,\n} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {\n emptyPathMatch,\n match,\n matchWithChecks,\n noLeftoversInUrl,\n split,\n} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\nimport {isEmptyError} from './utils/type_guards';\n\n/**\n * Class used to indicate there were no additional route config matches but that all segments of\n * the URL were consumed during matching so the route was URL matched. When this happens, we still\n * try to match child configs in case there are empty path children.\n */\nclass NoLeftoversInUrl {}\n\nexport function recognize(\n injector: EnvironmentInjector,\n configLoader: RouterConfigLoader,\n rootComponentType: Type<any> | null,\n config: Routes,\n urlTree: UrlTree,\n urlSerializer: UrlSerializer,\n paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n): Observable<{state: RouterStateSnapshot; tree: UrlTree}> {\n return new Recognizer(\n injector,\n configLoader,\n rootComponentType,\n config,\n urlTree,\n paramsInheritanceStrategy,\n urlSerializer,\n ).recognize();\n}\n\nconst MAX_ALLOWED_REDIRECTS = 31;\n\nexport class Recognizer {\n private applyRedirects = new ApplyRedirects(this.urlSerializer, this.urlTree);\n private absoluteRedirectCount = 0;\n allowRedirects = true;\n\n constructor(\n private injector: EnvironmentInjector,\n private configLoader: RouterConfigLoader,\n private rootComponentType: Type<any> | null,\n private config: Routes,\n private urlTree: UrlTree,\n private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n private readonly urlSerializer: UrlSerializer,\n ) {}\n\n private noMatchError(e: NoMatch): RuntimeError<RuntimeErrorCode.NO_MATCH> {\n return new RuntimeError(\n RuntimeErrorCode.NO_MATCH,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Cannot match any routes. URL Segment: '${e.segmentGroup}'`\n : `'${e.segmentGroup}'`,\n );\n }\n\n recognize(): Observable<{state: RouterStateSnapshot; tree: UrlTree}> {\n const rootSegmentGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n\n return this.match(rootSegmentGroup).pipe(\n map(({children, rootSnapshot}) => {\n const rootNode = new TreeNode(rootSnapshot, children);\n const routeState = new RouterStateSnapshot('', rootNode);\n const tree = createUrlTreeFromSnapshot(\n rootSnapshot,\n [],\n this.urlTree.queryParams,\n this.urlTree.fragment,\n );\n // https://github.com/angular/angular/issues/47307\n // Creating the tree stringifies the query params\n // We don't want to do this here so reassign them to the original.\n tree.queryParams = this.urlTree.queryParams;\n routeState.url = this.urlSerializer.serialize(tree);\n return {state: routeState, tree};\n }),\n );\n }\n\n private match(rootSegmentGroup: UrlSegmentGroup): Observable<{\n children: TreeNode<ActivatedRouteSnapshot>[];\n rootSnapshot: ActivatedRouteSnapshot;\n }> {\n // Use Object.freeze to prevent readers of the Router state from modifying it outside\n // of a navigation, resulting in the router being out of sync with the browser.\n const rootSnapshot = new ActivatedRouteSnapshot(\n [],\n Object.freeze({}),\n Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment,\n Object.freeze({}),\n PRIMARY_OUTLET,\n this.rootComponentType,\n null,\n {},\n );\n return this.processSegmentGroup(\n this.injector,\n this.config,\n rootSegmentGroup,\n PRIMARY_OUTLET,\n rootSnapshot,\n ).pipe(\n map((children) => {\n return {children, rootSnapshot};\n }),\n catchError((e: any) => {\n if (e instanceof AbsoluteRedirect) {\n this.urlTree = e.urlTree;\n return this.match(e.urlTree.root);\n }\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n\n throw e;\n }),\n );\n }\n\n processSegmentGroup(\n injector: EnvironmentInjector,\n config: Route[],\n segmentGroup: UrlSegmentGroup,\n outlet: string,\n parentRoute: ActivatedRouteSnapshot,\n ): Observable<TreeNode<ActivatedRouteSnapshot>[]> {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(injector, config, segmentGroup, parentRoute);\n }\n\n return this.processSegment(\n injector,\n config,\n segmentGroup,\n segmentGroup.segments,\n outlet,\n true,\n parentRoute,\n ).pipe(map((child) => (child instanceof TreeNode ? [child] : [])));\n }\n\n /**\n * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n * we cannot find a match for _any_ of the children.\n *\n * @param config - The `Routes` to match against\n * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n * config.\n */\n processChildren(\n injector: EnvironmentInjector,\n config: Route[],\n segmentGroup: UrlSegmentGroup,\n parentRoute: ActivatedRouteSnapshot,\n ): Observable<TreeNode<ActivatedRouteSnapshot>[]> {\n // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n // because an absolute redirect from the primary outlet takes precedence.\n const childOutlets: string[] = [];\n for (const child of Object.keys(segmentGroup.children)) {\n if (child === 'primary') {\n childOutlets.unshift(child);\n } else {\n childOutlets.push(child);\n }\n }\n return from(childOutlets).pipe(\n concatMap((childOutlet) => {\n const child = segmentGroup.children[childOutlet];\n // Sort the config so that routes with outlets that match the one being activated\n // appear first, followed by routes for other outlets, which might match if they have\n // an empty path.\n const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n return this.processSegmentGroup(injector, sortedConfig, child, childOutlet, parentRoute);\n }),\n scan((children, outletChildren) => {\n children.push(...outletChildren);\n return children;\n }),\n defaultIfEmpty(null as TreeNode<ActivatedRouteSnapshot>[] | null),\n last(),\n mergeMap((children) => {\n if (children === null) return noMatch(segmentGroup);\n // Because we may have matched two outlets to the same empty path segment, we can have\n // multiple activated results for the same outlet. We should merge the children of\n // these results so the final return value is only one `TreeNode` per outlet.\n const mergedChildren = mergeEmptyPathMatches(children);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // This should really never happen - we are only taking the first match for each\n // outlet and merge the empty path matches.\n checkOutletNameUniqueness(mergedChildren);\n }\n sortActivatedRouteSnapshots(mergedChildren);\n return of(mergedChildren);\n }),\n );\n }\n\n processSegment(\n injector: EnvironmentInjector,\n routes: Route[],\n segmentGroup: UrlSegmentGroup,\n segments: UrlSegment[],\n outlet: string,\n allowRedirects: boolean,\n parentRoute: ActivatedRouteSnapshot,\n ): Observable<TreeNode<ActivatedRouteSnapshot> | NoLeftoversInUrl> {\n return from(routes).pipe(\n concatMap((r) => {\n return this.processSegmentAgainstRoute(\n r._injector ?? injector,\n routes,\n r,\n segmentGroup,\n segments,\n outlet,\n allowRedirects,\n parentRoute,\n ).pipe(\n catchError((e: any) => {\n if (e instanceof NoMatch) {\n return of(null);\n }\n throw e;\n }),\n );\n }),\n first((x): x is TreeNode<ActivatedRouteSnapshot> | NoLeftoversInUrl => !!x),\n catchError((e) => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of(new NoLeftoversInUrl());\n }\n return noMatch(segmentGroup);\n }\n throw e;\n }),\n );\n }\n\n processSegmentAgainstRoute(\n injector: EnvironmentInjector,\n routes: Route[],\n route: Route,\n rawSegment: UrlSegmentGroup,\n segments: UrlSegment[],\n outlet: string,\n allowRedirects: boolean,\n parentRoute: ActivatedRouteSnapshot,\n ): Observable<TreeNode<ActivatedRouteSnapshot> | NoLeftoversInUrl> {\n // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n // a config like\n // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n // or even\n // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n //\n // The exception here is when the segment outlet is for the primary outlet. This would\n // result in a match inside the named outlet because all children there are written as primary\n // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n // This should only match if the url is `/(x:b)`.\n if (\n getOutlet(route) !== outlet &&\n (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))\n ) {\n return noMatch(rawSegment);\n }\n\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(\n injector,\n rawSegment,\n route,\n segments,\n outlet,\n parentRoute,\n );\n }\n\n if (this.allowRedirects && allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(\n injector,\n rawSegment,\n routes,\n route,\n segments,\n outlet,\n parentRoute,\n );\n }\n\n return noMatch(rawSegment);\n }\n\n private expandSegmentAgainstRouteUsingRedirect(\n injector: EnvironmentInjector,\n segmentGroup: UrlSegmentGroup,\n routes: Route[],\n route: Route,\n segments: UrlSegment[],\n outlet: string,\n parentRoute: ActivatedRouteSnapshot,\n ): Observable<TreeNode<ActivatedRouteSnapshot> | NoLeftoversInUrl> {\n const {matched, parameters, consumedSegments, positionalParamSegments, remainingSegments} =\n match(segmentGroup, route, segments);\n if (!matched) return noMatch(segmentGroup);\n\n // TODO(atscott): Move all of this under an if(ngDevMode) as a breaking change and allow stack\n // size exceeded in production\n if (typeof route.redirectTo === 'string' && route.redirectTo[0] === '/') {\n this.absoluteRedirectCount++;\n if (this.absoluteRedirectCount > MAX_ALLOWED_REDIRECTS) {\n if (ngDevMode) {\n throw new RuntimeError(\n RuntimeErrorCode.INFINITE_REDIRECT,\n `Detected possible infinite redirect when redirecting from '${this.urlTree}' to '${route.redirectTo}'.\\n` +\n `This is currently a dev mode only error but will become a` +\n ` call stack size exceeded error in production in a future major version.`,\n );\n }\n this.allowRedirects = false;\n }\n }\n const currentSnapshot = new ActivatedRouteSnapshot(\n segments,\n parameters,\n Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment,\n getData(route),\n getOutlet(route),\n route.component ?? route._loadedComponent ?? null,\n route,\n getResolve(route),\n );\n const inherited = getInherited(currentSnapshot, parentRoute, this.paramsInheritanceStrategy);\n currentSnapshot.params = Object.freeze(inherited.params);\n currentSnapshot.data = Object.freeze(inherited.data);\n const newTree = this.applyRedirects.applyRedirectCommands(\n consumedSegments,\n route.redirectTo!,\n positionalParamSegments,\n currentSnapshot,\n injector,\n );\n\n return this.applyRedirects.lineralizeSegments(route, newTree).pipe(\n mergeMap((newSegments: UrlSegment[]) => {\n return this.processSegment(\n injector,\n routes,\n segmentGroup,\n newSegments.concat(remainingSegments),\n outlet,\n false,\n parentRoute,\n );\n }),\n );\n }\n\n matchSegmentAgainstRoute(\n injector: EnvironmentInjector,\n rawSegment: UrlSegmentGroup,\n route: Route,\n segments: UrlSegment[],\n outlet: string,\n parentRoute: ActivatedRouteSnapshot,\n ): Observable<TreeNode<ActivatedRouteSnapshot>> {\n const matchResult = matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer);\n if (route.path === '**') {\n // Prior versions of the route matching algorithm would stop matching at the wildcard route.\n // We should investigate a better strategy for any existing children. Otherwise, these\n // child segments are silently dropped from the navigation.\n // https://github.com/angular/angular/issues/40089\n rawSegment.children = {};\n }\n\n return matchResult.pipe(\n switchMap((result) => {\n if (!result.matched) {\n return noMatch(rawSegment);\n }\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n return this.getChildConfig(injector, route, segments).pipe(\n switchMap(({routes: childConfig}) => {\n const childInjector = route._loadedInjector ?? injector;\n\n const {parameters, consumedSegments, remainingSegments} = result;\n const snapshot = new ActivatedRouteSnapshot(\n consumedSegments,\n parameters,\n Object.freeze({...this.urlTree.queryParams}),\n this.urlTree.fragment,\n getData(route),\n getOutlet(route),\n route.component ?? route._loadedComponent ?? null,\n route,\n getResolve(route),\n );\n const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);\n snapshot.params = Object.freeze(inherited.params);\n snapshot.data = Object.freeze(inherited.data);\n\n const {segmentGroup, slicedSegments} = split(\n rawSegment,\n consumedSegments,\n remainingSegments,\n childConfig,\n );\n\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(childInjector, childConfig, segmentGroup, snapshot).pipe(\n map((children) => {\n return new TreeNode(snapshot, children);\n }),\n );\n }\n\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new TreeNode(snapshot, []));\n }\n\n const matchedOnOutlet = getOutlet(route) === outlet;\n // If we matched a config due to empty path match on a different outlet, we need to\n // continue passing the current outlet for the segment rather than switch to PRIMARY.\n // Note that we switch to primary when we have a match because outlet configs look like\n // this: {path: 'a', outlet: 'a', children: [\n // {path: 'b', component: B},\n // {path: 'c', component: C},\n // ]}\n // Notice that the children of the named outlet are configured with the primary outlet\n return this.processSegment(\n childInjector,\n childConfig,\n segmentGroup,\n slicedSegments,\n matchedOnOutlet ? PRIMARY_OUTLET : outlet,\n true,\n snapshot,\n ).pipe(\n map((child) => {\n return new TreeNode(snapshot, child instanceof TreeNode ? [child] : []);\n }),\n );\n }),\n );\n }),\n );\n }\n private getChildConfig(\n injector: EnvironmentInjector,\n route: Route,\n segments: UrlSegment[],\n ): Observable<LoadedRouterConfig> {\n if (route.children) {\n // The children belong to the same module\n return of({routes: route.children, injector});\n }\n\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedRoutes !== undefined) {\n return of({routes: route._loadedRoutes, injector: route._loadedInjector});\n }\n\n return runCanLoadGuards(injector, route, segments, this.urlSerializer).pipe(\n mergeMap((shouldLoadResult: boolean) => {\n if (shouldLoadResult) {\n return this.configLoader.loadChildren(injector, route).pipe(\n tap((cfg: LoadedRouterConfig) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n }),\n );\n }\n return canLoadFails(route);\n }),\n );\n }\n\n return of({routes: [], injector});\n }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n const config = node.value.routeConfig;\n return config && config.path === '';\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(\n nodes: Array<TreeNode<ActivatedRouteSnapshot>>,\n): Array<TreeNode<ActivatedRouteSnapshot>> {\n const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n\n const duplicateEmptyPathNode = result.find(\n (resultNode) => node.value.routeConfig === resultNode.value.routeConfig,\n );\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n } else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs\n // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n // if any of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter((n) => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n const names: {[k: string]: ActivatedRouteSnapshot} = {};\n nodes.forEach((n) => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map((s) => s.toString()).join('/');\n const c = n.value.url.map((s) => s.toString()).join('/');\n throw new RuntimeError(\n RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Two segments cannot have the same outlet name: '${p}' and '${c}'.`,\n );\n }\n names[n.value.outlet] = n.value;\n });\n}\n\nfunction getData(route: Route): Data {\n return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n return route.resolve || {};\n}\n","import { Observable } from '../Observable';\nimport { EmptyError } from '../util/EmptyError';\nimport { OperatorFunction, TruthyTypesOf } from '../types';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\n\nexport function last<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;\nexport function last<T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<T, TruthyTypesOf<T> | D>;\nexport function last<T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;\nexport function last<T, S extends T>(\n predicate: (value: T, index: number, source: Observable<T>) => value is S,\n defaultValue?: S\n): OperatorFunction<T, S>;\nexport function last<T, D = T>(\n predicate: (value: T, index: number, source: Observable<T>) => boolean,\n defaultValue?: D\n): OperatorFunction<T, T | D>;\n\n/**\n * Returns an Observable that emits only the last item emitted by the source Observable.\n * It optionally takes a predicate function as a parameter, in which case, rather than emitting\n * the last item from the source Observable, the resulting Observable will emit the last item\n * from the source Observable that satisfies the predicate.\n *\n * ![](last.png)\n *\n * It will emit an error notification if the source completes without notification or one that matches\n * the predicate. It returns the last value or if a predicate is provided last value that matches the\n * predicate. It returns the given default value if no notification is emitted or matches the predicate.\n *\n * ## Examples\n *\n * Last alphabet from the sequence\n *\n * ```ts\n * import { from, last } from 'rxjs';\n *\n * const source = from(['x', 'y', 'z']);\n * const result = source.pipe(last());\n *\n * result.subscribe(value => console.log(`Last alphabet: ${ value }`));\n *\n * // Outputs\n * // Last alphabet: z\n * ```\n *\n * Default value when the value in the predicate is not matched\n *\n * ```ts\n * import { from, last } from 'rxjs';\n *\n * const source = from(['x', 'y', 'z']);\n * const result = source.pipe(last(char => char === 'a', 'not found'));\n *\n * result.subscribe(value => console.log(`'a' is ${ value }.`));\n *\n * // Outputs\n * // 'a' is not found.\n * ```\n *\n * @see {@link skip}\n * @see {@link skipUntil}\n * @see {@link skipLast}\n * @see {@link skipWhile}\n * @see {@link first}\n *\n * @throws {EmptyError} Delivers an `EmptyError` to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n *\n * @param predicate The condition any source emitted item has to satisfy.\n * @param defaultValue An optional default value to provide if last `predicate`\n * isn't met or no values were emitted.\n * @return A function that returns an Observable that emits only the last item\n * satisfying the given condition from the source, or an error notification\n * with an `EmptyError` object if no such items are emitted.\n */\nexport function last<T, D>(\n predicate?: ((value: T, index: number, source: Observable<T>) => boolean) | null,\n defaultValue?: D\n): OperatorFunction<T, T | D> {\n const hasDefaultValue = arguments.length >= 2;\n return (source: Observable<T>) =>\n source.pipe(\n predicate ? filter((v, i) => predicate(v, i, source)) : identity,\n takeLast(1),\n hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError())\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.dev/license\n */\n\nimport {EnvironmentInjector, ProviderToken, runInInjectionContext} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of, throwError} from 'rxjs';\nimport {catchError, concatMap, first, map, mapTo, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {RedirectCommand, ResolveData} from '../models';\nimport {NavigationTransition} from '../navigation_transition';\nimport {\n ActivatedRouteSnapshot,\n getInherited,\n hasStaticTitle,\n RouterStateSnapshot,\n} from '../router_state';\nimport {RouteTitleKey} from '../shared';\nimport {getDataKeys, wrapIntoObservable} from '../utils/collection';\nimport {getClosestRouteInjector} from '../utils/config';\nimport {getTokenOrFunctionIdentity} from '../utils/preactivation';\nimport {isEmptyError} from '../utils/type_guards';\nimport {redirectingNavigationError} from '../navigation_canceling_error';\nimport {DefaultUrlSerializer} from '../url_tree';\n\nexport function resolveData(\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n injector: EnvironmentInjector,\n): MonoTypeOperatorFunction<NavigationTransition> {\n return mergeMap((t) => {\n const {\n targetSnapshot,\n guards: {canActivateChecks},\n } = t;\n\n if (!canActivateChecks.length) {\n return of(t);\n }\n // Iterating a Set in javascript happens in insertion order so it is safe to use a `Set` to\n // preserve the correct order that the resolvers should run in.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#description\n const routesWithResolversToRun = new Set(canActivateChecks.map((check) => check.route));\n const routesNeedingDataUpdates = new Set<ActivatedRouteSnapshot>();\n for (const route of routesWithResolversToRun) {\n if (routesNeedingDataUpdates.has(route)) {\n continue;\n }\n // All children under the route with a resolver to run need to recompute inherited data.\n for (const newRoute of flattenRouteTree(route)) {\n routesNeedingDataUpdates.add(newRoute);\n }\n }\n let routesProcessed = 0;\n return from(routesNeedingDataUpdates).pipe(\n concatMap((route) => {\n if (routesWithResolversToRun.has(route)) {\n return runResolve(route, targetSnapshot!, paramsInheritanceStrategy, injector);\n } else {\n route.data = getInherited(route, route.parent, paramsInheritanceStrategy).resolve;\n return of(void 0);\n }\n }),\n tap(() => routesProcessed++),\n takeLast(1),\n mergeMap((_) => (routesProcessed === routesNeedingDataUpdates.size ? of(t) : EMPTY)),\n );\n });\n}\n\n/**\n * Returns the `ActivatedRouteSnapshot` tree as an array, using DFS to traverse the route tree.\n */\nfunction flattenRouteTree(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot[] {\n const descendants = route.children.map((child) => flattenRouteTree(child)).flat();\n return [route, ...descendants];\n}\n\nfunction runResolve(\n futureARS: ActivatedRouteSnapshot,\n futureRSS: RouterStateSnapshot,\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n injector: EnvironmentInjector,\n) {\n const config = futureARS.routeConfig;\n const resolve = futureARS._resolve;\n if (config?.title !== undefined && !hasStaticTitle(config)) {\n resolve[RouteTitleKey] = config.title;\n }\n return resolveNode(resolve, futureARS, futureRSS, injector).pipe(\n map((resolvedData: any) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = getInherited(futureARS, futureARS.parent, paramsInheritanceStrategy).resolve;\n return null;\n }),\n );\n}\n\nfunction resolveNode(\n resolve: ResolveData,\n futureARS: ActivatedRouteSnapshot,\n futureRSS: RouterStateSnapshot,\n injector: EnvironmentInjector,\n): Observable<any> {\n const keys = getDataKeys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n const data: {[k: string | symbol]: any} = {};\n return from(keys).pipe(\n mergeMap((key) =>\n getResolver(resolve[key], futureARS, futureRSS, injector).pipe(\n first(),\n tap((value: any) => {\n if (value instanceof RedirectCommand) {\n throw redirectingNavigationError(new DefaultUrlSerializer(), value);\n }\n data[key] = value;\n }),\n ),\n ),\n takeLast(1),\n mapTo(data),\n catchError((e: unknown) => (isEmptyError(e as Error) ? EMPTY : throwError(e))),\n );\n}\n\nfunction getResolver(\n injectionToken: ProviderToken<any> | Function,\n futureARS: ActivatedRouteSnapshot,\n futureRSS: RouterStateSnapshot,\n injector: EnvironmentInjector,\n): Observable<any> {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n const resolverValue = resolver.resolve\n ? resolver.resolve(futureARS, futureRSS)\n : runInInjectionContext(closestInjector, () => resolver(futureARS, futureRSS));\n return wrapIntoObservable(resolverValue);\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.dev/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(\n next: (x: T) => void | ObservableInput<any>,\n): MonoTypeOperatorFunction<T> {\n return switchMap((v) => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return of(v);\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.dev/license\n */\n\nimport {inject, Injectable} from '@angular/core';\nimport {Title} from '@angular/platform-browser';\n\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET, RouteTitleKey} from './shared';\n\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n * {path: 'base', title: 'base', children: [\n * {path: 'child', title: 'child'},\n * ],\n * {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/routing/common-router-tasks#setting-the-page-title)\n */\n@Injectable({providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy)})\nexport abstract class TitleStrategy {\n /** Performs the application title update. */\n abstract updateTitle(snapshot: RouterStateSnapshot): void;\n\n /**\n * @returns The `title` of the deepest primary route.\n */\n buildTitle(snapshot: RouterStateSnapshot): string | undefined {\n let pageTitle: string | undefined;\n let route: ActivatedRouteSnapshot | undefined = snapshot.root;\n while (route !== undefined) {\n pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n route = route.children.find((child) => child.outlet === PRIMARY_OUTLET);\n }\n return pageTitle;\n }\n\n /**\n * Given an `ActivatedRouteSnapshot`, returns the final value of the\n * `Route.title` property, which can either be a static string or a resolved value.\n */\n getResolvedTitleForRoute(snapshot: ActivatedRouteSnapshot) {\n return snapshot.data[RouteTitleKey];\n }\n}\n\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\n@Injectable({providedIn: 'root'})\nexport class DefaultTitleStrategy extends TitleStrategy {\n constructor(readonly title: Title) {\n super();\n }\n\n /**\n * Sets the title of the browser to the given value.\n *\n * @param title The `pageTitle` from the deepest primary route.\n */\n override updateTitle(snapshot: RouterStateSnapshot): void {\n const title = this.buildTitle(snapshot);\n if (title !== undefined) {\n this.title.setTitle(title);\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.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\nimport {OnSameUrlNavigation, QueryParamsHandling} from './models';\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * If the ErrorHandler is used to prevent unhandled promise rejections when navigation\n * errors occur, use the `resolveNavigationPromiseOnError` option instead.\n *\n * @see RouterConfigOptions\n */\nexport type ErrorHandler = (error: any) => any;\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value should be set in\n * case you use [server-side rendering](guide/ssr), but do not enable [hydration](guide/hydration)\n * for your application.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * @see {@link forRoot()}\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled' | 'enabledBlocking' | 'enabledNonBlocking';\n\n/**\n * Extra configuration options that can be used with the `withRouterConfig` function.\n *\n * @publicApi\n */\nexport interface RouterConfigOptions {\n /**\n * Configures how the Router attempts to restore state when a navigation is cancelled.\n *\n * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n * router before the navigation started. This means that if the URL of the browser is updated\n * _before_ the navigation is canceled, the Router will simply replace the item in history rather\n * than trying to restore to the previous location in the session history. This happens most\n * frequently with `urlUpdateStrategy: 'eager'` and navigations with the browser back/forward\n * buttons.\n *\n * 'computed' - Will attempt to return to the same index in the session history that corresponds\n * to the Angular route when the navigation gets cancelled. For example, if the browser back\n * button is clicked and the navigation is cancelled, the Router will trigger a forward navigation\n * and vice versa.\n *\n * Note: the 'computed' option is incompatible with any `UrlHandlingStrategy` which only\n * handles a portion of the URL because the history restoration navigates to the previous place in\n * the browser history rather than simply resetting a portion of the URL.\n *\n * The default value is `replace` when not set.\n */\n canceledNavigationResolution?: 'replace' | 'computed';\n\n /**\n * Configures the default for handling a navigation request to the current URL.\n *\n * If unset, the `Router` will use `'ignore'`.\n *\n * @see {@link OnSameUrlNavigation}\n */\n onSameUrlNavigation?: OnSameUrlNavigation;\n\n /**\n * Defines how the router merges parameters, data, and resolved data from parent to child\n * routes.\n *\n * By default ('emptyOnly'), a route inherits the parent route's parameters when the route itself\n * has an empty path (meaning its configured with path: '') or when the parent route doesn't have\n * any component set.\n *\n * Set to 'always' to enable unconditional inheritance of parent parameters.\n *\n * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n * `a;foo=bar/b`.\n *\n */\n paramsInheritanceStrategy?: 'emptyOnly' | 'always';\n\n /**\n * Defines when the router updates the browser URL. By default ('deferred'),\n * update after successful navigation.\n * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n * Updating the URL early allows you to handle a failure of navigation by\n * showing an error message with the URL that failed.\n */\n urlUpdateStrategy?: 'deferred' | 'eager';\n\n /**\n * The default strategy to use for handling query params in `Router.createUrlTree` when one is not provided.\n *\n * The `createUrlTree` method is used internally by `Router.navigate` and `RouterLink`.\n * Note that `QueryParamsHandling` does not apply to `Router.navigateByUrl`.\n *\n * When neither the default nor the queryParamsHandling option is specified in the call to `createUrlTree`,\n * the current parameters will be replaced by new parameters.\n *\n * @see {@link Router#createUrlTree}\n * @see {@link QueryParamsHandling}\n */\n defaultQueryParamsHandling?: QueryParamsHandling;\n\n /**\n * When `true`, the `Promise` will instead resolve with `false`, as it does with other failed\n * navigations (for example, when guards are rejected).\n\n * Otherwise the `Promise` returned by the Router's navigation with be rejected\n * if an error occurs.\n */\n resolveNavigationPromiseOnError?: boolean;\n}\n\n/**\n * Configuration options for the scrolling feature which can be used with `withInMemoryScrolling`\n * function.\n *\n * @publicApi\n */\nexport interface InMemoryScrollingOptions {\n /**\n * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n * Anchor scrolling is disabled by default.\n *\n * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n * that we stored or scroll to the top.\n */\n anchorScrolling?: 'disabled' | 'enabled';\n\n /**\n * Configures if the scroll position needs to be restored when navigating back.\n *\n * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n * navigation). This option will be the default in the future.\n *\n * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n * in the following example.\n *\n * ```typescript\n * class AppComponent {\n * movieData: any;\n *\n * constructor(private router: Router, private viewportScroller: ViewportScroller,\n * changeDetectorRef: ChangeDetectorRef) {\n * router.events.pipe(filter((event: Event): event is Scroll => event instanceof Scroll)\n * ).subscribe(e => {\n * fetch('http://example.com/movies.json').then(response => {\n * this.movieData = response.json();\n * // update the template with the data before restoring scroll\n * changeDetectorRef.detectChanges();\n *\n * if (e.position) {\n * viewportScroller.scrollToPosition(e.position);\n * }\n * });\n * });\n * }\n * }\n * ```\n */\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\n}\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see {@link forRoot()}\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions extends InMemoryScrollingOptions, RouterConfigOptions {\n /**\n * When true, log all internal navigation events to the console.\n * Use for debugging.\n */\n enableTracing?: boolean;\n\n /**\n * When true, enable the location strategy that uses the URL fragment\n * instead of the history API.\n */\n useHash?: boolean;\n\n /**\n * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n * component is created. The bootstrap is blocked until the initial navigation is complete. This\n * value should be set in case you use [server-side rendering](guide/ssr), but do not enable\n * [hydration](guide/hydration) for your application. When set to `enabledNonBlocking`,\n * the initial navigation starts after the root component has been created.\n * The bootstrap is not blocked on the completion of the initial navigation. When set to\n * `disabled`, the initial navigation is not performed. The location listener is set up before the\n * root component gets created. Use if there is a reason to have more control over when the router\n * starts its initial navigation due to some complex initialization logic.\n */\n initialNavigation?: InitialNavigation;\n\n /**\n * When true, enables binding information from the `Router` state directly to the inputs of the\n * component in `Route` configurations.\n */\n bindToComponentInputs?: boolean;\n\n /**\n * When true, enables view transitions in the Router by running the route activation and\n * deactivation inside of `document.startViewTransition`.\n *\n * @see https://developer.chrome.com/docs/web-platform/view-transitions/\n * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API\n * @experimental\n */\n enableViewTransitions?: boolean;\n\n /**\n * A custom error handler for failed navigations.\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with the exception.\n *\n * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * If the ErrorHandler is used to prevent unhandled promise rejections when navigation\n * errors occur, use the `resolveNavigationPromiseOnError` option instead.\n *\n * @see RouterConfigOptions\n */\n errorHandler?: (error: any) => any;\n\n /**\n * Configures a preloading strategy.\n * One of `PreloadAllModules` or `NoPreloading` (the default).\n */\n preloadingStrategy?: any;\n\n /**\n * Configures the scroll offset the router will use when scrolling to an element.\n *\n * When given a tuple with x and y position value,\n * the router uses that offset each time it scrolls.\n * When given a function, the router invokes the function every time\n * it restores scroll position.\n */\n scrollOffset?: [number, number] | (() => [number, number]);\n}\n\n/**\n * A DI token for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'router config' : '',\n {\n providedIn: 'root',\n factory: () => ({}),\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.dev/license\n */\n\nimport {Component} from '@angular/core';\n\nimport {RouterOutlet} from '../directives/router_outlet';\nimport {PRIMARY_OUTLET} from '../shared';\nimport {Route} from '../models';\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({\n template: `<router-outlet></router-outlet>`,\n imports: [RouterOutlet],\n standalone: true,\n})\nexport class ɵEmptyOutletComponent {}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {...r, children} : {...r};\n if (\n !c.component &&\n !c.loadComponent &&\n (children || c.loadChildren) &&\n c.outlet &&\n c.outlet !== PRIMARY_OUTLET\n ) {\n c.component = ɵEmptyOutletComponent;\n }\n return c;\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.dev/license\n */\n\nimport {\n Compiler,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n NgModuleFactory,\n Type,\n} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {finalize, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {DefaultExport, LoadedRouterConfig, Route, Routes} from './models';\nimport {wrapIntoObservable} from './utils/collection';\nimport {assertStandalone, validateConfig} from './utils/config';\nimport {standardizeConfig} from './components/empty_outlet';\n\n/**\n * The DI token for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>(ngDevMode ? 'ROUTES' : '');\n\ntype ComponentLoader = Observable<Type<unknown>>;\n\n@Injectable({providedIn: 'root'})\nexport class RouterConfigLoader {\n private componentLoaders = new WeakMap<Route, ComponentLoader>();\n private childrenLoaders = new WeakMap<Route, Observable<LoadedRouterConfig>>();\n onLoadStartListener?: (r: Route) => void;\n onLoadEndListener?: (r: Route) => void;\n private readonly compiler = inject(Compiler);\n\n loadComponent(route: Route): Observable<Type<unknown>> {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route)!;\n } else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent!()).pipe(\n map(maybeUnwrapDefaultExport),\n tap((component) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }),\n finalize(() => {\n this.componentLoaders.delete(route);\n }),\n );\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject<Type<unknown>>()).pipe(\n refCount(),\n );\n this.componentLoaders.set(route, loader);\n return loader;\n }\n\n loadChildren(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route)!;\n } else if (route._loadedRoutes) {\n return of({routes: route._loadedRoutes, injector: route._loadedInjector});\n }\n\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = loadChildren(\n route,\n this.compiler,\n parentInjector,\n this.onLoadEndListener,\n );\n const loadRunner = moduleFactoryOrRoutes$.pipe(\n finalize(() => {\n this.childrenLoaders.delete(route);\n }),\n );\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(\n loadRunner,\n () => new Subject<LoadedRouterConfig>(),\n ).pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n}\n\n/**\n * Executes a `route.loadChildren` callback and converts the result to an array of child routes and\n * an injector if that callback returned a module.\n *\n * This function is used for the route discovery during prerendering\n * in @angular-devkit/build-angular. If there are any updates to the contract here, it will require\n * an update to the extractor.\n */\nexport function loadChildren(\n route: Route,\n compiler: Compiler,\n parentInjector: Injector,\n onLoadEndListener?: (r: Route) => void,\n): Observable<LoadedRouterConfig> {\n return wrapIntoObservable(route.loadChildren!()).pipe(\n map(maybeUnwrapDefaultExport),\n mergeMap((t) => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n } else {\n return from(compiler.compileModuleAsync(t));\n }\n }),\n map((factoryOrRoutes: NgModuleFactory<any> | Routes) => {\n if (onLoadEndListener) {\n onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is\n // no injector associated with lazy loading a `Route` array.\n let injector: EnvironmentInjector | undefined;\n let rawRoutes: Route[];\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n } else {\n injector = factoryOrRoutes.create(parentInjector).injector;\n // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n // will get stuck in an infinite loop. The child module's Injector will look to\n // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n // for it's parent module instead.\n rawRoutes = injector.get(ROUTES, [], {optional: true, self: true}).flat();\n }\n const routes = rawRoutes.map(standardizeConfig);\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n validateConfig(routes, route.path, requireStandaloneComponents);\n return {routes, injector};\n }),\n );\n}\n\nfunction isWrappedDefaultExport<T>(value: T | DefaultExport<T>): value is DefaultExport<T> {\n // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n // `default` will be a renamed property.\n return value && typeof value === 'object' && 'default' in value;\n}\n\nfunction maybeUnwrapDefaultExport<T>(input: T | DefaultExport<T>): T {\n // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n // subject to property renaming, so we reference it with bracket access.\n return isWrappedDefaultExport(input) ? input['default'] : input;\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.dev/license\n */\n\nimport {inject, Injectable} from '@angular/core';\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy)})\nexport abstract class UrlHandlingStrategy {\n /**\n * Tells the router if this URL should be processed.\n *\n * When it returns true, the router will execute the regular navigation.\n * When it returns false, the router will set the router state to an empty state.\n * As a result, all the active components will be destroyed.\n *\n */\n abstract shouldProcessUrl(url: UrlTree): boolean;\n\n /**\n * Extracts the part of the URL that should be handled by the router.\n * The rest of the URL will remain untouched.\n */\n abstract extract(url: UrlTree): UrlTree;\n\n /**\n * Merges the URL fragment with the rest of the URL.\n */\n abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n shouldProcessUrl(url: UrlTree): boolean {\n return true;\n }\n extract(url: UrlTree): UrlTree {\n return url;\n }\n merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n return newUrlPart;\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.dev/license\n */\n\n/// <reference types=\"dom-view-transitions\" />\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n afterNextRender,\n InjectionToken,\n Injector,\n NgZone,\n runInInjectionContext,\n} from '@angular/core';\n\nimport {ActivatedRouteSnapshot} from '../router_state';\n\nexport const CREATE_VIEW_TRANSITION = new InjectionToken<typeof createViewTransition>(\n ngDevMode ? 'view transition helper' : '',\n);\nexport const VIEW_TRANSITION_OPTIONS = new InjectionToken<\n ViewTransitionsFeatureOptions & {skipNextTransition: boolean}\n>(ngDevMode ? 'view transition options' : '');\n\n/**\n * Options to configure the View Transitions integration in the Router.\n *\n * @experimental\n * @publicApi\n * @see withViewTransitions\n */\nexport interface ViewTransitionsFeatureOptions {\n /**\n * Skips the very first call to `startViewTransition`. This can be useful for disabling the\n * animation during the application's initial loading phase.\n */\n skipInitialTransition?: boolean;\n\n /**\n * A function to run after the `ViewTransition` is created.\n *\n * This function is run in an injection context and can use `inject`.\n */\n onViewTransitionCreated?: (transitionInfo: ViewTransitionInfo) => void;\n}\n\n/**\n * The information passed to the `onViewTransitionCreated` function provided in the\n * `withViewTransitions` feature options.\n *\n * @publicApi\n * @experimental\n */\nexport interface ViewTransitionInfo {\n // TODO(atscott): This type can/should be the built-in `ViewTransition` type\n // from @types/dom-view-transitions but exporting that type from the public API is currently not\n // supported by tooling.\n /**\n * The `ViewTransition` returned by the call to `startViewTransition`.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition\n */\n transition: {\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/finished\n */\n finished: Promise<void>;\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/ready\n */\n ready: Promise<void>;\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/updateCallbackDone\n */\n updateCallbackDone: Promise<void>;\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/skipTransition\n */\n skipTransition(): void;\n };\n /**\n * The `ActivatedRouteSnapshot` that the navigation is transitioning from.\n */\n from: ActivatedRouteSnapshot;\n /**\n * The `ActivatedRouteSnapshot` that the navigation is transitioning to.\n */\n to: ActivatedRouteSnapshot;\n}\n\n/**\n * A helper function for using browser view transitions. This function skips the call to\n * `startViewTransition` if the browser does not support it.\n *\n * @returns A Promise that resolves when the view transition callback begins.\n */\nexport function createViewTransition(\n injector: Injector,\n from: ActivatedRouteSnapshot,\n to: ActivatedRouteSnapshot,\n): Promise<void> {\n const transitionOptions = injector.get(VIEW_TRANSITION_OPTIONS);\n const document = injector.get(DOCUMENT);\n // Create promises outside the Angular zone to avoid causing extra change detections\n return injector.get(NgZone).runOutsideAngular(() => {\n if (!document.startViewTransition || transitionOptions.skipNextTransition) {\n transitionOptions.skipNextTransition = false;\n // The timing of `startViewTransition` is closer to a macrotask. It won't be called\n // until the current event loop exits so we use a promise resolved in a timeout instead\n // of Promise.resolve().\n return new Promise((resolve) => setTimeout(resolve));\n }\n\n let resolveViewTransitionStarted: () => void;\n const viewTransitionStarted = new Promise<void>((resolve) => {\n resolveViewTransitionStarted = resolve;\n });\n const transition = document.startViewTransition(() => {\n resolveViewTransitionStarted();\n // We don't actually update dom within the transition callback. The resolving of the above\n // promise unblocks the Router navigation, which synchronously activates and deactivates\n // routes (the DOM update). This view transition waits for the next change detection to\n // complete (below), which includes the update phase of the routed components.\n return createRenderPromise(injector);\n });\n const {onViewTransitionCreated} = transitionOptions;\n if (onViewTransitionCreated) {\n runInInjectionContext(injector, () => onViewTransitionCreated({transition, from, to}));\n }\n return viewTransitionStarted;\n });\n}\n\n/**\n * Creates a promise that resolves after next render.\n */\nfunction createRenderPromise(injector: Injector) {\n return new Promise<void>((resolve) => {\n // Wait for the microtask queue to empty after the next render happens (by waiting a macrotask).\n // This ensures any follow-up renders in the microtask queue are completed before the\n // view transition starts animating.\n afterNextRender({read: () => setTimeout(resolve)}, {injector});\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.dev/license\n */\n\nimport {Location} from '@angular/common';\nimport {\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n runInInjectionContext,\n Type,\n} from '@angular/core';\nimport {BehaviorSubject, combineLatest, EMPTY, from, Observable, of, Subject} from 'rxjs';\nimport {\n catchError,\n defaultIfEmpty,\n filter,\n finalize,\n map,\n switchMap,\n take,\n takeUntil,\n tap,\n} from 'rxjs/operators';\n\nimport {createRouterState} from './create_router_state';\nimport {INPUT_BINDER} from './directives/router_outlet';\nimport {\n BeforeActivateRoutes,\n Event,\n GuardsCheckEnd,\n GuardsCheckStart,\n IMPERATIVE_NAVIGATION,\n NavigationCancel,\n NavigationCancellationCode,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n NavigationSkippedCode,\n NavigationStart,\n NavigationTrigger,\n RedirectRequest,\n ResolveEnd,\n ResolveStart,\n RouteConfigLoadEnd,\n RouteConfigLoadStart,\n RoutesRecognized,\n} from './events';\nimport {\n GuardResult,\n NavigationBehaviorOptions,\n QueryParamsHandling,\n RedirectCommand,\n Route,\n Routes,\n} from './models';\nimport {\n isNavigationCancelingError,\n isRedirectingNavigationCancelingError,\n redirectingNavigationError,\n} from './navigation_canceling_error';\nimport {activateRoutes} from './operators/activate_routes';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {TitleStrategy} from './page_title_strategy';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ROUTER_CONFIGURATION} from './router_config';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {\n ActivatedRoute,\n ActivatedRouteSnapshot,\n createEmptyState,\n RouterState,\n RouterStateSnapshot,\n} from './router_state';\nimport {Params} from './shared';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {isUrlTree, UrlSerializer, UrlTree} from './url_tree';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {CREATE_VIEW_TRANSITION} from './utils/view_transition';\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see {@link Router#navigate}\n * @see {@link Router#createUrlTree}\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n /**\n * Specifies a root URI to use for relative navigation.\n *\n * For example, consider the following route configuration where the parent route\n * has two children.\n *\n * ```\n * [{\n * path: 'parent',\n * component: ParentComponent,\n * children: [{\n * path: 'list',\n * component: ListComponent\n * },{\n * path: 'child',\n * component: ChildComponent\n * }]\n * }]\n * ```\n *\n * The following `go()` function navigates to the `list` route by\n * interpreting the destination URI as relative to the activated `child` route\n *\n * ```\n * @Component({...})\n * class ChildComponent {\n * constructor(private router: Router, private route: ActivatedRoute) {}\n *\n * go() {\n * router.navigate(['../list'], { relativeTo: this.route });\n * }\n * }\n * ```\n *\n * A value of `null` or `undefined` indicates that the navigation commands should be applied\n * relative to the root.\n */\n relativeTo?: ActivatedRoute | null;\n\n /**\n * Sets query parameters to the URL.\n *\n * ```\n * // Navigate to /results?page=1\n * router.navigate(['/results'], { queryParams: { page: 1 } });\n * ```\n */\n queryParams?: Params | null;\n\n /**\n * Sets the hash fragment for the URL.\n *\n * ```\n * // Navigate to /results#top\n * router.navigate(['/results'], { fragment: 'top' });\n * ```\n */\n fragment?: string;\n\n /**\n * How to handle query parameters in the router link for the next navigation.\n * One of:\n * * `preserve` : Preserve current parameters.\n * * `merge` : Merge new with current parameters.\n *\n * The \"preserve\" option discards any new query params:\n * ```\n * // from /view1?page=1 to/view2?page=1\n * router.navigate(['/view2'], { queryParams: { page: 2 }, queryParamsHandling: \"preserve\"\n * });\n * ```\n * The \"merge\" option appends new query params to the params from the current URL:\n * ```\n * // from /view1?page=1 to/view2?page=1&otherKey=2\n * router.navigate(['/view2'], { queryParams: { otherKey: 2 }, queryParamsHandling: \"merge\"\n * });\n * ```\n * In case of a key collision between current parameters and those in the `queryParams` object,\n * the new value is used.\n *\n */\n queryParamsHandling?: QueryParamsHandling | null;\n\n /**\n * When true, preserves the URL fragment for the next navigation\n *\n * ```\n * // Preserve fragment from /results#top to /view#top\n * router.navigate(['/view'], { preserveFragment: true });\n * ```\n */\n preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see {@link Router#navigate}\n * @see {@link Router#navigateByUrl}\n * @see {@link Router#createurltree}\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n * @see {@link UrlCreationOptions}\n * @see {@link NavigationBehaviorOptions}\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\nexport type RestoredState = {\n [k: string]: any;\n // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n navigationId: number;\n // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n // the history state.\n ɵrouterPageId?: number;\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n /**\n * The unique identifier of the current navigation.\n */\n id: number;\n /**\n * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n * the value before the router has parsed or applied redirects to it.\n */\n initialUrl: UrlTree;\n /**\n * The initial target URL after being parsed with `UrlHandlingStrategy.extract()`.\n */\n extractedUrl: UrlTree;\n /**\n * The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n */\n finalUrl?: UrlTree;\n /**\n * `UrlTree` to use when updating the browser URL for the navigation when `extras.browserUrl` is\n * defined.\n * @internal\n */\n readonly targetBrowserUrl?: UrlTree | string;\n /**\n * TODO(atscott): If we want to make StateManager public, they will need access to this. Note that\n * it's already eventually exposed through router.routerState.\n * @internal\n */\n targetRouterState?: RouterState;\n /**\n * Identifies how this navigation was triggered.\n *\n * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * * 'popstate'--Triggered by a popstate event.\n * * 'hashchange'--Triggered by a hashchange event.\n */\n trigger: 'imperative' | 'popstate' | 'hashchange';\n /**\n * Options that controlled the strategy used for this navigation.\n * See `NavigationExtras`.\n */\n extras: NavigationExtras;\n /**\n * The previously successful `Navigation` object. Only one previous navigation\n * is available, therefore this previous `Navigation` object has a `null` value\n * for its own `previousNavigation`.\n */\n previousNavigation: Navigation | null;\n}\n\nexport interface NavigationTransition {\n id: number;\n currentUrlTree: UrlTree;\n extractedUrl: UrlTree;\n currentRawUrl: UrlTree;\n urlAfterRedirects?: UrlTree;\n rawUrl: UrlTree;\n extras: NavigationExtras;\n resolve: (value: boolean | PromiseLike<boolean>) => void;\n reject: (reason?: any) => void;\n promise: Promise<boolean>;\n source: NavigationTrigger;\n restoredState: RestoredState | null;\n currentSnapshot: RouterStateSnapshot;\n targetSnapshot: RouterStateSnapshot | null;\n currentRouterState: RouterState;\n targetRouterState: RouterState | null;\n guards: Checks;\n guardsResult: GuardResult | null;\n}\n\n/**\n * The interface from the Router needed by the transitions. Used to avoid a circular dependency on\n * Router. This interface should be whittled down with future refactors. For example, we do not need\n * to get `UrlSerializer` from the Router. We can instead inject it in `NavigationTransitions`\n * directly.\n */\ninterface InternalRouterInterface {\n config: Routes;\n // All of these are public API of router interface and can change during runtime because they are\n // writeable. Ideally, these would be removed and the values retrieved instead from the values\n // available in DI.\n errorHandler: (error: any) => any;\n navigated: boolean;\n routeReuseStrategy: RouteReuseStrategy;\n onSameUrlNavigation: 'reload' | 'ignore';\n}\n\nexport const NAVIGATION_ERROR_HANDLER = new InjectionToken<\n (error: NavigationError) => unknown | RedirectCommand\n>(typeof ngDevMode === 'undefined' || ngDevMode ? 'navigation error handler' : '');\n\n@Injectable({providedIn: 'root'})\nexport class NavigationTransitions {\n currentNavigation: Navigation | null = null;\n currentTransition: NavigationTransition | null = null;\n lastSuccessfulNavigation: Navigation | null = null;\n /**\n * These events are used to communicate back to the Router about the state of the transition. The\n * Router wants to respond to these events in various ways. Because the `NavigationTransition`\n * class is not public, this event subject is not publicly exposed.\n */\n readonly events = new Subject<Event | BeforeActivateRoutes | RedirectRequest>();\n /**\n * Used to abort the current transition with an error.\n */\n readonly transitionAbortSubject = new Subject<Error>();\n private readonly configLoader = inject(RouterConfigLoader);\n private readonly environmentInjector = inject(EnvironmentInjector);\n private readonly urlSerializer = inject(UrlSerializer);\n private readonly rootContexts = inject(ChildrenOutletContexts);\n private readonly location = inject(Location);\n private readonly inputBindingEnabled = inject(INPUT_BINDER, {optional: true}) !== null;\n private readonly titleStrategy?: TitleStrategy = inject(TitleStrategy);\n private readonly options = inject(ROUTER_CONFIGURATION, {optional: true}) || {};\n private readonly paramsInheritanceStrategy =\n this.options.paramsInheritanceStrategy || 'emptyOnly';\n private readonly urlHandlingStrategy = inject(UrlHandlingStrategy);\n private readonly createViewTransition = inject(CREATE_VIEW_TRANSITION, {optional: true});\n private readonly navigationErrorHandler = inject(NAVIGATION_ERROR_HANDLER, {optional: true});\n\n navigationId = 0;\n get hasRequestedNavigation() {\n return this.navigationId !== 0;\n }\n private transitions?: BehaviorSubject<NavigationTransition>;\n /**\n * Hook that enables you to pause navigation after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n afterPreactivation: () => Observable<void> = () => of(void 0);\n /** @internal */\n rootComponentType: Type<any> | null = null;\n\n constructor() {\n const onLoadStart = (r: Route) => this.events.next(new RouteConfigLoadStart(r));\n const onLoadEnd = (r: Route) => this.events.next(new RouteConfigLoadEnd(r));\n this.configLoader.onLoadEndListener = onLoadEnd;\n this.configLoader.onLoadStartListener = onLoadStart;\n }\n\n complete() {\n this.transitions?.complete();\n }\n\n handleNavigationRequest(\n request: Pick<\n NavigationTransition,\n | 'source'\n | 'restoredState'\n | 'currentUrlTree'\n | 'currentRawUrl'\n | 'rawUrl'\n | 'extras'\n | 'resolve'\n | 'reject'\n | 'promise'\n | 'currentSnapshot'\n | 'currentRouterState'\n >,\n ) {\n const id = ++this.navigationId;\n this.transitions?.next({...this.transitions.value, ...request, id});\n }\n\n setupNavigations(\n router: InternalRouterInterface,\n initialUrlTree: UrlTree,\n initialRouterState: RouterState,\n ): Observable<NavigationTransition> {\n this.transitions = new BehaviorSubject<NavigationTransition>({\n id: 0,\n currentUrlTree: initialUrlTree,\n currentRawUrl: initialUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(initialUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),\n rawUrl: initialUrlTree,\n extras: {},\n resolve: () => {},\n reject: () => {},\n promise: Promise.resolve(true),\n source: IMPERATIVE_NAVIGATION,\n restoredState: null,\n currentSnapshot: initialRouterState.snapshot,\n targetSnapshot: null,\n currentRouterState: initialRouterState,\n targetRouterState: null,\n guards: {canActivateChecks: [], canDeactivateChecks: []},\n guardsResult: null,\n });\n return this.transitions.pipe(\n filter((t) => t.id !== 0),\n\n // Extract URL\n map(\n (t) =>\n ({\n ...t,\n extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl),\n }) as NavigationTransition,\n ),\n\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap((overallTransitionState) => {\n let completed = false;\n let errored = false;\n return of(overallTransitionState).pipe(\n switchMap((t) => {\n // It is possible that `switchMap` fails to cancel previous navigations if a new one happens synchronously while the operator\n // is processing the `next` notification of that previous navigation. This can happen when a new navigation (say 2) cancels a\n // previous one (1) and yet another navigation (3) happens synchronously in response to the `NavigationCancel` event for (1).\n // https://github.com/ReactiveX/rxjs/issues/7455\n if (this.navigationId > overallTransitionState.id) {\n const cancellationReason =\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}`\n : '';\n this.cancelNavigationTransition(\n overallTransitionState,\n cancellationReason,\n NavigationCancellationCode.SupersededByNewNavigation,\n );\n return EMPTY;\n }\n this.currentTransition = overallTransitionState;\n // Store the Navigation object\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.rawUrl,\n extractedUrl: t.extractedUrl,\n targetBrowserUrl:\n typeof t.extras.browserUrl === 'string'\n ? this.urlSerializer.parse(t.extras.browserUrl)\n : t.extras.browserUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: !this.lastSuccessfulNavigation\n ? null\n : {\n ...this.lastSuccessfulNavigation,\n previousNavigation: null,\n },\n };\n const urlTransition =\n !router.navigated || this.isUpdatingInternalState() || this.isUpdatedBrowserUrl();\n\n const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n if (!urlTransition && onSameUrlNavigation !== 'reload') {\n const reason =\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.`\n : '';\n this.events.next(\n new NavigationSkipped(\n t.id,\n this.urlSerializer.serialize(t.rawUrl),\n reason,\n NavigationSkippedCode.IgnoredSameUrlNavigation,\n ),\n );\n t.resolve(false);\n return EMPTY;\n }\n\n if (this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\n return of(t).pipe(\n // Fire NavigationStart event\n switchMap((t) => {\n const transition = this.transitions?.getValue();\n this.events.next(\n new NavigationStart(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n t.source,\n t.restoredState,\n ),\n );\n if (transition !== this.transitions?.getValue()) {\n return EMPTY;\n }\n\n // This delay is required to match old behavior that forced\n // navigation to always be async\n return Promise.resolve(t);\n }),\n\n // Recognize\n recognize(\n this.environmentInjector,\n this.configLoader,\n this.rootComponentType,\n router.config,\n this.urlSerializer,\n this.paramsInheritanceStrategy,\n ),\n\n // Update URL if in `eager` update mode\n tap((t) => {\n overallTransitionState.targetSnapshot = t.targetSnapshot;\n overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n this.currentNavigation = {\n ...this.currentNavigation!,\n finalUrl: t.urlAfterRedirects,\n };\n\n // Fire RoutesRecognized\n const routesRecognized = new RoutesRecognized(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n this.urlSerializer.serialize(t.urlAfterRedirects!),\n t.targetSnapshot!,\n );\n this.events.next(routesRecognized);\n }),\n );\n } else if (\n urlTransition &&\n this.urlHandlingStrategy.shouldProcessUrl(t.currentRawUrl)\n ) {\n /* When the current URL shouldn't be processed, but the previous one\n * was, we handle this \"error condition\" by navigating to the\n * previously successful URL, but leaving the URL intact.*/\n const {id, extractedUrl, source, restoredState, extras} = t;\n const navStart = new NavigationStart(\n id,\n this.urlSerializer.serialize(extractedUrl),\n source,\n restoredState,\n );\n this.events.next(navStart);\n const targetSnapshot = createEmptyState(this.rootComponentType).snapshot;\n\n this.currentTransition = overallTransitionState = {\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {...extras, skipLocationChange: false, replaceUrl: false},\n };\n this.currentNavigation!.finalUrl = extractedUrl;\n return of(overallTransitionState);\n } else {\n /* When neither the current or previous URL can be processed, do\n * nothing other than update router's internal reference to the\n * current \"settled\" URL. This way the next navigation will be coming\n * from the current URL in the browser.\n */\n const reason =\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Navigation was ignored because the UrlHandlingStrategy` +\n ` indicated neither the current URL ${t.currentRawUrl} nor target URL ${t.rawUrl} should be processed.`\n : '';\n this.events.next(\n new NavigationSkipped(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n reason,\n NavigationSkippedCode.IgnoredByUrlHandlingStrategy,\n ),\n );\n t.resolve(false);\n return EMPTY;\n }\n }),\n\n // --- GUARDS ---\n tap((t) => {\n const guardsStart = new GuardsCheckStart(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n this.urlSerializer.serialize(t.urlAfterRedirects!),\n t.targetSnapshot!,\n );\n this.events.next(guardsStart);\n }),\n\n map((t) => {\n this.currentTransition = overallTransitionState = {\n ...t,\n guards: getAllRouteGuards(t.targetSnapshot!, t.currentSnapshot, this.rootContexts),\n };\n return overallTransitionState;\n }),\n\n checkGuards(this.environmentInjector, (evt: Event) => this.events.next(evt)),\n tap((t) => {\n overallTransitionState.guardsResult = t.guardsResult;\n if (t.guardsResult && typeof t.guardsResult !== 'boolean') {\n throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n }\n\n const guardsEnd = new GuardsCheckEnd(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n this.urlSerializer.serialize(t.urlAfterRedirects!),\n t.targetSnapshot!,\n !!t.guardsResult,\n );\n this.events.next(guardsEnd);\n }),\n\n filter((t) => {\n if (!t.guardsResult) {\n this.cancelNavigationTransition(t, '', NavigationCancellationCode.GuardRejected);\n return false;\n }\n return true;\n }),\n\n // --- RESOLVE ---\n switchTap((t) => {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(\n tap((t) => {\n const resolveStart = new ResolveStart(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n this.urlSerializer.serialize(t.urlAfterRedirects!),\n t.targetSnapshot!,\n );\n this.events.next(resolveStart);\n }),\n switchMap((t) => {\n let dataResolved = false;\n return of(t).pipe(\n resolveData(this.paramsInheritanceStrategy, this.environmentInjector),\n tap({\n next: () => (dataResolved = true),\n complete: () => {\n if (!dataResolved) {\n this.cancelNavigationTransition(\n t,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `At least one route resolver didn't emit any value.`\n : '',\n NavigationCancellationCode.NoDataFromResolver,\n );\n }\n },\n }),\n );\n }),\n tap((t) => {\n const resolveEnd = new ResolveEnd(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n this.urlSerializer.serialize(t.urlAfterRedirects!),\n t.targetSnapshot!,\n );\n this.events.next(resolveEnd);\n }),\n );\n }\n return undefined;\n }),\n\n // --- LOAD COMPONENTS ---\n switchTap((t: NavigationTransition) => {\n const loadComponents = (route: ActivatedRouteSnapshot): Array<Observable<void>> => {\n const loaders: Array<Observable<void>> = [];\n if (route.routeConfig?.loadComponent && !route.routeConfig._loadedComponent) {\n loaders.push(\n this.configLoader.loadComponent(route.routeConfig).pipe(\n tap((loadedComponent) => {\n route.component = loadedComponent;\n }),\n map(() => void 0),\n ),\n );\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot!.root)).pipe(\n defaultIfEmpty(null),\n take(1),\n );\n }),\n\n switchTap(() => this.afterPreactivation()),\n\n switchMap(() => {\n const {currentSnapshot, targetSnapshot} = overallTransitionState;\n const viewTransitionStarted = this.createViewTransition?.(\n this.environmentInjector,\n currentSnapshot.root,\n targetSnapshot!.root,\n );\n\n // If view transitions are enabled, block the navigation until the view\n // transition callback starts. Otherwise, continue immediately.\n return viewTransitionStarted\n ? from(viewTransitionStarted).pipe(map(() => overallTransitionState))\n : of(overallTransitionState);\n }),\n\n map((t: NavigationTransition) => {\n const targetRouterState = createRouterState(\n router.routeReuseStrategy,\n t.targetSnapshot!,\n t.currentRouterState,\n );\n this.currentTransition = overallTransitionState = {...t, targetRouterState};\n this.currentNavigation!.targetRouterState = targetRouterState;\n return overallTransitionState;\n }),\n\n tap(() => {\n this.events.next(new BeforeActivateRoutes());\n }),\n\n activateRoutes(\n this.rootContexts,\n router.routeReuseStrategy,\n (evt: Event) => this.events.next(evt),\n this.inputBindingEnabled,\n ),\n\n // Ensure that if some observable used to drive the transition doesn't\n // complete, the navigation still finalizes This should never happen, but\n // this is done as a safety measure to avoid surfacing this error (#49567).\n take(1),\n\n tap({\n next: (t: NavigationTransition) => {\n completed = true;\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.events.next(\n new NavigationEnd(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n this.urlSerializer.serialize(t.urlAfterRedirects!),\n ),\n );\n this.titleStrategy?.updateTitle(t.targetRouterState!.snapshot);\n t.resolve(true);\n },\n complete: () => {\n completed = true;\n },\n }),\n\n // There used to be a lot more logic happening directly within the\n // transition Observable. Some of this logic has been refactored out to\n // other places but there may still be errors that happen there. This gives\n // us a way to cancel the transition from the outside. This may also be\n // required in the future to support something like the abort signal of the\n // Navigation API where the navigation gets aborted from outside the\n // transition.\n takeUntil(\n this.transitionAbortSubject.pipe(\n tap((err) => {\n throw err;\n }),\n ),\n ),\n\n finalize(() => {\n /* When the navigation stream finishes either through error or success,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason =\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}`\n : '';\n this.cancelNavigationTransition(\n overallTransitionState,\n cancelationReason,\n NavigationCancellationCode.SupersededByNewNavigation,\n );\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentTransition?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n this.currentTransition = null;\n }\n }),\n catchError((e) => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError(e)) {\n this.events.next(\n new NavigationCancel(\n overallTransitionState.id,\n this.urlSerializer.serialize(overallTransitionState.extractedUrl),\n e.message,\n e.cancellationCode,\n ),\n );\n\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!isRedirectingNavigationCancelingError(e)) {\n overallTransitionState.resolve(false);\n } else {\n this.events.next(new RedirectRequest(e.url, e.navigationBehaviorOptions));\n }\n\n /* All other errors should reset to the router's internal URL reference\n * to the pre-error state. */\n } else {\n const navigationError = new NavigationError(\n overallTransitionState.id,\n this.urlSerializer.serialize(overallTransitionState.extractedUrl),\n e,\n overallTransitionState.targetSnapshot ?? undefined,\n );\n\n try {\n const navigationErrorHandlerResult = runInInjectionContext(\n this.environmentInjector,\n () => this.navigationErrorHandler?.(navigationError),\n );\n\n if (navigationErrorHandlerResult instanceof RedirectCommand) {\n const {message, cancellationCode} = redirectingNavigationError(\n this.urlSerializer,\n navigationErrorHandlerResult,\n );\n this.events.next(\n new NavigationCancel(\n overallTransitionState.id,\n this.urlSerializer.serialize(overallTransitionState.extractedUrl),\n message,\n cancellationCode,\n ),\n );\n this.events.next(\n new RedirectRequest(\n navigationErrorHandlerResult.redirectTo,\n navigationErrorHandlerResult.navigationBehaviorOptions,\n ),\n );\n } else {\n this.events.next(navigationError);\n // TODO(atscott): remove deprecation on errorHandler in RouterModule.forRoot and change behavior to provide NAVIGATION_ERROR_HANDLER\n // Note: Still remove public `Router.errorHandler` property, as this is supposed to be configured in DI.\n const errorHandlerResult = router.errorHandler(e);\n overallTransitionState.resolve(!!errorHandlerResult);\n }\n } catch (ee) {\n // TODO(atscott): consider flipping the default behavior of\n // resolveNavigationPromiseOnError to be `resolve(false)` when\n // undefined. This is the most sane thing to do given that\n // applications very rarely handle the promise rejection and, as a\n // result, would get \"unhandled promise rejection\" console logs.\n // The vast majority of applications would not be affected by this\n // change so omitting a migration seems reasonable. Instead,\n // applications that rely on rejection can specifically opt-in to the\n // old behavior.\n if (this.options.resolveNavigationPromiseOnError) {\n overallTransitionState.resolve(false);\n } else {\n overallTransitionState.reject(ee);\n }\n }\n }\n\n return EMPTY;\n }),\n );\n // casting because `pipe` returns observable({}) when called with 8+ arguments\n }),\n ) as Observable<NavigationTransition>;\n }\n\n private cancelNavigationTransition(\n t: NavigationTransition,\n reason: string,\n code: NavigationCancellationCode,\n ) {\n const navCancel = new NavigationCancel(\n t.id,\n this.urlSerializer.serialize(t.extractedUrl),\n reason,\n code,\n );\n this.events.next(navCancel);\n t.resolve(false);\n }\n\n /**\n * @returns Whether we're navigating to somewhere that is not what the Router is\n * currently set to.\n */\n private isUpdatingInternalState() {\n // TODO(atscott): The serializer should likely be used instead of\n // `UrlTree.toString()`. Custom serializers are often written to handle\n // things better than the default one (objects, for example will be\n // [Object object] with the custom serializer and be \"the same\" when they\n // aren't).\n // (Same for isUpdatedBrowserUrl)\n return (\n this.currentTransition?.extractedUrl.toString() !==\n this.currentTransition?.currentUrlTree.toString()\n );\n }\n\n /**\n * @returns Whether we're updating the browser URL to something new (navigation is going\n * to somewhere not displayed in the URL bar and we will update the URL\n * bar if navigation succeeds).\n */\n private isUpdatedBrowserUrl() {\n // The extracted URL is the part of the URL that this application cares about. `extract` may\n // return only part of the browser URL and that part may have not changed even if some other\n // portion of the URL did.\n const currentBrowserUrl = this.urlHandlingStrategy.extract(\n this.urlSerializer.parse(this.location.path(true)),\n );\n const targetBrowserUrl =\n this.currentNavigation?.targetBrowserUrl ?? this.currentNavigation?.extractedUrl;\n return (\n currentBrowserUrl.toString() !== targetBrowserUrl?.toString() &&\n !this.currentNavigation?.extras.skipLocationChange\n );\n }\n}\n\nexport function isBrowserTriggeredNavigation(source: NavigationTrigger) {\n return source !== IMPERATIVE_NAVIGATION;\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.dev/license\n */\n\nimport {EnvironmentInjector, Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../models';\nimport {NavigationTransition} from '../navigation_transition';\nimport {recognize as recognizeFn} from '../recognize';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function recognize(\n injector: EnvironmentInjector,\n configLoader: RouterConfigLoader,\n rootComponentType: Type<any> | null,\n config: Route[],\n serializer: UrlSerializer,\n paramsInheritanceStrategy: 'emptyOnly' | 'always',\n): MonoTypeOperatorFunction<NavigationTransition> {\n return mergeMap((t) =>\n recognizeFn(\n injector,\n configLoader,\n rootComponentType,\n config,\n t.extractedUrl,\n serializer,\n paramsInheritanceStrategy,\n ).pipe(\n map(({state: targetSnapshot, tree: urlAfterRedirects}) => {\n return {...t, targetSnapshot, urlAfterRedirects};\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.dev/license\n */\n\nimport {ComponentRef, inject, Injectable} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n contexts: Map<string, OutletContext>;\n componentRef: ComponentRef<any>;\n route: TreeNode<ActivatedRoute>;\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy)})\nexport abstract class RouteReuseStrategy {\n /** Determines if this route (and its subtree) should be detached to be reused later */\n abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n /**\n * Stores the detached route.\n *\n * Storing a `null` value should erase the previously stored value.\n */\n abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;\n\n /** Determines if this route (and its subtree) should be reattached */\n abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n /** Retrieves the previously stored route */\n abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;\n\n /** Determines if a route should be reused */\n abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n /**\n * Whether the given route should detach for later reuse.\n * Always returns false for `BaseRouteReuseStrategy`.\n * */\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n return false;\n }\n\n /**\n * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n */\n store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n /** Returns `false`, meaning the route (and its subtree) is never reattached */\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n return false;\n }\n\n /** Returns `null` because this strategy does not store routes for later re-use. */\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n return null;\n }\n\n /**\n * Determines if a route should be reused.\n * This strategy returns `true` when the future route config and current route config are\n * identical.\n */\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\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.dev/license\n */\n\nimport {Location} from '@angular/common';\nimport {inject, Injectable} from '@angular/core';\nimport {SubscriptionLike} from 'rxjs';\n\nimport {\n BeforeActivateRoutes,\n Event,\n NavigationCancel,\n NavigationCancellationCode,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n NavigationStart,\n PrivateRouterEvents,\n RoutesRecognized,\n} from '../events';\nimport {Navigation, RestoredState} from '../navigation_transition';\nimport {ROUTER_CONFIGURATION} from '../router_config';\nimport {createEmptyState, RouterState} from '../router_state';\nimport {UrlHandlingStrategy} from '../url_handling_strategy';\nimport {UrlSerializer, UrlTree} from '../url_tree';\n\n@Injectable({providedIn: 'root', useFactory: () => inject(HistoryStateManager)})\nexport abstract class StateManager {\n /**\n * Returns the currently activated `UrlTree`.\n *\n * This `UrlTree` shows only URLs that the `Router` is configured to handle (through\n * `UrlHandlingStrategy`).\n *\n * The value is set after finding the route config tree to activate but before activating the\n * route.\n */\n abstract getCurrentUrlTree(): UrlTree;\n\n /**\n * Returns a `UrlTree` that is represents what the browser is actually showing.\n *\n * In the life of a navigation transition:\n * 1. When a navigation begins, the raw `UrlTree` is updated to the full URL that's being\n * navigated to.\n * 2. During a navigation, redirects are applied, which might only apply to _part_ of the URL (due\n * to `UrlHandlingStrategy`).\n * 3. Just before activation, the raw `UrlTree` is updated to include the redirects on top of the\n * original raw URL.\n *\n * Note that this is _only_ here to support `UrlHandlingStrategy.extract` and\n * `UrlHandlingStrategy.shouldProcessUrl`. Without those APIs, the current `UrlTree` would not\n * deviated from the raw `UrlTree`.\n *\n * For `extract`, a raw `UrlTree` is needed because `extract` may only return part\n * of the navigation URL. Thus, the current `UrlTree` may only represent _part_ of the browser\n * URL. When a navigation gets cancelled and the router needs to reset the URL or a new navigation\n * occurs, it needs to know the _whole_ browser URL, not just the part handled by\n * `UrlHandlingStrategy`.\n * For `shouldProcessUrl`, when the return is `false`, the router ignores the navigation but\n * still updates the raw `UrlTree` with the assumption that the navigation was caused by the\n * location change listener due to a URL update by the AngularJS router. In this case, the router\n * still need to know what the browser's URL is for future navigations.\n */\n abstract getRawUrlTree(): UrlTree;\n\n /** Returns the current state stored by the browser for the current history entry. */\n abstract restoredState(): RestoredState | null | undefined;\n\n /** Returns the current RouterState. */\n abstract getRouterState(): RouterState;\n\n /**\n * Registers a listener that is called whenever the current history entry changes by some API\n * outside the Router. This includes user-activated changes like back buttons and link clicks, but\n * also includes programmatic APIs called by non-Router JavaScript.\n */\n abstract registerNonRouterCurrentEntryChangeListener(\n listener: (url: string, state: RestoredState | null | undefined) => void,\n ): SubscriptionLike;\n\n /**\n * Handles a navigation event sent from the Router. These are typically events that indicate a\n * navigation has started, progressed, been cancelled, or finished.\n */\n abstract handleRouterEvent(e: Event | PrivateRouterEvents, currentTransition: Navigation): void;\n}\n\n@Injectable({providedIn: 'root'})\nexport class HistoryStateManager extends StateManager {\n private readonly location = inject(Location);\n private readonly urlSerializer = inject(UrlSerializer);\n private readonly options = inject(ROUTER_CONFIGURATION, {optional: true}) || {};\n private readonly canceledNavigationResolution =\n this.options.canceledNavigationResolution || 'replace';\n\n private urlHandlingStrategy = inject(UrlHandlingStrategy);\n private urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n\n private currentUrlTree = new UrlTree();\n\n override getCurrentUrlTree() {\n return this.currentUrlTree;\n }\n\n private rawUrlTree = this.currentUrlTree;\n\n override getRawUrlTree() {\n return this.rawUrlTree;\n }\n\n /**\n * The id of the currently active page in the router.\n * Updated to the transition's target id on a successful navigation.\n *\n * This is used to track what page the router last activated. When an attempted navigation fails,\n * the router can then use this to compute how to restore the state back to the previously active\n * page.\n */\n private currentPageId: number = 0;\n private lastSuccessfulId: number = -1;\n\n override restoredState(): RestoredState | null | undefined {\n return this.location.getState() as RestoredState | null | undefined;\n }\n\n /**\n * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n * important for computing the target page id for new navigations because we need to ensure each\n * page id in the browser history is 1 more than the previous entry.\n */\n private get browserPageId(): number {\n if (this.canceledNavigationResolution !== 'computed') {\n return this.currentPageId;\n }\n return this.restoredState()?.ɵrouterPageId ?? this.currentPageId;\n }\n\n private routerState = createEmptyState(null);\n\n override getRouterState() {\n return this.routerState;\n }\n\n private stateMemento = this.createStateMemento();\n\n private createStateMemento() {\n return {\n rawUrlTree: this.rawUrlTree,\n currentUrlTree: this.currentUrlTree,\n routerState: this.routerState,\n };\n }\n\n override registerNonRouterCurrentEntryChangeListener(\n listener: (url: string, state: RestoredState | null | undefined) => void,\n ): SubscriptionLike {\n return this.location.subscribe((event) => {\n if (event['type'] === 'popstate') {\n listener(event['url']!, event.state as RestoredState | null | undefined);\n }\n });\n }\n\n override handleRouterEvent(e: Event | PrivateRouterEvents, currentTransition: Navigation) {\n if (e instanceof NavigationStart) {\n this.stateMemento = this.createStateMemento();\n } else if (e instanceof NavigationSkipped) {\n this.rawUrlTree = currentTransition.initialUrl;\n } else if (e instanceof RoutesRecognized) {\n if (this.urlUpdateStrategy === 'eager') {\n if (!currentTransition.extras.skipLocationChange) {\n const rawUrl = this.urlHandlingStrategy.merge(\n currentTransition.finalUrl!,\n currentTransition.initialUrl,\n );\n this.setBrowserUrl(currentTransition.targetBrowserUrl ?? rawUrl, currentTransition);\n }\n }\n } else if (e instanceof BeforeActivateRoutes) {\n this.currentUrlTree = currentTransition.finalUrl!;\n this.rawUrlTree = this.urlHandlingStrategy.merge(\n currentTransition.finalUrl!,\n currentTransition.initialUrl,\n );\n this.routerState = currentTransition.targetRouterState!;\n if (this.urlUpdateStrategy === 'deferred' && !currentTransition.extras.skipLocationChange) {\n this.setBrowserUrl(\n currentTransition.targetBrowserUrl ?? this.rawUrlTree,\n currentTransition,\n );\n }\n } else if (\n e instanceof NavigationCancel &&\n (e.code === NavigationCancellationCode.GuardRejected ||\n e.code === NavigationCancellationCode.NoDataFromResolver)\n ) {\n this.restoreHistory(currentTransition);\n } else if (e instanceof NavigationError) {\n this.restoreHistory(currentTransition, true);\n } else if (e instanceof NavigationEnd) {\n this.lastSuccessfulId = e.id;\n this.currentPageId = this.browserPageId;\n }\n }\n\n private setBrowserUrl(url: UrlTree | string, transition: Navigation) {\n const path = url instanceof UrlTree ? this.urlSerializer.serialize(url) : url;\n if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n // replacements do not update the target page\n const currentBrowserPageId = this.browserPageId;\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, currentBrowserPageId),\n };\n this.location.replaceState(path, '', state);\n } else {\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, this.browserPageId + 1),\n };\n this.location.go(path, '', state);\n }\n }\n\n /**\n * Performs the necessary rollback action to restore the browser URL to the\n * state before the transition.\n */\n private restoreHistory(navigation: Navigation, restoringFromCaughtError = false) {\n if (this.canceledNavigationResolution === 'computed') {\n const currentBrowserPageId = this.browserPageId;\n const targetPagePosition = this.currentPageId - currentBrowserPageId;\n if (targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n } else if (this.currentUrlTree === navigation.finalUrl && targetPagePosition === 0) {\n // We got to the activation stage (where currentUrlTree is set to the navigation's\n // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n // We still need to reset the router state back to what it was when the navigation started.\n this.resetState(navigation);\n this.resetUrlToCurrentUrlTree();\n } else {\n // The browser URL and router state was not updated before the navigation cancelled so\n // there's no restoration needed.\n }\n } else if (this.canceledNavigationResolution === 'replace') {\n // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n // for `deferred` navigations that haven't change the internal state yet because guards\n // reject. For 'eager' navigations, it seems like we also really should reset the state\n // because the navigation was cancelled. Investigate if this can be done by running TGP.\n if (restoringFromCaughtError) {\n this.resetState(navigation);\n }\n this.resetUrlToCurrentUrlTree();\n }\n }\n\n private resetState(navigation: Navigation): void {\n this.routerState = this.stateMemento.routerState;\n this.currentUrlTree = this.stateMemento.currentUrlTree;\n // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\n this.rawUrlTree = this.urlHandlingStrategy.merge(\n this.currentUrlTree,\n navigation.finalUrl ?? this.rawUrlTree,\n );\n }\n\n private resetUrlToCurrentUrlTree(): void {\n this.location.replaceState(\n this.urlSerializer.serialize(this.rawUrlTree),\n '',\n this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId),\n );\n }\n\n private generateNgRouterState(navigationId: number, routerPageId: number) {\n if (this.canceledNavigationResolution === 'computed') {\n return {navigationId, ɵrouterPageId: routerPageId};\n }\n return {navigationId};\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.dev/license\n */\n\nimport {Observable} from 'rxjs';\nimport {filter, map, take} from 'rxjs/operators';\n\nimport {\n Event,\n NavigationCancel,\n NavigationCancellationCode,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n} from '../events';\n\nenum NavigationResult {\n COMPLETE,\n FAILED,\n REDIRECTING,\n}\n\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nexport function afterNextNavigation(router: {events: Observable<Event>}, action: () => void) {\n router.events\n .pipe(\n filter(\n (e): e is NavigationEnd | NavigationCancel | NavigationError | NavigationSkipped =>\n e instanceof NavigationEnd ||\n e instanceof NavigationCancel ||\n e instanceof NavigationError ||\n e instanceof NavigationSkipped,\n ),\n map((e) => {\n if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n return NavigationResult.COMPLETE;\n }\n const redirecting =\n e instanceof NavigationCancel\n ? e.code === NavigationCancellationCode.Redirect ||\n e.code === NavigationCancellationCode.SupersededByNewNavigation\n : false;\n return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n }),\n filter(\n (result): result is NavigationResult.COMPLETE | NavigationResult.FAILED =>\n result !== NavigationResult.REDIRECTING,\n ),\n take(1),\n )\n .subscribe(() => {\n action();\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.dev/license\n */\n\nimport {Location} from '@angular/common';\nimport {\n inject,\n Injectable,\n Type,\n ɵConsole as Console,\n ɵPendingTasks as PendingTasks,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {Observable, Subject, Subscription, SubscriptionLike} from 'rxjs';\n\nimport {createSegmentGroupFromRoute, createUrlTreeFromSegmentGroup} from './create_url_tree';\nimport {INPUT_BINDER} from './directives/router_outlet';\nimport {RuntimeErrorCode} from './errors';\nimport {\n BeforeActivateRoutes,\n Event,\n IMPERATIVE_NAVIGATION,\n NavigationCancel,\n NavigationCancellationCode,\n NavigationEnd,\n NavigationTrigger,\n PrivateRouterEvents,\n RedirectRequest,\n} from './events';\nimport {NavigationBehaviorOptions, OnSameUrlNavigation, Routes} from './models';\nimport {\n isBrowserTriggeredNavigation,\n Navigation,\n NavigationExtras,\n NavigationTransitions,\n RestoredState,\n UrlCreationOptions,\n} from './navigation_transition';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ROUTER_CONFIGURATION} from './router_config';\nimport {ROUTES} from './router_config_loader';\nimport {Params} from './shared';\nimport {StateManager} from './statemanager/state_manager';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {\n containsTree,\n IsActiveMatchOptions,\n isUrlTree,\n UrlSegmentGroup,\n UrlSerializer,\n UrlTree,\n} from './url_tree';\nimport {validateConfig} from './utils/config';\nimport {afterNextNavigation} from './utils/navigations';\nimport {standardizeConfig} from './components/empty_outlet';\n\nfunction defaultErrorHandler(error: any): never {\n throw error;\n}\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n paths: 'exact',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'exact',\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n paths: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'subset',\n};\n\n/**\n * @description\n *\n * A service that facilitates navigation among views and URL manipulation capabilities.\n * This service is provided in the root scope and configured with [provideRouter](api/router/provideRouter).\n *\n * @see {@link Route}\n * @see {@link provideRouter}\n * @see [Routing and Navigation Guide](guide/routing/common-router-tasks).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Router {\n private get currentUrlTree() {\n return this.stateManager.getCurrentUrlTree();\n }\n private get rawUrlTree() {\n return this.stateManager.getRawUrlTree();\n }\n private disposed = false;\n private nonRouterCurrentEntryChangeSubscription?: SubscriptionLike;\n\n private readonly console = inject(Console);\n private readonly stateManager = inject(StateManager);\n private readonly options = inject(ROUTER_CONFIGURATION, {optional: true}) || {};\n private readonly pendingTasks = inject(PendingTasks);\n private readonly urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n private readonly navigationTransitions = inject(NavigationTransitions);\n private readonly urlSerializer = inject(UrlSerializer);\n private readonly location = inject(Location);\n private readonly urlHandlingStrategy = inject(UrlHandlingStrategy);\n\n /**\n * The private `Subject` type for the public events exposed in the getter. This is used internally\n * to push events to. The separate field allows us to expose separate types in the public API\n * (i.e., an Observable rather than the Subject).\n */\n private _events = new Subject<Event>();\n /**\n * An event stream for routing events.\n */\n public get events(): Observable<Event> {\n // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't\n // allowed/supported but we still have to fix these or file bugs against the teams before making\n // the change.\n return this._events;\n }\n /**\n * The current state of routing in this NgModule.\n */\n get routerState() {\n return this.stateManager.getRouterState();\n }\n\n /**\n * A handler for navigation errors in this NgModule.\n *\n * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.\n * @see {@link withNavigationErrorHandler}\n */\n errorHandler: (error: any) => any = this.options.errorHandler || defaultErrorHandler;\n\n /**\n * True if at least one navigation event has occurred,\n * false otherwise.\n */\n navigated: boolean = false;\n\n /**\n * A strategy for re-using routes.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\n */\n routeReuseStrategy: RouteReuseStrategy = inject(RouteReuseStrategy);\n\n /**\n * How to handle a navigation request to the current URL.\n *\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see {@link withRouterConfig}\n * @see {@link provideRouter}\n * @see {@link RouterModule}\n */\n onSameUrlNavigation: OnSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n\n config: Routes = inject(ROUTES, {optional: true})?.flat() ?? [];\n\n /**\n * Indicates whether the application has opted in to binding Router data to component inputs.\n *\n * This option is enabled by the `withComponentInputBinding` feature of `provideRouter` or\n * `bindToComponentInputs` in the `ExtraOptions` of `RouterModule.forRoot`.\n */\n readonly componentInputBindingEnabled: boolean = !!inject(INPUT_BINDER, {optional: true});\n\n constructor() {\n this.resetConfig(this.config);\n\n this.navigationTransitions\n .setupNavigations(this, this.currentUrlTree, this.routerState)\n .subscribe({\n error: (e) => {\n this.console.warn(ngDevMode ? `Unhandled Navigation Error: ${e}` : e);\n },\n });\n this.subscribeToNavigationEvents();\n }\n\n private eventsSubscription = new Subscription();\n private subscribeToNavigationEvents() {\n const subscription = this.navigationTransitions.events.subscribe((e) => {\n try {\n const currentTransition = this.navigationTransitions.currentTransition;\n const currentNavigation = this.navigationTransitions.currentNavigation;\n if (currentTransition !== null && currentNavigation !== null) {\n this.stateManager.handleRouterEvent(e, currentNavigation);\n if (\n e instanceof NavigationCancel &&\n e.code !== NavigationCancellationCode.Redirect &&\n e.code !== NavigationCancellationCode.SupersededByNewNavigation\n ) {\n // It seems weird that `navigated` is set to `true` when the navigation is rejected,\n // however it's how things were written initially. Investigation would need to be done\n // to determine if this can be removed.\n this.navigated = true;\n } else if (e instanceof NavigationEnd) {\n this.navigated = true;\n } else if (e instanceof RedirectRequest) {\n const opts = e.navigationBehaviorOptions;\n const mergedTree = this.urlHandlingStrategy.merge(\n e.url,\n currentTransition.currentRawUrl,\n );\n const extras = {\n browserUrl: currentTransition.extras.browserUrl,\n info: currentTransition.extras.info,\n skipLocationChange: currentTransition.extras.skipLocationChange,\n // The URL is already updated at this point if we have 'eager' URL\n // updates or if the navigation was triggered by the browser (back\n // button, URL bar, etc). We want to replace that item in history\n // if the navigation is rejected.\n replaceUrl:\n currentTransition.extras.replaceUrl ||\n this.urlUpdateStrategy === 'eager' ||\n isBrowserTriggeredNavigation(currentTransition.source),\n // allow developer to override default options with RedirectCommand\n ...opts,\n };\n\n this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras, {\n resolve: currentTransition.resolve,\n reject: currentTransition.reject,\n promise: currentTransition.promise,\n });\n }\n }\n // Note that it's important to have the Router process the events _before_ the event is\n // pushed through the public observable. This ensures the correct router state is in place\n // before applications observe the events.\n if (isPublicRouterEvent(e)) {\n this._events.next(e);\n }\n } catch (e: unknown) {\n this.navigationTransitions.transitionAbortSubject.next(e as Error);\n }\n });\n this.eventsSubscription.add(subscription);\n }\n\n /** @internal */\n resetRootComponentType(rootComponentType: Type<any>): void {\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = rootComponentType;\n this.navigationTransitions.rootComponentType = rootComponentType;\n }\n\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation(): void {\n this.setUpLocationChangeListener();\n if (!this.navigationTransitions.hasRequestedNavigation) {\n this.navigateToSyncWithBrowser(\n this.location.path(true),\n IMPERATIVE_NAVIGATION,\n this.stateManager.restoredState(),\n );\n }\n }\n\n /**\n * Sets up the location change listener. This listener detects navigations triggered from outside\n * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n * navigation so that the correct events, guards, etc. are triggered.\n */\n setUpLocationChangeListener(): void {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n this.nonRouterCurrentEntryChangeSubscription ??=\n this.stateManager.registerNonRouterCurrentEntryChangeListener((url, state) => {\n // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n // hybrid apps.\n setTimeout(() => {\n this.navigateToSyncWithBrowser(url, 'popstate', state);\n }, 0);\n });\n }\n\n /**\n * Schedules a router navigation to synchronize Router state with the browser state.\n *\n * This is done as a response to a popstate event and the initial navigation. These\n * two scenarios represent times when the browser URL/state has been updated and\n * the Router needs to respond to ensure its internal state matches.\n */\n private navigateToSyncWithBrowser(\n url: string,\n source: NavigationTrigger,\n state: RestoredState | null | undefined,\n ) {\n const extras: NavigationExtras = {replaceUrl: true};\n\n // TODO: restoredState should always include the entire state, regardless\n // of navigationId. This requires a breaking change to update the type on\n // NavigationStart’s restoredState, which currently requires navigationId\n // to always be present. The Router used to only restore history state if\n // a navigationId was present.\n\n // The stored navigationId is used by the RouterScroller to retrieve the scroll\n // position for the page.\n const restoredState = state?.navigationId ? state : null;\n\n // Separate to NavigationStart.restoredState, we must also restore the state to\n // history.state and generate a new navigationId, since it will be overwritten\n if (state) {\n const stateCopy = {...state} as Partial<RestoredState>;\n delete stateCopy.navigationId;\n delete stateCopy.ɵrouterPageId;\n if (Object.keys(stateCopy).length !== 0) {\n extras.state = stateCopy;\n }\n }\n\n const urlTree = this.parseUrl(url);\n this.scheduleNavigation(urlTree, source, restoredState, extras);\n }\n\n /** The current URL. */\n get url(): string {\n return this.serializeUrl(this.currentUrlTree);\n }\n\n /**\n * Returns the current `Navigation` object when the router is navigating,\n * and `null` when idle.\n */\n getCurrentNavigation(): Navigation | null {\n return this.navigationTransitions.currentNavigation;\n }\n\n /**\n * The `Navigation` object of the most recent navigation to succeed and `null` if there\n * has not been a successful navigation yet.\n */\n get lastSuccessfulNavigation(): Navigation | null {\n return this.navigationTransitions.lastSuccessfulNavigation;\n }\n\n /**\n * Resets the route configuration used for navigation and generating links.\n *\n * @param config The route array for the new configuration.\n *\n * @usageNotes\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config: Routes): void {\n (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n this.dispose();\n }\n\n /** Disposes of the router. */\n dispose(): void {\n this.navigationTransitions.complete();\n if (this.nonRouterCurrentEntryChangeSubscription) {\n this.nonRouterCurrentEntryChangeSubscription.unsubscribe();\n this.nonRouterCurrentEntryChangeSubscription = undefined;\n }\n this.disposed = true;\n this.eventsSubscription.unsubscribe();\n }\n\n /**\n * Appends URL segments to the current URL tree to create a new URL tree.\n *\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL tree or the one provided in the `relativeTo`\n * property of the options object, if supplied.\n * @param navigationExtras Options that control the navigation strategy.\n * @returns The new URL tree.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n *\n * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n * tree should be created relative to the root.\n * ```\n */\n createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n navigationExtras;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q: Params | null = null;\n switch (queryParamsHandling ?? this.options.defaultQueryParamsHandling) {\n case 'merge':\n q = {...this.currentUrlTree.queryParams, ...queryParams};\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n\n let relativeToUrlSegmentGroup: UrlSegmentGroup | undefined;\n try {\n const relativeToSnapshot = relativeTo ? relativeTo.snapshot : this.routerState.snapshot.root;\n relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n } catch (e: unknown) {\n // This is strictly for backwards compatibility with tests that create\n // invalid `ActivatedRoute` mocks.\n // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n // the moment.\n if (typeof commands[0] !== 'string' || commands[0][0] !== '/') {\n // Navigations that were absolute in the old way of creating UrlTrees\n // would still work because they wouldn't attempt to match the\n // segments in the `ActivatedRoute` to the `currentUrlTree` but\n // instead just replace the root segment with the navigation result.\n // Non-absolute navigations would fail to apply the commands because\n // the logic could not find the segment to replace (so they'd act like there were no\n // commands).\n commands = [];\n }\n relativeToUrlSegmentGroup = this.currentUrlTree.root;\n }\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, q, f ?? null);\n }\n\n /**\n * Navigates to a view using an absolute route path.\n *\n * @param url An absolute path for a defined route. The function does not apply any delta to the\n * current URL.\n * @param extras An object containing properties that modify the navigation strategy.\n *\n * @returns A Promise that resolves to 'true' when navigation succeeds,\n * to 'false' when navigation fails, or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to an absolute path.\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n */\n navigateByUrl(\n url: string | UrlTree,\n extras: NavigationBehaviorOptions = {\n skipLocationChange: false,\n },\n ): Promise<boolean> {\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras);\n }\n\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * @param commands An array of URL fragments with which to construct the target URL.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL or the one provided in the `relativeTo` property\n * of the options object, if supplied.\n * @param extras An options object that determines how the URL should be constructed or\n * interpreted.\n *\n * @returns A Promise that resolves to `true` when navigation succeeds, or `false` when navigation\n * fails. The Promise is rejected when an error occurs if `resolveNavigationPromiseOnError` is\n * not `true`.\n *\n * @usageNotes\n *\n * The following calls request navigation to a dynamic route path relative to the current URL.\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL, overriding the default behavior\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n */\n navigate(\n commands: any[],\n extras: NavigationExtras = {skipLocationChange: false},\n ): Promise<boolean> {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url: UrlTree): string {\n return this.urlSerializer.serialize(url);\n }\n\n /** Parses a string into a `UrlTree` */\n parseUrl(url: string): UrlTree {\n try {\n return this.urlSerializer.parse(url);\n } catch {\n return this.urlSerializer.parse('/');\n }\n }\n\n /**\n * Returns whether the url is activated.\n *\n * @deprecated\n * Use `IsActiveMatchOptions` instead.\n *\n * - The equivalent `IsActiveMatchOptions` for `true` is\n * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n * - The equivalent for `false` is\n * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n */\n isActive(url: string | UrlTree, exact: boolean): boolean;\n /**\n * Returns whether the url is activated.\n */\n isActive(url: string | UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n /** @internal */\n isActive(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean;\n isActive(url: string | UrlTree, matchOptions: boolean | IsActiveMatchOptions): boolean {\n let options: IsActiveMatchOptions;\n if (matchOptions === true) {\n options = {...exactMatchOptions};\n } else if (matchOptions === false) {\n options = {...subsetMatchOptions};\n } else {\n options = matchOptions;\n }\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, options);\n }\n\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, options);\n }\n\n private removeEmptyProps(params: Params): Params {\n return Object.entries(params).reduce((result: Params, [key, value]: [string, any]) => {\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n\n private scheduleNavigation(\n rawUrl: UrlTree,\n source: NavigationTrigger,\n restoredState: RestoredState | null,\n extras: NavigationExtras,\n priorPromise?: {\n resolve: (result: boolean | PromiseLike<boolean>) => void;\n reject: (reason?: any) => void;\n promise: Promise<boolean>;\n },\n ): Promise<boolean> {\n if (this.disposed) {\n return Promise.resolve(false);\n }\n\n let resolve: (result: boolean | PromiseLike<boolean>) => void;\n let reject: (reason?: any) => void;\n let promise: Promise<boolean>;\n if (priorPromise) {\n resolve = priorPromise.resolve;\n reject = priorPromise.reject;\n promise = priorPromise.promise;\n } else {\n promise = new Promise<boolean>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n }\n\n // Indicate that the navigation is happening.\n const taskId = this.pendingTasks.add();\n afterNextNavigation(this, () => {\n // Remove pending task in a microtask to allow for cancelled\n // initial navigations and redirects within the same task.\n queueMicrotask(() => this.pendingTasks.remove(taskId));\n });\n\n this.navigationTransitions.handleNavigationRequest({\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n rawUrl,\n extras,\n resolve: resolve!,\n reject: reject!,\n promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState,\n });\n\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch((e: any) => {\n return Promise.reject(e);\n });\n }\n}\n\nfunction validateCommands(commands: string[]): void {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new RuntimeError(\n RuntimeErrorCode.NULLISH_COMMAND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `The requested path contains ${cmd} segment at index ${i}`,\n );\n }\n }\n}\n\nfunction isPublicRouterEvent(e: Event | PrivateRouterEvents): e is Event {\n return !(e instanceof BeforeActivateRoutes) && !(e instanceof RedirectRequest);\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.dev/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {\n Attribute,\n booleanAttribute,\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n Renderer2,\n ɵRuntimeError as RuntimeError,\n SimpleChanges,\n ɵɵsanitizeUrlOrResourceUrl,\n} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {Event, NavigationEnd} from '../events';\nimport {QueryParamsHandling} from '../models';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {isUrlTree, UrlTree} from '../url_tree';\nimport {RuntimeErrorCode} from '../errors';\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n * looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n * - `'merge'`: Merge the given `queryParams` into the current query params.\n * - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * `queryParams`, `fragment`, `queryParamsHandling`, `preserveFragment`, and `relativeTo`\n * cannot be used when the `routerLink` input is a `UrlTree`.\n *\n * See {@link UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n * link to user component\n * </a>\n * ```\n *\n * Use {@link Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLink]',\n standalone: true,\n})\nexport class RouterLink implements OnChanges, OnDestroy {\n /**\n * Represents an `href` attribute value applied to a host element,\n * when a host element is `<a>`. For other tags, the value is `null`.\n */\n href: string | null = null;\n\n /**\n * Represents the `target` attribute on a host element.\n * This is only used when the host element is an `<a>` tag.\n */\n @HostBinding('attr.target') @Input() target?: string;\n\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#queryParams}\n * @see {@link Router#createUrlTree}\n */\n @Input() queryParams?: Params | null;\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#fragment}\n * @see {@link Router#createUrlTree}\n */\n @Input() fragment?: string;\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#queryParamsHandling}\n * @see {@link Router#createUrlTree}\n */\n @Input() queryParamsHandling?: QueryParamsHandling | null;\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#state}\n * @see {@link Router#navigateByUrl}\n */\n @Input() state?: {[k: string]: any};\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#info}\n * @see {@link Router#navigateByUrl}\n */\n @Input() info?: unknown;\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * Specify a value here when you do not want to use the default value\n * for `routerLink`, which is the current activated route.\n * Note that a value of `undefined` here will use the `routerLink` default.\n * @see {@link UrlCreationOptions#relativeTo}\n * @see {@link Router#createUrlTree}\n */\n @Input() relativeTo?: ActivatedRoute | null;\n\n /** Whether a host element is an `<a>` tag. */\n private isAnchorElement: boolean;\n\n private subscription?: Subscription;\n\n /** @internal */\n onChanges = new Subject<RouterLink>();\n\n constructor(\n private router: Router,\n private route: ActivatedRoute,\n @Attribute('tabindex') private readonly tabIndexAttribute: string | null | undefined,\n private readonly renderer: Renderer2,\n private readonly el: ElementRef,\n private locationStrategy?: LocationStrategy,\n ) {\n const tagName = el.nativeElement.tagName?.toLowerCase();\n this.isAnchorElement = tagName === 'a' || tagName === 'area';\n\n if (this.isAnchorElement) {\n this.subscription = router.events.subscribe((s: Event) => {\n if (s instanceof NavigationEnd) {\n this.updateHref();\n }\n });\n } else {\n this.setTabIndexIfNotOnNativeEl('0');\n }\n }\n\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#preserveFragment}\n * @see {@link Router#createUrlTree}\n */\n @Input({transform: booleanAttribute}) preserveFragment: boolean = false;\n\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#skipLocationChange}\n * @see {@link Router#navigateByUrl}\n */\n @Input({transform: booleanAttribute}) skipLocationChange: boolean = false;\n\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#replaceUrl}\n * @see {@link Router#navigateByUrl}\n */\n @Input({transform: booleanAttribute}) replaceUrl: boolean = false;\n\n /**\n * Modifies the tab index if there was not a tabindex attribute on the element during\n * instantiation.\n */\n private setTabIndexIfNotOnNativeEl(newTabIndex: string | null) {\n if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n return;\n }\n this.applyAttributeValue('tabindex', newTabIndex);\n }\n\n /** @nodoc */\n // TODO(atscott): Remove changes parameter in major version as a breaking change.\n ngOnChanges(changes?: SimpleChanges) {\n if (\n ngDevMode &&\n isUrlTree(this.routerLinkInput) &&\n (this.fragment !== undefined ||\n this.queryParams ||\n this.queryParamsHandling ||\n this.preserveFragment ||\n this.relativeTo)\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_ROUTER_LINK_INPUTS,\n 'Cannot configure queryParams or fragment when using a UrlTree as the routerLink input value.',\n );\n }\n if (this.isAnchorElement) {\n this.updateHref();\n }\n // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n // to the RouterLinks it's tracking.\n this.onChanges.next(this);\n }\n\n private routerLinkInput: any[] | UrlTree | null = null;\n\n /**\n * Commands to pass to {@link Router#createUrlTree} or a `UrlTree`.\n * - **array**: commands to pass to {@link Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **UrlTree**: a `UrlTree` for this link rather than creating one from the commands\n * and other inputs that correspond to properties of `UrlCreationOptions`.\n * - **null|undefined**: effectively disables the `routerLink`\n * @see {@link Router#createUrlTree}\n */\n @Input()\n set routerLink(commandsOrUrlTree: any[] | string | UrlTree | null | undefined) {\n if (commandsOrUrlTree == null) {\n this.routerLinkInput = null;\n this.setTabIndexIfNotOnNativeEl(null);\n } else {\n if (isUrlTree(commandsOrUrlTree)) {\n this.routerLinkInput = commandsOrUrlTree;\n } else {\n this.routerLinkInput = Array.isArray(commandsOrUrlTree)\n ? commandsOrUrlTree\n : [commandsOrUrlTree];\n }\n this.setTabIndexIfNotOnNativeEl('0');\n }\n }\n\n /** @nodoc */\n @HostListener('click', [\n '$event.button',\n '$event.ctrlKey',\n '$event.shiftKey',\n '$event.altKey',\n '$event.metaKey',\n ])\n onClick(\n button: number,\n ctrlKey: boolean,\n shiftKey: boolean,\n altKey: boolean,\n metaKey: boolean,\n ): boolean {\n const urlTree = this.urlTree;\n\n if (urlTree === null) {\n return true;\n }\n\n if (this.isAnchorElement) {\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n }\n\n const extras = {\n skipLocationChange: this.skipLocationChange,\n replaceUrl: this.replaceUrl,\n state: this.state,\n info: this.info,\n };\n this.router.navigateByUrl(urlTree, extras);\n\n // Return `false` for `<a>` elements to prevent default action\n // and cancel the native behavior, since the navigation is handled\n // by the Router.\n return !this.isAnchorElement;\n }\n\n /** @nodoc */\n ngOnDestroy(): any {\n this.subscription?.unsubscribe();\n }\n\n private updateHref(): void {\n const urlTree = this.urlTree;\n this.href =\n urlTree !== null && this.locationStrategy\n ? this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(urlTree))\n : null;\n\n const sanitizedValue =\n this.href === null\n ? null\n : // This class represents a directive that can be added to both `<a>` elements,\n // as well as other elements. As a result, we can't define security context at\n // compile time. So the security context is deferred to runtime.\n // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n // based on the tag and property names. The logic mimics the one from\n // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n //\n // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n // instead of applying a value via a renderer, after a final merge of the\n // `RouterLinkWithHref` directive.\n ɵɵsanitizeUrlOrResourceUrl(\n this.href,\n this.el.nativeElement.tagName.toLowerCase(),\n 'href',\n );\n this.applyAttributeValue('href', sanitizedValue);\n }\n\n private applyAttributeValue(attrName: string, attrValue: string | null) {\n const renderer = this.renderer;\n const nativeElement = this.el.nativeElement;\n if (attrValue !== null) {\n renderer.setAttribute(nativeElement, attrName, attrValue);\n } else {\n renderer.removeAttribute(nativeElement, attrName);\n }\n }\n\n get urlTree(): UrlTree | null {\n if (this.routerLinkInput === null) {\n return null;\n } else if (isUrlTree(this.routerLinkInput)) {\n return this.routerLinkInput;\n }\n return this.router.createUrlTree(this.routerLinkInput, {\n // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n // Otherwise, we should use the value provided by the user in the input.\n relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: this.preserveFragment,\n });\n }\n}\n\n/**\n * @description\n * An alias for the `RouterLink` directive.\n * Deprecated since v15, use `RouterLink` directive instead.\n *\n * @deprecated use `RouterLink` directive instead.\n * @publicApi\n */\nexport {RouterLink as RouterLinkWithHref};\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.dev/license\n */\n\nimport {\n AfterContentInit,\n ChangeDetectorRef,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink} from './router_link';\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>` parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n * <a routerLink=\"/user/jim\">Jim</a>\n * <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n standalone: true,\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n\n private classes: string[] = [];\n private routerEventsSubscription: Subscription;\n private linkInputChangesSubscription?: Subscription;\n private _isActive = false;\n\n get isActive() {\n return this._isActive;\n }\n\n /**\n * Options to configure how to determine if the router link is active.\n *\n * These options are passed to the `Router.isActive()` function.\n *\n * @see {@link Router#isActive}\n */\n @Input() routerLinkActiveOptions: {exact: boolean} | IsActiveMatchOptions = {exact: false};\n\n /**\n * Aria-current attribute to apply when the router link is active.\n *\n * Possible values: `'page'` | `'step'` | `'location'` | `'date'` | `'time'` | `true` | `false`.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current}\n */\n @Input() ariaCurrentWhenActive?: 'page' | 'step' | 'location' | 'date' | 'time' | true | false;\n\n /**\n *\n * You can use the output `isActiveChange` to get notified each time the link becomes\n * active or inactive.\n *\n * Emits:\n * true -> Route is active\n * false -> Route is inactive\n *\n * ```\n * <a\n * routerLink=\"/user/bob\"\n * routerLinkActive=\"active-link\"\n * (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n * ```\n */\n @Output() readonly isActiveChange: EventEmitter<boolean> = new EventEmitter();\n\n constructor(\n private router: Router,\n private element: ElementRef,\n private renderer: Renderer2,\n private readonly cdr: ChangeDetectorRef,\n @Optional() private link?: RouterLink,\n ) {\n this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n /** @nodoc */\n ngAfterContentInit(): void {\n // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n of(this.links.changes, of(null))\n .pipe(mergeAll())\n .subscribe((_) => {\n this.update();\n this.subscribeToEachLinkOnChanges();\n });\n }\n\n private subscribeToEachLinkOnChanges() {\n this.linkInputChangesSubscription?.unsubscribe();\n const allLinkChanges = [...this.links.toArray(), this.link]\n .filter((link): link is RouterLink => !!link)\n .map((link) => link.onChanges);\n this.linkInputChangesSubscription = from(allLinkChanges)\n .pipe(mergeAll())\n .subscribe((link) => {\n if (this._isActive !== this.isLinkActive(this.router)(link)) {\n this.update();\n }\n });\n }\n\n @Input()\n set routerLinkActive(data: string[] | string) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter((c) => !!c);\n }\n\n /** @nodoc */\n ngOnChanges(changes: SimpleChanges): void {\n this.update();\n }\n /** @nodoc */\n ngOnDestroy(): void {\n this.routerEventsSubscription.unsubscribe();\n this.linkInputChangesSubscription?.unsubscribe();\n }\n\n private update(): void {\n if (!this.links || !this.router.navigated) return;\n\n queueMicrotask(() => {\n const hasActiveLinks = this.hasActiveLinks();\n this.classes.forEach((c) => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n this.renderer.setAttribute(\n this.element.nativeElement,\n 'aria-current',\n this.ariaCurrentWhenActive.toString(),\n );\n } else {\n this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n }\n\n // Only emit change if the active state changed.\n if (this._isActive !== hasActiveLinks) {\n this._isActive = hasActiveLinks;\n this.cdr.markForCheck();\n // Emit on isActiveChange after classes are updated\n this.isActiveChange.emit(hasActiveLinks);\n }\n });\n }\n\n private isLinkActive(router: Router): (link: RouterLink) => boolean {\n const options: boolean | IsActiveMatchOptions = isActiveMatchOptions(\n this.routerLinkActiveOptions,\n )\n ? this.routerLinkActiveOptions\n : // While the types should disallow `undefined` here, it's possible without strict inputs\n this.routerLinkActiveOptions.exact || false;\n return (link: RouterLink) => {\n const urlTree = link.urlTree;\n return urlTree ? router.isActive(urlTree, options) : false;\n };\n }\n\n private hasActiveLinks(): boolean {\n const isActiveCheckFn = this.isLinkActive(this.router);\n return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);\n }\n}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(\n options: {exact: boolean} | IsActiveMatchOptions,\n): options is IsActiveMatchOptions {\n return !!(options as IsActiveMatchOptions).paths;\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.dev/license\n */\n\nimport {\n Compiler,\n createEnvironmentInjector,\n EnvironmentInjector,\n Injectable,\n OnDestroy,\n} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from './events';\nimport {LoadedRouterConfig, Route, Routes} from './models';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class PreloadAllModules implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return fn().pipe(catchError(() => of(null)));\n }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class NoPreloading implements PreloadingStrategy {\n preload(route: Route, fn: () => Observable<any>): Observable<any> {\n return of(null);\n }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class RouterPreloader implements OnDestroy {\n private subscription?: Subscription;\n\n constructor(\n private router: Router,\n compiler: Compiler,\n private injector: EnvironmentInjector,\n private preloadingStrategy: PreloadingStrategy,\n private loader: RouterConfigLoader,\n ) {}\n\n setUpPreloading(): void {\n this.subscription = this.router.events\n .pipe(\n filter((e: Event) => e instanceof NavigationEnd),\n concatMap(() => this.preload()),\n )\n .subscribe(() => {});\n }\n\n preload(): Observable<any> {\n return this.processRoutes(this.injector, this.router.config);\n }\n\n /** @nodoc */\n ngOnDestroy(): void {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n private processRoutes(injector: EnvironmentInjector, routes: Routes): Observable<void> {\n const res: Observable<any>[] = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector = createEnvironmentInjector(\n route.providers,\n injector,\n `Route: ${route.path}`,\n );\n }\n\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n\n // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n // happens as a consequence of needing to descend into children for route matching immediately\n // while component loading is deferred until route activation. Because `canLoad` guards can\n // have side effects, we cannot execute them here so we instead skip preloading altogether\n // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n // at all. Code splitting and lazy loading is separate from client-side authorization checks\n // and should not be used as a security measure to prevent loading of code.\n if (\n (route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||\n (route.loadComponent && !route._loadedComponent)\n ) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)!));\n }\n }\n return from(res).pipe(mergeAll());\n }\n\n private preloadConfig(injector: EnvironmentInjector, route: Route): Observable<void> {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$: Observable<LoadedRouterConfig | null>;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n } else {\n loadedChildren$ = of(null);\n }\n\n const recursiveLoadChildren$ = loadedChildren$.pipe(\n mergeMap((config: LoadedRouterConfig | null) => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }),\n );\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n } else {\n return recursiveLoadChildren$;\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.dev/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, InjectionToken, NgZone, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {\n NavigationEnd,\n NavigationSkipped,\n NavigationSkippedCode,\n NavigationStart,\n Scroll,\n} from './events';\nimport {NavigationTransitions} from './navigation_transition';\nimport {UrlSerializer} from './url_tree';\n\nexport const ROUTER_SCROLLER = new InjectionToken<RouterScroller>('');\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n private routerEventsSubscription?: Unsubscribable;\n private scrollEventsSubscription?: Unsubscribable;\n\n private lastId = 0;\n private lastSource: 'imperative' | 'popstate' | 'hashchange' | undefined = 'imperative';\n private restoredId = 0;\n private store: {[key: string]: [number, number]} = {};\n\n /** @nodoc */\n constructor(\n readonly urlSerializer: UrlSerializer,\n private transitions: NavigationTransitions,\n public readonly viewportScroller: ViewportScroller,\n private readonly zone: NgZone,\n private options: {\n scrollPositionRestoration?: 'disabled' | 'enabled' | 'top';\n anchorScrolling?: 'disabled' | 'enabled';\n } = {},\n ) {\n // Default both options to 'disabled'\n options.scrollPositionRestoration ||= 'disabled';\n options.anchorScrolling ||= 'disabled';\n }\n\n init(): void {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n\n private createScrollEvents() {\n return this.transitions.events.subscribe((e) => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n } else if (\n e instanceof NavigationSkipped &&\n e.code === NavigationSkippedCode.IgnoredSameUrlNavigation\n ) {\n this.lastSource = undefined;\n this.restoredId = 0;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.url).fragment);\n }\n });\n }\n\n private consumeScrollEvents() {\n return this.transitions.events.subscribe((e) => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n\n private scheduleScrollEvent(\n routerEvent: NavigationEnd | NavigationSkipped,\n anchor: string | null,\n ): void {\n this.zone.runOutsideAngular(() => {\n // The scroll event needs to be delayed until after change detection. Otherwise, we may\n // attempt to restore the scroll position before the router outlet has fully rendered the\n // component by executing its update block of the template function.\n setTimeout(() => {\n this.zone.run(() => {\n this.transitions.events.next(\n new Scroll(\n routerEvent,\n this.lastSource === 'popstate' ? this.store[this.restoredId] : null,\n anchor,\n ),\n );\n });\n }, 0);\n });\n }\n\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription?.unsubscribe();\n this.scrollEventsSubscription?.unsubscribe();\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.dev/license\n */\n\nimport {\n HashLocationStrategy,\n LOCATION_INITIALIZED,\n LocationStrategy,\n ViewportScroller,\n} from '@angular/common';\nimport {\n APP_BOOTSTRAP_LISTENER,\n APP_INITIALIZER,\n ApplicationRef,\n ComponentRef,\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n InjectFlags,\n InjectionToken,\n Injector,\n makeEnvironmentProviders,\n NgZone,\n Provider,\n runInInjectionContext,\n Type,\n} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {INPUT_BINDER, RoutedComponentInputBinder} from './directives/router_outlet';\nimport {Event, NavigationError, stringifyEvent} from './events';\nimport {RedirectCommand, Routes} from './models';\nimport {NAVIGATION_ERROR_HANDLER, NavigationTransitions} from './navigation_transition';\nimport {Router} from './router';\nimport {InMemoryScrollingOptions, ROUTER_CONFIGURATION, RouterConfigOptions} from './router_config';\nimport {ROUTES} from './router_config_loader';\nimport {PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {ROUTER_SCROLLER, RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlSerializer} from './url_tree';\nimport {afterNextNavigation} from './utils/navigations';\nimport {\n CREATE_VIEW_TRANSITION,\n createViewTransition,\n VIEW_TRANSITION_OPTIONS,\n ViewTransitionsFeatureOptions,\n} from './utils/view_transition';\n\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n * providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes,\n * withDebugTracing(),\n * withRouterConfig({paramsInheritanceStrategy: 'always'}))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link RouterFeatures}\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nexport function provideRouter(routes: Routes, ...features: RouterFeatures[]): EnvironmentProviders {\n return makeEnvironmentProviders([\n {provide: ROUTES, multi: true, useValue: routes},\n typeof ngDevMode === 'undefined' || ngDevMode\n ? {provide: ROUTER_IS_PROVIDED, useValue: true}\n : [],\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener},\n features.map((feature) => feature.ɵproviders),\n ]);\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\n/**\n * Helper type to represent a Router feature.\n *\n * @publicApi\n */\nexport interface RouterFeature<FeatureKind extends RouterFeatureKind> {\n ɵkind: FeatureKind;\n ɵproviders: Provider[];\n}\n\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature<FeatureKind extends RouterFeatureKind>(\n kind: FeatureKind,\n providers: Provider[],\n): RouterFeature<FeatureKind> {\n return {ɵkind: kind, ɵproviders: providers};\n}\n\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nexport const ROUTER_IS_PROVIDED = new InjectionToken<boolean>('', {\n providedIn: 'root',\n factory: () => false,\n});\n\nconst routerIsProvidedDevModeCheck = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => {\n if (!inject(ROUTER_IS_PROVIDED)) {\n console.warn(\n '`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' +\n 'This is likely a mistake.',\n );\n }\n };\n },\n};\n\n/**\n * Registers a DI provider for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see {@link ROUTES}\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): Provider[] {\n return [\n {provide: ROUTES, multi: true, useValue: routes},\n typeof ngDevMode === 'undefined' || ngDevMode ? routerIsProvidedDevModeCheck : [],\n ];\n}\n\n/**\n * A type alias for providers returned by `withInMemoryScrolling` for use with `provideRouter`.\n *\n * @see {@link withInMemoryScrolling}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type InMemoryScrollingFeature = RouterFeature<RouterFeatureKind.InMemoryScrollingFeature>;\n\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withInMemoryScrolling())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link ViewportScroller}\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n * `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withInMemoryScrolling(\n options: InMemoryScrollingOptions = {},\n): InMemoryScrollingFeature {\n const providers = [\n {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n },\n },\n ];\n return routerFeature(RouterFeatureKind.InMemoryScrollingFeature, providers);\n}\n\nexport function getBootstrapListener() {\n const injector = inject(Injector);\n return (bootstrappedComponentRef: ComponentRef<unknown>) => {\n const ref = injector.get(ApplicationRef);\n\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n\n if (injector.get(INITIAL_NAVIGATION) === InitialNavigation.EnabledNonBlocking) {\n router.initialNavigation();\n }\n\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n if (!bootstrapDone.closed) {\n bootstrapDone.next();\n bootstrapDone.complete();\n bootstrapDone.unsubscribe();\n }\n };\n}\n\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken<Subject<void>>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'bootstrap done indicator' : '',\n {\n factory: () => {\n return new Subject<void>();\n },\n },\n);\n\n/**\n * This and the INITIAL_NAVIGATION token are used internally only. The public API side of this is\n * configured through the `ExtraOptions`.\n *\n * When set to `EnabledBlocking`, the initial navigation starts before the root\n * component is created. The bootstrap is blocked until the initial navigation is complete. This\n * value should be set in case you use [server-side rendering](guide/ssr), but do not enable\n * [hydration](guide/hydration) for your application.\n *\n * When set to `EnabledNonBlocking`, the initial navigation starts after the root component has been\n * created. The bootstrap is not blocked on the completion of the initial navigation.\n *\n * When set to `Disabled`, the initial navigation is not performed. The location listener is set up\n * before the root component gets created. Use if there is a reason to have more control over when\n * the router starts its initial navigation due to some complex initialization logic.\n *\n * @see {@link ExtraOptions}\n */\nconst enum InitialNavigation {\n EnabledBlocking,\n EnabledNonBlocking,\n Disabled,\n}\n\nconst INITIAL_NAVIGATION = new InjectionToken<InitialNavigation>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'initial navigation' : '',\n {providedIn: 'root', factory: () => InitialNavigation.EnabledNonBlocking},\n);\n\n/**\n * A type alias for providers returned by `withEnabledBlockingInitialNavigation` for use with\n * `provideRouter`.\n *\n * @see {@link withEnabledBlockingInitialNavigation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type EnabledBlockingInitialNavigationFeature =\n RouterFeature<RouterFeatureKind.EnabledBlockingInitialNavigationFeature>;\n\n/**\n * A type alias for providers returned by `withEnabledBlockingInitialNavigation` or\n * `withDisabledInitialNavigation` functions for use with `provideRouter`.\n *\n * @see {@link withEnabledBlockingInitialNavigation}\n * @see {@link withDisabledInitialNavigation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type InitialNavigationFeature =\n | EnabledBlockingInitialNavigationFeature\n | DisabledInitialNavigationFeature;\n\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This should be set in case\n * you use [server-side rendering](guide/ssr), but do not enable [hydration](guide/hydration) for\n * your application.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withEnabledBlockingInitialNavigation(): EnabledBlockingInitialNavigationFeature {\n const providers = [\n {provide: INITIAL_NAVIGATION, useValue: InitialNavigation.EnabledBlocking},\n {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: (injector: Injector) => {\n const locationInitialized: Promise<any> = injector.get(\n LOCATION_INITIALIZED,\n Promise.resolve(),\n );\n\n return () => {\n return locationInitialized.then(() => {\n return new Promise((resolve) => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(router, () => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n\n injector.get(NavigationTransitions).afterPreactivation = () => {\n // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n // assume activation will complete successfully (even though this is not\n // guaranteed).\n resolve(true);\n return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n };\n router.initialNavigation();\n });\n });\n };\n },\n },\n ];\n return routerFeature(RouterFeatureKind.EnabledBlockingInitialNavigationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withDisabledInitialNavigation` for use with\n * `provideRouter`.\n *\n * @see {@link withDisabledInitialNavigation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type DisabledInitialNavigationFeature =\n RouterFeature<RouterFeatureKind.DisabledInitialNavigationFeature>;\n\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDisabledInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withDisabledInitialNavigation(): DisabledInitialNavigationFeature {\n const providers = [\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => {\n router.setUpLocationChangeListener();\n };\n },\n },\n {provide: INITIAL_NAVIGATION, useValue: InitialNavigation.Disabled},\n ];\n return routerFeature(RouterFeatureKind.DisabledInitialNavigationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withDebugTracing` for use with `provideRouter`.\n *\n * @see {@link withDebugTracing}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type DebugTracingFeature = RouterFeature<RouterFeatureKind.DebugTracingFeature>;\n\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDebugTracing())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withDebugTracing(): DebugTracingFeature {\n let providers: Provider[] = [];\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n providers = [\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () =>\n router.events.subscribe((e: Event) => {\n // tslint:disable:no-console\n console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n console.log(stringifyEvent(e));\n console.log(e);\n console.groupEnd?.();\n // tslint:enable:no-console\n });\n },\n },\n ];\n } else {\n providers = [];\n }\n return routerFeature(RouterFeatureKind.DebugTracingFeature, providers);\n}\n\nconst ROUTER_PRELOADER = new InjectionToken<RouterPreloader>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'router preloader' : '',\n);\n\n/**\n * A type alias that represents a feature which enables preloading in Router.\n * The type is used to describe the return value of the `withPreloading` function.\n *\n * @see {@link withPreloading}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type PreloadingFeature = RouterFeature<RouterFeatureKind.PreloadingFeature>;\n\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withPreloading(PreloadAllModules))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n * should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withPreloading(preloadingStrategy: Type<PreloadingStrategy>): PreloadingFeature {\n const providers = [\n {provide: ROUTER_PRELOADER, useExisting: RouterPreloader},\n {provide: PreloadingStrategy, useExisting: preloadingStrategy},\n ];\n return routerFeature(RouterFeatureKind.PreloadingFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withRouterConfig` for use with `provideRouter`.\n *\n * @see {@link withRouterConfig}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type RouterConfigurationFeature =\n RouterFeature<RouterFeatureKind.RouterConfigurationFeature>;\n\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withRouterConfig({\n * onSameUrlNavigation: 'reload'\n * }))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n * additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature {\n const providers = [{provide: ROUTER_CONFIGURATION, useValue: options}];\n return routerFeature(RouterFeatureKind.RouterConfigurationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withHashLocation` for use with `provideRouter`.\n *\n * @see {@link withHashLocation}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type RouterHashLocationFeature = RouterFeature<RouterFeatureKind.RouterHashLocationFeature>;\n\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withHashLocation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link HashLocationStrategy}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withHashLocation(): RouterHashLocationFeature {\n const providers = [{provide: LocationStrategy, useClass: HashLocationStrategy}];\n return routerFeature(RouterFeatureKind.RouterHashLocationFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withNavigationErrorHandler` for use with `provideRouter`.\n *\n * @see {@link withNavigationErrorHandler}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type NavigationErrorHandlerFeature =\n RouterFeature<RouterFeatureKind.NavigationErrorHandlerFeature>;\n\n/**\n * Provides a function which is called when a navigation error occurs.\n *\n * This function is run inside application's [injection context](guide/di/dependency-injection-context)\n * so you can use the [`inject`](api/core/inject) function.\n *\n * This function can return a `RedirectCommand` to convert the error to a redirect, similar to returning\n * a `UrlTree` or `RedirectCommand` from a guard. This will also prevent the `Router` from emitting\n * `NavigationError`; it will instead emit `NavigationCancel` with code NavigationCancellationCode.Redirect.\n * Return values other than `RedirectCommand` are ignored and do not change any behavior with respect to\n * how the `Router` handles the error.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link NavigationError}\n * @see {@link core/inject}\n * @see {@link runInInjectionContext}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nexport function withNavigationErrorHandler(\n handler: (error: NavigationError) => unknown | RedirectCommand,\n): NavigationErrorHandlerFeature {\n const providers = [\n {\n provide: NAVIGATION_ERROR_HANDLER,\n useValue: handler,\n },\n ];\n return routerFeature(RouterFeatureKind.NavigationErrorHandlerFeature, providers);\n}\n\n/**\n * A type alias for providers returned by `withComponentInputBinding` for use with `provideRouter`.\n *\n * @see {@link withComponentInputBinding}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type ComponentInputBindingFeature =\n RouterFeature<RouterFeatureKind.ComponentInputBindingFeature>;\n\n/**\n * A type alias for providers returned by `withViewTransitions` for use with `provideRouter`.\n *\n * @see {@link withViewTransitions}\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type ViewTransitionsFeature = RouterFeature<RouterFeatureKind.ViewTransitionsFeature>;\n\n/**\n * Enables binding information from the `Router` state directly to the inputs of the component in\n * `Route` configurations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withComponentInputBinding())\n * ]\n * }\n * );\n * ```\n *\n * The router bindings information from any of the following sources:\n *\n * - query parameters\n * - path and matrix parameters\n * - static route data\n * - data from resolvers\n *\n * Duplicate keys are resolved in the same order from above, from least to greatest,\n * meaning that resolvers have the highest precedence and override any of the other information\n * from the route.\n *\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. This prevents previous information from being\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n * Default values can be provided with a resolver on the route to ensure the value is always present\n * or an input and use an input transform in the component.\n *\n * @see {@link guide/components/inputs#input-transforms input transforms}\n * @returns A set of providers for use with `provideRouter`.\n */\nexport function withComponentInputBinding(): ComponentInputBindingFeature {\n const providers = [\n RoutedComponentInputBinder,\n {provide: INPUT_BINDER, useExisting: RoutedComponentInputBinder},\n ];\n\n return routerFeature(RouterFeatureKind.ComponentInputBindingFeature, providers);\n}\n\n/**\n * Enables view transitions in the Router by running the route activation and deactivation inside of\n * `document.startViewTransition`.\n *\n * Note: The View Transitions API is not available in all browsers. If the browser does not support\n * view transitions, the Router will not attempt to start a view transition and continue processing\n * the navigation as usual.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withViewTransitions())\n * ]\n * }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n * @see https://developer.chrome.com/docs/web-platform/view-transitions/\n * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API\n * @developerPreview\n */\nexport function withViewTransitions(\n options?: ViewTransitionsFeatureOptions,\n): ViewTransitionsFeature {\n const providers = [\n {provide: CREATE_VIEW_TRANSITION, useValue: createViewTransition},\n {\n provide: VIEW_TRANSITION_OPTIONS,\n useValue: {skipNextTransition: !!options?.skipInitialTransition, ...options},\n },\n ];\n return routerFeature(RouterFeatureKind.ViewTransitionsFeature, providers);\n}\n\n/**\n * A type alias that represents all Router features available for use with `provideRouter`.\n * Features can be enabled by adding special functions to the `provideRouter` call.\n * See documentation for each symbol to find corresponding function name. See also `provideRouter`\n * documentation on how to use those functions.\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n */\nexport type RouterFeatures =\n | PreloadingFeature\n | DebugTracingFeature\n | InitialNavigationFeature\n | InMemoryScrollingFeature\n | RouterConfigurationFeature\n | NavigationErrorHandlerFeature\n | ComponentInputBindingFeature\n | ViewTransitionsFeature\n | RouterHashLocationFeature;\n\n/**\n * The list of features as an enum to uniquely type each feature.\n */\nexport const enum RouterFeatureKind {\n PreloadingFeature,\n DebugTracingFeature,\n EnabledBlockingInitialNavigationFeature,\n DisabledInitialNavigationFeature,\n InMemoryScrollingFeature,\n RouterConfigurationFeature,\n RouterHashLocationFeature,\n NavigationErrorHandlerFeature,\n ComponentInputBindingFeature,\n ViewTransitionsFeature,\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.dev/license\n */\n\nimport {\n HashLocationStrategy,\n Location,\n LocationStrategy,\n PathLocationStrategy,\n ViewportScroller,\n} from '@angular/common';\nimport {\n APP_BOOTSTRAP_LISTENER,\n ComponentRef,\n inject,\n Inject,\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n NgZone,\n Optional,\n Provider,\n SkipSelf,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {RouterLink} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {RuntimeErrorCode} from './errors';\nimport {Routes} from './models';\nimport {NavigationTransitions} from './navigation_transition';\nimport {\n getBootstrapListener,\n rootRoute,\n ROUTER_IS_PROVIDED,\n withComponentInputBinding,\n withDebugTracing,\n withDisabledInitialNavigation,\n withEnabledBlockingInitialNavigation,\n withPreloading,\n withViewTransitions,\n} from './provide_router';\nimport {Router} from './router';\nimport {ExtraOptions, ROUTER_CONFIGURATION} from './router_config';\nimport {RouterConfigLoader, ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ROUTER_SCROLLER, RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {DefaultUrlSerializer, UrlSerializer} from './url_tree';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>(\n typeof ngDevMode === 'undefined' || ngDevMode\n ? 'router duplicate forRoot guard'\n : 'ROUTER_FORROOT_GUARD',\n);\n\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nexport const ROUTER_PROVIDERS: Provider[] = [\n Location,\n {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n Router,\n ChildrenOutletContexts,\n {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n RouterConfigLoader,\n // Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n // be removed when `provideRoutes` is removed.\n typeof ngDevMode === 'undefined' || ngDevMode\n ? {provide: ROUTER_IS_PROVIDED, useValue: true}\n : [],\n];\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n imports: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n})\nexport class RouterModule {\n constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any) {}\n\n /**\n * Creates and configures a module with all the router providers and directives.\n * Optionally sets up an application listener to perform an initial navigation.\n *\n * When registering the NgModule at the root, import as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the application.\n * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n * @return The new `NgModule`.\n *\n */\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [\n ROUTER_PROVIDERS,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? config?.enableTracing\n ? withDebugTracing().ɵproviders\n : []\n : [],\n {provide: ROUTES, multi: true, useValue: routes},\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]],\n },\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(),\n provideRouterScroller(),\n config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [],\n config?.initialNavigation ? provideInitialNavigation(config) : [],\n config?.bindToComponentInputs ? withComponentInputBinding().ɵproviders : [],\n config?.enableViewTransitions ? withViewTransitions().ɵproviders : [],\n provideRouterInitializer(),\n ],\n };\n }\n\n /**\n * Creates a module with all the router directives and a provider registering routes,\n * without creating a new Router service.\n * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n * @return The new NgModule.\n *\n */\n static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n return {\n ngModule: RouterModule,\n providers: [{provide: ROUTES, multi: true, useValue: routes}],\n };\n }\n}\n\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nexport function provideRouterScroller(): Provider {\n return {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const config: ExtraOptions = inject(ROUTER_CONFIGURATION);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n },\n };\n}\n\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy(): Provider {\n return {provide: LocationStrategy, useClass: HashLocationStrategy};\n}\n\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy(): Provider {\n return {provide: LocationStrategy, useClass: PathLocationStrategy};\n}\n\nexport function provideForRootGuard(router: Router): any {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n throw new RuntimeError(\n RuntimeErrorCode.FOR_ROOT_CALLED_TWICE,\n `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +\n ` Lazy loaded modules should use RouterModule.forChild() instead.`,\n );\n }\n return 'guarded';\n}\n\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config: Pick<ExtraOptions, 'initialNavigation'>): Provider[] {\n return [\n config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [],\n config.initialNavigation === 'enabledBlocking'\n ? withEnabledBlockingInitialNavigation().ɵproviders\n : [],\n ];\n}\n\n// TODO(atscott): This should not be in the public API\n/**\n * A DI token for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER = new InjectionToken<(compRef: ComponentRef<any>) => void>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'Router Initializer' : '',\n);\n\nfunction provideRouterInitializer(): Provider[] {\n return [\n // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener},\n {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n ];\n}\n","// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie/Simple_document.cookie_framework\n\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class CookieService {\n constructor() {}\n\n getItem(cookieKey: string): any {\n if (!cookieKey) {\n return null;\n }\n return (\n decodeURIComponent(\n document.cookie.replace(\n new RegExp(\n `(?:(?:^|.*;)\\\\s*${encodeURIComponent(cookieKey).replace(/[-.+*]/g, '\\\\$&')}\\\\s*=\\\\s*([^;]*).*$)|^.*$`\n ),\n '$1'\n )\n ) || null\n );\n }\n\n setItem(key: string, value: any, expires?: any, path?: string, domain?: string, isSecure?: boolean): boolean {\n let expiresValue = '';\n if (!key || /^(?:expires|max-age|path|domain|secure)$/i.test(key)) {\n return false;\n }\n if (expires) {\n switch (expires.constructor) {\n // eslint-disable-next-line id-blacklist\n case Number:\n expiresValue = expires === Infinity ? '; expires=Fri, 31 Dec 9999 23:59:59 GMT' : `; max-age=${expires}`;\n break;\n // eslint-disable-next-line id-blacklist\n case String:\n expiresValue = `; expires=${expires}`;\n break;\n case Date:\n expiresValue = `; expires=${expires.toUTCString()}`;\n break;\n default:\n break;\n }\n }\n if (!path) {\n path = '/';\n }\n const domainStr = domain ? `; domain=${domain}` : '';\n const pathStr = path ? `; path=${path}` : '';\n const secureStr = isSecure ? '; secure' : '';\n document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(\n value\n )}${expiresValue}${domainStr}${pathStr}${secureStr}`;\n return true;\n }\n\n hasItem(key: string): boolean {\n if (!key) {\n return false;\n }\n return new RegExp(`(?:^|;\\\\s*)${encodeURIComponent(key).replace(/[-.+*]/g, '\\\\$&')}\\\\s*\\\\=`).test(document.cookie);\n }\n\n removeItem(key: string, path?: string, domain?: string): boolean {\n if (!this.hasItem(key)) {\n return false;\n }\n const domainStr = domain ? `; domain=${domain}` : '';\n const pathStr = path ? `; path=${path}` : '';\n document.cookie = `${encodeURIComponent(key)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT${domainStr}${pathStr}`;\n return true;\n }\n\n keys(): any {\n return (\n document.cookie\n // eslint-disable-next-line no-useless-backreference\n .replace(/((?:^|\\s*;)[^=]+)(?=;|$)|^\\s*|\\s*(?:=[^;]*)?(?:\\1|$)/g, '')\n .split(/\\s*(?:=[^;]*)?;\\s*/)\n .map(decodeURIComponent)\n );\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { LanguageService } from '@fcom/ui-translate';\n\n/**\n * Pipe that joins an array of strings with a localized conjunction.\n *\n * @example\n * ```html\n * <p>{{ ['one', 'two', 'three'] | finIntlJoin }}</p>\n * ```\n * @external Intl.ListFormat\n * @param value - An array of strings to join.\n * @requires LanguageService\n * @returns A string with the joined values i.e. 'one, two and three' .\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat MDN documentation} for more information.\n */\n@Pipe({ name: 'finIntlJoin' })\nexport class IntlJoinPipe implements PipeTransform {\n private cachedLocale: string;\n private cachedTranslation: string;\n private cachedValue: string[];\n private listFormat: Intl.ListFormat;\n\n private readonly listOptions: Intl.ListFormatOptions = {\n style: 'long',\n type: 'conjunction',\n };\n\n constructor(private languageService: LanguageService) {\n this.cachedLocale = this.languageService.langValue || 'en';\n this.listFormat = new Intl.ListFormat(this.cachedLocale, this.listOptions);\n }\n\n transform(value: string[]): string {\n if (!value || !Array.isArray(value) || (Boolean(value.length) && 'string' !== typeof value[0])) {\n throw new TypeError('Value for INTL join must be an array of strings.');\n }\n if (this.valueChanged(value)) {\n this.updateCache(value);\n }\n return this.cachedTranslation;\n }\n\n private updateCache(value: string[]): void {\n this.cachedLocale = this.languageService.langValue || 'en';\n this.listFormat = new Intl.ListFormat(this.cachedLocale, this.listOptions);\n this.cachedTranslation = this.listFormat.format(value);\n this.cachedValue = value;\n }\n\n private valueChanged(value: string[]): boolean {\n return (\n !this.cachedTranslation ||\n this.cachedLocale !== this.languageService.langValue ||\n JSON.stringify(value) !== JSON.stringify(this.cachedValue)\n );\n }\n}\n","import { Observable } from 'rxjs';\n\nexport const fileToBase64 = (file: File): Observable<string> => {\n return new Observable<string>((observer) => {\n const reader = new FileReader();\n reader.onload = () => {\n observer.next(reader.result?.toString());\n observer.complete();\n };\n reader.onerror = (err) => {\n observer.error(err);\n };\n reader.readAsDataURL(file);\n });\n};\n","export enum WidgetLayout {\n DEFAULT = 'default',\n HORIZONTAL = 'horizontal',\n}\n\nexport enum ExpanderStatus {\n OPEN = 'open',\n CLOSE = 'close',\n}\n\nexport enum WidgetTheme {\n LIGHT = 'theme--light',\n DARK = 'theme--dark',\n}\n\nexport enum LocationType {\n ORIGIN = 'origin',\n DESTINATION = 'destination',\n}\n\nexport enum SelectionType {\n TRIP_TYPE = 'tripType',\n TRAVEL_DATES = 'travelDates',\n PAX = 'PAX',\n DISCOUNT_CODE = 'discountCode',\n ORIGIN = LocationType.ORIGIN,\n DESTINATION = LocationType.DESTINATION,\n}\n\nexport type GlobalBookingWidgetSelectionChangeMap = Partial<Record<SelectionType, boolean>>;\n","export enum RootPaths {\n BOOKING_ROOT = 'booking',\n CHECK_IN_ROOT = 'check-in',\n SITE_SEARCH_ROOT = 'search',\n SELECT_LANGUAGE_ROOT = 'select-language',\n PLUS_ROOT = 'my-finnair-plus',\n OND_MARKETING_LANDING_ROOT = 'flights',\n FINNAIR_HOLIDAYS = 'aurinkomatkat',\n MANAGE_BOOKING_ROOT = 'manage',\n DISRUPTION_ROOT = 'manage/disruption',\n CANCEL_ROOT = 'manage/cancel',\n INVOLUNTARY_CANCEL_ROOT = 'manage/disruption/cancel',\n REACCOMMODATION_ROOT = 'manage/disruption-rebooking',\n ONE_UPGRADE_ROOT = 'manage/upgrade',\n VOLUNTARY_CHANGE_ROOT = 'manage/flight-change',\n TIMETABLE_ROOT = 'timetables',\n REFUNDS = 'refunds',\n CORPORATE = 'corporate',\n TRAVEL_READY = 'travel-ready',\n}\n\nexport const ROUTER_LANG_PARAM = 'lang';\n\nexport const UTM_PARAMS = [\n 'utm_source',\n 'utm_campaign',\n 'utm_medium',\n 'utm_term',\n 'utm_content',\n 'utm_id',\n 'gclid',\n 'gbraid',\n 'wbraid',\n 'gclsrc',\n 'ds_aid',\n 'ds_e_ca_id',\n 'ds_e_ag_id',\n 'ds_e_ad_id',\n 'ds_e_ca_name',\n 'ds_e_ag_name',\n 'ds_e_ad_name',\n 'ds_sig',\n 'ds_dest_url',\n 'fbclid',\n 'ad_id',\n 'adset_id',\n 'campaign_id',\n 'ad_name',\n 'adset_name',\n 'campaign_name',\n 'placement',\n 'site_source_name',\n 'dclid',\n 'gad_source',\n];\n\nexport enum CampaignTagToLabelKey {\n 'fcomCampaignSpecial' = 'campaignPrice',\n 'fcomCampaignFlash' = 'flashSaleOffer',\n 'fcomCampaignBlackFriday' = 'blackFridayOffer',\n 'fcomCampaignFinnairPlus' = 'finnairPlusOffer',\n}\n\nexport const FINNISH_SITES = ['fi-fi', 'fi-sv', 'fi-en'];\n\nexport const NON_EUROPE_SITES = [\n 'us-en',\n 'ca-en',\n 'ca-fr',\n 'sg-en',\n 'th-en',\n 'in-en',\n 'kr-en',\n 'kr-ko',\n 'cn-en',\n 'cn-zh',\n 'hk-en',\n 'hk-zh',\n 'jp-en',\n 'jp-ja',\n 'au-en',\n];\n\nexport const BUS_CONNECTION_LOCATION_CODES = ['TKU', 'TMP', 'XTP', 'XTZ'];\nexport const RAIL_AND_FLY_LOCATION_CODES = ['QYG'];\n","<div *ngIf=\"details\" class=\"rounded-large border white-bg\">\n <div\n class=\"pr-small-x pr-xsmall-y font-body-1 flex flex--space-between\"\n [class.border-bottom]=\"expandOpen\"\n data-testid=\"flight-review-card-title-bar\"\n >\n <div data-testid=\"flight-review-card-title\">\n {{ title }}\n {{ ' ' }}\n {{ details?.departure?.dateTime | finDateFormat: 'DATE' }}\n </div>\n <div>\n <fcom-tag data-testid=\"flight-review-card-fare-family-label\" class=\"mr-xsmall-l\" [class.mr-xsmall-r]=\"expandMode\">\n {{ fareFamilyLabel }}\n </fcom-tag>\n <button\n *ngIf=\"expandMode\"\n (click)=\"toggleExpand()\"\n class=\"nordic-blue-900-text medium-type\"\n [attr.aria-controls]=\"expandContainerId\"\n [attr.aria-expanded]=\"expandOpen\"\n [id]=\"expandButtonId\"\n data-testid=\"chevron-button\"\n >\n <fcom-icon [class.rotate-active]=\"expandOpen\" class=\"chevron\" [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"> </fcom-icon>\n <span *ngIf=\"expandButtonHiddenText\" class=\"is-vishidden\">\n {{ expandButtonHiddenText }}\n </span>\n </button>\n </div>\n </div>\n <fcom-expand class=\"block\" [open]=\"expandOpen\" [ariaId]=\"expandContainerId\" [ariaLabelledBy]=\"expandButtonId\">\n <fcom-notification *ngIf=\"notificationTranslationKey\" class=\"pr-small-t pr-small-x\">{{\n notificationTranslationKey | finLocalization\n }}</fcom-notification>\n <fin-ufo-with-modify-button\n [locations]=\"locations\"\n [flightOrBound]=\"details\"\n [viewDetailsClosed]=\"viewDetailsClosed$ | async\"\n [hideModify]=\"hideModify\"\n [hideViewDetails]=\"hideViewDetails\"\n [title]=\"title\"\n (viewDetails)=\"viewDetails.emit()\"\n (modifyClicked)=\"modifyClicked.emit()\"\n ></fin-ufo-with-modify-button>\n <div *ngIf=\"showDivider\" class=\"border-top-dotted\"></div>\n <ng-content select=\".bottom-content\"></ng-content>\n </fcom-expand>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { v4 as uuid } from 'uuid';\n\nimport { FinnairBoundItem, FinnairDisruptedBoundItem, FinnairLocation } from '@fcom/dapi/api/models';\n\nimport { FinnairBoundItemWithLocation } from '../../interfaces';\n\n@Component({\n selector: 'fin-flight-review-card',\n templateUrl: 'flight-review-card.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlightReviewCardComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n viewDetailsClosed$: Observable<string>;\n @Input()\n details: FinnairBoundItemWithLocation | FinnairBoundItem | FinnairDisruptedBoundItem;\n @Input()\n title: string;\n @Input()\n fareFamilyLabel: string;\n @Input()\n locations?: { [key: string]: FinnairLocation };\n @Input()\n hideModify: boolean;\n @Input()\n hideViewDetails: boolean;\n @Input()\n expandOpen = true;\n @Input()\n expandMode = false;\n @Input()\n expandButtonHiddenText?: string;\n @Input()\n notificationTranslationKey?: string;\n @Input()\n showDivider = false;\n\n expandContainerId = uuid();\n expandButtonId = uuid();\n\n @Output()\n modifyClicked: EventEmitter<void> = new EventEmitter<void>();\n @Output()\n viewDetails: EventEmitter<void> = new EventEmitter<void>();\n\n toggleExpand(): void {\n this.expandOpen = !this.expandOpen;\n }\n}\n","let nextHandle = 1;\n// The promise needs to be created lazily otherwise it won't be patched by Zones\nlet resolved: Promise<any>;\nconst activeHandles: { [key: number]: any } = {};\n\n/**\n * Finds the handle in the list of active handles, and removes it.\n * Returns `true` if found, `false` otherwise. Used both to clear\n * Immediate scheduled tasks, and to identify if a task should be scheduled.\n */\nfunction findAndClearHandle(handle: number): boolean {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\n\n/**\n * Helper functions to schedule and unschedule microtasks.\n */\nexport const Immediate = {\n setImmediate(cb: () => void): number {\n const handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(() => findAndClearHandle(handle) && cb());\n return handle;\n },\n\n clearImmediate(handle: number): void {\n findAndClearHandle(handle);\n },\n};\n\n/**\n * Used for internal testing purposes only. Do not export from library.\n */\nexport const TestTools = {\n pending() {\n return Object.keys(activeHandles).length;\n }\n};\n","import { Immediate } from '../util/Immediate';\nimport type { TimerHandle } from './timerHandle';\nconst { setImmediate, clearImmediate } = Immediate;\n\ntype SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle;\ntype ClearImmediateFunction = (handle: TimerHandle) => void;\n\ninterface ImmediateProvider {\n setImmediate: SetImmediateFunction;\n clearImmediate: ClearImmediateFunction;\n delegate:\n | {\n setImmediate: SetImmediateFunction;\n clearImmediate: ClearImmediateFunction;\n }\n | undefined;\n}\n\nexport const immediateProvider: ImmediateProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setImmediate(...args) {\n const { delegate } = immediateProvider;\n return (delegate?.setImmediate || setImmediate)(...args);\n },\n clearImmediate(handle) {\n const { delegate } = immediateProvider;\n return (delegate?.clearImmediate || clearImmediate)(handle as any);\n },\n delegate: undefined,\n};\n","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\n\n/**\n *\n * Asap Scheduler\n *\n * <span class=\"informal\">Perform task as fast as it can be performed asynchronously</span>\n *\n * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task\n * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing\n * code to end and then it will try to execute given task as fast as possible.\n *\n * `asap` scheduler will do its best to minimize time between end of currently executing code\n * and start of scheduled task. This makes it best candidate for performing so called \"deferring\".\n * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves\n * some (although minimal) unwanted delay.\n *\n * Note that using `asap` scheduler does not necessarily mean that your task will be first to process\n * after currently executing code. In particular, if some task was also scheduled with `asap` before,\n * that task will execute first. That being said, if you need to schedule task asynchronously, but\n * as soon as possible, `asap` scheduler is your best bet.\n *\n * ## Example\n * Compare async and asap scheduler<\n * ```ts\n * import { asapScheduler, asyncScheduler } from 'rxjs';\n *\n * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...\n * asapScheduler.schedule(() => console.log('asap'));\n *\n * // Logs:\n * // \"asap\"\n * // \"async\"\n * // ... but 'asap' goes first!\n * ```\n */\n\nexport const asapScheduler = new AsapScheduler(AsapAction);\n\n/**\n * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8.\n */\nexport const asap = asapScheduler;\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n\nexport class AsapScheduler extends AsyncScheduler {\n public flush(action?: AsyncAction<any>): void {\n this._active = true;\n // The async id that effects a call to flush is stored in _scheduled.\n // Before executing an action, it's necessary to check the action's async\n // id to determine whether it's supposed to be executed in the current\n // flush.\n // Previous implementations of this method used a count to determine this,\n // but that was unsound, as actions that are unsubscribed - i.e. cancelled -\n // are removed from the actions array and that can shift actions that are\n // scheduled to be executed in a subsequent flush into positions at which\n // they are executed within the current flush.\n const flushId = this._scheduled;\n this._scheduled = undefined;\n\n const { actions } = this;\n let error: any;\n action = action || actions.shift()!;\n\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n\n this._active = false;\n\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsapScheduler } from './AsapScheduler';\nimport { SchedulerAction } from '../types';\nimport { immediateProvider } from './immediateProvider';\nimport { TimerHandle } from './timerHandle';\n\nexport class AsapAction<T> extends AsyncAction<T> {\n constructor(protected scheduler: AsapScheduler, protected work: (this: SchedulerAction<T>, state?: T) => void) {\n super(scheduler, work);\n }\n\n protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If a microtask has already been scheduled, don't schedule another\n // one. If a microtask hasn't been scheduled yet, schedule one now. Return\n // the current scheduled microtask id.\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n }\n\n protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if (delay != null ? delay > 0 : this.delay > 0) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n // If the scheduler queue has no remaining actions with the same async id,\n // cancel the requested microtask and set the scheduled flag to undefined\n // so the next AsapAction will request its own.\n const { actions } = scheduler;\n if (id != null && actions[actions.length - 1]?.id !== id) {\n immediateProvider.clearImmediate(id);\n if (scheduler._scheduled === id) {\n scheduler._scheduled = undefined;\n }\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n }\n}\n","'use strict';\n\n/** @type {import('./gOPD')} */\nmodule.exports = Object.getOwnPropertyDescriptor;\n","import { PartialObserver, ObservableNotification, CompleteNotification, NextNotification, ErrorNotification } from './types';\nimport { Observable } from './Observable';\nimport { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\n\n// TODO: When this enum is removed, replace it with a type alias. See #4556.\n/**\n * @deprecated Use a string literal instead. `NotificationKind` will be replaced with a type alias in v8.\n * It will not be replaced with a const enum as those are not compatible with isolated modules.\n */\nexport enum NotificationKind {\n NEXT = 'N',\n ERROR = 'E',\n COMPLETE = 'C',\n}\n\n/**\n * Represents a push-based event or value that an {@link Observable} can emit.\n * This class is particularly useful for operators that manage notifications,\n * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and\n * others. Besides wrapping the actual delivered value, it also annotates it\n * with metadata of, for instance, what type of push message it is (`next`,\n * `error`, or `complete`).\n *\n * @see {@link materialize}\n * @see {@link dematerialize}\n * @see {@link observeOn}\n * @deprecated It is NOT recommended to create instances of `Notification` directly.\n * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.\n * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.\n * Will be removed in v8.\n */\nexport class Notification<T> {\n /**\n * A value signifying that the notification will \"next\" if observed. In truth,\n * This is really synonymous with just checking `kind === \"N\"`.\n * @deprecated Will be removed in v8. Instead, just check to see if the value of `kind` is `\"N\"`.\n */\n readonly hasValue: boolean;\n\n /**\n * Creates a \"Next\" notification object.\n * @param kind Always `'N'`\n * @param value The value to notify with if observed.\n * @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead.\n */\n constructor(kind: 'N', value?: T);\n /**\n * Creates an \"Error\" notification object.\n * @param kind Always `'E'`\n * @param value Always `undefined`\n * @param error The error to notify with if observed.\n * @deprecated Internal implementation detail. Use {@link Notification#createError createError} instead.\n */\n constructor(kind: 'E', value: undefined, error: any);\n /**\n * Creates a \"completion\" notification object.\n * @param kind Always `'C'`\n * @deprecated Internal implementation detail. Use {@link Notification#createComplete createComplete} instead.\n */\n constructor(kind: 'C');\n constructor(public readonly kind: 'N' | 'E' | 'C', public readonly value?: T, public readonly error?: any) {\n this.hasValue = kind === 'N';\n }\n\n /**\n * Executes the appropriate handler on a passed `observer` given the `kind` of notification.\n * If the handler is missing it will do nothing. Even if the notification is an error, if\n * there is no error handler on the observer, an error will not be thrown, it will noop.\n * @param observer The observer to notify.\n */\n observe(observer: PartialObserver<T>): void {\n return observeNotification(this as ObservableNotification<T>, observer);\n }\n\n /**\n * Executes a notification on the appropriate handler from a list provided.\n * If a handler is missing for the kind of notification, nothing is called\n * and no error is thrown, it will be a noop.\n * @param next A next handler\n * @param error An error handler\n * @param complete A complete handler\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n do(next: (value: T) => void, error: (err: any) => void, complete: () => void): void;\n /**\n * Executes a notification on the appropriate handler from a list provided.\n * If a handler is missing for the kind of notification, nothing is called\n * and no error is thrown, it will be a noop.\n * @param next A next handler\n * @param error An error handler\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n do(next: (value: T) => void, error: (err: any) => void): void;\n /**\n * Executes the next handler if the Notification is of `kind` `\"N\"`. Otherwise\n * this will not error, and it will be a noop.\n * @param next The next handler\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n do(next: (value: T) => void): void;\n do(nextHandler: (value: T) => void, errorHandler?: (err: any) => void, completeHandler?: () => void): void {\n const { kind, value, error } = this;\n return kind === 'N' ? nextHandler?.(value!) : kind === 'E' ? errorHandler?.(error) : completeHandler?.();\n }\n\n /**\n * Executes a notification on the appropriate handler from a list provided.\n * If a handler is missing for the kind of notification, nothing is called\n * and no error is thrown, it will be a noop.\n * @param next A next handler\n * @param error An error handler\n * @param complete A complete handler\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n accept(next: (value: T) => void, error: (err: any) => void, complete: () => void): void;\n /**\n * Executes a notification on the appropriate handler from a list provided.\n * If a handler is missing for the kind of notification, nothing is called\n * and no error is thrown, it will be a noop.\n * @param next A next handler\n * @param error An error handler\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n accept(next: (value: T) => void, error: (err: any) => void): void;\n /**\n * Executes the next handler if the Notification is of `kind` `\"N\"`. Otherwise\n * this will not error, and it will be a noop.\n * @param next The next handler\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n accept(next: (value: T) => void): void;\n\n /**\n * Executes the appropriate handler on a passed `observer` given the `kind` of notification.\n * If the handler is missing it will do nothing. Even if the notification is an error, if\n * there is no error handler on the observer, an error will not be thrown, it will noop.\n * @param observer The observer to notify.\n * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.\n */\n accept(observer: PartialObserver<T>): void;\n accept(nextOrObserver: PartialObserver<T> | ((value: T) => void), error?: (err: any) => void, complete?: () => void) {\n return isFunction((nextOrObserver as any)?.next)\n ? this.observe(nextOrObserver as PartialObserver<T>)\n : this.do(nextOrObserver as (value: T) => void, error as any, complete as any);\n }\n\n /**\n * Returns a simple Observable that just delivers the notification represented\n * by this Notification instance.\n *\n * @deprecated Will be removed in v8. To convert a `Notification` to an {@link Observable},\n * use {@link of} and {@link dematerialize}: `of(notification).pipe(dematerialize())`.\n */\n toObservable(): Observable<T> {\n const { kind, value, error } = this;\n // Select the observable to return by `kind`\n const result =\n kind === 'N'\n ? // Next kind. Return an observable of that value.\n of(value!)\n : //\n kind === 'E'\n ? // Error kind. Return an observable that emits the error.\n throwError(() => error)\n : //\n kind === 'C'\n ? // Completion kind. Kind is \"C\", return an observable that just completes.\n EMPTY\n : // Unknown kind, return falsy, so we error below.\n 0;\n if (!result) {\n // TODO: consider removing this check. The only way to cause this would be to\n // use the Notification constructor directly in a way that is not type-safe.\n // and direct use of the Notification constructor is deprecated.\n throw new TypeError(`Unexpected notification kind ${kind}`);\n }\n return result;\n }\n\n private static completeNotification = new Notification('C') as Notification<never> & CompleteNotification;\n /**\n * A shortcut to create a Notification instance of the type `next` from a\n * given value.\n * @param value The `next` value.\n * @return The \"next\" Notification representing the argument.\n * @deprecated It is NOT recommended to create instances of `Notification` directly.\n * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.\n * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.\n * Will be removed in v8.\n */\n static createNext<T>(value: T) {\n return new Notification('N', value) as Notification<T> & NextNotification<T>;\n }\n\n /**\n * A shortcut to create a Notification instance of the type `error` from a\n * given error.\n * @param err The `error` error.\n * @return The \"error\" Notification representing the argument.\n * @deprecated It is NOT recommended to create instances of `Notification` directly.\n * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.\n * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.\n * Will be removed in v8.\n */\n static createError(err?: any) {\n return new Notification('E', undefined, err) as Notification<never> & ErrorNotification;\n }\n\n /**\n * A shortcut to create a Notification instance of the type `complete`.\n * @return The valueless \"complete\" Notification.\n * @deprecated It is NOT recommended to create instances of `Notification` directly.\n * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.\n * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.\n * Will be removed in v8.\n */\n static createComplete(): Notification<never> & CompleteNotification {\n return Notification.completeNotification;\n }\n}\n\n/**\n * Executes the appropriate handler on a passed `observer` given the `kind` of notification.\n * If the handler is missing it will do nothing. Even if the notification is an error, if\n * there is no error handler on the observer, an error will not be thrown, it will noop.\n * @param notification The notification object to observe.\n * @param observer The observer to notify.\n */\nexport function observeNotification<T>(notification: ObservableNotification<T>, observer: PartialObserver<T>) {\n const { kind, value, error } = notification as any;\n if (typeof kind !== 'string') {\n throw new TypeError('Invalid notification, missing \"kind\"');\n }\n kind === 'N' ? observer.next?.(value!) : kind === 'E' ? observer.error?.(error) : observer.complete?.();\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\n\nexport interface BasicGroupByOptions<K, T> {\n element?: undefined;\n duration?: (grouped: GroupedObservable<K, T>) => ObservableInput<any>;\n connector?: () => SubjectLike<T>;\n}\n\nexport interface GroupByOptionsWithElement<K, E, T> {\n element: (value: T) => E;\n duration?: (grouped: GroupedObservable<K, E>) => ObservableInput<any>;\n connector?: () => SubjectLike<E>;\n}\n\nexport function groupBy<T, K>(key: (value: T) => K, options: BasicGroupByOptions<K, T>): OperatorFunction<T, GroupedObservable<K, T>>;\n\nexport function groupBy<T, K, E>(\n key: (value: T) => K,\n options: GroupByOptionsWithElement<K, E, T>\n): OperatorFunction<T, GroupedObservable<K, E>>;\n\nexport function groupBy<T, K extends T>(\n key: (value: T) => value is K\n): OperatorFunction<T, GroupedObservable<true, K> | GroupedObservable<false, Exclude<T, K>>>;\n\nexport function groupBy<T, K>(key: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;\n\n/**\n * @deprecated use the options parameter instead.\n */\nexport function groupBy<T, K>(\n key: (value: T) => K,\n element: void,\n duration: (grouped: GroupedObservable<K, T>) => Observable<any>\n): OperatorFunction<T, GroupedObservable<K, T>>;\n\n/**\n * @deprecated use the options parameter instead.\n */\nexport function groupBy<T, K, R>(\n key: (value: T) => K,\n element?: (value: T) => R,\n duration?: (grouped: GroupedObservable<K, R>) => Observable<any>\n): OperatorFunction<T, GroupedObservable<K, R>>;\n\n/**\n * Groups the items emitted by an Observable according to a specified criterion,\n * and emits these grouped items as `GroupedObservables`, one\n * {@link GroupedObservable} per group.\n *\n * ![](groupBy.png)\n *\n * When the Observable emits an item, a key is computed for this item with the key function.\n *\n * If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new\n * {@link GroupedObservable} for this key is created and emits.\n *\n * A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common\n * key is available as the `key` field of a {@link GroupedObservable} instance.\n *\n * The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements\n * returned by the element function.\n *\n * ## Examples\n *\n * Group objects by `id` and return as array\n *\n * ```ts\n * import { of, groupBy, mergeMap, reduce } from 'rxjs';\n *\n * of(\n * { id: 1, name: 'JavaScript' },\n * { id: 2, name: 'Parcel' },\n * { id: 2, name: 'webpack' },\n * { id: 1, name: 'TypeScript' },\n * { id: 3, name: 'TSLint' }\n * ).pipe(\n * groupBy(p => p.id),\n * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [])))\n * )\n * .subscribe(p => console.log(p));\n *\n * // displays:\n * // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}]\n * // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}]\n * // [{ id: 3, name: 'TSLint' }]\n * ```\n *\n * Pivot data on the `id` field\n *\n * ```ts\n * import { of, groupBy, mergeMap, reduce, map } from 'rxjs';\n *\n * of(\n * { id: 1, name: 'JavaScript' },\n * { id: 2, name: 'Parcel' },\n * { id: 2, name: 'webpack' },\n * { id: 1, name: 'TypeScript' },\n * { id: 3, name: 'TSLint' }\n * ).pipe(\n * groupBy(p => p.id, { element: p => p.name }),\n * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))),\n * map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) }))\n * )\n * .subscribe(p => console.log(p));\n *\n * // displays:\n * // { id: 1, values: [ 'JavaScript', 'TypeScript' ] }\n * // { id: 2, values: [ 'Parcel', 'webpack' ] }\n * // { id: 3, values: [ 'TSLint' ] }\n * ```\n *\n * @param key A function that extracts the key\n * for each item.\n * @param element A function that extracts the\n * return element for each item.\n * @param duration\n * A function that returns an Observable to determine how long each group should\n * exist.\n * @param connector Factory function to create an\n * intermediate Subject through which grouped elements are emitted.\n * @return A function that returns an Observable that emits GroupedObservables,\n * each of which corresponds to a unique key value and each of which emits\n * those items from the source Observable that share that key value.\n *\n * @deprecated Use the options parameter instead.\n */\nexport function groupBy<T, K, R>(\n key: (value: T) => K,\n element?: (value: T) => R,\n duration?: (grouped: GroupedObservable<K, R>) => Observable<any>,\n connector?: () => Subject<R>\n): OperatorFunction<T, GroupedObservable<K, R>>;\n\n// Impl\nexport function groupBy<T, K, R>(\n keySelector: (value: T) => K,\n elementOrOptions?: ((value: any) => any) | void | BasicGroupByOptions<K, T> | GroupByOptionsWithElement<K, R, T>,\n duration?: (grouped: GroupedObservable<any, any>) => ObservableInput<any>,\n connector?: () => SubjectLike<any>\n): OperatorFunction<T, GroupedObservable<K, R>> {\n return operate((source, subscriber) => {\n let element: ((value: any) => any) | void;\n if (!elementOrOptions || typeof elementOrOptions === 'function') {\n element = elementOrOptions as ((value: any) => any);\n } else {\n ({ duration, element, connector } = elementOrOptions);\n }\n\n // A lookup for the groups that we have so far.\n const groups = new Map<K, SubjectLike<any>>();\n\n // Used for notifying all groups and the subscriber in the same way.\n const notify = (cb: (group: Observer<any>) => void) => {\n groups.forEach(cb);\n cb(subscriber);\n };\n\n // Used to handle errors from the source, AND errors that occur during the\n // next call from the source.\n const handleError = (err: any) => notify((consumer) => consumer.error(err));\n\n // The number of actively subscribed groups\n let activeGroups = 0;\n\n // Whether or not teardown was attempted on this subscription.\n let teardownAttempted = false;\n\n // Capturing a reference to this, because we need a handle to it\n // in `createGroupedObservable` below. This is what we use to\n // subscribe to our source observable. This sometimes needs to be unsubscribed\n // out-of-band with our `subscriber` which is the downstream subscriber, or destination,\n // in cases where a user unsubscribes from the main resulting subscription, but\n // still has groups from this subscription subscribed and would expect values from it\n // Consider: `source.pipe(groupBy(fn), take(2))`.\n const groupBySourceSubscriber = new OperatorSubscriber(\n subscriber,\n (value: T) => {\n // Because we have to notify all groups of any errors that occur in here,\n // we have to add our own try/catch to ensure that those errors are propagated.\n // OperatorSubscriber will only send the error to the main subscriber.\n try {\n const key = keySelector(value);\n\n let group = groups.get(key);\n if (!group) {\n // Create our group subject\n groups.set(key, (group = connector ? connector() : new Subject<any>()));\n\n // Emit the grouped observable. Note that we can't do a simple `asObservable()` here,\n // because the grouped observable has special semantics around reference counting\n // to ensure we don't sever our connection to the source prematurely.\n const grouped = createGroupedObservable(key, group);\n subscriber.next(grouped);\n\n if (duration) {\n const durationSubscriber = createOperatorSubscriber(\n // Providing the group here ensures that it is disposed of -- via `unsubscribe` --\n // when the duration subscription is torn down. That is important, because then\n // if someone holds a handle to the grouped observable and tries to subscribe to it\n // after the connection to the source has been severed, they will get an\n // `ObjectUnsubscribedError` and know they can't possibly get any notifications.\n group as any,\n () => {\n // Our duration notified! We can complete the group.\n // The group will be removed from the map in the finalization phase.\n group!.complete();\n durationSubscriber?.unsubscribe();\n },\n // Completions are also sent to the group, but just the group.\n undefined,\n // Errors on the duration subscriber are sent to the group\n // but only the group. They are not sent to the main subscription.\n undefined,\n // Finalization: Remove this group from our map.\n () => groups.delete(key)\n );\n\n // Start our duration notifier.\n groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));\n }\n }\n\n // Send the value to our group.\n group.next(element ? element(value) : value);\n } catch (err) {\n handleError(err);\n }\n },\n // Source completes.\n () => notify((consumer) => consumer.complete()),\n // Error from the source.\n handleError,\n // Free up memory.\n // When the source subscription is _finally_ torn down, release the subjects and keys\n // in our groups Map, they may be quite large and we don't want to keep them around if we\n // don't have to.\n () => groups.clear(),\n () => {\n teardownAttempted = true;\n // We only kill our subscription to the source if we have\n // no active groups. As stated above, consider this scenario:\n // source$.pipe(groupBy(fn), take(2)).\n return activeGroups === 0;\n }\n );\n\n // Subscribe to the source\n source.subscribe(groupBySourceSubscriber);\n\n /**\n * Creates the actual grouped observable returned.\n * @param key The key of the group\n * @param groupSubject The subject that fuels the group\n */\n function createGroupedObservable(key: K, groupSubject: SubjectLike<any>) {\n const result: any = new Observable<T>((groupSubscriber) => {\n activeGroups++;\n const innerSub = groupSubject.subscribe(groupSubscriber);\n return () => {\n innerSub.unsubscribe();\n // We can kill the subscription to our source if we now have no more\n // active groups subscribed, and a finalization was already attempted on\n // the source.\n --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n };\n });\n result.key = key;\n return result;\n }\n });\n}\n\n/**\n * An observable of values that is the emitted by the result of a {@link groupBy} operator,\n * contains a `key` property for the grouping.\n */\nexport interface GroupedObservable<K, T> extends Observable<T> {\n /**\n * The key value for the grouped notifications.\n */\n readonly key: K;\n}\n","import { Observable } from 'rxjs';\n\n/**\n * Configures an effect created by `createEffect`.\n */\nexport interface EffectConfig {\n /**\n * Determines if the action emitted by the effect is dispatched to the store.\n * If false, effect does not need to return type `Observable<Action>`.\n */\n dispatch?: boolean;\n /**\n * Determines whether the functional effect will be created.\n * If true, the effect can be created outside the effects class.\n */\n functional?: boolean;\n /**\n * Determines if the effect will be resubscribed to if an error occurs in the main actions stream.\n */\n useEffectsErrorHandler?: boolean;\n}\n\nexport const DEFAULT_EFFECT_CONFIG: Readonly<Required<EffectConfig>> = {\n dispatch: true,\n functional: false,\n useEffectsErrorHandler: true,\n};\n\nexport const CREATE_EFFECT_METADATA_KEY = '__@ngrx/effects_create__';\n\nexport interface CreateEffectMetadata {\n [CREATE_EFFECT_METADATA_KEY]: EffectConfig;\n}\n\nexport interface FunctionalCreateEffectMetadata extends CreateEffectMetadata {\n [CREATE_EFFECT_METADATA_KEY]: EffectConfig & { functional: true };\n}\n\nexport type FunctionalEffect<\n Source extends () => Observable<unknown> = () => Observable<unknown>\n> = Source & FunctionalCreateEffectMetadata;\n\nexport type EffectPropertyKey<T extends Record<keyof T, Object>> = Exclude<\n keyof T,\n keyof Object\n>;\n\nexport interface EffectMetadata<T extends Record<keyof T, Object>>\n extends Required<EffectConfig> {\n propertyName: EffectPropertyKey<T>;\n}\n\nexport type EffectsMetadata<T extends Record<keyof T, Object>> = {\n [Key in EffectPropertyKey<T>]?: EffectConfig;\n};\n","import { Observable } from 'rxjs';\nimport { Action, ActionCreator } from '@ngrx/store';\nimport {\n CREATE_EFFECT_METADATA_KEY,\n CreateEffectMetadata,\n DEFAULT_EFFECT_CONFIG,\n EffectConfig,\n EffectMetadata,\n FunctionalEffect,\n} from './models';\n\ntype DispatchType<T> = T extends { dispatch: infer U } ? U : true;\ntype ObservableType<T, OriginalType> = T extends false ? OriginalType : Action;\ntype EffectResult<OT> = Observable<OT> | ((...args: any[]) => Observable<OT>);\ntype ConditionallyDisallowActionCreator<DT, Result> = DT extends false\n ? unknown // If DT (DispatchType is false, then we don't enforce any return types)\n : Result extends EffectResult<infer OT>\n ? OT extends ActionCreator\n ? 'ActionCreator cannot be dispatched. Did you forget to call the action creator function?'\n : unknown\n : unknown;\n\nexport function createEffect<\n C extends EffectConfig & { functional?: false },\n DT extends DispatchType<C>,\n OTP,\n R extends EffectResult<OT>,\n OT extends ObservableType<DT, OTP>\n>(\n source: () => R & ConditionallyDisallowActionCreator<DT, R>,\n config?: C\n): R & CreateEffectMetadata;\nexport function createEffect<Source extends () => Observable<unknown>>(\n source: Source,\n config: EffectConfig & { functional: true; dispatch: false }\n): FunctionalEffect<Source>;\nexport function createEffect<Source extends () => Observable<Action>>(\n source: Source & ConditionallyDisallowActionCreator<true, ReturnType<Source>>,\n config: EffectConfig & { functional: true; dispatch?: true }\n): FunctionalEffect<Source>;\n/**\n * @description\n *\n * Creates an effect from a source and an `EffectConfig`.\n *\n * @param source A function which returns an observable or observable factory.\n * @param config A `EffectConfig` to configure the effect. By default,\n * `dispatch` is true, `functional` is false, and `useEffectsErrorHandler` is\n * true.\n * @returns If `EffectConfig`#`functional` is true, returns the source function.\n * Else, returns the source function result. When `EffectConfig`#`dispatch` is\n * true, the source function result needs to be `Observable<Action>`.\n *\n * @usageNotes\n *\n * ### Class Effects\n *\n * ```ts\n * @Injectable()\n * export class FeatureEffects {\n * // mapping to a different action\n * readonly effect1$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionOne),\n * map(() => FeatureActions.actionTwo())\n * )\n * );\n *\n * // non-dispatching effect\n * readonly effect2$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionTwo),\n * tap(() => console.log('Action Two Dispatched'))\n * ),\n * { dispatch: false } // FeatureActions.actionTwo is not dispatched\n * );\n *\n * constructor(private readonly actions$: Actions) {}\n * }\n * ```\n *\n * ### Functional Effects\n *\n * ```ts\n * // mapping to a different action\n * export const loadUsers = createEffect(\n * (actions$ = inject(Actions), usersService = inject(UsersService)) => {\n * return actions$.pipe(\n * ofType(UsersPageActions.opened),\n * exhaustMap(() => {\n * return usersService.getAll().pipe(\n * map((users) => UsersApiActions.usersLoadedSuccess({ users })),\n * catchError((error) =>\n * of(UsersApiActions.usersLoadedFailure({ error }))\n * )\n * );\n * })\n * );\n * },\n * { functional: true }\n * );\n *\n * // non-dispatching functional effect\n * export const logDispatchedActions = createEffect(\n * () => inject(Actions).pipe(tap(console.log)),\n * { functional: true, dispatch: false }\n * );\n * ```\n */\nexport function createEffect<\n Result extends EffectResult<unknown>,\n Source extends () => Result\n>(\n source: Source,\n config: EffectConfig = {}\n): (Source | Result) & CreateEffectMetadata {\n const effect = config.functional ? source : source();\n const value: EffectConfig = {\n ...DEFAULT_EFFECT_CONFIG,\n ...config, // Overrides any defaults if values are provided\n };\n Object.defineProperty(effect, CREATE_EFFECT_METADATA_KEY, {\n value,\n });\n return effect as typeof effect & CreateEffectMetadata;\n}\n\nexport function getCreateEffectMetadata<T extends Record<keyof T, Object>>(\n instance: T\n): EffectMetadata<T>[] {\n const propertyNames = Object.getOwnPropertyNames(instance) as Array<keyof T>;\n\n const metadata: EffectMetadata<T>[] = propertyNames\n .filter((propertyName) => {\n if (\n instance[propertyName] &&\n instance[propertyName].hasOwnProperty(CREATE_EFFECT_METADATA_KEY)\n ) {\n // If the property type has overridden `hasOwnProperty` we need to ensure\n // that the metadata is valid (containing a `dispatch` property)\n // https://github.com/ngrx/platform/issues/2975\n const property = instance[propertyName] as any;\n return property[CREATE_EFFECT_METADATA_KEY].hasOwnProperty('dispatch');\n }\n return false;\n })\n .map((propertyName) => {\n const metaData = (instance[propertyName] as any)[\n CREATE_EFFECT_METADATA_KEY\n ];\n return {\n propertyName,\n ...metaData,\n };\n });\n\n return metadata;\n}\n","import { InjectionToken, Type } from '@angular/core';\n\nexport function getSourceForInstance<T>(instance: T): T {\n return Object.getPrototypeOf(instance);\n}\n\nexport function isClassInstance(obj: object): boolean {\n return (\n !!obj.constructor &&\n obj.constructor.name !== 'Object' &&\n obj.constructor.name !== 'Function'\n );\n}\n\nexport function isClass(\n classOrRecord: Type<unknown> | Record<string, unknown>\n): classOrRecord is Type<unknown> {\n return typeof classOrRecord === 'function';\n}\n\nexport function getClasses(\n classesAndRecords: Array<Type<unknown> | Record<string, unknown>>\n): Type<unknown>[] {\n return classesAndRecords.filter(isClass);\n}\n\nexport function isToken(\n tokenOrRecord:\n | Type<unknown>\n | InjectionToken<unknown>\n | Record<string, unknown>\n): tokenOrRecord is Type<unknown> | InjectionToken<unknown> {\n return tokenOrRecord instanceof InjectionToken || isClass(tokenOrRecord);\n}\n\n// TODO: replace with RxJS interfaces when possible\n// needs dependency on RxJS >=7\nexport interface NextNotification<T> {\n kind: 'N';\n value: T;\n}\n\nexport interface ErrorNotification {\n kind: 'E';\n error: any;\n}\n\nexport interface CompleteNotification {\n kind: 'C';\n}\n\nexport type ObservableNotification<T> =\n | NextNotification<T>\n | ErrorNotification\n | CompleteNotification;\n","import { Action } from '@ngrx/store';\nimport { merge, Observable } from 'rxjs';\nimport { ignoreElements, map, materialize } from 'rxjs/operators';\n\nimport { EffectNotification } from './effect_notification';\nimport { getSourceMetadata } from './effects_metadata';\nimport { EffectsErrorHandler } from './effects_error_handler';\nimport { getSourceForInstance } from './utils';\nimport { ErrorHandler } from '@angular/core';\n\nexport function mergeEffects(\n sourceInstance: any,\n globalErrorHandler: ErrorHandler,\n effectsErrorHandler: EffectsErrorHandler\n): Observable<EffectNotification> {\n const source = getSourceForInstance(sourceInstance);\n const isClassBasedEffect = !!source && source.constructor.name !== 'Object';\n const sourceName = isClassBasedEffect ? source.constructor.name : null;\n\n const observables$: Observable<any>[] = getSourceMetadata(sourceInstance).map(\n ({\n propertyName,\n dispatch,\n useEffectsErrorHandler,\n }): Observable<EffectNotification> => {\n const observable$: Observable<any> =\n typeof sourceInstance[propertyName] === 'function'\n ? sourceInstance[propertyName]()\n : sourceInstance[propertyName];\n\n const effectAction$ = useEffectsErrorHandler\n ? effectsErrorHandler(observable$, globalErrorHandler)\n : observable$;\n\n if (dispatch === false) {\n return effectAction$.pipe(ignoreElements());\n }\n\n const materialized$ = effectAction$.pipe(materialize<Action>());\n\n return materialized$.pipe(\n map(\n (notification): EffectNotification => ({\n effect: sourceInstance[propertyName],\n notification,\n propertyName,\n sourceName,\n sourceInstance,\n })\n )\n );\n }\n );\n\n return merge(...observables$);\n}\n","import { EffectMetadata, EffectsMetadata } from './models';\nimport { getCreateEffectMetadata } from './effect_creator';\n\nexport function getEffectsMetadata<T extends Record<keyof T, Object>>(\n instance: T\n): EffectsMetadata<T> {\n return getSourceMetadata(instance).reduce(\n (\n acc: EffectsMetadata<T>,\n { propertyName, dispatch, useEffectsErrorHandler }\n ) => {\n acc[propertyName] = { dispatch, useEffectsErrorHandler };\n return acc;\n },\n {}\n );\n}\n\nexport function getSourceMetadata<T extends { [props in keyof T]: object }>(\n instance: T\n): EffectMetadata<T>[] {\n return getCreateEffectMetadata(instance);\n}\n","import { Notification } from '../Notification';\nimport { OperatorFunction, ObservableNotification } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Represents all of the notifications from the source Observable as `next`\n * emissions marked with their original types within {@link Notification}\n * objects.\n *\n * <span class=\"informal\">Wraps `next`, `error` and `complete` emissions in\n * {@link Notification} objects, emitted as `next` on the output Observable.\n * </span>\n *\n * ![](materialize.png)\n *\n * `materialize` returns an Observable that emits a `next` notification for each\n * `next`, `error`, or `complete` emission of the source Observable. When the\n * source Observable emits `complete`, the output Observable will emit `next` as\n * a Notification of type \"complete\", and then it will emit `complete` as well.\n * When the source Observable emits `error`, the output will emit `next` as a\n * Notification of type \"error\", and then `complete`.\n *\n * This operator is useful for producing metadata of the source Observable, to\n * be consumed as `next` emissions. Use it in conjunction with\n * {@link dematerialize}.\n *\n * ## Example\n *\n * Convert a faulty Observable to an Observable of Notifications\n *\n * ```ts\n * import { of, materialize, map } from 'rxjs';\n *\n * const letters = of('a', 'b', 13, 'd');\n * const upperCase = letters.pipe(map((x: any) => x.toUpperCase()));\n * const materialized = upperCase.pipe(materialize());\n *\n * materialized.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // - Notification { kind: 'N', value: 'A', error: undefined, hasValue: true }\n * // - Notification { kind: 'N', value: 'B', error: undefined, hasValue: true }\n * // - Notification { kind: 'E', value: undefined, error: TypeError { message: x.toUpperCase is not a function }, hasValue: false }\n * ```\n *\n * @see {@link Notification}\n * @see {@link dematerialize}\n *\n * @return A function that returns an Observable that emits\n * {@link Notification} objects that wrap the original emissions from the\n * source Observable with metadata.\n */\nexport function materialize<T>(): OperatorFunction<T, Notification<T> & ObservableNotification<T>> {\n return operate((source, subscriber) => {\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n subscriber.next(Notification.createNext(value));\n },\n () => {\n subscriber.next(Notification.createComplete());\n subscriber.complete();\n },\n (err) => {\n subscriber.next(Notification.createError(err));\n subscriber.complete();\n }\n )\n );\n });\n}\n","import { ErrorHandler } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nexport type EffectsErrorHandler = <T extends Action>(\n observable$: Observable<T>,\n errorHandler: ErrorHandler\n) => Observable<T>;\n\nconst MAX_NUMBER_OF_RETRY_ATTEMPTS = 10;\n\nexport function defaultEffectsErrorHandler<T extends Action>(\n observable$: Observable<T>,\n errorHandler: ErrorHandler,\n retryAttemptLeft: number = MAX_NUMBER_OF_RETRY_ATTEMPTS\n): Observable<T> {\n return observable$.pipe(\n catchError((error) => {\n if (errorHandler) errorHandler.handleError(error);\n if (retryAttemptLeft <= 1) {\n return observable$; // last attempt\n }\n // Return observable that produces this particular effect\n return defaultEffectsErrorHandler(\n observable$,\n errorHandler,\n retryAttemptLeft - 1\n );\n })\n );\n}\n","import { Inject, Injectable } from '@angular/core';\nimport {\n Action,\n ActionCreator,\n Creator,\n ScannedActionsSubject,\n} from '@ngrx/store';\nimport { Observable, OperatorFunction, Operator } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class Actions<V = Action> extends Observable<V> {\n constructor(@Inject(ScannedActionsSubject) source?: Observable<V>) {\n super();\n\n if (source) {\n this.source = source;\n }\n }\n\n override lift<R>(operator: Operator<V, R>): Observable<R> {\n const observable = new Actions<R>();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n}\n\n// Module-private helper type\ntype ActionExtractor<\n T extends string | AC,\n AC extends ActionCreator<string, Creator>,\n E\n> = T extends string ? E : ReturnType<Extract<T, AC>>;\n\nexport function ofType<\n AC extends ActionCreator<string, Creator>[],\n U extends Action = Action,\n V = ReturnType<AC[number]>\n>(...allowedTypes: AC): OperatorFunction<U, V>;\n\nexport function ofType<\n E extends Extract<U, { type: T1 }>,\n AC extends ActionCreator<string, Creator>,\n T1 extends string | AC,\n U extends Action = Action,\n V = T1 extends string ? E : ReturnType<Extract<T1, AC>>\n>(t1: T1): OperatorFunction<U, V>;\nexport function ofType<\n E extends Extract<U, { type: T1 | T2 }>,\n AC extends ActionCreator<string, Creator>,\n T1 extends string | AC,\n T2 extends string | AC,\n U extends Action = Action,\n V = ActionExtractor<T1 | T2, AC, E>\n>(t1: T1, t2: T2): OperatorFunction<U, V>;\nexport function ofType<\n E extends Extract<U, { type: T1 | T2 | T3 }>,\n AC extends ActionCreator<string, Creator>,\n T1 extends string | AC,\n T2 extends string | AC,\n T3 extends string | AC,\n U extends Action = Action,\n V = ActionExtractor<T1 | T2 | T3, AC, E>\n>(t1: T1, t2: T2, t3: T3): OperatorFunction<U, V>;\nexport function ofType<\n E extends Extract<U, { type: T1 | T2 | T3 | T4 }>,\n AC extends ActionCreator<string, Creator>,\n T1 extends string | AC,\n T2 extends string | AC,\n T3 extends string | AC,\n T4 extends string | AC,\n U extends Action = Action,\n V = ActionExtractor<T1 | T2 | T3 | T4, AC, E>\n>(t1: T1, t2: T2, t3: T3, t4: T4): OperatorFunction<U, V>;\nexport function ofType<\n E extends Extract<U, { type: T1 | T2 | T3 | T4 | T5 }>,\n AC extends ActionCreator<string, Creator>,\n T1 extends string | AC,\n T2 extends string | AC,\n T3 extends string | AC,\n T4 extends string | AC,\n T5 extends string | AC,\n U extends Action = Action,\n V = ActionExtractor<T1 | T2 | T3 | T4 | T5, AC, E>\n>(t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): OperatorFunction<U, V>;\n/**\n * Fallback for more than 5 arguments.\n * There is no inference, so the return type is the same as the input -\n * Observable<Action>.\n *\n * We provide a type parameter, even though TS will not infer it from the\n * arguments, to preserve backwards compatibility with old versions of ngrx.\n */\nexport function ofType<V extends Action>(\n ...allowedTypes: Array<string | ActionCreator<string, Creator>>\n): OperatorFunction<Action, V>;\n/**\n * `ofType` filters an Observable of `Actions` into an Observable of the actions\n * whose type strings are passed to it.\n *\n * For example, if `actions` has type `Actions<AdditionAction|SubstractionAction>`, and\n * the type of the `Addition` action is `add`, then\n * `actions.pipe(ofType('add'))` returns an `Observable<AdditionAction>`.\n *\n * Properly typing this function is hard and requires some advanced TS tricks\n * below.\n *\n * Type narrowing automatically works, as long as your `actions` object\n * starts with a `Actions<SomeUnionOfActions>` instead of generic `Actions`.\n *\n * For backwards compatibility, when one passes a single type argument\n * `ofType<T>('something')` the result is an `Observable<T>`. Note, that `T`\n * completely overrides any possible inference from 'something'.\n *\n * Unfortunately, for unknown 'actions: Actions' these types will produce\n * 'Observable<never>'. In such cases one has to manually set the generic type\n * like `actions.ofType<AdditionAction>('add')`.\n *\n * @usageNotes\n *\n * Filter the Actions stream on the \"customers page loaded\" action\n *\n * ```ts\n * import { ofType } from '@ngrx/effects';\n * import * fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * ofType(fromCustomers.pageLoaded)\n * )\n * ```\n */\nexport function ofType(\n ...allowedTypes: Array<string | ActionCreator<string, Creator>>\n): OperatorFunction<Action, Action> {\n return filter((action: Action) =>\n allowedTypes.some((typeOrActionCreator) => {\n if (typeof typeOrActionCreator === 'string') {\n // Comparing the string to type\n return typeOrActionCreator === action.type;\n }\n\n // We are filtering by ActionCreator\n return typeOrActionCreator.type === action.type;\n })\n );\n}\n","import { InjectionToken, Type } from '@angular/core';\nimport {\n defaultEffectsErrorHandler,\n EffectsErrorHandler,\n} from './effects_error_handler';\nimport { FunctionalEffect } from './models';\n\nexport const _ROOT_EFFECTS_GUARD = new InjectionToken<void>(\n '@ngrx/effects Internal Root Guard'\n);\nexport const USER_PROVIDED_EFFECTS = new InjectionToken<\n Array<Type<unknown> | InjectionToken<unknown>>[]\n>('@ngrx/effects User Provided Effects');\nexport const _ROOT_EFFECTS = new InjectionToken<\n [Array<Type<unknown> | Record<string, FunctionalEffect>>]\n>('@ngrx/effects Internal Root Effects');\nexport const _ROOT_EFFECTS_INSTANCES = new InjectionToken<unknown[]>(\n '@ngrx/effects Internal Root Effects Instances'\n);\nexport const _FEATURE_EFFECTS = new InjectionToken<\n Array<Type<unknown> | Record<string, FunctionalEffect>>[]\n>('@ngrx/effects Internal Feature Effects');\nexport const _FEATURE_EFFECTS_INSTANCE_GROUPS = new InjectionToken<unknown[][]>(\n '@ngrx/effects Internal Feature Effects Instance Groups'\n);\nexport const EFFECTS_ERROR_HANDLER = new InjectionToken<EffectsErrorHandler>(\n '@ngrx/effects Effects Error Handler',\n { providedIn: 'root', factory: () => defaultEffectsErrorHandler }\n);\n","import { createAction } from '@ngrx/store';\n\nexport const ROOT_EFFECTS_INIT = '@ngrx/effects/init';\nexport const rootEffectsInit = createAction(ROOT_EFFECTS_INIT);\n","import { Observable } from 'rxjs';\nimport { EffectNotification } from '.';\nimport { Action } from '@ngrx/store';\n\n/**\n * @description\n * Interface to set an identifier for effect instances.\n *\n * By default, each Effects class is registered\n * once regardless of how many times the Effect class\n * is loaded. By implementing this interface, you define\n * a unique identifier to register an Effects class instance\n * multiple times.\n *\n * @usageNotes\n *\n * ### Set an identifier for an Effects class\n *\n * ```ts\n * class EffectWithIdentifier implements OnIdentifyEffects {\n * constructor(private effectIdentifier: string) {}\n *\n * ngrxOnIdentifyEffects() {\n * return this.effectIdentifier;\n * }\n *\n * ```\n */\nexport declare interface OnIdentifyEffects {\n /**\n * @description\n * String identifier to differentiate effect instances.\n */\n ngrxOnIdentifyEffects(): string;\n}\n\nexport const onIdentifyEffectsKey: keyof OnIdentifyEffects =\n 'ngrxOnIdentifyEffects';\n\nexport function isOnIdentifyEffects(\n instance: any\n): instance is OnIdentifyEffects {\n return isFunction(instance, onIdentifyEffectsKey);\n}\n\n/**\n * @description\n * Interface to control the lifecycle of effects.\n *\n * By default, effects are merged and subscribed to the store. Implement the OnRunEffects interface to control the lifecycle of the resolved effects.\n *\n * @usageNotes\n *\n * ### Implement the OnRunEffects interface on an Effects class\n *\n * ```ts\n * export class UserEffects implements OnRunEffects {\n * constructor(private actions$: Actions) {}\n *\n * ngrxOnRunEffects(resolvedEffects$: Observable<EffectNotification>) {\n * return this.actions$.pipe(\n * ofType('LOGGED_IN'),\n * exhaustMap(() =>\n * resolvedEffects$.pipe(\n * takeUntil(this.actions$.pipe(ofType('LOGGED_OUT')))\n * )\n * )\n * );\n * }\n * }\n * ```\n */\nexport declare interface OnRunEffects {\n /**\n * @description\n * Method to control the lifecycle of effects.\n */\n ngrxOnRunEffects(\n resolvedEffects$: Observable<EffectNotification>\n ): Observable<EffectNotification>;\n}\n\nexport const onRunEffectsKey: keyof OnRunEffects = 'ngrxOnRunEffects';\n\nexport function isOnRunEffects(instance: any): instance is OnRunEffects {\n return isFunction(instance, onRunEffectsKey);\n}\n\n/**\n * @description\n * Interface to dispatch an action after effect registration.\n *\n * Implement this interface to dispatch a custom action after\n * the effect has been added. You can listen to this action\n * in the rest of the application to execute something after\n * the effect is registered.\n *\n * @usageNotes\n *\n * ### Set an identifier for an Effects class\n *\n * ```ts\n * class EffectWithInitAction implements OnInitEffects {\n * ngrxOnInitEffects() {\n * return { type: '[EffectWithInitAction] Init' };\n * }\n * ```\n */\nexport declare interface OnInitEffects {\n /**\n * @description\n * Action to be dispatched after the effect is registered.\n */\n ngrxOnInitEffects(): Action;\n}\n\nexport const onInitEffects: keyof OnInitEffects = 'ngrxOnInitEffects';\n\nexport function isOnInitEffects(instance: any): instance is OnInitEffects {\n return isFunction(instance, onInitEffects);\n}\n\nfunction isFunction(instance: any, functionName: string) {\n return (\n instance &&\n functionName in instance &&\n typeof instance[functionName] === 'function'\n );\n}\n","import { ErrorHandler, Inject, Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { Observable, Subject, merge } from 'rxjs';\nimport {\n dematerialize,\n exhaustMap,\n filter,\n groupBy,\n map,\n mergeMap,\n take,\n} from 'rxjs/operators';\n\nimport {\n reportInvalidActions,\n EffectNotification,\n} from './effect_notification';\nimport { EffectsErrorHandler } from './effects_error_handler';\nimport { mergeEffects } from './effects_resolver';\nimport {\n isOnIdentifyEffects,\n isOnRunEffects,\n isOnInitEffects,\n} from './lifecycle_hooks';\nimport { EFFECTS_ERROR_HANDLER } from './tokens';\nimport {\n getSourceForInstance,\n isClassInstance,\n ObservableNotification,\n} from './utils';\n\n@Injectable({ providedIn: 'root' })\nexport class EffectSources extends Subject<any> {\n constructor(\n private errorHandler: ErrorHandler,\n @Inject(EFFECTS_ERROR_HANDLER)\n private effectsErrorHandler: EffectsErrorHandler\n ) {\n super();\n }\n\n addEffects(effectSourceInstance: any): void {\n this.next(effectSourceInstance);\n }\n\n /**\n * @internal\n */\n toActions(): Observable<Action> {\n return this.pipe(\n groupBy((effectsInstance) =>\n isClassInstance(effectsInstance)\n ? getSourceForInstance(effectsInstance)\n : effectsInstance\n ),\n mergeMap((source$) => {\n return source$.pipe(groupBy(effectsInstance));\n }),\n mergeMap((source$) => {\n const effect$ = source$.pipe(\n exhaustMap((sourceInstance) => {\n return resolveEffectSource(\n this.errorHandler,\n this.effectsErrorHandler\n )(sourceInstance);\n }),\n map((output) => {\n reportInvalidActions(output, this.errorHandler);\n return output.notification;\n }),\n filter(\n (notification): notification is ObservableNotification<Action> =>\n notification.kind === 'N' && notification.value != null\n ),\n dematerialize()\n );\n\n // start the stream with an INIT action\n // do this only for the first Effect instance\n const init$ = source$.pipe(\n take(1),\n filter(isOnInitEffects),\n map((instance) => instance.ngrxOnInitEffects())\n );\n\n return merge(effect$, init$);\n })\n );\n }\n}\n\nfunction effectsInstance(sourceInstance: any) {\n if (isOnIdentifyEffects(sourceInstance)) {\n return sourceInstance.ngrxOnIdentifyEffects();\n }\n\n return '';\n}\n\nfunction resolveEffectSource(\n errorHandler: ErrorHandler,\n effectsErrorHandler: EffectsErrorHandler\n): (sourceInstance: any) => Observable<EffectNotification> {\n return (sourceInstance) => {\n const mergedEffects$ = mergeEffects(\n sourceInstance,\n errorHandler,\n effectsErrorHandler\n );\n\n if (isOnRunEffects(sourceInstance)) {\n return sourceInstance.ngrxOnRunEffects(mergedEffects$);\n }\n\n return mergedEffects$;\n };\n}\n","import { ErrorHandler } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { Observable } from 'rxjs';\nimport { ObservableNotification } from './utils';\n\nexport interface EffectNotification {\n effect: Observable<any> | (() => Observable<any>);\n propertyName: PropertyKey;\n sourceName: string | null;\n sourceInstance: any;\n notification: ObservableNotification<Action | null | undefined>;\n}\n\nexport function reportInvalidActions(\n output: EffectNotification,\n reporter: ErrorHandler\n) {\n if (output.notification.kind === 'N') {\n const action = output.notification.value;\n const isInvalidAction = !isAction(action);\n\n if (isInvalidAction) {\n reporter.handleError(\n new Error(\n `Effect ${getEffectName(\n output\n )} dispatched an invalid action: ${stringify(action)}`\n )\n );\n }\n }\n}\n\nfunction isAction(action: any): action is Action {\n return (\n typeof action !== 'function' &&\n action &&\n action.type &&\n typeof action.type === 'string'\n );\n}\n\nfunction getEffectName({\n propertyName,\n sourceInstance,\n sourceName,\n}: EffectNotification) {\n const isMethod = typeof sourceInstance[propertyName] === 'function';\n const isClassBasedEffect = !!sourceName;\n\n return isClassBasedEffect\n ? `\"${sourceName}.${String(propertyName)}${isMethod ? '()' : ''}\"`\n : `\"${String(propertyName)}()\"`;\n}\n\nfunction stringify(action: Action | null | undefined) {\n try {\n return JSON.stringify(action);\n } catch {\n return action;\n }\n}\n","import { observeNotification } from '../Notification';\nimport { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Converts an Observable of {@link ObservableNotification} objects into the emissions\n * that they represent.\n *\n * <span class=\"informal\">Unwraps {@link ObservableNotification} objects as actual `next`,\n * `error` and `complete` emissions. The opposite of {@link materialize}.</span>\n *\n * ![](dematerialize.png)\n *\n * `dematerialize` is assumed to operate an Observable that only emits\n * {@link ObservableNotification} objects as `next` emissions, and does not emit any\n * `error`. Such Observable is the output of a `materialize` operation. Those\n * notifications are then unwrapped using the metadata they contain, and emitted\n * as `next`, `error`, and `complete` on the output Observable.\n *\n * Use this operator in conjunction with {@link materialize}.\n *\n * ## Example\n *\n * Convert an Observable of Notifications to an actual Observable\n *\n * ```ts\n * import { NextNotification, ErrorNotification, of, dematerialize } from 'rxjs';\n *\n * const notifA: NextNotification<string> = { kind: 'N', value: 'A' };\n * const notifB: NextNotification<string> = { kind: 'N', value: 'B' };\n * const notifE: ErrorNotification = { kind: 'E', error: new TypeError('x.toUpperCase is not a function') };\n *\n * const materialized = of(notifA, notifB, notifE);\n *\n * const upperCase = materialized.pipe(dematerialize());\n * upperCase.subscribe({\n * next: x => console.log(x),\n * error: e => console.error(e)\n * });\n *\n * // Results in:\n * // A\n * // B\n * // TypeError: x.toUpperCase is not a function\n * ```\n *\n * @see {@link materialize}\n *\n * @return A function that returns an Observable that emits items and\n * notifications embedded in Notification objects emitted by the source\n * Observable.\n */\nexport function dematerialize<N extends ObservableNotification<any>>(): OperatorFunction<N, ValueFromNotification<N>> {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber)));\n });\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\n\nimport { EffectSources } from './effect_sources';\n\n@Injectable({ providedIn: 'root' })\nexport class EffectsRunner implements OnDestroy {\n private effectsSubscription: Subscription | null = null;\n\n get isStarted(): boolean {\n return !!this.effectsSubscription;\n }\n\n constructor(\n private effectSources: EffectSources,\n private store: Store<any>\n ) {}\n\n start() {\n if (!this.effectsSubscription) {\n this.effectsSubscription = this.effectSources\n .toActions()\n .subscribe(this.store);\n }\n }\n\n ngOnDestroy() {\n if (this.effectsSubscription) {\n this.effectsSubscription.unsubscribe();\n this.effectsSubscription = null;\n }\n }\n}\n","import { NgModule, Inject, Optional } from '@angular/core';\nimport { Store, StoreRootModule, StoreFeatureModule } from '@ngrx/store';\nimport { EffectsRunner } from './effects_runner';\nimport { EffectSources } from './effect_sources';\nimport { _ROOT_EFFECTS_GUARD, _ROOT_EFFECTS_INSTANCES } from './tokens';\nimport { ROOT_EFFECTS_INIT } from './effects_actions';\n\n@NgModule({})\nexport class EffectsRootModule {\n constructor(\n private sources: EffectSources,\n runner: EffectsRunner,\n store: Store,\n @Inject(_ROOT_EFFECTS_INSTANCES) rootEffectsInstances: unknown[],\n @Optional() storeRootModule: StoreRootModule,\n @Optional() storeFeatureModule: StoreFeatureModule,\n @Optional()\n @Inject(_ROOT_EFFECTS_GUARD)\n guard: unknown\n ) {\n runner.start();\n\n for (const effectsInstance of rootEffectsInstances) {\n sources.addEffects(effectsInstance);\n }\n\n store.dispatch({ type: ROOT_EFFECTS_INIT });\n }\n\n addEffects(effectsInstance: unknown): void {\n this.sources.addEffects(effectsInstance);\n }\n}\n","import { NgModule, Inject, Optional } from '@angular/core';\nimport { StoreRootModule, StoreFeatureModule } from '@ngrx/store';\nimport { EffectsRootModule } from './effects_root_module';\nimport { _FEATURE_EFFECTS_INSTANCE_GROUPS } from './tokens';\n\n@NgModule({})\nexport class EffectsFeatureModule {\n constructor(\n effectsRootModule: EffectsRootModule,\n @Inject(_FEATURE_EFFECTS_INSTANCE_GROUPS)\n effectsInstanceGroups: unknown[][],\n @Optional() storeRootModule: StoreRootModule,\n @Optional() storeFeatureModule: StoreFeatureModule\n ) {\n const effectsInstances = effectsInstanceGroups.flat();\n for (const effectsInstance of effectsInstances) {\n effectsRootModule.addEffects(effectsInstance);\n }\n }\n}\n","import {\n inject,\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n Type,\n} from '@angular/core';\nimport { EffectsFeatureModule } from './effects_feature_module';\nimport { EffectsRootModule } from './effects_root_module';\nimport { EffectsRunner } from './effects_runner';\nimport {\n _FEATURE_EFFECTS,\n _ROOT_EFFECTS,\n _ROOT_EFFECTS_GUARD,\n _FEATURE_EFFECTS_INSTANCE_GROUPS,\n _ROOT_EFFECTS_INSTANCES,\n USER_PROVIDED_EFFECTS,\n} from './tokens';\nimport { FunctionalEffect } from './models';\nimport { getClasses, isToken } from './utils';\n\n@NgModule({})\nexport class EffectsModule {\n static forFeature(\n featureEffects: Array<Type<unknown> | Record<string, FunctionalEffect>>\n ): ModuleWithProviders<EffectsFeatureModule>;\n static forFeature(\n ...featureEffects: Array<Type<unknown> | Record<string, FunctionalEffect>>\n ): ModuleWithProviders<EffectsFeatureModule>;\n static forFeature(\n ...featureEffects:\n | Array<Type<unknown> | Record<string, FunctionalEffect>>\n | [Array<Type<unknown> | Record<string, FunctionalEffect>>]\n ): ModuleWithProviders<EffectsFeatureModule> {\n const effects = featureEffects.flat();\n const effectsClasses = getClasses(effects);\n return {\n ngModule: EffectsFeatureModule,\n providers: [\n effectsClasses,\n {\n provide: _FEATURE_EFFECTS,\n multi: true,\n useValue: effects,\n },\n {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: [],\n },\n {\n provide: _FEATURE_EFFECTS_INSTANCE_GROUPS,\n multi: true,\n useFactory: createEffectsInstances,\n deps: [_FEATURE_EFFECTS, USER_PROVIDED_EFFECTS],\n },\n ],\n };\n }\n\n static forRoot(\n rootEffects: Array<Type<unknown> | Record<string, FunctionalEffect>>\n ): ModuleWithProviders<EffectsRootModule>;\n static forRoot(\n ...rootEffects: Array<Type<unknown> | Record<string, FunctionalEffect>>\n ): ModuleWithProviders<EffectsRootModule>;\n static forRoot(\n ...rootEffects:\n | Array<Type<unknown> | Record<string, FunctionalEffect>>\n | [Array<Type<unknown> | Record<string, FunctionalEffect>>]\n ): ModuleWithProviders<EffectsRootModule> {\n const effects = rootEffects.flat();\n const effectsClasses = getClasses(effects);\n return {\n ngModule: EffectsRootModule,\n providers: [\n effectsClasses,\n {\n provide: _ROOT_EFFECTS,\n useValue: [effects],\n },\n {\n provide: _ROOT_EFFECTS_GUARD,\n useFactory: _provideForRootGuard,\n },\n {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: [],\n },\n {\n provide: _ROOT_EFFECTS_INSTANCES,\n useFactory: createEffectsInstances,\n deps: [_ROOT_EFFECTS, USER_PROVIDED_EFFECTS],\n },\n ],\n };\n }\n}\n\nfunction createEffectsInstances(\n effectsGroups: Array<Type<unknown> | Record<string, FunctionalEffect>>[],\n userProvidedEffectsGroups: Array<Type<unknown> | InjectionToken<unknown>>[]\n): unknown[] {\n const effects: Array<\n Type<unknown> | Record<string, FunctionalEffect> | InjectionToken<unknown>\n > = [];\n\n for (const effectsGroup of effectsGroups) {\n effects.push(...effectsGroup);\n }\n\n for (const userProvidedEffectsGroup of userProvidedEffectsGroups) {\n effects.push(...userProvidedEffectsGroup);\n }\n\n return effects.map((effectsTokenOrRecord) =>\n isToken(effectsTokenOrRecord)\n ? inject(effectsTokenOrRecord)\n : effectsTokenOrRecord\n );\n}\n\nfunction _provideForRootGuard(): unknown {\n const runner = inject(EffectsRunner, { optional: true, skipSelf: true });\n const rootEffects = inject(_ROOT_EFFECTS, { self: true });\n\n // check whether any effects are actually passed\n const hasEffects = !(rootEffects.length === 1 && rootEffects[0].length === 0);\n if (hasEffects && runner) {\n throw new TypeError(\n `EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.`\n );\n }\n return 'guarded';\n}\n","import { Inject, Injectable, OnDestroy, Renderer2, RendererFactory2 } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils/unsubscribe';\n\ntype SymbolDefs = [SVGSymbolElement, SVGDefsElement];\n\n@Injectable({\n providedIn: 'root',\n})\nexport abstract class IconsService implements OnDestroy {\n private globalSVG: SVGElement = null;\n private globalDefs: SVGDefsElement = null;\n\n private readonly rendered: Set<string> = new Set();\n\n protected subscriptions: Subscription;\n protected readonly _renderer: Renderer2;\n\n abstract addIcon(iconRef: string, url: string): Promise<void>;\n\n constructor(\n @Inject(DOCUMENT) protected readonly document: Document,\n rendererFactory: RendererFactory2\n ) {\n this._renderer = rendererFactory.createRenderer(null, null);\n this.createGlobalSVG();\n this.subscriptions = new Subscription();\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n protected alreadyRendered(id: string): boolean {\n if (\n !this.globalSVG ||\n this.rendered.has(id) ||\n Array.from(this.globalSVG.childNodes).find((child) => (child as SVGSymbolElement | SVGDefsElement).id === id)\n ) {\n this.rendered.add(id);\n return true;\n }\n return false;\n }\n\n protected addToGlobal(iconRef: string, symbol: SVGSymbolElement, def: SVGDefsElement): void {\n if (this.alreadyRendered(iconRef)) {\n return;\n }\n\n this.appendSymbol(symbol);\n this.appendDefs(def);\n this.rendered.add(iconRef);\n }\n\n protected _svgSymbolElementFromString(str: string): SymbolDefs | never {\n /**\n * need to create a div element and embed a svg containing the symbol\n * as setting innerHTML of the svg element is not implemented in universal\n */\n const symbolDiv = this._renderer.createElement('DIV');\n const defsDiv = this._renderer.createElement('DIV'); // separate div required because IE loses children if you replace the innerHTML\n defsDiv.innerHTML = str;\n const defs: SVGDefsElement = defsDiv.querySelector('defs');\n\n symbolDiv.innerHTML = `<svg>${str.replace('<svg', '<symbol').replace(/<defs>.*<\\/defs>/, '')}</svg>`;\n\n const symbol = symbolDiv.querySelector('symbol') as SVGSymbolElement;\n if (!symbol) {\n throw new Error('No SVG Symbol found in loaded contents');\n }\n\n return [symbol, defs];\n }\n\n private createGlobalSVG(): void {\n if (!this.document || this.globalSVG) {\n return;\n }\n\n this.globalSVG = this.document.querySelector('svg#globalsvg');\n this.globalDefs = this.document.querySelector('svg#globalsvg defs');\n if (!this.globalSVG) {\n this.globalSVG = this._renderer.createElement('svg', 'svg');\n this.globalSVG.id = 'globalsvg';\n this.globalSVG.setAttribute('width', '0');\n this.globalSVG.setAttribute('height', '0');\n this.globalSVG.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n this.globalSVG.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n this.globalDefs = this._renderer.createElement('defs', 'svg');\n this._renderer.appendChild(this.globalSVG, this.globalDefs);\n this._renderer.appendChild(this.document.body, this.globalSVG);\n }\n }\n\n private appendSymbol(symbol: SVGSymbolElement): void {\n if (this.globalSVG) {\n this._renderer.appendChild(this.globalSVG, symbol);\n }\n }\n\n private appendDefs(def: SVGDefsElement): void {\n if (def && this.globalDefs) {\n Array.from(def.childNodes).forEach((node) => {\n this._renderer.appendChild(this.globalDefs, node);\n });\n }\n }\n}\n","import { UntypedFormGroup, ValidatorFn } from '@angular/forms';\n\nimport { LocalDate, pad, TzDate } from '@fcom/core/utils';\nimport { BirthDate } from '@fcom/dapi/interfaces';\n\nimport { FlightTimeOption } from './../interfaces/flight-filters.interface';\n\nexport const formatDate = (day?: string, month?: string, year?: string): string => {\n if (year && month && day) {\n const dateString = `${pad(year, 4)}-${pad(month)}-${pad(day)}`;\n if (LocalDate.isLocalDate(dateString)) {\n return dateString;\n }\n }\n return '';\n};\n\nexport const formatDateOfBirth = (birthDate: BirthDate): string => {\n return formatDate(birthDate?.dateOfBirth, birthDate?.monthOfBirth, birthDate?.yearOfBirth);\n};\n\nexport function passportExpiryValidator(): ValidatorFn {\n return (group: UntypedFormGroup): { [key: string]: any } | null => {\n const day = group.controls['day'].value;\n const month = group.controls['month'].value;\n const year = group.controls['year'].value;\n\n if (!day && !month && !year) return null;\n if (!day || !month || !year) return { selectAll: 'Select day, month and year' };\n\n const tomorrow = LocalDate.now().plusDays(1);\n const expiryDate = LocalDate.forDate(year, month, day);\n\n if (expiryDate <= tomorrow) return { invalidDate: 'Invalid passport expiry date' };\n };\n}\n\nexport const formatToDateOfDateString = (\n inputDate: string | LocalDate\n): { day: string; month: string; year: string } | null => {\n const date = inputDate instanceof LocalDate ? inputDate.toString() : inputDate;\n if (!date || !date.match(/[0-9]{4}-[0-9]{2}-[0-9]{2}/)) {\n return null;\n }\n const [year, month, day] = date.split('-').map((d) => parseInt(d, 10).toString());\n return { year, month, day };\n};\n\nexport const formatToDateOfBirth = (birthDate: string | LocalDate): BirthDate | null => {\n const date = formatToDateOfDateString(birthDate);\n\n if (!date) {\n return null;\n }\n\n return { yearOfBirth: date.year, monthOfBirth: date.month, dateOfBirth: date.day };\n};\n\nexport const isBetweenHours = (date: TzDate, startHour: number, endHour: number): boolean => {\n const dateHour = date.localHours;\n\n return dateHour >= startHour && dateHour < endHour;\n};\n\nexport const shouldTimeBeKept = (timeOptions: FlightTimeOption[], dateTime: string): boolean =>\n (timeOptions.includes(FlightTimeOption.MORNING) && isBetweenHours(new TzDate(dateTime), 0, 12)) ||\n (timeOptions.includes(FlightTimeOption.AFTERNOON) && isBetweenHours(new TzDate(dateTime), 12, 17)) ||\n (timeOptions.includes(FlightTimeOption.EVENING) && isBetweenHours(new TzDate(dateTime), 17, 24));\n\nexport const isDate = (value: string | Date): boolean => {\n return !isNaN(new Date(value).getTime());\n};\n\nexport const toISOStringPreserveTimeZone = (value: string): string => {\n return new Date(value + ' GMT').toISOString();\n};\n","import { Injectable, OnDestroy, signal } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport {\n BehaviorSubject,\n Observable,\n Subject,\n Subscription,\n combineLatest,\n distinctUntilChanged,\n filter,\n map,\n of,\n startWith,\n switchMap,\n take,\n tap,\n withLatestFrom,\n iif,\n} from 'rxjs';\n\nimport { finShare } from '@fcom/rx';\nimport { equals, isNotBlank, isPresent, unsubscribe, isEmptyObjectOrHasEmptyValues, isDeepEqual } from '@fcom/core';\nimport { FlightSearchParams, GlobalBookingTripDates, RecommendationService, PriceCalendarService } from '@fcom/common';\nimport {\n CommonFeatureState,\n GlobalBookingActions,\n globalBookingDiscountCode,\n GlobalBookingState,\n globalBookingSelections,\n globalBookingTravelDates,\n} from '@fcom/common/store';\nimport { FINNISH_SITES } from '@fcom/core/constants';\nimport { GlobalBookingTravelClass, TripType } from '@fcom/core/interfaces';\nimport { LoginStatus, Profile } from '@fcom/core-api/login';\nimport { Amount, PaxAmount } from '@fcom/dapi/interfaces';\nimport { AirCalendarList } from '@fcom/dapi/api/models';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { loginStatus, profile } from '@fcom/core/selectors';\n\nimport { BookingWidgetGtmService } from './booking-widget-gtm.service';\nimport { createDeeplinkPathFromFlightSearchParams, hasCorrectAmountOfFlights } from '../utils/utils';\nimport { BookingWidgetActions, BookingWidgetAppState, airCalendarPrices, notificationWarnings } from '../store';\nimport {\n DatePickerPrices,\n InstantSearchBaseParams,\n PreviousSearch,\n WidgetTab,\n PriceParams,\n Warnings,\n NotificationWarning,\n SelectionType,\n GlobalBookingWidgetSelectionChangeMap,\n} from '../interfaces';\nimport { BookingWidgetCalendarService } from './booking-widget-calendar.service';\nimport { BookingWidgetFlightService } from './booking-widget-flight.service';\nimport { BookingWidgetTripService } from './booking-widget-trip.service';\n\n@Injectable({ providedIn: 'root' })\nexport class BookingWidgetService implements OnDestroy {\n private _profile$: Observable<Profile>;\n private _notificationWarning$: Observable<Warnings>;\n private _loginStatus$: Observable<LoginStatus>;\n private _travelDates$: Observable<GlobalBookingTripDates>;\n private _continueEnabled$: Observable<boolean>;\n private _discountCode$: Observable<string>;\n private _flightSearchParams$: Observable<FlightSearchParams>;\n private _startingPrice$: Observable<Amount> = of(null);\n private _prices$: Observable<DatePickerPrices>;\n private _airCalendarPrices$: Observable<AirCalendarList>;\n private _priceRequestBaseParams$: Observable<InstantSearchBaseParams>;\n private _flexibleDates$ = new BehaviorSubject<boolean>(false);\n private _subscription = new Subscription();\n private _showCompact$ = new BehaviorSubject<boolean>(true);\n private _originalBookingSelection$ = new BehaviorSubject<GlobalBookingState>(undefined);\n private _globalBookingWidgetSelectionChanges$ = new BehaviorSubject<GlobalBookingWidgetSelectionChangeMap>({});\n private _isMultiCity$: Observable<boolean>;\n private usePopoverSelectorsSignal = signal(false);\n private _currentSearch$ = new BehaviorSubject<FlightSearchParams | null>(null);\n\n bookingSelections$: Observable<GlobalBookingState>;\n\n readonly usePopoverSelectors = this.usePopoverSelectorsSignal.asReadonly();\n\n get notificationWarning$(): Observable<Warnings> {\n return this._notificationWarning$;\n }\n\n get profile$(): Observable<Profile> {\n return this._profile$;\n }\n\n get loginStatus$(): Observable<LoginStatus> {\n return this._loginStatus$;\n }\n\n get travelDates$(): Observable<GlobalBookingTripDates> {\n return this._travelDates$;\n }\n\n get discountCode$(): Observable<string> {\n return this._discountCode$;\n }\n\n get flexibleDates$(): Observable<boolean> {\n return this._flexibleDates$.asObservable();\n }\n\n get continueEnabled$(): Observable<boolean> {\n return this._continueEnabled$;\n }\n\n get startingPrice$(): Observable<Amount> {\n return this._startingPrice$;\n }\n\n get airCalendarPrices$(): Observable<AirCalendarList> {\n return this._airCalendarPrices$;\n }\n\n get prices$(): Observable<DatePickerPrices> {\n return this._prices$;\n }\n\n get showCompact$(): Observable<boolean> {\n return this._showCompact$.asObservable();\n }\n\n get isMultiCity$(): Observable<boolean> {\n return this._isMultiCity$;\n }\n\n get originalBookingSelection$(): Observable<GlobalBookingState> {\n return this._originalBookingSelection$.asObservable();\n }\n\n get globalBookingWidgetSelectionChanges$(): Observable<GlobalBookingWidgetSelectionChangeMap> {\n return this._globalBookingWidgetSelectionChanges$.asObservable();\n }\n\n get flightSearchParams$(): Observable<FlightSearchParams> {\n return this._flightSearchParams$;\n }\n\n get currentSearch$(): BehaviorSubject<FlightSearchParams | null> {\n return this._currentSearch$;\n }\n\n constructor(\n private store$: Store<CommonFeatureState & BookingWidgetAppState>,\n private languageService: LanguageService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private recommendationService: RecommendationService,\n private bookingWidgetCalendarService: BookingWidgetCalendarService,\n private router: Router,\n private bookingWidgetFlightService: BookingWidgetFlightService,\n private bookingWidgetTripService: BookingWidgetTripService,\n private priceCalendarService: PriceCalendarService\n ) {\n this._startingPrice$ = this.priceCalendarService.startingFromPrice$;\n this.bookingSelections$ = this.store$.pipe(\n globalBookingSelections(),\n distinctUntilChanged((a, b) => isDeepEqual(a, b)),\n finShare()\n );\n // selectors\n this._profile$ = this.store$.pipe(profile(), startWith(undefined), finShare());\n this._loginStatus$ = this.store$.pipe(loginStatus(), finShare());\n\n this._notificationWarning$ = this.store$.pipe(notificationWarnings(), finShare());\n\n this._travelDates$ = this.store$.pipe(\n globalBookingTravelDates(),\n distinctUntilChanged(\n (prev, next) => prev.departureDate?.id === next.departureDate?.id && prev.returnDate?.id === next.returnDate?.id\n ),\n finShare()\n );\n\n this._discountCode$ = this.store$.pipe(\n globalBookingDiscountCode(),\n map((discountCode: string) => (isPresent(discountCode) ? discountCode : null)),\n finShare()\n );\n\n this._airCalendarPrices$ = this.store$.pipe(airCalendarPrices(), finShare());\n\n this._flightSearchParams$ = combineLatest([\n this.bookingWidgetTripService.selectedTripType$,\n this.bookingWidgetTripService.selectedTravelClass$,\n this.bookingWidgetFlightService.flights$,\n this.bookingWidgetTripService.paxAmount$,\n this.bookingWidgetTripService.activeTab$,\n this._discountCode$,\n this._profile$,\n ]).pipe(\n map(([tripType, travelClass, flights, paxAmount, tab, discountCode, userProfile]) => ({\n tripType,\n travelClass,\n flights,\n paxAmount,\n locale: this.languageService.localeValue,\n isAward: tab === WidgetTab.AWARD,\n promoCode: discountCode,\n isCorporate: userProfile?.isCorporate,\n })),\n finShare()\n );\n\n this.setCurrentSearchToCurrentParams();\n\n this._priceRequestBaseParams$ = combineLatest([\n this.bookingWidgetTripService.selectedTripType$,\n this.bookingWidgetTripService.selectedTravelClass$,\n this.bookingWidgetFlightService.locations$.pipe(\n filter((locations) => !!(locations.origin && locations.destination)),\n distinctUntilChanged(\n (previous, current) =>\n previous?.origin?.locationCode === current?.origin?.locationCode &&\n previous?.destination?.locationCode === current?.destination?.locationCode\n )\n ),\n this.bookingWidgetTripService.activeTab$,\n ]).pipe(\n filter(([, , , tab]) => tab === WidgetTab.FLIGHT || tab === WidgetTab.AWARD),\n withLatestFrom(this.bookingWidgetTripService.paxAmount$),\n map(([[tripType, travelClass, locations], paxAmount]) => ({\n tripType,\n travelClass,\n locations,\n paxAmount,\n })),\n filter((params) => this.priceParamsAreValid(params) && params.tripType !== TripType.MULTICITY),\n map((params) => this.mapToPriceRequestBaseParams(params)),\n distinctUntilChanged((prev, next) => !this.priceBaseParamsChanged(prev, next)),\n finShare()\n );\n\n this._subscription.add(\n this.bookingWidgetTripService.selectedTripType$\n .pipe(filter((tripType) => tripType === TripType.MULTICITY))\n .subscribe(() =>\n this.store$.dispatch(\n BookingWidgetActions.clearNotificationWarning({ key: NotificationWarning.SEASONAL_ROUTE })\n )\n )\n );\n\n this._subscription.add(\n combineLatest([\n this.bookingWidgetTripService.selectedTripType$,\n this.bookingWidgetFlightService.flights$,\n this.bookingWidgetTripService.activeTab$,\n ])\n .pipe(\n withLatestFrom(this._notificationWarning$),\n filter(([, warnings]) => Object.keys(warnings).length > 0)\n )\n .subscribe(() => {\n this.store$.dispatch(BookingWidgetActions.clearNoFlightsNotificationWarnings());\n })\n );\n\n this._subscription.add(\n this._priceRequestBaseParams$\n .pipe(\n withLatestFrom(this._notificationWarning$),\n filter(([, warnings]) => Object.keys(warnings).length > 0)\n )\n .subscribe(() =>\n this.store$.dispatch(\n BookingWidgetActions.clearNotificationWarning({ key: NotificationWarning.SEASONAL_ROUTE })\n )\n )\n );\n\n this._continueEnabled$ = combineLatest([\n this.bookingWidgetTripService.routeCffReady$,\n this._flightSearchParams$,\n ]).pipe(\n map(([routeCffReady, flightSearchParams]) => routeCffReady && this.validateFlightSearchParams(flightSearchParams))\n );\n\n this._isMultiCity$ = this._flightSearchParams$.pipe(map((params) => params.flights.length > 2));\n\n this._subscription.add(\n this._flightSearchParams$\n .pipe(\n filter((flightSearchParams) => this.validateFlightSearchParams(flightSearchParams)),\n distinctUntilChanged((prev, next) => equals(prev, next))\n )\n .subscribe((flightSearchParams) => this.bookingWidgetGtmService.preFlightSearch(flightSearchParams))\n );\n\n // subscription\n this.updatePriceAndCompactStatus();\n }\n\n setCurrentSearchToCurrentParams(): void {\n this._subscription.add(\n combineLatest([\n this.bookingWidgetTripService.selectedTripType$,\n this.bookingWidgetTripService.selectedTravelClass$,\n this.bookingWidgetFlightService.flights$,\n this.bookingWidgetTripService.paxAmount$,\n this.bookingWidgetTripService.activeTab$,\n this._discountCode$,\n this._profile$,\n ])\n .pipe(\n map(([tripType, travelClass, flights, paxAmount, tab, discountCode, userProfile]) => ({\n tripType,\n travelClass,\n flights,\n paxAmount,\n locale: this.languageService.localeValue,\n isAward: tab === WidgetTab.AWARD,\n promoCode: discountCode,\n isCorporate: userProfile?.isCorporate,\n })),\n filter((params) => params != null),\n take(1)\n )\n .subscribe((flightSearchParams) => this.currentSearch$.next(flightSearchParams))\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this._subscription);\n this.resetSelection();\n }\n\n setPreviousSearchChange(): void {\n this._subscription.add(\n combineLatest([this.bookingWidgetFlightService.selectedPreviousSearches$, this.originalBookingSelection$])\n .pipe(\n distinctUntilChanged(\n ([preSearch, preOriginal], [nextSearch, nextOrignal]) =>\n equals(preSearch, nextSearch) && equals(preOriginal, nextOrignal)\n ),\n filter(([previousSearch, originalSelection]) => isPresent(previousSearch) && isPresent(originalSelection))\n )\n .subscribe(([previousSearches, originalBookingSelection]) => {\n this.previousSearchChanged(previousSearches, originalBookingSelection).forEach((changedType) => {\n this.setSelectionChangeType(changedType);\n });\n })\n );\n }\n\n setTravelDates(\n dates: GlobalBookingTripDates,\n index: number,\n isAirCalendar = false,\n isGlobalBookingWidget = false\n ): void {\n if (isGlobalBookingWidget) {\n this.setSelectionChangeType(SelectionType.TRAVEL_DATES);\n }\n\n if (!isAirCalendar) {\n // TODO: check if we would like a separate and different multi-city event as this does not really translate for that purpose\n this.bookingWidgetGtmService.trackElementEvent(\n 'travel-dates',\n `DEPARTURE: ${dates.departureDate}, RETURN: ${dates.returnDate}`\n );\n }\n\n this.store$.dispatch(GlobalBookingActions.setFlightDate({ dates, index }));\n }\n\n setPaxAmount(paxAmount: PaxAmount): void {\n this.store$.dispatch(GlobalBookingActions.setPaxAmount({ paxAmount }));\n }\n\n setTripType(tripType: TripType): void {\n this.store$.dispatch(GlobalBookingActions.setTripType({ tripType }));\n }\n\n setDiscountCode(discountCode: string, isGlobalBookingWidget = false): void {\n if (isGlobalBookingWidget) {\n this.setSelectionChangeType(SelectionType.DISCOUNT_CODE);\n }\n this.store$.dispatch(GlobalBookingActions.setDiscountCode({ discountCode }));\n if (discountCode) {\n this.bookingWidgetGtmService.trackElementEvent('promo-code-modal-done', discountCode);\n }\n }\n\n setFlexibleDates(isFlexibleDates: boolean): void {\n this._flexibleDates$.next(isFlexibleDates);\n }\n\n isAMTabEnabled(enableAM: boolean): Observable<boolean> {\n return of(enableAM && FINNISH_SITES.includes(this.languageService.langValue));\n }\n\n validateFlightSearchParams({ flights, tripType, travelClass, paxAmount }: FlightSearchParams): boolean {\n const travelClassIsValid = isPresent(travelClass);\n const paxAmountIsValid = paxAmount.adults >= 1;\n const flightsAreValid = flights.every((flight, i) => {\n const previousFlight = flights[i - 1];\n const hasConsecutiveDates = !previousFlight || flight.departureDate?.gte(previousFlight.departureDate);\n return (\n flight.origin &&\n flight.origin?.locationCode &&\n flight.destination &&\n flight.destination?.locationCode &&\n flight.departureDate &&\n hasConsecutiveDates\n );\n });\n\n return travelClassIsValid && paxAmountIsValid && flightsAreValid && hasCorrectAmountOfFlights(tripType, flights);\n }\n\n resetSelection(): void {\n this.store$.dispatch(GlobalBookingActions.resetSelection());\n }\n\n expandCompactWidget(): void {\n if (this._showCompact$.getValue()) {\n this._showCompact$.next(false);\n }\n }\n\n setCompactWidget(showCompactWigetStatus: boolean): void {\n this._showCompact$.next(showCompactWigetStatus);\n }\n\n startNewSearch(enableNewSearchAutomatically = false): void {\n if (!enableNewSearchAutomatically) {\n this.bookingWidgetGtmService.trackElementEvent('global-widget-start-new-search');\n }\n this.resetLocalOriginalBookingSelection();\n //reset shadow\n this._subscription.add(\n this._flightSearchParams$\n .pipe(\n filter((flightSearchParams) => this.validateFlightSearchParams(flightSearchParams)),\n take(1)\n )\n .subscribe((flightSearchParams) => {\n this._currentSearch$.next(flightSearchParams);\n this.bookingWidgetFlightService.setPreviousSearchToLocalStorage(flightSearchParams);\n this.router.navigateByUrl(\n createDeeplinkPathFromFlightSearchParams({\n ...flightSearchParams,\n locale: this.languageService.langValue,\n })\n );\n })\n );\n }\n\n resetSearchSelection(): void {\n this._globalBookingWidgetSelectionChanges$.next({});\n }\n\n navigateToBookingFlow(\n fromMatrix = false,\n airCalendarPrice: string | undefined = undefined,\n loading$: Subject<boolean>\n ): void {\n this._subscription.add(\n this._continueEnabled$\n .pipe(\n take(1),\n filter(Boolean),\n withLatestFrom(this._flightSearchParams$, this._flexibleDates$, this._startingPrice$),\n switchMap(([_, flightSearchParams, flexibleDates, startingPrice]) => {\n loading$.next(true);\n this.sendRecommendationsFlightSearchEvent(flightSearchParams);\n\n if (fromMatrix) {\n return of({ continueToBooking: true, flightSearchParams, airCalendarPrice, startingPrice });\n } else {\n return iif(\n () => flexibleDates || flightSearchParams.isAward,\n this.bookingWidgetCalendarService.getAirCalendar(flightSearchParams).pipe(map(() => false)),\n this.bookingWidgetCalendarService.checkFlightAvailabilityAndContinue(flightSearchParams)\n ).pipe(\n map((continueToBooking) => ({\n continueToBooking,\n flightSearchParams,\n startingPrice,\n airCalendarPrice,\n }))\n );\n }\n }),\n tap(() => loading$.next(false)),\n filter(({ continueToBooking }) => continueToBooking),\n filter(({ flightSearchParams }) => this.validateFlightSearchParams(flightSearchParams)),\n map(({ flightSearchParams, startingPrice, airCalendarPrice }) => {\n loading$.next(true);\n this.bookingWidgetFlightService.setPreviousSearchToLocalStorage(flightSearchParams);\n return {\n deeplink: createDeeplinkPathFromFlightSearchParams({\n ...flightSearchParams,\n locale: this.languageService.langValue,\n }),\n instantSearchMonitoring: {\n airCalendarPrice,\n instantSearchPrice: startingPrice?.amount,\n },\n };\n })\n )\n .subscribe(({ deeplink, instantSearchMonitoring }) => {\n this.store$.dispatch(BookingWidgetActions.setInstantSearchMonitoring({ instantSearchMonitoring }));\n this.router.navigateByUrl(deeplink).finally(() => loading$.next(false));\n })\n );\n }\n\n navigateToMultiCityBookingFlow(loading$: Subject<boolean>): void {\n this._subscription.add(\n this.continueEnabled$\n .pipe(\n take(1),\n filter(Boolean),\n withLatestFrom(this._flightSearchParams$),\n switchMap(([continueToBooking, flightSearchParams]) => {\n loading$.next(true);\n return of({ continueToBooking, flightSearchParams });\n }),\n tap(() => loading$.next(false)),\n filter(({ continueToBooking }) => continueToBooking),\n filter(({ flightSearchParams }) => this.validateFlightSearchParams(flightSearchParams)),\n map(({ flightSearchParams }) => {\n this.bookingWidgetFlightService.setPreviousSearchToLocalStorage(flightSearchParams);\n return {\n deeplink: createDeeplinkPathFromFlightSearchParams({\n ...flightSearchParams,\n locale: this.languageService.langValue,\n }),\n };\n })\n )\n .subscribe(({ deeplink }) => {\n this.router.navigateByUrl(deeplink);\n })\n );\n }\n\n setUsePopoverSelectors(value: boolean): void {\n this.usePopoverSelectorsSignal.set(value);\n }\n\n setLocalOriginalBookingSelection(): void {\n if (!this._originalBookingSelection$.getValue()) {\n this._subscription.add(\n combineLatest([\n this._globalBookingWidgetSelectionChanges$.pipe(startWith({})),\n this.bookingWidgetFlightService.selectedPreviousSearches$.pipe(startWith(undefined)),\n ])\n .pipe(\n distinctUntilChanged(\n ([preChange, preSearch], [nextChange, nextSearch]) =>\n equals(preChange, nextChange) && equals(preSearch, nextSearch)\n ),\n filter(([change, search]) => !isEmptyObjectOrHasEmptyValues(change) || isPresent(search)),\n withLatestFrom(this.store$.pipe(globalBookingSelections())),\n take(1)\n )\n .subscribe(([_, flightSelection]) => {\n this._originalBookingSelection$.next(flightSelection);\n })\n );\n }\n }\n\n resetLocalOriginalBookingSelection(): void {\n this._globalBookingWidgetSelectionChanges$.next({});\n this.bookingWidgetFlightService.resetSelectedPreviousSearch();\n this._originalBookingSelection$.next(undefined);\n }\n\n setGlobalBookingSelectionToOriginal(): void {\n this.store$.dispatch(\n GlobalBookingActions.updateSelection({\n selection: this._originalBookingSelection$.getValue(),\n })\n );\n this.resetLocalOriginalBookingSelection();\n }\n\n setSelectionChangeType(type: SelectionType): void {\n const currentChange = this._globalBookingWidgetSelectionChanges$.getValue();\n if (!currentChange[type]) {\n this._globalBookingWidgetSelectionChanges$.next({\n ...currentChange,\n [type]: true,\n });\n }\n }\n\n private previousSearchChanged(\n previousSearches: PreviousSearch,\n originalBookingSelection: GlobalBookingState\n ): SelectionType[] {\n const selectionChangeType = [];\n if (!equals(previousSearches.paxAmount, originalBookingSelection.paxAmount)) {\n selectionChangeType.push(SelectionType.PAX);\n }\n if (!equals(previousSearches.tripType, originalBookingSelection.tripType)) {\n selectionChangeType.push(SelectionType.TRIP_TYPE);\n }\n if (previousSearches.flights[0].origin.locationCode !== originalBookingSelection.flights[0].origin.locationCode) {\n selectionChangeType.push(SelectionType.ORIGIN);\n }\n if (\n previousSearches.flights[0].destination.locationCode !==\n originalBookingSelection.flights[0].destination.locationCode\n ) {\n selectionChangeType.push(SelectionType.DESTINATION);\n }\n if (\n !equals(\n previousSearches.flights.map(({ departureDate }) => departureDate),\n originalBookingSelection.flights.map(({ departureDate }) => departureDate)\n )\n ) {\n selectionChangeType.push(SelectionType.TRAVEL_DATES);\n }\n return selectionChangeType;\n }\n\n private updatePriceAndCompactStatus(): void {\n this._subscription.add(\n this.bookingWidgetFlightService.locations$\n .pipe(\n map(({ origin, destination }) => isNotBlank(origin?.locationCode) && isNotBlank(destination?.locationCode)),\n distinctUntilChanged()\n )\n .subscribe((hasBothLocations) => {\n if (!hasBothLocations) {\n BookingWidgetActions.resetPrices();\n }\n this._showCompact$.next(!hasBothLocations);\n })\n );\n }\n\n private sendRecommendationsFlightSearchEvent(params: FlightSearchParams): void {\n const { origin, destination } = params.flights[0];\n\n this._subscription.add(\n this.recommendationService\n .sendFlightSearchEvent(\n origin,\n destination,\n params.flights[0].departureDate.toISOString().substring(0, 10),\n params.flights[1]?.departureDate?.toISOString().substring(0, 10),\n // combining adults + c15s was in the initial requirement and logic was the same in the old widget\n params.paxAmount.adults + params.paxAmount.c15s,\n params.paxAmount.children + params.paxAmount.infants\n )\n .subscribe()\n );\n }\n\n private priceParamsAreValid({ locations, travelClass, tripType, paxAmount }: PriceParams): boolean {\n return (\n isPresent(travelClass) &&\n isPresent(tripType) &&\n isPresent(locations?.origin?.locationCode) &&\n isPresent(locations?.destination?.locationCode) &&\n paxAmount?.adults >= 1\n );\n }\n\n private priceBaseParamsChanged(prev: InstantSearchBaseParams, next: InstantSearchBaseParams): boolean {\n return (\n prev.departureLocationCode !== next.departureLocationCode ||\n prev.destinationLocationCode !== next.destinationLocationCode ||\n prev.travelClass !== next.travelClass ||\n prev.oneway !== next.oneway\n );\n }\n\n private mapToPriceRequestBaseParams({\n tripType,\n travelClass,\n locations,\n paxAmount,\n }: PriceParams): InstantSearchBaseParams {\n return {\n departureLocationCode: locations.origin.locationCode,\n destinationLocationCode: locations.destination.locationCode,\n travelClass: travelClass === GlobalBookingTravelClass.MIXED ? undefined : travelClass,\n adults: paxAmount.adults + paxAmount.c15s,\n children: paxAmount.children,\n infants: paxAmount.infants,\n numberOfDays: 360,\n oneway: tripType === TripType.ONEWAY,\n directFlights: false,\n locale: this.languageService.localeValue,\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { map } from 'rxjs/operators';\nimport { Observable } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { combineTemplate } from '@fcom/rx';\nimport { sortBy, uniqueBy } from '@fcom/core/utils';\nimport { SelectOption } from '@fcom/common/interfaces';\n\nexport interface TranslatedCountryCode {\n countryCode: string;\n firstOption: string;\n name: string;\n phonePrefix: string;\n}\n\nconst countryCodeToOption = (cc: TranslatedCountryCode): SelectOption =>\n cc && {\n name: `${cc.name} (+${cc.phonePrefix})`,\n value: `${cc.countryCode}|${cc.phonePrefix}`,\n };\n\nconst matchingCountryCode =\n (countryCode = '') =>\n (cc: TranslatedCountryCode) =>\n countryCode.toLowerCase() === (cc.countryCode || '').toLowerCase();\n\n@Injectable()\nexport class PhonePrefixService {\n SEPARATOR: SelectOption = {\n name: '-------------------',\n value: '-------------------',\n disabled: true,\n };\n DEFAULT: SelectOption;\n\n constructor(private languageService: LanguageService) {}\n\n setupPhonePrefixes(showDefault = true): Observable<SelectOption[]> {\n return combineTemplate({\n countryCodes: this.languageService.translate('countryCodes'),\n defaultOption: this.languageService.translate('selectPhonePrefix'),\n activeCountry: this.languageService.countryCode,\n }).pipe(\n map(\n ({\n countryCodes,\n defaultOption,\n activeCountry,\n }: {\n countryCodes: TranslatedCountryCode[];\n defaultOption: string;\n activeCountry: string;\n }) => {\n this.DEFAULT = {\n name: defaultOption,\n value: null,\n };\n const baseOptions = sortBy(countryCodes.map(countryCodeToOption), (so) => so.name);\n const optionsBasedOnLocations = [countryCodeToOption(countryCodes.find(matchingCountryCode(activeCountry)))]\n .filter(Boolean)\n .filter(uniqueBy((country) => country['value']));\n const options = [...optionsBasedOnLocations, this.SEPARATOR, ...baseOptions];\n return optionsBasedOnLocations.length === 0\n ? baseOptions\n : showDefault\n ? [this.DEFAULT, ...options]\n : options;\n }\n )\n );\n }\n\n getCountryCodeFromPhonePrefix(phonePrefix: number): Observable<string> {\n return this.languageService.translate('countryCodes').pipe(\n map((countryCodes) => {\n return (\n countryCodes.find((countryCode) => countryCode.phonePrefix === phonePrefix?.toString())?.countryCode ?? ''\n );\n })\n );\n }\n}\n","/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove<T>(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","<div class=\"flex\">\n <div>\n <fcom-icon class=\"nordic-blue-900-text icon-medium\" *ngIf=\"icon\" [name]=\"icon\" [category]=\"category\"></fcom-icon>\n </div>\n <div class=\"flex-5 font-body-1 ps-xsmall-x\">\n <ng-content></ng-content>\n </div>\n</div>\n","import { Component, Input } from '@angular/core';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { type IconName } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-section-review-item',\n templateUrl: 'section-review-item.component.html',\n styleUrls: ['section-review-item.component.scss'],\n})\nexport class SectionReviewItemComponent {\n @Input()\n icon: IconName;\n\n @Input()\n category: IconLibrary = IconLibrary.SVG_LIBRARY;\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairEmergencyContactUpdateRequest } from '../models/finnair-emergency-contact-update-request';\n\n\n/**\n * Emergency contact in order\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class EmergencyContactService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation updateEmergencyContactDetails\n */\n static readonly UpdateEmergencyContactDetailsPath = '/api/v2/order/{orderId}/emergency-contact';\n\n /**\n * updateEmergencyContactDetails.\n *\n * Adds/Updates emergency contact details to the order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `updateEmergencyContactDetails()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updateEmergencyContactDetails$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairEmergencyContactUpdateRequest\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<void>> {\n const rb = new DapiRequestBuilder(rootUrl, EmergencyContactService.UpdateEmergencyContactDetailsPath, 'patch');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as DapiHttpResponse<void>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * updateEmergencyContactDetails.\n *\n * Adds/Updates emergency contact details to the order\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `updateEmergencyContactDetails$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updateEmergencyContactDetails(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: FinnairEmergencyContactUpdateRequest\n },\n context?: HttpContext\n\n): Observable<void> {\n return this.updateEmergencyContactDetails$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<void>) => r.body as void)\n );\n }\n\n}\n","import { HttpParams } from '@angular/common/http';\n\nimport { TimeUnit, diff } from '@fcom/core/utils';\n\nimport { AmRoomSelection, AmContinueParams, AmHolidayType } from '../interfaces';\n\nexport const formatAmPaxGroup = (rooms: AmRoomSelection[]): string =>\n rooms.reduce((formatted, room, currentIndex) => {\n if (currentIndex > 0) {\n formatted += '_';\n }\n formatted += `${room.numberOfAdults}A`;\n if (room.childrenAges.length) {\n formatted += `-${room.childrenAges.join('-')}`;\n }\n return formatted;\n }, '');\n\nexport const amDeepLink = (params: AmContinueParams, amDeeplinkUrl: string): string => {\n const urlParams = new HttpParams()\n .set('dep', params.originLocationCode)\n .set('arr', params.destinationLocationCode)\n .set('dd', params.departureDate.toISOString().substring(0, 10))\n .set(\n 'dur',\n params.holidayType === AmHolidayType.AM\n ? params.durationCode\n : `${diff(params.departureDate.toDate(), params.returnDate.toDate(), TimeUnit.day)}`\n )\n .set('g', formatAmPaxGroup(params.rooms))\n .set('flex', !!params.flexible);\n return `${amDeeplinkUrl}?${urlParams.toString()}`;\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable, catchError, map, of, throwError } from 'rxjs';\n\nimport { ConfigService, SentryLogger } from '@fcom/core';\nimport { Location } from '@fcom/core-api';\nimport { finShare } from '@fcom/rx';\n\nimport {\n AmOrigin,\n AmDestination,\n AmDestinationsResponse,\n AmHolidayTypeItem,\n AmLocation,\n AmAvailability,\n} from '../interfaces/am-api.interface';\nimport { formatAmPaxGroup } from '../utils/utils.am';\nimport { AmRoomSelection } from '../interfaces';\n\n@Injectable()\nexport class BookingWidgetAmService {\n constructor(\n private http: HttpClient,\n private configService: ConfigService,\n private sentryLogger: SentryLogger\n ) {}\n\n getOrigins(): Observable<Location[]> {\n return this.amApiQuery<AmOrigin[]>('origins').pipe(\n map((data: AmOrigin[]) => {\n if (!data) {\n throwError(() => 'Empty origins response from AM');\n }\n return data.map(this.mapAmOriginToLocation);\n }),\n catchError((error: unknown) => {\n this.sentryLogger.warn('AM origins request failed', { error });\n return of([]);\n }),\n finShare()\n );\n }\n\n getDestinations(origin: string): Observable<AmLocation[]> {\n return this.amApiQuery<AmDestinationsResponse>(`destinations/${origin}`).pipe(\n map((data: AmDestinationsResponse) => {\n if (!data?.destinations) {\n throwError(() => 'Empty destinations response from AM');\n }\n return data.destinations.map((destination) =>\n this.mapAmDestinationToAmLocation(destination, data.holidayTypes)\n );\n }),\n catchError((error: unknown) => {\n this.sentryLogger.warn('AM destinations request failed', { error });\n return of([]);\n }),\n finShare()\n );\n }\n\n getAvailability(\n originLocationCode: string,\n destinationLocationCode: string,\n rooms: AmRoomSelection[]\n ): Observable<AmAvailability> {\n return this.amApiQuery<AmAvailability>('availability', {\n dep: originLocationCode,\n arr: destinationLocationCode,\n g: formatAmPaxGroup(rooms),\n }).pipe(\n catchError((error: unknown) => {\n this.sentryLogger.warn('AM availability request failed', { error });\n return of({});\n }),\n finShare()\n );\n }\n\n private mapAmOriginToLocation(amOrigin: AmOrigin): Location {\n return {\n title: amOrigin.city,\n country: '',\n countryCode: amOrigin.countryCode,\n cityName: amOrigin.city,\n locationCode: amOrigin.code,\n AJBPartner: false,\n SJBPartner: false,\n airAward: false,\n airPartner: false,\n airAlliance: false,\n type: 'city',\n latitude: 0,\n longitude: 0,\n continentCode: 'eu',\n };\n }\n\n private mapAmDestinationToAmLocation(\n amDestination: AmDestination,\n holidayTypes: {\n [key: string]: AmHolidayTypeItem;\n }\n ): AmLocation {\n return {\n location: {\n title: amDestination.city,\n country: amDestination.country,\n countryCode: amDestination.countryCode,\n cityName: amDestination.city,\n locationCode: amDestination.destinationCode,\n AJBPartner: false,\n SJBPartner: false,\n airAward: false,\n airPartner: false,\n airAlliance: false,\n type: 'city',\n latitude: 0,\n longitude: 0,\n continentCode: '',\n },\n holidayType: amDestination.holidayType,\n holidayTypeItem: holidayTypes[amDestination.holidayType],\n searchable: amDestination.searchable,\n };\n }\n\n private amApiQuery<T>(endpoint: string, params = {}): Observable<T> {\n const apiUrl = this.configService.cfg.amApiUrl;\n return this.http.get<T>(`${apiUrl}/${endpoint}`, { params });\n }\n}\n","import { PaxAmount } from '@fcom/dapi';\n\nexport const mapPaxAmountToPaxBreakdown = (\n { adults, c15s, children, infants }: PaxAmount,\n translations: Record<string, string>\n): string =>\n [\n { key: adults > 1 ? 'adults' : 'adult', amount: adults },\n { key: children + c15s > 1 ? 'children' : 'child', amount: children + c15s },\n { key: infants > 1 ? 'infants' : 'infant', amount: infants },\n ]\n .filter(({ amount }) => amount > 0)\n .map(({ key, amount }) => `${amount} ${translations[key]}`)\n .join(', ');\n","<ng-template #selectedDate let-type=\"type\" let-text=\"text\" let-date=\"date\">\n <div class=\"flex tr-xsmall pr-medium-l\" [attr.data-testid]=\"'matrix-date-' + type\">\n <fcom-icon class=\"icon-medium flex--nogrow ms-xxsmall-r\" [name]=\"type\"></fcom-icon>\n <div class=\"flex flex--column flex--align-start\">\n <span class=\"dn-mobile\">{{ text | finLocalization }}</span>\n <div class=\"medium-type\">{{ date | finDateFormat: 'FULL_NO_YEAR' }}</div>\n </div>\n </div>\n</ng-template>\n\n<fcom-modal\n data-testid=\"aircalendar-modal-overlay\"\n [(open)]=\"airCalendarOpen\"\n [title]=\"'airCalendar.flexibleTravelDates' | finLocalization\"\n [fitToContent]=\"true\"\n [fullHeight]=\"true\"\n [extraWide]=\"true\"\n [buttons]=\"ModalButtons.CUSTOM\"\n (close)=\"closeAirCalendar()\"\n>\n <div class=\"flex flex--center\" *ngIf=\"airCalendarOpen && isAward\">\n <fcom-notification [theme]=\"NotificationTheme.TRANSPARENT\" class=\"block\" [attr.data-testid]=\"'notification-points'\">\n {{ 'award.notifications.totalPointsV2' | finLocalization: { points: totalPoints | finPoints | finEmpty: '-' } }}\n </fcom-notification>\n </div>\n\n <fin-price-matrix\n [calendarList]=\"prices$ | async\"\n [isAward]=\"isAward\"\n (selectedDates)=\"selectCalendarDates($event)\"\n ></fin-price-matrix>\n\n <div\n buttons\n class=\"airCalendarFooter df-tablet-up flex--middle flex--space-between align-left font-body-1\"\n data-testid=\"price-matrix-footer\"\n >\n <div class=\"price-and-date-container flex\">\n <div class=\"flex flex--column flex--align-start starting-price-container\">\n <div data-testid=\"matrix-starting-price\">\n {{ 'priceCalendar.pricesFrom' | finLocalization }}\n <span *ngIf=\"!isAward\" class=\"medium-type\"\n > {{ startingPrice$ | async | finPrice: { roundPrice: true } | finEmpty: '–' }}</span\n >\n <span *ngIf=\"isAward\" class=\"medium-type\"\n > {{\n 'award.points' | finLocalization: { pointsAmount: startingPrice$ | async | finMap: 'amount' | finPoints }\n }}</span\n >\n </div>\n <div data-testid=\"pax-amount-breakdown\">{{ paxAmountBreakdown$ | async }}</div>\n </div>\n <div class=\"dates df-tablet-up flex-1\">\n <ng-container\n [ngTemplateOutlet]=\"selectedDate\"\n [ngTemplateOutletContext]=\"{\n type: 'departure',\n text: 'departure',\n date: (travelDates$ | async)?.departureDate,\n }\"\n ></ng-container>\n <ng-container\n *ngIf=\"(tripType$ | async) !== TripType.ONEWAY\"\n [ngTemplateOutlet]=\"selectedDate\"\n [ngTemplateOutletContext]=\"{ type: 'arrival', text: 'returnDate', date: (travelDates$ | async)?.returnDate }\"\n ></ng-container>\n </div>\n </div>\n <div class=\"align-center\">\n <fcom-button\n class=\"continue-btn\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_CTA_HEATHER\"\n [size]=\"ButtonSize.LARGE\"\n [text]=\"'bookingSearch.search' | finLocalization\"\n [disabled]=\"continueDisabled$ | async\"\n (clickBtn)=\"navigateToBookingFlow()\"\n data-testid=\"aircalendar-continue-button\"\n >\n </fcom-button>\n </div>\n </div>\n</fcom-modal>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport { BehaviorSubject, Observable, Subscription, map, withLatestFrom } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { Amount, PaxAmount } from '@fcom/dapi';\nimport { finShare } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { AirCalendarList } from '@fcom/dapi/api/models';\nimport { LocalDate, isPresent, unsubscribe } from '@fcom/core/utils';\nimport { GlobalBookingTripDates } from '@fcom/common';\nimport { TripType } from '@fcom/core/interfaces';\nimport { ButtonTheme, ButtonSize, ButtonMode, ModalButtons, NotificationTheme } from '@fcom/ui-components';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\n\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\nimport { BookingWidgetActions } from '../../store/';\nimport { mapPaxAmountToPaxBreakdown } from '../../utils/utils.pax-amount';\n\n@Component({\n selector: 'fin-air-calendar',\n templateUrl: 'air-calendar.component.html',\n styleUrls: ['./air-calendar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AirCalendarComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly TripType = TripType;\n readonly ModalButtons = ModalButtons;\n\n @Input()\n paxAmount$: Observable<PaxAmount>;\n\n @Input()\n travelDates$: Observable<GlobalBookingTripDates>;\n\n @Input()\n tripType$: Observable<TripType>;\n\n @Input()\n prices$: Observable<AirCalendarList>;\n\n @Input()\n isAward = false;\n\n @Input()\n totalPoints: number;\n\n @Output()\n selectDates = new EventEmitter<{ departureDate: LocalDate; returnDate: LocalDate }>();\n\n @Output()\n continue = new EventEmitter<string>();\n\n subscription = new Subscription();\n paxAmountBreakdown$: Observable<string>;\n startingPrice$ = new BehaviorSubject<Amount>({ amount: '0', currencyCode: 'EUR' });\n continueDisabled$ = new BehaviorSubject<boolean>(true);\n airCalendarOpen = false;\n readonly NotificationTheme = NotificationTheme;\n\n constructor(\n private languageService: LanguageService,\n private store$: Store<BookingAppState>,\n private bookingWidgetGtmService: BookingWidgetGtmService\n ) {}\n\n ngOnInit(): void {\n this.paxAmountBreakdown$ = this.paxAmount$.pipe(\n withLatestFrom(this.languageService.translate('passenger')),\n map(([paxAmount, passengerTranslations]) => mapPaxAmountToPaxBreakdown(paxAmount, passengerTranslations)),\n finShare()\n );\n\n this.subscription.add(\n this.prices$.subscribe((prices) => {\n this.airCalendarOpen = isPresent(prices);\n if (this.airCalendarOpen) {\n this.bookingWidgetGtmService.pageViewEvent('/price-matrix');\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n selectCalendarDates({ dates, price }: { dates: string[]; price?: Amount }): void {\n const departureDate = new LocalDate(dates[0]);\n const returnDate = dates[1] ? new LocalDate(dates[1]) : undefined;\n\n this.startingPrice$.next(price);\n this.selectDates.emit({ departureDate, returnDate });\n this.bookingWidgetGtmService.trackElementEvent(\n 'price-matrix',\n `DEPARTURE: ${departureDate}, RETURN: ${returnDate}`\n );\n // TODO: This is a really simple solution for enabling/disabling search from the matrix, do we need a better one?s\n this.continueDisabled$.next(false);\n }\n\n navigateToBookingFlow(): void {\n this.continue.emit(this.startingPrice$.getValue().amount);\n }\n\n closeAirCalendar(): void {\n this.store$.dispatch(BookingWidgetActions.setAirCalendarPrices({ prices: undefined }));\n }\n}\n","<div class=\"flex flex--middle flex--nowrap ps-xsmall-y font-body-1\">\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.AM_LOGO\"></fcom-icon>\n <div class=\"ps-small-l\" [innerHTML]=\"'aurinkomatkat.inCooperation' | finLocalization\"></div>\n</div>\n\n<div\n *ngIf=\"showCompact$ | async\"\n class=\"selector-grid compact grid-col-12 no-gutters\"\n data-testid=\"widget-selector-grid\"\n>\n <div class=\"col-1-12\">\n <fin-location-selector\n [locationPair$]=\"locations$\"\n [showPreviousSearches]=\"false\"\n [isAm]=\"true\"\n [amOrigins$]=\"amOrigins$\"\n [amDestinations$]=\"destinations$\"\n [showSeparator]=\"false\"\n (setLocations)=\"updateLocations($event)\"\n ></fin-location-selector>\n </div>\n</div>\n\n<ng-container *ngIf=\"(showCompact$ | async) === false\">\n <div class=\"selector-grid grid-col-12 no-gutters\" data-testid=\"widget-selector-grid\">\n <div class=\"col-1-12\">\n <fin-location-selector\n [locationPair$]=\"locations$\"\n [showPreviousSearches]=\"false\"\n [isAm]=\"true\"\n [amOrigins$]=\"amOrigins$\"\n [amDestinations$]=\"destinations$\"\n [showSeparator]=\"false\"\n (setLocations)=\"updateLocations($event)\"\n ></fin-location-selector>\n </div>\n\n <div class=\"md-col-1-4 col-1-12\">\n <fin-am-room-selector (setRooms)=\"updateRooms($event)\"></fin-am-room-selector>\n </div>\n\n <div class=\"md-col-5-12 col-1-12\">\n <fin-am-dates-selector\n [travelDates$]=\"travelDates$\"\n [amDestination$]=\"selectedAmDestination$\"\n [amAvailability$]=\"availability$\"\n (setTravelDates)=\"setTravelDates($event)\"\n (setDuration)=\"setDuration($event)\"\n ></fin-am-dates-selector>\n </div>\n\n <div class=\"col-1-12\">\n <div class=\"flex flex--end flex--middle ps-medium-t\" data-testid=\"booking-widget-footer\">\n <fcom-button\n class=\"continue-btn\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_CTA_HEATHER\"\n [size]=\"ButtonSize.LARGE\"\n [mode]=\"ButtonMode.FILL\"\n [loading]=\"false\"\n [text]=\"'bookingSearch.search' | finLocalization\"\n [disabled]=\"(selectionIsValid$ | async) === false\"\n (clickBtn)=\"openContinueModal()\"\n data-testid=\"booking-widget-search-button\"\n ></fcom-button>\n </div>\n <fin-booking-widget-notifications [isAm]=\"true\"></fin-booking-widget-notifications>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedAmDestination$ | async as destination\">\n <fcom-modal\n [(open)]=\"continueModalOpen\"\n [title]=\"\n 'aurinkomatkat.continueModal.title' | finLocalization: { holidayType: destination.holidayTypeItem.label }\n \"\n [fitToContent]=\"true\"\n [buttons]=\"ModalButtons.CONTINUE_CANCEL\"\n (confirm)=\"continueToAm()\"\n data-testid=\"am-continue-modal\"\n >\n <div class=\"pr-large\">\n <div class=\"flex flex--middle ps-small-b\">\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.AM_LOGO\"></fcom-icon>\n <div class=\"nordic-blue-900-text font-heading-3 mr-xsmall-l\">\n {{ 'aurinkomatkat.continueModal.contentTitle' | finLocalization }}\n </div>\n </div>\n <div class=\"font-body-1\">\n {{ 'aurinkomatkat.continueModal.content' | finLocalization }}\n </div>\n </div>\n </fcom-modal>\n </ng-container>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport {\n BehaviorSubject,\n Observable,\n Subscription,\n combineLatest,\n distinctUntilChanged,\n filter,\n map,\n of,\n switchMap,\n take,\n} from 'rxjs';\n\nimport { ButtonMode, ButtonSize, ButtonTheme, ModalButtons } from '@fcom/ui-components';\nimport { isPresent, unsubscribe } from '@fcom/core/utils';\nimport { LocationPair } from '@fcom/common/store';\nimport { Location } from '@fcom/core-api';\nimport {\n ElementActions,\n ElementTypes,\n GaContext,\n GlobalBookingTripDates,\n GtmClickOutboundLinkClass,\n} from '@fcom/common';\nimport { finShare } from '@fcom/rx';\nimport { ConfigService, WindowRef, NativeBridgeService } from '@fcom/core';\nimport { GtmService } from '@fcom/common/gtm';\n\nimport { AmRoomSelection, LocationParam } from '../../interfaces';\nimport { BookingWidgetAmService } from '../../services/booking-widget-am.service';\nimport {\n AmLocation,\n AmHolidayType,\n AmAvailability,\n AmHolidayTypeDuration,\n AmContinueParams,\n} from '../../interfaces/am-api.interface';\nimport { amDeepLink } from '../../utils/utils.am';\n\n@Component({\n selector: 'fin-am-booking-widget',\n templateUrl: './am-booking-widget.component.html',\n styleUrls: ['./am-booking-widget.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AmBookingWidgetComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly ModalButtons = ModalButtons;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Output()\n setLocations = new EventEmitter<LocationPair>();\n\n locations$ = new BehaviorSubject<LocationPair>({});\n amOrigins$: Observable<Location[]>;\n destinationCache: { [originLocationCode: string]: AmLocation[] } = {};\n selectedRooms$ = new BehaviorSubject<AmRoomSelection[]>([]);\n travelDates$ = new BehaviorSubject<GlobalBookingTripDates>({ departureDate: undefined });\n amDestinations$ = new BehaviorSubject<AmLocation[]>([]);\n destinations$: Observable<Location[]>;\n selectedAmDestination$: Observable<AmLocation>;\n availability$: Observable<AmAvailability>;\n subscription = new Subscription();\n continueModalOpen = false;\n selectionIsValid$: Observable<boolean> = of(false);\n duration$ = new BehaviorSubject<AmHolidayTypeDuration>(undefined);\n continueParams$: Observable<AmContinueParams>;\n showCompact$: Observable<boolean>;\n\n constructor(\n private amService: BookingWidgetAmService,\n private configService: ConfigService,\n private windowRef: WindowRef,\n private nativeBridgeService: NativeBridgeService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.amOrigins$ = this.amService.getOrigins();\n\n this.selectedAmDestination$ = combineLatest([this.locations$, this.amDestinations$]).pipe(\n map(([locations, amDestinations]) =>\n amDestinations.find((destination) => destination.location.locationCode === locations.destination?.locationCode)\n ),\n filter(Boolean)\n );\n\n this.subscription.add(\n this.amService\n .getDestinations('HEL')\n .pipe(take(1))\n .subscribe((destinations) => {\n this.amDestinations$.next(destinations);\n this.destinationCache['HEL'] = destinations;\n })\n );\n\n this.destinations$ = this.amDestinations$.pipe(\n map((amDestinations) => amDestinations.map((amDestination) => amDestination.location))\n );\n\n this.subscription.add(\n this.amOrigins$\n .pipe(\n take(1),\n map((origins) => ({\n origin: origins.find((origin) => origin.locationCode === 'HEL'),\n }))\n )\n .subscribe((locationPair) => {\n this.locations$.next(locationPair);\n })\n );\n\n this.availability$ = combineLatest([this.locations$, this.selectedRooms$]).pipe(\n filter(\n ([locations, selectedRooms]) =>\n isPresent(locations.destination?.locationCode) &&\n isPresent(locations.origin?.locationCode) &&\n selectedRooms.length > 0\n ),\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next)),\n switchMap(([locations, selectedRooms]) =>\n this.amService\n .getAvailability(locations.origin.locationCode, locations.destination.locationCode, selectedRooms)\n .pipe(take(1))\n ),\n finShare()\n );\n\n this.continueParams$ = combineLatest([\n this.locations$,\n this.selectedRooms$,\n this.travelDates$,\n this.duration$,\n this.selectedAmDestination$,\n ]).pipe(\n map(([locations, rooms, travelDates, duration, selectedDestination]) => ({\n originLocationCode: locations.origin?.locationCode,\n destinationLocationCode: locations.destination?.locationCode,\n departureDate: travelDates.departureDate,\n returnDate: travelDates.returnDate,\n durationCode: duration?.code,\n rooms,\n flexible: false,\n holidayType: selectedDestination.holidayType,\n })),\n finShare()\n );\n\n this.selectionIsValid$ = this.continueParams$.pipe(map((params) => this.validateSelection(params)));\n\n this.showCompact$ = this.locations$.pipe(map((locations) => !isPresent(locations.destination)));\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n updateRooms(selectedRooms: AmRoomSelection[]): void {\n this.selectedRooms$.next(selectedRooms);\n }\n\n updateLocations({ locations }: LocationParam): void {\n this.travelDates$.next({ departureDate: undefined });\n if (this.destinationCache[locations.origin.locationCode]) {\n this.amDestinations$.next(this.destinationCache[locations.origin.locationCode]);\n const filteredLocations = this.filterInvalidDestination(\n locations,\n this.destinationCache[locations.origin.locationCode]\n );\n this.locations$.next(filteredLocations);\n this.setLocations.emit(filteredLocations);\n } else {\n this.subscription.add(\n this.amService\n .getDestinations(locations.origin.locationCode)\n .pipe(take(1))\n .subscribe((destinations) => {\n this.amDestinations$.next(destinations);\n this.destinationCache[locations.origin.locationCode] = destinations;\n const filteredLocations = this.filterInvalidDestination(locations, destinations);\n this.locations$.next(filteredLocations);\n this.setLocations.emit(filteredLocations);\n })\n );\n }\n }\n\n setTravelDates(dates: GlobalBookingTripDates): void {\n this.travelDates$.next(dates);\n }\n\n openContinueModal(): void {\n this.continueModalOpen = true;\n\n this.subscription.add(\n this.locations$.pipe(take(1)).subscribe((locations) => {\n this.gtmService.trackElement(\n `tile-${locations.destination?.cityName?.toLowerCase().replace(/ /g, '_')}-flight-hotel`,\n GaContext.BOOKING_FLOW,\n ElementTypes.BOOKING_WIDGET,\n undefined,\n ElementActions.CLICK\n );\n })\n );\n }\n\n setDuration(duration: AmHolidayTypeDuration): void {\n this.duration$.next(duration);\n }\n\n continueToAm(): void {\n this.subscription.add(\n this.continueParams$.pipe(take(1)).subscribe((continueParams) => {\n const deepLink = amDeepLink(continueParams, this.configService.cfg.amDeeplinkUrl);\n\n this.gtmService.clickOutboundEvent({\n link_url: deepLink,\n link_classes: GtmClickOutboundLinkClass.BOOKING_WIDGET,\n outbound: true,\n });\n\n // App webview doesn't allow opening in new tab\n if (this.nativeBridgeService.isInsideNativeWebView) {\n this.windowRef.nativeWindow.location.href = deepLink;\n } else {\n this.windowRef.nativeWindow.open(deepLink, '_blank');\n }\n })\n );\n }\n\n validateSelection({\n originLocationCode,\n destinationLocationCode,\n rooms,\n departureDate,\n returnDate,\n durationCode,\n holidayType,\n }: AmContinueParams): boolean {\n if (holidayType === AmHolidayType.AM) {\n return Boolean(originLocationCode && destinationLocationCode && departureDate && durationCode && rooms.length);\n }\n\n return Boolean(originLocationCode && destinationLocationCode && departureDate && returnDate && rooms.length);\n }\n\n private filterInvalidDestination(locations: LocationPair, availableDestinations: AmLocation[]): LocationPair {\n return {\n origin: locations.origin,\n destination: availableDestinations.some(\n (amLocation) => amLocation.location.locationCode === locations.destination?.locationCode\n )\n ? locations.destination\n : undefined,\n };\n }\n}\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\n\nimport { CustomIcon, IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, filter, switchMap } from 'rxjs';\n\nimport { IconPosition, NotificationLayout } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ConfigService } from '@fcom/core';\nimport { GtmService } from '@fcom/common/gtm';\nimport {\n ElementActions,\n ElementTypes,\n GaContext,\n getCarTrawlerLang,\n ThirdPartyAncillariesProvider,\n} from '@fcom/common';\n\nconst DEFAULT_CARTRAWLER_NOTIFICATION = 'fragments.bookingWidgetCarTrawlerDefault.url';\nconst ENGLISH_CARTRAWLER_NOTIFICATION = 'fragments.bookingWidgetCarTrawlerToEnglish.url';\n\n@Component({\n selector: 'fin-cartrawler-booking-widget',\n templateUrl: './cartrawler-booking-widget.component.html',\n styleUrls: ['./cartrawler-booking-widget.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CarTrawlerBookingWidgetComponent implements OnInit {\n readonly CustomIcon = CustomIcon;\n readonly IconLibrary = IconLibrary;\n readonly IconPosition = IconPosition;\n readonly NotificationLayout = NotificationLayout;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n carTrawlerUrlRedirect: string;\n carTrawlerLocale: string;\n\n currentLanguage$: Observable<string>;\n translatedContentUrl$: Observable<string>;\n\n constructor(\n private languageService: LanguageService,\n private configService: ConfigService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.currentLanguage$ = this.languageService.langKey;\n this.carTrawlerLocale = getCarTrawlerLang(\n ThirdPartyAncillariesProvider.CAR_TRAWLER_RENTAL,\n this.languageService.langValue\n );\n\n this.translatedContentUrl$ = this.currentLanguage$.pipe(\n switchMap((currentLang) => this.getTranslatedUrl(currentLang)),\n filter(Boolean)\n );\n\n this.gtmService.trackElement(\n 'booking-widget-tab-button_cartrawler-rental',\n GaContext.THIRD_PARTY_ANCILLARY,\n ElementTypes.TAB,\n 'company: cartrawler',\n ElementActions.VIEW\n );\n }\n\n getTranslatedUrl(currentLang: string): Observable<string> {\n let fragmentUrlKey = DEFAULT_CARTRAWLER_NOTIFICATION;\n\n const { apiUrl, clientId } = this.configService.cfg.carRental;\n\n fragmentUrlKey =\n currentLang === this.carTrawlerLocale ? DEFAULT_CARTRAWLER_NOTIFICATION : ENGLISH_CARTRAWLER_NOTIFICATION;\n\n this.carTrawlerUrlRedirect = `${apiUrl}/${this.carTrawlerLocale}/home?clientId=${clientId}`;\n\n return this.languageService.translate(fragmentUrlKey);\n }\n\n trackClick(): void {\n this.gtmService.trackElement(\n 'booking-widget-tab-button_cartrawler-rental',\n GaContext.THIRD_PARTY_ANCILLARY,\n ElementTypes.LINK,\n 'company: cartrawler',\n ElementActions.CLICK\n );\n }\n}\n","<div class=\"ms-xlarge-b\">\n <cms-unstyled-fragment [contentUrl$]=\"translatedContentUrl$\" [showIcon]=\"true\" class=\"block\"></cms-unstyled-fragment>\n</div>\n<div class=\"flex flex--middle flex--space-between flex--nowrap font-body-1 ms-medium-b\">\n <div class=\"flex flex--wrap\">\n <div class=\"ps-xxsmall-r\" [innerHTML]=\"'bookingWidgetTabs.carTrawler.poweredBy' | finLocalization\"></div>\n <fcom-icon class=\"cartrawler-logo\" [category]=\"IconLibrary.CUSTOM\" [name]=\"CustomIcon.CARTRAWLER_LOGO\"></fcom-icon>\n </div>\n <fcom-button\n [text]=\"'bookingWidgetTabs.carTrawler.ctaText' | finLocalization\"\n [icon]=\"{ name: SvgLibraryIcon.EXTERNAL_TAB, position: IconPosition.RIGHT }\"\n [href]=\"carTrawlerUrlRedirect\"\n [openInNewTab]=\"true\"\n [externalLink]=\"true\"\n (click)=\"trackClick()\"\n ></fcom-button>\n</div>\n\n<fcom-notification [layout]=\"NotificationLayout.BLOCK\" [iconName]=\"SvgLibraryIcon.AVIOS_PLECTRUM\">\n <p class=\"medium-type\">\n {{ 'bookingWidget.carTrawler.aviosNotification' | finLocalization }}\n </p>\n</fcom-notification>\n","<fin-booking-widget-selector\n class=\"flex flex-1\"\n [label]=\"'aurinkomatkat.duration' | finLocalization\"\n [disabled]=\"disabled\"\n [position]=\"'left'\"\n (click)=\"openModal()\"\n data-testid=\"am-duration-selector\"\n>\n <div class=\"flex flex--middle\">\n <span *ngIf=\"!selectedDuration\">{{ 'aurinkomatkat.selectDuration' | finLocalization }}</span>\n <span *ngIf=\"selectedDuration\">{{ selectedDuration.label }}</span>\n </div>\n</fin-booking-widget-selector>\n\n<fcom-modal\n [(open)]=\"modalOpen\"\n [title]=\"'aurinkomatkat.selectDuration' | finLocalization\"\n [fitToContent]=\"true\"\n data-testid=\"am-duration-selector-modal\"\n>\n <ul class=\"flex flex--column pr-large-x nordic-blue-900-text\" tabindex=\"-1\">\n <li\n class=\"flex flex--column\"\n *ngFor=\"let duration of durationOptions; let last = last\"\n [ngClass]=\"{ 'border-bottom': !last }\"\n >\n <button\n [attr.data-testid]=\"'duration-option-' + duration.code\"\n class=\"flex flex--space-between fill ps-medium-y\"\n role=\"option\"\n (click)=\"onDurationSelect(duration)\"\n >\n <span class=\"font-body-1\">{{ duration.label }}</span>\n <span *ngIf=\"selectedDuration?.code === duration.code\" class=\"inline-block ms-xsmall-r\">\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CHECKMARK\"></fcom-icon>\n </span>\n </button>\n </li>\n </ul>\n</fcom-modal>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { AmHolidayTypeDuration } from '../../interfaces/am-api.interface';\n\n@Component({\n selector: 'fin-am-duration-selector',\n templateUrl: './am-duration-selector.component.html',\n styleUrls: ['./am-duration-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AmDurationSelectorComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n disabled = false;\n\n @Input()\n selectedDuration: AmHolidayTypeDuration;\n\n @Input()\n durationOptions: AmHolidayTypeDuration[];\n\n @Output()\n setDuration = new EventEmitter<AmHolidayTypeDuration>();\n\n modalOpen = false;\n\n openModal(): void {\n this.modalOpen = true;\n }\n\n onDurationSelect(duration: AmHolidayTypeDuration): void {\n this.setDuration.emit(duration);\n this.modalOpen = false;\n }\n}\n","<fin-booking-widget-selector\n class=\"flex flex-1\"\n [label]=\"'passengers' | finLocalization\"\n [disabled]=\"disabled\"\n (click)=\"openModal()\"\n data-testid=\"am-room-selector\"\n>\n <div class=\"flex flex--middle\">\n <fcom-icon\n class=\"icon-small\"\n [name]=\"\n paxAmountTotals.total.adults + paxAmountTotals.total.children > 1\n ? SvgLibraryIcon.MULTI_PAX\n : SvgLibraryIcon.SINGLE_PAX\n \"\n >\n </fcom-icon>\n <span>\n {{ paxAmountTotals.total.adults }}\n {{ 'passenger.' + (paxAmountTotals.total.adults > 1 ? 'adults' : 'adult') | finLocalization }}\n </span>\n <span *ngIf=\"paxAmountTotals.total.children > 0\"\n >, {{ paxAmountTotals.total.children }}\n {{ 'passenger.' + (paxAmountTotals.total.children > 1 ? 'children' : 'child') | finLocalization }}</span\n >\n </div>\n</fin-booking-widget-selector>\n\n<fcom-modal\n [(open)]=\"modalOpen\"\n (close)=\"emitSelectedRooms()\"\n [title]=\"'passengers' | finLocalization\"\n [fitToContent]=\"true\"\n data-testid=\"am-room-selector-modal\"\n>\n <ul id=\"rooms\" class=\"flex flex--column pr-large-x\" tabindex=\"-1\">\n <li *ngFor=\"let selectedRoom of selectedRooms; let i = index\" [id]=\"'room-' + i\" class=\"block border-bottom\">\n <div class=\"ms-large-t nordic-blue-900-text font-body-1 bold-type\">\n {{ 'aurinkomatkat.paxAmount.room' | finLocalization }} {{ i + 1 }}\n </div>\n <div class=\"flex flex--space-between flex--center ps-xsmall-y fill border-bottom\">\n <div class=\"font-body-1 capitalize\">\n {{\n 'bookingWidget.passenger.adults' + (selectedRoom.adults <= 1 ? '.singular' : '.plural') | finLocalization\n }}\n </div>\n <fin-plus-minus-selector\n class=\"fill nordic-blue-900-text\"\n [min]=\"PAX_AMOUNT_CONFIG.adults.minPerRoom\"\n [max]=\"\n paxAmountTotals.remaining.adults + selectedRoom.adults > PAX_AMOUNT_CONFIG.adults.maxPerRoom\n ? PAX_AMOUNT_CONFIG.adults.maxPerRoom\n : paxAmountTotals.remaining.adults + selectedRoom.adults\n \"\n [model]=\"selectedRoom.adults\"\n [decreaseLabel]=\"'passengerLabels.removeAdult' | finLocalization\"\n [increaseLabel]=\"'passengerLabels.addAdult' | finLocalization\"\n [title]=\"selectedRoom.adults.toString()\"\n [iconSize]=\"'icon-large'\"\n [textSize]=\"'font-heading-3'\"\n [buttonPadding]=\"false\"\n (increment)=\"onPaxDetailsUpdate('adults', AmountUpdateType.INCREMENT, i)\"\n (decrement)=\"onPaxDetailsUpdate('adults', AmountUpdateType.DECREMENT, i)\"\n >\n </fin-plus-minus-selector>\n </div>\n <div class=\"flex flex--space-between flex--center ps-xsmall-y fill\">\n <div class=\"font-body-1\">\n <div class=\"capitalize\">\n {{\n 'bookingWidget.passenger.children' + (selectedRoom.children <= 1 ? '.singular' : '.plural')\n | finLocalization\n }}\n {{ 'aurinkomatkat.paxAmount.childAgeRange' | finLocalization }}\n </div>\n <div>\n {{ 'aurinkomatkat.paxAmount.childAgeRule' | finLocalization }}\n </div>\n </div>\n <fin-plus-minus-selector\n class=\"fill nordic-blue-900-text\"\n [min]=\"0\"\n [max]=\"\n paxAmountTotals.remaining.children + selectedRoom.children > PAX_AMOUNT_CONFIG.children.maxPerRoom\n ? PAX_AMOUNT_CONFIG.children.maxPerRoom\n : paxAmountTotals.remaining.children + selectedRoom.children\n \"\n [model]=\"selectedRoom.children\"\n [decreaseLabel]=\"'passengerLabels.removeAmChild' | finLocalization\"\n [increaseLabel]=\"'passengerLabels.addAmChild' | finLocalization\"\n [title]=\"selectedRoom.children.toString()\"\n [iconSize]=\"'icon-large'\"\n [textSize]=\"'font-heading-3'\"\n [buttonPadding]=\"false\"\n (increment)=\"onPaxDetailsUpdate('children', AmountUpdateType.INCREMENT, i)\"\n (decrement)=\"onPaxDetailsUpdate('children', AmountUpdateType.DECREMENT, i)\"\n >\n </fin-plus-minus-selector>\n </div>\n <form [formGroup]=\"selectedRoom.childrenForm\">\n <ul class=\"flex flex--column\">\n <li\n class=\"flex flex--column\"\n *ngFor=\"let control of selectedRoom.childrenForm.controls | keyvalue; let i = index\"\n >\n <fin-select-input\n class=\"block ms-small-b\"\n [controlName]=\"control.key\"\n [parentForm]=\"selectedRoom.childrenForm\"\n [required]=\"true\"\n [options]=\"\n (selectedRoom.children > selectedRoom.adults && i + 1 > selectedRoom.adults\n ? childAgeOptionsWithoutInfants$\n : childAgeOptions$\n ) | async\n \"\n [displayMargin]=\"false\"\n [disableSelectOption]=\"true\"\n [label]=\"('passenger.child' | finLocalization | titlecase) + ' ' + (i + 1)\"\n (change)=\"updatePaxAmountTotals()\"\n >\n </fin-select-input>\n </li>\n </ul>\n </form>\n <div class=\"ms-large-y\" *ngIf=\"i > 0\">\n <fcom-button\n (clickBtn)=\"removeRoom(i)\"\n [aria]=\"{ controls: 'room' + i }\"\n [icon]=\"{\n name: SvgLibraryIcon.MINUS_OUTLINE,\n position: IconPosition.LEFT,\n }\"\n [text]=\"'aurinkomatkat.paxAmount.removeRoom' | finLocalization: { roomNumber: i + 1 }\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n ></fcom-button>\n </div>\n </li>\n </ul>\n\n <div\n class=\"pr-large-x mr-small-y\"\n *ngIf=\"PAX_AMOUNT_CONFIG.maxTotalRooms > selectedRooms.length && paxAmountTotals.remaining.adults > 0\"\n >\n <fcom-button\n (clickBtn)=\"addRoom()\"\n [aria]=\"{ controls: 'rooms' }\"\n [icon]=\"{ name: SvgLibraryIcon.PLUS, position: IconPosition.LEFT }\"\n [text]=\"'aurinkomatkat.paxAmount.addRoom' | finLocalization\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n ></fcom-button>\n </div>\n</fcom-modal>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, OnInit } from '@angular/core';\nimport { UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, map } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { BasePaxAmount } from '@fcom/dapi';\nimport { SelectOption } from '@fcom/common';\nimport { ButtonTheme, IconPosition } from '@fcom/ui-components';\n\nimport { AmountUpdateType, AmRoomSelection } from '../../interfaces';\n\n// copied from the old widget...\nconst PAX_AMOUNT_CONFIG = {\n adults: {\n maxPerRoom: 9,\n minPerRoom: 1,\n maxTotal: 9,\n },\n children: {\n maxPerRoom: 5,\n minPerRoom: 0,\n maxTotal: 6,\n },\n maxTotalPax: 9,\n maxTotalRooms: 3,\n};\n\ninterface AmRoom {\n adults: number;\n children: number;\n childrenForm: UntypedFormGroup;\n}\n\ninterface AmPaxAmountTotals {\n total: {\n adults: number;\n children: number;\n };\n remaining: {\n adults: number;\n children: number;\n };\n}\n\n@Component({\n selector: 'fin-am-room-selector',\n templateUrl: './am-room-selector.component.html',\n styleUrls: ['./am-room-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AmRoomSelectorComponent implements OnInit {\n readonly AmountUpdateType = AmountUpdateType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly ButtonTheme = ButtonTheme;\n readonly IconPosition = IconPosition;\n\n @Input()\n disabled = false;\n\n @Output()\n setRooms = new EventEmitter<AmRoomSelection[]>();\n\n modalOpen = false;\n PAX_AMOUNT_CONFIG = PAX_AMOUNT_CONFIG;\n childAgeOptions$: Observable<SelectOption[]>;\n childAgeOptionsWithoutInfants$: Observable<SelectOption[]>;\n paxAmountTotals: AmPaxAmountTotals;\n selectedRooms: AmRoom[] = [];\n\n constructor(\n private languageService: LanguageService,\n private fb: UntypedFormBuilder\n ) {}\n\n ngOnInit(): void {\n this.selectedRooms = [\n {\n adults: 1,\n children: 0,\n childrenForm: this.fb.group({}),\n },\n ];\n\n this.childAgeOptions$ = this.languageService\n .translateMultiple(['aurinkomatkat.paxAmount.year', 'aurinkomatkat.paxAmount.years'])\n .pipe(\n map(([year, years]) =>\n [...Array(18).keys()].map((y) => ({ name: `${y} ${y === 1 ? year : years}`, value: y.toString() }))\n )\n );\n\n this.childAgeOptionsWithoutInfants$ = this.childAgeOptions$.pipe(map((options) => options.slice(2)));\n\n this.updatePaxAmountTotals();\n this.emitSelectedRooms();\n }\n\n openModal(): void {\n this.modalOpen = true;\n }\n\n addRoom(): void {\n this.selectedRooms.push({\n adults: 1,\n children: 0,\n childrenForm: this.fb.group({}),\n });\n\n this.updatePaxAmountTotals();\n }\n\n removeRoom(roomIndex: number) {\n this.selectedRooms = [...this.selectedRooms.slice(0, roomIndex), ...this.selectedRooms.slice(roomIndex + 1)];\n\n this.updatePaxAmountTotals();\n }\n\n onPaxDetailsUpdate(type: keyof BasePaxAmount, updateType: AmountUpdateType, roomIndex: number): void {\n this.selectedRooms[roomIndex][type] =\n this.selectedRooms[roomIndex][type] + (updateType === AmountUpdateType.INCREMENT ? +1 : -1);\n\n if (type === 'children') {\n if (updateType === AmountUpdateType.INCREMENT) {\n this.selectedRooms[roomIndex].childrenForm.addControl(\n `room-${roomIndex}-child-${this.selectedRooms[roomIndex].children}`,\n this.fb.control(this.selectedRooms[roomIndex].children > this.selectedRooms[roomIndex].adults ? '2' : '0')\n );\n } else {\n this.selectedRooms[roomIndex].childrenForm.removeControl(\n `room-${roomIndex}-child-${this.selectedRooms[roomIndex].children + 1}`\n );\n }\n }\n\n this.updatePaxAmountTotals();\n }\n\n updatePaxAmountTotals(): void {\n this.paxAmountTotals = this.calculateTotalAndRemainingAmPaxAmount(this.selectedRooms);\n }\n\n emitSelectedRooms(): void {\n this.setRooms.emit(\n this.selectedRooms.map((room) => ({\n numberOfAdults: room.adults,\n childrenAges: Object.values(room.childrenForm.controls).map((control) => control.value),\n }))\n );\n }\n\n calculateTotalAndRemainingAmPaxAmount = (rooms: AmRoom[]): AmPaxAmountTotals => {\n const initial = {\n total: { adults: 0, children: 0 },\n remaining: { adults: PAX_AMOUNT_CONFIG.adults.maxTotal, children: PAX_AMOUNT_CONFIG.children.maxTotal },\n };\n\n return (\n rooms?.reduce((current, { adults, children }) => {\n const total = {\n adults: current.total.adults + adults,\n children: current.total.children + children,\n };\n const remainingTotal = PAX_AMOUNT_CONFIG.maxTotalPax - (total.adults + total.children);\n const remainingAdults = current.remaining.adults - adults;\n const remainingChildren = current.remaining.children - children;\n const remaining = {\n adults: remainingAdults <= remainingTotal ? remainingAdults : remainingTotal,\n children: remainingChildren <= remainingTotal ? remainingChildren : remainingTotal,\n };\n\n return {\n total,\n remaining,\n };\n }, initial) ?? initial\n );\n };\n}\n","@if (usePopover) {\n <button\n type=\"button\"\n [class]=\"\n 'common-selector fill grow ps-small link-hover align-left border-hover-2 nordic-blue-600-border-hover rounded-large white-bg ' +\n (position ? 'position-' + position : '')\n \"\n [class.filled]=\"filled\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n fcomPopover\n [content]=\"popoverContent\"\n [options]=\"popoverOptions\"\n (popoverClosed)=\"handlePopoverClose()\"\n data-testid=\"booking-widget-selector-popover\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n} @else {\n <button\n type=\"button\"\n [class]=\"\n 'common-selector fill grow ps-small link-hover align-left border-hover-2 nordic-blue-600-border-hover rounded-large white-bg ' +\n (position ? 'position-' + position : '')\n \"\n [class.filled]=\"filled\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n data-testid=\"booking-widget-selector-modal\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n}\n\n<ng-template #content>\n <ng-container *ngIf=\"!double\">\n <div class=\"flex flex--column flex--left-center\">\n <ng-container *ngTemplateOutlet=\"selectorTemplate; context: { label, placeholder, filled }\"></ng-container>\n <div class=\"medium-type font-body-1 nordic-blue-900-text\">\n <ng-content></ng-content>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"double\">\n <div class=\"flex flex--row double\">\n <div class=\"flex-1 flex flex--column flex--basis-half\">\n <ng-container *ngTemplateOutlet=\"selectorTemplate; context: double.first\"></ng-container>\n <div class=\"medium-type font-body-1 nordic-blue-900-text\">\n <ng-content select=\"[first]\"></ng-content>\n </div>\n </div>\n <ng-content select=\"[separator]\"></ng-content>\n <div class=\"flex-1 flex flex--column flex--basis-half second-half\">\n <ng-container *ngTemplateOutlet=\"selectorTemplate; context: double.second\"></ng-container>\n <div class=\"medium-type font-body-1 nordic-blue-900-text\">\n <ng-content select=\"[second]\"></ng-content>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #selectorTemplate let-label=\"label\" let-placeholder=\"placeholder\" let-filled=\"filled\">\n <span class=\"regular-type font-body-1 blue-600-text flex-1\" data-testid=\"common-selector-label\">{{ label }}</span>\n <span *ngIf=\"!filled\" class=\"regular-type font-body-1 grey-600-text flex-1\" data-testid=\"common-selector-placeholder\">\n {{ placeholder }}\n </span>\n</ng-template>\n","import { Component, ElementRef, Input, Output, OnInit, TemplateRef, EventEmitter } from '@angular/core';\n\nimport { PopoverOptions } from '@fcom/ui-components';\n\nimport { BookingWidgetService } from '../../services/booking-widget.service';\n\ntype Position = 'left' | 'right';\n\ninterface DoubleParams {\n readonly label: string;\n readonly placeholder: string;\n readonly filled: boolean;\n}\n\n@Component({\n selector: 'fin-booking-widget-selector',\n templateUrl: 'booking-widget-selector.component.html',\n styleUrls: ['./booking-widget-selector.component.scss'],\n})\nexport class BookingWidgetSelectorComponent implements OnInit {\n @Input()\n disabled = false;\n\n @Input()\n label?: string;\n\n @Input()\n ariaLabel?: string;\n\n @Input()\n double?: {\n first: DoubleParams;\n second: DoubleParams;\n };\n\n @Input()\n position?: Position;\n\n @Input()\n filled?: boolean;\n\n @Input()\n placeholder?: string;\n\n @Input()\n popoverOptions: PopoverOptions;\n\n @Input()\n popoverContent: TemplateRef<ElementRef>;\n\n @Output()\n close = new EventEmitter<void>();\n\n usePopover: boolean;\n\n constructor(private bookingWidgetService: BookingWidgetService) {}\n\n ngOnInit(): void {\n this.usePopover = Boolean(\n this.bookingWidgetService.usePopoverSelectors() && this.popoverContent && this.popoverOptions\n );\n }\n\n handlePopoverClose(): void {\n this.close.emit();\n }\n}\n","<fin-booking-widget-selector\n class=\"flex flex-1 grow\"\n [label]=\"(usePopoverSelectors ? 'bookingSummary.paxAmount' : 'passengersAndClass.label') | finLocalization\"\n [disabled]=\"disabled\"\n (click)=\"openModal()\"\n (close)=\"onClose()\"\n data-testid=\"pax-amount-travel-class-selector\"\n [popoverContent]=\"popoverContent\"\n [popoverOptions]=\"popoverOptions\"\n>\n <div class=\"flex flex--middle\">\n <fcom-icon\n class=\"icon-small\"\n [name]=\"(totalPax$ | async) > 1 ? SvgLibraryIcon.MULTI_PAX : SvgLibraryIcon.SINGLE_PAX\"\n ></fcom-icon>\n <span class=\"overflow-hidden truncate\" data-testid=\"pax-amount-travel-class-text\">\n @if (usePopoverSelectors) {\n {{ paxAmountBreakdown$ | async }}\n } @else {\n {{ totalPax$ | async }},\n {{\n 'travelClass.' +\n ((travelClass$ | async) === GlobalBookingTravelClass.MIXED\n ? 'mixedCombined'\n : (travelClass$ | async | lowercase)) | finLocalization\n }}\n }\n </span>\n </div>\n</fin-booking-widget-selector>\n\n<ng-template #popoverContent>\n <div class=\"scroll rounded-large\">\n <header class=\"popover-header fill relative border-bottom flex--column ps-medium\">\n <div class=\"flex--nogrow flex--basis-header flex flex--row flex--center\">\n <h2\n class=\"font-heading-4 flex-1 truncate overflow-hidden nordic-blue-900-text\"\n [attr.id]=\"'popover-' + popoverOptions.popoverID + '-title'\"\n >\n {{ 'bookingSummary.paxAmount' | finLocalization }}\n </h2>\n <button\n class=\"close-button flex--nogrow flex--self-stretch btn--no-outline focus-inset\"\n [attr.title]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n (click)=\"enableNewSearchAutomatically ? cancelSelection() : closePopover()\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n </header>\n <ng-container *ngTemplateOutlet=\"paxAmount; context: { displayTravelClass: false, popover: true }\"></ng-container>\n <footer class=\"popover-footer nordic-blue-25-bg ps-medium flex flex--end\">\n @if (enableNewSearchAutomatically) {\n <fcom-button\n data-testid=\"cancel-button\"\n class=\"ms-small-r\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [text]=\"'actions.cancel' | finLocalization\"\n [aria]=\"{ label: 'actions.cancel' | finLocalization, role: 'button' }\"\n (clickBtn)=\"cancelSelection()\"\n ></fcom-button>\n\n <fcom-button\n data-testid=\"booking-search-button\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'bookingSearch.search' | finLocalization\"\n [aria]=\"{ label: 'bookingSearch.search' | finLocalization, role: 'button' }\"\n (clickBtn)=\"startNewSearch()\"\n [disabled]=\"!isSearchEnabled\"\n ></fcom-button>\n } @else {\n <fcom-button\n data-testid=\"done-button\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'actions.done' | finLocalization\"\n [aria]=\"{ label: 'actions.done' | finLocalization, role: 'button' }\"\n (clickBtn)=\"closePopover()\"\n ></fcom-button>\n }\n </footer>\n </div>\n</ng-template>\n\n<fcom-modal\n *ngIf=\"modalOpen\"\n [(open)]=\"modalOpen\"\n [title]=\"'passengersAndClass.label' | finLocalization\"\n [fitToContent]=\"true\"\n data-testid=\"pax-amount-travel-class-modal\"\n>\n <ng-container *ngTemplateOutlet=\"paxAmount; context: { displayTravelClass: true, popover: false }\"></ng-container>\n</fcom-modal>\n\n<ng-template #paxAmount let-displayTravelClass=\"displayTravelClass\" let-popover=\"popover\">\n <div>\n <ul\n id=\"pax-details\"\n class=\"flex flex--column\"\n tabindex=\"-1\"\n [ngClass]=\"{\n 'pr-large-x': !popover,\n 'ps-medium-x': popover,\n }\"\n >\n <li\n *ngFor=\"let paxItem of paxAmount$ | async | keyvalue\"\n class=\"flex flex--space-between flex--center fill ps-xsmall-y\"\n [attr.data-testid]=\"'pax-amount-' + paxItem.key\"\n >\n <div>\n <div class=\"font-body-1 capitalize\">\n {{\n 'bookingWidget.passenger.' + paxItem.key + (paxItem.value <= 1 ? '.singular' : '.plural')\n | finLocalization\n }}\n {{ 'bookingWidget.passenger.' + paxItem.key + '.ageDefinition' | finLocalization }}\n </div>\n <div class=\"font-body-2 nordic-blue-900-text\">\n {{ 'bookingWidget.passenger.' + paxItem.key + '.ageRuleDefinition' | finLocalization }}\n </div>\n </div>\n <fin-plus-minus-selector\n *ngIf=\"paxAmountConfig$ | async as paxAmountConfig\"\n class=\"fill nordic-blue-900-text\"\n [min]=\"paxAmountConfig[paxItem.key].min\"\n [max]=\"paxAmountConfig[paxItem.key].max\"\n [model]=\"paxItem.value\"\n [decreaseLabel]=\"'passengerLabels.removeAdult' | finLocalization\"\n [increaseLabel]=\"'passengerLabels.addAdult' | finLocalization\"\n [title]=\"paxItem.value.toString()\"\n [iconSize]=\"'icon-large'\"\n [textSize]=\"'font-heading-3'\"\n [buttonPadding]=\"false\"\n [controls]=\"paxItem.key + '-total-' + paxItem.value\"\n (increment)=\"onPaxDetailsUpdate($event, paxItem.key, AmountUpdateType.INCREMENT)\"\n (decrement)=\"onPaxDetailsUpdate($event, paxItem.key, AmountUpdateType.DECREMENT)\"\n >\n </fin-plus-minus-selector>\n </li>\n <fcom-link\n data-testid=\"child-only-booking-info\"\n class=\"external-link bold-type pr-xsmall-y\"\n [href]=\"'bookingSearch.passenger.childOnly.link.url' | finLocalization\"\n [external]=\"true\"\n [openInNewTab]=\"true\"\n [icon]=\"{ name: SvgLibraryIcon.EXTERNAL_TAB, position: IconPosition.RIGHT }\"\n >{{ 'bookingSearch.passenger.childOnly.linkText' | finLocalization }}\n </fcom-link>\n </ul>\n\n <ul *ngIf=\"displayTravelClass\" id=\"to-travel-class\" role=\"radiogroup\" class=\"flex flex--column ps-xsmall-y\">\n <li\n *ngFor=\"let tClass of availableTravelClasses$ | async; let first = first; let last = last\"\n [attr.id]=\"'to-travel-class-' + tClass\"\n class=\"flex flex--middle flex--space-between focus-inset link-hover pr-large-x\"\n [class.border-top]=\"first\"\n [class.border-bottom]=\"!last\"\n (click)=\"onTravelClassSelect(tClass)\"\n >\n <input\n type=\"radio\"\n class=\"is-vishidden\"\n name=\"travelClass\"\n [id]=\"'travelClass-' + tClass\"\n [value]=\"tClass\"\n [checked]=\"(travelClass$ | async) === tClass\"\n [tabindex]=\"(travelClass$ | async) === tClass ? 0 : -1\"\n />\n <label\n [for]=\"'travelClass-' + tClass\"\n class=\"fill font-body-1 ps-medium-y focus-inset link-hover nordic-blue-900-text\"\n >\n {{\n 'travelClass.' + (tClass === GlobalBookingTravelClass.MIXED ? 'mixedCombined' : (tClass | lowercase))\n | finLocalization\n }}\n </label>\n\n <fcom-icon\n *ngIf=\"(travelClass$ | async) === tClass\"\n class=\"icon-medium nordic-blue-900-text\"\n [name]=\"SvgLibraryIcon.CHECKMARK\"\n ></fcom-icon>\n </li>\n </ul>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, map, Observable, Subscription, take } from 'rxjs';\n\nimport { PaxAmount } from '@fcom/dapi';\nimport { finShare } from '@fcom/rx';\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { ButtonTheme, IconPosition, PopoverOptions, PopoverService } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { AmountUpdateType, PaxAmountTypeConfig, PaxUpdateEvent } from '../../interfaces';\nimport { defaultWidgetPopoverOptions } from '../../constants';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { mapPaxAmountToPaxBreakdown } from '../../utils/utils.pax-amount';\nimport { BookingWidgetTripService } from '../../services/booking-widget-trip.service';\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\n\nconst MAX_PAX_AMOUNT = 9;\nconst MIN_LEAD_PAX_AMOUNT = 1;\n\n@Component({\n selector: 'fin-pax-amount-selector',\n templateUrl: './pax-amount-selector.component.html',\n styleUrls: ['./pax-amount-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PaxAmountSelectorComponent implements OnInit {\n protected readonly ButtonTheme = ButtonTheme;\n protected readonly SvgLibraryIcon = SvgLibraryIcon;\n\n private subscriptions = new Subscription();\n\n @Input()\n isSearchEnabled = false;\n\n @Input()\n disabled = false;\n\n @Output()\n setTravelClass = new EventEmitter<GlobalBookingTravelClass>();\n\n @Output()\n setPaxAmount = new EventEmitter<PaxUpdateEvent>();\n\n @Input()\n enableNewSearchAutomatically = false;\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n readonly travelClass$: Observable<GlobalBookingTravelClass>;\n readonly availableTravelClasses$: Observable<GlobalBookingTravelClass[]>;\n readonly GlobalBookingTravelClass = GlobalBookingTravelClass;\n readonly paxAmount$: Observable<PaxAmount>;\n readonly AmountUpdateType = AmountUpdateType;\n readonly IconPosition = IconPosition;\n\n readonly popoverOptions: PopoverOptions = {\n ...defaultWidgetPopoverOptions,\n popoverID: 'paxAmountSelectorPopover',\n disableAutoFocus: true,\n };\n\n modalOpen = false;\n totalPax$: Observable<number>;\n paxAmountConfig$: Observable<PaxAmountTypeConfig>;\n paxAmountBreakdown$: Observable<string>;\n\n readonly usePopoverSelectors = this.bookingWidgetService.usePopoverSelectors();\n\n constructor(\n private popoverService: PopoverService,\n private bookingWidgetService: BookingWidgetService,\n private languageService: LanguageService,\n private bookingWidgetTripService: BookingWidgetTripService,\n private bookingWidgetGtmService: BookingWidgetGtmService\n ) {\n this.travelClass$ = this.bookingWidgetTripService.selectedTravelClass$;\n this.availableTravelClasses$ = this.bookingWidgetTripService.availableTravelClasses$;\n this.paxAmount$ = this.bookingWidgetTripService.paxAmount$;\n }\n\n ngOnInit(): void {\n this.totalPax$ = this.paxAmount$.pipe(\n map((paxAmount: PaxAmount) => Object.values(paxAmount).reduce((acc, val) => acc + val, 0))\n );\n\n this.paxAmountBreakdown$ = combineLatest([this.paxAmount$, this.languageService.translate('passenger')]).pipe(\n map(([paxAmount, passengerTranslations]) => mapPaxAmountToPaxBreakdown(paxAmount, passengerTranslations))\n );\n\n this.paxAmountConfig$ = this.paxAmount$.pipe(\n map((paxAmount: PaxAmount) => ({\n adults: {\n min: MIN_LEAD_PAX_AMOUNT,\n max: MAX_PAX_AMOUNT - paxAmount.c15s - paxAmount.children,\n },\n c15s: {\n min: 0,\n max: MAX_PAX_AMOUNT - paxAmount.adults - paxAmount.children,\n },\n children: {\n min: 0,\n max: MAX_PAX_AMOUNT - paxAmount.adults - paxAmount.c15s,\n },\n infants: { min: 0, max: paxAmount.adults },\n })),\n finShare()\n );\n }\n\n openModal(): void {\n if (!this.usePopoverSelectors) {\n this.modalOpen = true;\n }\n }\n\n onTravelClassSelect(selectedTravelClass: GlobalBookingTravelClass): void {\n this.bookingWidgetTripService.setTravelClass(selectedTravelClass);\n }\n\n onPaxDetailsUpdate(amount: number, type: string, updateType: AmountUpdateType): void {\n this.setPaxAmount.emit({ paxType: type as keyof PaxAmount, amount, updateType });\n }\n\n closePopover(): void {\n this.popoverService.close();\n }\n\n cancelSelection(): void {\n this.subscriptions.add(\n this.bookingWidgetService.currentSearch$.pipe(take(1)).subscribe((originalSelection) => {\n this.bookingWidgetService.setPaxAmount(originalSelection.paxAmount);\n this.closePopover();\n this.bookingWidgetGtmService.trackElementEvent('global-widget-cancel-search-from-pax-amount');\n })\n );\n }\n\n onClose(): void {\n if (this.enableNewSearchAutomatically) {\n this.cancelSelection();\n this.bookingWidgetGtmService.trackElementEvent('global-widget-cancel-search-from-pax-amount');\n }\n }\n\n startNewSearch(): void {\n this.startSearch.emit();\n this.bookingWidgetGtmService.trackElementEvent('global-widget-start-new-search-from-pax-amount');\n }\n}\n","<fin-booking-widget-selector\n [label]=\"'travelType.label' | finLocalization\"\n [disabled]=\"disabled\"\n (click)=\"openModal()\"\n (close)=\"onClose()\"\n data-testid=\"trip-type-selector\"\n [popoverContent]=\"popoverContent\"\n [popoverOptions]=\"popoverOptions\"\n>\n <div class=\"flex flex--space-between\">\n <span class=\"flex--self-left\" data-testid=\"selected-trip-type\">{{\n 'travelType.' + CmsTripTypeMap[currentTripType$ | async] | finLocalization\n }}</span>\n <button\n *ngIf=\"isBrowser && (currentTripType$ | async) === TripType.MULTICITY\"\n type=\"button\"\n fcomPopover\n [content]=\"multicityHelpContent\"\n [options]=\"{ enableStopPropagation: true }\"\n [ariaCloseText]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.info' | finLocalization\"\n class=\"icon nordic-blue-900-text ms-xxsmall-l\"\n data-testid=\"trip-type-multicity-tooltip\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.HELP_BLOCK\"></fcom-icon>\n </button>\n </div>\n</fin-booking-widget-selector>\n\n<ng-template #multicityHelpContent>\n <p class=\"regular-type\">\n {{ (enableMultiCity ? 'multiCity.flightSelection.tooltipDescription' : 'multiCity.description') | finLocalization }}\n </p>\n <a\n class=\"block medium-type font-body-1 mr-xsmall-t underline link-hover nordic-blue-900-text\"\n [finLink]=\"\n (enableMultiCity ? 'bookingSearch.multiCityNewNotificationLinkUrl.url' : 'multiCity.url.url') | finLocalization\n \"\n [external]=\"true\"\n [openInNewTab]=\"true\"\n [attr.rel]=\"'noreferrer'\"\n [attr.aria-describedby]=\"'faq-link'\"\n [attr.aria-label]=\"'faq'\"\n >\n {{ 'multiCity.linkText' | finLocalization }}\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.EXTERNAL_TAB\"></fcom-icon>\n </a>\n</ng-template>\n\n<ng-template #popoverContent>\n <div class=\"scroll rounded-large\">\n <header class=\"popover-header fill relative border-bottom flex--column ps-medium\">\n <div class=\"flex--nogrow flex--basis-header flex flex--row flex--center\">\n <h2\n class=\"font-heading-4 flex-1 truncate overflow-hidden nordic-blue-900-text\"\n [attr.id]=\"'popover-' + popoverOptions.popoverID + '-title'\"\n >\n {{ 'travelType.label' | finLocalization }}\n </h2>\n <button\n class=\"close-button flex--nogrow flex--self-stretch btn--no-outline focus-inset\"\n [attr.title]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n (click)=\"closePopover()\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n </header>\n <div class=\"ps-medium\">\n <fcom-radio-item-group\n [options]=\"tripTypeOptions$ | async\"\n [parentForm]=\"popOverFormGroup\"\n [controlName]=\"FORM_CONTROL_NAME\"\n [titleText]=\"false\"\n [errorText]=\"false\"\n finFocus\n [autofocus]=\"true\"\n >\n </fcom-radio-item-group>\n </div>\n <footer class=\"popover-footer nordic-blue-25-bg ps-medium flex flex--end\">\n @if (isGlobalBookingWidget) {\n <fcom-button\n data-testid=\"trip-type-selector-cancel\"\n class=\"ms-small-r\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [text]=\"'actions.cancel' | finLocalization\"\n [aria]=\"{ label: 'actions.cancel' | finLocalization, role: 'button' }\"\n (clickBtn)=\"cancelSelection()\"\n ></fcom-button>\n\n @if (returnDateMissing && (currentTripType$ | async) === TripType.RETURN) {\n <fcom-button\n data-testid=\"trip-type-selector-add-return\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'uiLabels.addReturn' | finLocalization\"\n [aria]=\"{ label: 'uiLabels.addReturn' | finLocalization, role: 'button' }\"\n (clickBtn)=\"onAddReturnDate()\"\n ></fcom-button>\n } @else {\n <fcom-button\n data-testid=\"trip-type-selector-search\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'bookingSearch.search' | finLocalization\"\n [aria]=\"{ label: 'bookingSearch.search' | finLocalization, role: 'button' }\"\n (clickBtn)=\"startNewSearch()\"\n [disabled]=\"!isSearchEnabled\"\n ></fcom-button>\n }\n } @else {\n <fcom-button\n data-testid=\"trip-type-selector-done\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [text]=\"'actions.done' | finLocalization\"\n [aria]=\"{ label: 'actions.done' | finLocalization, role: 'button' }\"\n (clickBtn)=\"closePopover()\"\n ></fcom-button>\n }\n </footer>\n </div>\n</ng-template>\n\n<fcom-modal\n [(open)]=\"modalOpen\"\n [title]=\"'travelType.label' | finLocalization\"\n [fitToContent]=\"true\"\n [focusTarget]=\"selectedElement\"\n data-testid=\"trip-type-modal\"\n (close)=\"confirmOnClose()\"\n>\n <div class=\"pr-large-x\">\n <ul id=\"to-trip-type\" role=\"radiogroup\" class=\"flex flex--column ps-xxsmall-y\">\n <li\n *ngFor=\"let tripType of availableTripTypes$ | async; let last = last; let i = index\"\n [attr.id]=\"'to-trip-type-' + tripType\"\n class=\"flex flex--middle flex--space-between focus-inset link-hover trip-type\"\n [class.border-bottom]=\"!last\"\n >\n <input\n #tripTypeRadioBtn\n type=\"radio\"\n class=\"is-vishidden\"\n (keyup)=\"handleKeyPress(tripType, $event)\"\n [attr.id]=\"'tripType-' + tripType\"\n name=\"tripType\"\n [value]=\"tripType\"\n [checked]=\"(currentTripType$ | async) === tripType\"\n [tabindex]=\"(currentTripType$ | async) === tripType ? 0 : -1\"\n />\n <label\n [for]=\"'tripType-' + tripType\"\n class=\"fill font-body-1 ps-medium-y link-hover nordic-blue-900-text\"\n (click)=\"selectTripType(tripType)\"\n data-testid=\"trip-type-label\"\n >\n <span>{{ 'travelType.' + CmsTripTypeMap[tripType] | finLocalization }}</span>\n @if (tripType === TripType.MULTICITY && showNewMultiCityTag) {\n <fcom-tag class=\"ms-medium-l\">\n {{ 'bookingSearch.multiCityNewTag' | finLocalization }}\n </fcom-tag>\n }\n </label>\n\n <fcom-icon\n *ngIf=\"(currentTripType$ | async) === tripType\"\n [name]=\"SvgLibraryIcon.CHECKMARK\"\n class=\"icon-medium nordic-blue-900-text\"\n ></fcom-icon>\n </li>\n </ul>\n </div>\n</fcom-modal>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport {\n BehaviorSubject,\n combineLatest,\n filter,\n Observable,\n Subscription,\n take,\n withLatestFrom,\n map,\n distinctUntilChanged,\n} from 'rxjs';\n\nimport { TripType } from '@fcom/core/interfaces';\nimport { stopPropagation } from '@fcom/core/utils';\nimport { CmsTripTypeMap } from '@fcom/core/utils/tripType.utils';\nimport { ButtonTheme, RadioButtonTheme, PopoverOptions, PopoverService } from '@fcom/ui-components';\nimport { ConfigService, SentryLogger } from '@fcom/core';\n\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { BookingWidgetTripService } from '../../services/booking-widget-trip.service';\nimport { defaultWidgetPopoverOptions } from '../../constants';\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\n\n@Component({\n selector: 'fin-trip-type-selector',\n styleUrls: ['./trip-type-selector.component.scss'],\n templateUrl: './trip-type-selector.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TripTypeSelectorComponent implements OnInit, AfterViewInit, OnDestroy {\n @Input()\n disabled = false;\n\n @Input()\n returnDateMissing = false;\n\n @Input()\n isSearchEnabled = false;\n\n @Input()\n isGlobalBookingWidget = false;\n\n @Input()\n enableMultiCity = false;\n\n @Output()\n setTripType = new EventEmitter<TripType>();\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n @Output()\n openCalendar = new EventEmitter<void>();\n\n readonly selectedTripType$: Observable<TripType>;\n readonly availableTripTypes$: Observable<TripType[]>;\n readonly FORM_CONTROL_NAME = 'tripType';\n readonly RadioButtonTheme = RadioButtonTheme;\n readonly ButtonTheme = ButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TripType = TripType;\n readonly CmsTripTypeMap = CmsTripTypeMap;\n readonly popoverOptions: PopoverOptions = {\n ...defaultWidgetPopoverOptions,\n popoverID: 'tripTypeSelectorPopover',\n alignToLeft: true,\n disableAutoFocus: true,\n };\n addingReturnDate = false;\n\n onAddReturnDate(): void {\n this.addingReturnDate = true;\n this.openCalendar.emit();\n this.closePopover();\n }\n\n modalOpen = false;\n selectedElement: ElementRef = null;\n currentTripType$ = new BehaviorSubject<TripType>(TripType.RETURN);\n selectedTripTypeIndex$ = new BehaviorSubject<number>(0);\n subscription = new Subscription();\n showNewMultiCityTag: boolean;\n popOverFormGroup: FormGroup = new FormGroup({\n [this.FORM_CONTROL_NAME]: new FormControl(),\n });\n tripTypeOptions$: Observable<{ value: TripType; label: string }[]>;\n isBrowser = false;\n\n @ViewChildren('tripTypeRadioBtn', { read: ElementRef }) tripTypeRadioBtn: QueryList<ElementRef>;\n\n constructor(\n private popoverService: PopoverService,\n private bookingWidgetService: BookingWidgetService,\n private bookingWidgetTripService: BookingWidgetTripService,\n private configService: ConfigService,\n private sentryLogger: SentryLogger,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n this.selectedTripType$ = this.bookingWidgetTripService.selectedTripType$;\n this.availableTripTypes$ = this.bookingWidgetTripService.availableTripTypes$.pipe(\n map((tripTypes) => (this.isGlobalBookingWidget ? tripTypes.filter((t) => t !== TripType.MULTICITY) : tripTypes))\n );\n }\n\n ngOnInit(): void {\n /**\n * This check is used to only render the multi-city help content popover on the client. The\n * reason is currently unknown but we get an angular hydration error if you try to remove it.\n */\n this.isBrowser = isPlatformBrowser(this.platform);\n\n this.tripTypeOptions$ = this.availableTripTypes$.pipe(\n map((tripTypes) =>\n tripTypes\n .filter((tripType) => {\n if (!CmsTripTypeMap[tripType]) {\n this.sentryLogger.warn('TripType is not defined in CmsTripTypeMap', { tripType });\n }\n return !!CmsTripTypeMap[tripType];\n })\n .map((tripType) => ({\n value: tripType,\n label: `travelType.${CmsTripTypeMap[tripType]}`,\n }))\n )\n );\n\n this.subscription.add(\n this.selectedTripType$\n .pipe(withLatestFrom(this.availableTripTypes$))\n .subscribe(([tripType, availableTripTypes]) => {\n const selectedIndex = availableTripTypes.findIndex((t) => t === tripType);\n this.selectedTripTypeIndex$.next(selectedIndex);\n this.currentTripType$.next(availableTripTypes[selectedIndex]);\n })\n );\n\n if (this.bookingWidgetService.usePopoverSelectors()) {\n this.subscription.add(\n this.selectedTripType$.subscribe((tripType) => {\n this.popOverFormGroup.controls[this.FORM_CONTROL_NAME].setValue(tripType);\n })\n );\n this.subscription.add(\n this.popOverFormGroup\n .get(this.FORM_CONTROL_NAME)\n .valueChanges.pipe(distinctUntilChanged())\n .subscribe((value) => {\n this.setTripType.emit(value);\n })\n );\n }\n\n this.showNewMultiCityTag = this.configService.cfg.enableMultiCity;\n }\n\n ngAfterViewInit(): void {\n this.subscription.add(\n this.selectedTripTypeIndex$\n .pipe(withLatestFrom(this.availableTripTypes$))\n .subscribe(([index, availableTripTypes]) => {\n this.currentTripType$.next(availableTripTypes[index]);\n this.tripTypeRadioBtn.get(index)?.nativeElement?.focus();\n })\n );\n }\n\n handleKeyPress(selectedTripType: TripType, event: KeyboardEvent): void {\n stopPropagation(event);\n const currentIndex = this.selectedTripTypeIndex$.getValue();\n const maxIndex = this.tripTypeRadioBtn.length - 1;\n\n switch (event.key) {\n case 'Down':\n case 'ArrowDown':\n case 'Right':\n case 'ArrowRight':\n this.selectedTripTypeIndex$.next(currentIndex + 1 > maxIndex ? 0 : currentIndex + 1);\n break;\n case 'Up':\n case 'ArrowUp':\n case 'Left':\n case 'ArrowLeft':\n this.selectedTripTypeIndex$.next(currentIndex - 1 < 0 ? maxIndex : currentIndex - 1);\n break;\n case 'Enter':\n case ' ':\n this.selectTripType(selectedTripType);\n break;\n default:\n break;\n }\n }\n\n openModal(): void {\n if (this.bookingWidgetService.usePopoverSelectors()) {\n return;\n }\n\n this.modalOpen = true;\n }\n\n cancelSelection(): void {\n this.subscription.add(\n this.bookingWidgetService.currentSearch$.pipe(take(1)).subscribe((originalSelection) => {\n this.bookingWidgetService.setTripType(originalSelection.tripType);\n this.bookingWidgetService.setTravelDates(\n {\n departureDate: originalSelection.flights[0]?.departureDate,\n returnDate: originalSelection.flights[1]?.departureDate,\n },\n 0\n );\n this.popoverService.close(true);\n this.bookingWidgetGtmService.trackElementEvent('global-widget-cancel-search-from-trip-type');\n })\n );\n }\n\n selectTripType(selectedTripType: TripType): void {\n this.modalOpen = false;\n this.setTripType.emit(selectedTripType);\n }\n\n closePopover(): void {\n this.popoverService.close(true);\n }\n\n onClose(): void {\n if (this.isGlobalBookingWidget) {\n if (!this.addingReturnDate) {\n this.cancelSelection();\n }\n this.addingReturnDate = false;\n }\n }\n\n startNewSearch(): void {\n this.startSearch.emit();\n this.bookingWidgetGtmService.trackElementEvent('global-widget-start-new-search-from-trip-type');\n }\n\n //TODO: check if this function is needed\n confirmOnClose(): void {\n this.subscription.add(\n combineLatest([this.selectedTripType$, this.currentTripType$])\n .pipe(\n filter(([selected, current]) => selected !== current),\n take(1)\n )\n .subscribe(([_selected, current]) => {\n this.setTripType.emit(current);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n this.subscription = null;\n }\n}\n","<div class=\"location-selector flex relative fill grow\">\n <fin-booking-widget-selector\n class=\"flex--basis-half location-button\"\n [label]=\"'bookingSearch.from.title' | finLocalization\"\n [disabled]=\"originDisabled || disabled\"\n [position]=\"'left'\"\n [filled]=\"!!(locationPair$ | async)?.origin\"\n [placeholder]=\"'bookingSearch.boundSelection.originPlaceholder' | finLocalization\"\n [attr.data-testid]=\"'location-selector-origin'\"\n [popoverContent]=\"popoverContent\"\n [popoverOptions]=\"originPopoverOptions\"\n (click)=\"handleOpen('origin')\"\n (close)=\"handleClose()\"\n data-testid=\"location-selector-origin\"\n >\n <ng-container\n *ngTemplateOutlet=\"locationInfo; context: { location: (locationPair$ | async)?.origin }\"\n ></ng-container>\n </fin-booking-widget-selector>\n\n <ng-container *ngIf=\"showSeparator\">\n <fcom-icon-button\n class=\"flex flex--center flex--self-center absolute location-switch\"\n [icon]=\"{ name: SvgLibraryIcon.SWITCH_FLIGHTS }\"\n [theme]=\"IconButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [size]=\"IconButtonSize.MEDIUM\"\n [aria]=\"{ label: 'bookingSearch.aria.fromToSwitch' | finLocalization }\"\n (clickBtn)=\"locationsSwitched.emit()\"\n data-testid=\"switch-locations\"\n >\n </fcom-icon-button>\n </ng-container>\n\n <fin-booking-widget-selector\n class=\"flex--basis-half location-button\"\n [label]=\"'bookingSearch.to.title' | finLocalization\"\n [disabled]=\"destinationDisabled || disabled\"\n [position]=\"'right'\"\n [filled]=\"!!(locationPair$ | async)?.destination\"\n [placeholder]=\"'bookingSearch.boundSelection.destinationPlaceholder' | finLocalization\"\n [attr.data-testid]=\"'location-selector-destination'\"\n [popoverContent]=\"popoverContent\"\n [popoverOptions]=\"destinationPopoverOptions\"\n (click)=\"handleOpen('destination')\"\n (close)=\"handleClose()\"\n data-testid=\"location-selector-destination\"\n >\n <ng-container\n *ngTemplateOutlet=\"locationInfo; context: { location: (locationPair$ | async)?.destination }\"\n ></ng-container>\n </fin-booking-widget-selector>\n</div>\n\n<ng-template #popoverContent>\n <div class=\"scroll rounded-large\" *ngIf=\"locationType$ | async as locationType\">\n <header class=\"popover-header fill relative flex--column ps-medium-y ps-medium-x\">\n <div class=\"flex--nogrow flex--basis-header flex flex--row flex--center\">\n <h2\n class=\"font-heading-4 flex-1 truncate overflow-hidden nordic-blue-900-text\"\n [attr.id]=\"'popover-' + originPopoverOptions.popoverID + '-title'\"\n >\n {{ 'bookingSearch.' + (locationType === 'origin' ? 'from' : 'to') + '.title' | finLocalization }}\n </h2>\n <button\n class=\"close-button flex--nogrow flex--self-stretch btn--no-outline focus-inset\"\n [attr.title]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n (click)=\"closePopover()\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n </header>\n <ng-container *ngTemplateOutlet=\"locations; context: { locationType: locationType, popover: true }\"></ng-container>\n </div>\n</ng-template>\n\n<fcom-modal\n *ngIf=\"modalOpen\"\n [(open)]=\"modalOpen\"\n [title]=\"'bookingSearch.' + ((locationType$ | async) === 'origin' ? 'from' : 'to') + '.title' | finLocalization\"\n [fitToContent]=\"false\"\n [buttons]=\"null\"\n (close)=\"handleClose()\"\n data-testid=\"location-modal\"\n>\n <ng-container\n *ngTemplateOutlet=\"locations; context: { locationType: (locationType$ | async), popover: false }\"\n ></ng-container>\n</fcom-modal>\n\n<ng-template #locations let-locationType=\"locationType\" let-popover=\"popover\">\n <div>\n <div\n class=\"search-form flex\"\n [ngClass]=\"{\n 'flex--middle pr-large-x ps-small-y': !popover,\n 'flex--column ps-medium-x': popover,\n }\"\n >\n <fcom-text-input\n class=\"flex-1\"\n [id]=\"'locationSearch-input'\"\n [parentForm]=\"locationSearchForm\"\n [translationPrefix]=\"'bookingWidget.destinationSearch.' + (locationType === 'origin' ? 'from' : 'to')\"\n [controlName]=\"'locationSearch'\"\n [required]=\"false\"\n [placeHolder]=\"'bookingSearch.' + (locationType === 'origin' ? 'from' : 'to') + '.inputPlaceholder'\"\n [displayMargin]=\"false\"\n [ariaOptions]=\"{ describedby: 'location-search-info' }\"\n [disableAutoComplete]=\"true\"\n (keydown.enter)=\"moveFocusToResults($event)\"\n #searchInput\n data-testid=\"search-input\"\n finFocus\n [autofocus]=\"true\"\n ></fcom-text-input>\n\n <div *ngIf=\"showLocateMe && locationType === 'origin'\" class=\"locate-me flex flex--end mr-xxsmall-l\">\n <fcom-button\n *ngIf=\"locationType === 'origin'\"\n (clickBtn)=\"getUserLocation()\"\n [text]=\"'bookingSearch.locateMe' | finLocalization\"\n [icon]=\"{\n name: SvgLibraryIcon.GPS_LOCATION,\n position: IconPosition.RIGHT,\n }\"\n [mode]=\"ButtonMode.INLINE\"\n [theme]=\"ButtonTheme.LIGHT_TERTIARY_GHOST\"\n [loading]=\"isGeoLocating$ | async\"\n [aria]=\"{ loadingLabel: 'actions.loading' | finLocalization }\"\n data-testid=\"locateMe\"\n >\n </fcom-button>\n </div>\n\n <p id=\"location-search-info\" class=\"is-vishidden\">\n {{ 'bookingSearch.a11y.locationSearchDescription.' + locationType | finLocalization }}\n </p>\n </div>\n\n <fin-previous-searches\n *ngIf=\"showPreviousSearches && (enablePersonalization$ | async) === true && (queryString$ | async)?.length === 0\"\n (closeLocationModal)=\"handleClose()\"\n (focusOnSearchInput)=\"moveFocusToSearchInput()\"\n (startSearch)=\"startSearch.emit()\"\n [isGlobalBookingWidget]=\"isGlobalBookingWidget\"\n ></fin-previous-searches>\n\n <div\n class=\"grey-50-bg rounded-small ps-medium-y\"\n [ngClass]=\"{\n 'pr-large-x': !popover,\n 'ps-medium-x': popover,\n }\"\n *ngIf=\"hasLocations$ | async\"\n data-testid=\"location-list-header\"\n >\n <h3\n class=\"font-body-1 nordic-blue-900-text\"\n [attr.id]=\"locationType + '-list-title'\"\n [tabIndex]=\"-1\"\n #locationListHeading\n >\n <span data-testid=\"location-list-title\">\n {{\n (queryString$ | async)?.length > 0 || isAm\n ? ((locationType === 'origin' ? 'bookingSearch.from.header' : 'bookingSearch.to.headerNoFrom')\n | finLocalization)\n : ((locationType === 'origin' ? 'bookingSearch.from.nearestAiport' : 'trendingDestinations')\n | finLocalization)\n }}\n </span>\n\n <span *ngIf=\"(queryString$ | async)?.length > 0\" class=\"is-vishidden\" data-testid=\"location-list-results-found\">\n  {{\n 'bookingSearch.a11y.found.' + (locationType === 'origin' ? 'locations' : 'destinations')\n | finLocalization: [(locationResults$ | async)?.length]\n }}</span\n >\n </h3>\n </div>\n\n <ng-container *ngIf=\"(isLoading$ | async) === false\">\n <ul\n class=\"flex flex--column\"\n tabindex=\"-1\"\n role=\"listbox\"\n [attr.id]=\"'to-location-' + locationType\"\n [attr.aria-labelledby]=\"locationType + '-list-title'\"\n [attr.aria-activedescendant]=\"'to-location-' + locationType + '-' + (this.activeIndex$ | async)\"\n >\n <li\n *ngFor=\"\n let location of (queryString$ | async)?.length > 0\n ? (locationResults$ | async)\n : (defaultLocations$ | async) as locations;\n let i = index;\n let first = first;\n let last = last\n \"\n class=\"flex flex--middle flex--space-between focus-inset link-hover\"\n [ngClass]=\"{\n 'pr-large-x': !popover,\n 'ps-medium-x': popover,\n }\"\n [class.border-bottom]=\"!last\"\n [class.nordic-blue-50-bg]=\"i === (this.activeIndex$ | async)\"\n [class.nordic-blue-50-border]=\"i === (this.activeIndex$ | async)\"\n [attr.id]=\"'to-location-' + locationType + '-' + i\"\n role=\"none presentation\"\n >\n <button\n class=\"flex flex--space-between flex--middle fill ps-medium-y\"\n [tabindex]=\"\n ((this.activeIndex$ | async) === undefined && first) || (this.activeIndex$ | async) === i ? 0 : -1\n \"\n [attr.aria-selected]=\"i === (this.activeIndex$ | async)\"\n role=\"option\"\n (click)=\"setLocationOrStartNewSearch(location, locationType)\"\n (keydown)=\"handleKeyDown($event, locations)\"\n (focus)=\"handleInitialLocationItemFocus(i)\"\n #locationItem\n data-testid=\"location-item\"\n >\n <div class=\"flex--column\">\n <div class=\"font-body-1 capitalize location-title\">\n <ng-container *ngTemplateOutlet=\"locationInfo; context: { location: location }\"></ng-container>\n </div>\n <div class=\"font-body-2 ps-xxsmall-y nordic-blue-900-text align-left\">\n <i class=\"flag--small flag-{{ location.countryCode }}\"></i> {{ location.title }}\n </div>\n </div>\n <div *ngIf=\"!location.transportType?.includes(TransportType.Flight)\">\n <fcom-icon\n *ngIf=\"location.transportType?.includes(TransportType.Train)\"\n class=\"icon-medium\"\n [name]=\"SvgLibraryIcon.TRAIN\"\n ></fcom-icon>\n <fcom-icon\n *ngIf=\"location.transportType?.includes(TransportType.Bus)\"\n class=\"icon-medium\"\n [name]=\"SvgLibraryIcon.BUS\"\n ></fcom-icon>\n </div>\n </button>\n </li>\n </ul>\n </ng-container>\n\n <div role=\"status\" aria-live=\"assertive\" [tabIndex]=\"-1\">\n <p\n *ngIf=\"\n (queryString$ | async)?.length > 0 &&\n (isLoading$ | async) === false &&\n (locationResults$ | async)?.length === 0\n \"\n class=\"pr-large-x pr-medium-y\"\n >\n {{ 'bookingSearch.a11y.found.notFound' | finLocalization: [queryString$ | async] }}\n </p>\n </div>\n\n <fcom-loader *ngIf=\"isLoading$ | async\" class=\"pr-large\" [loaderType]=\"LoaderTheme.INLINE\"></fcom-loader>\n </div>\n</ng-template>\n\n<ng-template #locationInfo let-location=\"location\">\n <div *ngIf=\"location\" class=\"flex fill\" data-testid=\"location-info\">\n <span class=\"overflow-hidden truncate\">\n {{ location.cityName }}\n </span>\n <span *ngIf=\"!isAm\">\n  ({{\n location.locationCode && location.type === 'airport'\n ? location.locationCode\n : ('bookingSearch.allAirportsLabel' | finLocalization)\n }})</span\n >\n <span class=\"is-vishidden\"> {{ location.country }}.</span>\n </div>\n</ng-template>\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\n\nimport { Store } from '@ngrx/store';\nimport {\n BehaviorSubject,\n NEVER,\n Observable,\n Subscription,\n catchError,\n combineLatest,\n debounceTime,\n distinctUntilChanged,\n filter,\n iif,\n map,\n of,\n startWith,\n switchMap,\n take,\n throwError,\n withLatestFrom,\n} from 'rxjs';\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { ConsentTextId } from '@fcom/common';\nimport { ConsentService } from '@fcom/common/login';\nimport { LocationPair } from '@fcom/common/store';\nimport { AppState, GeolocationService, LatLng, LocationRouteCffService } from '@fcom/core';\nimport { Location, LocationGeoLocData, LocationMatchData } from '@fcom/core-api';\nimport { akamaiGeolocation, isBrowserGeolocationLoading } from '@fcom/core/selectors';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\nimport {\n ButtonMode,\n ButtonSize,\n ButtonTheme,\n IconButtonSize,\n IconButtonTheme,\n IconPosition,\n LoaderTheme,\n TextInputComponent,\n PopoverOptions,\n PopoverService,\n} from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { isNotBlank, isPresent, stopPropagation, unsubscribe, isBlank } from '@fcom/core/utils';\nimport { TransportType } from '@fcom/common-booking/interfaces/utils.interface';\n\nimport { GtmLocationEventType, Locations, LocationType, LocationParam } from '../../interfaces';\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { BOOKING_WIDGET_CONTEXT, defaultWidgetPopoverOptions } from '../../constants';\nimport { BookingWidgetFlightService } from '../../services/booking-widget-flight.service';\n\n@Component({\n selector: 'fin-location-selector',\n templateUrl: './location-selector.component.html',\n styleUrls: ['./location-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LocationSelectorComponent implements AfterViewInit, OnInit, OnDestroy {\n readonly LoaderTheme = LoaderTheme;\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly IconPosition = IconPosition;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TransportType = TransportType;\n\n readonly originPopoverOptions: PopoverOptions = {\n ...defaultWidgetPopoverOptions,\n popoverID: 'locationSelectorPopover',\n alignToLeft: true,\n popoverWidth: 456,\n disableAutoFocus: true,\n };\n readonly destinationPopoverOptions: PopoverOptions = {\n ...defaultWidgetPopoverOptions,\n popoverID: 'locationSelectorPopover',\n popoverWidth: 456,\n disableAutoFocus: true,\n };\n\n @Input()\n disabled = false;\n\n @Input()\n locationPair$: Observable<LocationPair>;\n\n @Input()\n showSeparator = true;\n\n @Input()\n showLocateMe = true;\n\n @Input()\n allowedOriginContinent: string;\n\n @Input()\n allowedDestinationContinent: string;\n\n @Input()\n originDisabled: boolean;\n\n @Input()\n destinationDisabled: boolean;\n\n @Input()\n showPreviousSearches?: boolean;\n\n @Input()\n isAm = false;\n\n @Input()\n showSuggestedDestinations = true;\n\n @Input()\n amOrigins$: Observable<Location[]> = of(undefined);\n\n @Input()\n amDestinations$: Observable<Location[]> = of(undefined);\n\n @Input()\n isGlobalBookingWidget = false;\n\n @Output()\n setLocations = new EventEmitter<LocationParam>();\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n modalOpen = false;\n locationType$: BehaviorSubject<'origin' | 'destination'> = new BehaviorSubject('origin');\n GtmLocationEventType$: BehaviorSubject<'locations' | 'suggestions'> = new BehaviorSubject('locations');\n defaultOrigin$: Observable<Location>;\n origin$: Observable<Location>;\n destination$: Observable<Location>;\n enablePersonalization$: Observable<boolean>;\n defaultLocations$: Observable<Location[]>;\n locationResults$: BehaviorSubject<Location[]> = new BehaviorSubject(undefined);\n locationSearchForm: FormGroup<{ locationSearch: FormControl<string> }>;\n queryString$: Observable<string>;\n hasSearch$: Observable<boolean>;\n isGeoLocating$: Observable<boolean>;\n activeIndex$ = new BehaviorSubject<number>(undefined);\n hasLocations$: Observable<boolean>;\n isLoading$: Observable<boolean>;\n\n locationsSwitched = new EventEmitter<void>();\n locationSelected = new EventEmitter<{ location: Location; locationType: LocationType }>();\n\n private subscriptions: Subscription = new Subscription();\n\n @ViewChild('locationListHeading') locationListHeading: ElementRef;\n @ViewChild('searchInput') searchInput: TextInputComponent;\n @ViewChildren('locationItem', { read: ElementRef }) locationItems: QueryList<ElementRef>;\n readonly usePopoverSelectors = this.bookingWidgetService.usePopoverSelectors();\n\n constructor(\n private store$: Store<AppState>,\n private locationRouteCffService: LocationRouteCffService,\n private languageService: LanguageService,\n private geoLocationService: GeolocationService,\n private consentService: ConsentService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private bookingWidgetService: BookingWidgetService,\n private popoverService: PopoverService,\n private bookingWidgetFlightService: BookingWidgetFlightService\n ) {}\n\n ngOnInit(): void {\n this.isGeoLocating$ = this.store$.pipe(isBrowserGeolocationLoading());\n\n this.defaultOrigin$ = this.store$.pipe(akamaiGeolocation()).pipe(\n switchMap((value: LatLng) =>\n this.locationRouteCffService.geolocMatchFor(value.lat, value.lng, this.languageService.localeValue)\n ),\n switchMap((location: LocationGeoLocData) =>\n this.locationRouteCffService.bestGuessFor(location.item.locationCode, this.languageService.localeValue)\n ),\n retryWithBackoff(2),\n catchError((err: unknown) => {\n return throwError(() => err);\n }),\n distinctUntilChanged(),\n finShare()\n );\n\n this.locationSearchForm = new FormGroup({\n locationSearch: new FormControl(''),\n });\n\n this.defaultLocations$ = iif(\n () => this.isAm,\n combineLatest([this.amOrigins$, this.amDestinations$, this.locationType$]).pipe(\n map(([amOrigins, amDestinations, locationType]) => (locationType === 'origin' ? amOrigins : amDestinations))\n ),\n combineLatest([\n this.bookingWidgetFlightService.suggestedLocations$,\n this.bookingWidgetFlightService.trendingDestinations$,\n this.locationType$,\n ]).pipe(\n map(([suggestedLocations, trendingLocations, locationType]) =>\n this.showSuggestedDestinations\n ? locationType === 'origin'\n ? suggestedLocations?.departures\n : trendingLocations\n ? trendingLocations\n : suggestedLocations?.destinations\n : undefined\n )\n )\n ).pipe(startWith(undefined), finShare());\n\n this.enablePersonalization$ = this.consentService\n .getCookieConsentStatusById(ConsentTextId.COOKIE_PERSONALIZATION)\n .pipe(distinctUntilChanged());\n\n this.queryString$ = this.locationSearchForm\n .get('locationSearch')\n .valueChanges.pipe(debounceTime(500), distinctUntilChanged(), startWith(''), finShare());\n\n this.hasLocations$ = combineLatest([this.locationResults$, this.defaultLocations$]).pipe(\n map(([results, defaults]) => isPresent(results) || isPresent(defaults))\n );\n\n this.subscriptions.add(\n this.queryString$.pipe(filter(isNotBlank)).subscribe((queryString) => {\n this.GtmLocationEventType$.next(`${isBlank(queryString) ? 'locations' : 'suggestions'}`);\n this.sendGtmEvent(GtmLocationEventType.INPUT, queryString);\n })\n );\n\n this.subscriptions.add(\n this.queryString$\n .pipe(\n filter(isNotBlank),\n withLatestFrom(this.locationType$),\n switchMap(([queryString, locationType]) => {\n if (this.isAm) {\n return this.searchAmHolidays(queryString, locationType);\n }\n\n const continent =\n locationType === 'origin' ? this.allowedOriginContinent : this.allowedDestinationContinent;\n return this.searchFlights(queryString, continent);\n })\n )\n .subscribe((locations: Location[]) => {\n this.locationResults$.next(locations);\n })\n );\n\n this.subscriptions.add(\n this.queryString$.subscribe(() => {\n if (!this.isAm) {\n this.locationResults$.next(undefined);\n }\n\n this.activeIndex$.next(undefined);\n })\n );\n\n this.isLoading$ = combineLatest([this.queryString$, this.locationResults$]).pipe(\n map(([queryString, results]) => isNotBlank(queryString) && !isPresent(results))\n );\n\n this.subscriptions.add(\n this.locationsSwitched.pipe(withLatestFrom(this.locationPair$)).subscribe(([, { origin, destination }]) => {\n this.setLocations.emit({\n locations: { origin: destination, destination: origin },\n locationType: [LocationType.DESTINATION, LocationType.ORIGIN],\n });\n\n if (this.isGlobalBookingWidget) {\n this.startSearch.emit();\n this.bookingWidgetGtmService.trackElementEvent('global-widget-start-new-search-from-location-switch');\n }\n })\n );\n\n this.subscriptions.add(\n this.locationSelected\n .pipe(withLatestFrom(this.locationPair$))\n .subscribe(([{ location, locationType }, flight]) => {\n const oppositeLocationType = locationType === 'origin' ? 'destination' : 'origin';\n\n const newLocations =\n location.locationCode === flight[oppositeLocationType]?.locationCode\n ? {\n [locationType]: location,\n [oppositeLocationType]: undefined,\n }\n : {\n ...flight,\n [locationType]: location,\n };\n\n this.sendGtmEvent(GtmLocationEventType.SELECTION, location.locationCode);\n this.setLocations.emit({ locations: newLocations, locationType: [locationType] });\n this.handleClose(false);\n })\n );\n\n //set default location\n if (!this.isGlobalBookingWidget) {\n this.bookingWidgetFlightService.fetchUserLocationAndSetDefaultOrigin();\n }\n }\n\n ngAfterViewInit(): void {\n this.subscriptions.add(\n this.activeIndex$\n .pipe(filter((i) => isPresent(i) && isPresent(this.locationItems.get(i)?.nativeElement)))\n .subscribe((i) => {\n this.locationItems.get(i)?.nativeElement.focus();\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n handleInitialLocationItemFocus(index: number): void {\n if (!isPresent(this.activeIndex$.getValue())) {\n this.activeIndex$.next(index);\n }\n }\n\n handleOpen(type: keyof Locations): void {\n if (!this.bookingWidgetService.usePopoverSelectors()) {\n this.modalOpen = true;\n }\n\n this.locationType$.next(type);\n this.locationSearchForm.reset({ locationSearch: '' }, { emitEvent: false });\n }\n\n handleClose(logEvent = true): void {\n this.modalOpen = false;\n this.popoverService.closeByContext(BOOKING_WIDGET_CONTEXT);\n this.resetSearch();\n if (logEvent) {\n this.sendGtmEvent(GtmLocationEventType.CLOSE, this.locationSearchForm.get('locationSearch').value);\n }\n }\n\n closePopover(): void {\n this.popoverService.close(true);\n }\n\n resetSearch(): void {\n this.locationSearchForm.controls.locationSearch.setValue('');\n this.locationResults$.next(undefined);\n this.activeIndex$.next(undefined);\n }\n\n setLocationOrStartNewSearch(location: Location, locationType: LocationType): void {\n this.locationSelected.emit({ location, locationType });\n\n if (this.isGlobalBookingWidget) {\n this.startSearch.emit();\n this.bookingWidgetGtmService.trackElementEvent('global-widget-start-new-search-from-location');\n }\n }\n\n moveFocusToResults(e: Event): void {\n stopPropagation(e);\n this.locationListHeading?.nativeElement?.focus();\n }\n\n moveFocusToSearchInput(): void {\n this.searchInput?.inputElement?.nativeElement?.focus();\n }\n\n getUserLocation(): void {\n this.subscriptions.add(\n this.geoLocationService\n .getGeolocationFromNavigator(NEVER)\n .pipe(take(1))\n .subscribe((location: Location) => {\n this.handleClose();\n this.setLocations.emit({ locations: { origin: location }, locationType: [LocationType.ORIGIN] });\n })\n );\n }\n\n handleKeyDown(e: KeyboardEvent, locations: Location[]): void {\n const currentActiveIndex = this.activeIndex$.getValue();\n const maxIndex = locations ? locations.length - 1 : 0;\n\n switch (e.key) {\n case 'Down':\n case 'ArrowDown':\n stopPropagation(e);\n this.activeIndex$.next(currentActiveIndex + 1 > maxIndex ? 0 : currentActiveIndex + 1);\n break;\n case 'Up':\n case 'ArrowUp':\n stopPropagation(e);\n this.activeIndex$.next(currentActiveIndex - 1 < 0 ? maxIndex : currentActiveIndex - 1);\n break;\n default:\n break;\n }\n }\n\n private searchFlights(queryString: string, continent: string): Observable<Location[]> {\n return isBlank(queryString)\n ? of(undefined)\n : this.locationRouteCffService\n .locationMatchesFor(queryString, this.languageService.localeValue, undefined, false, continent)\n .pipe(map((data: LocationMatchData) => data.items));\n }\n\n private searchAmHolidays(queryString: string, locationType: string): Observable<Location[]> {\n return isBlank(queryString)\n ? of(undefined)\n : iif(() => locationType === 'origin', this.amOrigins$, this.amDestinations$).pipe(\n map((amLocations) => this.searchAmLocations(queryString, amLocations))\n );\n }\n\n private searchAmLocations(query: string, locations: Location[]): Location[] {\n const lcQuery = query.toLowerCase();\n if (locations.some((location) => location.title.toLowerCase().includes(lcQuery))) {\n return locations.sort((a, b) => {\n const lcA = a.title.toLowerCase();\n const lcB = b.title.toLowerCase();\n\n if (!lcA.includes(lcQuery) && !lcB.includes(lcQuery)) {\n return 0;\n } else if (lcA.includes(lcQuery) && !lcB.includes(lcQuery)) {\n return -1;\n } else if (lcB.includes(lcQuery) && !lcA.includes(lcQuery)) {\n return 1;\n }\n\n return lcA.indexOf(lcQuery) - lcB.indexOf(lcQuery);\n });\n }\n\n // levenshtein algorithm from old widget doesn't work properly with exact matches like \"lon\" or \"oul\"\n // but it works fine for cases when there is no exact match like \"oulo\"\n return locations.sort(locationLevenshteinPartialMatchSort(lcQuery));\n }\n\n private sendGtmEvent(eventType: GtmLocationEventType, state: string): void {\n this.bookingWidgetGtmService.trackElementEvent(\n `${this.locationType$.getValue()}-${this.GtmLocationEventType$.getValue()}-modal-${eventType}`,\n state\n );\n }\n}\n\n/**\n * (not so) Amazing sorting algorithm (copied from old widget) to always find the location you wanted!\n * Uses Levenshtein distance but prioritizes case-insensitive partial matches.\n */\nexport const locationLevenshteinPartialMatchSort = (query: string) => (a: Location, b: Location) =>\n levenshteinDistance(query, a.title) +\n levenshteinDistance(query, a.country) -\n (levenshteinDistance(query, b.title) + levenshteinDistance(query, b.country)) -\n (partialMatch(a.title, query) ? 100 : 0) -\n (partialMatch(a.country, query) ? 100 : 0) +\n (partialMatch(b.country, query) ? 100 : 0) +\n (partialMatch(b.title, query) ? 100 : 0);\n\nconst partialMatch = (a: string, b: string): boolean => a.toLowerCase().includes(b.toLowerCase());\n\nconst levenshteinDistance = (a = '', b = ''): number => {\n const distanceMatrix = Array(b.length + 1)\n .fill(null)\n .map(() => Array(a.length + 1).fill(null));\n\n for (let i = 0; i <= a.length; i += 1) {\n distanceMatrix[0][i] = i;\n }\n\n for (let j = 0; j <= b.length; j += 1) {\n distanceMatrix[j][0] = j;\n }\n\n for (let j = 1; j <= b.length; j += 1) {\n for (let i = 1; i <= a.length; i += 1) {\n const indicator = a[i - 1] === b[j - 1] ? 0 : 1;\n distanceMatrix[j][i] = Math.min(\n distanceMatrix[j][i - 1] + 1, // deletion\n distanceMatrix[j - 1][i] + 1, // insertion\n distanceMatrix[j - 1][i - 1] + indicator // substitution\n );\n }\n }\n\n return distanceMatrix[b.length][a.length];\n};\n","@if (usePopoverSelectors) {\n <button\n class=\"underline medium-type link-hover font-body-1 align-left\"\n data-testid=\"discount-code-button\"\n fcomPopover\n [options]=\"popoverOptions\"\n [content]=\"popoverContent\"\n >\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n} @else {\n <button\n class=\"underline medium-type link-hover font-body-1 align-left\"\n data-testid=\"discount-code-button\"\n (click)=\"openModal$.next()\"\n >\n <ng-container *ngTemplateOutlet=\"buttonContent\"></ng-container>\n </button>\n}\n\n<ng-template #buttonContent>\n {{\n (discountCode$ | async)\n ? ('promoCode.buttonWithCodeV2' | finLocalization: { code: (discountCode$ | async) })\n : ('promoCode.emptyButton' | finLocalization)\n }}\n</ng-template>\n\n<ng-template #popoverContent>\n <div class=\"scroll rounded-large\">\n <header class=\"popover-header fill relative flex--column ps-medium-y ps-medium-x border-bottom\">\n <div class=\"flex--nogrow flex--basis-header flex flex--row flex--center\">\n <h2\n class=\"font-heading-4 flex-1 truncate overflow-hidden nordic-blue-900-text\"\n [attr.id]=\"'popover-' + popoverOptions.popoverID + '-title'\"\n >\n {{ 'promoCode.modalTitle' | finLocalization }}\n </h2>\n <button\n class=\"close-button flex--nogrow flex--self-stretch btn--no-outline focus-inset\"\n [attr.title]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.close' | finLocalization\"\n (click)=\"closePopover()\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n </header>\n <ng-container *ngTemplateOutlet=\"discountCode; context: { popover: true }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"buttons; context: { popover: true }\"></ng-container>\n </div>\n</ng-template>\n\n<fcom-modal\n *ngIf=\"modalOpen\"\n class=\"nordic-blue-900-text\"\n [(open)]=\"modalOpen\"\n [title]=\"'promoCode.modalTitle' | finLocalization\"\n [fitToContent]=\"true\"\n [buttons]=\"ModalButtons.CUSTOM\"\n data-testid=\"discount-code-modal\"\n>\n <ng-container *ngTemplateOutlet=\"discountCode; context: { popover: false }\"></ng-container>\n <ng-container buttons *ngTemplateOutlet=\"buttons; context: { popover: false }\"></ng-container>\n</fcom-modal>\n\n<ng-template #discountCode let-popover=\"popover\">\n <div\n [ngClass]=\"{\n 'ps-medium': popover,\n 'ps-large': !popover,\n }\"\n >\n <div class=\"pr-xsmall-b\" data-testid=\"discount-code-form\">\n <fcom-text-input\n [id]=\"'discount-code-input'\"\n [parentForm]=\"discountCodeForm\"\n [translationPrefix]=\"'bookingWidget.promoCode.inputLabel'\"\n [controlName]=\"'discountCode'\"\n [required]=\"false\"\n [displayMargin]=\"false\"\n [placeHolder]=\"'bookingWidget.promoCode.placeholder'\"\n (keyup.enter)=\"checkDiscountCode()\"\n finFocus\n [autofocus]=\"true\"\n ></fcom-text-input>\n </div>\n\n <p\n data-testid=\"discount-code-login-warning\"\n *ngIf=\"!(discountCodeRules$ | async)?.found && !discountCodeForm.controls.discountCode.hasError('custom')\"\n >\n {{ 'promoCode.loginWarning' | finLocalization }}\n </p>\n <p data-testid=\"discount-code-generic-error\" *ngIf=\"discountCodeForm.controls.discountCode.hasError('custom')\">\n {{ 'promoCode.genericError' | finLocalization }}\n </p>\n\n @if ((discountCodeRules$ | async)?.found) {\n <div class=\"discount-code-rules\">\n <div class=\"nordic-blue-900-text mr-xsmall-b font-body-1\">{{ 'promoCode.termsTitle' | finLocalization }}</div>\n <div class=\"nordic-blue-900-text font-body-1\">{{ (discountCodeRules$ | async).title }}</div>\n <div class=\"ps-large-l\" [innerHTML]=\"(discountCodeRules$ | async).terms | resolveLinks | finSafe: 'html'\"></div>\n </div>\n } @else {\n <fcom-link\n data-testid=\"discount-code-general-info\"\n class=\"external-link bold-type\"\n [href]=\"'promoCode.termsLink.url' | finLocalization\"\n [external]=\"true\"\n [openInNewTab]=\"true\"\n [icon]=\"{ name: SvgLibraryIcon.EXTERNAL_TAB, position: IconPosition.RIGHT }\"\n >{{ 'promoCode.promoLinkText' | finLocalization }}</fcom-link\n >\n }\n </div>\n</ng-template>\n\n<ng-template #buttons let-popover=\"popover\">\n <div\n [ngClass]=\"{\n 'ps-medium-y ps-medium-x flex flex--end': popover,\n }\"\n >\n @if ((discountCodeRules$ | async)?.found) {\n <fcom-button\n data-testid=\"discount-code-remove\"\n class=\"mr-xsmall-r\"\n [loading]=\"loading$ | async\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [disabled]=\"false\"\n [text]=\"'promoCode.removeCodeButton' | finLocalization\"\n [aria]=\"{ label: 'promoCode.removeCodeButton' | finLocalization, role: 'button' }\"\n (clickBtn)=\"removeCode()\"\n ></fcom-button>\n\n @if (isGlobalBookingWidget) {\n <fcom-button\n data-testid=\"discount-code-start-search\"\n [loading]=\"loading$ | async\"\n [disabled]=\"false\"\n [text]=\"'bookingSearch.search' | finLocalization\"\n [aria]=\"{ label: 'bookingSearch.search' | finLocalization, role: 'button' }\"\n (clickBtn)=\"continue()\"\n ></fcom-button>\n } @else {\n <fcom-button\n data-testid=\"discount-code-continue\"\n [loading]=\"loading$ | async\"\n [disabled]=\"false\"\n [text]=\"'actions.continue' | finLocalization\"\n [aria]=\"{ label: 'actions.continue' | finLocalization, role: 'button' }\"\n (clickBtn)=\"continue()\"\n ></fcom-button>\n }\n } @else {\n <fcom-button\n data-testid=\"discount-code-check\"\n [ngClass]=\"{\n 'mr-xsmall-r': !popover,\n }\"\n [loading]=\"loading$ | async\"\n [disabled]=\"\n discountCodeForm.controls.discountCode.value === null ||\n discountCodeForm.controls.discountCode.value === '' ||\n !discountCodeForm.controls.discountCode.valid\n \"\n [text]=\"'promoCode.checkCodeButton' | finLocalization\"\n [aria]=\"{ label: 'promoCode.checkCodeButton' | finLocalization, role: 'button' }\"\n (clickBtn)=\"checkDiscountCode()\"\n ></fcom-button>\n }\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, Input, EventEmitter, Output } from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { EMPTY, Observable, Subject, Subscription, filter, map, of, tap, withLatestFrom } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { finShare } from '@fcom/rx';\nimport { isNotBlank, isPresent, unsubscribe } from '@fcom/core/utils';\nimport {\n ButtonSize,\n ButtonTheme,\n IconPosition,\n LoaderTheme,\n ModalButtons,\n NotificationLayout,\n NotificationTheme,\n PopoverOptions,\n PopoverService,\n} from '@fcom/ui-components';\nimport { CmsDataService, PromoCodeTerms } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { globalBookingDiscountCode } from '@fcom/common/store';\nimport { ElementActions } from '@fcom/common';\n\nimport { FormStatus } from '../../../service-forms';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { DiscountCodeRulesState } from '../../interfaces';\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\nimport { discountCodeValidator } from '../../utils/utils';\nimport { defaultWidgetPopoverOptions } from '../../constants';\n\n@Component({\n selector: 'fin-discount-code',\n templateUrl: './discount-code.component.html',\n styleUrls: ['./discount-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DiscountCodeComponent implements OnInit, OnDestroy {\n //TODO: can be removed after one time discount code campaign\n readonly MarketingPrefixDiscountCode = 'KIITOS';\n readonly FormStatus = FormStatus;\n readonly ModalButtons = ModalButtons;\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly NotificationTheme = NotificationTheme;\n readonly NotificationLayout = NotificationLayout;\n readonly LoaderTheme = LoaderTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly IconPosition = IconPosition;\n\n readonly popoverOptions: PopoverOptions = {\n ...defaultWidgetPopoverOptions,\n popoverID: 'discountCodePopover',\n disableAutoFocus: true,\n alignToLeft: true,\n };\n readonly usePopoverSelectors = this.bookingWidgetService.usePopoverSelectors();\n\n modalOpen = false;\n discountCode$: Observable<string>;\n discountCodeForm: FormGroup<{ discountCode: FormControl<string> }>;\n discountCodeRules$: Observable<DiscountCodeRulesState> = of(null);\n loading$: Subject<boolean> = new Subject<boolean>();\n openModal$: Subject<void> = new Subject<void>();\n private subscriptions: Subscription = new Subscription();\n\n @Input() isGlobalBookingWidget = false;\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n constructor(\n private cmsDataService: CmsDataService,\n private languageService: LanguageService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private store$: Store<BookingAppState>,\n private bookingWidgetService: BookingWidgetService,\n private popoverService: PopoverService\n ) {}\n\n ngOnInit(): void {\n this.discountCode$ = this.store$.pipe(\n globalBookingDiscountCode(),\n map((discountCode: string) => (isPresent(discountCode) ? discountCode : null)),\n finShare()\n );\n\n this.discountCodeForm = new FormGroup({\n discountCode: new FormControl('', discountCodeValidator()),\n });\n\n this.subscriptions.add(\n this.discountCode$.subscribe((discountCode: string) => {\n if (discountCode) {\n this.discountCodeForm.controls.discountCode.patchValue(discountCode, { emitEvent: false });\n }\n })\n );\n\n this.subscriptions.add(\n this.discountCodeForm.controls.discountCode.valueChanges\n .pipe(filter(Boolean), finShare())\n .subscribe((code: string) => {\n this.discountCodeForm.controls.discountCode.patchValue(code.toUpperCase(), { emitEvent: false });\n if (\n !this.discountCodeForm.controls.discountCode.valid &&\n !this.discountCodeForm.controls.discountCode.touched\n ) {\n this.discountCodeForm.controls.discountCode.markAsTouched();\n }\n })\n );\n\n this.subscriptions.add(\n this.openModal$.pipe(withLatestFrom(this.discountCode$)).subscribe(([_openModal, discountCode]) => {\n if (!(isPresent(discountCode) && isNotBlank(discountCode))) {\n this.resetForm();\n }\n this.modalOpen = true;\n })\n );\n\n this.subscriptions.add(\n this.discountCodeRules$\n .pipe(\n filter((rules) => !rules),\n withLatestFrom(this.discountCode$),\n filter(([_, discountCode]) => !!discountCode)\n )\n .subscribe(() => {\n this.checkDiscountCode();\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n checkDiscountCode(): void {\n const discountCodeValue = this.discountCodeForm.controls.discountCode.value;\n this.bookingWidgetGtmService.trackElementEvent('discount-code-check', discountCodeValue, ElementActions.CLICK);\n if (!this.discountCodeForm.valid || discountCodeValue === null || discountCodeValue === '') {\n return;\n }\n if (discountCodeValue === 'KIITOS') {\n this.discountCodeForm.controls.discountCode.setErrors({ custom: 'notFoundError' });\n return;\n }\n this.loading$.next(true);\n this.discountCodeRules$ = this.cmsDataService\n .getPromoCodeTerms(\n //TODO: can be removed after one time discount code campaign\n discountCodeValue.startsWith(this.MarketingPrefixDiscountCode)\n ? this.MarketingPrefixDiscountCode\n : discountCodeValue,\n this.languageService.langValue,\n this.languageService.localeValue\n )\n .pipe(\n map((terms: PromoCodeTerms) => ({\n found: !!terms,\n terms: terms?.description,\n title: terms?.title,\n })),\n tap((data: DiscountCodeRulesState) => {\n this.loading$.next(false);\n if (!data.found) {\n this.discountCodeForm.controls.discountCode.setErrors({ custom: 'notFoundError' });\n } else {\n this.discountCodeForm.controls.discountCode.disable();\n this.discountCodeForm.controls.discountCode.setErrors(null);\n this.bookingWidgetGtmService.trackElementEvent(\n 'discount-code-accepted',\n discountCodeValue,\n ElementActions.VIEW\n );\n }\n }),\n finShare()\n );\n }\n\n closePopover(): void {\n this.popoverService.close();\n }\n\n resetForm(): void {\n this.discountCodeForm.reset();\n this.discountCodeRules$ = EMPTY;\n this.discountCodeForm.controls.discountCode.enable();\n }\n\n removeCode(): void {\n this.bookingWidgetService.setDiscountCode(null, this.isGlobalBookingWidget);\n this.resetForm();\n }\n\n continue(): void {\n this.bookingWidgetService.setDiscountCode(\n this.discountCodeForm.controls.discountCode.value,\n this.isGlobalBookingWidget\n );\n\n if (this.isGlobalBookingWidget) {\n this.startSearch.emit();\n this.bookingWidgetGtmService.trackElementEvent(\n 'global-widget-start-new-search-from-discount-code',\n this.discountCodeForm.controls.discountCode.value\n );\n } else {\n this.bookingWidgetGtmService.trackElementEvent(\n 'promo-code-modal-done',\n this.discountCodeForm.controls.discountCode.value\n );\n }\n this.modalOpen = false;\n this.popoverService.close();\n }\n}\n","<ng-container *ngFor=\"let notification of notifications$ | async; let first = first; let last = last; let i = index\">\n <fcom-notification\n *ngIf=\"notification?.text?.label | finLocalization: notification.text.params as notificationText\"\n [theme]=\"notification.theme\"\n [iconName]=\"notification.icon\"\n [removePadding]=\"notification.removePadding\"\n class=\"block\"\n [class.ps-medium-t]=\"first\"\n [class.pr-xxsmall-b]=\"!last\"\n [attr.data-testid]=\"'booking-widget-notification-' + notification.type\"\n >\n <ng-container *ngIf=\"!isAm\">\n <p [innerHTML]=\"notificationText | resolveLinks | finSafe: 'html'\"></p>\n <p\n *ngIf=\"notification?.text1?.label | finLocalization as notificationSecondaryText\"\n [innerHTML]=\"notificationSecondaryText | resolveLinks | finSafe: 'html'\"\n ></p>\n <a\n *ngIf=\"notification?.link\"\n [finLink]=\"\n notification.link.url.startsWith('/')\n ? (notification.link.url | resolveLinks)\n : (notification.link.url | finLocalization | resolveLinks)\n \"\n [external]=\"!!notification.link?.external\"\n [openInNewTab]=\"!!notification.link?.openInNewTab\"\n [attr.rel]=\"'noreferrer'\"\n class=\"underline medium-type link-hover nordic-blue-900-text font-body-1 mr-xsmall-t block\"\n data-testid=\"booking-widget-notification-link\"\n >\n <span class=\"ms-xxsmall-r\">{{ notification.link?.text | finLocalization }}</span>\n <fcom-icon\n *ngIf=\"notification.link?.external\"\n class=\"external-link icon-medium\"\n [name]=\"SvgLibraryIcon.EXTERNAL_TAB\"\n ></fcom-icon>\n </a>\n </ng-container>\n <fin-expand *ngIf=\"isAm\" #expand [key]=\"'notification-' + i\" [id]=\"'notification-' + i\" [initiallyOpen]=\"false\">\n <div class=\"trigger flex flex--center\">\n <div class=\"flex flex-1 flex--middle mr-xsmall-r\">\n <span class=\"font-body-1\" [innerHTML]=\"notificationText | resolveLinks | finSafe: 'html'\"></span>\n </div>\n <fcom-icon\n class=\"flex-1 flex--nogrow rotate icon-medium\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n <div class=\"content\" *ngIf=\"notification?.text1?.label | finLocalization as notificationSecondaryText\">\n <div\n *ngIf=\"expand.isOpen$ | async\"\n class=\"font-body-1 ps-xsmall-t\"\n [innerHTML]=\"notificationSecondaryText | resolveLinks | finSafe: 'html'\"\n ></div>\n </div>\n </fin-expand>\n </fcom-notification>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Store } from '@ngrx/store';\nimport { combineLatest, map, Observable, of, switchMap, take, withLatestFrom } from 'rxjs';\n\nimport { TripType } from '@fcom/core/interfaces';\nimport { finShare } from '@fcom/rx';\nimport { NotificationTheme } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { isNotBlank, isPresent } from '@fcom/core/utils';\nimport { Location } from '@fcom/core-api';\nimport { GlobalBookingFlight } from '@fcom/common/store';\nimport { BUS_CONNECTION_LOCATION_CODES, RAIL_AND_FLY_LOCATION_CODES } from '@fcom/core/constants';\nimport { Profile } from '@fcom/core-api/login';\n\nimport { BookingWidgetAppState, notificationWarnings } from '../../store';\nimport {\n NotificationData,\n NotificationSpecific,\n NotificationWarning,\n SeasonalNotificationData,\n WarningData,\n} from '../../interfaces';\nimport { warningNotificationPriorityOrder } from '../../constants';\n\n@Component({\n selector: 'fin-booking-widget-notifications',\n templateUrl: './booking-widget-notification.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BookingWidgetNotificationComponent implements OnInit {\n @Input()\n locations$: Observable<GlobalBookingFlight[]> = of([]);\n\n @Input()\n tripType$: Observable<TripType> = of(undefined);\n\n @Input()\n profile$: Observable<Profile> = of(undefined);\n\n @Input()\n isAm = false;\n\n notifications$: Observable<NotificationData[]>;\n\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n constructor(\n private store$: Store<BookingWidgetAppState>,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n const profileNotifications$ = this.profile$.pipe(map((profile) => this.mapProfileNotifications(profile)));\n\n const warnings$ = this.store$.pipe(\n notificationWarnings(),\n withLatestFrom(this.locations$, this.tripType$),\n map(([warnings, locations, tripType]) =>\n Object.entries(warnings)\n .sort(([a], [b]) => warningNotificationPriorityOrder[a] - warningNotificationPriorityOrder[b])\n .map((entry) => this.mapWarningToNotification(entry, tripType, locations))\n .filter(Boolean)\n )\n );\n\n const otherNotifications$ = combineLatest([this.locations$, this.tripType$]).pipe(\n switchMap(([locations, tripType]) => {\n const destinationNotification$ = this.mapDestinationNotification(locations[0]?.destination);\n const busConnectionNotification = this.mapBusConnectionNotification(locations);\n const trainConnectionNotification = this.mapTrainConnectionNotification(locations);\n const amEarnPointsNotification = this.isAm ? this.mapAmEarnPointsNotification() : undefined;\n const showMaxNumberOfFlightsNotification =\n tripType === TripType.MULTICITY ? this.showMaxNumberOfFlightsNotification(locations) : undefined;\n const showNotConsecutiveNotification =\n tripType === TripType.MULTICITY ? this.showNotConsecutiveNotification(locations) : undefined;\n\n return destinationNotification$.pipe(\n map((destinationNotification) =>\n [\n busConnectionNotification,\n trainConnectionNotification,\n destinationNotification,\n amEarnPointsNotification,\n showMaxNumberOfFlightsNotification,\n showNotConsecutiveNotification,\n ].filter(Boolean)\n )\n );\n })\n );\n\n this.notifications$ = combineLatest([profileNotifications$, warnings$, otherNotifications$]).pipe(\n map(([profileNotifications, warnings, otherNotifications]) => [\n ...profileNotifications,\n ...warnings,\n ...otherNotifications,\n ])\n );\n }\n\n private mapProfileNotifications(profile: Profile): NotificationData[] {\n return profile?.isCorporate\n ? [\n {\n type: NotificationSpecific.CORPORATE_USER,\n theme: NotificationTheme.TRANSPARENT,\n text: {\n label: 'dynamicNotifications.corporateBenefit',\n },\n icon: SvgLibraryIcon.B2B,\n removePadding: true,\n },\n ]\n : [];\n }\n\n private mapWarningToNotification(\n [type, warningData]: [string, WarningData],\n tripType: TripType,\n flights: GlobalBookingFlight[]\n ): NotificationData {\n if (!warningData.isActive) {\n return undefined;\n }\n\n switch (type) {\n case NotificationWarning.SEASONAL_ROUTE:\n return isPresent(warningData?.data) && flights[0]?.origin && flights[0]?.destination\n ? this.mapSeasonalNotification(warningData.data, flights)\n : null;\n case NotificationWarning.NO_FLIGHTS:\n return this.mapNoFlightNotification(tripType, flights, false);\n case NotificationWarning.NO_AWARD_FLIGHTS:\n return this.mapNoFlightNotification(tripType, flights, true);\n case NotificationWarning.NO_FLIGHTS_FOR_ROUTE:\n return this.mapNoAwardFlightForRouteNotification(false);\n case NotificationWarning.NO_AWARD_FLIGHTS_FOR_ROUTE:\n return this.mapNoAwardFlightForRouteNotification(true);\n case NotificationWarning.GENERAL:\n return this.mapFlightGeneralNotification();\n default:\n return undefined;\n }\n }\n\n private mapDestinationNotification(destination: Location): Observable<NotificationData> {\n if (!isPresent(destination?.countryCode)) {\n return of(undefined);\n }\n\n return this.languageService.translate(`dynamicNotifications.destination.${destination.countryCode}`).pipe(\n take(1),\n map((notificationText: string) =>\n isNotBlank(notificationText)\n ? {\n type: NotificationSpecific.DESTINATION_SPECIFIC,\n theme: NotificationTheme.INFO,\n text: { label: `dynamicNotifications.destination.${destination.countryCode}` },\n }\n : undefined\n ),\n finShare()\n );\n }\n\n private mapSeasonalNotification(\n seasonalDataNotification: SeasonalNotificationData,\n flights: GlobalBookingFlight[]\n ): NotificationData {\n return {\n type: NotificationWarning.SEASONAL_ROUTE,\n theme: NotificationTheme.INFO,\n text: {\n label: `timetable.seasonalNotification.${\n Object.keys(seasonalDataNotification).length <= 2 ? 'singular' : 'plural'\n }`,\n params: {\n ...seasonalDataNotification,\n origin: flights[0].origin.cityName,\n destination: flights[0].destination.cityName,\n },\n },\n link: {\n url: `/${this.languageService.langValue}/timetables?dest=${flights[0].destination.locationCode}&origin=${flights[0].origin.locationCode}`,\n text: 'routeNotification.timetable.forRouteLinkText',\n },\n };\n }\n\n private mapFlightGeneralNotification(): NotificationData {\n return {\n type: NotificationWarning.GENERAL,\n theme: NotificationTheme.WARNING,\n text: {\n label: 'errors.booking.title',\n },\n text1: {\n label: 'errors.booking.description',\n },\n };\n }\n\n private mapNoAwardFlightForRouteNotification(isAward: boolean): NotificationData {\n return {\n type: isAward ? NotificationWarning.NO_AWARD_FLIGHTS_FOR_ROUTE : NotificationWarning.NO_FLIGHTS_FOR_ROUTE,\n theme: NotificationTheme.WARNING,\n text: {\n label: isAward ? 'bookingSearch.errors.noAwardFlightsForRoute' : 'bookingSearch.errors.noFlightsForRoute',\n },\n };\n }\n\n private mapNoFlightNotification(\n tripType: TripType,\n flights: GlobalBookingFlight[],\n isAward: boolean\n ): NotificationData {\n return {\n type: isAward ? NotificationWarning.NO_AWARD_FLIGHTS : NotificationWarning.NO_FLIGHTS,\n theme: NotificationTheme.WARNING,\n text: {\n label: isAward ? 'bookingSearch.errors.noAwardFlightsFound' : 'bookingSearch.errors.noFlightsFound',\n },\n ...(tripType !== TripType.MULTICITY &&\n !isAward && {\n text1: { label: 'routeNotification.timetable.checkTimeTableText' },\n }),\n link: {\n openInNewTab: true,\n ...(tripType === TripType.MULTICITY && { external: true }),\n url:\n tripType !== TripType.MULTICITY\n ? `/${this.languageService.langValue}/timetables?dest=${flights[0].destination.locationCode}&origin=${flights[0].origin.locationCode}`\n : 'bookingSearch.errors.multiCity.seeMoreLink.url',\n text:\n tripType !== TripType.MULTICITY\n ? 'routeNotification.timetable.forRouteLinkText'\n : 'bookingSearch.errors.multiCity.seeMoreLinkText',\n },\n };\n }\n\n private mapBusConnectionNotification(flights: GlobalBookingFlight[]): NotificationData {\n const isBusConnectionNeeded = flights.some((flight) => {\n return ['origin', 'destination'].some((key) => BUS_CONNECTION_LOCATION_CODES.includes(flight[key]?.locationCode));\n });\n\n if (!isBusConnectionNeeded) {\n return undefined;\n }\n\n return {\n type: NotificationSpecific.BUS_CONNECTION,\n theme: NotificationTheme.INFO,\n text: { label: 'routeNotification.busConnections.notificationText' },\n link: {\n openInNewTab: true,\n url: 'routeNotification.busConnections.link.url',\n text: 'routeNotification.busConnections.linkText',\n },\n };\n }\n\n private mapTrainConnectionNotification(flights: GlobalBookingFlight[]): NotificationData {\n const showTrainNotification = flights.some((flight) => {\n return ['origin', 'destination'].some((key) => RAIL_AND_FLY_LOCATION_CODES.includes(flight[key]?.locationCode));\n });\n\n if (!showTrainNotification) {\n return undefined;\n }\n\n return {\n type: NotificationSpecific.TRAIN_CONNECTION,\n icon: SvgLibraryIcon.TRAIN,\n theme: NotificationTheme.INFO,\n text: { label: 'routeNotification.trainConnections.notificationText' },\n link: {\n openInNewTab: true,\n url: 'routeNotification.trainConnections.link.url',\n text: 'routeNotification.trainConnections.linkText',\n },\n };\n }\n\n private mapAmEarnPointsNotification(): NotificationData {\n return {\n type: NotificationSpecific.AM_EARN_POINTS,\n theme: NotificationTheme.INFO,\n text: { label: 'aurinkomatkat.notification.teaser' },\n text1: { label: 'aurinkomatkat.notification.content' },\n };\n }\n\n private showMaxNumberOfFlightsNotification(flights: GlobalBookingFlight[]): NotificationData {\n const hasReachedMaxNumberOfFlights = flights.length >= 6;\n\n return hasReachedMaxNumberOfFlights\n ? {\n type: NotificationSpecific.MULTICITY_MAX_NUMBER_OF_FLIGHTS,\n theme: NotificationTheme.INFO,\n text: { label: 'multiCityNotification.maxNumberOfFlights.notificationTitle' },\n text1: { label: 'multiCityNotification.maxNumberOfFlights.notificationText' },\n }\n : undefined;\n }\n\n private showNotConsecutiveNotification(flights: GlobalBookingFlight[]): NotificationData {\n const isAfterNextDepartureDate: boolean = flights.some((flight, i) => {\n if (!flight.departureDate) {\n return false;\n }\n\n const nextFlight = flights[i + 1];\n\n if (flight.departureDate.gt(nextFlight?.departureDate)) {\n return true;\n }\n\n return false;\n });\n\n return isAfterNextDepartureDate\n ? {\n type: NotificationSpecific.MULTICITY_NOT_CONSECUTIVE,\n theme: NotificationTheme.ALERT,\n text: { label: 'multiCityNotification.notConsecutiveDates.notificationText' },\n }\n : undefined;\n }\n}\n","<ng-container *ngIf=\"previousSearches$ | async as previousSearches\">\n <div\n *ngIf=\"previousSearches.length > 0 && !((isMulticityListOnly$ | async) && isGlobalBookingWidget)\"\n data-testid=\"previous-searches\"\n >\n <h3\n id=\"previous-searches-title\"\n class=\"grey-50-bg rounded-small ps-medium-y font-body-1 nordic-blue-900-text\"\n [ngClass]=\"{\n 'pr-large-x': !isGlobalBookingWidget,\n 'ps-medium-x': isGlobalBookingWidget,\n }\"\n >\n {{ 'bookingSearch.previousSearches' | finLocalization }}\n </h3>\n\n <ul [attr.id]=\"'previousSearches'\" class=\"flex flex--column\" role=\"list\" aria-labelledby=\"previous-searches-title\">\n <ng-container *ngFor=\"let search of previousSearches; let last = last; let index = index\">\n <li\n class=\"flex flex--middle flex--space-between focus-inset link-hover\"\n [ngClass]=\"{\n 'pr-large-x': !isGlobalBookingWidget,\n 'ps-medium-x': isGlobalBookingWidget,\n }\"\n [class.border-bottom]=\"!last\"\n data-testid=\"previous-search-item\"\n [id]=\"'previous-search-' + index\"\n *ngIf=\"!(isGlobalBookingWidget && search.tripType === TripType.MULTICITY)\"\n >\n <ng-container *ngIf=\"search.tripType !== TripType.MULTICITY; else multicityPreviousSearches\">\n <button\n #previousSearchItems\n class=\"fill align-left ps-medium-y overflow-hidden\"\n (click)=\"setSearch(search)\"\n [attr.aria-label]=\"\n 'bookingSearch.selectPreviousSearch'\n | finLocalization\n : {\n origin: search?.flights[0]?.origin?.cityName,\n destination: search?.flights[0]?.destination?.cityName,\n date:\n (search?.flights[0]?.departureDate | finDateFormat: 'DATE').toString() +\n (search?.flights[1]?.departureDate\n ? ' - ' + (search?.flights[1]?.departureDate | finDateFormat: 'DATE')?.toString()\n : ''),\n }\n \"\n data-testid=\"previous-search-set-item\"\n >\n <div class=\"font-body-1 capitalize location-title\">\n <div *ngIf=\"search\" class=\"flex fill\">\n <span class=\"ps-xxsmall-r overflow-hidden truncate\">{{ search?.flights[0]?.origin.cityName }}</span>\n <span\n >({{\n search?.flights[0]?.origin.locationCode && search?.flights[0]?.origin.type === 'airport'\n ? search?.flights[0]?.origin?.locationCode\n : ('bookingSearch.allAirportsLabel' | finLocalization)\n }})</span\n >\n <span class=\"ps-xxsmall-r overflow-hidden truncate\"\n > – {{ search?.flights[0]?.destination.cityName }}</span\n >\n <span\n >({{\n search?.flights[0]?.destination.locationCode && search?.flights[0]?.destination.type === 'airport'\n ? search?.flights[0]?.destination.locationCode\n : ('bookingSearch.allAirportsLabel' | finLocalization)\n }})</span\n >\n </div>\n </div>\n <div class=\"font-body-2 ps-xxsmall-y nordic-blue-900-text\">\n {{ search?.flights[0]?.departureDate | finDateFormat: 'DATE' }}\n <span *ngIf=\"search?.flights[1]?.departureDate\">\n - {{ search?.flights[1]?.departureDate | finDateFormat: 'DATE' }}</span\n >\n </div>\n </button>\n\n <fcom-icon-button\n (click)=\"removePreviousSearchByCreationDate$.next(search.creationDate)\"\n title=\"{{ 'actions.remove' | finLocalization }}\"\n data-testid=\"remove-previous-search-button\"\n [size]=\"IconButtonSize.MEDIUM\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_GHOST\"\n [icon]=\"{ name: SvgLibraryIcon.TRASH }\"\n [aria]=\"{\n label:\n 'bookingSearch.deletePreviousSearchRoute'\n | finLocalization\n : {\n origin: search?.flights[0]?.origin?.cityName,\n destination: search?.flights[0]?.destination?.cityName,\n date:\n (search?.flights[0].departureDate | finDateFormat: 'DATE').toString() +\n (search?.flights[1]?.departureDate\n ? ' - ' + (search?.flights[1]?.departureDate | finDateFormat: 'DATE')?.toString()\n : ''),\n },\n controls: 'previous-search-' + index,\n }\"\n ></fcom-icon-button>\n </ng-container>\n\n <ng-template #multicityPreviousSearches>\n <button\n #previousSearchItems\n class=\"fill align-left ps-medium-y overflow-hidden\"\n (click)=\"setSearch(search)\"\n [attr.aria-label]=\"\n 'bookingSearch.selectPreviousSearch'\n | finLocalization\n : {\n origin: search?.flights[0]?.origin?.cityName,\n destination: search?.flights[0]?.destination?.cityName,\n date:\n (search?.flights[0]?.departureDate | finDateFormat: 'DATE').toString() +\n (search?.flights[1]?.departureDate\n ? ' - ' + (search?.flights[1]?.departureDate | finDateFormat: 'DATE')?.toString()\n : ''),\n }\n \"\n data-testid=\"previous-search-set\"\n >\n <ol [attr.id]=\"'multicityPreviousSearches'\" class=\"flex flex--column ms-medium-l\">\n <ng-container *ngFor=\"let flight of search.flights; let first = first; let last = last; let i = index\">\n <li\n class=\"flex flex--middle flex--space-between focus-inset link-hover pr-large-r list-item\"\n data-testid=\"previous-search-item\"\n [id]=\"'previous-search-' + index\"\n >\n <div\n #previousSearchItems\n class=\"fill align-left overflow-hidden\"\n (click)=\"setSearch(search)\"\n [attr.aria-label]=\"\n 'bookingSearch.selectPreviousSearch'\n | finLocalization\n : {\n origin: flight.origin?.cityName,\n destination: flight?.destination?.cityName,\n date: (flight.departureDate | finDateFormat: 'DATE').toString(),\n }\n \"\n data-testid=\"previous-search-set-item\"\n >\n <div class=\"font-body-1 capitalize location-title\">\n <div *ngIf=\"search\" class=\"flex fill\">\n <span class=\"ps-xxsmall-r overflow-hidden truncate\">{{ flight.origin.cityName }}</span>\n <span\n >({{\n flight.origin.locationCode && flight.origin.type === 'airport'\n ? flight.origin?.locationCode\n : ('bookingSearch.allAirportsLabel' | finLocalization)\n }})</span\n >\n <span class=\"ps-xxsmall-r overflow-hidden truncate\"\n > – {{ flight.destination.cityName }}</span\n >\n <span\n >({{\n flight.destination.locationCode && flight.destination.type === 'airport'\n ? flight.destination.locationCode\n : ('bookingSearch.allAirportsLabel' | finLocalization)\n }})</span\n >\n </div>\n </div>\n <div class=\"font-body-2 ps-xxsmall-y nordic-blue-900-text\">\n <span> {{ flight.departureDate | finDateFormat: 'DATE' }}</span>\n </div>\n </div>\n </li>\n </ng-container>\n </ol>\n </button>\n <fcom-icon-button\n class=\"flex flex--center\"\n (click)=\"removePreviousSearchByCreationDate$.next(search.creationDate)\"\n title=\"{{ 'actions.remove' | finLocalization }}\"\n data-testid=\"remove-previous-search-button\"\n [size]=\"IconButtonSize.MEDIUM\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_GHOST\"\n [icon]=\"{ name: SvgLibraryIcon.TRASH }\"\n [aria]=\"{\n label: 'bookingSearch.deletePreviousSearchRoute' | finLocalization,\n controls: 'previous-search-' + index,\n }\"\n ></fcom-icon-button>\n </ng-template>\n </li>\n </ng-container>\n </ul>\n </div>\n</ng-container>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewChildren,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport {\n BehaviorSubject,\n combineLatest,\n filter,\n forkJoin,\n map,\n Observable,\n of,\n scan,\n Subscription,\n switchMap,\n tap,\n} from 'rxjs';\n\nimport { GlobalBookingTravelClass, LocationRouteCffService, StorageService } from '@fcom/core';\nimport { TripType } from '@fcom/core/interfaces';\nimport { convertStringDatesToDateObjects, isEmpty, isPresent, LocalDate, TzDate, unsubscribe } from '@fcom/core/utils';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare } from '@fcom/rx';\nimport { IconButtonSize, IconButtonTheme } from '@fcom/ui-components';\n\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\nimport { PreviousSearch } from '../../interfaces';\nimport { PREVIOUS_SEARCHES_KEY } from '../../constants';\nimport { BookingWidgetFlightService } from '../../services/booking-widget-flight.service';\n\n@Component({\n selector: 'fin-previous-searches',\n templateUrl: './previous-searches.component.html',\n styleUrls: ['./previous-searches.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PreviousSearchesComponent implements OnInit, OnDestroy {\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly TripType = TripType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n isGlobalBookingWidget = false;\n\n @Output()\n closeLocationModal = new EventEmitter<void>();\n\n @Output()\n focusOnSearchInput = new EventEmitter<void>();\n\n @Output()\n startSearch = new EventEmitter<void>();\n\n @ViewChildren('previousSearchItems') previousSearchItems: QueryList<ElementRef>;\n\n previousSearches$: Observable<PreviousSearch[]>;\n isMulticityListOnly$: Observable<boolean>;\n removePreviousSearchByCreationDate$: BehaviorSubject<number | null> = new BehaviorSubject<number | null>(null);\n\n private loadedPreviousSearches$: Observable<PreviousSearch[]>;\n private subscriptions: Subscription = new Subscription();\n\n constructor(\n private storageService: StorageService,\n private languageService: LanguageService,\n private locationRouteCffService: LocationRouteCffService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private bookingWidgetFlightService: BookingWidgetFlightService\n ) {}\n\n ngOnInit(): void {\n const loadedSearches = this.getPreviousSearches().filter(this.isPreviousSearchValid);\n\n this.loadedPreviousSearches$ = forkJoin(\n loadedSearches.map((search) =>\n forkJoin(\n search.flights.map((flight) =>\n combineLatest([\n this.getLang(search.locale) !== this.languageService.langKeyValue\n ? this.locationRouteCffService.bestGuessFor(\n flight.origin?.locationCode,\n this.languageService.localeValue\n )\n : of(flight.origin),\n this.getLang(search.locale) !== this.languageService.langKeyValue\n ? this.locationRouteCffService.bestGuessFor(\n flight.destination?.locationCode,\n this.languageService.localeValue\n )\n : of(flight.destination),\n ]).pipe(\n map(([origin, destination]) => ({\n ...flight,\n origin: {\n ...flight.origin,\n cityName: origin.cityName,\n },\n destination: {\n ...flight.destination,\n cityName: destination.cityName,\n },\n }))\n )\n )\n ).pipe(\n map((flights) => ({\n ...search,\n flights,\n locale: this.languageService.localeValue,\n tripType: search.tripType ?? search.travelType,\n travelClass: search.travelClass.toUpperCase() as GlobalBookingTravelClass,\n }))\n )\n )\n ).pipe(\n tap((previousSearches) => {\n if (previousSearches.length > 0) {\n this.bookingWidgetGtmService.trackElementEvent(\n 'show-previous-searches',\n `previous-searches-${previousSearches.length}`\n );\n }\n this.persistPreviousSearches(previousSearches);\n }),\n finShare()\n );\n\n this.previousSearches$ = this.removePreviousSearchByCreationDate$.pipe(\n scan<number, number[]>((acc, creationDate) => [...acc, creationDate], []),\n switchMap((creationDateToBeRemoved) =>\n this.loadedPreviousSearches$.pipe(\n map((previousSearches) =>\n previousSearches.filter(({ creationDate }) => !creationDateToBeRemoved.includes(creationDate))\n )\n )\n ),\n finShare()\n );\n\n this.isMulticityListOnly$ = this.previousSearches$.pipe(\n map((searches) => searches.every((search) => search.tripType === TripType.MULTICITY))\n );\n\n this.subscriptions.add(\n this.previousSearches$.subscribe((previousSearches) => {\n this.persistPreviousSearches(previousSearches);\n })\n );\n\n this.subscriptions.add(\n this.removePreviousSearchByCreationDate$\n .pipe(\n switchMap((creationDateToBeRemoved) =>\n this.loadedPreviousSearches$.pipe(\n map((previousSearches) =>\n previousSearches.find(({ creationDate }) => creationDateToBeRemoved === creationDate)\n )\n )\n ),\n filter((previousSearch) => isPresent(previousSearch))\n )\n .subscribe((previousSearch) => {\n this.bookingWidgetGtmService.trackElementEvent(...this.getPreviousSearchContext('remove', previousSearch));\n })\n );\n\n this.subscriptions.add(\n this.removePreviousSearchByCreationDate$\n .pipe(\n filter(Boolean),\n switchMap(() => this.previousSearches$)\n )\n .subscribe((previousSearches) => {\n this.movePreviousSearchFocus(previousSearches);\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n setSearch(previousSearch: PreviousSearch): void {\n this.bookingWidgetFlightService.setPreviousFlightSelection(previousSearch, this.isGlobalBookingWidget);\n this.bookingWidgetGtmService.trackElementEvent(...this.getPreviousSearchContext('select', previousSearch));\n\n if (this.isGlobalBookingWidget) {\n this.startSearch.emit();\n }\n\n this.closeLocationModal.emit();\n }\n\n private getPreviousSearches = (): PreviousSearch[] => {\n const previousSearchesStorage = this.storageService.LOCAL.get(PREVIOUS_SEARCHES_KEY);\n\n try {\n return this.parsePreviousSearches(JSON.parse(previousSearchesStorage) ?? []);\n } catch {\n return [];\n }\n };\n\n /**\n * Rewrites the old format of previous searches so that multi-city can be handled.\n *\n * Also parse some date strings and converts them into LocalDate.\n */\n private parsePreviousSearches(previousSearches: PreviousSearch[]): PreviousSearch[] {\n return convertStringDatesToDateObjects(previousSearches).map((previousSearch) => {\n const search = { ...previousSearch };\n\n // Convert old format previousSearches to use the new flights array\n if (search.origin || search.destination || search.travelDates) {\n search.flights = [\n {\n origin: search.origin,\n destination: search.destination,\n departureDate: new LocalDate(search.travelDates.departureDate),\n },\n ];\n\n if (search.tripType === TripType.RETURN) {\n search.flights.push({\n origin: search.destination,\n destination: search.origin,\n departureDate: new LocalDate(search.travelDates.returnDate),\n });\n\n delete search.origin;\n delete search.destination;\n delete search.travelDates;\n }\n }\n\n return search;\n });\n }\n\n private persistPreviousSearches = (previousSearches: PreviousSearch[]): void => {\n if (isEmpty(previousSearches)) {\n this.storageService.LOCAL.remove(PREVIOUS_SEARCHES_KEY);\n } else {\n this.storageService.LOCAL.set(PREVIOUS_SEARCHES_KEY, JSON.stringify(previousSearches));\n }\n };\n\n private isPreviousSearchValid = (search: PreviousSearch): boolean => {\n if (!isPresent(search)) {\n return false;\n }\n\n const departureIsNotInPast = search.flights[0].departureDate.gte(LocalDate.now());\n const creationIsBetween14Days =\n Math.floor((TzDate.now().millis - search.creationDate) / (1000 * 60 * 60 * 24)) < 14;\n\n return departureIsNotInPast && creationIsBetween14Days;\n };\n\n private getLang = (locale: string): string | undefined => locale?.substring(0, 2);\n\n private getPreviousSearchContext = (type: string, previousSearch: PreviousSearch): [string, string] => {\n const { flights } = previousSearch;\n const locations = `${flights[0].origin.locationCode} - ${flights[0].destination.locationCode}`;\n const dates = `DEPARTURE: ${flights[0].departureDate}${\n isPresent(flights[1]?.departureDate) ? `, RETURN: ${flights[1]?.departureDate}` : ''\n }`;\n const id = `${type}-previous-search`;\n const state = `${locations}, ${dates}`;\n\n return [id, state];\n };\n\n private movePreviousSearchFocus = (previousSearches: PreviousSearch[]): void => {\n if (isEmpty(previousSearches)) {\n this.focusOnSearchInput.emit();\n return;\n }\n requestAnimationFrame(() => {\n this.previousSearchItems?.first?.nativeElement?.focus();\n });\n };\n}\n","<!-- Traditional booking grid -->\n<div\n *ngIf=\"(tripType$ | async) !== TripType.MULTICITY\"\n class=\"selector-grid grid-col-12 no-gutters\"\n data-testid=\"booking-widget\"\n [ngClass]=\"[layout, isGlobalBookingWidget ? WidgetTheme.DARK : WidgetTheme.LIGHT]\"\n>\n <fin-trip-type-selector\n [isGlobalBookingWidget]=\"isGlobalBookingWidget\"\n [enableMultiCity]=\"enableMultiCity\"\n [returnDateMissing]=\"!(this.travelDates$ | async)?.returnDate\"\n [isSearchEnabled]=\"shouldSearchBeEnabled$ | async\"\n (setTripType)=\"setTripType($event)\"\n (startSearch)=\"startSearch()\"\n (openCalendar)=\"openCalendar()\"\n ></fin-trip-type-selector>\n <fin-location-selector\n [locationPair$]=\"locations$\"\n [showPreviousSearches]=\"true\"\n (setLocations)=\"setLocations($event)\"\n [isGlobalBookingWidget]=\"isGlobalBookingWidget\"\n (locationsSwitched)=\"startSearch()\"\n (startSearch)=\"startSearch()\"\n ></fin-location-selector>\n\n @if ((showCompact$ | async) === false || isGlobalBookingWidget) {\n <fin-pax-amount-selector\n [enableNewSearchAutomatically]=\"isGlobalBookingWidget\"\n (setPaxAmount)=\"setPaxAmount($event)\"\n (startSearch)=\"startSearch()\"\n [isSearchEnabled]=\"shouldSearchBeEnabled$ | async\"\n ></fin-pax-amount-selector>\n <fin-travel-dates-selector\n [tripType$]=\"tripType$\"\n [travelClass$]=\"travelClass$\"\n [paxAmount$]=\"paxAmount$\"\n [locations$]=\"locations$\"\n [travelDates$]=\"travelDates$\"\n [priceCalendarType]=\"\n (bookingFlowType$ | async) === WidgetTab.AWARD ? PriceCalendarType.ONLY_DATES : PriceCalendarType.PRICES\n \"\n [isOneway$]=\"(tripType$ | async) === TripType.ONEWAY | finToObservable\"\n [showAddReturn]=\"(tripType$ | async) === TripType.ONEWAY\"\n [enableNewSearchAutomatically]=\"isGlobalBookingWidget\"\n [showFlexibleDatesSelection]=\"showFlexibleDatesSelection$ | async\"\n [showTripPriceFrom]=\"showTripPriceFrom$ | async\"\n (setTravelDates)=\"setTravelDates($event, false)\"\n (setFlexibleDates)=\"setFlexibleDates($event)\"\n (addReturn)=\"onAddReturnClick()\"\n [isSearchEnabled]=\"shouldSearchBeEnabled$ | async\"\n (startSearch)=\"startSearch()\"\n (cancelSelection)=\"cancelTravelDatesSelection()\"\n ></fin-travel-dates-selector>\n }\n</div>\n\n<!-- Multicity booking grid -->\n<ng-container *ngIf=\"(tripType$ | async) === TripType.MULTICITY\">\n @if (enableMultiCity && (isNewMultiCityNotificationVisible$ | async)) {\n <fcom-notification\n [theme]=\"NotificationTheme.INFO\"\n [title]=\"'bookingSearch.multiCityNewNotificationTitle' | finLocalization\"\n [linkText]=\"'bookingSearch.multiCityNewNotificationLinkText' | finLocalization\"\n [linkOpenInNewWindow]=\"true\"\n [linkUrl]=\"'bookingSearch.multiCityNewNotificationLinkUrl.url' | finLocalization\"\n [isClosable]=\"true\"\n (closeClick)=\"hideNewMultiCityNotification()\"\n class=\"mr-medium-b\"\n data-testid=\"booking-widget-multicity-notification\"\n >\n {{ 'bookingSearch.multiCityNewNotificationDescription' | finLocalization }}\n </fcom-notification>\n }\n\n <div data-testid=\"booking-widget-multicity\" class=\"selector-grid multicity grid-col-12 no-gutters ms-small-b\">\n <fin-trip-type-selector\n [isGlobalBookingWidget]=\"isGlobalBookingWidget\"\n [enableMultiCity]=\"enableMultiCity\"\n (setTripType)=\"setTripType($event)\"\n ></fin-trip-type-selector>\n <fin-pax-amount-selector (setPaxAmount)=\"setPaxAmount($event)\"></fin-pax-amount-selector>\n </div>\n <fin-multicity-selector\n data-testid=\"multi-city-selector\"\n [enableMultiCity]=\"enableMultiCity\"\n ></fin-multicity-selector>\n</ng-container>\n<!-- Footer -->\n<div\n #footer\n class=\"footer ps-medium-t\"\n *ngIf=\"(showCompact$ | async) === false || isGlobalBookingWidget || (tripType$ | async) === TripType.MULTICITY\"\n [class.flex]=\"layout === WidgetLayout.HORIZONTAL\"\n [ngClass]=\"{\n 'flex flex--space-between flex--middle white-text':\n layout === WidgetLayout.HORIZONTAL && (bookingFlowType$ | async) !== WidgetTab.AWARD,\n 'flex--end': layout === WidgetLayout.HORIZONTAL && (bookingFlowType$ | async) === WidgetTab.AWARD,\n }\"\n data-testid=\"booking-widget-footer\"\n>\n <div *ngIf=\"showDiscountCode$ | async\" [class.ps-medium-b]=\"!isGlobalBookingWidget\">\n <fin-discount-code\n [isGlobalBookingWidget]=\"isGlobalBookingWidget\"\n (startSearch)=\"startSearch()\"\n ></fin-discount-code>\n </div>\n <div class=\"flex flex--middle flex--end\">\n <div class=\"flex-2\" *ngIf=\"showFooterPrice$ | async\" data-testid=\"booking-widget-footer-price\">\n <ng-container *ngIf=\"(tripType$ | async) !== TripType.MULTICITY\">\n <div class=\"font-body-1 regular-type\">\n {{\n ((tripType$ | async) === TripType.ONEWAY\n ? 'bookingWidget.priceCalendar.oneWayPerAdult'\n : 'bookingWidget.priceCalendar.roundTripPerAdult'\n ) | finLocalization\n }}\n </div>\n <div class=\"nordic-900-text bold-type font-heading-4\">\n {{ startingPrice$ | async | finPrice: { stripZeroCents: true, useSymbol: true } | finEmpty: '–' }}\n </div>\n </ng-container>\n </div>\n\n @if (!isGlobalBookingWidget) {\n <fcom-button\n class=\"continue-btn\"\n [class.ps-xxsmall-b]=\"isGlobalBookingWidget\"\n [theme]=\"ButtonTheme.LIGHT_PRIMARY_CTA_HEATHER\"\n [size]=\"ButtonSize.LARGE\"\n [mode]=\"ButtonMode.FILL\"\n [loading]=\"loading$ | async\"\n [aria]=\"{ loadingLabel: 'actions.loading' | finLocalization }\"\n [text]=\"(isGlobalBookingWidget ? 'bookingSearch.startNewSearch' : 'bookingSearch.search') | finLocalization\"\n [disabled]=\"\n isGlobalBookingWidget ? (isNewSearchEnabled$ | async) === false : (continueEnabled$ | async) === false\n \"\n (clickBtn)=\"startSearch()\"\n data-testid=\"booking-widget-search-button\"\n >\n </fcom-button>\n }\n </div>\n</div>\n<fin-booking-widget-notifications\n [ngClass]=\"{ 'white-text': isGlobalBookingWidget }\"\n [locations$]=\"flights$\"\n [tripType$]=\"tripType$\"\n [profile$]=\"profile$\"\n></fin-booking-widget-notifications>\n<fin-air-calendar\n *ngIf=\"airCalendarPrices$ | async\"\n [paxAmount$]=\"paxAmount$\"\n [travelDates$]=\"travelDates$\"\n [tripType$]=\"tripType$\"\n [prices$]=\"airCalendarPrices$\"\n [isAward]=\"(bookingFlowType$ | async) === WidgetTab.AWARD\"\n [totalPoints]=\"(profile$ | async)?.awardPoints\"\n (selectDates)=\"setTravelDates($event, true)\"\n (continue)=\"navigateToBookingFlow(true, $event)\"\n></fin-air-calendar>\n","import {\n ChangeDetectionStrategy,\n Component,\n Input,\n OnDestroy,\n OnInit,\n Output,\n AfterViewInit,\n EventEmitter,\n ViewChild,\n ElementRef,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport {\n combineLatest,\n map,\n Observable,\n of,\n Subject,\n Subscription,\n take,\n filter,\n withLatestFrom,\n observeOn,\n asyncScheduler,\n skip,\n BehaviorSubject,\n distinctUntilChanged,\n} from 'rxjs';\nimport { select, Store } from '@ngrx/store';\n\nimport { GlobalBookingFlight, LocationPair, getViewedNotifications, NotificationActions } from '@fcom/common/store';\nimport {\n GlobalBookingTravelClass,\n unsubscribe,\n isEmptyObjectOrHasEmptyValues,\n WindowRef,\n isPresent,\n AppState,\n RootPaths,\n AppPreloadingStrategyService,\n ConfigService,\n compareAsJson,\n isNotEmpty,\n} from '@fcom/core';\nimport { ButtonTheme, ButtonSize, ButtonMode, NotificationTheme, PopoverService } from '@fcom/ui-components';\nimport {\n TripType,\n GlobalBookingTripDates,\n HotjarCaptureEvent,\n HotjarService,\n PriceCalendarService,\n MediaQueryService,\n} from '@fcom/common';\nimport { Amount, PaxAmount } from '@fcom/dapi';\nimport { LoginStatus, Profile } from '@fcom/core-api/login';\nimport { AirCalendarList } from '@fcom/dapi/api/models';\nimport { PriceCalendarType } from '@fcom/common/components/price-calendar/price-calendar.component';\nimport { locationPairIncludesTrainDestination } from '@fcom/common-booking/utils/common-booking.utils';\nimport { finShare } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { BOOKING_WIDGET_CONTEXT } from '../../constants';\nimport {\n DatePickerPrices,\n PaxUpdateEvent,\n WidgetTab,\n WidgetLayout,\n ExpanderStatus,\n WidgetTheme,\n SelectionType,\n LocationParam,\n LocationType,\n NotificationWarning,\n} from '../../interfaces';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { BookingWidgetFlightService } from '../../services/booking-widget-flight.service';\nimport { BookingWidgetTripService } from '../../services/booking-widget-trip.service';\nimport { TravelDatesSelectorComponent } from '../../components/travel-dates-selector/travel-dates-selector.component';\nimport { seasonalNotificationHandler } from '../../utils/utils';\nimport { BookingWidgetActions } from '../../store';\n\n@Component({\n selector: 'fin-booking-widget-common',\n templateUrl: './booking-widget-common.component.html',\n styleUrls: ['./booking-widget-common.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BookingWidgetCommonComponent implements OnInit, OnDestroy, AfterViewInit {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly TripType = TripType;\n readonly WidgetTab = WidgetTab;\n readonly LoginStatus = LoginStatus;\n readonly WidgetLayout = WidgetLayout;\n readonly WidgetTheme = WidgetTheme;\n readonly SelectionType = SelectionType;\n readonly LocationType = LocationType;\n readonly NotificationTheme = NotificationTheme;\n readonly NEW_MULTI_CITY_NOTIFICATION_ID = 87731561;\n readonly PriceCalendarType = PriceCalendarType;\n\n @Input()\n compactMode = false;\n\n @Input()\n defaultLocations$: Observable<LocationPair[]> = of([]);\n\n @Input()\n layout: WidgetLayout = WidgetLayout.DEFAULT;\n\n @Input()\n isGlobalBookingWidget = false;\n\n @Input()\n usePopoverSelectors = false;\n\n @Input()\n identifier: string;\n\n @Input()\n isFrontPage = false;\n\n @Input()\n enablePromoCode = true;\n\n @Output()\n changeGlobalBookingWidgetExpanderStatus = new EventEmitter<ExpanderStatus>();\n\n @ViewChild('footer', { static: false, read: ElementRef })\n footer: ElementRef<HTMLElement>;\n\n @ViewChild(TravelDatesSelectorComponent, { static: false })\n travelDatesSelector: TravelDatesSelectorComponent;\n\n tripType$: Observable<TripType>;\n travelClass$: Observable<GlobalBookingTravelClass>;\n availableTravelClasses$: Observable<GlobalBookingTravelClass[]>;\n paxAmount$: Observable<PaxAmount>;\n locations$: Observable<LocationPair>;\n flights$: Observable<GlobalBookingFlight[]>;\n travelDates$: Observable<GlobalBookingTripDates>;\n startingPrice$: Observable<Amount> = of(null);\n continueEnabled$: Observable<boolean>;\n prices$: Observable<DatePickerPrices>;\n airCalendarPrices$: Observable<AirCalendarList>;\n discountCode$: Observable<string>;\n profile$: Observable<Profile>;\n loginStatus$: Observable<LoginStatus>;\n loading$: Subject<boolean> = new Subject<boolean>();\n isNewSearchEnabled$ = of(false);\n showCompact$ = of(true);\n subscription = new Subscription();\n showDiscountCode$: Observable<boolean>;\n enableMultiCity: boolean;\n bookingFlowType$: Observable<WidgetTab> = of(WidgetTab.FLIGHT);\n shouldFocusWidgetContent$: Subject<void> = new Subject<void>();\n isNewMultiCityNotificationVisible$: Observable<boolean>;\n /**\n * @description When parameters changed and are valid you can enable the search again\n */\n shouldSearchBeEnabled$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n showFlexibleDatesSelection$: Observable<boolean>;\n showFooterPrice$: Observable<boolean>;\n showTripPriceFrom$: Observable<boolean>;\n private newSearch$: Subject<boolean> = new Subject<boolean>();\n\n constructor(\n private bookingWidgetService: BookingWidgetService,\n private bookingWidgetFlightService: BookingWidgetFlightService,\n private bookingWidgetTripService: BookingWidgetTripService,\n private windowRef: WindowRef,\n private store$: Store<AppState>,\n private hotjarService: HotjarService,\n private preloadStrategyService: AppPreloadingStrategyService,\n private priceCalendarService: PriceCalendarService,\n private configService: ConfigService,\n private mediaQueryService: MediaQueryService,\n private popoverService: PopoverService,\n private languageService: LanguageService,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n this.subscription.add(\n combineLatest([\n this.bookingWidgetService.flightSearchParams$,\n this.bookingWidgetService.currentSearch$,\n ]).subscribe(([currentParams, lastSearch]) => {\n const areSameParams = compareAsJson(currentParams, lastSearch);\n if (!areSameParams) {\n const isValid = this.bookingWidgetService.validateFlightSearchParams(currentParams);\n this.shouldSearchBeEnabled$.next(isValid);\n } else {\n this.shouldSearchBeEnabled$.next(false);\n }\n })\n );\n this.bookingWidgetService.setCurrentSearchToCurrentParams();\n //Test change flight param and isValid=true\n this.enableMultiCity = this.configService.cfg.enableMultiCity;\n this.bookingWidgetService.setUsePopoverSelectors(this.usePopoverSelectors && this.isGlobalBookingWidget);\n\n // Selections\n this.paxAmount$ = this.bookingWidgetTripService.paxAmount$;\n this.tripType$ = this.bookingWidgetTripService.selectedTripType$;\n this.travelDates$ = this.bookingWidgetService.travelDates$;\n this.travelClass$ = this.bookingWidgetTripService.selectedTravelClass$;\n this.locations$ = this.bookingWidgetFlightService.locations$;\n this.flights$ = this.bookingWidgetFlightService.flights$;\n this.discountCode$ = this.bookingWidgetService.discountCode$;\n this.showCompact$ = this.bookingWidgetService.showCompact$.pipe(\n map((showCompact) => showCompact && this.compactMode)\n );\n // Utility\n this.profile$ = this.bookingWidgetService.profile$;\n this.availableTravelClasses$ = this.bookingWidgetTripService.availableTravelClasses$;\n this.loginStatus$ = this.bookingWidgetService.loginStatus$;\n\n this.continueEnabled$ = this.bookingWidgetService.continueEnabled$;\n this.bookingFlowType$ = this.bookingWidgetTripService.activeTab$;\n\n // Prices\n this.airCalendarPrices$ = this.bookingWidgetService.airCalendarPrices$;\n this.prices$ = this.bookingWidgetService.prices$;\n this.startingPrice$ = this.priceCalendarService.startingFromPrice$;\n //set default location\n this.bookingWidgetFlightService.setDefaultLocations(this.defaultLocations$);\n\n //reset the change status of booking widget\n this.bookingWidgetService.resetLocalOriginalBookingSelection();\n\n this.showDiscountCode$ = combineLatest([this.bookingFlowType$, this.tripType$]).pipe(\n map(([bookingFlowType, tripType]) => {\n if (!this.enablePromoCode) {\n return false;\n }\n\n if (bookingFlowType !== WidgetTab.FLIGHT) {\n return false;\n }\n\n if (!this.enableMultiCity) {\n return true;\n }\n\n return this.enableMultiCity && tripType !== TripType.MULTICITY;\n })\n );\n\n if (this.isGlobalBookingWidget) {\n this.bookingWidgetService.setLocalOriginalBookingSelection();\n this.bookingWidgetService.setPreviousSearchChange();\n //changed status of booking widget\n\n this.subscription.add(\n this.bookingWidgetService.notificationWarning$\n .pipe(\n map((notification) =>\n Object.keys(notification)\n .filter((notificationType) => notificationType !== 'seasonalRoute')\n .reduce((filteredNotification, key) => {\n filteredNotification[key] = notification[key];\n return filteredNotification;\n }, {})\n ),\n filter((notification) => !isEmptyObjectOrHasEmptyValues(notification))\n )\n .subscribe(() => {\n this.changeGlobalBookingWidgetExpanderStatus.emit(ExpanderStatus.OPEN);\n })\n );\n }\n\n this.isNewMultiCityNotificationVisible$ = this.store$.pipe(\n select(getViewedNotifications),\n map((viewedNotifications) => {\n return !viewedNotifications.includes(this.NEW_MULTI_CITY_NOTIFICATION_ID);\n })\n );\n\n this.subscription.add(\n // on client interaction with the widget (2nd emission of booking selections), trigger preloading booking module\n this.bookingWidgetService.bookingSelections$\n .pipe(skip(1), take(1))\n .subscribe(() => this.preloadStrategyService.triggerPreload(RootPaths.BOOKING_ROOT))\n );\n\n this.showFlexibleDatesSelection$ = combineLatest([this.bookingFlowType$, this.locations$]).pipe(\n map(([bookingFlowType, locations]) => {\n if (\n this.layout === WidgetLayout.HORIZONTAL ||\n bookingFlowType === WidgetTab.AWARD ||\n locationPairIncludesTrainDestination(locations)\n ) {\n this.bookingWidgetService.setFlexibleDates(false);\n return false;\n }\n\n return true;\n }),\n finShare()\n );\n\n this.showFooterPrice$ = combineLatest([this.bookingFlowType$, this.locations$]).pipe(\n map(([bookingFlowType, locations]) => {\n if (\n this.layout === WidgetLayout.HORIZONTAL ||\n bookingFlowType === WidgetTab.AWARD ||\n locationPairIncludesTrainDestination(locations)\n ) {\n return false;\n }\n\n return true;\n }),\n finShare()\n );\n\n this.showTripPriceFrom$ = this.locations$.pipe(\n map((locations) => {\n return !locationPairIncludesTrainDestination(locations);\n }),\n finShare()\n );\n\n this.subscription.add(\n combineLatest([this.tripType$, this.travelClass$, this.locations$, this.travelDates$, this.paxAmount$])\n .pipe(\n filter(([tripType]) => tripType !== TripType.MULTICITY),\n map(([tripType, travelClass, { origin, destination }, travelDates, paxAmount]) => ({\n origin: origin?.locationCode,\n destination: destination?.locationCode,\n tripType,\n travelClass,\n initialTravelDates: travelDates,\n paxAmount,\n })),\n distinctUntilChanged(\n (prev, next) =>\n prev.origin === next.origin &&\n prev.destination === next.destination &&\n prev.tripType === next.tripType &&\n prev.travelClass === next.travelClass &&\n prev.initialTravelDates === next.initialTravelDates\n )\n )\n .subscribe((params) => this.priceCalendarService.updateParams(params))\n );\n\n this.subscription.add(\n this.newSearch$\n .pipe(\n withLatestFrom(this.mediaQueryService.isBreakpoint$('tablet_down')),\n filter(([_, isMobile]) => isMobile)\n )\n .subscribe(() => {\n this.changeGlobalBookingWidgetExpanderStatus.emit(ExpanderStatus.CLOSE);\n })\n );\n\n this.subscription.add(\n this.priceCalendarService.availability$\n .pipe(\n filter((availability) => isNotEmpty(availability) && availability.length > 0),\n withLatestFrom(this.tripType$, this.languageService.translate('date')),\n filter(([, tripType]) => tripType !== TripType.MULTICITY)\n )\n .subscribe(([availability, , dateTranslations]) => {\n const seasonalNotificationData = seasonalNotificationHandler(availability, dateTranslations);\n this.store$.dispatch(\n BookingWidgetActions.setNotificationWarning({\n key: NotificationWarning.SEASONAL_ROUTE,\n isActive: true,\n data: seasonalNotificationData,\n })\n );\n })\n );\n }\n\n ngAfterViewInit(): void {\n if (isPlatformBrowser(this.platform) && !this.isGlobalBookingWidget) {\n this.subscription.add(\n this.shouldFocusWidgetContent$\n .pipe(\n withLatestFrom(this.showCompact$),\n filter(([, showCompact]) => !showCompact),\n observeOn(asyncScheduler),\n filter(() => this.footerIsNotInView())\n )\n .subscribe(() => {\n this.footer.nativeElement.scrollIntoView({\n block: 'end',\n inline: 'nearest',\n behavior: 'smooth',\n });\n })\n );\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n if (this.isGlobalBookingWidget) {\n this.changeGlobalBookingWidgetExpanderStatus.emit(ExpanderStatus.CLOSE);\n }\n }\n\n setTripType(tripType: TripType): void {\n if (this.isGlobalBookingWidget) {\n this.bookingWidgetService.setSelectionChangeType(SelectionType.TRIP_TYPE);\n }\n this.bookingWidgetTripService.setTripType(tripType);\n\n if (tripType !== TripType.MULTICITY) {\n return;\n }\n\n if (this.enableMultiCity) {\n this.subscription.add(this.hotjarService.startCapture(HotjarCaptureEvent.MULTI_CITY_SOFT_LAUNCH).subscribe());\n }\n }\n\n openCalendar(): void {\n if (this.travelDatesSelector) {\n this.travelDatesSelector.openModal();\n }\n }\n\n setPaxAmount({ paxType, amount, updateType }: PaxUpdateEvent): void {\n if (this.isGlobalBookingWidget) {\n this.bookingWidgetService.setSelectionChangeType(SelectionType.PAX);\n }\n this.bookingWidgetTripService.setPaxAmount({ paxType, amount, updateType });\n }\n\n setLocations({ locations, locationType }: LocationParam, index = 0): void {\n if (this.isGlobalBookingWidget) {\n locationType.forEach((type) => {\n this.bookingWidgetService.setSelectionChangeType(type as unknown as SelectionType);\n });\n }\n this.bookingWidgetFlightService.setLocations(locations, index);\n this.shouldFocusWidgetContent$.next();\n }\n\n setTravelDates(dates: GlobalBookingTripDates, isAirCalendar = false): void {\n if (this.isGlobalBookingWidget) {\n this.bookingWidgetService.setSelectionChangeType(SelectionType.TRAVEL_DATES);\n }\n this.bookingWidgetService.setTravelDates(dates, 0, isAirCalendar, this.isGlobalBookingWidget);\n }\n\n setFlexibleDates(isFlexibleDates: boolean): void {\n this.bookingWidgetService.setFlexibleDates(isFlexibleDates);\n }\n\n onAddReturnClick(): void {\n if (this.isGlobalBookingWidget) {\n this.bookingWidgetService.setSelectionChangeType(SelectionType.TRIP_TYPE);\n }\n this.bookingWidgetTripService.setReturnTripType();\n }\n\n cancelTravelDatesSelection(): void {\n this.subscription.add(\n this.bookingWidgetService.currentSearch$.pipe(take(1)).subscribe((originalSelection) => {\n this.bookingWidgetService.setTravelDates(\n {\n departureDate: originalSelection.flights[0]?.departureDate,\n returnDate: originalSelection.flights[1]?.departureDate,\n },\n 0\n );\n\n this.bookingWidgetService.setTripType(originalSelection.tripType);\n this.bookingWidgetService.resetSearchSelection();\n })\n );\n }\n\n startNewSearch(): void {\n if (this.isGlobalBookingWidget) {\n this.shouldSearchBeEnabled$.next(false);\n }\n this.bookingWidgetService.startNewSearch(this.isGlobalBookingWidget);\n this.popoverService.closeByContext(BOOKING_WIDGET_CONTEXT);\n this.newSearch$.next(true);\n }\n\n navigateToBookingFlow(fromMatrix = false, airCalendarPrice: string | undefined = undefined): void {\n this.subscription.add(\n combineLatest([this.bookingWidgetService.isMultiCity$, this.flights$, this.tripType$])\n .pipe(take(1))\n .subscribe(([isMultiCity, flights, tripType]) => {\n if (isMultiCity) {\n this.bookingWidgetService.navigateToMultiCityBookingFlow(this.loading$);\n return;\n }\n //check if there are only two flights and the 1st origin as same as 2nd destination, then set triptype to return\n if (\n tripType !== TripType.RETURN &&\n flights.length === 2 &&\n flights[0].origin.locationCode === flights[1].destination.locationCode &&\n flights[0].destination.locationCode === flights[1].origin.locationCode\n ) {\n this.bookingWidgetTripService.setTripType(TripType.RETURN);\n this.bookingWidgetService.setTravelDates(\n { departureDate: flights[0].departureDate, returnDate: flights[1].departureDate },\n 0\n );\n }\n this.bookingWidgetService.navigateToBookingFlow(fromMatrix, airCalendarPrice, this.loading$);\n })\n );\n }\n\n startSearch(): void {\n this.isGlobalBookingWidget ? this.startNewSearch() : this.navigateToBookingFlow();\n }\n\n private footerIsNotInView(): boolean {\n if (!isPresent(this.footer?.nativeElement)) {\n return false;\n }\n\n const footerRect = this.footer.nativeElement.getBoundingClientRect();\n const screenBottom = this.windowRef.nativeWindow.innerHeight;\n return footerRect.y + footerRect.height > screenBottom;\n }\n\n hideNewMultiCityNotification(): void {\n this.store$.dispatch(\n NotificationActions.setViewedNotification({\n id: this.NEW_MULTI_CITY_NOTIFICATION_ID,\n })\n );\n }\n}\n","<ng-container *ngIf=\"enableMultiCity && flights$ | async as flights\" data-testid=\"multicity-selector-new\">\n <ng-container *ngFor=\"let flight of flights; index as i; first as first; last as last; trackBy: locationsHaveChanged\">\n <div class=\"flex flex--space-between flex--middle ms-xsmall-b\">\n <h2 class=\"font-body-1\" [class.ms-xsmall-y]=\"i < 2\">\n {{ 'bookingSearch.boundSelection.flightTitle' | finLocalization: { index: i + 1 } }}\n </h2>\n <fcom-icon-button\n *ngIf=\"i >= 2\"\n class=\"flex flex--center flex--self-center location-switch\"\n [icon]=\"{ name: SvgLibraryIcon.CLOSE_DELETE }\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_GHOST\"\n [size]=\"IconButtonSize.MEDIUM\"\n [aria]=\"{ label: 'bookingSearch.boundSelection.removeFlight' | finLocalization: { index: i + 1 } }\"\n (clickBtn)=\"removeFlight(i)\"\n data-testid=\"remove-flight-button\"\n >\n </fcom-icon-button>\n </div>\n <div class=\"grid-col-12 no-gutters selector-grid\" [class.ms-small-b]=\"!last\">\n <fin-location-selector\n [locationPair$]=\"flight | finToObservable\"\n [showPreviousSearches]=\"enableMultiCity\"\n [showSeparator]=\"true\"\n [showLocateMe]=\"first\"\n [showSuggestedDestinations]=\"first\"\n (setLocations)=\"setLocations($event, i)\"\n [attr.data-testid]=\"'booking-widget-full-multicity-location-selector-' + i\"\n ></fin-location-selector>\n <fin-travel-dates-selector\n [previousFlightDepartureDate$]=\"flights[i - 1]?.departureDate || null | finToObservable\"\n [travelDates$]=\"\n {\n departureDate: flight.departureDate,\n returnDate: null,\n } | finToObservable\n \"\n [priceCalendarType]=\"PriceCalendarType.ONLY_DATES\"\n [locations$]=\"\n {\n origin: flight.origin,\n destination: flight.destination,\n } | finToObservable\n \"\n [showSingular]=\"'departureDate'\"\n [showSeparator]=\"false\"\n [showAddReturn]=\"false\"\n [tripType$]=\"TripType.ONEWAY | finToObservable\"\n [showFlexibleDatesSelection]=\"false\"\n [showPerAdultPrice]=\"false\"\n (setTravelDates)=\"setTravelDates($event, i, false, enableMultiCity)\"\n [attr.data-testid]=\"'booking-widget-multicity-dates-selector-' + i\"\n ></fin-travel-dates-selector>\n </div>\n </ng-container>\n <fcom-button\n *ngIf=\"flights$ | async as flights\"\n class=\"ms-medium-y\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [text]=\"'bookingSearch.boundSelection.addFlightButton' | finLocalization\"\n [disabled]=\"flights.length === 6\"\n (clickBtn)=\"addFlight(flights.length)\"\n data-testid=\"add-flight-button\"\n >\n </fcom-button>\n</ng-container>\n\n<ng-container *ngIf=\"!enableMultiCity && flights$ | async as flights\" data-testid=\"multicity-selector-old\">\n <ng-container *ngFor=\"let flight of flights; index as i; first as first; last as last; trackBy: locationsHaveChanged\">\n <h2 class=\"font-body-1 col-f\">\n {{ 'bookingSearch.' + (first ? 'departure' : 'return') | finLocalization }}\n </h2>\n <div class=\"grid-col-12 no-gutters selector-grid\" [class.ms-small-b]=\"!last\">\n <fin-location-selector\n [locationPair$]=\"flight | finToObservable\"\n [originDisabled]=\"!first && flights[i - 1].destination === undefined\"\n [destinationDisabled]=\"last && flights[0].origin === undefined\"\n [allowedOriginContinent]=\"!first ? flights[i - 1]?.destination?.continentCode : undefined\"\n [allowedDestinationContinent]=\"last ? flights[0]?.origin?.continentCode : undefined\"\n [showSeparator]=\"false\"\n [showSuggestedDestinations]=\"first\"\n (setLocations)=\"setLocations($event, i)\"\n data-testid=\"booking-widget-multicity-location-selector\"\n ></fin-location-selector>\n <fin-travel-dates-selector\n [travelDates$]=\"\n {\n departureDate: flights[0].departureDate,\n returnDate: flights[1].departureDate,\n } | finToObservable\n \"\n [priceCalendarType]=\"PriceCalendarType.ONLY_DATES\"\n [locations$]=\"\n {\n origin: flight.origin,\n destination: flight.destination,\n } | finToObservable\n \"\n [tripType$]=\"TripType.ONEWAY | finToObservable\"\n [showSingular]=\"first ? 'departureDate' : 'returnDate'\"\n [showSeparator]=\"false\"\n [showAddReturn]=\"false\"\n (setTravelDates)=\"setTravelDates($event, i, false, enableMultiCity)\"\n (setFlexibleDates)=\"setFlexibleDates($event)\"\n data-testid=\"booking-widget-multicity-dates-selector\"\n ></fin-travel-dates-selector>\n </div>\n </ng-container>\n</ng-container>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { GlobalBookingFlight } from '@fcom/common/store';\nimport { Location, LocationSuggestions } from '@fcom/core-api';\nimport { ElementActions, ElementTypes, GaContext, GlobalBookingTripDates, TripType } from '@fcom/common';\nimport { ButtonTheme, IconButtonSize, IconButtonTheme } from '@fcom/ui-components';\nimport { GtmService } from '@fcom/common/gtm';\nimport { PriceCalendarType } from '@fcom/common/components/price-calendar/price-calendar.component';\n\nimport { LocationParam } from '../../interfaces';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { BookingWidgetFlightService } from '../../services/booking-widget-flight.service';\n\n@Component({\n selector: 'fin-multicity-selector',\n templateUrl: './multicity-selector.component.html',\n styleUrls: ['./multicity-selector.component.scss'],\n})\nexport class MulticitySelectorComponent implements OnInit {\n @Input() enableMultiCity = false;\n\n readonly ButtonTheme = ButtonTheme;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly PriceCalendarType = PriceCalendarType;\n readonly TripType = TripType;\n\n flights$: Observable<GlobalBookingFlight[]>;\n\n suggestedLocations$: Observable<LocationSuggestions>;\n\n trendingDestinations$: Observable<Location[]>;\n\n constructor(\n private bookingWidgetService: BookingWidgetService,\n private bookingWidgetFlightService: BookingWidgetFlightService,\n private gtmService: GtmService\n ) {}\n\n ngOnInit(): void {\n this.flights$ = this.bookingWidgetFlightService.flights$;\n this.suggestedLocations$ = this.bookingWidgetFlightService.suggestedLocations$;\n this.trendingDestinations$ = this.bookingWidgetFlightService.trendingDestinations$;\n }\n\n setLocations({ locations }: LocationParam, index?: number): void {\n this.bookingWidgetFlightService.setLocations(locations, index);\n }\n\n locationsHaveChanged(index: number): number {\n return index;\n }\n\n setTravelDates(dates: GlobalBookingTripDates, index: number, isAirCalendar = false, enableMultiCity: boolean): void {\n if (enableMultiCity) {\n this.bookingWidgetService.setTravelDates(dates, index, isAirCalendar, false);\n } else {\n //TODO: remove when new multicity release to all\n // update dates separately to fullfill the multi-city flight structure\n this.bookingWidgetService.setTravelDates({ departureDate: dates.departureDate }, 0, isAirCalendar, false);\n this.bookingWidgetService.setTravelDates({ departureDate: dates.returnDate }, 1, isAirCalendar, false);\n }\n }\n\n setFlexibleDates(isFlexibleDates: boolean): void {\n this.bookingWidgetService.setFlexibleDates(isFlexibleDates);\n }\n\n addFlight(index: number): void {\n this.bookingWidgetFlightService.addFlight();\n this.gtmService.trackElement(\n 'multicity-add-bound',\n GaContext.BOOKING_FLOW,\n ElementTypes.BUTTON,\n String(index),\n ElementActions.CLICK\n );\n }\n\n removeFlight(index: number): void {\n this.bookingWidgetFlightService.removeFlight(index);\n this.gtmService.trackElement(\n 'multicity-remove-bound',\n GaContext.BOOKING_FLOW,\n ElementTypes.BUTTON,\n String(index + 1),\n ElementActions.CLICK\n );\n }\n}\n","@if ((amDestination$ | finMap: 'holidayType' | async) === AmHolidayType.DP) {\n <div class=\"dates-selector-root relative fill grow separator\">\n <ng-container>\n <fin-booking-widget-selector\n [disabled]=\"disabled\"\n (click)=\"openModal()\"\n [double]=\"{\n first: {\n label: 'bookingSearch.boundSelection.departureDate' | finLocalization,\n placeholder: 'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization,\n filled: (travelDates$ | async)?.['departureDate'] !== undefined,\n },\n second: {\n label: 'bookingSearch.boundSelection.returnDate' | finLocalization,\n placeholder: 'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization,\n filled: (travelDates$ | async)?.['returnDate'] !== undefined,\n },\n }\"\n [label]=\"'bookingSearch.boundSelection.departureDate' | finLocalization\"\n [placeholder]=\"'bookingSearch.boundSelection.selectDatePlaceholder' | finLocalization\"\n [filled]=\"(travelDates$ | async)?.['departureDate'] !== undefined\"\n [attr.data-testid]=\"'am-dates-selector-both'\"\n >\n <span first *ngIf=\"(travelDates$ | async)?.['departureDate'] as selectedDate\" data-testid=\"departure-date\">{{\n selectedDate | finDateFormat: 'FULL_NO_YEAR'\n }}</span>\n <div separator class=\"flex flex--center flex--self-center absolute white-bg date-spacer ps-xxsmall z1\">\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.MINUS\"></fcom-icon>\n </div>\n <span second *ngIf=\"(travelDates$ | async)?.['returnDate'] as selectedDate\" data-testid=\"return-date\">{{\n selectedDate | finDateFormat: 'FULL_NO_YEAR'\n }}</span>\n </fin-booking-widget-selector>\n </ng-container>\n </div>\n} @else {\n <div>\n <div class=\"df-laptop-up\">\n <fin-am-duration-selector\n [selectedDuration]=\"selectedDuration$ | async\"\n [durationOptions]=\"amDestination$ | finMap: 'holidayTypeItem.items' | async\"\n (setDuration)=\"selectDuration($event)\"\n class=\"flex flex--basis-half border-right\"\n ></fin-am-duration-selector>\n <fin-booking-widget-selector\n class=\"flex flex-1\"\n [disabled]=\"disabled\"\n [position]=\"'right'\"\n [label]=\"'bookingSearch.boundSelection.departureDate' | finLocalization\"\n [attr.data-testid]=\"'travel-dates-selector-am'\"\n (click)=\"openModal()\"\n >\n <span *ngIf=\"(travelDates$ | async)?.departureDate as departureDate\" data-testid=\"departure-date\">{{\n departureDate | finDateFormat: 'FULL_NO_YEAR'\n }}</span>\n </fin-booking-widget-selector>\n </div>\n </div>\n}\n\n<fcom-modal\n [open]=\"modalOpen\"\n [fitToContent]=\"true\"\n [buttons]=\"null\"\n [fullHeight]=\"true\"\n [extraWide]=\"true\"\n [roundedContent]=\"true\"\n (close)=\"closeModal()\"\n data-testid=\"travel-dates-modal\"\n>\n <fcom-datepicker\n [uiLabels]=\"'datepicker' | finLocalization\"\n [dateLabels]=\"'date' | finLocalization\"\n [titleAreaConfiguration]=\"{\n titleAreaStyle: 'ps-large-x ps-xsmall-y',\n title: datePickerTitleLabel$ | async | finLocalization,\n titleStyle: 'font-heading-4',\n }\"\n [isDateRange]=\"(amDestination$ | finMap: 'holidayType' | async) === AmHolidayType.DP\"\n [selectableDatesRange]=\"calendarRange\"\n [disabledDateRanges]=\"disabledDateRanges$ | async\"\n [selectedDates]=\"[(travelDates$ | async)?.departureDate, (travelDates$ | async)?.returnDate]\"\n [doneBtnHidden]=\"true\"\n [showTags]=\"false\"\n [dayTemplate]=\"dayTemplate\"\n (selectedDatesChange)=\"updateCalendarDates($event)\"\n (close)=\"closeModal()\"\n ></fcom-datepicker>\n\n <div\n class=\"df-tablet-up flex--middle ps-large-x grey-50-bg font-body-1 ps-small\"\n [ngClass]=\"{\n 'travel-dates-sticky-footer': datesSelected$ | async,\n }\"\n data-testid=\"travel-dates-footer\"\n >\n <span class=\"flex flex--space-between fill travel-dates-footer-container\">\n @if ((amDestination$ | finMap: 'holidayType' | async) === AmHolidayType.AM) {\n <span class=\"flex flex--middle\">\n <fcom-icon class=\"icon-medium ms-xsmall-r\" [name]=\"SvgLibraryIcon.AM_LOGO\"></fcom-icon>\n <span>{{ 'aurinkomatkat.calendar.recommendedTravelDates' | finLocalization }}</span>\n </span>\n }\n </span>\n <div class=\"done-button align-center\">\n <fcom-button\n [text]=\"'actions.done' | finLocalization\"\n (clickBtn)=\"closeModal()\"\n data-testid=\"date-modal-close-btn\"\n ></fcom-button>\n </div>\n </div>\n</fcom-modal>\n\n<ng-template #dayTemplate let-dayValue=\"dayValue\" let-dayString=\"dayString\">\n <div class=\"calendar-day\" [attr.data-testid]=\"'calendar-day-' + dayValue.id\">\n <div\n class=\"ps-xxsmall-t\"\n [ngClass]=\"{ 'aurinkomatkat-orange-text': (suggestedAmTravelDays$ | async)?.includes(dayValue.id) }\"\n >\n {{ dayString }}\n </div>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\n\nimport {\n BehaviorSubject,\n combineLatest,\n EMPTY,\n filter,\n map,\n Observable,\n of,\n Subscription,\n switchMap,\n take,\n} from 'rxjs';\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { GlobalBookingTripDates, TripType } from '@fcom/common';\nimport { isPresent, LocalDate, unsubscribe } from '@fcom/core/utils';\nimport { ButtonMode, ButtonSize, ButtonTheme, DateRange } from '@fcom/ui-components';\nimport { finShare } from '@fcom/rx';\n\nimport { AmAvailability, AmHolidayType, AmHolidayTypeDuration, AmLocation, AmSearchable } from '../../interfaces';\n\n@Component({\n selector: 'fin-am-dates-selector',\n templateUrl: 'am-dates-selector.component.html',\n styleUrls: ['./am-dates-selector.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AmDatesSelectorComponent implements OnInit, OnDestroy {\n readonly AmHolidayType = AmHolidayType;\n readonly ButtonMode = ButtonMode;\n readonly ButtonSize = ButtonSize;\n readonly ButtonTheme = ButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TripType = TripType;\n\n @Input()\n disabled = false;\n\n @Input()\n travelDates$: Observable<GlobalBookingTripDates>;\n\n @Input()\n amDestination$: Observable<AmLocation> = of(undefined);\n\n @Input()\n amAvailability$: Observable<AmAvailability> = EMPTY;\n\n @Output()\n setTravelDates = new EventEmitter<GlobalBookingTripDates>();\n\n @Output()\n setDuration = new EventEmitter<AmHolidayTypeDuration>();\n\n subscription = new Subscription();\n modalOpen = false;\n selectedDuration$ = new BehaviorSubject<AmHolidayTypeDuration>(undefined);\n disabledDateRanges$: Observable<DateRange[]>;\n suggestedAmTravelDays$: Observable<string[]> = EMPTY;\n datePickerTitleLabel$: Observable<string>;\n calendarRange: DateRange = [LocalDate.now(), LocalDate.now().plusDays(360)];\n datesSelected$: Observable<boolean>;\n\n ngOnInit(): void {\n this.datePickerTitleLabel$ = combineLatest([this.amDestination$, this.travelDates$]).pipe(\n map(([{ holidayType }, { departureDate }]) => {\n if (holidayType === AmHolidayType.AM) {\n return 'bookingWidget.priceCalendar.selectDeparture.oneWay';\n }\n return isPresent(departureDate)\n ? 'bookingWidget.priceCalendar.selectReturn'\n : 'bookingWidget.priceCalendar.selectDeparture.roundTrip';\n })\n );\n\n this.disabledDateRanges$ = this.amDestination$.pipe(\n switchMap((amDestination) => {\n if (amDestination.holidayType === AmHolidayType.AM) {\n return of(this.calculateDisabledDatesBasedOnSearchables(amDestination.searchable));\n }\n\n return combineLatest([this.amAvailability$, this.travelDates$]).pipe(\n map(([amAvailability, travelDates]) => this.getDisabledDatesForDpHolidayType(amAvailability, travelDates))\n );\n }),\n finShare()\n );\n\n this.datesSelected$ = this.travelDates$.pipe(\n map((travelDates) => isPresent(travelDates?.departureDate) && isPresent(travelDates?.returnDate))\n );\n\n this.suggestedAmTravelDays$ = combineLatest([this.amAvailability$, this.selectedDuration$]).pipe(\n filter(([availability, duration]) => !!availability && !!duration),\n map(([availability, duration]) =>\n Object.entries(availability)\n .filter((dayEntry) => !!dayEntry[1][duration.code])\n .map((dayEntry) => dayEntry[0])\n ),\n finShare()\n );\n }\n\n selectDuration(duration: AmHolidayTypeDuration): void {\n this.selectedDuration$.next(duration);\n this.setDuration.emit(duration);\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n openModal(): void {\n this.modalOpen = true;\n }\n\n closeModal(): void {\n this.modalOpen = false;\n }\n\n updateCalendarDates(calendarDates: [string] | [string, string]): void {\n const [departureDate, returnDate] = calendarDates;\n\n // Currently the calendar emits (selectedDatesChange) events even when hovering on dates (on every render), so we'll limit\n // unnecessary emissions here by checking that the values have changed\n this.subscription.add(\n this.travelDates$\n .pipe(\n take(1),\n filter(\n (travelDates) =>\n departureDate !== travelDates.departureDate?.id || returnDate !== travelDates.returnDate?.id\n )\n )\n .subscribe(() => {\n this.setTravelDates.emit({\n departureDate: departureDate ? new LocalDate(departureDate) : undefined,\n returnDate: returnDate ? new LocalDate(returnDate) : undefined,\n });\n })\n );\n }\n\n private calculateDisabledDatesBasedOnSearchables(searchables: AmSearchable[]): DateRange[] {\n return [...searchables]\n .sort((a, b) => (a.from > b.from ? 1 : a.from === b.from ? 0 : -1))\n .reduce((disabledDateRanges: DateRange[], searchable, currentIndex, allSearchables) => {\n const returnValue = disabledDateRanges;\n\n // disable all days before first searchable's \"from\" date\n if (currentIndex === 0) {\n returnValue.push([LocalDate.now(), new LocalDate(searchable.from).minusDays(1)]);\n }\n\n // disable all days after last searchable's \"to\" date\n if (currentIndex === allSearchables.length - 1) {\n returnValue.push([new LocalDate(searchable.to).plusDays(1), new LocalDate(searchable.to).plusYears(1)]);\n } else {\n // disable days between current and next searchable if not last\n returnValue.push([\n new LocalDate(searchable.to).plusDays(1),\n new LocalDate(allSearchables[currentIndex + 1].from).minusDays(1),\n ]);\n }\n\n return returnValue;\n }, []);\n }\n\n private getDisabledDatesForDpHolidayType(\n amAvailability: AmAvailability,\n travelDates: GlobalBookingTripDates\n ): DateRange[] {\n if (travelDates.departureDate && !travelDates.returnDate) {\n return this.calculateDisabledDaysBasedOnDepartureAndAvailableDurations(amAvailability, travelDates.departureDate);\n }\n return this.calculateDisabledDaysBasedOnAvailableDays(Object.keys(amAvailability));\n }\n\n private calculateDisabledDaysBasedOnDepartureAndAvailableDurations(\n amAvailability: AmAvailability,\n departureDate: LocalDate\n ): DateRange[] {\n return Object.keys(amAvailability).length > 0\n ? this.calculateDisabledDaysBasedOnAvailableDays(\n Object.keys(amAvailability[departureDate.toISOString().substring(0, 10)] || {})\n .map((duration) => parseInt(duration, 10))\n .sort((a, b) => a - b)\n .reduce((dates: LocalDate[], duration) => [...dates, departureDate.plusDays(duration)], [departureDate])\n .map((date) => date.toISOString().substring(0, 10))\n )\n : [];\n }\n\n private calculateDisabledDaysBasedOnAvailableDays(days: string[]): DateRange[] {\n return [...days]\n .sort((a, b) => (a > b ? 1 : a === b ? 0 : -1))\n .reduce((disabledDateRanges: DateRange[], availableDay, currentIndex, availableDays) => {\n const returnValue = disabledDateRanges;\n\n if (currentIndex === 0) {\n // disable days before first available date\n returnValue.push([LocalDate.now(), new LocalDate(availableDay).minusDays(1)]);\n }\n\n // disable all days after last available day\n if (currentIndex === availableDays.length - 1) {\n returnValue.push([new LocalDate(availableDay).plusDays(1), new LocalDate(availableDay).plusYears(1)]);\n } else if (new LocalDate(availableDay).plusDays(1).lt(new LocalDate(availableDays[currentIndex + 1]))) {\n // disable days between current and next available day if not last\n returnValue.push([\n new LocalDate(availableDay).plusDays(1),\n new LocalDate(availableDays[currentIndex + 1]).minusDays(1),\n ]);\n }\n\n return returnValue;\n }, []);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { StoreModule } from '@ngrx/store';\n\nimport { ModalModule, UiComponentsModule } from '@fcom/ui-components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { PipesModule } from '@fcom/common';\nimport { DirectiveModule } from '@fcom/common/directives/directive.module';\nimport { FinFormsModule } from '@fcom/common/forms';\nimport { ComponentsModule } from '@fcom/common/components/components.module';\nimport { LoginModule } from '@fcom/common/login';\n\nimport { BOOKING_WIDGET_FEATURE_KEY } from './store/constants';\nimport { BookingWidgetCalendarService } from './services/booking-widget-calendar.service';\nimport { BookingWidgetAmService } from './services/booking-widget-am.service';\nimport {\n AirCalendarComponent,\n AmBookingWidgetComponent,\n AmDurationSelectorComponent,\n AmRoomSelectorComponent,\n BookingWidgetCommonComponent,\n BookingWidgetComponent,\n BookingWidgetNotificationComponent,\n BookingWidgetSelectorComponent,\n CarTrawlerBookingWidgetComponent,\n DiscountCodeComponent,\n GlobalBookingWidgetSummaryHeaderComponent,\n LocationSelectorComponent,\n MulticitySelectorComponent,\n PaxAmountSelectorComponent,\n PreviousSearchesComponent,\n TravelDatesSelectorComponent,\n TripTypeSelectorComponent,\n AmDatesSelectorComponent,\n} from './components';\nimport { bookingWidgetReducer } from './store/reducers/booking-widget.reducer';\nimport { BookingWidgetGtmService } from './services/booking-widget-gtm.service';\n\n@NgModule({\n imports: [\n CommonModule,\n PipesModule,\n UiComponentsModule,\n UiTranslateModule,\n DirectiveModule,\n ModalModule,\n FinFormsModule,\n ComponentsModule,\n LoginModule,\n StoreModule.forFeature(BOOKING_WIDGET_FEATURE_KEY, bookingWidgetReducer),\n ],\n providers: [BookingWidgetCalendarService, BookingWidgetGtmService, BookingWidgetAmService],\n declarations: [\n AirCalendarComponent,\n BookingWidgetComponent,\n BookingWidgetSelectorComponent,\n PaxAmountSelectorComponent,\n LocationSelectorComponent,\n PreviousSearchesComponent,\n TripTypeSelectorComponent,\n TravelDatesSelectorComponent,\n DiscountCodeComponent,\n BookingWidgetNotificationComponent,\n AmBookingWidgetComponent,\n AmRoomSelectorComponent,\n AmDurationSelectorComponent,\n AmDatesSelectorComponent,\n GlobalBookingWidgetSummaryHeaderComponent,\n BookingWidgetCommonComponent,\n MulticitySelectorComponent,\n CarTrawlerBookingWidgetComponent,\n ],\n exports: [\n BookingWidgetComponent,\n BookingWidgetSelectorComponent,\n GlobalBookingWidgetSummaryHeaderComponent,\n BookingWidgetCommonComponent,\n TravelDatesSelectorComponent,\n ],\n})\nexport class BookingWidgetModule {}\n","export const BOOKING_WIDGET_FEATURE_KEY = 'bookingWidget';\n","import { Observable } from '../Observable';\nimport { ObservableInputTuple } from '../types';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { EMPTY } from './empty';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { popResultSelector } from '../util/args';\n\nexport function zip<A extends readonly unknown[]>(sources: [...ObservableInputTuple<A>]): Observable<A>;\nexport function zip<A extends readonly unknown[], R>(\n sources: [...ObservableInputTuple<A>],\n resultSelector: (...values: A) => R\n): Observable<R>;\nexport function zip<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;\nexport function zip<A extends readonly unknown[], R>(\n ...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]\n): Observable<R>;\n\n/**\n * Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each\n * of its input Observables.\n *\n * If the last parameter is a function, this function is used to compute the created value from the input values.\n * Otherwise, an array of the input values is returned.\n *\n * ## Example\n *\n * Combine age and name from different sources\n *\n * ```ts\n * import { of, zip, map } from 'rxjs';\n *\n * const age$ = of(27, 25, 29);\n * const name$ = of('Foo', 'Bar', 'Beer');\n * const isDev$ = of(true, true, false);\n *\n * zip(age$, name$, isDev$).pipe(\n * map(([age, name, isDev]) => ({ age, name, isDev }))\n * )\n * .subscribe(x => console.log(x));\n *\n * // Outputs\n * // { age: 27, name: 'Foo', isDev: true }\n * // { age: 25, name: 'Bar', isDev: true }\n * // { age: 29, name: 'Beer', isDev: false }\n * ```\n *\n * @param args Any number of `ObservableInput`s provided either as an array or as an object\n * to combine with each other.\n * @return An Observable of array values of the values emitted at the same index from each\n * individual `ObservableInput`.\n */\nexport function zip(...args: unknown[]): Observable<unknown> {\n const resultSelector = popResultSelector(args);\n\n const sources = argsOrArgArray(args) as Observable<unknown>[];\n\n return sources.length\n ? new Observable<unknown[]>((subscriber) => {\n // A collection of buffers of values from each source.\n // Keyed by the same index with which the sources were passed in.\n let buffers: unknown[][] = sources.map(() => []);\n\n // An array of flags of whether or not the sources have completed.\n // This is used to check to see if we should complete the result.\n // Keyed by the same index with which the sources were passed in.\n let completed = sources.map(() => false);\n\n // When everything is done, release the arrays above.\n subscriber.add(() => {\n buffers = completed = null!;\n });\n\n // Loop over our sources and subscribe to each one. The index `i` is\n // especially important here, because we use it in closures below to\n // access the related buffers and completion properties\n for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {\n innerFrom(sources[sourceIndex]).subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n buffers[sourceIndex].push(value);\n // if every buffer has at least one value in it, then we\n // can shift out the oldest value from each buffer and emit\n // them as an array.\n if (buffers.every((buffer) => buffer.length)) {\n const result: any = buffers.map((buffer) => buffer.shift()!);\n // Emit the array. If theres' a result selector, use that.\n subscriber.next(resultSelector ? resultSelector(...result) : result);\n // If any one of the sources is both complete and has an empty buffer\n // then we complete the result. This is because we cannot possibly have\n // any more values to zip together.\n if (buffers.some((buffer, i) => !buffer.length && completed[i])) {\n subscriber.complete();\n }\n }\n },\n () => {\n // This source completed. Mark it as complete so we can check it later\n // if we have to.\n completed[sourceIndex] = true;\n // But, if this complete source has nothing in its buffer, then we\n // can complete the result, because we can't possibly have any more\n // values from this to zip together with the other values.\n !buffers[sourceIndex].length && subscriber.complete();\n }\n )\n );\n }\n\n // When everything is done, release the arrays above.\n return () => {\n buffers = completed = null!;\n };\n })\n : EMPTY;\n}\n","<div class=\"align-left\">\n <div class=\"flex flex--column-reverse\">\n <div class=\"flex flex--middle ms-medium-b\">\n <h1 *ngIf=\"useH1\" class=\"font-heading-4\">Hi! Please set your location and language.</h1>\n <h4 *ngIf=\"!useH1\" tabindex=\"0\">Location and language</h4>\n </div>\n <div class=\"flex flex--space-between flex--align-start\">\n <fcom-icon\n *ngIf=\"!useH1\"\n class=\"icon-medium ms-xsmall-r flex--self-center\"\n [name]=\"SvgLibraryIcon.LANGUAGE\"\n ></fcom-icon>\n <fcom-icon-button\n *ngIf=\"showCloseButton\"\n [icon]=\"{ name: SvgLibraryIcon.CLOSE_DELETE }\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_GHOST\"\n [size]=\"IconButtonSize.MEDIUM\"\n [aria]=\"{ label: 'Close' }\"\n (clickBtn)=\"emitClose()\"\n data-testid=\"country-selector-close-button\"\n >\n </fcom-icon-button>\n </div>\n </div>\n <div class=\"relative\" [ngClass]=\"{ 'show-flag': showFlag }\">\n <span\n *ngIf=\"showFlag\"\n class=\"flag flag-{{ formGroup.controls.country.value | lowercase }} absolute ms-small-l z1\"\n ></span>\n <fin-combo-box\n [id]=\"'select-country'\"\n [label]=\"'Location'\"\n [parentForm]=\"formGroup\"\n [controlName]=\"'country'\"\n [translationPrefix]=\"'countryLanguageSelectorEnOnly'\"\n [options]=\"countryOptions\"\n [searchable]=\"true\"\n [searchLabel]=\"'Select or start typing'\"\n [clearSearchLabel]=\"'Clear search'\"\n [optionTemplate]=\"countryOptionTemplate\"\n [infoText]=\"\n (showCountryShopWarning$ | async) ? 'Prices on this site are in the currency of the country of departure.' : ''\n \"\n (dropDownOpen)=\"updateShowFlag($event)\"\n ></fin-combo-box>\n </div>\n\n <div>\n <fin-combo-box\n [id]=\"'select-language'\"\n [label]=\"'Language'\"\n [selectLabelTranslationKey]=\"'countryLanguageSelectorEnOnly.selectLabel'\"\n [parentForm]=\"formGroup\"\n [controlName]=\"'language'\"\n [translationPrefix]=\"'countryLanguageSelectorEnOnly'\"\n [options]=\"languageOptions$ | async\"\n [selectLabel]=\"'Select'\"\n [disableSelectOption]=\"(languageOptions$ | async) === undefined\"\n ></fin-combo-box>\n </div>\n\n <fcom-notification *ngIf=\"showWarning\" [theme]=\"NotificationTheme.WARNING\" class=\"block ms-medium-b\">\n Changing these preferences will reload the page, and the input information will be lost.\n </fcom-notification>\n\n <div>\n <fcom-button\n [disabled]=\"!formGroup.valid\"\n [mode]=\"ButtonMode.FILL\"\n (clickBtn)=\"apply()\"\n [text]=\"'Apply preferences'\"\n data-testid=\"apply-button\"\n ></fcom-button>\n </div>\n</div>\n\n<ng-template #countryOptionTemplate let-name=\"name\" let-value=\"value\">\n <span class=\"flex ps-small fill\"\n ><span class=\"flag flag-{{ value | lowercase }} mr-xsmall-r\"></span><span>{{ name }}</span></span\n >\n</ng-template>\n","import { Component, EventEmitter, OnDestroy, OnInit, Input, Output } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, Observable, Subscription, map, startWith, tap } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ButtonMode, IconButtonSize, IconButtonTheme, NotificationTheme } from '@fcom/ui-components';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { CountryState } from '@fcom/core';\nimport { finShare } from '@fcom/rx';\n\nimport { SelectOption } from '../../interfaces';\nimport { getCountryStates } from '../../utils/language.utils';\nimport { COUNTRY_SHOP_COUNTRIES } from '../../utils/booking-common.utils';\n\nexport interface CountryAndLanguageSelection {\n country: string;\n languageCode: string;\n}\n\n@Component({\n selector: 'fin-country-and-language-selector',\n templateUrl: './country-and-language-selector.component.html',\n styleUrls: ['country-and-language-selector.component.scss'],\n})\nexport class CountryAndLanguageSelectorComponent implements OnInit, OnDestroy {\n readonly ButtonMode = ButtonMode;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n showWarning = false;\n\n @Input()\n useH1 = false;\n\n @Input()\n prefill = true;\n\n @Input()\n showCloseButton = true;\n\n @Output()\n applySelection = new EventEmitter<CountryAndLanguageSelection>();\n\n @Output()\n closeClick = new EventEmitter<void>();\n\n subscriptions: Subscription = new Subscription();\n countries: CountryState[] = getCountryStates();\n\n countryOptions: SelectOption[];\n formGroup: UntypedFormGroup;\n showFlag = false;\n\n languageOptions$: Observable<SelectOption[]>;\n showCountryShopWarning$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private fb: UntypedFormBuilder,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n this.countryOptions = this.countries.map(({ name, code }) => ({ name, value: code }));\n\n const langValue = this.languageService.langValue === 'master-en' ? 'gb-en' : this.languageService.langValue;\n\n const country = langValue?.includes('-') ? langValue.split('-')?.[0] : 'int';\n\n this.formGroup = this.fb.group({\n country: this.fb.control(this.prefill ? country.toUpperCase() : '', Validators.required),\n language: this.fb.control('', Validators.required),\n });\n\n this.languageOptions$ = this.formGroup.get('country').valueChanges.pipe(\n startWith(this.prefill ? country.toUpperCase() : ''),\n tap((countryCode) => {\n this.showCountryShopWarning$.next(countryCode && !COUNTRY_SHOP_COUNTRIES.includes(countryCode.toLowerCase()));\n }),\n map(\n (countryCode) =>\n this.countries\n .find((country) => country.code === countryCode)\n ?.languages.map((countryLanguage) => ({ name: countryLanguage.name, value: countryLanguage.code })) || []\n ),\n finShare()\n );\n\n this.subscriptions.add(\n this.languageOptions$.subscribe((options) => {\n if (!options || options.length === 0) {\n this.formGroup.controls.language.disable();\n } else {\n this.formGroup.controls.language.enable();\n const matchingValue = options.find((option) => option.value === langValue);\n\n if (matchingValue) {\n this.formGroup.controls.language.setValue(matchingValue.value);\n } else if (options.length === 1) {\n this.formGroup.controls.language.setValue(options[0].value);\n }\n\n if (options.length === 1) {\n this.formGroup.controls.language.disable();\n }\n\n this.showFlag = true;\n }\n })\n );\n }\n\n apply(): void {\n const country = this.formGroup.controls.country.value;\n const languageCode = this.formGroup.controls.language.value;\n\n this.applySelection.emit({ country, languageCode });\n }\n\n updateShowFlag(dropDownOpen: boolean): void {\n this.showFlag = !dropDownOpen && this.formGroup.controls.country.value;\n }\n\n emitClose(): void {\n this.closeClick.emit();\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","<ng-container *ngIf=\"loggedInProfile$ | async as loggedInProfile; else loginCard\">\n <fin-greeting-card *ngIf=\"showGreeting\" [firstName]=\"loggedInProfile.firstname\"></fin-greeting-card>\n</ng-container>\n\n<ng-template #loginCard>\n <fin-login-card\n *ngIf=\"(loginStatus$ | async) === LoginStatus.NOT_LOGGED_IN\"\n [title]=\"'loginPromotion.loginHeading.inPaxDetails'\"\n [benefitText]=\"'loginPromotion.benefitText'\"\n [footnoteText]=\"'loginPromotion.footNote'\"\n [showIcon]=\"false\"\n [benefitMode]=\"'list'\"\n >\n </fin-login-card>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { filter, Observable, Subscription } from 'rxjs';\nimport { pairwise } from 'rxjs/operators';\n\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { LoginStatus, Profile } from '@fcom/core-api/login';\nimport { loginStatus, profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { ScrollService } from '@fcom/common/services';\nimport { unsubscribe } from '@fcom/core/utils';\n\n@Component({\n selector: 'fin-login-promotion',\n templateUrl: './login-promotion.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LoginPromotionComponent implements OnInit, OnDestroy {\n @Input() showGreeting = true;\n\n loggedInProfile$: Observable<Profile>;\n loginStatus$: Observable<LoginStatus>;\n\n private subscriptions: Subscription = new Subscription();\n readonly LoginStatus = LoginStatus;\n\n constructor(\n private store: Store<BookingAppState>,\n private elementRef: ElementRef,\n private scrollService: ScrollService\n ) {}\n\n ngOnInit(): void {\n this.loggedInProfile$ = this.store.pipe(profileOrUndefinedIfNotLoggedIn());\n this.loginStatus$ = this.store.pipe(loginStatus());\n\n this.subscriptions.add(\n this.loginStatus$\n .pipe(\n pairwise(),\n filter(([prev, current]) => {\n // only do the scroll when the login is done on this page, do not scroll when the user logged in on a previous step. pending > logged_in is how to detect this.\n return prev === LoginStatus.PENDING && current === LoginStatus.LOGGED_IN;\n })\n )\n .subscribe(() => {\n this.scrollService.smoothScroll(this.elementRef, { offsetY: 60 });\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n}\n","/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse, HttpContext } from '@angular/common/http';\nimport { catchErrorAsJson } from '@fcom/rx';\nimport { DapiBaseService } from '../dapi-base-service';\nimport { DapiHttpResponse } from '../dapi-http-response';\nimport { DapiRequestBuilder } from '../dapi-request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { FinnairAdvancePassengerInformationRequest } from '../models/finnair-advance-passenger-information-request';\nimport { FinnairAdvancePassengerInformationRequestV2 } from '../models/finnair-advance-passenger-information-request-v-2';\n\n\n/**\n * APIS details\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AdvancePassengerInformationService extends DapiBaseService {\n constructor(\n http: HttpClient\n ) {\n super(http);\n }\n\n /**\n * Path part for operation updateAdvancePassengerInformation\n */\n static readonly UpdateAdvancePassengerInformationPath = '/api/v2/order/{orderId}/advance-passenger-information';\n\n /**\n * postAdvancePassengerInformation.\n *\n * Adds/Updates advance passenger information to the order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `updateAdvancePassengerInformation()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updateAdvancePassengerInformation$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: Array<FinnairAdvancePassengerInformationRequest>\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<void>> {\n const rb = new DapiRequestBuilder(rootUrl, AdvancePassengerInformationService.UpdateAdvancePassengerInformationPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as DapiHttpResponse<void>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * postAdvancePassengerInformation.\n *\n * Adds/Updates advance passenger information to the order\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `updateAdvancePassengerInformation$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updateAdvancePassengerInformation(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: Array<FinnairAdvancePassengerInformationRequest>\n },\n context?: HttpContext\n\n): Observable<void> {\n return this.updateAdvancePassengerInformation$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation updateApis\n */\n static readonly UpdateApisPath = '/api/v2/order/{orderId}/apis';\n\n /**\n * updateApis.\n *\n * Adds/Updates advance passenger information to the CPR\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `updateApis()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updateApis$Response(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: Array<FinnairAdvancePassengerInformationRequestV2>\n },\n context?: HttpContext\n\n): Observable<DapiHttpResponse<void>> {\n const rb = new DapiRequestBuilder(rootUrl, AdvancePassengerInformationService.UpdateApisPath, 'post');\n\n if (params) {\n rb.path('orderId', params.orderId, {});\n rb.query('hash', params.hash, {});\n rb.query('locale', params.locale, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*',\n context: context\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as DapiHttpResponse<void>;\n }),\n catchErrorAsJson()\n );\n }\n\n /**\n * updateApis.\n *\n * Adds/Updates advance passenger information to the CPR\n *\n * This method provides access only to the response body.\n * To access the full response (for headers, for example), `updateApis$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n updateApis(rootUrl: string, params: {\n orderId: string;\n hash?: string;\n locale?: string;\n body: Array<FinnairAdvancePassengerInformationRequestV2>\n },\n context?: HttpContext\n\n): Observable<void> {\n return this.updateApis$Response(rootUrl, params, context).pipe(\n map((r: DapiHttpResponse<void>) => r.body as void)\n );\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { replaceMsgFormat, type ReplaceParams } from '../../core/utils';\n\n@Pipe({\n name: 'finMsgFormat',\n pure: true,\n})\nexport class MsgFormatPipe implements PipeTransform {\n transform(input: string, args: ReplaceParams = []): string {\n return replaceMsgFormat(input, args);\n }\n}\n","<div data-testid=\"inform-block-wrapper\" class=\"ps-xsmall border rounded-large font-body-1\">\n <div class=\"medium-type\" *ngIf=\"title\">\n <fcom-icon class=\"icon-medium ms-xsmall-r\" [name]=\"SvgLibraryIcon.INFO\"></fcom-icon>\n <span class=\"title\">{{ title }}</span>\n </div>\n <ng-content></ng-content>\n</div>\n","import { Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\n@Component({\n selector: 'fin-inform-block',\n templateUrl: './inform-block.component.html',\n})\nexport class InformBlockComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() title: string;\n}\n","import { StringNumberBooleanMap } from '@fcom/core-api/index';\n\nimport { Step } from '..';\n\n/**\n * All possible query parameter names for all booking routes\n */\nexport enum BookingQueryParams {\n origin = 'origin',\n destination = 'destination',\n cabin = 'cabin',\n adults = 'adults',\n c15s = 'c15s',\n children = 'children',\n infants = 'infants',\n childrenAges = 'children_ages',\n oneway = 'oneway',\n departureDate = 'departureDate',\n returnDate = 'returnDate',\n directFlights = 'directFlights',\n departureFlightNumbers = 'departureFlightNumbers',\n returnFlightNumbers = 'returnFlightNumbers',\n departureFareFamily = 'departureFareFamily',\n returnFareFamily = 'returnFareFamily',\n isAward = 'isAward',\n promoCode = 'promoCode',\n json = 'json',\n tripType = 'tripType',\n}\n\n/**\n * The names of parameters applicable for booking entry route\n */\n// origin, destination, departureDate and returnDate are all Optional\nexport type BookingEntryParamNames =\n | BookingQueryParams.origin\n | BookingQueryParams.destination\n | BookingQueryParams.departureDate\n | BookingQueryParams.returnDate;\n\nexport type RequiredFlightSelectionParamNames =\n | BookingQueryParams.origin\n | BookingQueryParams.destination\n | BookingQueryParams.cabin\n | BookingQueryParams.children\n | BookingQueryParams.infants\n | BookingQueryParams.departureDate;\n\nexport type OptionalFlightSelectionParamNames =\n | BookingQueryParams.adults\n | BookingQueryParams.c15s\n | BookingQueryParams.returnDate\n | BookingQueryParams.directFlights\n | BookingQueryParams.childrenAges\n | BookingQueryParams.departureFlightNumbers\n | BookingQueryParams.returnFlightNumbers\n | BookingQueryParams.departureFareFamily\n | BookingQueryParams.returnFareFamily\n | BookingQueryParams.isAward\n | BookingQueryParams.promoCode;\n\nexport type FlightSelectionParamNames = RequiredFlightSelectionParamNames | OptionalFlightSelectionParamNames;\n\n/**\n * The parameters applicable for booking entry route.\n */\nexport type BookingEntryParams = { [k in BookingEntryParamNames]?: string };\nexport type FlightSelectionParams = { [k in RequiredFlightSelectionParamNames]: string | number | boolean } & {\n [k in OptionalFlightSelectionParamNames]?: string | number | boolean;\n};\n\nexport type BookingStepParamsType = StringNumberBooleanMap | null;\nexport type BookingStepWithParams<_T extends BookingStepParamsType = null> = Step;\nexport type BookingErrorStepWithParams<_T extends BookingStepParamsType = null> = Step;\n\nexport interface BookingErrorSteps {\n ERROR: BookingErrorStepWithParams;\n ERROR_ROUTE: BookingErrorStepWithParams;\n PAYMENT_ERROR: BookingErrorStepWithParams;\n}\n\nexport interface BookingSteps {\n ENTRY: BookingStepWithParams<BookingEntryParams>;\n CHECKOUT: BookingStepWithParams;\n FLIGHT_SELECTION: BookingStepWithParams<FlightSelectionParams>;\n PAXDETAILS: BookingStepWithParams;\n ANCILLARIES: BookingStepWithParams;\n PURCHASE_REVIEW: BookingStepWithParams;\n PURCHASE_SUCCESS: BookingStepWithParams;\n}\n","import { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser, isPlatformServer } from '@angular/common';\n\nimport { fromEvent, Observable, of, Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map, startWith } from 'rxjs/operators';\n\nimport { WindowRef } from '@fcom/core';\nimport { finShare } from '@fcom/rx';\n\nconst breakpoints = {\n mobile: 'only screen and (max-width: 599px)',\n tablet: 'only screen and (min-width: 600px) and (max-width: 1023px)',\n tablet_down: 'only screen and (max-width: 1023px)',\n laptop_up: 'only screen and (min-width: 1024px)',\n small_desktop: 'only screen and (min-width: 1024px) and (max-width: 1599px)',\n large_desktop: 'only screen and (min-width: 1600px)',\n};\n\nexport type MediaQueryBreakpoint = keyof typeof breakpoints;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MediaQueryService {\n private resizeEvent$: Observable<Event>;\n\n constructor(\n private windowRef: WindowRef,\n @Inject(PLATFORM_ID) private platform: unknown\n ) {\n if (isPlatformBrowser(this.platform)) {\n this.resizeEvent$ = fromEvent<Event>(this.windowRef.nativeWindow, 'resize').pipe(\n debounceTime(100),\n distinctUntilChanged(),\n finShare()\n );\n }\n }\n\n isBreakpoint$(breakpoint: keyof typeof breakpoints): Observable<boolean> {\n if (isPlatformServer(this.platform)) {\n return of(false);\n }\n\n return this.resizeEvent$.pipe(\n map(() => this.matchesMedia(breakpoints[breakpoint])),\n startWith(this.matchesMedia(breakpoints[breakpoint])),\n distinctUntilChanged(),\n finShare()\n );\n }\n\n getResizeEvent$(): Observable<Event> {\n if (isPlatformServer(this.platform)) {\n return new Subject();\n }\n\n return this.resizeEvent$;\n }\n\n private matchesMedia(mediaQuery: string): boolean {\n return this.windowRef.nativeWindow.matchMedia(mediaQuery).matches ?? false;\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\n\nimport { Observable, combineLatest } from 'rxjs';\nimport { distinctUntilChanged, filter, map, pairwise, startWith, switchMap, take } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { CmsCollection, CmsContent, CmsImageData, CmsTemplate, CmsViewType } from '@fcom/core-api';\nimport { isPresent, safeMap, sanitizeWhiteListedPath } from '@fcom/core/utils';\nimport { ConfigService, isEmptyObjectOrHasEmptyValues } from '@fcom/core';\nimport { finShare } from '@fcom/rx';\nimport { BookingService } from '@fcom/booking/services';\nimport { globalBookingFlights, LocationPair } from '@fcom/common/store';\nimport { BookingAppState } from '@fcom/common/interfaces/booking/booking-state.interface';\nimport { MediaQueryService } from '@fcom/common/services/media-query/media-query.service';\nimport { AspectRatios } from '@fcom/ui-components';\n\nimport { CmsTemplateService } from '../../services';\nimport { findByType } from '../../utils';\n\n/**\n * Booking entry component for Front page. If you need just a BookingWidget then use it directly.\n * This component contains BookingWidget, Disruptions bar and hero offer.\n */\n@Component({\n selector: 'fin-booking-entry',\n styleUrls: ['./booking-entry.component.scss'],\n templateUrl: './booking-entry.component.html',\n})\nexport class BookingEntryComponent implements OnInit {\n disruptions$: Observable<CmsCollection>;\n campaignImg$: Observable<CmsImageData>;\n destinationImg$: Observable<CmsImageData>;\n backgroundImg$: Observable<CmsImageData>;\n sanitizedPath$: Observable<string>;\n aspectRatio$: Observable<keyof typeof AspectRatios>;\n defaultLocations: LocationPair[];\n\n constructor(\n private bookingService: BookingService,\n private store$: Store<BookingAppState>,\n private cmsTemplateService: CmsTemplateService,\n private configService: ConfigService,\n private mediaQueryService: MediaQueryService,\n private route: ActivatedRoute,\n private router: Router\n ) {\n this.sanitizedPath$ = this.route.url.pipe(\n map(() => this.route.pathFromRoot.map((r) => r.snapshot.url.join('/')).filter(Boolean)),\n map((fragments) => sanitizeWhiteListedPath(`/${fragments.join('/')}`, this.configService.cfg)),\n distinctUntilChanged()\n );\n }\n\n ngOnInit(): void {\n this.updateDataFromQueryParams();\n\n this.aspectRatio$ = this.mediaQueryService\n .isBreakpoint$('mobile')\n .pipe(finShare())\n .pipe(\n map((isMobile) => (isMobile ? '21x9' : '16x9') as keyof typeof AspectRatios),\n finShare()\n );\n\n const contents$: Observable<CmsContent[]> = this.sanitizedPath$.pipe(\n switchMap((path) => this.cmsTemplateService.load(path)),\n map((template: CmsTemplate) => safeMap(template, (t: CmsTemplate) => t.main)),\n filter(isPresent),\n finShare()\n );\n\n this.disruptions$ = contents$.pipe(findByType(CmsViewType.FRONT_PAGE_DISRUPTIONS, false));\n\n this.campaignImg$ = contents$.pipe(\n findByType(CmsViewType.FRONT_PAGE_OFFER, false),\n map((campaign: CmsContent) => campaign?.picture),\n finShare()\n );\n\n const globalBookingFlights$ = this.store$.pipe(globalBookingFlights(), finShare());\n\n const initialDestinationImg$ = globalBookingFlights$.pipe(\n take(1),\n map((flights) => flights[0].destination?.picture)\n );\n\n const destinationChanges$ = globalBookingFlights$.pipe(\n distinctUntilChanged((prev, next) =>\n next.every((flights, i) => flights.destination?.locationCode === prev[i]?.destination?.locationCode)\n ),\n pairwise(),\n map(([prev, next]) => {\n const changedDestination = next.find(\n (globalBookingFlight, i) =>\n globalBookingFlight.destination?.locationCode !== prev[i]?.destination?.locationCode\n );\n\n return changedDestination?.destination?.picture;\n })\n );\n\n this.destinationImg$ = initialDestinationImg$.pipe(\n switchMap((initial) => destinationChanges$.pipe(startWith(initial)))\n );\n\n this.backgroundImg$ = combineLatest([this.campaignImg$, this.destinationImg$]).pipe(\n map(([campaignImg, destinationImg]: [CmsImageData, CmsImageData]) => destinationImg ?? campaignImg)\n );\n }\n\n private updateDataFromQueryParams(): void {\n const queryParams: Params = this.route.snapshot.queryParams;\n\n if (isEmptyObjectOrHasEmptyValues(queryParams)) {\n return;\n }\n\n if (isPresent(queryParams.tripType)) {\n this.bookingService.updateTripTypeBasedOnQueryParams(queryParams);\n }\n\n if (isPresent(queryParams.origin) || isPresent(queryParams.destination)) {\n this.defaultLocations = [\n {\n ...(isPresent(queryParams.origin) && { origin: { locationCode: queryParams.origin } }),\n ...(isPresent(queryParams.destination) && { destination: { locationCode: queryParams.destination } }),\n },\n ] as LocationPair[];\n }\n\n // After updating we want to clear the queryParams so we do an \"in-place\" navigation and replace the url with empty\n this.router.navigate([], {\n queryParams: {},\n replaceUrl: true,\n });\n }\n}\n","<div class=\"booking-entry relative\">\n <cms-disruptions [disruptions]=\"disruptions$ | async\"></cms-disruptions>\n\n <div class=\"relative bg-container\">\n <fin-content-image\n class=\"background-image\"\n [imageData$]=\"backgroundImg$\"\n [aspectRatio$]=\"aspectRatio$\"\n [fetchPriority]=\"'high'\"\n ></fin-content-image>\n <fin-booking-widget\n [compactMode]=\"true\"\n [defaultLocations$]=\"defaultLocations | finToObservable\"\n ></fin-booking-widget>\n </div>\n</div>\n","import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */\nexport function filter<T, S extends T, A>(predicate: (this: A, value: T, index: number) => value is S, thisArg: A): OperatorFunction<T, S>;\nexport function filter<T, S extends T>(predicate: (value: T, index: number) => value is S): OperatorFunction<T, S>;\nexport function filter<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;\n/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */\nexport function filter<T, A>(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction<T>;\nexport function filter<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>;\n\n/**\n * Filter items emitted by the source Observable by only emitting those that\n * satisfy a specified predicate.\n *\n * <span class=\"informal\">Like\n * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n * it only emits a value from the source if it passes a criterion function.</span>\n *\n * ![](filter.png)\n *\n * Similar to the well-known `Array.prototype.filter` method, this operator\n * takes values from the source Observable, passes them through a `predicate`\n * function and only emits those values that yielded `true`.\n *\n * ## Example\n *\n * Emit only click events whose target was a DIV element\n *\n * ```ts\n * import { fromEvent, filter } from 'rxjs';\n *\n * const div = document.createElement('div');\n * div.style.cssText = 'width: 200px; height: 200px; background: #09c;';\n * document.body.appendChild(div);\n *\n * const clicks = fromEvent(document, 'click');\n * const clicksOnDivs = clicks.pipe(filter(ev => (<HTMLElement>ev.target).tagName === 'DIV'));\n * clicksOnDivs.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n * @see {@link ignoreElements}\n * @see {@link partition}\n * @see {@link skip}\n *\n * @param predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted, if `false` the value is not passed to the output\n * Observable. The `index` parameter is the number `i` for the i-th source\n * emission that has happened since the subscription, starting from the number\n * `0`.\n * @param thisArg An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return A function that returns an Observable that emits items from the\n * source Observable that satisfy the specified `predicate`.\n */\nexport function filter<T>(predicate: (value: T, index: number) => boolean, thisArg?: any): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n // An index passed to our predicate function on each call.\n let index = 0;\n\n // Subscribe to the source, all errors and completions are\n // forwarded to the consumer.\n source.subscribe(\n // Call the predicate with the appropriate `this` context,\n // if the predicate returns `true`, then send the value\n // to the consumer.\n createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value))\n );\n });\n}\n","import { Observable } from '../Observable';\nimport { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nimport { AnyCatcher } from '../AnyCatcher';\n\n// forkJoin(any)\n// We put this first because we need to catch cases where the user has supplied\n// _exactly `any`_ as the argument. Since `any` literally matches _anything_,\n// we don't want it to randomly hit one of the other type signatures below,\n// as we have no idea at build-time what type we should be returning when given an any.\n\n/**\n * You have passed `any` here, we can't figure out if it is\n * an array or an object, so you're getting `unknown`. Use better types.\n * @param arg Something typed as `any`\n */\nexport function forkJoin<T extends AnyCatcher>(arg: T): Observable<unknown>;\n\n// forkJoin(null | undefined)\nexport function forkJoin(scheduler: null | undefined): Observable<never>;\n\n// forkJoin([a, b, c])\nexport function forkJoin(sources: readonly []): Observable<never>;\nexport function forkJoin<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>]): Observable<A>;\nexport function forkJoin<A extends readonly unknown[], R>(\n sources: readonly [...ObservableInputTuple<A>],\n resultSelector: (...values: A) => R\n): Observable<R>;\n\n// forkJoin(a, b, c)\n/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */\nexport function forkJoin<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;\n/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */\nexport function forkJoin<A extends readonly unknown[], R>(\n ...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]\n): Observable<R>;\n\n// forkJoin({a, b, c})\nexport function forkJoin(sourcesObject: { [K in any]: never }): Observable<never>;\nexport function forkJoin<T extends Record<string, ObservableInput<any>>>(\n sourcesObject: T\n): Observable<{ [K in keyof T]: ObservedValueOf<T[K]> }>;\n\n/**\n * Accepts an `Array` of {@link ObservableInput} or a dictionary `Object` of {@link ObservableInput} and returns\n * an {@link Observable} that emits either an array of values in the exact same order as the passed array,\n * or a dictionary of values in the same shape as the passed dictionary.\n *\n * <span class=\"informal\">Wait for Observables to complete and then combine last values they emitted;\n * complete immediately if an empty array is passed.</span>\n *\n * ![](forkJoin.png)\n *\n * `forkJoin` is an operator that takes any number of input observables which can be passed either as an array\n * or a dictionary of input observables. If no input observables are provided (e.g. an empty array is passed),\n * then the resulting stream will complete immediately.\n *\n * `forkJoin` will wait for all passed observables to emit and complete and then it will emit an array or an object with last\n * values from corresponding observables.\n *\n * If you pass an array of `n` observables to the operator, then the resulting\n * array will have `n` values, where the first value is the last one emitted by the first observable,\n * second value is the last one emitted by the second observable and so on.\n *\n * If you pass a dictionary of observables to the operator, then the resulting\n * objects will have the same keys as the dictionary passed, with their last values they have emitted\n * located at the corresponding key.\n *\n * That means `forkJoin` will not emit more than once and it will complete after that. If you need to emit combined\n * values not only at the end of the lifecycle of passed observables, but also throughout it, try out {@link combineLatest}\n * or {@link zip} instead.\n *\n * In order for the resulting array to have the same length as the number of input observables, whenever any of\n * the given observables completes without emitting any value, `forkJoin` will complete at that moment as well\n * and it will not emit anything either, even if it already has some last values from other observables.\n * Conversely, if there is an observable that never completes, `forkJoin` will never complete either,\n * unless at any point some other observable completes without emitting a value, which brings us back to\n * the previous case. Overall, in order for `forkJoin` to emit a value, all given observables\n * have to emit something at least once and complete.\n *\n * If any given observable errors at some point, `forkJoin` will error as well and immediately unsubscribe\n * from the other observables.\n *\n * Optionally `forkJoin` accepts a `resultSelector` function, that will be called with values which normally\n * would land in the emitted array. Whatever is returned by the `resultSelector`, will appear in the output\n * observable instead. This means that the default `resultSelector` can be thought of as a function that takes\n * all its arguments and puts them into an array. Note that the `resultSelector` will be called only\n * when `forkJoin` is supposed to emit a result.\n *\n * ## Examples\n *\n * Use `forkJoin` with a dictionary of observable inputs\n *\n * ```ts\n * import { forkJoin, of, timer } from 'rxjs';\n *\n * const observable = forkJoin({\n * foo: of(1, 2, 3, 4),\n * bar: Promise.resolve(8),\n * baz: timer(4000)\n * });\n * observable.subscribe({\n * next: value => console.log(value),\n * complete: () => console.log('This is how it ends!'),\n * });\n *\n * // Logs:\n * // { foo: 4, bar: 8, baz: 0 } after 4 seconds\n * // 'This is how it ends!' immediately after\n * ```\n *\n * Use `forkJoin` with an array of observable inputs\n *\n * ```ts\n * import { forkJoin, of, timer } from 'rxjs';\n *\n * const observable = forkJoin([\n * of(1, 2, 3, 4),\n * Promise.resolve(8),\n * timer(4000)\n * ]);\n * observable.subscribe({\n * next: value => console.log(value),\n * complete: () => console.log('This is how it ends!'),\n * });\n *\n * // Logs:\n * // [4, 8, 0] after 4 seconds\n * // 'This is how it ends!' immediately after\n * ```\n *\n * @see {@link combineLatest}\n * @see {@link zip}\n *\n * @param args Any number of `ObservableInput`s provided either as an array, as an object\n * or as arguments passed directly to the operator.\n * @return Observable emitting either an array of last values emitted by passed Observables\n * or value from project function.\n */\nexport function forkJoin(...args: any[]): Observable<any> {\n const resultSelector = popResultSelector(args);\n const { args: sources, keys } = argsArgArrayOrObject(args);\n const result = new Observable((subscriber) => {\n const { length } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n },\n () => remainingCompletions--,\n undefined,\n () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }\n )\n );\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","<div\n class=\"white-bg\"\n [ngClass]=\"{\n 'rounded-large border': hasBorder && roundedBottom,\n 'rounded-top-large border-top border-left border-right': hasBorder && !roundedBottom,\n }\"\n [class.pr-small-t]=\"fullWidth\"\n [class.pr-small]=\"!fullWidth && !alignParent\"\n>\n <h2\n class=\"font-heading-4 flex flex--center flex--space-between\"\n [class.nordic-blue-900-text]=\"!showHighlightedContent\"\n [class.heather-700-text]=\"showHighlightedContent\"\n [class.pr-small-x]=\"fullWidth\"\n [class.pr-small-b]=\"!fullWidth && !noContent\"\n *ngIf=\"title || endTitle\"\n >\n <span class=\"block\">{{ title }}</span>\n <span class=\"block {{ endTitleClasses }}\">{{ endTitle }}</span>\n </h2>\n <div class=\"flex section-list\" *ngIf=\"!noContent\">\n <ng-content select=\"content\"></ng-content>\n </div>\n <div class=\"align-right font-body-1\" *ngIf=\"!noButton\">\n <ng-content select=\"button\"></ng-content>\n </div>\n</div>\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-section-review',\n templateUrl: 'section-review.component.html',\n styleUrls: ['section-review.component.scss'],\n})\nexport class SectionReviewComponent {\n @Input()\n title: string;\n\n @Input()\n fullWidth = false;\n\n @Input()\n endTitle: string;\n\n @Input()\n noContent: boolean;\n\n @Input()\n noButton: boolean;\n\n @Input()\n endTitleClasses: string;\n\n @Input()\n showHighlightedContent = false;\n\n @Input()\n roundedBottom = true;\n\n @Input()\n alignParent = false;\n\n @Input()\n hasBorder = true;\n}\n","import { map } from './map';\nimport { OperatorFunction } from '../types';\n\n/* tslint:disable:max-line-length */\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<T, K1 extends keyof T>(k1: K1): OperatorFunction<T, T[K1]>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<T, K1 extends keyof T, K2 extends keyof T[K1]>(k1: K1, k2: K2): OperatorFunction<T, T[K1][K2]>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(\n k1: K1,\n k2: K2,\n k3: K3\n): OperatorFunction<T, T[K1][K2][K3]>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(\n k1: K1,\n k2: K2,\n k3: K3,\n k4: K4\n): OperatorFunction<T, T[K1][K2][K3][K4]>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<\n T,\n K1 extends keyof T,\n K2 extends keyof T[K1],\n K3 extends keyof T[K1][K2],\n K4 extends keyof T[K1][K2][K3],\n K5 extends keyof T[K1][K2][K3][K4]\n>(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5): OperatorFunction<T, T[K1][K2][K3][K4][K5]>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<\n T,\n K1 extends keyof T,\n K2 extends keyof T[K1],\n K3 extends keyof T[K1][K2],\n K4 extends keyof T[K1][K2][K3],\n K5 extends keyof T[K1][K2][K3][K4],\n K6 extends keyof T[K1][K2][K3][K4][K5]\n>(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6): OperatorFunction<T, T[K1][K2][K3][K4][K5][K6]>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<\n T,\n K1 extends keyof T,\n K2 extends keyof T[K1],\n K3 extends keyof T[K1][K2],\n K4 extends keyof T[K1][K2][K3],\n K5 extends keyof T[K1][K2][K3][K4],\n K6 extends keyof T[K1][K2][K3][K4][K5]\n>(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6, ...rest: string[]): OperatorFunction<T, unknown>;\n/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */\nexport function pluck<T>(...properties: string[]): OperatorFunction<T, unknown>;\n/* tslint:enable:max-line-length */\n\n/**\n * Maps each source value to its specified nested property.\n *\n * <span class=\"informal\">Like {@link map}, but meant only for picking one of\n * the nested properties of every emitted value.</span>\n *\n * ![](pluck.png)\n *\n * Given a list of strings or numbers describing a path to a property, retrieves\n * the value of a specified nested property from all values in the source\n * Observable. If a property can't be resolved, it will return `undefined` for\n * that value.\n *\n * ## Example\n *\n * Map every click to the tagName of the clicked target element\n *\n * ```ts\n * import { fromEvent, pluck } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const tagNames = clicks.pipe(pluck('target', 'tagName'));\n *\n * tagNames.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link map}\n *\n * @param properties The nested properties to pluck from each source\n * value.\n * @return A function that returns an Observable of property values from the\n * source values.\n * @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8.\n */\nexport function pluck<T, R>(...properties: Array<string | number | symbol>): OperatorFunction<T, R> {\n const length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return map((x) => {\n let currentProp: any = x;\n for (let i = 0; i < length; i++) {\n const p = currentProp?.[properties[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n } else {\n return undefined;\n }\n }\n return currentProp;\n });\n}\n","'use strict';\n\n/** @type {import('./shams')} */\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\t/** @type {{ [k in symbol]?: unknown }} */\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\n\nimport { MonoTypeOperatorFunction, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable\n * calls `error`, this method will emit the Throwable that caused the error to the `ObservableInput` returned from `notifier`.\n * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child\n * subscription. Otherwise this method will resubscribe to the source Observable.\n *\n * ![](retryWhen.png)\n *\n * Retry an observable sequence on error based on custom criteria.\n *\n * ## Example\n *\n * ```ts\n * import { interval, map, retryWhen, tap, delayWhen, timer } from 'rxjs';\n *\n * const source = interval(1000);\n * const result = source.pipe(\n * map(value => {\n * if (value > 5) {\n * // error will be picked up by retryWhen\n * throw value;\n * }\n * return value;\n * }),\n * retryWhen(errors =>\n * errors.pipe(\n * // log error message\n * tap(value => console.log(`Value ${ value } was too high!`)),\n * // restart in 5 seconds\n * delayWhen(value => timer(value * 1000))\n * )\n * )\n * );\n *\n * result.subscribe(value => console.log(value));\n *\n * // results:\n * // 0\n * // 1\n * // 2\n * // 3\n * // 4\n * // 5\n * // 'Value 6 was too high!'\n * // - Wait 5 seconds then repeat\n * ```\n *\n * @see {@link retry}\n *\n * @param notifier Function that receives an Observable of notifications with which a\n * user can `complete` or `error`, aborting the retry.\n * @return A function that returns an Observable that mirrors the source\n * Observable with the exception of an `error`.\n * @deprecated Will be removed in v9 or v10, use {@link retry}'s `delay` option instead.\n * Will be removed in v9 or v10. Use {@link retry}'s {@link RetryConfig#delay delay} option instead.\n * Instead of `retryWhen(() => notify$)`, use: `retry({ delay: () => notify$ })`.\n */\nexport function retryWhen<T>(notifier: (errors: Observable<any>) => ObservableInput<any>): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n let innerSub: Subscription | null;\n let syncResub = false;\n let errors$: Subject<any>;\n\n const subscribeForRetryWhen = () => {\n innerSub = source.subscribe(\n createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n if (!errors$) {\n errors$ = new Subject();\n innerFrom(notifier(errors$)).subscribe(\n createOperatorSubscriber(subscriber, () =>\n // If we have an innerSub, this was an asynchronous call, kick off the retry.\n // Otherwise, if we don't have an innerSub yet, that's because the inner subscription\n // call hasn't even returned yet. We've arrived here synchronously.\n // So we flag that we want to resub, such that we can ensure finalization\n // happens before we resubscribe.\n innerSub ? subscribeForRetryWhen() : (syncResub = true)\n )\n );\n }\n if (errors$) {\n // We have set up the notifier without error.\n errors$.next(err);\n }\n })\n );\n\n if (syncResub) {\n // Ensure that the inner subscription is torn down before\n // moving on to the next subscription in the synchronous case.\n // If we don't do this here, all inner subscriptions will not be\n // torn down until the entire observable is done.\n innerSub.unsubscribe();\n innerSub = null;\n // We may need to do this multiple times, so reset the flag.\n syncResub = false;\n // Resubscribe\n subscribeForRetryWhen();\n }\n };\n\n // Start the subscription\n subscribeForRetryWhen();\n });\n}\n","import { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport {\n Amount,\n GroupedServices,\n SeatCharacteristics,\n ServiceCatalogService,\n ServicePassenger,\n TravelerService,\n} from '@fcom/dapi/interfaces';\nimport {\n Category,\n FinnairAmount,\n FinnairBoundItem,\n FinnairLocation,\n FinnairPassengerItem,\n FinnairPassengerServiceSelectionItem,\n FinnairServiceCatalogEligibilityItem,\n SeatInfo,\n SeatPrice,\n SubCategory,\n} from '@fcom/dapi/api/models';\nimport { NotificationTheme, TagTheme } from '@fcom/ui-components';\nimport { SelectionPhase } from '@fcom/common/interfaces/booking';\n\nimport { ConfirmModalTranslationKeys } from '../components';\n\nexport interface ExtendedServiceSelectionItem extends FinnairPassengerServiceSelectionItem {\n category: Category;\n flightIds: string[];\n passengerId: string;\n fragmentId?: string;\n cabins?: string;\n}\n\nexport interface UiMeal extends ServiceCatalogService {\n selected$: Observable<boolean>;\n globalId?: string;\n includedAndPaid?: boolean;\n itemCategory?: string[];\n}\n\nexport interface TravelerWithMeals {\n traveler: ServicePassenger;\n meals: UiMeal[];\n selectedMeals$: Observable<UiMeal[]>;\n mealSelected$: Observable<boolean>;\n defaultMealVariant: string;\n}\n\nexport interface TravelerWithMeal {\n traveler: ServicePassenger;\n defaultMealVariant: string;\n meal: UiMeal;\n}\n\nexport enum ButtonState {\n PLUS = 'PLUS',\n MINUS = 'MINUS',\n OK = 'OK',\n UPDATING = 'UPDATING',\n DISABLED = 'DISABLED',\n}\n\nexport interface AncillaryServiceParams {\n orderId?: string;\n cartId?: string;\n hash?: string;\n}\n\nexport interface PurchasedServicesForOrder {\n [fragmentId: string]: PurchasedService[];\n}\n\nexport interface PurchasedService {\n displayName?: string;\n title?: string;\n quantity: number;\n category: SubCategory;\n maxBaggageWeight?: number;\n seatNumber?: string;\n travelerId?: string;\n variant: string;\n}\n\nexport interface UpdatedServicesForPassenger {\n [fragmentId: string]: {\n [travelerId: string]: {\n name: string;\n included: PurchasedService[];\n added: TravelerService[];\n size?: number;\n };\n };\n}\n\nexport interface EligibilitiesForFragments {\n [fragmentId: string]: EligibilityWithCategory[];\n}\n\nexport interface EligibilityWithCategory extends FinnairServiceCatalogEligibilityItem {\n category: Category;\n subCategory?: SubCategory;\n originalEligibility?: FinnairServiceCatalogEligibilityItem;\n}\n\nexport interface ConfirmModalData {\n confirmationModalTranslationKeys?: ConfirmModalTranslationKeys;\n variant?: string;\n quantity?: number;\n flightOrBoundId?: string;\n travelerId?: string;\n removeSelection?: boolean;\n}\n\nexport interface ConfirmModal {\n open: boolean;\n confirmData?: ConfirmModalData;\n}\n\nexport interface PriceAndFragment {\n price: Amount;\n fragmentId: string;\n}\n\nexport interface ItineraryModal {\n open: boolean;\n data: {\n outbound$: Observable<FinnairBoundItem>;\n inbound$: Observable<FinnairBoundItem>;\n locations$: Observable<{ [id: string]: FinnairLocation }>;\n selectionPhase$: Observable<SelectionPhase>;\n };\n}\n\nexport type ProductInputType = 'radio' | 'checkbox' | 'number';\n\nexport enum QuotaType {\n FREE = 'FREE',\n TOPPED = 'TOPPED',\n NO = 'NO',\n SELECTED = 'SELECTED',\n}\n\nexport interface Quota {\n count: number | undefined;\n type: QuotaType;\n}\n\nexport interface ExtendedService extends ServiceCatalogService {\n selected$: Observable<boolean>;\n buttonText$: Observable<string>;\n globalId: string;\n quota$: Observable<Quota>;\n useConfirmModal: boolean;\n showBlockingNotification: boolean;\n inputType: ProductInputType;\n paidQuantity: number;\n displayTotalPrice$: Observable<FinnairAmount>;\n paxLevelQuotaReached$: Observable<boolean>;\n quantity?: number;\n}\n\nexport interface Notification {\n iconName: SvgLibraryIcon;\n theme: NotificationTheme;\n key: string;\n blockSelection: boolean;\n reason?: {\n key: string;\n data: Record<string, string>;\n };\n type?: NotificationType;\n}\n\nexport type NotificationType = 'OPERATING_AIRLINE_SEAT';\n\nexport interface SeatChangeEvent {\n travelerId: string;\n flightId: string;\n seatNumber: string | null;\n}\nexport interface SeatMapTraveler {\n id: string;\n traveler: FinnairPassengerItem;\n withInfant: boolean;\n withInfantFullName: string;\n seatNumber?: string;\n originalSeatNumber?: string;\n seat?: SeatInfo;\n price?: SeatPrice;\n paidSeat?: boolean;\n ticketedSeat?: boolean;\n modifiableSeat?: boolean;\n groupedServices: GroupedServices[];\n active?: boolean;\n bundleActive?: boolean;\n}\n\nexport interface SeatDetails {\n travelerId: string;\n seat: SeatInfo;\n\n seatNumber: string;\n\n price: SeatPrice;\n\n /**\n * @see SeatType\n */\n seatType: string;\n\n /**\n * The traveler id for whom the seat is already selected.\n */\n seatSelectedForTraveler?: string;\n\n exitRow?: boolean;\n}\n\nexport const seatCharacteristicsOrder = [\n SeatCharacteristics.EXTRA_LEG_SPACE,\n SeatCharacteristics.EXIT,\n SeatCharacteristics.BASSINET,\n SeatCharacteristics.ECO_COMFORT,\n SeatCharacteristics.PREFERRED,\n SeatCharacteristics.FRONT_OF_CABIN,\n SeatCharacteristics.FRONT_ROW,\n SeatCharacteristics.PREMIUM,\n];\n\nexport const seatTypeInfo = {\n regular: {\n className: 'seat-regular',\n cmsKey: 'regularSeat',\n label: 'seatMap.seatChips.regularSeat',\n },\n [SeatCharacteristics.EXIT]: {\n className: 'seat-exit',\n cmsKey: 'exitRow',\n label: 'seatMap.seatChips.exitRow',\n },\n [SeatCharacteristics.EXTRA_LEG_SPACE]: {\n className: 'seat-extra-legroom',\n cmsKey: 'extraLegroomSeat',\n label: 'seatMap.seatChips.extraLegroomSeat',\n },\n [SeatCharacteristics.BASSINET]: {\n className: 'seat-bassinet',\n cmsKey: 'bassinetSeat',\n label: 'seatMap.seatChips.bassinetSeat',\n },\n [SeatCharacteristics.FRONT_OF_CABIN]: {\n className: 'seat-front-of-cabin',\n cmsKey: 'frontRowSeat',\n label: 'seatMap.seatChips.frontRowSeat',\n },\n [SeatCharacteristics.FRONT_ROW]: {\n className: 'seat-front-of-cabin',\n cmsKey: 'frontRowSeat',\n label: 'seatMap.seatChips.frontRowSeat',\n },\n [SeatCharacteristics.ECO_COMFORT]: {\n className: 'seat-comfort',\n cmsKey: 'comfortSeat',\n label: 'seatMap.seatChips.comfortSeat',\n },\n [SeatCharacteristics.PREFERRED]: {\n className: 'seat-preferred',\n cmsKey: 'preferredSeat',\n label: 'seatMap.seatChips.preferredSeat',\n },\n [SeatCharacteristics.PREMIUM]: {\n className: 'seat-premium',\n cmsKey: 'premiumSeat',\n label: 'seatMap.seatChips.premiumSeat',\n },\n};\n\nexport interface ProductTag {\n localizationKey: string;\n icon: SvgLibraryIcon;\n theme?: TagTheme;\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\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n booleanAttribute,\n} from '@angular/core';\nimport {AnimationEvent} from '@angular/animations';\nimport {\n MAT_OPTGROUP,\n MAT_OPTION_PARENT_COMPONENT,\n MatOptgroup,\n MatOption,\n ThemePalette,\n} from '@angular/material/core';\nimport {ActiveDescendantKeyManager} from '@angular/cdk/a11y';\nimport {Platform} from '@angular/cdk/platform';\nimport {panelAnimation} from './animations';\nimport {Subscription} from 'rxjs';\n\n/**\n * Autocomplete IDs need to be unique across components, so this counter exists outside of\n * the component definition.\n */\nlet _uniqueAutocompleteIdCounter = 0;\n\n/** Event object that is emitted when an autocomplete option is selected. */\nexport class MatAutocompleteSelectedEvent {\n constructor(\n /** Reference to the autocomplete panel that emitted the event. */\n public source: MatAutocomplete,\n /** Option that was selected. */\n public option: MatOption,\n ) {}\n}\n\n/** Event object that is emitted when an autocomplete option is activated. */\nexport interface MatAutocompleteActivatedEvent {\n /** Reference to the autocomplete panel that emitted the event. */\n source: MatAutocomplete;\n\n /** Option that was selected. */\n option: MatOption | null;\n}\n\n/** Default `mat-autocomplete` options that can be overridden. */\nexport interface MatAutocompleteDefaultOptions {\n /** Whether the first option should be highlighted when an autocomplete panel is opened. */\n autoActiveFirstOption?: boolean;\n\n /** Whether the active option should be selected as the user is navigating. */\n autoSelectActiveOption?: boolean;\n\n /**\n * Whether the user is required to make a selection when\n * they're interacting with the autocomplete.\n */\n requireSelection?: boolean;\n\n /** Class or list of classes to be applied to the autocomplete's overlay panel. */\n overlayPanelClass?: string | string[];\n\n /** Wheter icon indicators should be hidden for single-selection. */\n hideSingleSelectionIndicator?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-autocomplete`. */\nexport const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken<MatAutocompleteDefaultOptions>(\n 'mat-autocomplete-default-options',\n {\n providedIn: 'root',\n factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefaultOptions {\n return {\n autoActiveFirstOption: false,\n autoSelectActiveOption: false,\n hideSingleSelectionIndicator: false,\n requireSelection: false,\n };\n}\n\n/** Autocomplete component. */\n@Component({\n selector: 'mat-autocomplete',\n templateUrl: 'autocomplete.html',\n styleUrl: 'autocomplete.css',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'matAutocomplete',\n host: {\n 'class': 'mat-mdc-autocomplete',\n },\n providers: [{provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete}],\n animations: [panelAnimation],\n standalone: true,\n})\nexport class MatAutocomplete implements AfterContentInit, OnDestroy {\n private _activeOptionChanges = Subscription.EMPTY;\n\n /** Emits when the panel animation is done. Null if the panel doesn't animate. */\n _animationDone = new EventEmitter<AnimationEvent>();\n\n /** Manages active item in option list based on key events. */\n _keyManager: ActiveDescendantKeyManager<MatOption>;\n\n /** Whether the autocomplete panel should be visible, depending on option length. */\n showPanel: boolean = false;\n\n /** Whether the autocomplete panel is open. */\n get isOpen(): boolean {\n return this._isOpen && this.showPanel;\n }\n _isOpen: boolean = false;\n\n /** Latest trigger that opened the autocomplete. */\n _latestOpeningTrigger: unknown;\n\n /** @docs-private Sets the theme color of the panel. */\n _setColor(value: ThemePalette) {\n this._color = value;\n this._changeDetectorRef.markForCheck();\n }\n /** @docs-private theme color of the panel */\n protected _color: ThemePalette;\n\n // The @ViewChild query for TemplateRef here needs to be static because some code paths\n // lead to the overlay being created before change detection has finished for this component.\n // Notably, another component may trigger `focus` on the autocomplete-trigger.\n\n /** @docs-private */\n @ViewChild(TemplateRef, {static: true}) template: TemplateRef<any>;\n\n /** Element for the panel containing the autocomplete options. */\n @ViewChild('panel') panel: ElementRef;\n\n /** Reference to all options within the autocomplete. */\n @ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;\n\n /** Reference to all option groups within the autocomplete. */\n @ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;\n\n /** Aria label of the autocomplete. */\n @Input('aria-label') ariaLabel: string;\n\n /** Input that can be used to specify the `aria-labelledby` attribute. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Function that maps an option's control value to its display value in the trigger. */\n @Input() displayWith: ((value: any) => string) | null = null;\n\n /**\n * Whether the first option should be highlighted when the autocomplete panel is opened.\n * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.\n */\n @Input({transform: booleanAttribute}) autoActiveFirstOption: boolean;\n\n /** Whether the active option should be selected as the user is navigating. */\n @Input({transform: booleanAttribute}) autoSelectActiveOption: boolean;\n\n /**\n * Whether the user is required to make a selection when they're interacting with the\n * autocomplete. If the user moves away from the autocomplete without selecting an option from\n * the list, the value will be reset. If the user opens the panel and closes it without\n * interacting or selecting a value, the initial value will be kept.\n */\n @Input({transform: booleanAttribute}) requireSelection: boolean;\n\n /**\n * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will\n * match the width of its host.\n */\n @Input() panelWidth: string | number;\n\n /** Whether ripples are disabled within the autocomplete panel. */\n @Input({transform: booleanAttribute}) disableRipple: boolean;\n\n /** Event that is emitted whenever an option from the list is selected. */\n @Output() readonly optionSelected: EventEmitter<MatAutocompleteSelectedEvent> =\n new EventEmitter<MatAutocompleteSelectedEvent>();\n\n /** Event that is emitted when the autocomplete panel is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event that is emitted when the autocomplete panel is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits whenever an option is activated. */\n @Output() readonly optionActivated: EventEmitter<MatAutocompleteActivatedEvent> =\n new EventEmitter<MatAutocompleteActivatedEvent>();\n\n /**\n * Takes classes set on the host mat-autocomplete element and applies them to the panel\n * inside the overlay container to allow for easy styling.\n */\n @Input('class')\n set classList(value: string | string[]) {\n this._classList = value;\n this._elementRef.nativeElement.className = '';\n }\n _classList: string | string[];\n\n /** Whether checkmark indicator for single-selection options is hidden. */\n @Input({transform: booleanAttribute})\n get hideSingleSelectionIndicator(): boolean {\n return this._hideSingleSelectionIndicator;\n }\n set hideSingleSelectionIndicator(value: boolean) {\n this._hideSingleSelectionIndicator = value;\n this._syncParentProperties();\n }\n private _hideSingleSelectionIndicator: boolean;\n\n /** Syncs the parent state with the individual options. */\n _syncParentProperties(): void {\n if (this.options) {\n for (const option of this.options) {\n option._changeDetectorRef.markForCheck();\n }\n }\n }\n\n /** Unique ID to be used by autocomplete trigger's \"aria-owns\" property. */\n id: string = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;\n\n /**\n * Tells any descendant `mat-optgroup` to use the inert a11y pattern.\n * @docs-private\n */\n readonly inertGroups: boolean;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS) protected _defaults: MatAutocompleteDefaultOptions,\n platform?: Platform,\n ) {\n // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on\n // Safari using VoiceOver. We should occasionally check back to see whether the bug\n // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`\n // option altogether.\n this.inertGroups = platform?.SAFARI || false;\n this.autoActiveFirstOption = !!_defaults.autoActiveFirstOption;\n this.autoSelectActiveOption = !!_defaults.autoSelectActiveOption;\n this.requireSelection = !!_defaults.requireSelection;\n this._hideSingleSelectionIndicator = this._defaults.hideSingleSelectionIndicator ?? false;\n }\n\n ngAfterContentInit() {\n this._keyManager = new ActiveDescendantKeyManager<MatOption>(this.options)\n .withWrap()\n .skipPredicate(this._skipPredicate);\n this._activeOptionChanges = this._keyManager.change.subscribe(index => {\n if (this.isOpen) {\n this.optionActivated.emit({source: this, option: this.options.toArray()[index] || null});\n }\n });\n\n // Set the initial visibility state.\n this._setVisibility();\n }\n\n ngOnDestroy() {\n this._keyManager?.destroy();\n this._activeOptionChanges.unsubscribe();\n this._animationDone.complete();\n }\n\n /**\n * Sets the panel scrollTop. This allows us to manually scroll to display options\n * above or below the fold, as they are not actually being focused when active.\n */\n _setScrollTop(scrollTop: number): void {\n if (this.panel) {\n this.panel.nativeElement.scrollTop = scrollTop;\n }\n }\n\n /** Returns the panel's scrollTop. */\n _getScrollTop(): number {\n return this.panel ? this.panel.nativeElement.scrollTop : 0;\n }\n\n /** Panel should hide itself when the option list is empty. */\n _setVisibility() {\n this.showPanel = !!this.options.length;\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits the `select` event. */\n _emitSelectEvent(option: MatOption): void {\n const event = new MatAutocompleteSelectedEvent(this, option);\n this.optionSelected.emit(event);\n }\n\n /** Gets the aria-labelledby for the autocomplete panel. */\n _getPanelAriaLabelledby(labelId: string | null): string | null {\n if (this.ariaLabel) {\n return null;\n }\n\n const labelExpression = labelId ? labelId + ' ' : '';\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n }\n\n // `skipPredicate` determines if key manager should avoid putting a given option in the tab\n // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA\n // recommendation.\n //\n // Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\n // makes a few exceptions for compound widgets.\n //\n // From [Developing a Keyboard Interface](\n // https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\n // \"For the following composite widget elements, keep them focusable when disabled: Options in a\n // Listbox...\"\n //\n // The user can focus disabled options using the keyboard, but the user cannot click disabled\n // options.\n protected _skipPredicate() {\n return false;\n }\n}\n","<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [class]=\"_classList\"\n [class.mat-mdc-autocomplete-visible]=\"showPanel\"\n [class.mat-mdc-autocomplete-hidden]=\"!showPanel\"\n [class.mat-primary]=\"_color === 'primary'\"\n [class.mat-accent]=\"_color === 'accent'\"\n [class.mat-warn]=\"_color === 'warn'\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\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\nimport {\n animate,\n AnimationTriggerMetadata,\n group,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n// Animation values come from\n// https://github.com/material-components/material-components-web/blob/master/packages/mdc-menu-surface/_mixins.scss\n// TODO(mmalerba): Ideally find a way to import the values from MDC's code.\nexport const panelAnimation: AnimationTriggerMetadata = trigger('panelAnimation', [\n state(\n 'void, hidden',\n style({\n opacity: 0,\n transform: 'scaleY(0.8)',\n }),\n ),\n transition(':enter, hidden => visible', [\n group([\n animate('0.03s linear', style({opacity: 1})),\n animate('0.12s cubic-bezier(0, 0, 0.2, 1)', style({transform: 'scaleY(1)'})),\n ]),\n ]),\n transition(':leave, visible => hidden', [animate('0.075s linear', style({opacity: 0}))]),\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\nimport {Directive, ElementRef} from '@angular/core';\n\n/**\n * Directive applied to an element to make it usable\n * as a connection point for an autocomplete panel.\n */\n@Directive({\n selector: '[matAutocompleteOrigin]',\n exportAs: 'matAutocompleteOrigin',\n standalone: true,\n})\nexport class MatAutocompleteOrigin {\n constructor(\n /** Reference to the element on which the directive is applied. */\n public elementRef: ElementRef<HTMLElement>,\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\nimport {addAriaReferencedId, removeAriaReferencedId} from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n inject,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Optional,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW, hasModifierKey} from '@angular/cdk/keycodes';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n MatOptionSelectionChange,\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n MatOption,\n} from '@angular/material/core';\nimport {MAT_FORM_FIELD, MatFormField} from '@angular/material/form-field';\nimport {defer, fromEvent, merge, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {delay, filter, map, switchMap, take, tap, startWith} from 'rxjs/operators';\nimport {MatAutocompleteOrigin} from './autocomplete-origin';\nimport {\n MatAutocompleteDefaultOptions,\n MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n MatAutocomplete,\n} from './autocomplete';\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nexport const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatAutocompleteTrigger),\n multi: true,\n};\n\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nexport function getMatAutocompleteMissingPanelError(): Error {\n return Error(\n 'Attempting to open an undefined instance of `mat-autocomplete`. ' +\n 'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n \"you're attempting to open it after the ngAfterContentInit hook.\",\n );\n}\n\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'mat-autocomplete-scroll-strategy',\n {\n providedIn: 'root',\n factory: () => {\n const overlay = inject(Overlay);\n return () => overlay.scrollStrategies.reposition();\n },\n },\n);\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,\n};\n\n/** Base class with all of the `MatAutocompleteTrigger` functionality. */\n@Directive({\n selector: `input[matAutocomplete], textarea[matAutocomplete]`,\n host: {\n 'class': 'mat-mdc-autocomplete-trigger',\n '[attr.autocomplete]': 'autocompleteAttribute',\n '[attr.role]': 'autocompleteDisabled ? null : \"combobox\"',\n '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : \"list\"',\n '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',\n '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',\n '[attr.aria-controls]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',\n '[attr.aria-haspopup]': 'autocompleteDisabled ? null : \"listbox\"',\n // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n // a little earlier. This avoids issues where IE delays the focusing of the input.\n '(focusin)': '_handleFocus()',\n '(blur)': '_onTouched()',\n '(input)': '_handleInput($event)',\n '(keydown)': '_handleKeydown($event)',\n '(click)': '_handleClick()',\n },\n exportAs: 'matAutocompleteTrigger',\n providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR],\n standalone: true,\n})\nexport class MatAutocompleteTrigger\n implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy\n{\n private _overlayRef: OverlayRef | null;\n private _portal: TemplatePortal;\n private _componentDestroyed = false;\n private _scrollStrategy: () => ScrollStrategy;\n private _keydownSubscription: Subscription | null;\n private _outsideClickSubscription: Subscription | null;\n\n /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n private _previousValue: string | number | null;\n\n /** Value of the input element when the panel was attached (even if there are no options). */\n private _valueOnAttach: string | number | null;\n\n /** Value on the previous keydown event. */\n private _valueOnLastKeydown: string | null;\n\n /** Strategy that is used to position the panel. */\n private _positionStrategy: FlexibleConnectedPositionStrategy;\n\n /** Whether or not the label state is being overridden. */\n private _manuallyFloatingLabel = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription: Subscription;\n\n /** Subscription to viewport size changes. */\n private _viewportSubscription = Subscription.EMPTY;\n\n /**\n * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n * closed autocomplete from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /** Value inside the input before we auto-selected an option. */\n private _valueBeforeAutoSelection: string | undefined;\n\n /**\n * Current option that we have auto-selected as the user is navigating,\n * but which hasn't been propagated to the model value yet.\n */\n private _pendingAutoselectedOption: MatOption | null;\n\n /** Stream of keyboard events that can close the panel. */\n private readonly _closeKeyEventStream = new Subject<void>();\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the autocomplete is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n };\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when autocomplete has been touched` */\n _onTouched = () => {};\n\n /** The autocomplete panel to be attached to this trigger. */\n @Input('matAutocomplete') autocomplete: MatAutocomplete;\n\n /**\n * Position of the autocomplete panel relative to the trigger element. A position of `auto`\n * will render the panel underneath the trigger if there is enough space for it to fit in\n * the viewport, otherwise the panel will be shown above it. If the position is set to\n * `above` or `below`, the panel will always be shown above or below the trigger. no matter\n * whether it fits completely in the viewport.\n */\n @Input('matAutocompletePosition') position: 'auto' | 'above' | 'below' = 'auto';\n\n /**\n * Reference relative to which to position the autocomplete panel.\n * Defaults to the autocomplete trigger element.\n */\n @Input('matAutocompleteConnectedTo') connectedTo: MatAutocompleteOrigin;\n\n /**\n * `autocomplete` attribute to be set on the input element.\n * @docs-private\n */\n @Input('autocomplete') autocompleteAttribute: string = 'off';\n\n /**\n * Whether the autocomplete is disabled. When disabled, the element will\n * act as a regular input and the user won't be able to open the panel.\n */\n @Input({alias: 'matAutocompleteDisabled', transform: booleanAttribute})\n autocompleteDisabled: boolean;\n\n constructor(\n private _element: ElementRef<HTMLInputElement>,\n private _overlay: Overlay,\n private _viewContainerRef: ViewContainerRef,\n private _zone: NgZone,\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality | null,\n @Optional() @Inject(MAT_FORM_FIELD) @Host() private _formField: MatFormField | null,\n @Optional() @Inject(DOCUMENT) private _document: any,\n private _viewportRuler: ViewportRuler,\n @Optional()\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS)\n private _defaults?: MatAutocompleteDefaultOptions | null,\n ) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /** Class to apply to the panel when it's above the input. */\n private _aboveClass = 'mat-mdc-autocomplete-panel-above';\n\n ngAfterViewInit() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n this._zone.runOutsideAngular(() => window.addEventListener('blur', this._windowBlurHandler));\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['position'] && this._positionStrategy) {\n this._setStrategyPositions(this._positionStrategy);\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n }\n }\n }\n\n ngOnDestroy() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n window.removeEventListener('blur', this._windowBlurHandler);\n }\n\n this._viewportSubscription.unsubscribe();\n this._componentDestroyed = true;\n this._destroyPanel();\n this._closeKeyEventStream.complete();\n this._clearFromModal();\n }\n\n /** Whether or not the autocomplete panel is open. */\n get panelOpen(): boolean {\n return this._overlayAttached && this.autocomplete.showPanel;\n }\n private _overlayAttached: boolean = false;\n\n /** Opens the autocomplete suggestion panel. */\n openPanel(): void {\n this._openPanelInternal();\n }\n\n /** Closes the autocomplete suggestion panel. */\n closePanel(): void {\n this._resetLabel();\n\n if (!this._overlayAttached) {\n return;\n }\n\n if (this.panelOpen) {\n // Only emit if the panel was visible.\n // The `NgZone.onStable` always emits outside of the Angular zone,\n // so all the subscriptions from `_subscribeToClosingActions()` are also outside of the Angular zone.\n // We should manually run in Angular zone to update UI after panel closing.\n this._zone.run(() => {\n this.autocomplete.closed.emit();\n });\n }\n\n // Only reset if this trigger is the latest one that opened the\n // autocomplete since another may have taken it over.\n if (this.autocomplete._latestOpeningTrigger === this) {\n this.autocomplete._isOpen = false;\n this.autocomplete._latestOpeningTrigger = null;\n }\n\n this._overlayAttached = false;\n this._pendingAutoselectedOption = null;\n\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n this._closingActionsSubscription.unsubscribe();\n }\n\n this._updatePanelState();\n\n // Note that in some cases this can end up being called after the component is destroyed.\n // Add a check to ensure that we don't try to run change detection on a destroyed view.\n if (!this._componentDestroyed) {\n // We need to trigger change detection manually, because\n // `fromEvent` doesn't seem to do it at the proper time.\n // This ensures that the label is reset when the\n // user clicks outside.\n this._changeDetectorRef.detectChanges();\n }\n\n // Remove aria-owns attribute when the autocomplete is no longer visible.\n if (this._trackedModal) {\n removeAriaReferencedId(this._trackedModal, 'aria-owns', this.autocomplete.id);\n }\n }\n\n /**\n * Updates the position of the autocomplete suggestion panel to ensure that it fits all options\n * within the viewport.\n */\n updatePosition(): void {\n if (this._overlayAttached) {\n this._overlayRef!.updatePosition();\n }\n }\n\n /**\n * A stream of actions that should close the autocomplete panel, including\n * when an option is selected, on blur, and when TAB is pressed.\n */\n get panelClosingActions(): Observable<MatOptionSelectionChange | null> {\n return merge(\n this.optionSelections,\n this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)),\n this._closeKeyEventStream,\n this._getOutsideClickStream(),\n this._overlayRef\n ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached))\n : observableOf(),\n ).pipe(\n // Normalize the output so we return a consistent type.\n map(event => (event instanceof MatOptionSelectionChange ? event : null)),\n );\n }\n\n /** Stream of changes to the selection state of the autocomplete options. */\n readonly optionSelections: Observable<MatOptionSelectionChange> = defer(() => {\n const options = this.autocomplete ? this.autocomplete.options : null;\n\n if (options) {\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\n );\n }\n\n // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.\n // Return a stream that we'll replace with the real one once everything is in place.\n return this._zone.onStable.pipe(\n take(1),\n switchMap(() => this.optionSelections),\n );\n }) as Observable<MatOptionSelectionChange>;\n\n /** The currently active option, coerced to MatOption type. */\n get activeOption(): MatOption | null {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n\n return null;\n }\n\n /** Stream of clicks outside of the autocomplete panel. */\n private _getOutsideClickStream(): Observable<any> {\n return merge(\n fromEvent(this._document, 'click') as Observable<MouseEvent>,\n fromEvent(this._document, 'auxclick') as Observable<MouseEvent>,\n fromEvent(this._document, 'touchend') as Observable<TouchEvent>,\n ).pipe(\n filter(event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = _getEventTarget<HTMLElement>(event)!;\n const formField = this._formField\n ? this._formField.getConnectedOverlayOrigin().nativeElement\n : null;\n const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;\n\n return (\n this._overlayAttached &&\n clickTarget !== this._element.nativeElement &&\n // Normally focus moves inside `mousedown` so this condition will almost always be\n // true. Its main purpose is to handle the case where the input is focused from an\n // outside click which propagates up to the `body` listener within the same sequence\n // and causes the panel to close immediately (see #3106).\n this._document.activeElement !== this._element.nativeElement &&\n (!formField || !formField.contains(clickTarget)) &&\n (!customOrigin || !customOrigin.contains(clickTarget)) &&\n !!this._overlayRef &&\n !this._overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n );\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any): void {\n Promise.resolve(null).then(() => this._assignOptionValue(value));\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => {}): void {\n this._onChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => {}) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this._element.nativeElement.disabled = isDisabled;\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const hasModifier = hasModifierKey(event);\n\n // Prevent the default action on all escape key presses. This is here primarily to bring IE\n // in line with other browsers. By default, pressing escape on IE will cause it to revert\n // the input value to the one that it had on focus, however it won't dispatch any events\n // which means that the model value will be out of sync with the view.\n if (keyCode === ESCAPE && !hasModifier) {\n event.preventDefault();\n }\n\n this._valueOnLastKeydown = this._element.nativeElement.value;\n\n if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) {\n this.activeOption._selectViaInteraction();\n this._resetActiveItem();\n event.preventDefault();\n } else if (this.autocomplete) {\n const prevActiveItem = this.autocomplete._keyManager.activeItem;\n const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n\n if (keyCode === TAB || (isArrowKey && !hasModifier && this.panelOpen)) {\n this.autocomplete._keyManager.onKeydown(event);\n } else if (isArrowKey && this._canOpen()) {\n this._openPanelInternal(this._valueOnLastKeydown);\n }\n\n if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);\n\n if (this.autocomplete.autoSelectActiveOption && this.activeOption) {\n if (!this._pendingAutoselectedOption) {\n this._valueBeforeAutoSelection = this._valueOnLastKeydown;\n }\n\n this._pendingAutoselectedOption = this.activeOption;\n this._assignOptionValue(this.activeOption.value);\n }\n }\n }\n }\n\n _handleInput(event: KeyboardEvent): void {\n let target = event.target as HTMLInputElement;\n let value: number | string | null = target.value;\n\n // Based on `NumberValueAccessor` from forms.\n if (target.type === 'number') {\n value = value == '' ? null : parseFloat(value);\n }\n\n // If the input has a placeholder, IE will fire the `input` event on page load,\n // focus and blur, in addition to when the user actually changed the value. To\n // filter out all of the extra events, we save the value on focus and between\n // `input` events, and we check whether it changed.\n // See: https://connect.microsoft.com/IE/feedback/details/885747/\n if (this._previousValue !== value) {\n this._previousValue = value;\n this._pendingAutoselectedOption = null;\n\n // If selection is required we don't write to the CVA while the user is typing.\n // At the end of the selection either the user will have picked something\n // or we'll reset the value back to null.\n if (!this.autocomplete || !this.autocomplete.requireSelection) {\n this._onChange(value);\n }\n\n if (!value) {\n this._clearPreviousSelectedOption(null, false);\n } else if (this.panelOpen && !this.autocomplete.requireSelection) {\n // Note that we don't reset this when `requireSelection` is enabled,\n // because the option will be reset when the panel is closed.\n const selectedOption = this.autocomplete.options?.find(option => option.selected);\n\n if (selectedOption) {\n const display = this._getDisplayValue(selectedOption.value);\n\n if (value !== display) {\n selectedOption.deselect(false);\n }\n }\n }\n\n if (this._canOpen() && this._document.activeElement === event.target) {\n // When the `input` event fires, the input's value will have already changed. This means\n // that if we take the `this._element.nativeElement.value` directly, it'll be one keystroke\n // behind. This can be a problem when the user selects a value, changes a character while\n // the input still has focus and then clicks away (see #28432). To work around it, we\n // capture the value in `keydown` so we can use it here.\n const valueOnAttach = this._valueOnLastKeydown ?? this._element.nativeElement.value;\n this._valueOnLastKeydown = null;\n this._openPanelInternal(valueOnAttach);\n }\n }\n }\n\n _handleFocus(): void {\n if (!this._canOpenOnNextFocus) {\n this._canOpenOnNextFocus = true;\n } else if (this._canOpen()) {\n this._previousValue = this._element.nativeElement.value;\n this._attachOverlay(this._previousValue);\n this._floatLabel(true);\n }\n }\n\n _handleClick(): void {\n if (this._canOpen() && !this.panelOpen) {\n this._openPanelInternal();\n }\n }\n\n /**\n * In \"auto\" mode, the label will animate down as soon as focus is lost.\n * This causes the value to jump when selecting an option with the mouse.\n * This method manually floats the label until the panel can be closed.\n * @param shouldAnimate Whether the label should be animated when it is floated.\n */\n private _floatLabel(shouldAnimate = false): void {\n if (this._formField && this._formField.floatLabel === 'auto') {\n if (shouldAnimate) {\n this._formField._animateAndLockLabel();\n } else {\n this._formField.floatLabel = 'always';\n }\n\n this._manuallyFloatingLabel = true;\n }\n }\n\n /** If the label has been manually elevated, return it to its normal state. */\n private _resetLabel(): void {\n if (this._manuallyFloatingLabel) {\n if (this._formField) {\n this._formField.floatLabel = 'auto';\n }\n this._manuallyFloatingLabel = false;\n }\n }\n\n /**\n * This method listens to a stream of panel closing actions and resets the\n * stream every time the option list changes.\n */\n private _subscribeToClosingActions(): Subscription {\n const firstStable = this._zone.onStable.pipe(take(1));\n const optionChanges = this.autocomplete.options.changes.pipe(\n tap(() => this._positionStrategy.reapplyLastPosition()),\n // Defer emitting to the stream until the next tick, because changing\n // bindings in here will cause \"changed after checked\" errors.\n delay(0),\n );\n\n // When the zone is stable initially, and when the option list changes...\n return (\n merge(firstStable, optionChanges)\n .pipe(\n // create a new stream of panelClosingActions, replacing any previous streams\n // that were created, and flatten it so our stream only emits closing events...\n switchMap(() => {\n // The `NgZone.onStable` always emits outside of the Angular zone, thus we have to re-enter\n // the Angular zone. This will lead to change detection being called outside of the Angular\n // zone and the `autocomplete.opened` will also emit outside of the Angular.\n this._zone.run(() => {\n const wasOpen = this.panelOpen;\n this._resetActiveItem();\n this._updatePanelState();\n this._changeDetectorRef.detectChanges();\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n }\n\n if (wasOpen !== this.panelOpen) {\n // If the `panelOpen` state changed, we need to make sure to emit the `opened` or\n // `closed` event, because we may not have emitted it. This can happen\n // - if the users opens the panel and there are no options, but the\n // options come in slightly later or as a result of the value changing,\n // - if the panel is closed after the user entered a string that did not match any\n // of the available options,\n // - if a valid string is entered after an invalid one.\n if (this.panelOpen) {\n this._emitOpened();\n } else {\n this.autocomplete.closed.emit();\n }\n }\n });\n\n return this.panelClosingActions;\n }),\n // when the first closing event occurs...\n take(1),\n )\n // set the value, close the panel, and complete.\n .subscribe(event => this._setValueAndClose(event))\n );\n }\n\n /**\n * Emits the opened event once it's known that the panel will be shown and stores\n * the state of the trigger right before the opening sequence was finished.\n */\n private _emitOpened() {\n this.autocomplete.opened.emit();\n }\n\n /** Destroys the autocomplete suggestion panel. */\n private _destroyPanel(): void {\n if (this._overlayRef) {\n this.closePanel();\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n }\n\n /** Given a value, returns the string that should be shown within the input. */\n private _getDisplayValue<T>(value: T): T | string {\n const autocomplete = this.autocomplete;\n return autocomplete && autocomplete.displayWith ? autocomplete.displayWith(value) : value;\n }\n\n private _assignOptionValue(value: any): void {\n const toDisplay = this._getDisplayValue(value);\n\n if (value == null) {\n this._clearPreviousSelectedOption(null, false);\n }\n\n // Simply falling back to an empty string if the display value is falsy does not work properly.\n // The display value can also be the number zero and shouldn't fall back to an empty string.\n this._updateNativeInputValue(toDisplay != null ? toDisplay : '');\n }\n\n private _updateNativeInputValue(value: string): void {\n // If it's used within a `MatFormField`, we should set it through the property so it can go\n // through change detection.\n if (this._formField) {\n this._formField._control.value = value;\n } else {\n this._element.nativeElement.value = value;\n }\n\n this._previousValue = value;\n }\n\n /**\n * This method closes the panel, and if a value is specified, also sets the associated\n * control to that value. It will also mark the control as dirty if this interaction\n * stemmed from the user.\n */\n private _setValueAndClose(event: MatOptionSelectionChange | null): void {\n const panel = this.autocomplete;\n const toSelect = event ? event.source : this._pendingAutoselectedOption;\n\n if (toSelect) {\n this._clearPreviousSelectedOption(toSelect);\n this._assignOptionValue(toSelect.value);\n // TODO(crisbeto): this should wait until the animation is done, otherwise the value\n // gets reset while the panel is still animating which looks glitchy. It'll likely break\n // some tests to change it at this point.\n this._onChange(toSelect.value);\n panel._emitSelectEvent(toSelect);\n this._element.nativeElement.focus();\n } else if (\n panel.requireSelection &&\n this._element.nativeElement.value !== this._valueOnAttach\n ) {\n this._clearPreviousSelectedOption(null);\n this._assignOptionValue(null);\n // Wait for the animation to finish before clearing the form control value, otherwise\n // the options might change while the animation is running which looks glitchy.\n if (panel._animationDone) {\n panel._animationDone.pipe(take(1)).subscribe(() => this._onChange(null));\n } else {\n this._onChange(null);\n }\n }\n\n this.closePanel();\n }\n\n /**\n * Clear any previous selected option and emit a selection change event for this option\n */\n private _clearPreviousSelectedOption(skip: MatOption | null, emitEvent?: boolean) {\n // Null checks are necessary here, because the autocomplete\n // or its options may not have been assigned yet.\n this.autocomplete?.options?.forEach(option => {\n if (option !== skip && option.selected) {\n option.deselect(emitEvent);\n }\n });\n }\n\n private _openPanelInternal(valueOnAttach = this._element.nativeElement.value) {\n this._attachOverlay(valueOnAttach);\n this._floatLabel();\n // Add aria-owns attribute when the autocomplete becomes visible.\n if (this._trackedModal) {\n const panelId = this.autocomplete.id;\n addAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n }\n }\n\n private _attachOverlay(valueOnAttach: string): void {\n if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatAutocompleteMissingPanelError();\n }\n\n let overlayRef = this._overlayRef;\n\n if (!overlayRef) {\n this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef, {\n id: this._formField?.getLabelId(),\n });\n overlayRef = this._overlay.create(this._getOverlayConfig());\n this._overlayRef = overlayRef;\n this._viewportSubscription = this._viewportRuler.change().subscribe(() => {\n if (this.panelOpen && overlayRef) {\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n });\n } else {\n // Update the trigger, panel width and direction, in case anything has changed.\n this._positionStrategy.setOrigin(this._getConnectedElement());\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n\n if (overlayRef && !overlayRef.hasAttached()) {\n overlayRef.attach(this._portal);\n this._valueOnAttach = valueOnAttach;\n this._valueOnLastKeydown = null;\n this._closingActionsSubscription = this._subscribeToClosingActions();\n }\n\n const wasOpen = this.panelOpen;\n\n this.autocomplete._isOpen = this._overlayAttached = true;\n this.autocomplete._latestOpeningTrigger = this;\n this.autocomplete._setColor(this._formField?.color);\n this._updatePanelState();\n this._applyModalPanelOwnership();\n\n // We need to do an extra `panelOpen` check in here, because the\n // autocomplete won't be shown if there are no options.\n if (this.panelOpen && wasOpen !== this.panelOpen) {\n this._emitOpened();\n }\n }\n\n /** Handles keyboard events coming from the overlay panel. */\n private _handlePanelKeydown = (event: KeyboardEvent) => {\n // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction\n if (\n (event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))\n ) {\n // If the user had typed something in before we autoselected an option, and they decided\n // to cancel the selection, restore the input value to the one they had typed in.\n if (this._pendingAutoselectedOption) {\n this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');\n this._pendingAutoselectedOption = null;\n }\n this._closeKeyEventStream.next();\n this._resetActiveItem();\n // We need to stop propagation, otherwise the event will eventually\n // reach the input itself and cause the overlay to be reopened.\n event.stopPropagation();\n event.preventDefault();\n }\n };\n\n /** Updates the panel's visibility state and any trigger state tied to id. */\n private _updatePanelState() {\n this.autocomplete._setVisibility();\n\n // Note that here we subscribe and unsubscribe based on the panel's visiblity state,\n // because the act of subscribing will prevent events from reaching other overlays and\n // we don't want to block the events if there are no options.\n if (this.panelOpen) {\n const overlayRef = this._overlayRef!;\n\n if (!this._keydownSubscription) {\n // Use the `keydownEvents` in order to take advantage of\n // the overlay event targeting provided by the CDK overlay.\n this._keydownSubscription = overlayRef.keydownEvents().subscribe(this._handlePanelKeydown);\n }\n\n if (!this._outsideClickSubscription) {\n // Subscribe to the pointer events stream so that it doesn't get picked up by other overlays.\n // TODO(crisbeto): we should switch `_getOutsideClickStream` eventually to use this stream,\n // but the behvior isn't exactly the same and it ends up breaking some internal tests.\n this._outsideClickSubscription = overlayRef.outsidePointerEvents().subscribe();\n }\n } else {\n this._keydownSubscription?.unsubscribe();\n this._outsideClickSubscription?.unsubscribe();\n this._keydownSubscription = this._outsideClickSubscription = null;\n }\n }\n\n private _getOverlayConfig(): OverlayConfig {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPosition(),\n scrollStrategy: this._scrollStrategy(),\n width: this._getPanelWidth(),\n direction: this._dir ?? undefined,\n panelClass: this._defaults?.overlayPanelClass,\n });\n }\n\n private _getOverlayPosition(): PositionStrategy {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._getConnectedElement())\n .withFlexibleDimensions(false)\n .withPush(false);\n\n this._setStrategyPositions(strategy);\n this._positionStrategy = strategy;\n return strategy;\n }\n\n /** Sets the positions on a position strategy based on the directive's input state. */\n private _setStrategyPositions(positionStrategy: FlexibleConnectedPositionStrategy) {\n // Note that we provide horizontal fallback positions, even though by default the dropdown\n // width matches the input, because consumers can override the width. See #18854.\n const belowPositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n ];\n\n // The overlay edge connected to the trigger should have squared corners, while\n // the opposite end has rounded corners. We apply a CSS class to swap the\n // border-radius based on the overlay position.\n const panelClass = this._aboveClass;\n const abovePositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass},\n ];\n\n let positions: ConnectedPosition[];\n\n if (this.position === 'above') {\n positions = abovePositions;\n } else if (this.position === 'below') {\n positions = belowPositions;\n } else {\n positions = [...belowPositions, ...abovePositions];\n }\n\n positionStrategy.withPositions(positions);\n }\n\n private _getConnectedElement(): ElementRef<HTMLElement> {\n if (this.connectedTo) {\n return this.connectedTo.elementRef;\n }\n\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;\n }\n\n private _getPanelWidth(): number | string {\n return this.autocomplete.panelWidth || this._getHostWidth();\n }\n\n /** Returns the width of the input element, so the panel width can match it. */\n private _getHostWidth(): number {\n return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n }\n\n /**\n * Reset the active item to -1. This is so that pressing arrow keys will activate the correct\n * option.\n *\n * If the consumer opted-in to automatically activatating the first option, activate the first\n * *enabled* option.\n */\n private _resetActiveItem(): void {\n const autocomplete = this.autocomplete;\n\n if (autocomplete.autoActiveFirstOption) {\n // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\n // because it activates the first option that passes the skip predicate, rather than the\n // first *enabled* option.\n let firstEnabledOptionIndex = -1;\n\n for (let index = 0; index < autocomplete.options.length; index++) {\n const option = autocomplete.options.get(index)!;\n if (!option.disabled) {\n firstEnabledOptionIndex = index;\n break;\n }\n }\n autocomplete._keyManager.setActiveItem(firstEnabledOptionIndex);\n } else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }\n\n /** Determines whether the panel can be opened. */\n private _canOpen(): boolean {\n const element = this._element.nativeElement;\n return !element.readOnly && !element.disabled && !this.autocompleteDisabled;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document?.defaultView || window;\n }\n\n /** Scrolls to a particular option in the list. */\n private _scrollToOption(index: number): void {\n // Given that we are not actually focusing active options, we must manually adjust scroll\n // to reveal options below the fold. First, we find the offset of the option from the top\n // of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n // the panel height + the option height, so the active option will be just visible at the\n // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n // will become the offset. If that offset is visible within the panel already, the scrollTop is\n // not adjusted.\n const autocomplete = this.autocomplete;\n const labelCount = _countGroupLabelsBeforeOption(\n index,\n autocomplete.options,\n autocomplete.optionGroups,\n );\n\n if (index === 0 && labelCount === 1) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n autocomplete._setScrollTop(0);\n } else if (autocomplete.panel) {\n const option = autocomplete.options.toArray()[index];\n\n if (option) {\n const element = option._getHostElement();\n const newScrollPosition = _getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n autocomplete._getScrollTop(),\n autocomplete.panel.nativeElement.offsetHeight,\n );\n\n autocomplete._setScrollTop(newScrollPosition);\n }\n }\n }\n\n /**\n * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is\n * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options\n * panel. Track the modal we have changed so we can undo the changes on destroy.\n */\n private _trackedModal: Element | null = null;\n\n /**\n * If the autocomplete trigger is inside of an `aria-modal` element, connect\n * that modal to the options panel with `aria-owns`.\n *\n * For some browser + screen reader combinations, when navigation is inside\n * of an `aria-modal` element, the screen reader treats everything outside\n * of that modal as hidden or invisible.\n *\n * This causes a problem when the combobox trigger is _inside_ of a modal, because the\n * options panel is rendered _outside_ of that modal, preventing screen reader navigation\n * from reaching the panel.\n *\n * We can work around this issue by applying `aria-owns` to the modal with the `id` of\n * the options panel. This effectively communicates to assistive technology that the\n * options panel is part of the same interaction as the modal.\n *\n * At time of this writing, this issue is present in VoiceOver.\n * See https://github.com/angular/components/issues/20694\n */\n private _applyModalPanelOwnership() {\n // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\n // the `LiveAnnouncer` and any other usages.\n //\n // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n // section of the DOM we need to look through. This should cover all the cases we support, but\n // the selector can be expanded if it turns out to be too narrow.\n const modal = this._element.nativeElement.closest(\n 'body > .cdk-overlay-container [aria-modal=\"true\"]',\n );\n\n if (!modal) {\n // Most commonly, the autocomplete trigger is not inside a modal.\n return;\n }\n\n const panelId = this.autocomplete.id;\n\n if (this._trackedModal) {\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n }\n\n addAriaReferencedId(modal, 'aria-owns', panelId);\n this._trackedModal = modal;\n }\n\n /** Clears the references to the listbox overlay element from the modal it was added to. */\n private _clearFromModal() {\n if (this._trackedModal) {\n const panelId = this.autocomplete.id;\n\n removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n this._trackedModal = null;\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\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatOptionModule} from '@angular/material/core';\nimport {CommonModule} from '@angular/common';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {MatAutocomplete} from './autocomplete';\nimport {\n MatAutocompleteTrigger,\n MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './autocomplete-trigger';\nimport {MatAutocompleteOrigin} from './autocomplete-origin';\n\n@NgModule({\n imports: [\n OverlayModule,\n MatOptionModule,\n MatCommonModule,\n CommonModule,\n MatAutocomplete,\n MatAutocompleteTrigger,\n MatAutocompleteOrigin,\n ],\n exports: [\n CdkScrollableModule,\n MatAutocomplete,\n MatOptionModule,\n MatCommonModule,\n MatAutocompleteTrigger,\n MatAutocompleteOrigin,\n ],\n providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatAutocompleteModule {}\n","import { Injectable } from '@angular/core';\n\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nimport { finShare } from '@fcom/rx';\n\nimport { PopoverDirective } from '../directive/popover.directive';\n\n/**\n * PopoverService makes sure that if there are multiple popovers in one view, only one of them is open at the time\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PopoverService {\n private openPopover: PopoverDirective = null;\n\n /**\n * This is a compatibility \"API\" to be used with current login/join forms/dialogs\n * that were implemented before the latest popover (popover) refactoring.\n *\n * DISCLAIMER: The login and join forms will be refactored later to use the newly refactored\n * popover component. It was decided that due to an upcoming A/B test, we would\n * manage the behaviour with something like this instead of a full refactoring.\n */\n _popoverOpen$ = new BehaviorSubject(false);\n\n get popoverOpen$(): Observable<boolean> {\n return this._popoverOpen$.asObservable().pipe(finShare());\n }\n\n open(popover: PopoverDirective): void {\n if (this.openPopover) {\n this.openPopover.destroyPopover();\n }\n this.openPopover = popover;\n this._popoverOpen$.next(true);\n }\n\n close(shouldFocusOnHost?: boolean): void {\n this._popoverOpen$.next(false);\n if (this.openPopover) {\n this.openPopover.destroyPopover(shouldFocusOnHost);\n }\n\n this.openPopover = null;\n }\n\n closeByContext(context: string): void {\n if (this.openPopover && this.openPopover.options.context === context) {\n this.close();\n }\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CurrencyService } from '@fcom/core';\n\nimport { FormatPassengerPipe } from './format-passenger.pipe';\nimport { DateFormatPipe } from './date-format.pipe';\nimport { DelayPipe } from './delay.pipe';\nimport { EmptyPipe } from './empty.pipe';\nimport { FinLowerCasePipe } from './fin-lower-case.pipe';\nimport { MapPipe } from './map.pipe';\nimport { MsgFormatPipe } from './msg-format.pipe';\nimport { ObservableToArrayPipe } from './observe.pipe';\nimport { PadPipe } from './pad.pipe';\nimport { PricePipe } from './price.pipe';\nimport { SafePipe } from './safe.pipe';\nimport { AddedServicesPipe } from './added-services.pipe';\nimport { StripHtmlPipe } from './strip-html.pipe';\nimport { TailNamesPipe } from './tail-names.pipe';\nimport { TimeFormatPipe } from './time.pipe';\nimport { NegatePipe } from './negate.pipe';\nimport { IntlJoinPipe } from './intl-join.pipe';\nimport { JoinPipe } from './join.pipe';\nimport { UniquePipe } from './unique.pipe';\nimport { TemporaryDurationPipe } from './duration.temp.pipe';\nimport { ToObservablePipe } from './to-observable.pipe';\nimport { MultiplyAmountPipe } from './multiply-amount.pipe';\nimport { DurationPipe } from './duration.pipe';\nimport { OffersPricePipe } from './offers-price.pipe';\nimport { CountryNamePipe } from './country-name.pipe';\nimport { PointsPipe } from './points.pipe';\nimport { TimestampPipe } from './timestamp.pipe';\nimport { EncodePipe } from './encode-string.pipe';\nimport { ResolveLinksPipe } from './resolve-links.pipe';\nimport { NonZeroAmountPipe } from './non-zero-amount.pipe';\nimport { WeekdayPipe } from './weekday.pipe';\nimport { IncludesPipe } from './includes.pipe';\nimport { FormatCardNumberPipe } from './format-card-number.pipe';\nimport { ToBehaviorSubjectPipe } from './to-behavior-subject.pipe';\nimport { FlightNumbersPipe } from './flight-number.pipe';\n\n@NgModule({\n declarations: [\n CountryNamePipe,\n DateFormatPipe,\n DelayPipe,\n DurationPipe,\n EmptyPipe,\n FormatPassengerPipe,\n IntlJoinPipe,\n JoinPipe,\n MapPipe,\n MsgFormatPipe,\n MultiplyAmountPipe,\n NegatePipe,\n ObservableToArrayPipe,\n PadPipe,\n PricePipe,\n OffersPricePipe,\n SafePipe,\n AddedServicesPipe,\n StripHtmlPipe,\n TailNamesPipe,\n TimeFormatPipe,\n ToObservablePipe,\n UniquePipe,\n TemporaryDurationPipe,\n FinLowerCasePipe,\n PointsPipe,\n TimestampPipe,\n EncodePipe,\n ResolveLinksPipe,\n NonZeroAmountPipe,\n WeekdayPipe,\n IncludesPipe,\n FormatCardNumberPipe,\n ToBehaviorSubjectPipe,\n FlightNumbersPipe,\n ],\n exports: [\n CountryNamePipe,\n DateFormatPipe,\n DelayPipe,\n DurationPipe,\n EmptyPipe,\n FormatPassengerPipe,\n IntlJoinPipe,\n JoinPipe,\n MapPipe,\n MsgFormatPipe,\n MultiplyAmountPipe,\n NegatePipe,\n ObservableToArrayPipe,\n PadPipe,\n PricePipe,\n OffersPricePipe,\n SafePipe,\n AddedServicesPipe,\n StripHtmlPipe,\n TailNamesPipe,\n TimeFormatPipe,\n ToObservablePipe,\n UniquePipe,\n TemporaryDurationPipe,\n FinLowerCasePipe,\n PointsPipe,\n TimestampPipe,\n EncodePipe,\n ResolveLinksPipe,\n NonZeroAmountPipe,\n WeekdayPipe,\n IncludesPipe,\n FormatCardNumberPipe,\n ToBehaviorSubjectPipe,\n FlightNumbersPipe,\n ],\n})\nexport class PipesModule {\n static forRoot(): ModuleWithProviders<PipesModule> {\n return {\n ngModule: PipesModule,\n providers: [CurrencyService],\n };\n }\n}\n","import { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Emits a given value if the source Observable completes without emitting any\n * `next` value, otherwise mirrors the source Observable.\n *\n * <span class=\"informal\">If the source Observable turns out to be empty, then\n * this operator will emit a default value.</span>\n *\n * ![](defaultIfEmpty.png)\n *\n * `defaultIfEmpty` emits the values emitted by the source Observable or a\n * specified default value if the source Observable is empty (completes without\n * having emitted any `next` value).\n *\n * ## Example\n *\n * If no clicks happen in 5 seconds, then emit 'no clicks'\n *\n * ```ts\n * import { fromEvent, takeUntil, interval, defaultIfEmpty } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000)));\n * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks'));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link empty}\n * @see {@link last}\n *\n * @param defaultValue The default value used if the source\n * Observable is empty.\n * @return A function that returns an Observable that emits either the\n * specified `defaultValue` if the source Observable emits no items, or the\n * values emitted by the source Observable.\n */\nexport function defaultIfEmpty<T, R>(defaultValue: R): OperatorFunction<T, T | R> {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n hasValue = true;\n subscriber.next(value);\n },\n () => {\n if (!hasValue) {\n subscriber.next(defaultValue!);\n }\n subscriber.complete();\n }\n )\n );\n });\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { UiComponentsModule } from '@fcom/ui-components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { ComponentsModule } from '@fcom/common/components/components.module';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { GtmModule } from '@fcom/common/gtm/gtm.module';\nimport { PipesModule } from '@fcom/common/pipes/pipes.module';\n\nimport { CommonServiceFormsModule } from './components/common/common-service-forms.module';\nimport { RadioListComponent } from './components/radio-list/radio-list.component';\nimport { SubmitService, PrefillService } from './services';\n\n@NgModule({\n imports: [\n CommonModule,\n ComponentsModule,\n DirectiveModule,\n GtmModule,\n PipesModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n CommonServiceFormsModule,\n UiComponentsModule,\n UiTranslateModule,\n ],\n declarations: [RadioListComponent],\n exports: [RadioListComponent],\n providers: [SubmitService, PrefillService],\n})\nexport class ServiceFormsModule {}\n","export enum ButtonPosition {\n GRID = 'grid',\n GRID_FULL = 'grid_full',\n GRID_TWO_THIRDS_RIGHT = 'grid_two_thirds_right',\n FULL = 'full',\n}\n\nexport enum ButtonLayout {\n COLUMN = 'COLUMN',\n ROW = 'ROW',\n}\n","<div class=\"nordic-blue-25-bg ps-small ms-small-b rounded-large font-body-1 relative\">\n <fcom-text-input\n #searchInput\n [parentForm]=\"form\"\n [controlName]=\"'search'\"\n [translationPrefix]=\"'paxDetails.corporate.selectPassenger'\"\n [displayMargin]=\"false\"\n [disableAutoComplete]=\"true\"\n [clearInput]=\"true\"\n ></fcom-text-input>\n <div *ngIf=\"filteredUsers$ | async as users\" class=\"absolute fill z1 ms-xxsmall-t ps-large-r\">\n <div class=\"white-bg shadow border overflow-hidden rounded-large\">\n <ul class=\"no-list-style\" role=\"listbox\">\n <li\n *ngFor=\"let user of users; let isLast = last\"\n class=\"search-result\"\n role=\"option\"\n [ngClass]=\"{ 'border-bottom': !isLast }\"\n >\n <a href=\"#\" class=\"nordic-blue-900-text no-underline block ps-small\" (click)=\"selectUser(user, $event)\">\n {{ user.firstname }} {{ user.lastname }}\n </a>\n </li>\n <li *ngIf=\"!users.length\" class=\"ps-small\">\n {{ 'paxDetails.corporate.noMatches' | finLocalization }}\n </li>\n </ul>\n </div>\n </div>\n</div>\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\nimport { AbstractControl, FormControl, FormGroup, UntypedFormControl, UntypedFormGroup } from '@angular/forms';\n\nimport { BehaviorSubject, combineLatest, concatMap, noop, Observable, of, race, Subscription } from 'rxjs';\nimport { delay, filter, map, pairwise, take } from 'rxjs/operators';\n\nimport { CorporateUser } from '@fcom/common/interfaces/corporate/corporate.interface';\nimport { stopPropagation, unsubscribe } from '@fcom/core/utils';\nimport { TextInputComponent } from '@fcom/ui-components';\nimport { PassengerFormService, PrefillSource } from '@fcom/common-booking/services';\nimport { TypedFormGroup } from '@fcom/service-forms';\n\ninterface SearchForm {\n search: AbstractControl<string | undefined>;\n}\n\n@Component({\n selector: 'fin-corporate-passenger-search',\n templateUrl: './corporate-passenger-search.component.html',\n styleUrl: './corporate-passenger-search.component.scss',\n})\nexport class CorporatePassengerSearchComponent implements OnInit, OnDestroy {\n @ViewChild('searchInput') searchInput: TextInputComponent;\n\n @Input()\n corporateUsers$: Observable<CorporateUser[]>;\n\n @Input({ required: true })\n passengerFormGroup: TypedFormGroup<UntypedFormGroup | UntypedFormControl>;\n\n @Output()\n userSelected = new EventEmitter<CorporateUser>();\n\n @Output()\n userCleared = new EventEmitter<CorporateUser>();\n\n @Output()\n toggleLoader = new EventEmitter<boolean>();\n\n form: FormGroup<SearchForm>;\n\n filteredUsers$: Observable<CorporateUser[] | undefined>;\n selectedUser$ = new BehaviorSubject<CorporateUser | undefined>(undefined);\n prefillDone = false;\n timer$: Observable<boolean | unknown>;\n\n subscriptions = new Subscription();\n\n constructor(private passengerFormService: PassengerFormService) {}\n\n ngOnInit(): void {\n this.form = new FormGroup<SearchForm>({\n search: new FormControl(),\n });\n\n this.filteredUsers$ = combineLatest([\n this.form.get('search').valueChanges,\n this.corporateUsers$,\n this.selectedUser$,\n ]).pipe(\n map(([input, users, selectedUser]) => {\n if (!input || selectedUser) {\n return undefined;\n }\n return users.filter((user) => {\n const name = `${user.firstname} ${user.lastname}`;\n return name.toLowerCase().includes(input.toLowerCase());\n });\n })\n );\n\n this.subscriptions.add(\n this.form\n .get('search')\n .valueChanges.pipe(take(1))\n .subscribe(() => {\n this.startTimer();\n })\n );\n\n // Clear selected user if user changes the input after user has been selected\n this.subscriptions.add(\n this.selectedUser$\n .pipe(\n filter(Boolean),\n concatMap(() => {\n return this.form.get('search').valueChanges.pipe(pairwise(), take(1));\n })\n )\n .subscribe(() => {\n this.clearSelectedUser();\n })\n );\n }\n\n selectUser(user: CorporateUser, e: Event): void {\n stopPropagation(e);\n this.selectedUser$.next(user);\n this.prefillDone = true;\n this.form.get('search').setValue(`${user.firstname} ${user.lastname}`);\n this.userSelected.emit(user);\n\n this.subscriptions.add(\n this.passengerFormService\n .prefillData({ group: this.passengerFormGroup }, [PrefillSource.CORPORATE], user)\n .subscribe(noop)\n );\n }\n\n clearInput(): void {\n if (!this.prefillDone) {\n return;\n }\n this.form.get('search').setValue('');\n this.searchInput.inputElement.nativeElement?.focus();\n this.clearSelectedUser();\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n private clearSelectedUser(): void {\n this.prefillDone = false;\n const user = this.selectedUser$.value;\n this.userCleared.emit(user);\n this.selectedUser$.next(undefined);\n }\n\n private startTimer(): void {\n this.timer$ = of(true).pipe(delay(1000));\n this.subscriptions.add(\n race(this.timer$, this.corporateUsers$).subscribe((val) => {\n if (val === true) {\n this.toggleLoader.emit(true);\n }\n })\n );\n this.subscriptions.add(this.corporateUsers$.pipe(take(1)).subscribe(() => this.toggleLoader.emit(false)));\n }\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { Subscription } from '../Subscription';\nimport { ObservableInput, ObservableInputTuple } from '../types';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { Subscriber } from '../Subscriber';\n\nexport function race<T extends readonly unknown[]>(inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;\nexport function race<T extends readonly unknown[]>(...inputs: [...ObservableInputTuple<T>]): Observable<T[number]>;\n\n/**\n * Returns an observable that mirrors the first source observable to emit an item.\n *\n * ![](race.png)\n *\n * `race` returns an observable, that when subscribed to, subscribes to all source observables immediately.\n * As soon as one of the source observables emits a value, the result unsubscribes from the other sources.\n * The resulting observable will forward all notifications, including error and completion, from the \"winning\"\n * source observable.\n *\n * If one of the used source observable throws an errors before a first notification\n * the race operator will also throw an error, no matter if another source observable\n * could potentially win the race.\n *\n * `race` can be useful for selecting the response from the fastest network connection for\n * HTTP or WebSockets. `race` can also be useful for switching observable context based on user\n * input.\n *\n * ## Example\n *\n * Subscribes to the observable that was the first to start emitting.\n *\n * ```ts\n * import { interval, map, race } from 'rxjs';\n *\n * const obs1 = interval(7000).pipe(map(() => 'slow one'));\n * const obs2 = interval(3000).pipe(map(() => 'fast one'));\n * const obs3 = interval(5000).pipe(map(() => 'medium one'));\n *\n * race(obs1, obs2, obs3)\n * .subscribe(winner => console.log(winner));\n *\n * // Outputs\n * // a series of 'fast one'\n * ```\n *\n * @param sources Used to race for which `ObservableInput` emits first.\n * @return An Observable that mirrors the output of the first Observable to emit an item.\n */\nexport function race<T>(...sources: (ObservableInput<T> | ObservableInput<T>[])[]): Observable<any> {\n sources = argsOrArgArray(sources);\n // If only one source was passed, just return it. Otherwise return the race.\n return sources.length === 1 ? innerFrom(sources[0] as ObservableInput<T>) : new Observable<T>(raceInit(sources as ObservableInput<T>[]));\n}\n\n/**\n * An observable initializer function for both the static version and the\n * operator version of race.\n * @param sources The sources to race\n */\nexport function raceInit<T>(sources: ObservableInput<T>[]) {\n return (subscriber: Subscriber<T>) => {\n let subscriptions: Subscription[] = [];\n\n // Subscribe to all of the sources. Note that we are checking `subscriptions` here\n // Is is an array of all actively \"racing\" subscriptions, and it is `null` after the\n // race has been won. So, if we have racer that synchronously \"wins\", this loop will\n // stop before it subscribes to any more.\n for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n subscriptions.push(\n innerFrom(sources[i] as ObservableInput<T>).subscribe(\n createOperatorSubscriber(subscriber, (value) => {\n if (subscriptions) {\n // We're still racing, but we won! So unsubscribe\n // all other subscriptions that we have, except this one.\n for (let s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null!;\n }\n subscriber.next(value);\n })\n )\n );\n }\n };\n}\n","<header *ngIf=\"boundType\" class=\"pr-xsmall-x\">\n <h3 class=\"font-heading-4 medium-type pr-xsmall-t\">\n <ng-container *ngIf=\"boundType === BoundType.outbound\">\n {{ 'itinerary.departure' | finLocalization }}\n </ng-container>\n <ng-container *ngIf=\"boundType === BoundType.inbound\">\n {{ 'itinerary.return' | finLocalization }}\n </ng-container>\n <ng-container *ngIf=\"boundType === BoundType.multi\">\n {{ title }}\n </ng-container>\n <span *ngIf=\"departureChanges?.dateTime\" class=\"grey-700-text strike-through mr-xxsmall-r\">{{\n departureChanges.dateTime | finDateFormat: 'FULL'\n }}</span>\n <span class=\"nordic-blue-900-text regular-type\">{{\n (bound$ | async).departure.dateTime | finDateFormat: 'FULL'\n }}</span>\n </h3>\n <p class=\"font-body-1\">\n <span *ngIf=\"departureChanges?.location\" class=\"grey-700-text strike-through mr-xxsmall-r\">{{\n departureChanges.locationCity\n }}</span>\n {{ departureCity$ | async }}\n –\n <span *ngIf=\"arrivalChanges?.location\" class=\"grey-700-text strike-through mr-xxsmall-r\">{{\n arrivalChanges.locationCity\n }}</span>\n {{ arrivalCity$ | async }}\n </p>\n <p class=\"font-body-1 nordic-blue-900-text\">\n {{ 'itinerary.totalDuration' | finLocalization: { duration: '' } }}\n <span *ngIf=\"boundChangeDuration\" class=\"grey-700-text strike-through mr-xxsmall-r\">\n {{ boundChangeDuration | finDuration | async }}\n </span>\n {{ (bound$ | async).duration | finDuration | async }}\n </p>\n</header>\n<div\n *ngIf=\"departureChanges?.notification\"\n class=\"timeline__right medium-type heather-700-text pr-medium-y pr-xxsmall-x\"\n>\n <fcom-notification\n *ngIf=\"departureChanges.notification\"\n [theme]=\"NotificationTheme.WARNING\"\n [layout]=\"NotificationLayout.BLOCK\"\n [iconName]=\"SvgLibraryIcon.INFO\"\n class=\"block\"\n >\n {{ 'MMB.notifications.disruption.' + departureChanges.notification + '.text' | finLocalization }}\n </fcom-notification>\n</div>\n<div *ngIf=\"showNoChangesNotification\" class=\"timeline__right medium-type heather-700-text pr-medium-y pr-xxsmall-x\">\n <fcom-notification\n [theme]=\"NotificationTheme.INFO\"\n [layout]=\"NotificationLayout.BLOCK\"\n [iconName]=\"SvgLibraryIcon.INFO\"\n class=\"block\"\n >\n {{ 'MMB.reaccommodation.notes.NO_CHANGES' | finLocalization }}\n </fcom-notification>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, map, Observable } from 'rxjs';\n\nimport { BoundType, LocationInfoMap, Duration } from '@fcom/dapi';\nimport { FinnairBoundItem, FinnairDisruptedBoundItem } from '@fcom/dapi/api/models';\nimport { NotificationLayout, NotificationTheme } from '@fcom/ui-components';\nimport { getCityName } from '@fcom/common/utils/booking.utils';\nimport { finShare } from '@fcom/rx';\n\nimport { BUS_AIRCRAFT_CODE, EndPointChanges } from '../../../interfaces';\n\n@Component({\n selector: 'fin-itinerary-timeline-bound-header',\n styleUrls: ['../arrow-block.scss'],\n templateUrl: './itinerary-timeline-bound-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryTimelineBoundHeaderComponent implements OnInit {\n public readonly BoundType = BoundType;\n public readonly BUS_AIRCRAFT_CODE = BUS_AIRCRAFT_CODE;\n\n public readonly NotificationLayout = NotificationLayout;\n public readonly NotificationTheme = NotificationTheme;\n public readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n boundType: BoundType;\n\n @Input()\n bound$: Observable<FinnairBoundItem | FinnairDisruptedBoundItem>;\n\n @Input()\n locations$: Observable<LocationInfoMap>;\n\n @Input()\n departureChanges: EndPointChanges;\n\n @Input()\n arrivalChanges: EndPointChanges;\n\n @Input()\n boundChangeDuration: Duration;\n\n @Input()\n showNoChangesNotification: boolean;\n\n @Input()\n title: string;\n\n departureCity$: Observable<string>;\n arrivalCity$: Observable<string>;\n\n ngOnInit(): void {\n const latestBoundAndLocations$ = combineLatest([this.bound$, this.locations$]);\n\n this.departureCity$ = latestBoundAndLocations$.pipe(\n map(([bound, locations]) => getCityName(bound.departure.locationCode, locations)),\n finShare()\n );\n\n this.arrivalCity$ = latestBoundAndLocations$.pipe(\n map(([bound, locations]) => getCityName(bound.arrival.locationCode, locations)),\n finShare()\n );\n }\n}\n","<div class=\"timeline__cell\" role=\"presentation\">\n <div class=\"timeline__left flex--column flex--center\">\n <div\n class=\"flex-1 line line-dotted\"\n [class.next-day]=\"layover.note === C.FinnairItineraryNote.HAS_NEXT_DAY_TRANSFER\"\n [class.long-wait]=\"layover.note === C.FinnairItineraryNote.HAS_LONG_TRANSFER\"\n [class.airport-change]=\"layover.note === C.FinnairItineraryNote.REQUIRES_AIRPORT_CHANGE\"\n ></div>\n </div>\n <div class=\"timeline__right medium-type heather-700-text pr-medium-y pr-xsmall-l\">\n <ng-template #layoverContent>\n <p *ngIf=\"layover.note === C.FinnairItineraryNote.HAS_NEXT_DAY_TRANSFER; else normalTranfer\">\n {{ 'itinerary.overnightTransfer' | finLocalization }}\n </p>\n <ng-template #normalTranfer>\n <p>{{ 'itinerary.transfer' | finLocalization }}</p>\n </ng-template>\n\n <p *ngIf=\"layover.requiresAirportChange; else potentialTerminalChange\" class=\"bold-type\">\n {{ 'itinerary.airportChange' | finLocalization }}\n </p>\n <ng-template #potentialTerminalChange>\n <p *ngIf=\"layover.requiresTerminalChange; else transportationChange\" class=\"bold-type\">\n {{ 'itinerary.terminalChange' | finLocalization }}\n </p>\n <ng-template #transportationChange>\n <ng-container *ngIf=\"layover.requiresTransportationMethodChange; else regularTransfer\" class=\"bold-type\">\n <ng-container *finLet=\"toType(previousLeg) as previous\">\n <span class=\"bold-type\" *ngIf=\"previous.aircraft?.code === BUS_AIRCRAFT_CODE\">{{\n 'itinerary.fromBusToFlight' | finLocalization\n }}</span>\n </ng-container>\n <ng-container *finLet=\"toType(nextLeg) as next\">\n <span class=\"bold-type\" *ngIf=\"next.aircraft?.code === BUS_AIRCRAFT_CODE\">{{\n 'itinerary.fromFlightToBus' | finLocalization\n }}</span>\n </ng-container>\n </ng-container>\n <ng-template #regularTransfer>\n <p class=\"bold-type\">{{ 'itinerary.planeChange' | finLocalization }}</p>\n </ng-template>\n </ng-template>\n </ng-template>\n <p>\n {{ 'itinerary.transferTime' | finLocalization: { duration: '' } }}\n <span *ngIf=\"oldDuration\" class=\"grey-700-text strike-through mr-xxsmall-r\">\n {{ oldDuration | finDuration | async }}\n </span>\n {{ layover.duration | finDuration | async }}\n </p>\n <p *ngIf=\"layover.note\" class=\"regular-type pr-xsmall-t nordic-blue-900-text\">\n <span>{{ 'itinerary.note' | finLocalization }}: </span>\n <span>{{\n 'itinerary.notes.' +\n (isBookingFlow && layover.note === FinnairItineraryNote.REQUIRES_AIRPORT_CHANGE ? 'booking.' : '') +\n layover.note | finLocalization\n }}</span>\n </p>\n <div *ngIf=\"notification\" class=\"timeline__right medium-type heather-700-text pr-small-y\">\n <fcom-notification\n [theme]=\"NotificationTheme.WARNING\"\n [layout]=\"NotificationLayout.BLOCK\"\n [iconName]=\"SvgLibraryIcon.INFO\"\n class=\"block\"\n >\n {{ 'MMB.notifications.disruption.' + notification + '.text' | finLocalization }}\n </fcom-notification>\n </div>\n </ng-template>\n\n <ng-container\n *ngIf=\"\n layover.note !== C.FinnairItineraryNote.HAS_NEXT_DAY_TRANSFER &&\n layover.note !== C.FinnairItineraryNote.REQUIRES_AIRPORT_CHANGE;\n else importantNote\n \"\n >\n <ng-container *ngTemplateOutlet=\"layoverContent\"></ng-container>\n </ng-container>\n\n <ng-template #importantNote>\n <div class=\"arrow-block rounded mr-xsmall-l\">\n <div class=\"arrow-left heather-50-bg border z2\"></div>\n <div class=\"pr-xsmall heather-50-bg relative z3\">\n <ng-container *ngTemplateOutlet=\"layoverContent\"></ng-container>\n </div>\n </div>\n </ng-template>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport {\n FinnairBoundItem,\n FinnairDisruptedBoundItem,\n FinnairItineraryItem,\n FinnairItineraryItemFlight,\n FinnairItineraryItemLayover,\n FinnairItineraryNote,\n} from '@fcom/dapi/api/models';\nimport { Duration } from '@fcom/dapi';\nimport { AppConstants } from '@fcom/booking/app-constants';\nimport { BUS_AIRCRAFT_CODE } from '@fcom/booking/modules/ticket-selection/interfaces';\nimport { NotificationLayout, NotificationTheme } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-itinerary-timeline-layover',\n styleUrls: ['../itinerary.scss', '../arrow-block.scss'],\n templateUrl: './itinerary-timeline-layover.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryTimelineLayoverComponent {\n public readonly C: typeof AppConstants = AppConstants;\n readonly BUS_AIRCRAFT_CODE = BUS_AIRCRAFT_CODE;\n readonly NotificationLayout = NotificationLayout;\n readonly NotificationTheme = NotificationTheme;\n readonly FinnairItineraryNote = FinnairItineraryNote;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n layover: FinnairItineraryItemLayover;\n\n @Input()\n bound: FinnairBoundItem | FinnairDisruptedBoundItem;\n\n @Input()\n previousLeg: FinnairItineraryItem;\n\n @Input()\n nextLeg: FinnairItineraryItem;\n\n @Input()\n notification: string;\n\n @Input()\n oldDuration: Duration;\n\n @Input()\n isBookingFlow = false;\n\n toType(t: FinnairItineraryItem): FinnairItineraryItemFlight | FinnairItineraryItemLayover {\n return 'technicalStops' in t ? (t as FinnairItineraryItemFlight) : (t as FinnairItineraryItemLayover);\n }\n}\n","<span *ngIf=\"oldEndpointDateTime\" class=\"grey-700-text itinerary-endpoint-time strike-through mr-xxsmall-r\">\n {{ oldEndpointDateTime | finDateFormat: 'WEEKDAY_SHORT' }}\n {{ oldEndpointDateTime | finTime }}\n</span>\n<span class=\"bold-type itinerary-endpoint-time\">\n {{ endpoint.dateTime | finDateFormat: 'WEEKDAY_SHORT' }}\n {{ endpoint.dateTime | finTime }}\n</span>\n<span\n *ngIf=\"locations && oldEndpointLocationCode\"\n class=\"grey-700-text itinerary-endpoint-location strike-through mr-xxsmall-r\"\n>\n {{ locations[oldEndpointLocationCode]?.name }}\n ({{ oldEndpointLocationCode }}),\n {{ locations[oldEndpointLocationCode]?.cityName }}\n</span>\n<span *ngIf=\"locations && endpoint\" class=\"medium-type itinerary-endpoint-location\">\n {{ locations[endpoint?.locationCode]?.name }}\n ({{ endpoint.locationCode }}),\n {{ locations[endpoint?.locationCode]?.cityName }}\n</span>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { FinnairTravelEndpoint } from '@fcom/dapi/api/models';\nimport { LocationInfoMap } from '@fcom/dapi/interfaces';\n\n@Component({\n selector: 'fin-itinerary-timeline-leg-endpoint',\n styleUrls: ['../itinerary.scss', '../arrow-block.scss'],\n templateUrl: './leg-endpoint.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryTimelineLegEndpointComponent {\n @Input()\n endpoint: FinnairTravelEndpoint;\n\n @Input()\n locations: LocationInfoMap;\n\n @Input()\n oldEndpointDateTime: string;\n\n @Input()\n oldEndpointLocationCode: string;\n}\n","<div class=\"timeline__cell\" *ngFor=\"let stop of leg.technicalStops; let lastStop = last\">\n <div class=\"timeline__left\" role=\"presentation\">\n <div *ngIf=\"leg.aircraft?.code !== BUS_AIRCRAFT_CODE\" class=\"flex--nogrow bubble bubble-heather\"></div>\n <div *ngIf=\"leg.aircraft?.code === BUS_AIRCRAFT_CODE\" class=\"flex--nogrow bubble bubble-plane-end\">\n <fcom-icon class=\"icon-medium nordic-blue-900-text\" [name]=\"SvgLibraryIcon.BUS\"></fcom-icon>\n </div>\n <div class=\"flex-1 line line-solid\"></div>\n <!-- For last stop, we show the endpoint bubble, which should be white if the leg is also the last -->\n <div class=\"flex--nogrow bubble bubble-plane-end\" *ngIf=\"lastStop\">\n <fcom-icon\n class=\"icon-medium nordic-blue-900-text\"\n [name]=\"leg.aircraft?.code === BUS_AIRCRAFT_CODE ? SvgLibraryIcon.BUS : SvgLibraryIcon.ARRIVAL\"\n ></fcom-icon>\n </div>\n </div>\n\n <div class=\"timeline__right flex flex--column pr-xsmall-l\">\n <p>\n <fin-itinerary-timeline-leg-endpoint\n [endpoint]=\"stop.arrival\"\n [locations]=\"locations\"\n ></fin-itinerary-timeline-leg-endpoint>\n </p>\n <p\n *ngIf=\"leg.aircraft?.code !== BUS_AIRCRAFT_CODE\"\n class=\"medium-type heather-700-text\"\n data-testid=\"technical-stop\"\n >\n {{ 'itinerary.technicalStop' | finLocalization }}<br />\n {{ stop.duration | finDuration | async }}\n </p>\n\n <ng-container *ngIf=\"leg.aircraft?.code === BUS_AIRCRAFT_CODE && lastStop\">\n <p class=\"grey-80-text mr-xsmall-y\">\n {{ leg.flightNumber }}<br />\n {{ 'operatedBy' | finLocalization: [leg && leg.operatingAirline && leg.operatingAirline.name] }}<br />\n {{ leg?.aircraft?.name }}<br />\n {{ 'bookingSearch.duration' | finLocalization: (leg.duration | finTemporaryDurationPipe) }}\n </p>\n </ng-container>\n\n <ng-container *ngIf=\"lastStop\">\n <!-- Display the whole leg's endpoint if the stop was last in the leg -->\n <p\n [ngClass]=\"{\n 'mr-xxlarge-t': leg.aircraft?.code === BUS_AIRCRAFT_CODE && lastLeg,\n 'mr-xsmall-t': leg.aircraft?.code !== BUS_AIRCRAFT_CODE,\n }\"\n >\n <span class=\"is-vishidden\">{{ 'arrival' | finLocalization }}</span>\n <fin-itinerary-timeline-leg-endpoint\n [endpoint]=\"leg.arrival\"\n [oldEndpointDateTime]=\"oldArrivalDateTime\"\n [oldEndpointLocationCode]=\"oldArrivalLocationCode\"\n [locations]=\"locations\"\n ></fin-itinerary-timeline-leg-endpoint>\n </p>\n <p class=\"light-type\" *ngIf=\"leg.arrival.terminal && leg.aircraft?.code !== BUS_AIRCRAFT_CODE\">\n {{ 'bookingSearch.flight.terminal' | finLocalization }}\n {{ leg.arrival.terminal }}\n </p>\n </ng-container>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { FinnairItineraryItemFlight } from '@fcom/dapi/api/models';\nimport { LocationInfoMap } from '@fcom/dapi/interfaces';\n\nimport { BUS_AIRCRAFT_CODE } from '../../../interfaces';\n\n@Component({\n selector: 'fin-itinerary-timeline-leg-technical-stops',\n styleUrls: ['../itinerary.scss', '../arrow-block.scss'],\n templateUrl: './leg-technical-stops.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryTimelineLegTechnicalStopsComponent {\n readonly BUS_AIRCRAFT_CODE = BUS_AIRCRAFT_CODE;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n leg: FinnairItineraryItemFlight;\n\n @Input()\n locations: LocationInfoMap;\n\n @Input()\n firstLeg = false;\n\n @Input()\n lastLeg = false;\n\n @Input()\n oldArrivalDateTime: string;\n\n @Input()\n oldArrivalLocationCode: string;\n}\n","<div class=\"timeline__cell\">\n <div class=\"timeline__left flex--column flex--center\" role=\"presentation\">\n <div class=\"flex--nogrow bubble bubble-plane-start\">\n <fcom-icon\n class=\"icon-medium nordic-blue-900-text\"\n [name]=\"busOrTrainIconMap[flight.aircraft?.code] ?? SvgLibraryIcon.DEPARTURE\"\n data-testid=\"itinerary-timeline-flight-departure-icon\"\n ></fcom-icon>\n </div>\n <div class=\"flex-1 line line-solid\"></div>\n <!-- This bubble will be rendered in flight stops later on -->\n @if (!flight.technicalStops || flight.technicalStops.length === 0) {\n <div class=\"flex--nogrow bubble bubble-plane-end\">\n <fcom-icon\n class=\"icon-medium nordic-blue-900-text\"\n [name]=\"busOrTrainIconMap[flight.aircraft?.code] ?? SvgLibraryIcon.ARRIVAL\"\n data-testid=\"itinerary-timeline-flight-arrival-icon\"\n ></fcom-icon>\n </div>\n }\n </div>\n <div class=\"timeline__right pr-xsmall-l\">\n <p [class.mr-xxsmall-t]=\"firstLeg\" [class.mr-xxlarge-b]=\"isBusOrTrain && flight.technicalStops && firstLeg\">\n <span class=\"is-vishidden\">{{ 'departure' | finLocalization }}</span>\n @if (flightChanges?.notification) {\n <fcom-notification\n [theme]=\"NotificationTheme.ALERT\"\n [layout]=\"NotificationLayout.BLOCK\"\n [iconName]=\"SvgLibraryIcon.ALERT_BLOCK\"\n class=\"block timeline__right medium-type heather-700-text pr-xsmall-b\"\n >\n {{ 'MMB.notifications.' + flightChanges.notification + '.text' | finLocalization }}\n </fcom-notification>\n }\n <fin-itinerary-timeline-leg-endpoint\n [endpoint]=\"flight.departure\"\n [oldEndpointDateTime]=\"flightChanges?.departureDateTime\"\n [oldEndpointLocationCode]=\"flightChanges?.departureLocationCode\"\n [locations]=\"locations\"\n ></fin-itinerary-timeline-leg-endpoint>\n </p>\n\n @if (!isBusOrTrain || (isBusOrTrain && !firstLeg) || (isBusOrTrain && !flight.technicalStops && !lastLeg)) {\n @if (flight.departure.terminal && !isBusOrTrain) {\n <p class=\"light-type\">\n <span>{{ 'bookingSearch.flight.terminal' | finLocalization }}</span>\n @if (flightChanges?.departureTerminal) {\n <span class=\"grey-700-text strike-through mr-xxsmall-r\">\n {{ flightChanges?.departureTerminal }}\n </span>\n }\n <span>\n {{ flight.departure.terminal }}\n </span>\n </p>\n }\n <p data-testid=\"itinenary-timeline-flight-details\" class=\"nordic-blue-900-text mr-xsmall-y flex flex--column\">\n @if (flightChanges?.flightNumber) {\n <span class=\"grey-700-text strike-through mr-xxsmall-r\"> {{ flightChanges.flightNumber }}</span>\n }\n <span>{{ flight.flightNumber }}</span>\n <span>{{ 'bookingSummary.operatedBy' | finLocalization }} {{ flight.operatingAirline?.name }}</span>\n @if (flightChanges?.operatingAirline) {\n <span class=\"grey-700-text strike-through mr-xxsmall-r\"> {{ flightChanges.operatingAirline }}</span>\n }\n @if (flightChanges?.aircraft) {\n <span class=\"grey-700-text strike-through mr-xxsmall-r\">\n {{ flightChanges.aircraft }}\n </span>\n }\n <span data-testid=\"flight-aircraft-name\">{{ flight?.aircraft?.name }}</span>\n @if (flightChanges?.duration) {\n <span class=\"grey-700-text strike-through mr-xxsmall-r\">\n {{ 'bookingSearch.duration' | finLocalization: (flightChanges.duration | finTemporaryDurationPipe) }}\n </span>\n }\n <span>{{ 'bookingSearch.duration' | finLocalization: (flight.duration | finTemporaryDurationPipe) }}</span>\n @if (flight?.cabinClass) {\n <span>\n {{ 'travelClass.' + flight.cabinClass?.toLowerCase() | finLocalization }}\n {{ flight.bookingClass }}\n </span>\n }\n @if (isBookingFlow && isFlightUsingSAF && enableShowingSAF) {\n <fcom-tag class=\"ms-xxsmall-t\" data-testid=\"itinenary-timeline-saf-chip\" [theme]=\"TagTheme.SUSTAINABILITY\">{{\n 'safNotification.chipText' | finLocalization\n }}</fcom-tag>\n }\n </p>\n }\n\n @if (!flight.technicalStops || flight.technicalStops.length === 0) {\n <p class=\"mr-xsmall-t\">\n <span class=\"is-vishidden\">{{ 'arrival' | finLocalization }}</span>\n <fin-itinerary-timeline-leg-endpoint\n [endpoint]=\"flight.arrival\"\n [oldEndpointDateTime]=\"flightChanges?.arrivalDateTime\"\n [oldEndpointLocationCode]=\"flightChanges?.arrivalLocationCode\"\n [locations]=\"locations\"\n ></fin-itinerary-timeline-leg-endpoint>\n </p>\n @if (flight.arrival.terminal && !isBusOrTrain) {\n <p class=\"light-type\">\n {{ 'bookingSearch.flight.terminal' | finLocalization }}\n @if (flightChanges?.arrivalTerminal) {\n <span class=\"grey-700-text strike-through mr-xxsmall-r\">\n {{ flightChanges.arrivalTerminal }}\n </span>\n }\n {{ flight.arrival.terminal }}\n </p>\n }\n }\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { LocationInfoMap } from '@fcom/dapi';\nimport { FinnairItineraryItemFlight } from '@fcom/dapi/api/models';\nimport { TagTheme, NotificationLayout, NotificationTheme } from '@fcom/ui-components';\nimport { ConfigService } from '@fcom/core';\n\nimport { isBusOrTrain, isSegmentUsingSAF } from '../../../utils/common-booking.utils';\nimport { BUS_AIRCRAFT_CODE, FlightChanges, TRAIN_AIRCRAFT_CODE } from '../../../interfaces';\n\n@Component({\n selector: 'fin-itinerary-timeline-flight',\n styleUrls: ['../itinerary.scss', '../arrow-block.scss'],\n templateUrl: './itinerary-timeline-flight.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryTimelineFlightComponent implements OnInit {\n readonly BUS_AIRCRAFT_CODE = BUS_AIRCRAFT_CODE;\n readonly TRAIN_AIRCRAFT_CODE = TRAIN_AIRCRAFT_CODE;\n readonly NotificationTheme = NotificationTheme;\n readonly NotificationLayout = NotificationLayout;\n readonly TagTheme = TagTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n flight: FinnairItineraryItemFlight;\n\n @Input()\n firstLeg = false;\n\n @Input()\n lastLeg = false;\n\n @Input()\n locations: LocationInfoMap;\n\n @Input()\n flightChanges: FlightChanges;\n\n // Parent component passes down info if the sustainability feature should be shown in the flow in question\n // We want to show the sustainability feature in booking flow, but not in cancel or reacc flows\n @Input()\n isBookingFlow: boolean;\n\n // If the flight shown in this component is using SAF\n isFlightUsingSAF: boolean;\n enableShowingSAF: boolean;\n\n isBusOrTrain: boolean;\n busOrTrainIconMap = {\n [BUS_AIRCRAFT_CODE]: SvgLibraryIcon.BUS,\n [TRAIN_AIRCRAFT_CODE]: SvgLibraryIcon.TRAIN,\n };\n\n constructor(private configService: ConfigService) {}\n\n ngOnInit(): void {\n this.isFlightUsingSAF = isSegmentUsingSAF(this.flight);\n this.enableShowingSAF = this.configService.cfg.enableShowingSAF;\n this.isBusOrTrain = isBusOrTrain(this.flight);\n }\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fin-greeting-card',\n templateUrl: './greeting-card.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GreetingCardComponent {\n @Input() firstName: string;\n}\n","<div class=\"flex flex--column border rounded-large white-bg ms-medium-b overflow-hidden\">\n <div class=\"ps-medium\">\n <h3 data-testid=\"greeting-title\" data-hj-suppress>\n {{ 'loginPromotion.greeting.title.inPaxDetails' | finLocalization: { name: firstName } }}\n </h3>\n <p data-testid=\"greeting-description\" class=\"pr-xxsmall-t\">\n {{ 'loginPromotion.greeting.text.inPaxDetails' | finLocalization }}\n </p>\n </div>\n</div>\n","<div class=\"flex info-contaner\">\n <div class=\"flex flex--row font-body-1\">\n <fcom-icon class=\"flex flex--nogrow\" [name]=\"SvgLibraryIcon.SINGLE_PAX\"></fcom-icon>\n <div class=\"flex flex--column ps-xsmall-l\">\n <div class=\"flex flex--wrap flex--middle\">\n <h2 class=\"header-title nordic-blue-900-text font-heading-5 ps-small-r\">\n {{ extendedPassenger.firstName }} {{ extendedPassenger.lastName }}\n </h2>\n <span [attr.data-testid]=\"'pax-type-' + paxIndex\" class=\"font-body-1 medium-type\"\n >{{ 'passenger.' + extendedPassenger.paxTypeKey | finLocalization | titlecase }}\n {{ 'passenger.age.' + extendedPassenger.paxTypeKey | finLocalization | titlecase }}\n </span>\n </div>\n <div class=\"flex flex--center ps-xsmall-t\">\n <div class=\"flex-1 flex--self-start\">\n <span [attr.data-testid]=\"'pax-birthdate-' + paxIndex\" *ngIf=\"extendedPassenger.dateOfBirth\">\n {{ extendedPassenger.dateOfBirth | finDateFormat: 'DATE' }}\n </span>\n <span *ngIf=\"extendedPassenger.dateOfBirth && extendedPassenger.email\"> / </span>\n <span [attr.data-testid]=\"'pax-email-' + paxIndex\" *ngIf=\"extendedPassenger.email\">\n {{ extendedPassenger.email | lowercase }}\n </span>\n <span [attr.data-testid]=\"'pax-phonenumber-' + paxIndex\" *ngIf=\"extendedPassenger.phoneNumbers?.length > 0\">\n <ng-container *ngFor=\"let phone of extendedPassenger.phoneNumbers; let first = first\"\n ><span *ngIf=\"!first\"> / </span\n ><span> / (+{{ phone?.countryPrefix }}) {{ phone?.number }} </span></ng-container\n >\n </span>\n <span [attr.data-testid]=\"'pax-ffcard-' + paxIndex\" *ngIf=\"extendedPassenger.frequentFlyerCards?.length > 0\">\n <ng-container *ngFor=\"let card of extendedPassenger.cards; let first = first\"\n ><span *ngIf=\"!first\"> / </span\n ><span> / {{ card.airlineName }}, {{ card.cardNumber }}</span></ng-container\n >\n </span>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"flex--nogrow flex--self-center modify-button\" *ngIf=\"showEdit\">\n <fcom-button\n [attr.data-testid]=\"'edit-button-' + paxIndex\"\n (clickBtn)=\"onOpenEditModal()\"\n [text]=\"'purchase.actions.edit' | finLocalization\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [loading]=\"(isEditButtonDisabled$ | async) && (isEditButtonLoading$ | async)\"\n [disabled]=\"isEditButtonDisabled$ | async\"\n [icon]=\"{ name: SvgLibraryIcon.EDIT, position: IconPosition.RIGHT }\"\n ></fcom-button>\n </div>\n</div>\n\n<ng-container *ngIf=\"passengerFormGroup\">\n <fcom-modal\n [title]=\"'purchase.actions.modifyPax' | finLocalization\"\n [open]=\"isEditingPassenger$ | async\"\n [fitToContent]=\"true\"\n [overlayClickable]=\"(isEditButtonDisabled$ | async) === false\"\n [buttons]=\"ModalButtons.CONTINUE_CANCEL\"\n (close)=\"onCloseEditModal()\"\n (confirm)=\"onConfirmEditModal()\"\n >\n <div class=\"pr-large-x pr-medium-y\" [formGroup]=\"passengerFormGroup.group\">\n <div class=\"flex\">\n <fcom-icon [name]=\"SvgLibraryIcon.SINGLE_PAX\"></fcom-icon>\n <h2 class=\"header-title nordic-blue-900-text font-heading-5 ps-small-r\">\n {{ extendedPassenger.firstName }} {{ extendedPassenger.lastName }}\n </h2>\n <span class=\"font-body-1 medium-type\"\n >{{ 'passenger.' + extendedPassenger.paxTypeKey | finLocalization | titlecase }}\n {{ 'passenger.age.' + extendedPassenger.paxTypeKey | finLocalization | titlecase }}\n </span>\n </div>\n <fin-pax-details-form-group\n [groupIndex]=\"paxIndex\"\n [passengerFormGroup]=\"passengerFormGroup.group\"\n [profileType$]=\"profileType$\"\n [isMainPassenger]=\"isMainPax\"\n [controlData]=\"controlData$ | async\"\n [frequentFlyerAirlines$]=\"frequentFlyerAirlines$\"\n [allFrequentFlyerCards]=\"allFrequentFlyerCards$ | async\"\n [hideDisabledFields]=\"true\"\n [availableDates]=\"availableDays\"\n [trackingContext]=\"TRACKING_CONTEXT\"\n >\n </fin-pax-details-form-group>\n\n <div\n *ngIf=\"passengerFormGroup.group.get(FIELDS.type).value === C.FinnairPassengerCode.INF\"\n class=\"traveling-with-area border-none pr-xsmall-b\"\n >\n <fin-select-input\n class=\"block ms-small-b\"\n [controlName]=\"FIELDS.travelling\"\n [translationPrefix]=\"'paxDetails.fields.travelling'\"\n [parentForm]=\"passengerFormGroup.group\"\n [options]=\"selectableLeadPassengers$ | async\"\n [attr.data-testid]=\"'infant'\"\n [displayMargin]=\"false\"\n >\n </fin-select-input>\n <fcom-notification\n [theme]=\"NotificationTheme.WARNING\"\n [linkText]=\"'paxDetails.fields.travelling.backToPaxDetailsLink' | finLocalization\"\n (linkClick)=\"backToPaxDetails.emit()\"\n >\n {{ 'paxDetails.fields.travelling.lockedChangeInfo' | finLocalization }}\n </fcom-notification>\n </div>\n </div>\n </fcom-modal>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, Input, OnDestroy, EventEmitter, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, Observable, Subscription, map } from 'rxjs';\n\nimport { AppConstants } from '@fcom/booking/app-constants';\nimport { Airline, GaContext, SelectOption } from '@fcom/common/interfaces';\nimport { ProfileType } from '@fcom/core-api/login';\nimport {\n ControlData,\n FinnairFrequentFlyerCardItem,\n FinnairPassengerCode,\n FinnairPassengerItem,\n} from '@fcom/dapi/api/models';\nimport { ButtonTheme, IconPosition, ModalButtons, NotificationTheme } from '@fcom/ui-components';\nimport { PaxDetailsFormData } from '@fcom/dapi/interfaces';\nimport { FREQUENT_FLIER_AIRLINES, unsubscribe } from '@fcom/core/utils';\n\nimport { PassengerDetails, PaxFormFields } from '../../services';\n\nconst airlineToOption = ({ name, code }: Airline): SelectOption =>\n name && {\n name,\n value: code,\n };\n\n@Component({\n selector: 'fin-passenger-info-renewed',\n templateUrl: './passenger-info-renewed.component.html',\n styleUrl: './passenger-info-renewed.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PassengerInfoRenewedComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly C = AppConstants;\n readonly FIELDS = PaxFormFields;\n readonly FinnairPassengerCode = FinnairPassengerCode;\n readonly IconPosition = IconPosition;\n readonly ModalButtons = ModalButtons;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TRACKING_CONTEXT = GaContext.BOOKING_FLOW;\n\n private subscription: Subscription = new Subscription();\n\n @Input()\n showEdit = false;\n\n @Input()\n isEditButtonDisabled$: Observable<boolean>;\n\n @Input()\n isEditButtonLoading$: Observable<boolean>;\n\n @Input()\n isMainPax: boolean;\n\n @Input()\n paxIndex: number;\n\n @Input()\n allFrequentFlyerCards$: Observable<FinnairFrequentFlyerCardItem[]>;\n\n @Input()\n controlData$: Observable<ControlData>;\n\n @Input()\n passengerFormGroup: PassengerDetails;\n\n @Input()\n extendedPassenger: FinnairPassengerItem & {\n paxTypeKey: string;\n cards: (FinnairFrequentFlyerCardItem & { airlineName: string })[];\n };\n\n @Input()\n profileType$: Observable<ProfileType>;\n\n @Input()\n selectableLeadPassengers$: Observable<SelectOption[]>;\n\n @Input()\n availableDays: { days$: Observable<number[]>; months: number[]; years: number[] };\n\n @Output()\n handleSave: EventEmitter<PaxDetailsFormData> = new EventEmitter<PaxDetailsFormData>();\n\n @Output()\n backToPaxDetails: EventEmitter<void> = new EventEmitter<void>();\n\n frequentFlyerAirlines$: Observable<SelectOption[]>;\n\n isEditingPassenger$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n initialFormData: BehaviorSubject<PaxDetailsFormData> = new BehaviorSubject<PaxDetailsFormData>(null);\n\n isFormSaved: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n ngOnInit(): void {\n this.frequentFlyerAirlines$ = this.setupAirlinePrefixes(this.paxIndex);\n }\n\n onOpenEditModal(): void {\n this.initialFormData = this.passengerFormGroup.group.getRawValue();\n this.isEditingPassenger$.next(true);\n }\n\n onCloseEditModal(): void {\n this.isEditingPassenger$.next(false);\n\n if (!this.isFormSaved.getValue()) {\n this.passengerFormGroup.group.reset(this.initialFormData);\n }\n\n this.isFormSaved.next(false);\n }\n\n onConfirmEditModal(): void {\n this.isEditingPassenger$.next(false);\n\n if (!this.passengerFormGroup.group.dirty) {\n return;\n } else if (!this.passengerFormGroup.group.disabled && this.passengerFormGroup.group.valid) {\n this.handleSave.emit(this.passengerFormGroup.group.getRawValue());\n }\n\n this.isFormSaved.next(true);\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n private setupAirlinePrefixes(passengerIndex) {\n return this.profileType$.pipe(\n map((pType: ProfileType) =>\n FREQUENT_FLIER_AIRLINES.filter((airline) => {\n return !(airline.name === 'Finnair' && pType === ProfileType.FINNAIR_ACCOUNT && passengerIndex === 0);\n }).map(airlineToOption)\n )\n );\n }\n}\n","<ng-template\n #priceLine\n let-label=\"label\"\n let-value=\"value\"\n let-originalValue=\"originalValue\"\n let-labelContent=\"labelContent\"\n let-bold=\"bold\"\n>\n <tr>\n <th\n scope=\"row\"\n class=\"align-left regular-type\"\n [ngClass]=\"{ 'light-type': !bold, 'medium-type ms-xsmall-t': bold }\"\n >\n <ng-container *ngIf=\"label; else labelContent\">{{ label }}</ng-container>\n </th>\n <td class=\"align-right\" [ngClass]=\"{ 'medium-type ms-xsmall-t': bold }\">\n <span class=\"nordic-blue-900-text strike-through pr-xxsmall-r\" *ngIf=\"originalValue\">{{ originalValue }}</span\n >{{ value }}\n </td>\n </tr>\n</ng-template>\n\n<fin-expand\n *ngIf=\"multiplePassengerRefundBreakdown$ | async as multipleBreakdown; else singlePassengerRefundPriceBreakdown\"\n class=\"flex--basis-full block pr-small-b\"\n data-testid=\"multiple-passenger-refund-breakdown\"\n [initiallyOpen]=\"expandOpen\"\n>\n <div class=\"font-body-1 content\">\n <table class=\"fill tax-table\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.review.taxBreakDown.header' | finLocalization\n }}\n </caption>\n <th></th>\n <tbody>\n <ng-container\n *ngIf=\"(passengers$ | async).length > 1\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: ('purchase.review.passengerCount' | finLocalization: { count: (passengers$ | async)?.length }),\n bold: true,\n }\"\n >\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.baseFare' | finLocalization,\n originalValue: multipleBreakdown.prices?.originalBaseFare\n ? (multipleBreakdown.prices?.originalBaseFare | finPrice)\n : undefined,\n value: (multipleBreakdown.prices?.baseFare | finPrice),\n bold: false,\n }\"\n >\n </ng-container>\n <ng-template #labelContent>\n <button\n (click)=\"openTaxModal($event, multipleBreakdown.prices.taxes, 'booking', multipleBreakdown.prices.totalTax)\"\n class=\"underline nordic-blue-900-text\"\n >\n {{ 'purchase.review.taxTotal' | finLocalization }}\n </button>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n value:\n multipleBreakdown.prices?.totalTax || {\n amount: '0',\n currencyCode: multipleBreakdown.prices?.baseFare.currencyCode,\n } | finPrice,\n labelContent: multipleBreakdown.prices?.totalTax ? labelContent : null,\n label: multipleBreakdown.prices?.totalTax ? null : ('purchase.review.taxTotal' | finLocalization),\n }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let fee of multipleBreakdown.prices?.fees\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.' + fee.code | finLocalization,\n value: fee | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n </tbody>\n <tfoot></tfoot>\n </table>\n </div>\n</fin-expand>\n\n<ng-template #singlePassengerRefundPriceBreakdown>\n <fin-expand\n class=\"flex--basis-full block pr-small-b\"\n *ngFor=\"let breakdown of breakdowns$ | finObsToArray; let last = last\"\n [class.border-bottom]=\"!last\"\n [class.rounded-large]=\"last\"\n [key]=\"'price-breakdown-expand-' + (breakdown | async)?.id\"\n [id]=\"'price-breakdown-expand-' + (breakdown | async)?.id\"\n [initiallyOpen]=\"expandOpen\"\n #expand\n >\n <div class=\"font-body-1 content\" *ngIf=\"breakdown | async as pax\">\n <table class=\"fill tax-table\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.review.taxBreakDown.header' | finLocalization\n }}\n </caption>\n <th></th>\n <tbody>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.baseFare' | finLocalization,\n originalValue: pax.prices?.originalBaseFare ? (pax.prices?.originalBaseFare | finPrice) : undefined,\n value: pax.prices?.baseFare | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n <ng-template #labelContent>\n <button\n (click)=\"\n openTaxModal(\n $event,\n pax.prices.taxes,\n asPaxTypeKey(pax.passengerTypeCode).toLowerCase(),\n pax.prices.totalTax\n )\n \"\n class=\"underline nordic-blue-900-text\"\n >\n {{ 'purchase.review.taxTotal' | finLocalization }}\n </button>\n </ng-template>\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n value:\n pax.prices?.totalTax || { amount: '0', currencyCode: pax.prices?.baseFare.currencyCode } | finPrice,\n labelContent: pax.prices?.totalTax ? labelContent : null,\n label: pax.prices?.totalTax ? null : ('purchase.review.taxTotal' | finLocalization),\n }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let fee of pax.prices?.fees\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label: 'purchase.review.' + fee.code | finLocalization,\n value: fee | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let service of pax.services\">\n <ng-container\n *ngIf=\"service.count\"\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n service.key\n | finLocalization\n : {\n seatCount: service.count,\n mealCount: service.count,\n baggageCount: service.count,\n loungeCount: service.count,\n travelComfortCount: service.count,\n wifiCount: service.count,\n coverCount: service.count,\n petCount: service.count,\n sportCount: service.count,\n specialCount: service.count,\n firearmCount: service.count,\n medicCount: service.count,\n specialNeedCount: service.count,\n childCount: service.count,\n amount: service.count,\n },\n value: service.total | finPrice,\n originalValue: service.originalTotal | finPrice,\n bold: false,\n }\"\n >\n </ng-container>\n </ng-container>\n </tbody>\n <tfoot>\n <ng-container *ngIf=\"showSubTotals$ | async\">\n <ng-container\n [ngTemplateOutlet]=\"priceLine\"\n [ngTemplateOutletContext]=\"{\n label:\n ('price.total' | finLocalization) +\n ' (' +\n ('passenger.' + asPaxTypeKey(pax.passengerTypeCode).toLowerCase() | finLocalization) +\n ')',\n value: pax.total | finPrice,\n bold: true,\n }\"\n >\n </ng-container>\n </ng-container>\n </tfoot>\n </table>\n </div>\n </fin-expand>\n</ng-template>\n\n<fcom-modal\n [(open)]=\"taxModalOpen\"\n [title]=\"'purchase.review.taxTotal' | finLocalization\"\n [buttons]=\"ModalButtons.DONE\"\n (close)=\"closeTaxModal()\"\n>\n <div class=\"pr-large\">\n <table class=\"fill dictionary-table tax-table font-body-1\" *ngIf=\"taxModalData\">\n <caption class=\"is-vishidden\">\n {{\n 'purchase.review.taxBreakDown.header' | finLocalization\n }}\n </caption>\n <thead>\n <tr>\n <th class=\"bold-type ms-medium-y\" scope=\"col\" colspan=\"2\">\n {{\n (taxModalData.ptc === 'booking'\n ? 'purchase.priceBreakdown.perBooking'\n : 'purchase.review.taxBreakDown.per.' + asPaxTypeKey(taxModalData.ptc).toLowerCase()\n ) | finLocalization\n }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let tax of taxModalData.taxes\" class=\"flex flex--space-between\">\n <th scope=\"row\">\n {{ 'TAX_CODES.' + tax.code.slice(0, 2) | finLocalization | finEmpty: tax.code.slice(0, 2) }}\n </th>\n <td>{{ tax | finPrice }}</td>\n </tr>\n </tbody>\n <tfoot>\n <tr class=\"flex flex--space-between\">\n <th scope=\"row\">{{ 'price.total' | finLocalization }}</th>\n <td>{{ taxModalData.total | finPrice }}</td>\n </tr>\n </tfoot>\n </table>\n </div>\n</fcom-modal>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { combineLatest, Observable } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { ModalButtons } from '@fcom/ui-components';\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { Amount, PriceService } from '@fcom/dapi';\nimport {\n FinnairCharge,\n FinnairPassengerCode,\n FinnairPassengerItem,\n FinnairPrice,\n FinnairTotalPricesDetails,\n FinnairAmount,\n} from '@fcom/dapi/api/models';\nimport { safeMap as safeMapObs } from '@fcom/rx';\nimport { isPresent } from '@fcom/core/utils';\nimport { hasUnitPrices } from '@fcom/common/utils';\n\nimport { getPassengerServices } from '../../../utils/order.utils';\n\ninterface BreakdownModel extends FinnairPassengerItem {\n prices: FinnairPrice;\n services: PriceService[];\n total: FinnairAmount;\n}\ninterface MultiplePassengerRefundBreakdownModel {\n prices: FinnairPrice;\n total: FinnairAmount;\n}\n\ninterface TaxModalModel {\n taxes: FinnairCharge[];\n ptc: string;\n total: Amount;\n}\n\nconst hasPassengers = (passengers: FinnairPassengerItem[]): boolean => isPresent(passengers) && passengers.length > 0;\n\n@Component({\n selector: 'fin-refund-price-breakdown',\n templateUrl: './refund-price-breakdown.component.html',\n})\nexport class RefundPriceBreakdownComponent implements OnInit {\n public readonly ModalButtons = ModalButtons;\n public readonly asPaxTypeKey = asPaxTypeKey;\n public readonly FinnairPassengerCode = FinnairPassengerCode;\n\n @Input()\n prices$: Observable<FinnairTotalPricesDetails>;\n @Input()\n passengers$: Observable<FinnairPassengerItem[]>;\n @Input()\n expandOpen = false;\n\n breakdowns$: Observable<BreakdownModel[]>;\n totalPrice$: Observable<Amount>;\n showSubTotals$: Observable<boolean>;\n taxModalOpen = false;\n taxModalData: TaxModalModel;\n multiplePassengerRefundBreakdown$: Observable<MultiplePassengerRefundBreakdownModel>;\n\n ngOnInit(): void {\n this.totalPrice$ = this.prices$.pipe(safeMapObs((prices) => ({ ...prices.total?.total?.totalAmount })));\n this.showSubTotals$ = this.passengers$.pipe(\n safeMapObs((passengers: FinnairPassengerItem[]) => passengers.length > 1)\n );\n\n this.breakdowns$ = combineLatest([this.passengers$, this.prices$]).pipe(\n filter(([passengers, prices]) => hasPassengers(passengers) && hasUnitPrices(prices, true)),\n map(([passengers, prices]) =>\n passengers\n .filter((passenger) => parseFloat(prices.total.totalPerPax?.[passenger.id]?.totalAmount.amount) > 0)\n .map((passenger: FinnairPassengerItem) => ({\n ...passenger,\n prices: prices.flight?.totalPerPax?.[passenger.id] || prices.services?.totalPerPax?.[passenger.id],\n services: getPassengerServices(prices.services?.totalPerCategory, passenger),\n total: prices.total.totalPerPax?.[passenger.id]?.totalAmount,\n }))\n )\n );\n\n this.multiplePassengerRefundBreakdown$ = combineLatest([this.passengers$, this.prices$]).pipe(\n filter(\n ([passengers, prices]) => hasPassengers(passengers) && hasUnitPrices(prices, true) && passengers.length > 1\n ),\n map(([_, prices]) => ({\n prices: prices.total.total,\n total: prices.total.total.totalAmount,\n }))\n );\n }\n\n openTaxModal(event: Event, taxes: FinnairCharge[], ptc: string, total: Amount): void {\n event.stopPropagation();\n\n this.taxModalOpen = true;\n this.taxModalData = {\n taxes,\n ptc,\n total,\n };\n }\n\n closeTaxModal(): void {\n this.taxModalData = null;\n }\n}\n","<div [class.pr-small]=\"!paxReviewCard\">\n <fcom-ufo\n [airlines]=\"uniqueAirlineNames\"\n [departure]=\"(ufoAirports$ | async)?.departure\"\n [arrival]=\"(ufoAirports$ | async)?.arrival\"\n [duration]=\"flightOrBound.duration | finDuration | async\"\n [stops]=\"stops\"\n [showViewDetails]=\"!hideViewDetails\"\n [tails]=\"tails | finTailNames\"\n [isByBusOnly]=\"isByBusOnly\"\n (viewDetails)=\"viewDetails.emit()\"\n [focusOnViewDetails$]=\"viewDetailsClosed === flightOrBound.id | finToObservable\"\n [flightNumbers]=\"flightNumbers\"\n ></fcom-ufo>\n\n <div [ngClass]=\"{ 'card-wrapper flex flex--align-start flex--space-between': paxReviewCard }\">\n <div *ngIf=\"paxReviewCard\" class=\"ps-xsmall-t flex--column chip-and-price-container\">\n <div class=\"chip-container flex flex--wrap flex--align-start\">\n <fcom-tag data-testid=\"flight-review-card-fare-family-label\" *ngIf=\"fareFamily || cabinClass\">\n <span class=\"truncate overflow-hidden\">{{ fareFamily ?? (cabinClass | finLocalization) }}</span>\n </fcom-tag>\n <fcom-tag\n *ngIf=\"paxReviewCard && isFlightUsingSAF && enableShowingSAF\"\n data-testid=\"flight-review-card-saf-notification\"\n [theme]=\"TagTheme.SUSTAINABILITY\"\n >\n <span class=\"truncate overflow-hidden\">{{ 'safNotification.chipText' | finLocalization }}</span>\n </fcom-tag>\n </div>\n </div>\n\n <div class=\"button-container\">\n <fcom-button\n *ngIf=\"!hideModify\"\n class=\"pr-small-t flex--self-end\"\n (clickBtn)=\"modifyClicked.emit()\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL_MOBILE\"\n [text]=\"'actions.modify' | finLocalization\"\n [aria]=\"{ label: ('actions.modify' | finLocalization) + ' ' + (title | lowercase), role: 'button' }\"\n >\n </fcom-button>\n </div>\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\n\nimport { combineLatest, map, Observable, ReplaySubject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\nimport {\n FinnairBoundItem,\n FinnairDisruptedBoundItem,\n FinnairItineraryItemFlight,\n FinnairLocation,\n} from '@fcom/dapi/api/models';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { COMMON_BOOKING_TRAVEL_CLASSES, ConfigService } from '@fcom/core';\nimport { Airport } from '@fcom/common/interfaces/booking';\nimport { TagTheme } from '@fcom/ui-components/components/tag/interfaces';\nimport { ButtonTheme, ButtonSize, ButtonMode } from '@fcom/ui-components/components/buttons/button/enums';\n\nimport {\n isBound,\n isByBusOnly,\n isFlight,\n isUsingSAF,\n legEndpointToUfoAirport,\n getAircraftTailForFlight,\n} from '../../utils/common-booking.utils';\nimport { FinnairBoundItemWithLocation } from '../../interfaces';\n\n@Component({\n selector: 'fin-ufo-with-modify-button',\n styleUrls: ['./ufo-with-modify-button.component.scss'],\n templateUrl: './ufo-with-modify-button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UFOWithModifyButtonComponent implements OnInit, OnChanges {\n readonly TagTheme = TagTheme;\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n\n @Input()\n flightOrBound:\n | FinnairBoundItemWithLocation\n | FinnairBoundItem\n | FinnairDisruptedBoundItem\n | FinnairItineraryItemFlight;\n @Input()\n locations?: { [key: string]: FinnairLocation };\n @Input()\n title: string;\n @Input()\n viewDetailsClosed: string;\n @Input()\n hideModify = false;\n @Input()\n hideViewDetails = false;\n // Parent component passes down info if the component is used in booking flow or not\n // We want to show the sustainability feature in booking flow, but not in cancel or reacc flows\n @Input() paxReviewCard = false;\n\n @Output()\n viewDetails: EventEmitter<void> = new EventEmitter<void>();\n @Output()\n modifyClicked: EventEmitter<void> = new EventEmitter<void>();\n\n ufoAirports$: Observable<{ departure: Airport; arrival: Airport }>;\n tails: string[];\n isByBusOnly: boolean;\n isFlightUsingSAF: boolean;\n stops: number;\n fareFamily: string;\n cabinClass: string;\n uniqueAirlineNames: string[];\n flightNumbers: string;\n\n flightOrBound$: ReplaySubject<\n FinnairBoundItemWithLocation | FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight\n > = new ReplaySubject<\n FinnairBoundItemWithLocation | FinnairBoundItem | FinnairDisruptedBoundItem | FinnairItineraryItemFlight\n >(1);\n locations$: ReplaySubject<{ [key: string]: FinnairLocation }> = new ReplaySubject<{ [key: string]: FinnairLocation }>(\n 1\n );\n enableShowingSAF: boolean;\n\n constructor(\n private languageService: LanguageService,\n private configService: ConfigService\n ) {}\n\n ngOnInit(): void {\n this.enableShowingSAF = this.configService.cfg.enableShowingSAF;\n this.ufoAirports$ = combineLatest([\n this.languageService.translate('date'),\n this.flightOrBound$,\n this.locations$.pipe(startWith(undefined)),\n ]).pipe(\n map(([translations, flightOrBound, locations]) => ({\n departure: legEndpointToUfoAirport(flightOrBound?.departure, translations, locations),\n arrival: legEndpointToUfoAirport(flightOrBound?.arrival, translations, locations),\n }))\n );\n this.locations$.next(this.locations);\n this.updateFlightOrBound();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['locations']) {\n this.locations$.next(this.locations);\n }\n\n if (changes['flightOrBound']) {\n this.updateFlightOrBound();\n }\n }\n\n private updateFlightOrBound(): void {\n this.flightOrBound$.next(this.flightOrBound);\n\n if (isBound(this.flightOrBound)) {\n this.uniqueAirlineNames = this.flightOrBound.uniqueAirlineNames;\n this.stops = this.flightOrBound.stops;\n this.fareFamily = this.flightOrBound.fareFamily?.name;\n\n if (!this.fareFamily) {\n this.cabinClass = COMMON_BOOKING_TRAVEL_CLASSES[this.flightOrBound['cabinClass']]?.translationKey;\n }\n this.tails = this.flightOrBound.itinerary.filter(isFlight).map((flight) => getAircraftTailForFlight(flight));\n\n this.flightNumbers = this.flightOrBound?.itinerary\n .map((flight: FinnairItineraryItemFlight) => flight?.flightNumber)\n .filter(Boolean)\n .join(', ');\n } else {\n this.uniqueAirlineNames = [this.flightOrBound?.operatingAirline?.name];\n this.stops = 0;\n this.cabinClass = COMMON_BOOKING_TRAVEL_CLASSES[this.flightOrBound.cabinClass].translationKey;\n this.tails = [getAircraftTailForFlight(this.flightOrBound)];\n this.flightNumbers = this.flightOrBound?.flightNumber ?? '';\n }\n\n this.isByBusOnly = isByBusOnly(this.flightOrBound);\n\n this.isFlightUsingSAF = isUsingSAF(this.flightOrBound);\n }\n}\n","<div\n *ngIf=\"fareFamily$ | async as fareFamily\"\n data-testid=\"fare-family-card\"\n class=\"fare-family border rounded-large overflow-hidden white-bg\"\n [class.selected]=\"fareFamily.selected\"\n [class.disabled]=\"fareFamily.disabled\"\n [ngStyle]=\"{ outlineColor: fareFamily.selected ? fareFamily.benefits.brandColor : null }\"\n>\n @for (tag of fareFamily.benefits.tags; track tag.text) {\n <div class=\"absolute badge z1 ms-xsmall-t ms-xsmall-r\">\n <fcom-tag [theme]=\"tagTheme$ | async\" [roundingStyle]=\"castTagRoundingStyle(tag.roundingStyle)\">\n @if (tag.icon && (tag.iconPosition === 'left' || tag.iconPosition === undefined)) {\n <fcom-icon\n [name]=\"castIconName(tag.icon.name)\"\n [category]=\"castIconCategory(tag.icon.category)\"\n class=\"icon-small ms-xxsmall-r\"\n ></fcom-icon>\n }\n <span>{{ tag.text }}</span>\n @if (tag.icon && tag.iconPosition === 'right') {\n <fcom-icon\n [name]=\"castIconName(tag.icon.name)\"\n [category]=\"castIconCategory(tag.icon.category)\"\n class=\"icon-small ms-xxsmall-r\"\n ></fcom-icon>\n }\n </fcom-tag>\n </div>\n }\n <label\n class=\"flex flex--column nordic-blue-25-bg\"\n [style.--brand-color]=\"fareFamily.benefits.brandColor\"\n [attr.aria-label]=\"\n 'ticketSelection.aria.fareFamily.fareFamilyOption'\n | finLocalization\n : {\n fareFamily: fareFamily.benefits.brandName,\n price:\n {\n amount: fareFamily.totalPrice,\n currencyCode: currencyCode,\n } | finPrice,\n index: aria.index + 1,\n totalCount: aria.count,\n }\n \"\n [attr.data-testid]=\"'fare-family-label-' + fareFamily.fareFamilyCode\"\n >\n <input\n [attr.data-testid]=\"'fare-family-checkbox-' + fareFamily.fareFamilyCode\"\n (change)=\"checkboxChange($event)\"\n type=\"checkbox\"\n class=\"hidden-checkbox\"\n [checked]=\"fareFamily.selected\"\n [disabled]=\"fareFamily.disabled\"\n />\n\n <div class=\"ps-small-x ps-small-b\" aria-hidden=\"true\">\n <fcom-tag\n *ngIf=\"fareFamily.badgeType === FareFamilyBadgeType.POPULAR\"\n [theme]=\"fareFamily.selected ? TagTheme.DEFAULT : TagTheme.POPULAR\"\n class=\"absolute popular-badge ms-xsmall-t ms-xsmall-r\"\n [attr.data-testid]=\"'badge-tag'\"\n >\n {{ 'ticketSelection.fareFamily.ribbonText' | finLocalization }}\n </fcom-tag>\n <fcom-icon\n class=\"white-bg circle checkbox-icon\"\n [dataTestId]=\"'fare-family-icon-' + fareFamily.fareFamilyCode\"\n [name]=\"\n fareFamily.selected ? SvgLibraryIcon.CHECKMARK_BUTTON_SELECTED : SvgLibraryIcon.CHECKMARK_BUTTON_UNSELECTED\n \"\n ></fcom-icon>\n <div class=\"fare-family-name font-body-1 medium-type nordic-blue-900-text ms-xsmall-t\">\n {{ fareFamily.benefits.brandName }}\n </div>\n <div class=\"fare-family-price font-heading-4\" [class.with-original-price]=\"fareFamily.originalTotalPrice\">\n <span class=\"total-price-text\">\n {{\n {\n amount: isShowTotalPrice ? fareFamily.totalPrice : fareFamily.price,\n currencyCode: currencyCode,\n } | finPrice\n }}\n </span>\n <span\n *ngIf=\"fareFamily.originalTotalPrice || fareFamily.originalPrice\"\n class=\"strike-through regular-type font-body-2\"\n >\n {{\n {\n amount: isShowTotalPrice ? fareFamily.originalTotalPrice : fareFamily.originalPrice,\n currencyCode: currencyCode,\n } | finPrice\n }}\n </span>\n </div>\n </div>\n <div class=\"fare-family-brand-color-bar ps-xxsmall\" [style.background-color]=\"fareFamily.benefits.brandColor\"></div>\n </label>\n <div class=\"fare-family-benefits ps-xxsmall-x\">\n <ng-container *ngIf=\"isNotAward$ | async\">\n <fcom-tag class=\"ms-small-l ms-small-t\">\n <fcom-icon class=\"ms-xxsmall-r icon-small\" [name]=\"SvgLibraryIcon.AVIOS_CURRENCY\"></fcom-icon>\n <span *ngIf=\"fareFamily.totalAviosAccrual\">\n {{ 'avios.collectPointsTag' | finLocalization: { points: fareFamily.totalAviosAccrual?.toLocaleString() } }}\n </span>\n <span *ngIf=\"!fareFamily.totalAviosAccrual\">\n {{ 'avios.collectUndefinedPoints' | finLocalization }}\n </span>\n </fcom-tag>\n </ng-container>\n\n <div class=\"benefits-list flex-1 benefits ms-small-b\">\n <fin-benefit\n class=\"block ps-small-x\"\n *ngFor=\"let benefit of fareFamilyBenefit$ | async; let first = first\"\n [benefit]=\"benefit\"\n [enableBenefitChanges$]=\"true | finToObservable\"\n [ngClass]=\"{\n 'ps-xsmall-t ps-xxsmall-b': first,\n 'ps-xxsmall-y': !first,\n }\"\n ></fin-benefit>\n </div>\n </div>\n</div>\n","import {\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, fromEvent, map, Observable, Subscription, take, tap } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\nimport { TranslatedBenefitRow } from '@fcom/dapi/api/models';\nimport { TagRoundingStyle, TagTheme } from '@fcom/ui-components';\nimport { ConfigService, unsubscribe } from '@fcom/core/index';\nimport { MediaQueryService } from '@fcom/common/services';\n\nimport { shouldDisplayBenefit } from '../../../utils/benefit.utils';\nimport { ExtendedFareFamily, FareFamilyBadgeType } from '../../../interfaces';\nimport { TaggableComponent } from '../../../../ui-components/components/tag/taggable.component';\n\n@Component({\n selector: 'fin-fare-family-list-option',\n styleUrls: ['./fare-family-list-option.component.scss'],\n templateUrl: './fare-family-list-option.component.html',\n})\nexport class FlightSelectionFareFamilyListOptionComponent extends TaggableComponent implements OnInit, OnDestroy {\n destroyRef = inject(DestroyRef);\n\n readonly FareFamilyBadgeType = FareFamilyBadgeType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagRoundingStyle = TagRoundingStyle;\n readonly TagTheme = TagTheme;\n\n @Input({ required: true }) fareFamily$: Observable<ExtendedFareFamily>;\n @Input({ required: true }) currencyCode: string;\n @Input({ required: true }) aria: {\n index: number;\n count: number;\n };\n\n @Input() isShowTotalPrice = false;\n\n @Output() selectFareFamily = new EventEmitter<boolean>();\n\n selected$: Observable<boolean> = this.selectFareFamily.asObservable().pipe(startWith(false));\n\n subscriptions = new Subscription();\n fareFamilyBenefit$: Observable<TranslatedBenefitRow[]>;\n isNotAward$: Observable<boolean>;\n isHover$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n tagTheme$: Observable<TagTheme>;\n\n constructor(\n public configService: ConfigService,\n public mediaQueryService: MediaQueryService,\n private el: ElementRef\n ) {\n super();\n }\n\n ngOnInit(): void {\n fromEvent(this.el.nativeElement, 'mouseenter')\n .pipe(\n tap(() => this.isHover$.next(true)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n\n fromEvent(this.el.nativeElement, 'mouseleave')\n .pipe(\n tap(() => this.isHover$.next(false)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n\n this.isNotAward$ = this.fareFamily$.pipe(\n map((fareFamily) => {\n const isAward = Boolean(fareFamily.points);\n return !isAward;\n })\n );\n\n this.fareFamilyBenefit$ = this.fareFamily$.pipe(\n map((fareFamily) => {\n return fareFamily.benefits.translatedBenefitRows.filter((benefit) => shouldDisplayBenefit(benefit));\n })\n );\n\n this.tagTheme$ = combineLatest([this.isHover$, this.selected$, this.fareFamily$]).pipe(\n map(([isHover, selected, fareFamily]) => {\n if (selected) {\n return TagTheme.DEFAULT;\n }\n\n if (isHover) {\n return TagTheme.DEFAULT;\n }\n\n return fareFamily.benefits.tags[0].theme as TagTheme;\n }),\n startWith(TagTheme.ACTIVE)\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n checkboxChange(event: Event): void {\n this.selectFareFamily.emit((event.target as HTMLInputElement).checked);\n\n this.subscriptions.add(\n this.mediaQueryService\n .isBreakpoint$('tablet_down')\n .pipe(take(1))\n .subscribe((isTabletDown) => {\n if (!isTabletDown) {\n return;\n }\n\n (event.target as HTMLInputElement).closest('.fare-family').scrollIntoView({\n behavior: 'auto',\n block: 'nearest',\n inline: 'center',\n });\n })\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule, ModalModule, UiComponentsModule } from '@fcom/ui-components';\nimport { PipesModule } from '@fcom/common/pipes';\nimport { ComponentsModule } from '@fcom/common/components/components.module';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { MediaQueryService, PhonePrefixService } from '@fcom/common/services';\nimport { GtmModule } from '@fcom/common/gtm';\nimport { FinFormsModule } from '@fcom/common/forms';\nimport { CommonServiceFormsModule } from '@fcom/service-forms/components/common/common-service-forms.module';\nimport { LoginModule } from '@fcom/common/login';\nimport { BookingAirBoundsService } from '@fcom/booking/modules/ticket-selection/services';\nimport { CorporatePassengerSearchComponent } from '@fcom/booking/modules/pax-details/components/corporate-passenger-search/corporate-passenger-search.component';\nimport { CorporateService } from '@fcom/common/services/corporate/corporate.service';\nimport { CmsModule } from '@fcom/cms';\n\nimport { UtilsService } from './services/utils.service';\nimport { AdditionalEmailComponent } from './components/additional-email/additional-email.component';\nimport { LocationsPipeModule } from '../locations';\nimport { PurchaseCheckoutComponent } from './components/purchase-checkout/purchase-checkout.component';\nimport { QueueService } from './services/queue.service';\nimport { PaymentService } from './services/payment.service';\nimport { PassengerInfoComponent } from './components/passenger-info/passenger-info.component';\nimport { PassengerFormService } from './services/passenger-form.service';\nimport { PaxValidationService } from './services/pax-validation.service';\nimport { ItineraryComponent } from './components/itinerary/itinerary.component';\nimport { ItineraryTimelineComponent } from './components/itinerary/itinerary-timeline.component';\nimport { SectionReviewComponent } from './components/section-review/section-review.component';\nimport { SectionReviewItemComponent } from './components/section-review/section-review-item.component';\nimport { BookingPlainHeaderAreaComponent } from './components/booking-plain-header-area/booking-plain-header-area.component';\nimport { PriceBreakdownComponent } from './components/price-breakdown/price-breakdown.component';\nimport { EndpointTimeComponent } from './components/endpoint-time/endpoint-time.component';\nimport { SubHeaderComponent } from './components/sub-header/sub-header.component';\nimport { FlightReviewCardComponent } from './components/flight-review-card/flight-review-card.component';\nimport { AirBoundsFareFamilyOptionComponent } from './components/flight-selection/fare-family-option/fare-family-option.component';\nimport { BoundContainerComponent } from './components/flight-selection/bound-container/bound-container.component';\nimport { BenefitComponent } from './components/flight-selection/benefit/benefit.component';\nimport { FareFamilyDetailsComponent } from './components/flight-selection/fare-family-details/fare-family-details.component';\nimport { FareFamilyTableComponent } from './components/flight-selection/fare-family-table/fare-family-table.component';\nimport { PaxDetailsFormGroupComponent } from './components/pax-details/pax-details-form-group.component';\nimport { ExpanderCardComponent } from './components/expander-card/expander-card.component';\nimport { UpsellOptionComponent } from './components/flight-selection/upsell-option/upsell-option.component';\nimport { ItineraryTimelineBoundHeaderComponent } from './components/itinerary/bound-header/itinerary-timeline-bound-header.component';\nimport { ItineraryTimelineLayoverComponent } from './components/itinerary/layover/itinerary-timeline-layover.component';\nimport { ItineraryTimelineLegEndpointComponent } from './components/itinerary/leg-endpoint/leg-endpoint.component';\nimport { ItineraryTimelineLegTechnicalStopsComponent } from './components/itinerary/leg-technical-stops/leg-technical-stops.component';\nimport { ItineraryTimelineFlightComponent } from './components/itinerary/flight/itinerary-timeline-flight.component';\nimport { GreetingCardComponent } from './components/login-promotion/greeting-card/greeting-card.component';\nimport { LoginPromotionComponent } from './components/login-promotion/login-promotion.component';\nimport { PaxFlightReviewSummaryComponent } from './components/pax-details/pax-flight-review-summary/pax-flight-review-summary.component';\nimport { BoundSelectionItemComponent } from './components/bound-selection-item/bound-selection-item.component';\nimport { FareFamilyDetailsV2Component } from './components/flight-selection/fare-family-details-v2/fare-family-details-v2.component';\nimport { CountrySelectionComponent } from './components/country-selection/country-selection.component';\nimport { FlightCardComponent } from './components/flight-card/flight-card.component';\nimport { FlightSummaryComponent } from './components/flight-card/flight-summary/flight-summary.component';\nimport { FlightSelectionFiltersComponent } from './components/flight-selection-filters/flight-selection-filters.component';\nimport { FlightSelectionSortByComponent } from './components/flight-selection-sort-by/flight-selection-sort-by.component';\nimport { FlightFiltersEmptyStateComponent } from './components/flight-filters-empty-state/flight-filters-empty-state.component';\nimport { PriceBreakdownRenewedComponent } from './components/price-breakdown-renewed/price-breakdown-renewed.component';\nimport { PassengerInfoRenewedComponent } from './components/passenger-info-renewed/passenger-info-renewed.component';\nimport { PassengerInfoListComponent } from './components/passenger-info-list/passenger-info-list.component';\nimport { RefundDetailComponent } from './components/refund-detail/refund-detail.component';\nimport { BookingWidgetModule } from '../booking-widget/booking-widget.module';\nimport { RefundPriceBreakdownComponent } from './components/refund-detail/refund-price-breakdown/refund-price-breakdown.component';\nimport { UFOWithModifyButtonComponent } from './components/ufo-with-modify-button/ufo-with-modify-button.component';\nimport { FlightSelectionFlightSummaryComponent } from './components/flight-selection/flight-summary/flight-summary.component';\nimport { FlightSelectionFareFamilyListComponent } from './components/flight-selection/fare-family-list/fare-family-list.component';\nimport { FlightSelectionFareFamilyListOptionComponent } from './components/flight-selection/fare-family-list-option/fare-family-list-option.component';\nimport { CabinClassModalComponent } from './components/flight-selection/cabin-class-modal/cabin-class-modal.component';\nimport { InformBlockComponent } from './components/inform-block/inform-block.component';\nimport { ItineraryDetailComponent } from './components/itinerary-detail/itinerary-detail.component';\nimport { PassengerFfCardsComponent } from './components/passenger-ff-cards/passenger-ff-cards.component';\n\nconst COMPONENTS = [\n PassengerInfoComponent,\n ItineraryComponent,\n ItineraryTimelineComponent,\n ItineraryTimelineLegEndpointComponent,\n ItineraryTimelineLegTechnicalStopsComponent,\n ItineraryTimelineBoundHeaderComponent,\n ItineraryTimelineLayoverComponent,\n ItineraryTimelineFlightComponent,\n SectionReviewComponent,\n RefundDetailComponent,\n ItineraryDetailComponent,\n SectionReviewItemComponent,\n BookingPlainHeaderAreaComponent,\n PriceBreakdownComponent,\n RefundPriceBreakdownComponent,\n PurchaseCheckoutComponent,\n EndpointTimeComponent,\n SubHeaderComponent,\n FlightReviewCardComponent,\n AirBoundsFareFamilyOptionComponent,\n BoundContainerComponent,\n BenefitComponent,\n FareFamilyDetailsComponent,\n FareFamilyTableComponent,\n PaxDetailsFormGroupComponent,\n ExpanderCardComponent,\n UpsellOptionComponent,\n GreetingCardComponent,\n LoginPromotionComponent,\n FlightCardComponent,\n PaxFlightReviewSummaryComponent,\n FlightSummaryComponent,\n BoundSelectionItemComponent,\n FareFamilyDetailsV2Component,\n CountrySelectionComponent,\n FlightSelectionFiltersComponent,\n FlightSelectionSortByComponent,\n FlightFiltersEmptyStateComponent,\n AdditionalEmailComponent,\n PriceBreakdownRenewedComponent,\n PassengerInfoRenewedComponent,\n PassengerInfoListComponent,\n CorporatePassengerSearchComponent,\n UFOWithModifyButtonComponent,\n FlightSelectionFlightSummaryComponent,\n FlightSelectionFareFamilyListComponent,\n FlightSelectionFareFamilyListOptionComponent,\n CabinClassModalComponent,\n InformBlockComponent,\n PassengerFfCardsComponent,\n];\n\n@NgModule({\n providers: [\n PaymentService,\n QueueService,\n MediaQueryService,\n UtilsService,\n BookingAirBoundsService,\n PassengerFormService,\n PaxValidationService,\n PhonePrefixService,\n CorporateService,\n ],\n imports: [\n LocationsPipeModule,\n FormsModule,\n ReactiveFormsModule,\n FinFormsModule,\n CommonModule,\n DirectiveModule,\n UiTranslateModule,\n UiComponentsModule,\n IconsModule,\n PipesModule,\n ModalModule,\n ComponentsModule,\n GtmModule,\n CommonServiceFormsModule,\n LoginModule,\n BookingWidgetModule,\n CmsModule,\n ],\n declarations: [...COMPONENTS],\n exports: [...COMPONENTS],\n})\nexport class CommonBookingComponentsModule {}\n","import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable, makeStateKey, StateKey } from '@angular/core';\n\nimport { Observable, of } from 'rxjs';\nimport { catchError, map, pluck, share } from 'rxjs/operators';\n\nimport { CmsContentType, CmsImageData, CmsPicture, CmsTaxonomyPicture } from '@fcom/core-api';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\n\nimport { TripType, GlobalBookingTravelClass } from '../../interfaces';\nimport { getWhitelistedCmsParams, stringHashCode, urlToPathname } from '../../utils';\nimport { CampaignTagToLabelKey } from '../../constants';\nimport { ConfigService } from '../config/config.service';\nimport { StateTransferService } from '../state-transfer/state-transfer.service';\n\nexport enum I18nKey {\n GLOBAL = 'global',\n BOOKING = 'booking',\n TAX_CODES = 'taxCodes',\n COUNTRY_REGIONS = 'countryRegions',\n MMB = 'mmb',\n REACCOMMODATION = 'reaccommodation',\n LOYALTY = 'loyalty',\n SERVICE_FORMS = 'serviceForms',\n REFUNDS = 'refunds',\n CORPORATE = 'corporate',\n TRAVEL_READY = 'travelReady',\n}\n\nexport enum I18nLazyLoadingPrefix {\n TAX_CODES = 'TAX_CODES',\n COUNTRY_REGIONS = 'COUNTRY_REGIONS',\n MMB = 'MMB',\n REACCOMMODATION = 'REACCOMMODATION',\n LOYALTY = 'LOYALTY',\n SERVICE_FORMS = 'SERVICE_FORMS',\n REFUNDS = 'REFUNDS',\n CORPORATE = 'CORPORATE',\n TRAVEL_READY = 'TRAVEL_READY',\n}\n\nexport type I18nData = {\n key: I18nKey;\n getUrl: (translationsApiUrl: string, lang: string) => string;\n lazyLoadingPrefix?: I18nLazyLoadingPrefix;\n};\n\nexport const i18nKeyToDataMap: Record<I18nKey, I18nData> = {\n global: {\n key: I18nKey.GLOBAL,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}`,\n },\n booking: {\n key: I18nKey.BOOKING,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/booking`,\n },\n taxCodes: {\n key: I18nKey.TAX_CODES,\n getUrl: (translationsApiUrl: string, lang: string) =>\n `${translationsApiUrl}/translations/${lang}/booking/tax-codes`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.TAX_CODES,\n },\n countryRegions: {\n key: I18nKey.COUNTRY_REGIONS,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/country-regions`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.COUNTRY_REGIONS,\n },\n mmb: {\n key: I18nKey.MMB,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/manage-booking`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.MMB,\n },\n reaccommodation: {\n key: I18nKey.REACCOMMODATION,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/reaccommodation`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.REACCOMMODATION,\n },\n loyalty: {\n key: I18nKey.LOYALTY,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/loyalty`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.LOYALTY,\n },\n serviceForms: {\n key: I18nKey.SERVICE_FORMS,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/service-forms`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.SERVICE_FORMS,\n },\n refunds: {\n key: I18nKey.REFUNDS,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/refunds`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.REFUNDS,\n },\n corporate: {\n key: I18nKey.CORPORATE,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/corporate`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.CORPORATE,\n },\n travelReady: {\n key: I18nKey.TRAVEL_READY,\n getUrl: (translationsApiUrl: string, lang: string) => `${translationsApiUrl}/translations/${lang}/travel-ready`,\n lazyLoadingPrefix: I18nLazyLoadingPrefix.TRAVEL_READY,\n },\n};\n\nexport interface CmsSearchParams {\n lang?: string;\n locale: string;\n documentType: string;\n propertySet: string;\n subjectTaxonomyExtRef: string;\n segment?: string;\n}\n\nexport interface CmsSearchHits<T> {\n hits: T[];\n numHits: number;\n}\n\nexport interface PromoCodeTermsSearchHit {\n teaserText: string;\n teaserTitle: string;\n}\n\nexport interface PromoCodeTerms {\n title: string;\n description: string;\n}\n\nexport interface CampaignSearchHit {\n localSettings: {\n selectedTripType: TripType;\n selectedTravelClass: GlobalBookingTravelClass;\n campaignEndText?: string;\n enableBlackTeaser?: boolean;\n restrictToDestinations: {\n destination: string[];\n destinationsByOrigin: {\n [origin: string]: string[];\n };\n };\n };\n subjectTaxonomyTags: CampaignTagToLabelKey[];\n}\n\nexport interface CmsCampaign {\n destinations?: string[];\n destinationsByOrigin?: { [origin: string]: string[] };\n campaignEndText: string;\n enableBlackTeaser: boolean;\n campaignLabel?: CampaignTagToLabelKey;\n campaignTravelClass?: GlobalBookingTravelClass;\n}\n\nexport const stateKey = (templateUrl: string): StateKey<any> => makeStateKey<any>(`cds-${stringHashCode(templateUrl)}`);\n\n@Injectable()\nexport class CmsDataService {\n constructor(\n protected http: HttpClient,\n protected config: ConfigService,\n protected stateTransferService: StateTransferService\n ) {}\n\n /**\n * Function to fetch JSON content from the CMS server\n *\n * @param url url to send request to\n * @param extraParams object of additional parameters to set on the CMS request.\n * e.g. { tier: 'Basic'}\n */\n getFragmentJson<T>(url: string, extraParams?: { [key: string]: string }): Observable<T> {\n const params = { ...getWhitelistedCmsParams(url), ...extraParams, view: 'fin-fragment-json' };\n const search = Object.keys(params).reduce((acc, cur) => {\n return acc.set(cur, params[cur]);\n }, new HttpParams());\n const fragmentJsonUrl = `${this.config.cmsUrl}${urlToPathname(url)}`;\n return this.stateTransferService.wrapToStateCache(stateKey(`${fragmentJsonUrl}?${search.toString()}`), () =>\n this.getJson(fragmentJsonUrl, search)\n );\n }\n\n // Should not be overridden in sub class\n getLocalization(\n lang: string,\n i18nData: I18nData,\n pluckProperty: string[] = ['localSettings']\n ): Observable<{ [key: string]: any }> {\n return this.getPage(i18nData, lang).pipe(\n pluck(...pluckProperty),\n map((data: any) =>\n i18nData.lazyLoadingPrefix ? { [i18nData.lazyLoadingPrefix]: { loaded: true, ...data } } : data\n ),\n share()\n );\n }\n\n getPicturesByTaxonomyTags<\n T extends CmsTaxonomyPicture[],\n R = T extends Array<infer K extends CmsTaxonomyPicture> ? { [key in K]: CmsPicture | undefined } : never,\n >(taxonomyTags: T, lang: string, locale: string): Observable<R> {\n const prepareResult = (response?: CmsSearchHits<CmsPicture>): R => {\n return taxonomyTags.reduce((previousValue, currentValue) => {\n previousValue[currentValue] = response?.hits?.find((item) => item.subjectTaxonomyTags.includes(currentValue));\n return previousValue;\n }, {} as R);\n };\n\n return this.search<CmsPicture>({\n lang,\n locale,\n documentType: CmsContentType.CMPicture,\n propertySet: 'finnaircom',\n subjectTaxonomyExtRef: taxonomyTags.map((item) => `Subject/${item}`).join(','),\n }).pipe(\n map((response) => {\n return prepareResult(response);\n }),\n catchError(() => of(prepareResult()))\n );\n }\n\n // Should not be overridden in sub class\n getBookingPicture(lang: string): Observable<CmsImageData> {\n return this.getPage(i18nKeyToDataMap.booking, lang).pipe(pluck('picture'), share());\n }\n\n getPromoCodeTerms(promoCode: string, lang: string, locale: string): Observable<PromoCodeTerms | undefined> {\n return this.search<PromoCodeTermsSearchHit>({\n lang,\n locale,\n documentType: 'CMArticle',\n propertySet: 'finnaircom',\n subjectTaxonomyExtRef: 'Subject/discountCodeTerms',\n segment: promoCode.toLowerCase(),\n }).pipe(\n map((response) =>\n response?.hits?.length > 0\n ? { title: response.hits[0].teaserTitle, description: response.hits[0].teaserText }\n : undefined\n )\n );\n }\n\n getOngoingCampaigns(lang: string, locale: string): Observable<CmsCampaign[]> {\n return this.stateTransferService.wrapToStateCache(stateKey(`campaigns-${lang}-${locale}`), () =>\n this.search<CampaignSearchHit>({\n lang,\n locale,\n documentType: 'CMPlaceholder',\n propertySet: 'finnaircom',\n subjectTaxonomyExtRef: 'Subject/fcomCampaign',\n }).pipe(\n map((response) => (response?.numHits > 0 ? response.hits : [])),\n map((hits) =>\n hits.map((hit) => ({\n destinations: hit?.localSettings?.restrictToDestinations?.destination,\n destinationsByOrigin: hit?.localSettings?.restrictToDestinations?.destinationsByOrigin,\n campaignEndText: hit?.localSettings?.campaignEndText || '',\n enableBlackTeaser: hit?.localSettings?.enableBlackTeaser || false,\n campaignLabel: CampaignTagToLabelKey[hit?.subjectTaxonomyTags?.[0]],\n campaignTravelClass: hit?.localSettings?.selectedTravelClass || GlobalBookingTravelClass.ECONOMY,\n }))\n ),\n finShare(),\n catchError(() => of([]))\n )\n );\n }\n\n protected search<T>(params: CmsSearchParams): Observable<CmsSearchHits<T>> {\n const urlParamLang = params.lang ? `/${params.lang}` : '';\n const urlParamSegment = params.segment ? `&segment=${params.segment}` : '';\n\n return this.getJson(\n `${this.config.cmsUrl}/service/json/v1/search${urlParamLang}?documenttype=${params.documentType}&locale=${params.locale}&propertySet=${params.propertySet}&subjectTaxonomyExtRef=${params.subjectTaxonomyExtRef}${urlParamSegment}`\n );\n }\n\n protected getPageJson<T>(i18nData: I18nData, lang: string): Observable<T> {\n return this.getJson<T>(i18nData.getUrl(this.config.cfg.translationsApiUrl, lang));\n }\n\n private getPage(i18nData: I18nData, lang: string): Observable<any> {\n const url = i18nData.getUrl(this.config.cfg.translationsApiUrl, lang);\n return this.stateTransferService.wrapToStateCache(stateKey(url), () => this.getPageJson(i18nData, lang));\n }\n\n protected getJson<T>(url: string, params: HttpParams = undefined): Observable<T> {\n return this.http\n .get<T>(url, {\n withCredentials: this.config.cfg.enableCorsCredentials,\n params: params,\n })\n .pipe(\n retryWithBackoff(1),\n map((data) => {\n // @TODO: Remove delete responsiveImageData when CMS has migrated away from these\n if (data?.['picture']) {\n delete data['picture']['responsiveImageData'];\n }\n if (Array.isArray(data?.['media'])) {\n data['media'].forEach((media) => {\n delete media['responsiveImageData'];\n });\n }\n return data;\n }),\n finShare()\n );\n }\n}\n","import { NgModule, Optional, Inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { ModalComponent } from './modal.component';\nimport { ClickOutsideDirectiveModule } from '../../directives/click-outside/click-outside-directive.module';\nimport { ButtonModule } from '../buttons/index';\nimport { TrapFocusModule } from '../../directives/trap-focus/trap-focus.module';\n\n@NgModule({\n declarations: [ModalComponent],\n imports: [CommonModule, UiTranslateModule, IconsModule, ClickOutsideDirectiveModule, TrapFocusModule, ButtonModule],\n exports: [ModalComponent],\n providers: [],\n})\nexport class ModalModule {\n constructor(@Optional() @Inject(ANIMATION_MODULE_TYPE) animations: string) {\n if (!animations) {\n throw new Error('You need to import the BrowserAnimationsModule or NoopAnimationsModule in your application!');\n }\n }\n}\n","<section class=\"sub-header fill white-text {{ backgroundColorClass }}\" [class.no-header]=\"noHeader\">\n <div class=\"grid-col-12 grid-max-width ps-xsmall-y flex flex--middle\" [class.sub-header-wrapper]=\"staticHeight\">\n <section\n data-testid=\"sub-header-content\"\n [ngClass]=\"{\n 'col-1-10 sm-col-1-8 md-col-1-9': hasBasket,\n 'col-1-12': !hasBasket,\n }\"\n >\n <ng-content></ng-content>\n </section>\n <aside\n class=\"col-11-12 sm-col-9-12 md-col-10-12\"\n data-testid=\"sub-header-basket\"\n *ngIf=\"hasBasket\"\n [class.border-left]=\"!showInfoIcon\"\n >\n <div class=\"sub-header-button flex grow flex--middle flex--end\">\n <fcom-icon-button\n *ngIf=\"isMobile$ | async\"\n class=\"flex--nogrow\"\n [attr.data-testid]=\"showInfoIcon ? 'info-icon-button' : 'shopping-cart-icon-button'\"\n [icon]=\"{\n name: showInfoIcon\n ? SvgLibraryIcon.INFO_OUTLINE\n : isBasketDisabled || !hasActiveBasketState\n ? SvgLibraryIcon.SHOPPING_CART\n : SvgLibraryIcon.SHOPPING_CART_ACTIVE,\n }\"\n [aria]=\"{\n label: 'bookingSummary.displayShoppingBasket' | finLocalization,\n }\"\n [size]=\"IconButtonSize.MEDIUM\"\n [theme]=\"IconButtonTheme.DARK_TERTIARY_GHOST\"\n [disabled]=\"isBasketDisabled\"\n (clickBtn)=\"openBasket.emit()\"\n ></fcom-icon-button>\n <fcom-button\n *ngIf=\"!showInfoIcon && (isMobile$ | async) === false\"\n class=\"flex--nogrow\"\n (clickBtn)=\"openBasket.emit()\"\n [icon]=\"{\n name:\n isBasketDisabled || !hasActiveBasketState\n ? SvgLibraryIcon.SHOPPING_CART\n : SvgLibraryIcon.SHOPPING_CART_ACTIVE,\n position: IconPosition.LEFT,\n }\"\n [text]=\"'cart.title' | finLocalization\"\n [theme]=\"ButtonTheme.DARK_TERTIARY_GHOST\"\n [disabled]=\"isBasketDisabled || (hasBasketActionInMobileOnly && (isMobile$ | async) === false)\"\n ></fcom-button>\n <button\n data-testid=\"modify-search\"\n *ngIf=\"(showModifyButton$ | async) === true\"\n class=\"modify-button font-body-1 medium-type underline\"\n (click)=\"changeStep.emit(STEPS.ENTRY)\"\n >\n {{ 'services.sidebar.modifySearch' | finLocalization }}\n </button>\n </div>\n </aside>\n </div>\n</section>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, map, Observable } from 'rxjs';\n\nimport { ElementTypes, Step } from '@fcom/common';\nimport { MediaQueryService } from '@fcom/common/services';\nimport { BookingSteps } from '@fcom/common/interfaces/booking/booking-step.interface';\nimport { BookingService } from '@fcom/booking/services';\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { IconButtonTheme, IconButtonSize, ButtonTheme, IconPosition } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-sub-header',\n styleUrls: ['sub-header.component.scss'],\n templateUrl: 'sub-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SubHeaderComponent implements OnInit {\n readonly ElementTypes = ElementTypes;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly IconButtonTheme = IconButtonTheme;\n readonly IconButtonSize = IconButtonSize;\n readonly ButtonTheme = ButtonTheme;\n readonly IconPosition = IconPosition;\n\n STEPS: BookingSteps = BOOKING_STEPS;\n\n @Input()\n hasBasket: boolean;\n @Input()\n isBasketDisabled: boolean;\n @Input()\n hasActiveBasketState: boolean;\n @Input()\n hasBasketActionInMobileOnly: boolean;\n @Input()\n backgroundColorClass = 'nordic-blue-900-bg';\n @Input()\n showInfoIcon: boolean;\n @Input()\n staticHeight = true;\n @Input()\n noHeader = false;\n\n @Output()\n openBasket: EventEmitter<Event> = new EventEmitter<Event>();\n @Output()\n changeStep: EventEmitter<Step> = new EventEmitter<Step>();\n\n isMobile$: Observable<boolean>;\n step$: Observable<Step>;\n showModifyButton$: Observable<boolean>;\n\n constructor(\n private mediaQueryService: MediaQueryService,\n private bookingService: BookingService\n ) {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n this.step$ = this.bookingService.step;\n }\n\n ngOnInit(): void {\n this.showModifyButton$ = combineLatest([this.isMobile$, this.step$]).pipe(\n map(([isMobile, step]) => !isMobile && step.phase === BOOKING_STEPS.FLIGHT_SELECTION.phase)\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ComponentsModule } from '../components/components.module';\nimport { DirectiveModule } from '../directives/directive.module';\nimport { PipesModule } from '../pipes/pipes.module';\nimport { MultivariateTestService } from './services/multivariate-test.service';\n\n@NgModule({\n imports: [CommonModule, ComponentsModule, DirectiveModule, PipesModule],\n declarations: [],\n exports: [],\n providers: [MultivariateTestService],\n})\nexport class MultivariateTestModule {}\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","import { MonoTypeOperatorFunction, SchedulerLike } from '../types';\nimport { operate } from '../util/lift';\n\n/**\n * Asynchronously subscribes Observers to this Observable on the specified {@link SchedulerLike}.\n *\n * With `subscribeOn` you can decide what type of scheduler a specific Observable will be using when it is subscribed to.\n *\n * Schedulers control the speed and order of emissions to observers from an Observable stream.\n *\n * ![](subscribeOn.png)\n *\n * ## Example\n *\n * Given the following code:\n *\n * ```ts\n * import { of, merge } from 'rxjs';\n *\n * const a = of(1, 2, 3);\n * const b = of(4, 5, 6);\n *\n * merge(a, b).subscribe(console.log);\n *\n * // Outputs\n * // 1\n * // 2\n * // 3\n * // 4\n * // 5\n * // 6\n * ```\n *\n * Both Observable `a` and `b` will emit their values directly and synchronously once they are subscribed to.\n *\n * If we instead use the `subscribeOn` operator declaring that we want to use the {@link asyncScheduler} for values emitted by Observable `a`:\n *\n * ```ts\n * import { of, subscribeOn, asyncScheduler, merge } from 'rxjs';\n *\n * const a = of(1, 2, 3).pipe(subscribeOn(asyncScheduler));\n * const b = of(4, 5, 6);\n *\n * merge(a, b).subscribe(console.log);\n *\n * // Outputs\n * // 4\n * // 5\n * // 6\n * // 1\n * // 2\n * // 3\n * ```\n *\n * The reason for this is that Observable `b` emits its values directly and synchronously like before\n * but the emissions from `a` are scheduled on the event loop because we are now using the {@link asyncScheduler} for that specific Observable.\n *\n * @param scheduler The {@link SchedulerLike} to perform subscription actions on.\n * @param delay A delay to pass to the scheduler to delay subscriptions\n * @return A function that returns an Observable modified so that its\n * subscriptions happen on the specified {@link SchedulerLike}.\n */\nexport function subscribeOn<T>(scheduler: SchedulerLike, delay: number = 0): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n });\n}\n","import { SchedulerLike } from '../types';\nimport { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\n\nexport function scheduleAsyncIterable<T>(input: AsyncIterable<T>, scheduler: SchedulerLike) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable<T>((subscriber) => {\n executeSchedule(subscriber, scheduler, () => {\n const iterator = input[Symbol.asyncIterator]();\n executeSchedule(\n subscriber,\n scheduler,\n () => {\n iterator.next().then((result) => {\n if (result.done) {\n // This will remove the subscriptions from\n // the parent subscription.\n subscriber.complete();\n } else {\n subscriber.next(result.value);\n }\n });\n },\n 0,\n true\n );\n });\n });\n}\n","import { Observable } from '../Observable';\nimport { ObservableInput, SchedulerLike, ObservedValueOf } from '../types';\nimport { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\n\nexport function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function from<O extends ObservableInput<any>>(input: O, scheduler: SchedulerLike | undefined): Observable<ObservedValueOf<O>>;\n\n/**\n * Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object.\n *\n * <span class=\"informal\">Converts almost anything to an Observable.</span>\n *\n * ![](from.png)\n *\n * `from` converts various other objects and data types into Observables. It also converts a Promise, an array-like, or an\n * <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable\" target=\"_blank\">iterable</a>\n * object into an Observable that emits the items in that promise, array, or iterable. A String, in this context, is treated\n * as an array of characters. Observable-like objects (contains a function named with the ES2015 Symbol for Observable) can also be\n * converted through this operator.\n *\n * ## Examples\n *\n * Converts an array to an Observable\n *\n * ```ts\n * import { from } from 'rxjs';\n *\n * const array = [10, 20, 30];\n * const result = from(array);\n *\n * result.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 10\n * // 20\n * // 30\n * ```\n *\n * Convert an infinite iterable (from a generator) to an Observable\n *\n * ```ts\n * import { from, take } from 'rxjs';\n *\n * function* generateDoubles(seed) {\n * let i = seed;\n * while (true) {\n * yield i;\n * i = 2 * i; // double it\n * }\n * }\n *\n * const iterator = generateDoubles(3);\n * const result = from(iterator).pipe(take(10));\n *\n * result.subscribe(x => console.log(x));\n *\n * // Logs:\n * // 3\n * // 6\n * // 12\n * // 24\n * // 48\n * // 96\n * // 192\n * // 384\n * // 768\n * // 1536\n * ```\n *\n * With `asyncScheduler`\n *\n * ```ts\n * import { from, asyncScheduler } from 'rxjs';\n *\n * console.log('start');\n *\n * const array = [10, 20, 30];\n * const result = from(array, asyncScheduler);\n *\n * result.subscribe(x => console.log(x));\n *\n * console.log('end');\n *\n * // Logs:\n * // 'start'\n * // 'end'\n * // 10\n * // 20\n * // 30\n * ```\n *\n * @see {@link fromEvent}\n * @see {@link fromEventPattern}\n *\n * @param input A subscription object, a Promise, an Observable-like,\n * an Array, an iterable, or an array-like object to be converted.\n * @param scheduler An optional {@link SchedulerLike} on which to schedule the emission of values.\n * @return An Observable converted from {@link ObservableInput}.\n */\nexport function from<T>(input: ObservableInput<T>, scheduler?: SchedulerLike): Observable<T> {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { ObservableInput, SchedulerLike } from '../types';\nimport { Observable } from '../Observable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\n\n/**\n * Converts from a common {@link ObservableInput} type to an observable where subscription and emissions\n * are scheduled on the provided scheduler.\n *\n * @see {@link from}\n * @see {@link of}\n *\n * @param input The observable, array, promise, iterable, etc you would like to schedule\n * @param scheduler The scheduler to use to schedule the subscription and emissions from\n * the returned observable.\n */\nexport function scheduled<T>(input: ObservableInput<T>, scheduler: SchedulerLike): Observable<T> {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nimport { InteropObservable, SchedulerLike } from '../types';\n\nexport function scheduleObservable<T>(input: InteropObservable<T>, scheduler: SchedulerLike) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\n\nexport function scheduleArray<T>(input: ArrayLike<T>, scheduler: SchedulerLike) {\n return new Observable<T>((subscriber) => {\n // The current array index.\n let i = 0;\n // Start iterating over the array like on a schedule.\n return scheduler.schedule(function () {\n if (i === input.length) {\n // If we have hit the end of the array like in the\n // previous job, we can complete.\n subscriber.complete();\n } else {\n // Otherwise let's next the value at the current index,\n // then increment our index.\n subscriber.next(input[i++]);\n // If the last emission didn't cause us to close the subscriber\n // (via take or some side effect), reschedule the job and we'll\n // make another pass.\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nimport { SchedulerLike } from '../types';\n\nexport function schedulePromise<T>(input: PromiseLike<T>, scheduler: SchedulerLike) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nimport { SchedulerLike } from '../types';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\n\n/**\n * Used in {@link scheduled} to create an observable from an Iterable.\n * @param input The iterable to create an observable from\n * @param scheduler The scheduler to use\n */\nexport function scheduleIterable<T>(input: Iterable<T>, scheduler: SchedulerLike) {\n return new Observable<T>((subscriber) => {\n let iterator: Iterator<T, T>;\n\n // Schedule the initial creation of the iterator from\n // the iterable. This is so the code in the iterable is\n // not called until the scheduled job fires.\n executeSchedule(subscriber, scheduler, () => {\n // Create the iterator.\n iterator = (input as any)[Symbol_iterator]();\n\n executeSchedule(\n subscriber,\n scheduler,\n () => {\n let value: T;\n let done: boolean | undefined;\n try {\n // Pull the value out of the iterator\n ({ value, done } = iterator.next());\n } catch (err) {\n // We got an error while pulling from the iterator\n subscriber.error(err);\n return;\n }\n\n if (done) {\n // If it is \"done\" we just complete. This mimics the\n // behavior of JavaScript's `for..of` consumption of\n // iterables, which will not emit the value from an iterator\n // result of `{ done: true: value: 'here' }`.\n subscriber.complete();\n } else {\n // The iterable is not done, emit the value.\n subscriber.next(value);\n }\n },\n 0,\n true\n );\n });\n\n // During finalization, if we see this iterator has a `return` method,\n // then we know it is a Generator, and not just an Iterator. So we call\n // the `return()` function. This will ensure that any `finally { }` blocks\n // inside of the generator we can hit will be hit properly.\n return () => isFunction(iterator?.return) && iterator.return();\n });\n}\n","import { SchedulerLike, ReadableStreamLike } from '../types';\nimport { Observable } from '../Observable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\n\nexport function scheduleReadableStreamLike<T>(input: ReadableStreamLike<T>, scheduler: SchedulerLike): Observable<T> {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","import { Injectable, OnDestroy, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Event, NavigationEnd, Router } from '@angular/router';\n\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils';\nimport { pathIsAnyHardcodedPath, urlWithoutQueryString } from '@fcom/core/utils/app-url-utils';\n\nconst CSS_CLASS_PREFIX = 'content-wrapper-route-';\nconst CSS_CLASS_DEFAULT = 'none';\nconst CSS_CLASS_FRONT_PAGE = 'front-page';\nconst CSS_CLASS_DYNAMIC = 'dynamic';\n\n/**\n * Provides the HTML element class for the application's content wrapper element\n * as an Observable\n * @class NavigatedPathToContentWrapperService\n */\n@Injectable()\nexport class NavigatedPathToContentWrapperService implements OnDestroy {\n private _contentWrapperNavigatedClass$: BehaviorSubject<string> = new BehaviorSubject(\n CSS_CLASS_PREFIX + CSS_CLASS_DEFAULT\n );\n private subscriptions: Subscription;\n private router: Router;\n\n constructor(@Inject(PLATFORM_ID) private platform: object) {}\n\n /**\n * HTML element class for the application's content wrapper element\n */\n public get contentWrapperNavigatedClass$(): Observable<string> {\n return this._contentWrapperNavigatedClass$;\n }\n\n public setRouter(router: Router) {\n this.router = router;\n if (isPlatformBrowser(this.platform)) {\n this.subscribeToRouter();\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n /**\n * Set <body><fin-app><div id=\"content-wrapper\">'s class based on the navigated route,\n * allowing us to display/hide the chat bubble based on the navigated route\n */\n private subscribeToRouter() {\n this.subscriptions = this.router.events\n .pipe(filter((event: Event) => event instanceof NavigationEnd))\n .subscribe((event: NavigationEnd) => {\n this.setClass(event.urlAfterRedirects);\n });\n }\n\n private setClass(routerEventPath: string) {\n const path = urlWithoutQueryString(routerEventPath);\n if (pathIsAnyHardcodedPath(path)) {\n const navigatedMainArea = path.split('/')[2] || CSS_CLASS_FRONT_PAGE;\n this._contentWrapperNavigatedClass$.next(CSS_CLASS_PREFIX + navigatedMainArea);\n } else {\n this._contentWrapperNavigatedClass$.next(CSS_CLASS_PREFIX + CSS_CLASS_DYNAMIC);\n }\n }\n}\n","import { Inject, Injectable, OnDestroy, PLATFORM_ID } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { NavigationEnd, Router, RouterEvent } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, combineLatest, merge, Observable, of, ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { distinctUntilChanged, distinctUntilKeyChanged, filter, map, switchMap, take, tap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsDataService, ConfigService, NativeBridgeService } from '@fcom/core';\nimport { CmsTaxonomyGeneral } from '@fcom/core-api/interfaces';\nimport { ProfileType } from '@fcom/core-api/login';\nimport { profileType } from '@fcom/core/selectors';\nimport { LoyaltyRoutesPath } from '@fcom/loyalty-core/interfaces';\nimport { addClass, deepCopy, getWhitelistedCmsParamsMapped, removeClass, unsubscribe } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\nimport { BookingAndAppState, BookingLocationCodes } from '@fcom/common/interfaces/booking';\n\nimport { BreadcrumbItem, MenuItem, MenuJson } from '../../interfaces';\nimport { globalBookingFlights } from '../../store';\n\nconst EMPTY_MENU: MenuJson = { top: [], main: [], bottom: [], template: '' };\n\n// Mark active item and breadcrumbs leading to it\nconst initMenu = (menuData: MenuJson, currentUrl: string): MenuJson => {\n const initMenuItems = (menu, url, main = false) => {\n let onCurrentPath = false;\n const fixedUrl = url?.replace('/manage/check-in', '/check-in');\n menu.forEach((item) => {\n item.active =\n fixedUrl && (fixedUrl === item.link || (main && !item.items && item.link && isBaseUrl(fixedUrl, item.link)));\n item.breadcrumb = !!(item.items && initMenuItems(item.items, url, main));\n if (item.active || item.breadcrumb) {\n onCurrentPath = true;\n }\n });\n return onCurrentPath;\n };\n menuData.currentUrl = currentUrl;\n initMenuItems(menuData.main, currentUrl, true);\n initMenuItems(menuData.top, currentUrl);\n return menuData;\n};\n\nconst isBaseUrl = (url: string, baseUrl: string): boolean => {\n const array = url.split('/');\n const subarray = baseUrl.split('/');\n return subarray.every((a, i) => a === array[i]);\n};\n\n@Injectable()\nexport class NavigationMenuService implements OnDestroy {\n public modalOpenSubject$: Subject<boolean> = new Subject();\n public isLandingPage$: Observable<boolean>;\n public isHeaderVisible$: BehaviorSubject<boolean> = new BehaviorSubject(true);\n public isFooterVisible$: BehaviorSubject<boolean> = new BehaviorSubject(true);\n public deprecatedDestinationsBreadcrumbItem$: Observable<BreadcrumbItem>; // Reference to the \"Destinations\" Menu Item in the navigation structure. Deprecated, only used by ond-marketing-landing.component until OnD response contains breadcrumb\n public expandedOrActiveNaviCategory$: Observable<MenuItem>;\n public menuItems$: Observable<MenuJson>;\n public isNavigationMenuOpen$: Observable<boolean>;\n public isFooterOpen$: Observable<boolean>;\n public currentPath$: Observable<string>;\n\n private isMenuOpenSubject$: BehaviorSubject<boolean> = new BehaviorSubject(false); // Start closed\n private isFooterOpenSubject$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n private expandedNaviCat$: BehaviorSubject<MenuItem> = new BehaviorSubject<MenuItem>(null);\n private oneworldLinkSubject$: ReplaySubject<BreadcrumbItem> = new ReplaySubject(1);\n private subscriptions: Subscription;\n\n constructor(\n private cmsDataService: CmsDataService,\n private languageService: LanguageService,\n private nativeBridgeService: NativeBridgeService,\n private router: Router,\n private store$: Store<BookingAndAppState>,\n private configService: ConfigService,\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n const routerEvents$: ReplaySubject<NavigationEnd> = new ReplaySubject(1);\n\n // Construct public observables from private Subjects to encapsulate the Subjects, prevents .next calls\n this.isNavigationMenuOpen$ = this.isMenuOpenSubject$.asObservable();\n this.isFooterOpen$ = this.isFooterOpenSubject$.asObservable();\n const locationCodes$ = this.store$.pipe(\n globalBookingFlights(),\n map((flights) =>\n flights\n .filter(({ origin, destination }) => origin?.locationCode && destination?.locationCode)\n .map(({ origin, destination }) => ({\n originLocationCode: origin?.locationCode,\n destinationLocationCode: destination?.locationCode,\n }))\n ),\n finShare()\n );\n\n const profileType$ = this.store$.pipe(profileType(), finShare());\n\n if (!this.subscriptions) {\n this.subscriptions = new Subscription();\n }\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter((routerEvent) => routerEvent instanceof NavigationEnd),\n distinctUntilChanged(),\n tap((_a) => this.isMenuOpenSubject$.next(false))\n )\n .subscribe(routerEvents$)\n );\n\n this.constructMenuItemsObservable(routerEvents$, profileType$, locationCodes$);\n this.constructIsLandingPageObservable(languageService, routerEvents$);\n this.constructCurrentPathObservable(routerEvents$);\n this.constructDestinationsMenuItem$();\n this.constructExpandedOrActiveNaviCategory$();\n\n this.subscriptions.add(\n merge(this.isMenuOpenSubject$, this.modalOpenSubject$)\n .pipe(filter(() => isPlatformBrowser(this.platform)))\n .subscribe((open) => {\n if (open) {\n this.openModal();\n } else {\n this.closeModal();\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n setHeaderVisibility(isVisible: boolean): void {\n this.isHeaderVisible$.next(isVisible);\n }\n\n setFooterVisibility(isVisible: boolean): void {\n this.isFooterVisible$.next(isVisible);\n }\n\n setOneworldLink(item: BreadcrumbItem): void {\n this.oneworldLinkSubject$.next(item);\n }\n\n get oneworldLink$(): Observable<BreadcrumbItem> {\n return this.oneworldLinkSubject$.asObservable();\n }\n\n toggleMenuOpen(): void {\n if (this.nativeBridgeService.isInsideNativeWebView) {\n this.nativeBridgeService.openNativeMenu();\n } else {\n // eslint-disable-next-line rxjs/no-subject-value\n const prev = this.isMenuOpenSubject$.value;\n this.isMenuOpenSubject$.next(!prev);\n if (!prev) {\n this.closeNaviMenu();\n }\n }\n }\n\n closeMenu(): void {\n // eslint-disable-next-line rxjs/no-subject-value\n if (this.isMenuOpenSubject$.getValue()) {\n this.toggleMenuOpen();\n }\n }\n\n openModal(): void {\n addClass(this.document.body, 'modal-open');\n }\n\n closeModal(): void {\n removeClass(this.document.body, 'modal-open');\n }\n\n setFooterOpen(): void {\n this.isFooterOpenSubject$.next(true);\n }\n\n setFooterClosed(): void {\n this.isFooterOpenSubject$.next(false);\n }\n\n get expandedNaviCategory(): Observable<MenuItem> {\n // TODO Rename to expandedNaviCategory$\n return this.expandedNaviCat$.asObservable();\n }\n\n get activeNaviCategory(): Observable<MenuItem> {\n // TODO Rename to activeNaviCategory$\n return this.menuItems$.pipe(\n map((menu) => {\n return menu.main.find((item) => item.breadcrumb);\n })\n );\n }\n\n get activeNaviSection(): Observable<MenuItem> {\n // TODO Rename to activeNaviSelection$\n return this.activeNaviCategory.pipe(\n map((catMenu) => {\n return catMenu?.items?.find((item) => item.breadcrumb || item.active);\n })\n );\n }\n\n get activeNaviItem(): Observable<MenuItem> {\n // TODO Rename to activeNaviItem$\n return this.activeNaviSection.pipe(\n map((catSection) => {\n return !catSection || catSection.active\n ? catSection\n : catSection.items.find((item) => item.breadcrumb || item.active);\n })\n );\n }\n\n setCategoryAsExpanded(event: Event, category: MenuItem): void {\n event.stopImmediatePropagation();\n event.preventDefault();\n\n // eslint-disable-next-line rxjs/no-subject-value\n if (category === this.expandedNaviCat$.getValue()) {\n this.closeNaviMenu();\n } else {\n this.setExpandedCategory(category);\n }\n }\n\n setExpandedCategory(category: MenuItem): void {\n this.expandedNaviCat$.next(category);\n }\n\n closeNaviMenu(): void {\n this.expandedNaviCat$.next(null);\n }\n\n private constructMenuItemsObservable(\n routerEvents$: Observable<NavigationEnd>,\n profileType$: Observable<ProfileType>,\n locationCodes$: Observable<BookingLocationCodes[]>\n ) {\n const navigation$ = routerEvents$.pipe(\n take(1),\n switchMap((routerEvent) => {\n const whiteListedQueryParams =\n this.configService.cfg.cmsEnv !== 'prod' && this.configService.cfg.isCmsPreview\n ? getWhitelistedCmsParamsMapped(routerEvent.url)\n : [];\n\n return this.languageService.translate('fragments.navigation.url').pipe(\n distinctUntilChanged(),\n switchMap((url) =>\n !url\n ? of(EMPTY_MENU)\n : this.cmsDataService.getFragmentJson(\n url + (whiteListedQueryParams.length > 0 ? `?${whiteListedQueryParams.join('&')}` : '')\n )\n )\n );\n })\n );\n\n this.menuItems$ = combineLatest([navigation$, routerEvents$, profileType$, locationCodes$]).pipe(\n map(([menuJson, routerEvent, memberProfileType, locationCodes]) => {\n const menu = deepCopy(menuJson) as MenuJson;\n menu.main = this.markMenuItemAsHiddenInNavigation(menu.main, memberProfileType);\n if (memberProfileType !== ProfileType.FPLUS) {\n menu.main = this.filterMenuItemsByPath(\n menu.main,\n `/${this.languageService.langValue}/${LoyaltyRoutesPath.PLUS}`\n );\n }\n if (locationCodes.length > 0) {\n menu.main = this.prefillTimetableLink(menu.main, locationCodes[0]);\n }\n return [menu, routerEvent];\n }),\n map(([menuJson, routerEvent]: [MenuJson, NavigationEnd]) => {\n this.closeNaviMenu();\n return initMenu(menuJson, this.splitPathFromUrl(routerEvent.url));\n }),\n finShare()\n );\n }\n\n private prefillTimetableLink(menuItems: MenuItem[], locationCode: BookingLocationCodes) {\n return menuItems.map((menuItem: MenuItem) => ({\n ...menuItem,\n items: menuItem.items?.map((item) =>\n item.link?.includes('timetables')\n ? {\n ...item,\n link: `${item.link}?dest=${locationCode.destinationLocationCode}&origin=${locationCode.originLocationCode}`,\n }\n : item\n ),\n }));\n }\n\n private splitPathFromUrl(url: string): string {\n let path: string;\n if (url) {\n path = url.split('?')[0];\n path = path.split('#')[0];\n path = path.split(';')[0];\n }\n return path;\n }\n\n private constructDestinationsMenuItem$(): void {\n // TODO: Remove deprecatedDestinationsBreadcrumbItem$ as soon as ond-marketing-landing.component does not use it anymore.\n this.deprecatedDestinationsBreadcrumbItem$ = this.menuItems$.pipe(\n // Hardcoded: \"Destinations\" item expected to be at main[1].items[0].\n map((a) => {\n const menuItem = a.main[1].items[0];\n return { title: menuItem.teaserTitle, url: menuItem.link } as BreadcrumbItem;\n }),\n // Don't emit the same item again every time menuItems updates its state, only re-emit when destinations link value actually changes (=change of language only)\n distinctUntilKeyChanged('url')\n );\n }\n\n private constructIsLandingPageObservable(languageService: LanguageService, routerEvents$: Observable<NavigationEnd>) {\n this.isLandingPage$ = routerEvents$.pipe(\n map((routerEvent: RouterEvent) => {\n return routerEvent.url === `/${languageService.langValue}`;\n })\n );\n }\n\n private constructCurrentPathObservable(routerEvents$: Observable<NavigationEnd>) {\n this.currentPath$ = routerEvents$.pipe(\n map((routerEvent: RouterEvent) => {\n return routerEvent.url;\n })\n );\n }\n\n private constructExpandedOrActiveNaviCategory$(): void {\n this.expandedOrActiveNaviCategory$ = combineLatest([this.activeNaviCategory, this.expandedNaviCategory]).pipe(\n map(([activeNaviCategory, expandedNaviCategory]) =>\n expandedNaviCategory !== null ? expandedNaviCategory : activeNaviCategory\n ),\n finShare()\n );\n }\n\n private filterMenuItemsByPath(menuItems: MenuItem[], path: string) {\n return menuItems.map((menuItem: MenuItem) => {\n if (menuItem.items) {\n menuItem.items = menuItem.items.filter((item) => item.link !== path);\n }\n return menuItem;\n });\n }\n\n private markMenuItemAsHiddenInNavigation(menuItems: MenuItem[], loggedProfileType: ProfileType) {\n const setHasVisibleChildren = (items: MenuItem[]): void => {\n items.forEach((menuItem: MenuItem) => {\n if (menuItem.items) {\n menuItem.hasVisibleChildren = menuItem.items.some((item) => !item.hideInMenu);\n }\n });\n };\n\n const checkItemVisibility = (item: MenuItem) => {\n item.hideInMenu = false;\n item.hideInSectionNavi = false;\n item.breadcrumbApplicationOverride = false;\n\n if (item.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.BREADCRUMB_APPLICATION_OVERRIDE)) {\n item.breadcrumbApplicationOverride = true;\n }\n if (item.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.HIDE_FROM_MAIN_MENU)) {\n item.hideInMenu = true;\n }\n if (item.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.HIDE_FROM_SECTION_NAVI)) {\n item.hideInSectionNavi = true;\n }\n if (item.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.SHOW_FOR_NOT_LOGGED_IN) && loggedProfileType) {\n item.hideInMenu = true;\n item.hideInSectionNavi = true;\n }\n if (item.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.SHOW_FOR_LOGGED_IN) && !loggedProfileType) {\n item.hideInMenu = true;\n item.hideInSectionNavi = true;\n }\n if (\n item.subjectTaxonomyTags?.includes(CmsTaxonomyGeneral.SHOW_FOR_LOGGED_IN_PLUS) &&\n loggedProfileType &&\n loggedProfileType !== ProfileType.FPLUS\n ) {\n item.hideInMenu = true;\n item.hideInSectionNavi = true;\n }\n\n if (item.items) {\n checkItemsVisibility(item.items);\n setHasVisibleChildren(item.items);\n }\n return item;\n };\n\n const checkItemsVisibility = (items: MenuItem[]) => {\n return items?.map((item) => checkItemVisibility(item));\n };\n\n return checkItemsVisibility(menuItems);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\nimport { ToasterMessage } from '../../interfaces';\n\nconst MESSAGE_DELAY_MS = 1000;\n\n@Injectable()\nexport class ToasterService {\n public readonly toasterMessage$: Observable<ToasterMessage>;\n public readonly messageToRemove$: Observable<string>;\n private queue$: Subject<ToasterMessage> = new Subject();\n private removalQueue$: Subject<string> = new Subject();\n\n constructor() {\n this.toasterMessage$ = this.queue$.pipe(startWith(null as ToasterMessage));\n this.messageToRemove$ = this.removalQueue$.pipe(startWith(null as string));\n }\n\n addMessageToQueue(message: ToasterMessage): void {\n if (message.delay) {\n setTimeout(() => {\n this.queue$.next(message);\n }, MESSAGE_DELAY_MS);\n } else {\n this.queue$.next(message);\n }\n }\n\n removeMessage(id: string): void {\n this.removalQueue$.next(id);\n }\n}\n","import { Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { distinctUntilChanged, filter, switchMap, tap } from 'rxjs/operators';\n\nimport { sanitizeWhiteListedPath } from '@fcom/core/utils/cms-path-helpers';\nimport { CmsContentType, CmsPage, CmsTemplate } from '@fcom/core-api/interfaces/cms-interface';\nimport { CmsTemplateService } from '@fcom/cms/services/template/cms-template.service';\nimport { ConfigService } from '@fcom/core/services';\n\nimport { PageMetaService } from '../../services/page-meta/page-meta.service';\nimport { NavigationMenuService } from '../navigation-menu/navigation-menu.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CmsPageService {\n private renderer: Renderer2;\n private path$: ReplaySubject<string> = new ReplaySubject(1);\n private template$: Observable<CmsTemplate>;\n\n constructor(\n private pageMetaService: PageMetaService,\n private cmsTemplateService: CmsTemplateService,\n private router: Router,\n private configService: ConfigService,\n private navigationMenuService: NavigationMenuService,\n rendererFactory: RendererFactory2\n ) {\n this.template$ = this.path$.pipe(\n distinctUntilChanged(),\n switchMap((p) => this.cmsTemplateService.load(p)),\n // filter out errors as cmsTemplateService returns them instead of throwing them\n filter((x) => !!x && !('type' in x) && !('error' in x))\n );\n // cannot inject renderer2 directly into services\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n /**\n * If possible try to avoid duplicate loading of pages with this\n * If you know page is loaded somewhere use getPageDataIfExists instead\n * @param urlPath\n */\n getPageData(urlPath: string, customRegexp?: string): Observable<CmsTemplate> {\n this.path$.next(this.getCurrentUrl(urlPath, customRegexp));\n\n return this.template$.pipe(\n tap((template) => {\n const cmsPage = template?.header?.[0] as CmsPage;\n if (cmsPage?.oneworld) {\n this.navigationMenuService.setOneworldLink(cmsPage?.oneworld);\n }\n })\n );\n }\n\n getPageDataIfExists(urlPath: string): Observable<CmsTemplate> {\n return this.cmsTemplateService.getTemplateForPathIfExists(sanitizeWhiteListedPath(urlPath, this.configService.cfg));\n }\n\n getPageDataAndSetMeta(urlPath: string, customRegexp?: string): Observable<CmsTemplate> {\n return this.getPageData(urlPath, customRegexp).pipe(\n tap((template) =>\n this.setMeta(template.header.find((obj) => obj.contentContentType === CmsContentType.CMChannel) as CmsPage)\n )\n );\n }\n\n setMeta(content: CmsPage): void {\n this.pageMetaService.setTitle(content.seoTitle || content.title);\n this.pageMetaService.moveMetaAndLinksToHead(content.metaData, this.renderer);\n }\n\n private getCurrentUrl(urlPath: string, customRegexp?: string): string {\n const sanitizedUrl = sanitizeWhiteListedPath(urlPath, this.configService.cfg);\n\n const urlRegex = new RegExp(`${customRegexp || urlPath}/.*`);\n\n return this.router.url.replace(urlRegex, sanitizedUrl);\n }\n}\n","import { Location } from '@fcom/core-api/interfaces';\n\nexport interface FlightSearchEventPayload {\n locale: string;\n sessionId?: string;\n requestId?: string;\n multivariateTest?: {\n testId?: string;\n segment: number;\n source: string;\n variant: string;\n };\n data: {\n label: EventLabel;\n departureAirport?: string;\n arrivalAirport?: string;\n departureCity?: string;\n arrivalCity?: string;\n departureDate: string;\n returnDate?: string;\n passengers?: {\n main?: number;\n children?: number;\n };\n };\n}\n\nexport enum EventLabel {\n SEARCH_CONNECTIONS = 'SearchConnections',\n}\n\nexport type TrendingDestinationsResponse<T> = {\n locations: T[];\n};\n\nexport interface TrendingDestinationsBaseLocation {\n locationCode: string;\n trend: number;\n score: number;\n}\n\nexport type TrendingDestinationLocation = Location &\n TrendingDestinationsBaseLocation & {\n isIncludedInCampaign: boolean;\n enableBlackTeaser: boolean;\n badgeLabel: string;\n destinationUrl: string;\n };\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\n\nimport { combineLatest, Observable, throwError } from 'rxjs';\nimport { catchError, map, switchMap, take } from 'rxjs/operators';\nimport { v4 as uuid } from 'uuid';\n\nimport { CmsCampaign, CmsDataService, ConfigService, SentryLogger } from '@fcom/core/services';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ConsentService } from '@fcom/common/login/services/consent.service';\nimport { getDestinationInCampaign } from '@fcom/core/utils/cms-data-utils';\nimport { GlobalBookingTravelClass } from '@fcom/core/interfaces';\nimport { Location } from '@fcom/core-api/interfaces';\n\nimport {\n FlightSearchEventPayload,\n EventLabel,\n TrendingDestinationsResponse,\n TrendingDestinationLocation,\n TrendingDestinationsBaseLocation,\n} from '../../interfaces/recommendation.interface';\nimport { ConsentTextId } from '../../interfaces';\n\n@Injectable()\nexport class RecommendationService {\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private languageService: LanguageService,\n private sentryLogger: SentryLogger,\n private consentService: ConsentService,\n private cmsDataService: CmsDataService\n ) {}\n\n sendFlightSearchEvent(\n origin: Location,\n destination: Location,\n departureDate: string,\n returnDate?: string,\n paxAdults?: number,\n paxChildren?: number\n ): Observable<HttpResponse<Response>> {\n if (!departureDate || !origin || !destination) {\n return throwError(() => 'Invalid parameters');\n }\n\n return combineLatest([this.consentService.getCookieConsentStatusById(ConsentTextId.COOKIE_ANALYTICS)]).pipe(\n take(1),\n switchMap(([analyticsConsent]) => {\n const finnairCookieId = this.consentService.getCookieIdFromSnippet();\n const payload: FlightSearchEventPayload = {\n locale: this.languageService.localeValue,\n requestId: uuid(),\n data: {\n label: EventLabel.SEARCH_CONNECTIONS,\n departureAirport: this.getLocationCodeForType(origin, 'airport'),\n arrivalAirport: this.getLocationCodeForType(destination, 'airport'),\n departureCity: this.getLocationCodeForType(origin, 'city'),\n arrivalCity: this.getLocationCodeForType(destination, 'city'),\n departureDate,\n returnDate,\n passengers: {\n main: paxAdults,\n children: paxChildren,\n },\n },\n ...(analyticsConsent && finnairCookieId && { sessionId: finnairCookieId }),\n };\n\n return this.http\n .post<HttpResponse<Response>>(`${this.configService.cfg.recommendationApiUrl}/events`, payload)\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to send flight search event to recommendation api', { error: err });\n return throwError(() => err);\n })\n );\n })\n );\n }\n\n /** Get Trending Destinations\n * @param trendingDestinationLimit amount of trending destinations to be returned\n */\n getTrendingDestinations(\n origin: string,\n pageNumber = 0,\n trendingDestinationLimit = 30\n ): Observable<TrendingDestinationLocation[]> {\n return this._getTrendingDestinations(origin, trendingDestinationLimit, pageNumber * trendingDestinationLimit);\n }\n\n getTrendingDestinationsByContinent(origin: string, continentCode: string): Observable<TrendingDestinationLocation[]> {\n return this._getTrendingDestinations(origin, 200, 0, continentCode);\n }\n\n private _getTrendingDestinations(\n origin: string,\n limit = 0,\n offset = 0,\n continentCode?: string\n ): Observable<TrendingDestinationLocation[]> {\n const payload = {\n params: {\n locale: this.languageService.localeValue,\n limit,\n departureFrom: origin,\n offset,\n },\n };\n\n if (continentCode) {\n payload.params['continentCode'] = continentCode;\n }\n\n return combineLatest([\n this.http.get<TrendingDestinationsResponse<TrendingDestinationLocation>>(\n `${this.configService.cfg.recommendationApiUrl}/trending-destinations`,\n payload\n ),\n this.cmsDataService.getOngoingCampaigns(this.languageService.langValue, this.languageService.localeValue),\n ]).pipe(\n map(([trendingResponse, campaigns]) =>\n trendingResponse.locations.map(\n (location) => this.mapToCampaignLocation(location, campaigns, origin) as TrendingDestinationLocation\n )\n ),\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to get trending destination from recommendation api', { error: err });\n return throwError(() => err);\n })\n );\n }\n\n private mapToCampaignLocation(\n location: TrendingDestinationsBaseLocation | TrendingDestinationLocation,\n campaigns: CmsCampaign[],\n origin: string\n ): TrendingDestinationsBaseLocation | TrendingDestinationLocation {\n const campaign = campaigns.find(\n (campaign) =>\n (campaign?.destinations?.some((dest: string) => dest === location.locationCode) ||\n campaign?.destinationsByOrigin?.[origin]?.some((dest: string) => dest === location.locationCode)) &&\n // Front page has hard coded economy prices\n campaign?.campaignTravelClass === GlobalBookingTravelClass.ECONOMY\n );\n return {\n ...location,\n isIncludedInCampaign: !!campaign,\n badgeLabel: campaign?.campaignLabel,\n enableBlackTeaser: getDestinationInCampaign(campaigns, location.locationCode)?.enableBlackTeaser,\n };\n }\n\n private getLocationCodeForType(location: Location, type: 'airport' | 'city'): string | undefined {\n return location?.type === type ? location.locationCityCode || location.locationCode : undefined;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { filter, map, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsDataService, SentryLogger } from '@fcom/core/';\nimport { finShare } from '@fcom/rx';\nimport { recursiveParse } from '@fcom/cms/services/cms-utils/cms-utils';\nimport { CmsCollection, CmsContent } from '@fcom/core-api/interfaces';\n\n@Injectable()\nexport class FragmentService {\n constructor(\n private languageService: LanguageService,\n private cmsDataService: CmsDataService,\n private sentryLogger: SentryLogger\n ) {}\n\n getFragment<T>(fragmentKey: string, extraParams?: { [key: string]: string }): Observable<T> {\n return this.languageService.translate(fragmentKey).pipe(\n filter(Boolean),\n switchMap((url) => this.cmsDataService.getFragmentJson<T>(url, extraParams)),\n map((data) => {\n if (data['contentId']) {\n return recursiveParse(data as CmsContent | CmsCollection, this.sentryLogger) as T;\n }\n return data;\n }),\n finShare()\n );\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { defaultIfEmpty, filter, merge, take, Subscription } from 'rxjs';\n\nimport { AppState, StorageService } from '@fcom/core';\nimport { loginIsOpen } from '@fcom/core/selectors';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { JoinService } from '../../login/services';\n\nexport const WELCOME_BACK_MESSAGE_CLOSED_KEY = 'welcome-back-message-closed';\n\n@Injectable()\nexport class WelcomeBackMessageService implements OnDestroy {\n private subscriptions: Subscription;\n\n constructor(\n private store$: Store<AppState>,\n private joinService: JoinService,\n private storageService: StorageService\n ) {\n if (!this.storageService.SESSION.get(WELCOME_BACK_MESSAGE_CLOSED_KEY)) {\n this.subscriptions = merge(this.store$.pipe(loginIsOpen()), this.joinService.joinDialogOpen$)\n .pipe(filter(Boolean), take(1), defaultIfEmpty(false))\n .subscribe((_) => this.close());\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n close(): void {\n this.storageService.SESSION.set(WELCOME_BACK_MESSAGE_CLOSED_KEY, true);\n }\n}\n","import { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { map, Observable, of, take } from 'rxjs';\nimport { v4 as uuid } from 'uuid';\n\nimport { SentryLogger, WindowRef } from '@fcom/core';\n\nimport { MultivariateTestService } from '../../multivariate-test/services/multivariate-test.service';\n\nexport enum HotjarCaptureEvent {\n BOOKING_WIDGET = 'start_capture-booking_widget',\n MULTI_CITY_SOFT_LAUNCH = 'start_capture-booking_widget_multi-city',\n CORPORATE_LOGIN = 'start_capture-corporate_login',\n CORPORATE_ENROLLMENT = 'start_capture-corporate_enrollment',\n}\n\nexport enum HotjarAction {\n EVENT = 'event',\n IDENTIFY = 'identify',\n}\n\n@Injectable()\nexport class HotjarService {\n private captureStarted: Partial<Record<HotjarCaptureEvent, boolean>> = {};\n private hasIdentified = false;\n private userId: string;\n\n constructor(\n private windowRef: WindowRef,\n private sentryLogger: SentryLogger,\n private multivariateTestService: MultivariateTestService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n this.userId = uuid();\n }\n\n /**\n * You must subscribe to this function in order to trigger the event to Hotjar. If you do not\n * subscribe then this will silently fail.\n */\n startCapture(event: HotjarCaptureEvent): Observable<void> {\n if (this.captureStarted[event] || isPlatformServer(this.platform)) {\n return of(null);\n }\n\n this.captureStarted[event] = true;\n\n return this.multivariateTestService.segmentsFeed$.pipe(\n take(1),\n map((segment) => {\n if (!this.hasIdentified) {\n this.executeAction(HotjarAction.IDENTIFY, null, {\n segment: segment.segment,\n userId: this.userId,\n });\n\n this.hasIdentified = true;\n }\n\n this.executeAction(HotjarAction.EVENT, event);\n })\n );\n }\n\n getUserId(): string {\n return this.userId;\n }\n\n private executeAction(action: HotjarAction, ...params: any[]): void {\n const hotjar = this.windowRef.nativeWindow['hj'];\n\n if (typeof hotjar === 'function') {\n try {\n hotjar(action, ...params);\n } catch (error) {\n this.sentryLogger.warn('Failed to start hotjar capture', { error });\n }\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Observable, map, of, withLatestFrom } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { LoginCurrentPeriod, Profile, ProfileTier } from '@fcom/core-api/login';\nimport { profile } from '@fcom/core/selectors';\nimport { finShare } from '@fcom/rx';\nimport { AppState } from '@fcom/core';\n\nimport {\n AVIOS_LIFETIME_TIER_LIMITS,\n AVIOS_TIER_LIMITS,\n LIFETIME_TIER_LIMITS,\n LIFETIME_TIER_TEXT,\n TIER_DATA_MAP,\n TIER_FLIGHT_LIMITS,\n TIER_LIMITS,\n TierName,\n TierState,\n} from '../../interfaces';\n\nexport type MemberTierDetails = {\n tier: ProfileTier;\n tierName: string;\n tierState: TierState;\n isJuniorMember: boolean;\n isStartingTier: boolean;\n isGainingMaintainingOrHighestLumo: boolean;\n targetTier: ProfileTier;\n targetTierName: string;\n cardTier: ProfileTier;\n cardLifetimeTierFlag: boolean;\n cardTierName: string;\n /** Including Lifetime if it is. */\n cardTierFullName: string;\n lifetimeTier: ProfileTier.GOLD | ProfileTier.PLATINUM;\n lifetimeTierFlag: boolean;\n lifetimeTargetTier: ProfileTier.PLATINUM | ProfileTier.GOLD;\n\n trackingPeriodStart?: string;\n trackingPeriodEnd?: string;\n cardExpirationDate?: string;\n\n targetTierLimit: number;\n tierPointsCollected: number;\n aySecretTierPointsRequired: number;\n aySecretTierPoints: number;\n qualifyingAYSecretTierPoints: number;\n partnerTierPointsCollected: number;\n qualifyingPartnerTierPointsLimit: number;\n qualifyingPartnerTierPoints: number;\n /** Tier points that count towards progression. */\n qualifyingTierPoints: number;\n\n targetTierFlightLimit: number;\n qualifyingFlightsFlown: number;\n aySecretNumQFlightRequired: number;\n aySecretNumQFlightCalc: number;\n partnerFlightsFlown: number;\n qualifyingPartnerFlightsLimit: number;\n qualifyingPartnerFlights: number;\n /** Number of flights that count towards progression. */\n qualifyingFlights: number;\n\n tierProgress: number;\n\n lifetimeTargetTierLimit: number;\n lifetimeTierPoints: number;\n qualifyingLifetimeTierPoints: number;\n lifetimeProgress: number;\n};\n\nexport type TierLimitsData = {\n tierLimits: typeof TIER_LIMITS | typeof AVIOS_TIER_LIMITS;\n lifetimeTierLimits: typeof LIFETIME_TIER_LIMITS | typeof AVIOS_LIFETIME_TIER_LIMITS;\n};\n\n@Injectable()\nexport class LoyaltyTierService {\n private profile$: Observable<Profile>;\n\n constructor(private store$: Store<AppState>) {\n this.profile$ = this.store$.pipe(profile(), finShare());\n }\n\n public getMemberTierDetails(): Observable<MemberTierDetails> {\n return this.getTierLimitsData().pipe(\n withLatestFrom(this.profile$),\n map(\n ([\n { tierLimits, lifetimeTierLimits },\n {\n cardTier,\n tier,\n isJuniorMember,\n nextTier,\n currentPeriod,\n lifetimeTier,\n lifetimeTierFlag,\n lifetimeTierPoints,\n cardExpirationDate,\n },\n ]) => {\n const tierState = this.getTierState(tierLimits, tier, currentPeriod);\n const isStartingTier = this.isStartingTier(tier);\n const isGainingMaintainingOrHighestLumo =\n (tier === ProfileTier.PLATINUM && tierState === TierState.GAIN) ||\n (tier === ProfileTier.LUMO && (tierState === TierState.MAINTAIN || tierState === TierState.HIGHEST));\n\n const targetTier = tierState === TierState.GAIN && nextTier?.nextTier ? nextTier.nextTier : tier;\n\n const cardLifetimeTierFlag = cardTier === lifetimeTier;\n const cardTierName = TIER_DATA_MAP[cardTier].tierName;\n const cardTierFullName = this.getCardTierFullName(\n cardTier,\n cardTierName,\n cardLifetimeTierFlag,\n isJuniorMember\n );\n\n const lifetimeTargetTier =\n lifetimeTier === ProfileTier.PLATINUM || lifetimeTier === ProfileTier.GOLD\n ? ProfileTier.PLATINUM\n : ProfileTier.GOLD;\n\n const targetTierLimit = tierLimits[targetTier];\n const tierPointsCollected = currentPeriod?.tierPointsCollected ?? 0;\n const aySecretTierPointsRequired = currentPeriod?.aySecretTierPointsRequired ?? 0;\n const aySecretTierPoints = currentPeriod?.aySecretTierPoints ?? 0;\n const qualifyingAYSecretTierPoints = Math.min(aySecretTierPoints, aySecretTierPointsRequired);\n\n const partnerTierPointsCollected = tierPointsCollected - aySecretTierPoints;\n const qualifyingPartnerTierPointsLimit = targetTierLimit - aySecretTierPointsRequired;\n const qualifyingPartnerTierPoints = Math.min(partnerTierPointsCollected, qualifyingPartnerTierPointsLimit);\n\n const qualifyingTierPoints = Math.min(\n isGainingMaintainingOrHighestLumo ? qualifyingPartnerTierPoints + aySecretTierPoints : tierPointsCollected,\n targetTierLimit\n );\n\n const targetTierFlightLimit = TIER_FLIGHT_LIMITS[targetTier];\n const qualifyingFlightsFlown = currentPeriod?.qualifyingFlightsFlown ?? 0;\n const aySecretNumQFlightRequired = currentPeriod?.aySecretNumQFlightRequired ?? 0;\n const aySecretNumQFlightCalc = currentPeriod?.aySecretNumQFlightCalc ?? 0;\n\n const partnerFlightsFlown = qualifyingFlightsFlown - aySecretNumQFlightCalc;\n const qualifyingPartnerFlightsLimit = targetTierFlightLimit - aySecretNumQFlightRequired;\n const qualifyingPartnerFlights = Math.min(partnerFlightsFlown, qualifyingPartnerFlightsLimit);\n\n const qualifyingFlights = Math.min(\n isGainingMaintainingOrHighestLumo\n ? qualifyingPartnerFlights + aySecretNumQFlightCalc\n : qualifyingFlightsFlown,\n targetTierFlightLimit\n );\n\n const tierProgress = Math.floor((qualifyingTierPoints / targetTierLimit) * 100);\n\n const lifetimeTargetTierLimit = lifetimeTierLimits[lifetimeTargetTier];\n lifetimeTierPoints = lifetimeTierPoints ?? 0;\n const qualifyingLifetimeTierPoints = Math.min(lifetimeTierPoints, lifetimeTargetTierLimit);\n const lifetimeProgress = Math.floor((qualifyingLifetimeTierPoints / lifetimeTargetTierLimit) * 100);\n\n return {\n tier,\n tierName: TIER_DATA_MAP[tier].tierName,\n tierState,\n isJuniorMember,\n isStartingTier,\n isGainingMaintainingOrHighestLumo,\n targetTier,\n targetTierName: TIER_DATA_MAP[targetTier].tierName,\n cardTier,\n cardLifetimeTierFlag,\n cardTierName,\n cardTierFullName,\n lifetimeTier,\n lifetimeTierFlag,\n lifetimeTargetTier,\n\n trackingPeriodStart: currentPeriod?.trackingPeriodStart,\n trackingPeriodEnd: currentPeriod?.trackingPeriodEnd,\n cardExpirationDate,\n\n targetTierLimit,\n tierPointsCollected,\n aySecretTierPointsRequired,\n aySecretTierPoints,\n qualifyingAYSecretTierPoints,\n partnerTierPointsCollected,\n qualifyingPartnerTierPointsLimit,\n qualifyingPartnerTierPoints,\n qualifyingTierPoints,\n\n targetTierFlightLimit,\n qualifyingFlightsFlown,\n aySecretNumQFlightRequired,\n aySecretNumQFlightCalc,\n partnerFlightsFlown,\n qualifyingPartnerFlightsLimit,\n qualifyingPartnerFlights,\n qualifyingFlights,\n\n tierProgress,\n\n lifetimeTargetTierLimit,\n lifetimeTierPoints,\n qualifyingLifetimeTierPoints,\n lifetimeProgress,\n };\n }\n )\n );\n }\n\n public getTierLimitsData(): Observable<TierLimitsData> {\n return of({\n tierLimits: AVIOS_TIER_LIMITS,\n lifetimeTierLimits: AVIOS_LIFETIME_TIER_LIMITS,\n });\n }\n\n private getTierState(\n tierLimits: typeof TIER_LIMITS | typeof AVIOS_TIER_LIMITS,\n tier: ProfileTier,\n currentPeriod: LoginCurrentPeriod\n ): TierState {\n if (this.isStartingTier(tier)) {\n return TierState.GAIN;\n } else if (tier === ProfileTier.LUMO) {\n if (\n currentPeriod.tierPointsCollected >= tierLimits[tier] &&\n currentPeriod.aySecretTierPoints >= currentPeriod.aySecretTierPointsRequired\n ) {\n return TierState.HIGHEST;\n }\n return TierState.MAINTAIN;\n } else if (tierLimits[tier] > currentPeriod.tierPointsCollected) {\n return TierState.MAINTAIN;\n } else {\n return TierState.GAIN;\n }\n }\n\n private isStartingTier(profileTier: ProfileTier): boolean {\n return [ProfileTier.JUNIOR, ProfileTier.BASIC].includes(profileTier);\n }\n\n private getCardTierFullName(\n cardTier: ProfileTier,\n cardTierName: TierName,\n cardLifetimeTierFlag: boolean,\n isJuniorMember: boolean\n ): string {\n const fullName = cardLifetimeTierFlag && !isJuniorMember ? `${LIFETIME_TIER_TEXT} ${cardTierName}` : cardTierName;\n\n if (isJuniorMember && cardTier !== ProfileTier.JUNIOR) {\n return `${TierName.JUNIOR} ${fullName}`;\n }\n\n return fullName;\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserAgentService {\n userAgent: string;\n\n constructor(@Inject(PLATFORM_ID) private platform: unknown) {\n if (isPlatformBrowser(this.platform)) {\n this.userAgent = navigator.userAgent;\n }\n }\n\n isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some((b) => this.userAgent.match(b));\n }\n\n isTabletDevice(): boolean {\n const regex =\n /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(.*(IT|AT))))/i;\n return regex.test(this.userAgent);\n }\n\n isDesktopDevice(): boolean {\n return !this.isMobileDevice() && !this.isTabletDevice();\n }\n\n isAndroid(): boolean {\n return this.isMobileDevice() && /android/i.test(this.userAgent);\n }\n\n isIos(): boolean {\n return this.isMobileDevice() && /iPad|iPhone|iPod/.test(this.userAgent) && !(window as any).MSStream;\n }\n}\n","import { TripType } from '@fcom/core/interfaces';\n\nimport { FinnairMultiCitySearchInterface, FlightSearchParams } from '../interfaces';\nimport { getBookingWidgetCabinClass } from './price-calendar.utils';\nimport { GlobalBookingFlight } from '../store';\n\nexport const createDeeplinkPathFromFlightSearchParams = (\n { locale, flights, paxAmount, travelClass, promoCode, isAward, isCorporate, tripType }: FlightSearchParams,\n corporateTravelClassLimitEnabled = false\n): string => {\n const { adults, c15s, children, infants } = paxAmount;\n\n const urlParams: FinnairMultiCitySearchInterface = {\n flights: mapFlightsToParams(flights),\n cabin: getBookingWidgetCabinClass(\n travelClass,\n isCorporate,\n corporateTravelClassLimitEnabled,\n tripType === TripType.MULTICITY\n ),\n adults,\n c15s,\n children,\n infants,\n isAward: isAward || undefined,\n promoCode: isAward ? undefined : promoCode,\n };\n\n Object.keys(urlParams).forEach((key) => {\n if (urlParams[key] === null) {\n delete urlParams[key];\n }\n });\n\n const params = encodeURIComponent(JSON.stringify(urlParams));\n return `/${locale}/booking/flight-selection?json=${params}`;\n};\n\nexport const mapFlightsToParams = (\n flights: GlobalBookingFlight[]\n): { origin: string; destination: string; departureDate: string }[] => {\n return flights.map(({ origin, destination, departureDate }) => {\n return {\n origin: origin?.locationCode,\n destination: destination?.locationCode,\n departureDate: departureDate.toString(),\n };\n });\n};\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport {\n BehaviorSubject,\n combineLatest,\n distinctUntilChanged,\n filter,\n finalize,\n Observable,\n of,\n Subject,\n Subscription,\n switchMap,\n} from 'rxjs';\nimport { catchError, map, startWith, take, withLatestFrom } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { ConfigService, SentryLogger } from '@fcom/core/services';\nimport { AvailabilityEntry, LowestPriceOfPeriod } from '@fcom/dapi/api/models';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\nimport { AppState, GlobalBookingTravelClass, isPresent, LocalDate, mapErrorForSentry, unsubscribe } from '@fcom/core';\nimport { InstantsearchService } from '@fcom/dapi/api/services';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { DatePickerPrices, ElementActions, ElementTypes, GaContext } from '@fcom/common/interfaces';\nimport { Amount } from '@fcom/dapi/interfaces';\nimport { Location } from '@fcom/core-api/interfaces';\nimport { CmsTripTypeMap } from '@fcom/core/utils/tripType.utils';\n\nimport {\n CalendarPrices,\n GlobalBookingTripDates,\n HistogramBar,\n InstantSearchBaseParams,\n InstantSearchFollowingMonthParams,\n InstantSearchFullYearParams,\n PriceCalendarCTAParams,\n PriceCalendarParams,\n PriceCalendarWithPricesParams,\n TripType,\n} from '../../interfaces';\nimport {\n createHistogramData,\n getStartingFromPrice,\n isPriceCalendarWithPricesParams,\n mapInstantSearchPricesToCalendarPrices,\n priceCalendarBaseParamsAreValid,\n priceCalendarPriceParamsAreValid,\n} from '../../utils';\nimport { GlobalBookingActions, globalBookingDiscountCode, GlobalBookingFlight } from '../../store';\nimport { GtmService } from '../../gtm';\nimport { createDeeplinkPathFromFlightSearchParams } from '../../utils/flight-search.utils';\n\nconst DAYS_YEAR = 360;\nconst DAYS_MONTH = 30;\n\n@Injectable()\nexport class PriceCalendarService implements OnDestroy {\n static NUMBER_OF_RETRIES = 2;\n\n private readonly _startingFromPrice$: BehaviorSubject<Amount> = new BehaviorSubject(undefined);\n private readonly _fullYearPrices$: BehaviorSubject<DatePickerPrices> = new BehaviorSubject({\n calendar: undefined,\n histogram: undefined,\n });\n private readonly _calendarPrices$: Observable<DatePickerPrices> = of(undefined);\n private _followingMonthPrices$: BehaviorSubject<CalendarPrices> = new BehaviorSubject({});\n private _travelDates$ = new BehaviorSubject<GlobalBookingTripDates>({\n departureDate: undefined,\n returnDate: undefined,\n });\n\n private _params$: BehaviorSubject<PriceCalendarParams> = new BehaviorSubject<PriceCalendarParams>(undefined);\n\n private _isLoading$: Observable<boolean>;\n\n private _discountCode$: BehaviorSubject<string> = new BehaviorSubject<string>(null);\n\n private _availability$: BehaviorSubject<AvailabilityEntry[]> = new BehaviorSubject<AvailabilityEntry[]>([]);\n\n private subscriptions = new Subscription();\n\n private getPricesForFullYearRequestsCache$ = new BehaviorSubject<\n Map<\n string,\n Observable<{\n fullYear: CalendarPrices;\n histogram: HistogramBar[];\n availability?: AvailabilityEntry[];\n }>\n >\n >(new Map());\n service: Observable<PriceCalendarWithPricesParams>;\n calendarOpen$ = new Subject<PriceCalendarParams | null>();\n\n constructor(\n private languageService: LanguageService,\n private configService: ConfigService,\n private instantsearchService: InstantsearchService,\n private sentryLogger: SentryLogger,\n private appStore$: Store<AppState>,\n private gtmService: GtmService,\n private router: Router\n ) {\n this._calendarPrices$ = combineLatest([\n this._params$.pipe(filter(isPresent)),\n this._fullYearPrices$,\n this._followingMonthPrices$,\n this._travelDates$,\n ]).pipe(\n map(([{ tripType }, fullYearPrices, followingMonth, { departureDate, returnDate }]) => {\n const oneway = tripType === TripType.ONEWAY;\n const onlyDepartureSelectedAndNotOneway = isPresent(departureDate) && !oneway && !isPresent(returnDate);\n const prices = onlyDepartureSelectedAndNotOneway ? followingMonth : fullYearPrices?.calendar;\n\n const pricesWithSelections =\n departureDate && returnDate ? { ...prices, [returnDate?.id]: followingMonth?.[returnDate?.id] } : prices;\n return { calendar: pricesWithSelections, histogram: fullYearPrices?.histogram };\n }),\n finShare()\n );\n\n this.subscriptions.add(\n combineLatest([this._calendarPrices$, this._params$.pipe(filter(isPresent)), this._travelDates$])\n .pipe(\n map(([prices, { tripType }, travelDates]) => getStartingFromPrice(prices, tripType, travelDates)),\n startWith(undefined)\n )\n .subscribe((val) => this._startingFromPrice$.next(val))\n );\n\n this.subscriptions.add(\n this._params$\n .pipe(\n filter(isPresent),\n filter((params) => isPriceCalendarWithPricesParams(params)),\n distinctUntilChanged(\n (prev: PriceCalendarWithPricesParams, next: PriceCalendarWithPricesParams) =>\n prev.origin === next.origin &&\n prev.destination === next.destination &&\n prev.tripType === next.tripType &&\n prev.travelClass === next.travelClass\n ),\n switchMap((params: PriceCalendarWithPricesParams) => this.getPricesForFullYear(params)),\n map(({ fullYear, histogram, availability }) => [{ calendar: fullYear, histogram }, availability] as const),\n finShare()\n )\n .subscribe(([val, availability]) => {\n this._fullYearPrices$.next(val);\n this._availability$.next(availability);\n })\n );\n\n this.subscriptions.add(\n combineLatest([this._params$, this._travelDates$])\n .pipe(\n filter(\n ([params, travelDates]: [PriceCalendarWithPricesParams, GlobalBookingTripDates]) =>\n isPresent(params) && isPresent(travelDates.departureDate?.id)\n ),\n distinctUntilChanged(([prevParams, prevTravelDates], [nextParams, nextTravelDates]) => {\n const departureDateNotChanged = nextTravelDates.departureDate?.id === prevTravelDates.departureDate?.id;\n const locationsNotChanged =\n nextParams.origin === prevParams.origin && nextParams.destination === prevParams.destination;\n const tripTypeChanged = prevParams.tripType === nextParams.tripType;\n const travelClassChanged = prevParams.travelClass === nextParams.travelClass;\n return departureDateNotChanged && locationsNotChanged && tripTypeChanged && travelClassChanged;\n }),\n filter(([params]) => isPriceCalendarWithPricesParams(params)),\n switchMap(([params, travelDates]: [PriceCalendarWithPricesParams, GlobalBookingTripDates]) =>\n this.getPricesForFollowingMonth(params, travelDates.departureDate)\n ),\n finShare()\n )\n .subscribe((value) => this._followingMonthPrices$.next(value))\n );\n\n this.subscriptions.add(\n this.appStore$\n .pipe(\n globalBookingDiscountCode(),\n map((discountCode: string) => (isPresent(discountCode) ? discountCode : null))\n )\n .subscribe((discountCode: string) => {\n this._discountCode$.next(discountCode);\n })\n );\n\n this._isLoading$ = this.getPricesForFullYearRequestsCache$.pipe(\n map((cache) => cache.size > 0),\n finShare()\n );\n\n this.subscriptions.add(\n this._isLoading$.pipe(filter(Boolean)).subscribe(() => {\n this._availability$.next([]);\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n updateParams(params: PriceCalendarParams): void {\n if (isPresent(params) && (priceCalendarPriceParamsAreValid(params) || priceCalendarBaseParamsAreValid(params))) {\n this._params$.next(params);\n if (params.initialTravelDates) {\n this._travelDates$.next(params.initialTravelDates);\n }\n }\n }\n\n get params$(): Observable<PriceCalendarParams> {\n return this._params$.asObservable().pipe(finShare());\n }\n\n get tripType$(): Observable<TripType> {\n return this._params$.pipe(\n filter(isPresent),\n map(({ tripType }) => tripType),\n finShare()\n );\n }\n\n get travelDates$(): Observable<GlobalBookingTripDates> {\n return this._travelDates$.asObservable().pipe(finShare());\n }\n\n get travelDatesValues(): GlobalBookingTripDates {\n return this._travelDates$.getValue();\n }\n\n get startingFromPrice$(): Observable<Amount> {\n return this._startingFromPrice$.pipe(finShare());\n }\n\n get fullYearPrices$(): Observable<DatePickerPrices> {\n return this._fullYearPrices$.asObservable().pipe(finShare());\n }\n\n get calendarPrices$(): Observable<DatePickerPrices> {\n return this._calendarPrices$;\n }\n\n get isLoading$(): Observable<boolean> {\n return this._isLoading$.pipe(finShare());\n }\n\n get availability$(): Observable<AvailabilityEntry[]> {\n return this._availability$.asObservable().pipe(finShare());\n }\n\n convertToReturnTrip(): void {\n this._fullYearPrices$.next({ calendar: undefined, histogram: undefined });\n\n const currentParams = this._params$.getValue();\n this._params$.next({\n ...currentParams,\n tripType: TripType.RETURN,\n });\n }\n\n getPriceCalendarCTAParams(): Observable<PriceCalendarCTAParams> {\n return this._params$.pipe(\n filter(Boolean),\n take(1),\n map((params) => {\n const { tripType, destination, origin } = params;\n\n const { departureDate, returnDate } = this._travelDates$.getValue();\n const departureFlight: GlobalBookingFlight = {\n origin: { locationCode: origin } as Location,\n destination: { locationCode: destination } as Location,\n departureDate,\n };\n const returnFlight: GlobalBookingFlight = {\n origin: { locationCode: destination } as Location,\n destination: { locationCode: origin } as Location,\n departureDate: returnDate,\n };\n\n const flights: GlobalBookingFlight[] =\n tripType === TripType.RETURN ? [departureFlight, returnFlight] : [departureFlight];\n\n return {\n flights,\n tripType: tripType,\n ...(isPriceCalendarWithPricesParams(params) && {\n paxAmount: params.paxAmount,\n travelClass: params.travelClass,\n }),\n };\n })\n );\n }\n\n getPricesForFullYear(\n params: PriceCalendarWithPricesParams\n ): Observable<{ fullYear: CalendarPrices; histogram: HistogramBar[]; availability?: AvailabilityEntry[] }> {\n const fullYearParams = this.convertToFullYearParams(params);\n const serializedParams = JSON.stringify(fullYearParams);\n\n const requestCacheMap = this.getPricesForFullYearRequestsCache$.getValue();\n if (requestCacheMap.has(serializedParams)) {\n return requestCacheMap.get(serializedParams);\n }\n\n const request$ = this.instantsearchService\n .getPricesForPeriod(this.configService.cfg.instantSearchUrl, fullYearParams)\n .pipe(\n withLatestFrom(this.languageService.translate('date')),\n map(([response, dateTranslations]: [LowestPriceOfPeriod, Record<string, string>]) => {\n const fullYear = mapInstantSearchPricesToCalendarPrices(response);\n const histogram = createHistogramData(response, Object.keys(fullYear), dateTranslations);\n\n return {\n fullYear,\n histogram,\n availability: response?.availability,\n };\n }),\n retryWithBackoff(PriceCalendarService.NUMBER_OF_RETRIES),\n catchError((err: unknown) => {\n this.sentryLogger.error('Error finding prices for period', {\n error: mapErrorForSentry(err),\n });\n return of({ fullYear: {}, histogram: [] });\n }),\n finalize(() => {\n const newMap = new Map(requestCacheMap);\n newMap.delete(serializedParams);\n this.getPricesForFullYearRequestsCache$.next(newMap);\n }),\n finShare()\n );\n const newMap = new Map(requestCacheMap);\n newMap.set(serializedParams, request$);\n this.getPricesForFullYearRequestsCache$.next(newMap);\n\n return request$;\n }\n\n getPricesForFollowingMonth(\n params: PriceCalendarWithPricesParams,\n departureDate: LocalDate\n ): Observable<CalendarPrices> {\n const followingMonthParams = this.convertToFollowingMonthParams(params, departureDate);\n return this.instantsearchService\n .getPricesForPeriodWithFixedDepartureDate(this.configService.cfg.instantSearchUrl, followingMonthParams)\n .pipe(\n map((response: LowestPriceOfPeriod) => mapInstantSearchPricesToCalendarPrices(response)),\n retryWithBackoff(PriceCalendarService.NUMBER_OF_RETRIES),\n catchError((err: unknown) => {\n this.sentryLogger.error('Error finding prices for following month', {\n error: mapErrorForSentry(err),\n });\n return of({});\n }),\n finShare()\n );\n }\n\n updateCalendarDates(calendarDates: GlobalBookingTripDates): void {\n this._travelDates$.next(calendarDates);\n }\n\n openPriceCalendar(\n originLocationCode: string,\n destinationLocationCode: string,\n tripType: TripType,\n travelClass: GlobalBookingTravelClass,\n destinationTitle: string\n ): void {\n this.calendarOpen$.next({\n origin: originLocationCode,\n destination: destinationLocationCode,\n tripType,\n travelClass,\n paxAmount: {\n adults: 1,\n c15s: 0,\n children: 0,\n infants: 0,\n },\n });\n this.gtmService.trackElement(\n `tile-${destinationTitle.replace(/ /g, '_')}-${travelClass}-${CmsTripTypeMap[tripType]}`,\n `${GaContext.DESTINATION_MAIN_PAGE}_open-dates`,\n ElementTypes.LIST_ITEM,\n undefined,\n ElementActions.CLICK\n );\n }\n\n priceCalendarCTAClicked(params: PriceCalendarCTAParams): void {\n this.prefillBookingWidget(\n params.travelClass,\n { departureDate: params.flights[0].departureDate, returnDate: params.flights[1]?.departureDate },\n params.tripType,\n params.flights[0].destination.locationCode,\n params.flights[0].origin.locationCode\n );\n\n const deeplink = createDeeplinkPathFromFlightSearchParams({\n flights: params.flights,\n tripType: params.tripType,\n paxAmount: params.paxAmount,\n travelClass: params.travelClass,\n locale: this.languageService.langValue,\n promoCode: this._discountCode$.getValue(),\n });\n this.router.navigateByUrl(deeplink);\n }\n\n closePriceCalendar(): void {\n this.calendarOpen$.next(null);\n }\n\n prefillBookingWidget(\n travelClass: GlobalBookingTravelClass,\n selectedDates: {\n departureDate: LocalDate | undefined;\n returnDate: LocalDate | undefined;\n },\n tripType: TripType,\n destinationLocationCode: string,\n selectedOriginLocationCode: string\n ): void {\n const departureFlight = {\n origin: { locationCode: selectedOriginLocationCode } as Location,\n destination: { locationCode: destinationLocationCode } as Location,\n departureDate: selectedDates.departureDate,\n };\n const returnFlight = {\n origin: { locationCode: destinationLocationCode } as Location,\n destination: { locationCode: selectedOriginLocationCode } as Location,\n departureDate: selectedDates.returnDate,\n };\n\n const flights: GlobalBookingFlight[] =\n tripType === TripType.RETURN ? [departureFlight, returnFlight] : [departureFlight];\n\n this.appStore$.dispatch(GlobalBookingActions.setFlights({ flights }));\n this.appStore$.dispatch(GlobalBookingActions.setTravelClass({ travelClass }));\n this.appStore$.dispatch(GlobalBookingActions.setOrigin({ origin: selectedOriginLocationCode }));\n this.appStore$.dispatch(GlobalBookingActions.setTripType({ tripType }));\n }\n\n private getCommonParams({\n origin,\n destination,\n paxAmount,\n travelClass,\n }: PriceCalendarWithPricesParams): Omit<InstantSearchBaseParams, 'numberOfDays'> {\n return {\n departureLocationCode: origin,\n destinationLocationCode: destination,\n adults: paxAmount.adults + paxAmount.c15s,\n children: paxAmount.children,\n infants: paxAmount.infants,\n locale: this.languageService.localeValue,\n travelClass: travelClass === GlobalBookingTravelClass.MIXED ? null : travelClass,\n };\n }\n\n private convertToFollowingMonthParams(\n params: PriceCalendarWithPricesParams,\n departureDate: LocalDate\n ): InstantSearchFollowingMonthParams {\n const commonParams = this.getCommonParams(params);\n return { ...commonParams, numberOfDays: DAYS_MONTH, departureDate: departureDate.id };\n }\n\n private convertToFullYearParams(params: PriceCalendarWithPricesParams): InstantSearchFullYearParams {\n const commonParams = this.getCommonParams(params);\n return {\n ...commonParams,\n oneway: params.tripType === TripType.ONEWAY,\n startDate: LocalDate.now().id,\n numberOfDays: DAYS_YEAR,\n };\n }\n}\n","/* eslint-disable */\nexport enum Category {\n BAGGAGE = 'baggage',\n CABIN_BAGGAGE = 'cabinBaggage',\n MEAL = 'meal',\n SEAT = 'seat',\n WIFI = 'wifi',\n LOUNGE = 'lounge',\n TRAVEL_COMFORT = 'travelComfort',\n COVER = 'cover',\n OTHER = 'other',\n PET = 'pet',\n SPORT = 'sport',\n SPECIAL = 'special',\n FIREARM = 'firearm',\n MEDIC = 'medic',\n SPECIAL_NEED = 'specialNeed',\n CHILD = 'child',\n PRIORITY = 'priority',\n SAF = 'saf'\n}\n\n","const CONVERT_NEW_LINES_KEY = 'convertNewLines';\n\nexport type ReplaceParams = Array<string | number> | { [key: string]: string | number };\n/**\n * @example:\n * replaceMsgFormat('Hei {1}, olen {0}', ['Matti','Teppo']) => 'Hei Teppo, olen Matti'\n * 'adt' | finLocalization: {amount: 3}\n *\n * @param input the message format string\n * @param args substitutions\n * @returns {any} string\n */\nexport const replaceMsgFormat = (input: any, args: ReplaceParams = []): string => {\n if (typeof input !== 'string') {\n return input;\n }\n let result = input;\n Object.keys(args).forEach((key) => {\n const regex = new RegExp(`\\\\{${key}\\\\}`, 'g');\n result = result.replace(regex, args[key]);\n\n if (key === CONVERT_NEW_LINES_KEY && args[key] === 'true') {\n result = result.replace(/\\\\n/g, '\\n');\n }\n });\n return result;\n};\n\n/**\n * @example:\n * replaceURIFormat('https://url.to/path?param1={p1}¶m2={p2}', { p1: 'param1value', p2: 2 })\n * => 'https://url.to/path?param1=param1value¶m2=2'\n *\n * @param input the message format string\n * @param args substitutions\n * @returns {any} string\n */\nexport const replaceURIFormat = (input: any, args: ReplaceParams = []): string => {\n if (typeof input !== 'string') {\n return input;\n }\n let result = input;\n Object.keys(args).forEach((key) => {\n const regex = new RegExp(`\\\\{${key}\\\\}`, 'g');\n result = result.replace(regex, encodeURIComponent(args[key]));\n\n if (key === CONVERT_NEW_LINES_KEY && args[key] === 'true') {\n result = result.replace(/\\\\n/g, '\\n');\n }\n });\n return result;\n};\n","import { NgModule } from '@angular/core';\n\nimport { ClickOutsideDirective } from './click-outside.directive';\n\n@NgModule({\n declarations: [ClickOutsideDirective],\n exports: [ClickOutsideDirective],\n})\nexport class ClickOutsideDirectiveModule {}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport { ConfigService, SentryLogger } from '@fcom/core/services';\n\nimport { ETicketReceiptSubmissionData, ETicketReceiptResponseData, ETicketReceiptFormData } from '../interfaces';\n\n@Injectable()\nexport class SubmitService {\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private sentryLogger: SentryLogger\n ) {}\n\n public eTicketReceipt(formValues: ETicketReceiptFormData): Observable<ETicketReceiptResponseData> {\n const { apiUrl, keyId } = this.configService.cfg.serviceForm.eTicketReceipt;\n\n const submitQuery: ETicketReceiptSubmissionData = {\n lastName: formValues.eTicketReceipt.lastName,\n recLoc: formValues.eTicketReceipt.reservationNumber.toUpperCase(), // API requires uppercase\n };\n\n const httpOptions = {\n headers: this.buildHeaders({ 'x-api-key': keyId }),\n };\n\n return this.http.post<ETicketReceiptResponseData>(apiUrl, submitQuery, httpOptions).pipe(\n map((response) => {\n if (response.delivered) {\n return response;\n }\n throw new Error(response.status.message);\n }),\n // eslint-disable-next-line rxjs/no-implicit-any-catch\n catchError((err) => {\n if (err.message !== 'booking_not_found') {\n this.sentryLogger.warn('Error submitting eTicketReceipt request', { error: err });\n }\n return throwError(() => err);\n })\n );\n }\n\n private buildHeaders(params: object): HttpHeaders {\n return new HttpHeaders(\n Object.assign(\n {\n Accept: 'application/json',\n 'Content-Type': 'application/json; charset=utf-8',\n },\n params\n )\n );\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { UntypedFormGroup, AbstractControl } from '@angular/forms';\n\nimport { Store } from '@ngrx/store';\nimport { combineLatest, Observable, Subscription } from 'rxjs';\nimport { filter, switchMap, take } from 'rxjs/operators';\n\nimport { AppState } from '@fcom/core';\nimport { loginStatus, profile, profileType } from '@fcom/core/selectors';\nimport { Profile, ProfileType } from '@fcom/core-api/login';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { PrefillProfileData } from '../interfaces';\n\n@Injectable()\nexport class PrefillService implements OnDestroy {\n private subscriptions = new Subscription();\n\n constructor(private store$: Store<AppState>) {}\n\n prefillFromProfile(\n form: UntypedFormGroup,\n formFields: { [key: string]: AbstractControl }\n ): Observable<{ [key: string]: boolean }> {\n return new Observable<{ [key: string]: boolean }>((observer) => {\n this.subscriptions.add(\n combineLatest([\n this.store$.pipe(\n loginStatus(),\n finShare(),\n filter((status) => status === 'LOGGED_IN'),\n switchMap(() => this.store$.pipe(profile(), take(1)))\n ),\n this.store$.pipe(profileType(), take(2)),\n ]).subscribe(([memberProfile, memberProfileType]) => {\n this.setValues(memberProfile, formFields, memberProfileType);\n form.updateValueAndValidity();\n observer.next({ prefilled: true });\n })\n );\n });\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n private setValues(\n memberProfile: Profile,\n formFields: { [key: string]: AbstractControl },\n memberProfileType: ProfileType\n ) {\n Object.keys(formFields).forEach((field) => {\n const formField = formFields[field];\n\n let value = memberProfile[field] || this.getFieldFromPrimaryAddress(memberProfile, field);\n\n if (field === PrefillProfileData.MEMBER_NUMBER && memberProfileType !== ProfileType.FPLUS) {\n return;\n }\n\n if (value || field === PrefillProfileData.FIRST_LAST_NAME) {\n switch (field) {\n case PrefillProfileData.MEMBER_NUMBER:\n value = memberProfile.memberNumber;\n break;\n case PrefillProfileData.PARSED_MOBILE_PHONE:\n value = value.countryCode && value.nationalNumber ? `+${value.countryCode}${value.nationalNumber}` : '';\n break;\n case PrefillProfileData.LANGUAGE:\n value = value.toUpperCase();\n break;\n case PrefillProfileData.FIRST_LAST_NAME:\n value = `${memberProfile.firstname} ${memberProfile.lastname}`;\n break;\n default:\n }\n formField.setValue(value);\n }\n });\n }\n\n private getFieldFromPrimaryAddress(memberProfile: Profile, field: string) {\n const primaryAddress = memberProfile.addresses?.find((address) => address.primary);\n if (primaryAddress) {\n return primaryAddress[field];\n }\n }\n}\n","import { concat } from '../observable/concat';\nimport { OperatorFunction, SchedulerLike, ValueFromArray } from '../types';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\n\n// Devs are more likely to pass null or undefined than they are a scheduler\n// without accompanying values. To make things easier for (naughty) devs who\n// use the `strictNullChecks: false` TypeScript compiler option, these\n// overloads with explicit null and undefined values are included.\n\nexport function startWith<T>(value: null): OperatorFunction<T, T | null>;\nexport function startWith<T>(value: undefined): OperatorFunction<T, T | undefined>;\n\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function startWith<T, A extends readonly unknown[] = T[]>(\n ...valuesAndScheduler: [...A, SchedulerLike]\n): OperatorFunction<T, T | ValueFromArray<A>>;\nexport function startWith<T, A extends readonly unknown[] = T[]>(...values: A): OperatorFunction<T, T | ValueFromArray<A>>;\n\n/**\n * Returns an observable that, at the moment of subscription, will synchronously emit all\n * values provided to this operator, then subscribe to the source and mirror all of its emissions\n * to subscribers.\n *\n * This is a useful way to know when subscription has occurred on an existing observable.\n *\n * <span class=\"informal\">First emits its arguments in order, and then any\n * emissions from the source.</span>\n *\n * ![](startWith.png)\n *\n * ## Examples\n *\n * Emit a value when a timer starts.\n *\n * ```ts\n * import { timer, map, startWith } from 'rxjs';\n *\n * timer(1000)\n * .pipe(\n * map(() => 'timer emit'),\n * startWith('timer start')\n * )\n * .subscribe(x => console.log(x));\n *\n * // results:\n * // 'timer start'\n * // 'timer emit'\n * ```\n *\n * @param values Items you want the modified Observable to emit first.\n * @return A function that returns an Observable that synchronously emits\n * provided values before subscribing to the source Observable.\n *\n * @see {@link endWith}\n * @see {@link finalize}\n * @see {@link concat}\n */\nexport function startWith<T, D>(...values: D[]): OperatorFunction<T, T | D> {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n // Here we can't pass `undefined` as a scheduler, because if we did, the\n // code inside of `concat` would be confused by the `undefined`, and treat it\n // like an invalid observable. So we have to split it two different ways.\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","import { CmsTemplate, CmsPage } from '@fcom/core-api';\nimport { PageMetaService } from '@fcom/common/services';\n\nexport const setPageMetadata = (template: CmsTemplate, pageMetaService: PageMetaService): void => {\n const header = template.header && (template.header[0] as CmsPage);\n if (!header) {\n return;\n }\n pageMetaService.setTitle(header.seoTitle || header.title);\n const metaDescription = header?.metaData?.find((meta) => meta.attributes.name === 'description');\n if (metaDescription?.attributes?.content) {\n pageMetaService.setDescription(metaDescription.attributes.content);\n }\n};\n","'use strict';\n\n/** @type {import('./max')} */\nmodule.exports = Math.max;\n","import { DestinationSearchBlockOffer } from '@fcom/cms';\nimport { GlobalBookingTravelClass } from '@fcom/core';\nimport { TripType } from '@fcom/core/interfaces';\n\nimport { DestinationSearchItem, DestinationSearchTripDates } from './destination-search.interface';\n\n/**\n * Object with ID to support having different states for different instances\n */\nexport interface DestinationSearchFilterStateMeta {\n id: string;\n}\n\nexport interface DestinationSearchState {\n [destinationSearchStateId: string]: DestinationSearchFilters;\n}\n\n/**\n * The filter combination to limit results that match.\n */\nexport interface DestinationSearchFilters {\n selectedDestinations: DestinationSearchItem[];\n fromLocationCode?: string;\n tripDates?: DestinationSearchTripDates;\n tripType?: TripType;\n travelClass?: GlobalBookingTravelClass;\n skipRouteUpdate?: boolean;\n restrictToDestinations?: string[];\n maxPrice?: number;\n showDirectFlightsOnly?: boolean;\n destinationsBeforeFiltering?: DestinationSearchBlockOffer[];\n roundTripPrices?: boolean;\n}\n\n/**\n * Filter: From Location\n */\nexport interface DestinationSearchFilterFromLocation {\n title: string;\n locationCode: string;\n}\n\n/**\n * Sorting\n */\nexport enum SortBehavior {\n ALPHABETICAL = 'sortByName',\n PRICE = 'sortByPrice',\n CUSTOM = 'sortByCustom',\n}\n","<ng-container *ngIf=\"campaignLink$ | async as campaignLink\">\n <div\n *ngIf=\"visibility$ | async\"\n class=\"campaign-banner\"\n [class.black-bg]=\"campaignLink.enableBlackTeaser\"\n [class.heather-700-bg]=\"!campaignLink.enableBlackTeaser\"\n >\n <div class=\"grid-col-12 grid-max-width\">\n <div class=\"align-center col-1-12\">\n <a\n [finLink]=\"campaignLink.link.url\"\n [finElemTracker]=\"'campaign-banner'\"\n [finElemContext]=\"'top-navigation'\"\n [finElemType]=\"ElementTypes.BANNER\"\n class=\"grey-25-text ps-xsmall inline-block font-body-1 mr-medium-x bold-type\"\n >\n {{ campaignLink.text }}\n </a>\n </div>\n </div>\n </div>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { combineLatest, Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { compareAsJson } from '@fcom/core/utils';\n\nimport { CampaignBannerService } from '../../../services/campaign-banner/campaign-banner.service';\nimport { ElementTypes } from '../../../interfaces';\n\ninterface CampaignBanner {\n text: string;\n link: { url: string };\n test?: {\n text: string;\n link: { url: string };\n };\n enableBlackTeaser?: boolean;\n}\n\n@Component({\n selector: 'fin-campaign-banner',\n templateUrl: './campaign-banner.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CampaignBannerComponent implements OnInit {\n readonly ElementTypes = ElementTypes;\n visibility$: Observable<boolean>;\n\n constructor(\n private languageService: LanguageService,\n private route: ActivatedRoute,\n private campaignBannerService: CampaignBannerService\n ) {}\n campaignLink$: Observable<CampaignBanner>;\n\n ngOnInit(): void {\n this.visibility$ = this.campaignBannerService.visibility$.pipe(distinctUntilChanged());\n this.campaignLink$ = combineLatest([this.languageService.translate('campaignBanner'), this.route.queryParams]).pipe(\n distinctUntilChanged(compareAsJson),\n filter(([translations]) => !!(translations?.link?.url && translations?.text)),\n filter(([, queryParams]) => !(queryParams.utm_campaign && queryParams.utm_source)),\n map(([translations]) => translations),\n distinctUntilChanged()\n );\n }\n}\n","import { AfterViewInit, Directive, ElementRef, EventEmitter, OnDestroy, Output, Renderer2, Input } from '@angular/core';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils';\nimport { PopoverService } from '@fcom/ui-components/components/popover/service/popover.service';\n\n@Directive({\n selector: '[finClickOutside]',\n})\nexport class ClickOutsideDirective implements AfterViewInit, OnDestroy {\n @Input() clickOutsideException = '';\n\n @Output()\n finClickOutside: EventEmitter<Event> = new EventEmitter();\n\n private subscription = new Subscription();\n private timeout: any;\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n private popoverService: PopoverService\n ) {}\n\n ngAfterViewInit(): void {\n // setTimeout needed for the event not to occur when click inserts this directive in DOM\n this.timeout = setTimeout(() => {\n const globalClicks$ = new Observable<Event>((observer) =>\n this.renderer.listen('document', 'click', (event: Event) => observer.next(event))\n );\n this.subscription.add(\n globalClicks$\n .pipe(\n filter(\n (event: Event) => !this.elementRef.nativeElement.contains(event.target) && !this.exceptionInPath(event)\n )\n )\n .subscribe((event) => this.finClickOutside.emit(event))\n );\n });\n\n // This is a temporary compatibility \"api\" so this works together with popovers\n setTimeout(() => {\n this.subscription.add(\n this.popoverService.popoverOpen$.pipe(filter(Boolean)).subscribe(() => {\n this.finClickOutside.emit();\n })\n );\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.timeout);\n unsubscribe(this.subscription);\n }\n\n private exceptionInPath(event: Event): boolean {\n if (this.clickOutsideException === '') {\n return false; // don't even check if input is not given\n }\n if (!event.composedPath) {\n return true; // native clicks have this but test suite clicks don't\n }\n return event.composedPath().find((pathElem: Element) => pathElem.localName === this.clickOutsideException)\n ? true\n : false;\n }\n}\n","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\n\n/**\n *\n * Queue Scheduler\n *\n * <span class=\"informal\">Put every next task on a queue, instead of executing it immediately</span>\n *\n * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.\n *\n * When used without delay, it schedules given task synchronously - executes it right when\n * it is scheduled. However when called recursively, that is when inside the scheduled task,\n * another task is scheduled with queue scheduler, instead of executing immediately as well,\n * that task will be put on a queue and wait for current one to finish.\n *\n * This means that when you execute task with `queue` scheduler, you are sure it will end\n * before any other task scheduled with that scheduler will start.\n *\n * ## Examples\n * Schedule recursively first, then do something\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(() => {\n * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue\n *\n * console.log('first');\n * });\n *\n * // Logs:\n * // \"first\"\n * // \"second\"\n * ```\n *\n * Reschedule itself recursively\n * ```ts\n * import { queueScheduler } from 'rxjs';\n *\n * queueScheduler.schedule(function(state) {\n * if (state !== 0) {\n * console.log('before', state);\n * this.schedule(state - 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * console.log('after', state);\n * }\n * }, 0, 3);\n *\n * // In scheduler that runs recursively, you would expect:\n * // \"before\", 3\n * // \"before\", 2\n * // \"before\", 1\n * // \"after\", 1\n * // \"after\", 2\n * // \"after\", 3\n *\n * // But with queue it logs:\n * // \"before\", 3\n * // \"after\", 3\n * // \"before\", 2\n * // \"after\", 2\n * // \"before\", 1\n * // \"after\", 1\n * ```\n */\n\nexport const queueScheduler = new QueueScheduler(QueueAction);\n\n/**\n * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8.\n */\nexport const queue = queueScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\n\nexport class QueueScheduler extends AsyncScheduler {\n}\n","import { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { QueueScheduler } from './QueueScheduler';\nimport { SchedulerAction } from '../types';\nimport { TimerHandle } from './timerHandle';\n\nexport class QueueAction<T> extends AsyncAction<T> {\n constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction<T>, state?: T) => void) {\n super(scheduler, work);\n }\n\n public schedule(state?: T, delay: number = 0): Subscription {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n\n public execute(state: T, delay: number): any {\n return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay);\n }\n\n protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay: number = 0): TimerHandle {\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n\n // Otherwise flush the scheduler starting with this action.\n scheduler.flush(this);\n\n // HACK: In the past, this was returning `void`. However, `void` isn't a valid\n // `TimerHandle`, and generally the return value here isn't really used. So the\n // compromise is to return `0` which is both \"falsy\" and a valid `TimerHandle`,\n // as opposed to refactoring every other instanceo of `requestAsyncId`.\n return 0;\n }\n}\n","<div\n id=\"{{ popoverOptions.popoverID }}\"\n (click)=\"$event.stopPropagation()\"\n class=\"popover-container border-rounded\"\n [class.rounded-large]=\"roundedCorners\"\n #popoverContent\n [ngStyle]=\"{\n top: (popoverPositionProperties$ | async).top,\n left: (popoverPositionProperties$ | async).left,\n zIndex: (popoverPositionProperties$ | async)?.['z-index'],\n }\"\n [ngClass]=\"{\n fixed: isFixedPosition,\n absolute: !isFixedPosition,\n shadow: popoverOptions.shadow,\n }\"\n [class.fullscreen]=\"isFullscreen$ | async\"\n fcomTrapFocus\n>\n <div\n *ngIf=\"showArrowCaret\"\n class=\"arrow-container\"\n [ngClass]=\"arrowPositionClass\"\n [style.left.px]=\"arrowPosition$ | async\"\n >\n <div class=\"arrow\"></div>\n </div>\n <div\n class=\"white-bg grow fill shadow flex flex--column flex--wrap flex--align-start align-left\"\n [class.rounded-large]=\"roundedCorners\"\n [class.ps-medium]=\"hasPadding\"\n [class.popover-border]=\"showLeftBorder\"\n [ngStyle]=\"{\n width: (popoverPositionProperties$ | async).width,\n }\"\n data-testid=\"popover-content-wrapper\"\n >\n <div\n class=\"flex fill grow\"\n [ngClass]=\"{\n 'flex--align-start': !popoverOptions.fullWidthContent,\n 'flex--align-end': popoverOptions.fullWidthContent,\n 'flex--column-reverse': popoverOptions.fullWidthContent,\n }\"\n >\n <div\n class=\"flex flex--column flex-1 fill\"\n aria-live=\"polite\"\n [ngStyle]=\"{\n maxHeight: (popoverPositionProperties$ | async)?.['max-height'],\n }\"\n >\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n <button\n class=\"popover-close absolute nordic-blue-900-text\"\n type=\"button\"\n [attr.aria-label]=\"ariaCloseText\"\n (click)=\"closePopover()\"\n #closeButton\n *ngIf=\"popoverOptions.showCloseButton\"\n data-testid=\"popover-close-button\"\n >\n <fcom-icon class=\"icon-small\" [name]=\"SvgLibraryIcon.CLOSE_DELETE\"></fcom-icon>\n </button>\n </div>\n\n <button type=\"button\" class=\"font-body-1 mr-xxsmall-t\" (click)=\"closePopover()\" *ngIf=\"closeText\">\n {{ closeText }}\n </button>\n </div>\n</div>\n","import {\n AfterViewChecked,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport {\n BehaviorSubject,\n combineLatest,\n filter,\n fromEvent,\n merge,\n Observable,\n of,\n skipWhile,\n Subject,\n Subscription,\n} from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map, startWith, throttleTime, withLatestFrom } from 'rxjs/operators';\n\nimport { finShare } from '@fcom/rx';\nimport { WindowRef } from '@fcom/core';\nimport { MediaQueryService } from '@fcom/common/services';\n\nimport { PopoverData, PopoverOptions } from '../popover.interface';\nimport { PopoverPosition } from '../popover.enum';\nimport { findFirstFocusableElement } from '../../../utils/dom.utils';\nimport { PopoverService } from '../service/popover.service';\n\ninterface PopoverPositionProperties {\n width: string;\n top?: string;\n left?: string;\n 'z-index'?: string;\n}\n\nconst ABSOLUTE_X_PADDING = 10;\n\n/**\n * The popover component is used for showing extra information to the user in a small popover,\n * there are a number of options you can use for positioning and opening conditions\n *\n * @example\n * <button\n * fcomPopover\n * [options]=\"options\"\n * [content]=\"contentPopover\"\n * [closeText]=\"closeText\"\n * [ariaCloseText]=\"ariaCloseText\">\n * Click\n * </button></div>\n */\n@Component({\n selector: 'fcom-popover',\n templateUrl: './popover.component.html',\n styleUrls: ['./popover.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PopoverComponent implements OnInit, OnDestroy, AfterViewInit, AfterViewChecked {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n private readonly updatePosition$ = new Subject<Event>();\n private readonly resize$ = fromEvent(window, 'resize');\n private readonly scroll$ = fromEvent(window, 'scroll').pipe(debounceTime(30));\n private readonly arrowWidth = 14;\n\n /**\n * The element that triggered the popover and will be used for positioning\n */\n @Input()\n triggerRef: ElementRef<HTMLElement>;\n\n /**\n * An object containing a number of options for the popover\n */\n @Input()\n popoverOptions: PopoverOptions;\n\n /**\n * The content for the popover\n */\n @Input()\n popoverData: PopoverData;\n\n @Input()\n focusReady$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n /**\n * This event will trigger when the popover is closed\n */\n @Output()\n closeClick: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /**\n * Used by the popover directive to control whether the popover should remain visible when hovering\n */\n @Output()\n mouseOnContent: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n private popoverClosed = false;\n private subscription: Subscription = new Subscription();\n private tearDown$ = new Subject<void>();\n\n top = 0;\n bottom = 0;\n left = 0;\n height = 0;\n\n arrowPositionClass: 'arrow-top' | 'arrow-bottom';\n triggerRect$: Observable<DOMRect>;\n popoverPositionProperties$: Observable<PopoverPositionProperties>;\n arrowPosition$: Observable<number>;\n\n @ViewChild('closeButton')\n closeButton: ElementRef;\n\n @ViewChild('popoverContent', { static: true })\n popoverContent: ElementRef;\n\n constructor(\n private windowRef: WindowRef,\n private mediaQueryService: MediaQueryService,\n private renderer: Renderer2,\n private popoverService: PopoverService,\n @Inject(DOCUMENT) private document: Document\n ) {}\n\n @HostListener('document:click', ['$event'])\n clickout(event: Event): void {\n if (\n event.target instanceof Node &&\n this.popoverOptions.enableOnClick &&\n !this.popoverContent.nativeElement.contains(event.target) &&\n !this.triggerRef.nativeElement.contains(event.target)\n ) {\n this.closePopover();\n }\n }\n\n @HostListener('focusin')\n @HostListener('mouseenter')\n onmouseenter(): void {\n this.mouseOnContent.emit(true);\n }\n\n @HostListener('focusout')\n @HostListener('mouseleave')\n onmouseleave(): void {\n this.mouseOnContent.emit(false);\n if (this.popoverOptions.enableOnHover) {\n this.closePopover();\n }\n }\n\n ngOnInit(): void {\n this.validInputs();\n\n this.triggerRect$ = merge(this.resize$, this.scroll$, this.updatePosition$).pipe(\n throttleTime(50),\n startWith(''),\n map((): [DOMRect, number] => [\n this.getTriggerPosition(this.triggerRef.nativeElement, this.isFixedPosition),\n this.height,\n ]),\n distinctUntilChanged(\n ([aRect, aHeight], [bRect, bHeight]) => aRect.x === bRect.x && aRect.y === bRect.y && aHeight === bHeight\n ),\n map(([rect]) => rect),\n finShare()\n );\n\n this.popoverPositionProperties$ = combineLatest([this.triggerRect$, this.isFullscreen$]).pipe(\n map(([triggerRect, isFullscreen]) => ({\n top: isFullscreen ? '0px' : `${this.top}px`,\n left: isFullscreen ? '0px' : `${this.left}px`,\n width: isFullscreen ? '100vw' : `${this.popoverWidth}px`,\n ...(this.isFixedPosition && {\n ['max-height']: isFullscreen ? '100vh' : `calc(100vh - ${triggerRect.bottom + 20}px)`,\n }),\n ...(this.popoverOptions?.zIndex && { 'z-index': this.popoverOptions.zIndex }),\n })),\n startWith({\n width: `${this.popoverWidth}px`,\n }),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n\n this.arrowPosition$ = this.triggerRect$.pipe(\n map((triggerRect: DOMRect) => this.computeArrowPosition(triggerRect)),\n distinctUntilChanged()\n );\n\n this.subscription.add(\n this.triggerRect$.subscribe((rect) => {\n this.computeOffsetLeft(rect);\n this.computeOffsetTop(rect);\n })\n );\n\n this.subscription.add(\n this.isFullscreen$.subscribe((isFullscreen) => {\n if (isFullscreen) {\n this.renderer.addClass(this.document.body, 'overflow-hidden');\n this.renderer.addClass(this.document.body, 'grow');\n } else {\n this.renderer.removeClass(this.document.body, 'overflow-hidden');\n this.renderer.removeClass(this.document.body, 'grow');\n }\n })\n );\n\n this.subscription.add(\n this.tearDown$\n .pipe(\n withLatestFrom(this.isFullscreen$),\n filter(([, isFullscreen]) => isFullscreen)\n )\n .subscribe(() => {\n this.renderer.removeClass(this.document.body, 'overflow-hidden');\n this.renderer.removeClass(this.document.body, 'grow');\n })\n );\n }\n\n ngAfterViewInit(): void {\n this.subscription.add(\n this.focusReady$.pipe(skipWhile(() => this.popoverOptions.disableAutoFocus)).subscribe((ready) => {\n if (ready) {\n findFirstFocusableElement(this.popoverContent.nativeElement)?.focus();\n }\n })\n );\n }\n\n ngAfterViewChecked(): void {\n if (this.height !== this.popoverContent.nativeElement.offsetHeight) {\n this.height = this.popoverContent.nativeElement.offsetHeight;\n this.updatePosition$.next(null);\n }\n }\n\n ngOnDestroy(): void {\n this.tearDown$.next();\n this.subscription.unsubscribe();\n }\n\n validInputs(): never | boolean {\n if (!this.triggerRef) {\n throw new Error('Element reference is required');\n }\n return true;\n }\n\n private popoverShouldBeOnTop(triggerRect: DOMRect, popoverHeight: number): boolean {\n return popoverHeight + this.arrowWidth < triggerRect.top;\n }\n\n private getTriggerPosition(trigger: Element, isFixedPosition: boolean): DOMRect {\n const { top, left, width, height } = trigger.getBoundingClientRect();\n const { scrollTop, scrollLeft, clientTop, clientLeft } = document.documentElement;\n const rect = {\n y: isFixedPosition ? top + clientTop : top + scrollTop - clientTop,\n x: isFixedPosition ? left + clientLeft : left + scrollLeft - clientLeft,\n width,\n height,\n };\n return new DOMRect(rect.x, rect.y, rect.width, rect.height);\n }\n\n private computeOffsetLeft(triggerRect: DOMRect): void {\n if (this.popoverOptions.alignToLeft) {\n this.left = triggerRect.left;\n return;\n }\n\n if (triggerRect.right >= this.popoverWidth) {\n this.left = triggerRect.right - this.popoverWidth;\n } else {\n this.left = this.minOffsetLeft;\n }\n }\n\n private computeOffsetTop(triggerRect: DOMRect): void {\n const popoverHeight = this.popoverContent.nativeElement.getBoundingClientRect().height;\n if (\n this.popoverPosition === PopoverPosition.TOP ||\n (this.popoverPosition === PopoverPosition.AUTOMATIC && this.popoverShouldBeOnTop(triggerRect, popoverHeight))\n ) {\n this.arrowPositionClass = 'arrow-bottom';\n this.top = triggerRect.top - popoverHeight - this.arrowWidth;\n } else {\n this.arrowPositionClass = 'arrow-top';\n this.top = triggerRect.top + triggerRect.height + this.arrowWidth;\n }\n }\n\n computeArrowPosition(triggerRect: DOMRect): number {\n const triggerCenter = triggerRect.left + triggerRect.width / 2;\n\n if (this.isFixedPosition) {\n return triggerCenter - this.left - this.arrowWidth / 2;\n } else {\n return triggerCenter - this.left - this.arrowWidth;\n }\n }\n\n closePopover(): void {\n this.popoverService.close();\n\n if (!this.popoverClosed) {\n this.popoverClosed = true;\n this.closeClick.emit(true);\n }\n }\n\n get minOffsetLeft(): number {\n return this.popoverOptions?.minOffsetLeft ?? ABSOLUTE_X_PADDING;\n }\n\n get popoverWidth(): number {\n const windowWidth = this.windowRef.nativeWindow.innerWidth;\n const popoverWidth = this.popoverOptions?.popoverWidth ?? 342;\n const padding = ABSOLUTE_X_PADDING * 2;\n if (windowWidth && popoverWidth + padding > windowWidth) {\n return windowWidth - padding;\n }\n return popoverWidth;\n }\n\n get popoverPosition(): PopoverPosition {\n return this.popoverOptions?.popoverPosition ?? PopoverPosition.AUTOMATIC;\n }\n\n get isFixedPosition(): boolean {\n return Boolean(this.popoverOptions?.useFixedPosition);\n }\n\n get content(): TemplateRef<ElementRef> {\n return this.popoverData.content ?? null;\n }\n\n get closeText(): string {\n return this.popoverData.closeText ?? '';\n }\n\n get ariaCloseText(): string {\n return this.popoverData.ariaCloseText ?? 'close';\n }\n\n get showLeftBorder(): boolean {\n return this.popoverOptions?.showLeftBorder ?? true;\n }\n\n get showArrowCaret(): boolean {\n return this.popoverOptions?.showArrowCaret ?? true;\n }\n\n get roundedCorners(): boolean {\n return this.popoverOptions?.roundedCorners ?? false;\n }\n\n get hasPadding(): boolean {\n return this.popoverOptions?.hasPadding ?? true;\n }\n\n get isFullscreen$(): Observable<boolean> {\n if (this.popoverOptions.showFullscreenOnBreakpoint === undefined) {\n return of(false);\n }\n return this.mediaQueryService.isBreakpoint$(this.popoverOptions.showFullscreenOnBreakpoint);\n }\n}\n","'use strict';\n\n/** @type {import('./pow')} */\nmodule.exports = Math.pow;\n","export const COMMON_FEATURE_KEY = 'common';\nexport const MAX_PAX_AMOUNT = 9;\nexport const MIN_LEAD_PAX_AMOUNT = 1;\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n TemplateRef,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { TabsComponent } from '../tabs/tabs.component';\nimport { TabIconPosition } from '../tabs/enums';\n\ninterface TabIcon {\n name: SvgLibraryIcon;\n position: TabIconPosition;\n}\n\n@Component({\n selector: 'fcom-tab',\n templateUrl: './tab.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TabComponent implements OnInit, OnDestroy {\n private activeValue: boolean;\n private readonly tabs: TabsComponent;\n private _id: string;\n\n @Input() disabled: boolean;\n\n @Input()\n set id(_id: string) {\n if (_id !== this._id) {\n this._id = _id;\n this.changeDetectorRef.markForCheck();\n }\n }\n\n get id(): string {\n return this._id;\n }\n\n @Input({ required: true }) title: string;\n @Input() subtitle: string;\n @Input() contentPopover: TemplateRef<ElementRef>;\n @Input() data: unknown;\n\n @Input() tabTitleDataTestId: string;\n\n @Input()\n set active(active: boolean) {\n this.activeValue = active;\n this.changeDetectorRef.detectChanges();\n }\n\n get active(): boolean {\n return this.activeValue;\n }\n\n @Input() icon: TabIcon = {\n name: '' as SvgLibraryIcon,\n position: TabIconPosition.TOP,\n };\n\n constructor(\n tabs: TabsComponent,\n private changeDetectorRef: ChangeDetectorRef\n ) {\n this.tabs = tabs;\n }\n\n ngOnInit(): void {\n this.tabs.addTab(this);\n }\n\n ngOnDestroy(): void {\n this.tabs.removeTab(this);\n }\n}\n","<div [id]=\"id\" [hidden]=\"!active\" role=\"tabpanel\" [attr.aria-hidden]=\"!active\" [attr.aria-labelledby]=\"id + '-tab'\">\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { IconsModule } from '../icons';\nimport { TagButtonComponent } from './tag-button.component';\nimport { TagComponent } from './tag.component';\n\n@NgModule({\n declarations: [TagButtonComponent, TagComponent],\n imports: [CommonModule, UiTranslateModule, IconsModule],\n exports: [TagButtonComponent, TagComponent],\n providers: [],\n})\nexport class TagModule {}\n","export enum IconButtonSize {\n SMALL = 'icon-button-small',\n MEDIUM = 'icon-button-medium',\n LARGE = 'icon-button-large',\n}\n\nexport enum IconButtonTheme {\n LIGHT_PRIMARY_CTA_HEATHER = 'light-primary-cta-heather',\n LIGHT_PRIMARY_NORDIC_BLUE = 'light-primary-nordic-blue',\n LIGHT_SECONDARY_OUTLINE = 'light-secondary-outline',\n LIGHT_TERTIARY_GHOST = 'light-tertiary-ghost',\n LIGHT_TERTIARY_FORM = 'light-tertiary-form',\n DARK_PRIMARY_NORDIC_BLUE = 'dark-primary-nordic-blue',\n DARK_PRIMARY_CTA_HEATHER = 'dark-primary-cta-heather',\n DARK_SECONDARY_OUTLINE = 'dark-secondary-outline',\n DARK_TERTIARY_GHOST = 'dark-tertiary-ghost',\n DARK_TERTIARY_FORM = 'dark-tertiary-form',\n}\n","<div [formGroup]=\"parentForm\" [class.ms-xlarge-b]=\"displayMargin\">\n <div class=\"relative ps-xxsmall-b\">\n <label\n class=\"font-body-1 regular-type flex ps-xxsmall-b\"\n *ngIf=\"!hideLabel\"\n [for]=\"idOrControlName\"\n [ngClass]=\"{\n 'nordic-blue-400-text': !control.invalid || !control.touched,\n 'error-900-text': control.invalid && control.touched,\n }\"\n >\n <div class=\"flex-1\">\n @if (label) {\n {{ label }}\n } @else {\n {{ labelPrefix }}\n {{ translationPrefix + '.label' | finLocalization }}\n {{ labelSuffix }}\n }\n <span data-testid=\"text-input-required-asterisk\" class=\"flex-1 flex--nogrow\" *ngIf=\"showAsterix\"> *</span>\n </div>\n <ng-template #contentTooltip>\n <h2 class=\"font-body-1 bold-type nordic-blue-900-text\">{{ tooltipHeading }}</h2>\n <p class=\"pr-xxsmall-t nordic-blue-400-text\">{{ tooltipContent }}</p>\n </ng-template>\n\n <fcom-icon-button\n *ngIf=\"useCustomTooltipAction; else tooltipIcon\"\n class=\"icon nordic-blue-900-text ms-small-r flex-1 flex--nogrow\"\n (clickBtn)=\"tooltipClicked.emit($event)\"\n [icon]=\"{ name: SvgLibraryIcon.HELP }\"\n [theme]=\"IconButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [size]=\"IconButtonSize.SMALL\"\n [aria]=\"{ label: 'actions.info' | finLocalization }\"\n ></fcom-icon-button>\n\n <ng-template #tooltipIcon>\n <fcom-icon-button\n *ngIf=\"tooltipContent\"\n class=\"icon nordic-blue-900-text ms-small-r flex-1 flex--nogrow\"\n (clickBtn)=\"tooltipClicked.emit($event)\"\n [icon]=\"{ name: SvgLibraryIcon.HELP }\"\n [theme]=\"IconButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE\"\n [size]=\"IconButtonSize.SMALL\"\n [aria]=\"{ label: 'actions.info' | finLocalization }\"\n fcomPopover\n [options]=\"tooltipOptions\"\n [content]=\"contentTooltip\"\n [ariaCloseText]=\"'actions.close'\"\n >\n </fcom-icon-button>\n </ng-template>\n </label>\n <input\n class=\"font-body-1 medium-type ps-small border rounded-large fill\"\n *ngIf=\"type === TextInputType.INPUT\"\n [class.form-field-empty]=\"!(control.value || placeHolder || placeHolderText)\"\n [class.sensitive]=\"isSensitive\"\n [type]=\"isPassword && !isPasswordVisible ? InputType.PASSWORD : inputType\"\n [formControlName]=\"controlName\"\n [id]=\"idOrControlName\"\n [attr.placeholder]=\"placeHolderText ? placeHolderText : placeHolder ? (placeHolder | finLocalization) : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-describedby]=\"ariaOptions.describedby\"\n [attr.aria-details]=\"ariaOptions.details\"\n [attr.aria-activedescendant]=\"ariaOptions.activedescendant\"\n [attr.aria-controls]=\"ariaOptions.controls\"\n [attr.aria-expanded]=\"ariaOptions.expanded\"\n [name]=\"controlName\"\n [attr.autocomplete]=\"disableAutoComplete ? 'off' : ''\"\n (input)=\"inputEvent.emit($event)\"\n [ngClass]=\"{ 'ps-xxlarge-r': icon, 'link-hover': cursorType === CursorType.POINTER }\"\n #inputElement\n />\n @if (isPassword) {\n <fcom-icon-button\n class=\"absolute icon-alignment\"\n [class.disabled]=\"ctrlField.disabled\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_FORM\"\n [icon]=\"{\n name: isPasswordVisible ? SvgLibraryIcon.VISIBLE : SvgLibraryIcon.NOT_VISIBLE,\n }\"\n [aria]=\"{\n label: isPasswordVisible\n ? ('actions.hidePassword' | finLocalization)\n : ('actions.showPassword' | finLocalization),\n }\"\n (clickBtn)=\"handleIconClick()\"\n >\n </fcom-icon-button>\n } @else if (clearInput) {\n <fcom-icon-button\n *ngIf=\"clearInput\"\n class=\"absolute icon-alignment\"\n [class.disabled]=\"ctrlField.disabled\"\n [theme]=\"IconButtonTheme.LIGHT_TERTIARY_FORM\"\n [icon]=\"{\n name: parentForm.get(controlName).value ? SvgLibraryIcon.CLOSE_DELETE : SvgLibraryIcon.SEARCH,\n }\"\n [aria]=\"{\n label: parentForm.get(controlName).value\n ? ('actions.clear' | finLocalization)\n : ('actions.search' | finLocalization),\n }\"\n (clickBtn)=\"handleIconClick()\"\n >\n </fcom-icon-button>\n }\n <span class=\"divider\" *ngIf=\"parentForm.get(controlName)?.disabled === false\"></span>\n <textarea\n class=\"font-body-1 medium-type ps-small border rounded-large white-bg fill\"\n *ngIf=\"type === TextInputType.TEXTAREA\"\n [class.sensitive]=\"isSensitive\"\n [class.resizeable]=\"isResizeable\"\n type=\"text\"\n [formControlName]=\"controlName\"\n [id]=\"idOrControlName\"\n [attr.placeholder]=\"placeHolder ? (placeHolder | finLocalization) : null\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-describedby]=\"ariaOptions.describedby\"\n [attr.aria-details]=\"ariaOptions.details\"\n [attr.aria-activedescendant]=\"ariaOptions.activedescendant\"\n [attr.aria-controls]=\"ariaOptions.controls\"\n [attr.aria-expanded]=\"ariaOptions.expanded\"\n [rows]=\"rows\"\n [attr.autocomplete]=\"disableAutoComplete ? 'off' : ''\"\n (input)=\"inputEvent.emit($event)\"\n #textareaElement\n ></textarea>\n </div>\n <div *ngIf=\"control.invalid && control.touched\" class=\"error-label error-900-text font-body-2\" aria-live=\"polite\">\n <span *ngIf=\"control.errors?.required\">\n {{ (translationErrorPrefix || translationPrefix) + '.required' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.email || control.errors?.pattern\">\n {{ (translationErrorPrefix || translationPrefix) + '.pattern' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.duplicate\">\n {{ (translationErrorPrefix || translationPrefix) + '.duplicate' | finLocalization }}\n </span>\n <span *ngIf=\"control.errors?.maxlength\">\n {{ (translationErrorPrefix || translationPrefix) + '.maxlength' | finLocalization: control.errors?.maxlength }}\n </span>\n <span *ngIf=\"control.errors?.minlength\">\n {{ (translationErrorPrefix || translationPrefix) + '.minlength' | finLocalization: control.errors?.minlength }}\n </span>\n <span *ngIf=\"control.errors?.custom\">\n {{ (translationErrorPrefix || translationPrefix) + '.' + control.errors.custom | finLocalization }}\n </span>\n </div>\n <div\n *ngIf=\"characterLimit && characterCount\"\n class=\"nordic-blue-900-text font-body-1\"\n [attr.data-testid]=\"'character-limit-for-' + controlName\"\n >\n {{ characterCount }} / {{ characterLimit }}\n </div>\n</div>\n","import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core';\nimport { AbstractControl, UntypedFormGroup, Validators } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { IconButtonTheme, IconButtonSize } from '../../../components/buttons';\nimport { CursorType, InputType, TextInputType } from '../enums';\nimport { PopoverOptions } from '../../popover';\nimport { AriaOptions } from '../../interfaces';\nimport { IconSet } from '../../../components/icons';\n\n@Component({\n selector: 'fcom-text-input',\n templateUrl: './text-input.component.html',\n styleUrls: ['text-input.component.scss'],\n})\nexport class TextInputComponent implements OnInit, OnDestroy {\n @Input()\n parentForm: UntypedFormGroup;\n\n @Input()\n controlName: string;\n\n @Input()\n translationPrefix: string;\n\n @Input()\n placeHolder: string = null;\n\n @Input()\n placeHolderText?: string;\n\n @Input()\n characterCount: number;\n\n @Input()\n characterLimit: number;\n\n @Input()\n isSensitive = false;\n\n @Input()\n isResizeable = false;\n\n @Input()\n type: TextInputType = TextInputType.INPUT;\n\n @Input()\n rows = 6;\n\n @Input()\n id: string;\n\n @Input()\n labelPrefix: string;\n\n @Input()\n labelSuffix: string;\n\n @Input()\n label: string;\n\n @Input()\n displayMargin = true;\n\n @Input()\n visualDisable = false;\n\n @Input()\n required: boolean;\n\n @Input()\n translationErrorPrefix: string;\n\n @Input()\n hideLabel: boolean;\n\n @Input()\n inputType: InputType = InputType.TEXT;\n\n @Input()\n tooltipHeading: string;\n\n @Input()\n tooltipContent: string;\n\n @Input()\n useCustomTooltipAction = false;\n\n @Input()\n tooltipOptions: PopoverOptions;\n\n @Input()\n icon: IconSet;\n\n @Input()\n ariaOptions: AriaOptions = {};\n\n @Input()\n isPassword = false;\n\n @Input()\n clearInput = false;\n\n @Input()\n disableAutoComplete?: boolean;\n\n @Input()\n cursorType?: CursorType;\n\n @Output()\n tooltipClicked: EventEmitter<Event> = new EventEmitter();\n\n @Output()\n inputEvent: EventEmitter<Event> = new EventEmitter();\n\n @Output()\n iconClicked: EventEmitter<Event> = new EventEmitter();\n\n isRequired = false;\n showAsterix = false;\n idOrControlName: string;\n control: AbstractControl;\n isPasswordVisible: boolean = false;\n showClearIcon: boolean = false;\n\n @ViewChild('inputElement', { static: false })\n inputElement: ElementRef;\n\n @ViewChild('textareaElement', { static: false })\n textareaElement: ElementRef;\n\n readonly CursorType = CursorType;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly InputType = InputType;\n readonly TextInputType = TextInputType;\n\n private subscriptions: Subscription = new Subscription();\n\n get fieldRequired(): boolean {\n const hasRequiredValidator = this.ctrlField.hasValidator(Validators.required);\n\n /* Checking many variables here because depending on how the parent component\n * creates the validators for this field, some of these might be false or null.\n * hasRequiredValidator works correctly when parent uses Validators.required,\n * this.ctrlField.errors.required works partly when parent uses Validators.compose([Validators.required]).\n * Partly meaning that if field is pre-filled and page is refreshed, then the asterisk (*) disappears from\n * the field label. */\n return this.required || this.ctrlField.errors?.required || hasRequiredValidator;\n }\n\n get ctrlField(): AbstractControl {\n return this.parentForm.get(this.controlName);\n }\n\n ngOnInit(): void {\n this.control = this.ctrlField;\n this.isRequired = this.fieldRequired;\n this.showAsterix = this.required ?? this.isRequired;\n this.idOrControlName = this.id || this.controlName;\n this.toggleIcon();\n\n this.subscriptions.add(\n this.control.statusChanges.subscribe(() => {\n if (this.control.value) {\n return;\n }\n this.isRequired = this.fieldRequired;\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n\n handleIconClick(): void {\n if (this.isPassword) {\n this.togglePasswordVisibility();\n } else {\n this.clearInputField();\n }\n }\n\n togglePasswordVisibility(): void {\n this.isPasswordVisible = !this.isPasswordVisible;\n }\n\n toggleIcon(): void {\n this.showClearIcon = this.parentForm.get(this.controlName).value;\n }\n\n clearInputField(): void {\n this.parentForm.get(this.controlName).setValue('');\n }\n}\n","import { FinnairFrequentFlyerCardItem, FinnairOrder, FinnairPassengerItem } from '@fcom/dapi/api/models';\nimport { equals, TzDate } from '@fcom/core/utils';\nimport { FrequentFlyerTierLevel } from '@fcom/common-booking/interfaces/utils.interface';\n\n/**\n * Get first eligible boundIndex for disruption handling and startDate to show alternative-offers\n * @param order\n * @return [startDate, eligibleBoundIndex]\n */\nexport const getEligibleBoundIndexAndStartDate = (order: FinnairOrder): [string, number] => {\n const eligibility = order.eligibilities.disruptionRebooking.find((eligibility) => eligibility.isAllowedToUse);\n const eligibleBoundIndex = order.bounds.findIndex((b) => b.id === eligibility?.id);\n const bound = order.bounds[eligibleBoundIndex]?.disruptedBound?.disruptedBound ?? order.bounds[eligibleBoundIndex];\n const originalLocalDate = TzDate.of(bound?.departure.dateTime)?.toLocalDate();\n const isOriginalDateEligible =\n eligibility?.eligibleDateRanges?.some((range) =>\n originalLocalDate.isBetween(\n TzDate.of(range.fromDateTime).toLocalDate(),\n TzDate.of(range.toDateTime).toLocalDate()\n )\n ) ?? false;\n const startDate = isOriginalDateEligible\n ? originalLocalDate.toString()\n : (TzDate.of(eligibility?.eligibleDateRanges?.[0]?.fromDateTime)?.toLocalDate().toString() ??\n originalLocalDate?.toString() ??\n '');\n return [startDate, eligibleBoundIndex];\n};\n\nconst RE_FETCH_TIERS = [\n FrequentFlyerTierLevel.SILVER,\n FrequentFlyerTierLevel.GOLD,\n FrequentFlyerTierLevel.PLATINUM,\n FrequentFlyerTierLevel.LUMO,\n];\n\nconst hasRefetchTierLevels = (card: FinnairFrequentFlyerCardItem) =>\n RE_FETCH_TIERS.includes(card.tierLevel as FrequentFlyerTierLevel) && card.companyCode === 'AY';\n\nexport const isPassengerFFTierChanged = (\n order: FinnairOrder,\n passengerToValidate: FinnairPassengerItem | undefined\n): boolean => {\n if (!passengerToValidate) {\n return true;\n }\n const oldTiers =\n passengerToValidate.frequentFlyerCards?.filter(hasRefetchTierLevels).map((card) => card.tierLevel) ?? [];\n const newTiers =\n order.passengers\n .find((p) => p.id === passengerToValidate.id)\n ?.frequentFlyerCards?.filter(hasRefetchTierLevels)\n .map((card) => card.tierLevel) ?? [];\n\n return !equals(oldTiers, newTiers);\n};\n","import { FinnairBoundItem } from '@fcom/dapi/api/models';\n\n/**\n * Determine if the the booking is complex (not return or one way flight)\n * @param bounds all bounds in the booking\n */\nexport const isComplexBooking = (bounds: FinnairBoundItem[]): boolean => {\n return (\n bounds.length > 2 || (bounds.length === 2 && bounds[0].departure.locationCode !== bounds[1].arrival.locationCode)\n );\n};\n","/* eslint-disable */\nimport { HttpRequest, HttpParameterCodec, HttpParams, HttpHeaders, HttpContext } from '@angular/common/http';\n\nconst isBlob = (value: unknown): boolean => {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n\nconst isFormData = (value: unknown): boolean => {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n\n/**\n * Custom parameter codec to correctly handle the plus sign in parameter\n * values. See https://github.com/angular/angular/issues/18261\n */\nclass ParameterCodec implements HttpParameterCodec {\n encodeKey(key: string): string {\n return encodeURIComponent(key);\n }\n\n encodeValue(value: string): string {\n return encodeURIComponent(value);\n }\n\n decodeKey(key: string): string {\n return decodeURIComponent(key);\n }\n\n decodeValue(value: string): string {\n return decodeURIComponent(value);\n }\n}\nconst ParameterCodecInstance = new ParameterCodec();\n\n/**\n * Defines the options for appending a parameter\n */\ninterface ParameterOptions {\n style?: string;\n explode?: boolean;\n}\n\n/**\n * Base class for a parameter\n */\nabstract class Parameter {\n constructor(public name: string, public value: any, public options: ParameterOptions, defaultStyle: string, defaultExplode: boolean) {\n this.options = options || {};\n if (this.options.style === null || this.options.style === undefined) {\n this.options.style = defaultStyle;\n }\n if (this.options.explode === null || this.options.explode === undefined) {\n this.options.explode = defaultExplode;\n }\n }\n\n serializeValue(value: any, separator = ','): string {\n if (value === null || value === undefined) {\n return '';\n } else if (value instanceof Array) {\n return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);\n } else if (typeof value === 'object') {\n const array: string[] = [];\n for (const key of Object.keys(value)) {\n let propVal = value[key];\n if (propVal !== null && propVal !== undefined) {\n propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));\n if (this.options.explode) {\n array.push(`${key}=${propVal}`);\n } else {\n array.push(key);\n array.push(propVal);\n }\n }\n }\n return array.join(separator);\n } else {\n return String(value);\n }\n }\n}\n\n/**\n * A parameter in the operation path\n */\nclass PathParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(path: string): string {\n let value = this.value;\n if (value === null || value === undefined) {\n value = '';\n }\n let prefix = this.options.style === 'label' ? '.' : '';\n let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';\n if (this.options.style === 'matrix') {\n // The parameter name is just used as prefix, except in some cases...\n prefix = `;${this.name}=`;\n if (this.options.explode && typeof value === 'object') {\n prefix = ';';\n if (value instanceof Array) {\n // For arrays we have to repeat the name for each element\n value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);\n separator = ';';\n } else {\n // For objects we have to put each the key / value pairs\n value = this.serializeValue(value, ';');\n }\n }\n }\n value = prefix + this.serializeValue(value, separator);\n // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account\n path = path.replace(`{${this.name}}`, value);\n path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);\n return path;\n }\n}\n\n/**\n * A parameter in the query\n */\nclass QueryParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'form', true);\n }\n\n append(params: HttpParams): HttpParams {\n if (this.value instanceof Array) {\n // Array serialization\n if (this.options.explode) {\n for (const v of this.value) {\n params = params.append(this.name, this.serializeValue(v));\n }\n } else {\n const separator = this.options.style === 'spaceDelimited'\n ? ' ' : this.options.style === 'pipeDelimited'\n ? '|' : ',';\n return params.append(this.name, this.serializeValue(this.value, separator));\n }\n } else if (this.value !== null && typeof this.value === 'object') {\n // Object serialization\n if (this.options.style === 'deepObject') {\n // Append a parameter for each key, in the form `name[key]`\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));\n }\n }\n } else if (this.options.explode) {\n // Append a parameter for each key without using the parameter name\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(key, this.serializeValue(propVal));\n }\n }\n } else {\n // Append a single parameter whose values are a comma-separated list of key,value,key,value...\n const array: any[] = [];\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n array.push(key);\n array.push(propVal);\n }\n }\n params = params.append(this.name, this.serializeValue(array));\n }\n } else if (this.value !== null && this.value !== undefined) {\n // Plain value\n params = params.append(this.name, this.serializeValue(this.value));\n }\n return params;\n }\n}\n\n/**\n * A parameter in the HTTP request header\n */\nclass HeaderParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(headers: HttpHeaders): HttpHeaders {\n if (this.value !== null && this.value !== undefined) {\n if (this.value instanceof Array) {\n for (const v of this.value) {\n headers = headers.append(this.name, this.serializeValue(v));\n }\n } else {\n headers = headers.append(this.name, this.serializeValue(this.value));\n }\n }\n return headers;\n }\n}\n\n/**\n * Helper to build http requests from parameters\n */\nexport class DapiRequestBuilder {\n\n private _path = new Map<string, PathParameter>();\n private _query = new Map<string, QueryParameter>();\n private _header = new Map<string, HeaderParameter>();\n _bodyContent: any | null;\n _bodyContentType?: string;\n\n constructor(\n public rootUrl: string,\n public operationPath: string,\n public method: string) {\n }\n\n /**\n * Sets a path parameter\n */\n path(name: string, value: any, options?: ParameterOptions): void {\n this._path.set(name, new PathParameter(name, value, options || {}));\n }\n\n /**\n * Sets a query parameter\n */\n query(name: string, value: any, options?: ParameterOptions): void {\n this._query.set(name, new QueryParameter(name, value, options || {}));\n }\n\n /**\n * Sets a header parameter\n */\n header(name: string, value: any, options?: ParameterOptions): void {\n this._header.set(name, new HeaderParameter(name, value, options || {}));\n }\n\n /**\n * Sets the body content, along with the content type\n */\n body(value: any, contentType = 'application/json'): void {\n if (isBlob(value)) {\n this._bodyContentType = value.type;\n } else {\n this._bodyContentType = contentType;\n }\n if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {\n // Handle URL-encoded data\n const pairs: string[][] = [];\n for (const key of Object.keys(value)) {\n let val = value[key];\n if (!(val instanceof Array)) {\n val = [val];\n }\n for (const v of val) {\n const formValue = this.formDataValue(v);\n if (formValue !== null) {\n pairs.push([key, formValue]);\n }\n }\n }\n this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');\n } else if (this._bodyContentType === 'multipart/form-data' && typeof FormData !== 'undefined') {\n // Handle multipart form data\n const formData = new FormData();\n if (value !== null && value !== undefined) {\n for (const key of Object.keys(value)) {\n const val = value[key];\n if (val instanceof Array) {\n for (const v of val) {\n const toAppend = this.formDataValue(v);\n if (toAppend !== null) {\n formData.append(key, toAppend);\n }\n }\n } else {\n const toAppend = this.formDataValue(val);\n if (toAppend !== null) {\n formData.set(key, toAppend);\n }\n }\n }\n }\n this._bodyContent = formData;\n } else {\n // The body is the plain content\n this._bodyContent = value;\n }\n }\n\n private formDataValue(value: any): any {\n if (value === null || value === undefined) {\n return null;\n }\n if (isBlob(value)) {\n return value;\n }\n if (typeof value === 'object') {\n return JSON.stringify(value);\n }\n return String(value);\n }\n\n /**\n * Builds the request with the current set parameters\n */\n build<T = any>(options?: {\n /** Which content types to accept */\n accept?: string;\n\n /** The expected response type */\n responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';\n\n /** Whether to report progress on uploads / downloads */\n reportProgress?: boolean;\n\n /** HttpContext that is passed to request */\n context?: HttpContext\n }): HttpRequest<T> {\n\n options = options || {};\n\n // Path parameters\n let path = this.operationPath;\n for (const pathParam of this._path.values()) {\n path = pathParam.append(path);\n }\n const url = this.rootUrl + path;\n\n // Query parameters\n let httpParams = new HttpParams({\n encoder: ParameterCodecInstance\n });\n for (const queryParam of this._query.values()) {\n httpParams = queryParam.append(httpParams);\n }\n\n // Header parameters\n let httpHeaders = new HttpHeaders();\n if (options.accept) {\n httpHeaders = httpHeaders.append('Accept', options.accept);\n }\n for (const headerParam of this._header.values()) {\n httpHeaders = headerParam.append(httpHeaders);\n }\n\n // Request content headers\n if (this._bodyContentType && !(isFormData(this._bodyContent))) {\n httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);\n }\n\n // Perform the request\n return new HttpRequest<T>(this.method.toUpperCase(), url, this._bodyContent, {\n params: httpParams,\n headers: httpHeaders,\n responseType: options.responseType,\n reportProgress: options.reportProgress\n });\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { NEVER, Observable, Subscription } from 'rxjs';\nimport { filter, switchMap, take, takeUntil } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { AppState, SentryLogger, mapErrorForSentry } from '@fcom/core';\nimport { GlobalActions } from '@fcom/core/actions';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport { FinnairOrder } from '@fcom/dapi/api/models';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { DapiErrorStatus, DapiHttpErrorResponse, IdAndHash } from '@fcom/dapi';\nimport { OrderService } from '@fcom/dapi/api/services';\n\nimport { CommonBookingAncillaryService } from '../modules/ancillaries/services';\nimport { OrderActions, orderFetchInformation } from '../store';\nimport { QueueService } from './queue.service';\n\n@Injectable()\nexport class BookingOrderService implements OnDestroy {\n static NUMBER_OF_RETRIES = 1;\n\n private subscription: Subscription;\n\n constructor(\n private store$: Store<AppState>,\n private sentryLogger: SentryLogger,\n private queueService: QueueService,\n private orderService: OrderService,\n private config: ConfigService,\n private languageService: LanguageService,\n private router: Router,\n private commonBookingAncillaryService: CommonBookingAncillaryService\n ) {}\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n /**\n * Triggers loading of order from the given order url.\n * @param information OrderFetchInformation\n * @param cancelStream$\n * @param includeServiceCatalog boolean\n * @param includePredictions boolean\n */\n triggerLoadOrder(\n information: IdAndHash,\n cancelStream$: Observable<any> = NEVER,\n includeServiceCatalog = false,\n includePredictions = false\n ): Observable<FinnairOrder> {\n unsubscribe(this.subscription);\n const orderData$ = this.loadOrder(information, includeServiceCatalog, includePredictions).pipe(\n takeUntil(cancelStream$)\n );\n this.subscription = orderData$.subscribe({\n next: (order) => {\n this.store$.dispatch(OrderActions.setOrderData({ order }));\n if (order.payments.length > 0) {\n this.store$.dispatch(GlobalActions.paymentVerified());\n } else {\n this.store$.dispatch(GlobalActions.paymentNotPaid());\n }\n\n this.store$.dispatch(\n GlobalActions.confirmation({\n route: this.router.routerState?.snapshot?.root?.firstChild?.firstChild?.routeConfig,\n })\n );\n //Set service catalog needs to happen after GlobalActions.confirmation's clean up\n if (includeServiceCatalog) {\n this.commonBookingAncillaryService.setServiceCatalog(order);\n }\n\n unsubscribe(this.subscription);\n },\n error: (error: unknown) => {\n const errorResponse = error as DapiHttpErrorResponse;\n\n if (errorResponse.status !== 404) {\n this.sentryLogger.error('Error fetching order', {\n error: mapErrorForSentry(errorResponse.error),\n });\n }\n\n const status = errorResponse?.error?.status ?? DapiErrorStatus.GENERIC_HTTP_ERROR;\n this.store$.dispatch(OrderActions.loadError({ status }));\n unsubscribe(this.subscription);\n },\n complete: () => {\n unsubscribe(this.subscription);\n },\n });\n return orderData$;\n }\n\n queueOrderLoad(triggerFetchServiceCatalog = false, triggerFetchPredictions = false): void {\n const cancelStream$ = this.queueService.toCancelEvent(this.queueService.cancelPayment);\n this.queueService.sendToQueue(\n 'order',\n this.fromOrderFetchInformation((information) =>\n this.triggerLoadOrder(information, cancelStream$, triggerFetchServiceCatalog, triggerFetchPredictions)\n ),\n cancelStream$\n );\n }\n\n private loadOrder(\n information: IdAndHash,\n includeServiceCatalog: boolean,\n includePredictions: boolean\n ): Observable<FinnairOrder> {\n this.store$.dispatch(OrderActions.loadStart());\n return this.orderService\n .fetchOrder(this.config.cfg.orderUrl, {\n orderId: information.id,\n hash: information.hash,\n locale: this.languageService.localeValue,\n includeServiceCatalog,\n includePredictions,\n })\n .pipe(retryWithBackoff(BookingOrderService.NUMBER_OF_RETRIES), finShare());\n }\n\n private fromOrderFetchInformation = (fn: (information: IdAndHash) => Observable<FinnairOrder>) =>\n this.store$.pipe(orderFetchInformation(), filter(Boolean), take(1), switchMap(fn));\n}\n","<fin-skip-link [main]=\"main\"></fin-skip-link>\n<fin-schema></fin-schema>\n<fin-cms-global-disruption-banner></fin-cms-global-disruption-banner>\n\n<router-outlet name=\"campaign-banner\"></router-outlet>\n<router-outlet name=\"header\"></router-outlet>\n\n<fcom-notification\n *ngIf=\"showIndiaRedirectNotification\"\n [isClosable]=\"true\"\n (closeClick)=\"onCloseIndiaNotification()\"\n >{{ 'indiaRedirectNotification' | finLocalization }}</fcom-notification\n>\n\n<main #main [class.layout--footer-open]=\"isFooterOpen$ | async\" role=\"main\">\n <router-outlet></router-outlet>\n</main>\n\n<footer>\n <router-outlet name=\"footer\"></router-outlet>\n</footer>\n","import { Component, OnDestroy, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { filter, distinctUntilChanged } from 'rxjs/operators';\n\nimport { unsubscribe } from '@fcom/core/utils';\nimport { CookieService } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { SchemaService, NavigationMenuService, ScrollService } from '../../services';\nimport { isNavigationEvent } from '../../utils';\n\nexport const INDIA_REDIRECT_COOKIE = 'india-redirect';\nexport const INDIA_REDIRECT_CLOSED_COOKIE = 'india-redirect-closed';\n\n@Component({\n selector: 'fin-layout',\n templateUrl: './base-layout.component.html',\n styleUrls: [],\n})\nexport class BaseLayoutComponent implements OnDestroy {\n subscriptions: Subscription = new Subscription();\n isFooterOpen$: Observable<boolean>;\n showIndiaRedirectNotification = false;\n\n constructor(\n private navigationMenuService: NavigationMenuService,\n private router: Router,\n private scrollService: ScrollService,\n private cookieService: CookieService,\n private languageService: LanguageService,\n private schemaService: SchemaService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter(isNavigationEvent),\n filter(() => isPlatformBrowser(this.platform)),\n distinctUntilChanged((o: NavigationEnd, n) => o.url.split('?')[0] === n.url.split('?')[0]) // If path changed (not only parameters)\n )\n .subscribe(() => {\n this.scrollService.scrollTop();\n this.schemaService.clearSchemas();\n })\n );\n this.isFooterOpen$ = this.navigationMenuService.isFooterOpen$;\n\n if (\n this.cookieService.getItem(INDIA_REDIRECT_COOKIE) &&\n isPlatformBrowser(this.platform) &&\n !this.cookieService.getItem(INDIA_REDIRECT_CLOSED_COOKIE) &&\n this.languageService.localeValue === 'en'\n ) {\n this.showIndiaRedirectNotification = true;\n this.cookieService.removeItem(INDIA_REDIRECT_COOKIE, '/', 'www.finnair.com');\n }\n }\n\n onCloseIndiaNotification(): void {\n this.showIndiaRedirectNotification = false;\n this.cookieService.setItem(INDIA_REDIRECT_CLOSED_COOKIE, true);\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { UiComponentsModule } from '@fcom/ui-components';\nimport { CmsModule } from '@fcom/cms';\n\nimport { PipesModule, ComponentsModule } from '../../';\nimport { BaseLayoutComponent } from './base-layout.component';\n\n@NgModule({\n imports: [\n RouterModule,\n ComponentsModule,\n CommonModule,\n PipesModule,\n UiTranslateModule,\n UiComponentsModule,\n CmsModule,\n ],\n declarations: [BaseLayoutComponent],\n exports: [BaseLayoutComponent],\n})\nexport class BaseLayoutModule {}\n","import { AfterContentInit, Directive, ElementRef, NgZone, OnDestroy } from '@angular/core';\n\nimport { getKeyCodeFromEvent, KeyCodes } from '@fcom/core/utils/keycodes';\nimport { isPresent } from '@fcom/core/utils/utils';\n\nimport { elementIsVisible } from '../../utils/dom.utils';\n\n/**\n * Trap Focus directive.\n *\n * The fcomTrapFocus directive traps focus within an element.\n * This is intended to be used to create accessible experience for components like modal dialogs, where focus must be constrained.\n *\n * @example\n * <code>\n * <pre>\n * <div fcomTrapFocus>\n * <p>Focus wont leave this area</p>\n * </div>\n * </pre>\n * </code>\n */\n@Directive({\n selector: '[fcomTrapFocus]',\n})\nexport class TrapFocusDirective implements AfterContentInit, OnDestroy {\n private removeFocusListener: () => void;\n\n constructor(\n private ngZone: NgZone,\n private el: ElementRef\n ) {}\n\n ngAfterContentInit(): void {\n this.ngZone.runOutsideAngular(() => {\n const keyDownListener = (event: KeyboardEvent): void => {\n return this.ngZone.run(() => {\n this.onKeyDown(event);\n });\n };\n\n this.el.nativeElement.addEventListener('keydown', keyDownListener);\n\n this.removeFocusListener = () => {\n this.el.nativeElement.removeEventListener('keydown', keyDownListener);\n };\n });\n }\n\n ngOnDestroy(): void {\n this.cleanUpEventHandlers();\n }\n\n onKeyDown(event: KeyboardEvent): void {\n if (!this.el.nativeElement) {\n return;\n }\n if (!(event.target instanceof Element)) {\n return;\n }\n\n const focusSelector = 'button, [href], input, select, textarea, [tabindex]';\n const focusableElements: Element[] = Array.from(\n (this.el.nativeElement as HTMLElement).querySelectorAll(focusSelector)\n )\n .filter((e) => e instanceof HTMLElement)\n .filter((e: HTMLElement) => !isPresent(e.getAttribute('disabled')) && e.getAttribute('tabindex') !== '-1')\n .filter((e: HTMLElement) => elementIsVisible(e, true));\n\n // shift + tab key\n // reverse focus\n if (KeyCodes.TAB === getKeyCodeFromEvent(event) && event.shiftKey && focusableElements.length > 0) {\n const maxIndex = focusableElements.length - 1;\n event.preventDefault();\n const index = focusableElements.findIndex((element) => element === event.target);\n const indexToFocus = index !== 0 ? index - 1 : maxIndex;\n (focusableElements[indexToFocus] as HTMLElement).focus();\n }\n // tab key\n // forward focus\n else if (\n KeyCodes.TAB === getKeyCodeFromEvent(event) &&\n focusableElements.length > 0 &&\n focusableElements[focusableElements.length - 1] === event.target\n ) {\n event.preventDefault();\n (focusableElements[0] as HTMLElement).focus();\n }\n }\n\n private cleanUpEventHandlers(): void {\n if (this.removeFocusListener) {\n this.removeFocusListener();\n this.removeFocusListener = undefined;\n }\n }\n}\n","/* eslint-disable camelcase */\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { BreadcrumbItem, CmsPageComponentMetaData } from '@fcom/common';\n\nimport { LoginStatus, ProfileTier } from '../login';\n\n// FIXME: split CMS specific interfaces to cms module\nexport enum CmsContentType {\n CMRelated = 'CMP13NSearch',\n CMChannel = 'CMChannel',\n CMArticle = 'CMArticle',\n CMCollection = 'CMCollection',\n CMExternalLink = 'CMExternalLink',\n CMPicture = 'CMPicture',\n CMPersonalized = 'CMSelectionRules',\n CMPlaceholder = 'CMPlaceholder',\n CMQueryList = 'CMQueryList',\n CMTeaser = 'CMTeaser',\n CMVideo = 'CMVideo',\n FICategory = 'FICategory',\n FIDestination = 'FIDestination',\n FIOffer = 'FIOffer',\n FIMenuFoodItem = 'FIMenuFoodItem',\n}\n\nexport enum CmsViewType {\n ACCORDION = 'accordion',\n ACCORDION_WITH_PICTURES = 'accordion-with-pictures',\n ARTICLE_COLLECTION = 'article-collection',\n ARTICLES_WITH_ICONS = 'articles-with-icons',\n BRAND_LANDING_PAGE_FOOTER = 'brand-landing-page-footer',\n BRAND_LANDING_PAGE_HERO = 'brand-landing-page-hero',\n BLOCK_OFFER = 'block-offer',\n BLUEWINGS_CLUSTER_HERO = 'bluewings-cluster-hero',\n CAROUSEL = 'carousel',\n COLLAPSE_RELATED_CONTENT = 'collapse-related-content',\n CONDITIONAL_ACCORDION = 'conditional-accordion',\n CONTENT_DROPDOWN = 'content-switcher-dropdown',\n CONTENT_TABS = 'content-switcher-tabs',\n CORPORATE_CONTACT_FORM = 'corporate-contact-form',\n CTA_WITH_IMAGE_AND_TEXT = 'cta-with-image-and-text',\n CTA_BIG_LINK = 'cta-big-link',\n CTA_LINK = 'cta-link',\n DECORATED_HEADING = 'decorated-heading',\n DESCRIPTIVE_LINK_LIST = 'descriptive-link-list',\n DESTINATIONS_SEARCH = 'destinations-search',\n DISCLAIMER = 'disclaimer-block',\n DISRUPTIONS = 'disruptions',\n DISRUPTION_LEVEL_1 = 'disruption-level-1',\n DISRUPTION_LEVEL_2 = 'disruption-level-2',\n DISRUPTION_LEVEL_3 = 'disruption-level-3',\n DISRUPTION_LEVEL_4 = 'disruption-level-4',\n FRONT_PAGE_ARTICLES = 'front-page-articles',\n FRONT_PAGE_DISRUPTIONS = 'front-page-disruptions',\n FRONT_PAGE_LINKS = 'front-page-links',\n FRONT_PAGE_OFFER = 'front-page-offer',\n GIFT_CARD_INFORMATION_FORM = 'gift-card-information-form',\n HERO = 'hero',\n HIGHLIGHT_LIST = 'highlight-list',\n HORIZONTAL_RULER = 'horizontal-ruler',\n HORIZONTAL_TITLE = 'horizontal-title',\n ICON_WITH_TEXT = 'icon-with-text',\n IMAGE_BANNER = 'image-banner',\n IMAGE_RIGHT_BANNER = 'image-right-banner',\n IMAGE_GRID_BANNER = 'image-grid-banner',\n INTRODUCTION_BANNER = 'introduction-banner',\n ITEMS = 'items',\n JOIN_CORPORATE_FORM = 'join-corporate-form',\n LINK_BLOCK = 'link',\n LINK_LIST_WITH_ICONS = 'link-list-with-icons',\n LIST_WITH_ICONS = 'list-with-icons',\n LIST_WITH_ICONS_TEASERTEXT = 'list-with-icons-teasertext',\n LIST_WITH_HEADING = 'list-with-heading',\n OFFERS_GRID = 'offers-grid',\n OND_OFFERS_LIST = 'ond-offers-list',\n OND_CROSSLINKING = 'ond-crosslinking',\n OND_OFFERS = 'ond-offers',\n SAF_DOWNLOADABLE_FORM = 'saf-downloadable-form',\n SHOW_MORE = 'show-more',\n TEXT_LINK = 'text-link',\n TEXT_ON_IMAGE = 'text-on-image',\n TEXT_ON_VIDEO = 'text-on-video',\n TEXT_WITH_SIDE_IMAGE = 'text-with-side-image',\n TRAVEL_GUIDE = 'travel-guide',\n BADGE = 'badge',\n SECTION_NAVI = 'section-one-third-left--navi',\n UNIQUE_SELLING_POINT = 'front-page-usps',\n TEASER_CAROUSEL = 'teaser-carousel',\n MAIN_ARTICLE = 'main-article',\n BACK_LINK = 'back-link',\n TEASER_LIST = 'teaser-list',\n BLUEWINGS_ARTICLE = 'bluewings-article',\n CHILD_ARTICLE = 'child-article',\n TEASER_LIST_HIGHLIGHT = 'teaser-list-highlight',\n TAG_LIST = 'tag-list',\n RELATED_LIST = 'related-list',\n LOCATION_BANNER = 'location-banner',\n INFORMATIONAL_TEASER = 'informational-teaser',\n RADIO_COLLECTION = 'radio-collection',\n DESTINATION_SEARCH_HERO = 'destination-search-hero',\n RETRIEVE_PAGE_CONTENT = 'retrieve-page-content',\n TRAVEL_RESTRICTIONS = 'smartvel-travel-restrictions',\n FULL_WIDTH_BOOKING_WIDGET = 'full-width-booking-widget',\n DESTINATION_TITLE = 'destination-title',\n TRENDING_DESTINATIONS = 'trending-destinations',\n NEWSLETTER_SIGNUP_FORM = 'newsletter-signup-form',\n VAT_RECEIPT_FORM = 'vat-ticket-receipt-form',\n CASE_ATTACHMENT_FORM = 'case-attachments-form',\n POPUP = 'popup',\n COLLECTION_ARROW_LINKS = 'arrow-links-collection',\n COLLECTION_NEWS_FEED = 'news-feed-collection',\n QUICK_LINKS = 'quick-links',\n COLLECTION_CONTENT_IN_GRID_LAYOUT = 'content-in-grid-layout-collection',\n EMERGENCY_IN_OPERATIONS_ARTICLE = 'emergency-in-operations-article',\n MARKETING_ACTIVITY_BLOCKS = 'marketing-activity-blocks',\n}\n\nexport enum TemplateName {\n CMS_DESTINATION_HERO = 'cms-destination-hero',\n CMS_TRAVEL_GUIDE = 'cms-travel-guide',\n CMS_ITEMS = 'cms-items',\n}\n\nexport enum CmsViewTypeWithGrid {\n SECTION_FULL_BLEED_OVERLAY = 'section-full-bleed--overlay',\n SECTION_FULL_WIDTH = 'section-full-width',\n SECTION_FULL_WIDTH_DECORATED_HEADING = 'section-full-width--decorated-heading',\n SECTION_FULL_WIDTH_FRONT_PAGE_USPS = 'section-full-width--front-page-usps',\n SECTION_FULL_WIDTH_FRONT_PAGE_ARTICLES = 'section-full-width--front-page-articles',\n SECTION_FULL_WIDTH_FRONT_PAGE_DISRUPTIONS = 'section-full-width--front-page-disruptions',\n SECTION_FULL_WIDTH_FRONT_PAGE_LINKS = 'section-full-width--front-page-links',\n SECTION_FULL_WIDTH_OFFERS_GRID = 'section-full-width--offers-grid',\n SECTION_FULL_WIDTH_OVERLAY = 'section-full-width--overlay',\n SECTION_FULL_WIDTH_TEXT_LINK = 'section-full-width--text-link',\n SECTION_ONE_THIRD_LEFT = 'section-one-third-left',\n SECTION_ONE_THIRD_LEFT_NAVI = 'section-one-third-left--navi',\n SECTION_ONE_THIRD_RIGHT = 'section-one-third-right',\n SECTION_TWO_THIRDS_RIGHT = 'section-two-thirds-right',\n SECTION_TWO_THIRDS_RIGHT_ACCORDION = 'section-two-thirds-right--accordion',\n SECTION_TWO_THIRDS_RIGHT_BADGE = 'section-two-thirds-right--badge',\n SECTION_TWO_THIRDS_RIGHT_CONDITIONAL_ACCORDION = 'section-two-thirds-right--conditional-accordion',\n SECTION_TWO_THIRDS_RIGHT_CTA_BIG_LINK = 'section-two-thirds-right--cta-big-link',\n SECTION_TWO_THIRDS_RIGHT_CTA_LINK = 'section-two-thirds-right--cta-link',\n SECTION_TWO_THIRDS_RIGHT_DISCLAIMER_BLOCK = 'section-two-thirds-right--disclaimer-block',\n SECTION_TWO_THIRDS_RIGHT_ICON_WITH_TEXT = 'section-two-thirds-right--icon-with-text',\n SECTION_TWO_THIRDS_RIGHT_LINK = 'section-two-thirds-right--link',\n SECTION_TWO_THIRDS_RIGHT_OVERLAY = 'section-two-thirds-right--overlay',\n SECTION_TWO_THIRDS_RIGHT_SEPARATOR = 'section-two-thirds-right--separator',\n SECTION_TWO_THIRDS_RIGHT_SPECIAL_ASSISTANCE_FORM = 'section-two-thirds-right--special-assistance-form',\n}\n\nexport enum CmsFormType {\n BAGGAGE_TRACING_FORM = 'baggage-tracing-form',\n CANCELLATION_COVER_CLAIM_FORM = 'cancellation-cover-claim-form',\n CASE_ATTACHMENT_FORM = 'case-attachments-form',\n CERTIFICATES_FOR_INSURANCE_COMPANY_FORM = 'certificates-for-insurance-company-form',\n CLAIM_MISSING_PARTNER_POINTS_FORM = 'claim-missing-partner-points-form',\n CLAIM_MISSING_POINTS_FORM = 'claim-missing-points-form',\n CORPORATE_CONTACT_FORM = 'corporate-contact-form',\n E_TICKET_RECEIPT_FORM = 'e-ticket-receipt-form',\n GIFT_CARD_INFORMATION_FORM = 'gift-card-information-form',\n JOIN_CORPORATE_FORM = 'join-corporate-form',\n REFUND_FORM = 'refund-form',\n REFUND_STATUS_CHECKER_FORM = 'refund-status-checker-form',\n SAF_DOWNLOADABLE_FORM = 'saf-downloadable-form',\n SPECIAL_ASSISTANCE_FORM = 'special-assistance-form',\n SPECIAL_ASSISTANCE_WIZARD = 'special-assistance-wizard',\n VAT_RECEIPT_FORM = 'vat-ticket-receipt-form',\n}\n\nexport enum PageViewType {\n SECTION_PAGE_WITH_TITLE = 'section-page-with-title',\n SECTION_PAGE_EXTERNAL_TEMPLATE = 'section-page-external-template',\n DESTINATION_PAGE = 'destination-page',\n NO_GRID_FULL_WIDTH_PAGE = 'no-grid-full-width-page',\n NO_GRID_FULL_WIDTH_PAGE_WITH_TITLE = 'no-grid-full-width-page-with-title',\n EDITORIAL_LANDING_PAGE = 'editorial-landing-2020',\n EDITORIAL_CATEGORY_PAGE = 'editorial-category-2020',\n BLUEWINGS_CLUSTER_LP = 'bluewings-cluster-2025',\n BLUEWINGS_LANDING_PAGE = 'bluewings-landing-2020',\n FORM_WIZARD_PAGE = 'form-wizard',\n CHILD_PAGE = 'child-page-2020',\n CHILD_PAGE_NO_HEADING = 'child-page-2020-no-heading',\n PREMIUM_ECONOMY_LANDING_PAGE_2021 = 'premium-economy-landing-page-2021',\n EMERGENCY_IN_OPERATIONS = 'emergency-in-operations',\n}\n\nexport enum CmsTaxonomyGeneral {\n ARROW_LINK = 'cmstyle-arrow-link',\n BANNER_LARGE_SLOGAN = 'cmstyle-banner-large-slogan',\n BLUEWINGS_CHIPS = 'cmsetting-bluewings-chips',\n BUTTON_LINK = 'cmstyle-button-link',\n CENTERED = 'cmstyle-centered',\n CHECKED_LIST = 'cmstyle-checked-list',\n ROUNDED_TABLE = 'cmstyle-rounded-table',\n NO_TITLE = 'cmsetting-no-title',\n NO_SECTION_MARKER = 'cmstyle-no-section-marker',\n NO_PADDING = 'cmstyle-no-padding',\n ICE_10_BG = 'cmstyle-ice-10-bg',\n SECTION = 'cmstyle-section',\n SECTION_ONE_THIRD_LEFT = 'cmstyle-section-one-third-left',\n SECTION_ONE_THIRD_RIGHT = 'cmstyle-section-one-third-right',\n SECTION_TWO_THIRDS_RIGHT = 'cmstyle-section-two-thirds-right',\n SECTION_ONE_FOURTH_LEFT = 'cmstyle-section-one-fourth-left',\n SECTION_ONE_FOURTH_RIGHT = 'cmstyle-section-one-fourth-right',\n SECTION_THREE_FOURTHS_RIGHT = 'cmstyle-section-three-fourths-right',\n SHOW_FOR_LOGGED_IN = 'cmsetting-logged-in',\n SHOW_FOR_NOT_LOGGED_IN = 'cmsetting-not-logged-in',\n SHOW_FOR_LOGGED_IN_PLUS = 'cmsetting-logged-in-plus',\n HIDE_FROM_MAIN_MENU = 'cmsetting-navi-hide-from-main-menu',\n HIDE_FROM_SECTION_NAVI = 'cmsetting-navi-hide-from-section-navi',\n BREADCRUMB_APPLICATION_OVERRIDE = 'cmsetting-navi-breadcrumb-application-override',\n BLACK_FRIDAY = 'cmstyle-black-friday',\n SHOW_FOR_BASIC_TIER = 'cmsetting-tier-basic',\n SHOW_FOR_SILVER_TIER = 'cmsetting-tier-silver',\n SHOW_FOR_GOLD_TIER = 'cmsetting-tier-gold',\n SHOW_FOR_PLATINUM_TIER = 'cmsetting-tier-platinum',\n SHOW_FOR_PLATINUM_LUMO_TIER = 'cmsetting-tier-lumo',\n SHOW_FOR_JUNIOR_TIER = 'cmsetting-tier-junior',\n QUERY_LIST_TEASER_STYLE = 'cmsetting-query-list-teaser-style',\n NORDIC_BLUE_50_BG = 'nordic-blue-50-bg',\n NORDIC_BLUE_100_BG = 'nordic-blue-100-bg',\n NORDIC_BLUE_900_BG = 'nordic-blue-900-bg',\n HEATHER_BG = 'finnair-heather-bg',\n HEADER_LEVEL_1 = 'header-level-1',\n HEADER_LEVEL_2 = 'header-level-2',\n HEADER_LEVEL_3 = 'header-level-3',\n HEADER_LEVEL_4 = 'header-level-4',\n HEADER_LEVEL_5 = 'header-level-5',\n HEADER_LEVEL_6 = 'header-level-6',\n ASPECT_RATIO_1X1 = 'cmstyle-image-aspect-ratio-1x1',\n ASPECT_RATIO_3X4 = 'cmstyle-image-aspect-ratio-3x4',\n ASPECT_RATIO_4X3 = 'cmstyle-image-aspect-ratio-4x3',\n ASPECT_RATIO_16X9 = 'cmstyle-image-aspect-ratio-16x9',\n ASPECT_RATIO_21X9 = 'cmstyle-image-aspect-ratio-21x9',\n LINK_NOFOLLOW = 'cms-link-nofollow',\n TRAVEL_UPDATE_UPDATED = 'travel-update-updated',\n FONT_HEADING_1 = 'font-heading-1',\n FONT_HEADING_2 = 'font-heading-2',\n FONT_HEADING_3 = 'font-heading-3',\n FONT_HEADING_4 = 'font-heading-4',\n FONT_HEADING_5 = 'font-heading-5',\n TEXT_LINK_LEFT_LIST = 'cmsetting-text-link-left-list',\n QUERY_TEASER_LIST_THIRD = 'cmsetting-query-teaser-list-third',\n QUERY_LIST_NEWS_COLLECTION = 'cmsetting-query-list-news-collection',\n EMERGENCY_IN_OPERATIONS = 'emergency-in-operations',\n EMERGENCY_IN_OPERATIONS_COMPANY = 'cmsetting-darksite-link-to-fg',\n EMERGENCY_IN_OPERATIONS_UPDATED = 'emergency-in-operations-updated',\n}\n\nexport enum CmsTaxonomyPicture {\n FINNAIR_AVIOS_LOGO = 'finnair-avios-logo', // Deprecated, use keyline versions instead\n FINNAIR_AVIOS_KEYLINE_WHITE = 'avios-keyline-white',\n FINNAIR_AVIOS_KEYLINE_NAVY = 'avios-keyline-navy',\n FINNAIR_ONEWORLD_LOGO = 'finnair-oneworld-logo',\n FINNAIR_ONEWORLD_GEM_EMERALD_LOGO = 'finnair-oneworld-gem-emerald-logo',\n FINNAIR_ONEWORLD_GEM_RUBY_LOGO = 'finnair-oneworld-gem-ruby-logo',\n FINNAIR_ONEWORLD_GEM_SAPPHIRE_LOGO = 'finnair-oneworld-gem-sapphire-logo',\n}\n\nexport type CmsTaxonomy = CmsTaxonomyGeneral | CmsTaxonomyPicture;\n\nexport type HtmlString = string;\n\nexport interface CmsPage {\n template: string;\n title: string;\n seoTitle: string;\n teaserTitle: string;\n contentType: CmsContentType;\n teaserText?: string;\n contentContentType?: CmsContentType;\n navigationContentType?: CmsContentType;\n isHeaderVisible?: boolean;\n isFooterVisible?: boolean;\n defaultOriginLocationCode: string | null;\n metaData: CmsPageComponentMetaData[];\n viewTypeName?: PageViewType;\n navigationPathList?: BreadcrumbItem[];\n oneworld?: BreadcrumbItem;\n subjectTaxonomyTags?: CmsTaxonomy[];\n}\n\ninterface CmsContentBase {\n contentContentType?: CmsContentType;\n contentId: number;\n contentType: CmsContentType;\n creationDate?: number;\n customPlacement?: string;\n detailText?: HtmlString;\n externallyDisplayedDate?: number;\n gridClass?: string;\n jsonUrl?: string;\n localSettings?: any;\n main?: boolean;\n modificationDate?: number;\n navigationContentType?: CmsContentType;\n navigationPathList?: BreadcrumbItem[];\n oneworld?: BreadcrumbItem;\n personalizationParameters?: CmsPersonalizationParameterValue[];\n picture?: CmsImageData;\n previewPicture?: CmsImageData;\n related?: CmsContent[];\n segment?: string;\n showForLoginStatus?: LoginStatus;\n showForProfileTiers?: ProfileTier[];\n state?: string;\n subjectTaxonomyTags: CmsTaxonomy[];\n target?: CmsTarget;\n teaserText?: HtmlString;\n teaserTitle?: string;\n template?: string;\n title?: string;\n url?: string;\n version?: number;\n viewType?: CmsViewType;\n viewTypeName: CmsViewType | CmsViewTypeWithGrid | PageViewType | CmsFormType | null;\n masterContentId?: number;\n headerLevel?: number;\n firstMedia?: CmsLink;\n}\n\nexport interface CmsContent extends CmsContentBase {\n items?: CmsContent[];\n}\n\nexport interface CmsCollection<T = CmsContent> extends CmsContentBase {\n items: T[];\n contentType: CmsContentType.CMCollection;\n}\n\nexport type CMSelectionRules<T extends CmsContent = CmsContent> = CmsCollection<T>;\n\nexport interface CmsTab {\n title: string;\n picture?: CmsImageData | null;\n iconUrl: string | null;\n content: CmsContent;\n}\n\nexport interface CmsTabsCollection extends CmsCollection {\n tabs: CmsTab[];\n}\n\nexport interface CmsTemplate {\n header: (CmsPage | CmsContent | CmsCollection)[];\n main: (CmsContent | CmsCollection)[];\n footer: (CmsContent | CmsCollection)[];\n status?: number;\n}\n\nexport interface StaticPicture {\n thumbnailSrc?: string;\n fullSizeUrl?: string;\n}\n\nexport interface CmsVideo extends CmsContent {\n dataUrl: string;\n}\n\nexport interface CmsPicture extends CmsImageData {\n dataUrl?: never;\n}\n\nexport interface CmsImageData extends CmsContent {\n /**\n * The alt text for <img/> tags\n */\n alt: string;\n\n /**\n * URL strings for different\n */\n responsiveImageLinksData?: {\n landscape_ratio16x9: { [widthPx: number]: string };\n landscape_ratio4x3: { [widthPx: number]: string };\n landscape_ratio21x9: { [widthPx: number]: string };\n portrait_ratio1x1: { [widthPx: number]: string };\n };\n\n data?: string;\n width?: number;\n height?: number;\n disableCropping?: boolean;\n\n error?: string;\n}\n\nexport type CmsMedia = CmsPicture | CmsVideo;\n\nexport interface CmsDestination extends CmsContent {\n title: string;\n htmlTitle: string;\n timeZoneOffset: number;\n numberOfFlights: string;\n flightDuration: string;\n currency: string;\n localSettings: {\n temperature: number[];\n rainfall: number[];\n };\n picture: CmsImageData;\n defaultLocation: any;\n locationCode?: string;\n}\n\nexport interface CmsTarget {\n title?: string;\n teaserTitle?: string;\n url: string;\n external: boolean;\n locationCode?: string;\n openInNewTab?: boolean;\n jsonUrl?: string;\n}\n\nexport interface CmsPromo extends CmsContent {\n picture: CmsImageData;\n target?: CmsTarget;\n teaserTitle: string;\n teaserText: string;\n title: string;\n}\n\nexport interface CmsOffer extends CmsPromo {\n price: number;\n flag: string;\n booking: string;\n url?: string;\n campaignId?: string;\n defaultLocationCode?: string;\n}\n\nexport interface CmsTeaser extends CmsContent {\n contentType: CmsContentType.CMTeaser;\n teaserTitle: string;\n teaserText: HtmlString;\n iconUrl?: string;\n picture?: CmsImageData;\n target?: CmsTarget;\n linkText?: string;\n openInNewTab?: boolean;\n}\n\nexport interface CmsDisclaimer extends CmsTeaser {\n target?: CmsTarget;\n backgroundColor: 'heather-50' | 'nordic-blue-50' | null;\n svgIcon?: SvgLibraryIcon;\n}\n\nexport interface CmsArticle extends CmsContent {\n anchors?: any[];\n contentType: CmsContentType.CMArticle;\n teaserTitle: string;\n teaserText: HtmlString;\n media: CmsMedia[];\n related: any[];\n detailText: HtmlString;\n}\n\nexport interface CmsEditorialArticle extends CmsArticle {\n authors: any[];\n externallyDisplayedDate: number;\n detailTextItems?: any[];\n}\n\nexport interface CmsContentWithDestination extends CmsContent {\n destination: CmsDestination;\n}\n\n// TODO: remove/merge to DAPI once server returns these details\nexport interface CmsProductMeal extends CmsProductBase {\n /** Non-HTML short description of the product */\n teaserTitle: string;\n /** HTML content describing the ingredients. Does not contain title. */\n ingredients: string;\n /** HTML content describing the nutrition facts. Contains title. */\n nutrition: string;\n /** meal categories, e.g. low-lactose. These need to be translated. */\n itemCategory: string[];\n /** meal allergens, e.g. nuts. These need to be translated. */\n allergens: string[];\n}\n\nexport interface CmsMenuFoodItem extends CmsContent {\n teaserTitle: string;\n ingredients: string;\n nutrition: string;\n itemCategory: string[];\n allergens: string[];\n}\n\nexport interface CmsPlaceholder extends CmsContent {\n contentType: CmsContentType.CMPlaceholder;\n id: string;\n}\n\nexport interface CmsProductWithName extends CmsProductBase {\n /** product description */\n productName: string;\n}\n\nexport type CmsProduct = CmsProductMeal | CmsProductWithName;\n\nexport interface CmsProductBase {\n /** Same as search code */\n productCode: string;\n /** product description */\n title: string;\n /** Responsive images */\n media: CmsMedia[];\n}\n\nexport interface CmsQueryListItem extends CmsContent {\n externallyDisplayedDate: number;\n subjectTaxonomyTags: CmsTaxonomy[];\n teaserText: HtmlString;\n teaserTitle: string;\n url: string;\n media: CmsMedia[];\n localSettings?: unknown;\n}\n\nexport interface CmsQueryList extends CmsContent {\n items: CmsQueryListItem[];\n numberOfPages?: number;\n}\n\n/* eslint-disable @typescript-eslint/no-duplicate-enum-values */\nexport enum CmsDocumentType {\n MEAL = 'FIMenuFoodItem',\n SPECIALDIET = 'FIMenuFoodItem',\n WIFI = 'FIProduct',\n LOUNGE = 'FIProduct',\n COVER = 'FIProduct',\n TRAVELCOMFORT = 'FIProduct',\n}\n/* eslint-enable @typescript-eslint/no-duplicate-enum-values */\n\nexport interface CmsLink {\n contentId: number;\n jsonUrl: string;\n}\n\nenum PersonalizationParameter {\n TIER = 'tier',\n GROUP = 'group',\n}\n\nexport enum CreditCardPersonalizationParameter {\n AKTIA_CREDIT_CARD = 'aktiavisacreditcard',\n AKTIA_LIGHT_CREDIT_CARD = 'aktiavisalightcreditcard',\n}\n\n// Only used for core media preview mechanics\nenum CmsPreviewPersonalizationParameter {\n P13N_TEST = 'p13n_test',\n P13N_TEST_CONTEXT = 'p13n_testcontext',\n PREVIEW_DATE = 'previewDate',\n}\nexport const CmsPersonalizationParameter = {\n ...PersonalizationParameter,\n ...CreditCardPersonalizationParameter,\n ...CmsPreviewPersonalizationParameter,\n};\nexport type CmsPersonalizationParameterValue =\n `${(typeof CmsPersonalizationParameter)[keyof typeof CmsPersonalizationParameter]}`;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBindBasic = require('call-bind-apply-helpers');\n\n/** @type {(thisArg: string, searchString: string, position?: number) => number} */\nvar $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);\n\n/** @type {import('.')} */\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\t// eslint-disable-next-line no-extra-parens\n\tvar intrinsic = /** @type {Parameters<typeof callBindBasic>[0][0]} */ (GetIntrinsic(name, !!allowMissing));\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBindBasic([intrinsic]);\n\t}\n\treturn intrinsic;\n};\n","import { switchMap } from './switchMap';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { isFunction } from '../util/isFunction';\n\n/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */\nexport function switchMapTo<O extends ObservableInput<unknown>>(observable: O): OperatorFunction<unknown, ObservedValueOf<O>>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function switchMapTo<O extends ObservableInput<unknown>>(\n observable: O,\n resultSelector: undefined\n): OperatorFunction<unknown, ObservedValueOf<O>>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function switchMapTo<T, R, O extends ObservableInput<unknown>>(\n observable: O,\n resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R\n): OperatorFunction<T, R>;\n\n/**\n * Projects each source value to the same Observable which is flattened multiple\n * times with {@link switchMap} in the output Observable.\n *\n * <span class=\"informal\">It's like {@link switchMap}, but maps each value\n * always to the same inner Observable.</span>\n *\n * ![](switchMapTo.png)\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then flattens those resulting Observables into one\n * single Observable, which is the output Observable. The output Observables\n * emits values only from the most recently emitted instance of\n * `innerObservable`.\n *\n * ## Example\n *\n * Restart an interval Observable on every click event\n *\n * ```ts\n * import { fromEvent, switchMapTo, interval } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(switchMapTo(interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMapTo}\n * @see {@link switchAll}\n * @see {@link switchMap}\n * @see {@link mergeMapTo}\n *\n * @param innerObservable An `ObservableInput` to replace each value from the\n * source Observable.\n * @return A function that returns an Observable that emits items from the\n * given `innerObservable` (and optionally transformed through the deprecated\n * `resultSelector`) every time a value is emitted on the source Observable,\n * and taking only the values from the most recently projected inner\n * Observable.\n * @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)`\n */\nexport function switchMapTo<T, R, O extends ObservableInput<unknown>>(\n innerObservable: O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R\n): OperatorFunction<T, ObservedValueOf<O> | R> {\n return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable);\n}\n","import { MonoTypeOperatorFunction, Observer } from '../types';\nimport { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\n\n/**\n * An extension to the {@link Observer} interface used only by the {@link tap} operator.\n *\n * It provides a useful set of callbacks a user can register to do side-effects in\n * cases other than what the usual {@link Observer} callbacks are\n * ({@link guide/glossary-and-semantics#next next},\n * {@link guide/glossary-and-semantics#error error} and/or\n * {@link guide/glossary-and-semantics#complete complete}).\n *\n * ## Example\n *\n * ```ts\n * import { fromEvent, switchMap, tap, interval, take } from 'rxjs';\n *\n * const source$ = fromEvent(document, 'click');\n * const result$ = source$.pipe(\n * switchMap((_, i) => i % 2 === 0\n * ? fromEvent(document, 'mousemove').pipe(\n * tap({\n * subscribe: () => console.log('Subscribed to the mouse move events after click #' + i),\n * unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'),\n * finalize: () => console.log('Mouse move events #' + i + ' finalized')\n * })\n * )\n * : interval(1_000).pipe(\n * take(5),\n * tap({\n * subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i),\n * unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'),\n * finalize: () => console.log('1-second interval events #' + i + ' finalized')\n * })\n * )\n * )\n * );\n *\n * const subscription = result$.subscribe({\n * next: console.log\n * });\n *\n * setTimeout(() => {\n * console.log('Unsubscribe after 60 seconds');\n * subscription.unsubscribe();\n * }, 60_000);\n * ```\n */\nexport interface TapObserver<T> extends Observer<T> {\n /**\n * The callback that `tap` operator invokes at the moment when the source Observable\n * gets subscribed to.\n */\n subscribe: () => void;\n /**\n * The callback that `tap` operator invokes when an explicit\n * {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on\n * `error` or `complete` events.\n */\n unsubscribe: () => void;\n /**\n * The callback that `tap` operator invokes when any kind of\n * {@link guide/glossary-and-semantics#finalization finalization} happens - either when\n * the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed\n * by the user. There is no difference in using this callback or the {@link finalize}\n * operator, but if you're already using `tap` operator, you can use this callback\n * instead. You'd get the same result in either case.\n */\n finalize: () => void;\n}\nexport function tap<T>(observerOrNext?: Partial<TapObserver<T>> | ((value: T) => void)): MonoTypeOperatorFunction<T>;\n/** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\nexport function tap<T>(\n next?: ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n): MonoTypeOperatorFunction<T>;\n\n/**\n * Used to perform side-effects for notifications from the source observable\n *\n * <span class=\"informal\">Used when you want to affect outside state with a notification without altering the notification</span>\n *\n * ![](tap.png)\n *\n * Tap is designed to allow the developer a designated place to perform side effects. While you _could_ perform side-effects\n * inside of a `map` or a `mergeMap`, that would make their mapping functions impure, which isn't always a big deal, but will\n * make it so you can't do things like memoize those functions. The `tap` operator is designed solely for such side-effects to\n * help you remove side-effects from other operations.\n *\n * For any notification, next, error, or complete, `tap` will call the appropriate callback you have provided to it, via a function\n * reference, or a partial observer, then pass that notification down the stream.\n *\n * The observable returned by `tap` is an exact mirror of the source, with one exception: Any error that occurs -- synchronously -- in a handler\n * provided to `tap` will be emitted as an error from the returned observable.\n *\n * > Be careful! You can mutate objects as they pass through the `tap` operator's handlers.\n *\n * The most common use of `tap` is actually for debugging. You can place a `tap(console.log)` anywhere\n * in your observable `pipe`, log out the notifications as they are emitted by the source returned by the previous\n * operation.\n *\n * ## Examples\n *\n * Check a random number before it is handled. Below is an observable that will use a random number between 0 and 1,\n * and emit `'big'` or `'small'` depending on the size of that number. But we wanted to log what the original number\n * was, so we have added a `tap(console.log)`.\n *\n * ```ts\n * import { of, tap, map } from 'rxjs';\n *\n * of(Math.random()).pipe(\n * tap(console.log),\n * map(n => n > 0.5 ? 'big' : 'small')\n * ).subscribe(console.log);\n * ```\n *\n * Using `tap` to analyze a value and force an error. Below is an observable where in our system we only\n * want to emit numbers 3 or less we get from another source. We can force our observable to error\n * using `tap`.\n *\n * ```ts\n * import { of, tap } from 'rxjs';\n *\n * const source = of(1, 2, 3, 4, 5);\n *\n * source.pipe(\n * tap(n => {\n * if (n > 3) {\n * throw new TypeError(`Value ${ n } is greater than 3`);\n * }\n * })\n * )\n * .subscribe({ next: console.log, error: err => console.log(err.message) });\n * ```\n *\n * We want to know when an observable completes before moving on to the next observable. The system\n * below will emit a random series of `'X'` characters from 3 different observables in sequence. The\n * only way we know when one observable completes and moves to the next one, in this case, is because\n * we have added a `tap` with the side effect of logging to console.\n *\n * ```ts\n * import { of, concatMap, interval, take, map, tap } from 'rxjs';\n *\n * of(1, 2, 3).pipe(\n * concatMap(n => interval(1000).pipe(\n * take(Math.round(Math.random() * 10)),\n * map(() => 'X'),\n * tap({ complete: () => console.log(`Done with ${ n }`) })\n * ))\n * )\n * .subscribe(console.log);\n * ```\n *\n * @see {@link finalize}\n * @see {@link TapObserver}\n *\n * @param observerOrNext A next handler or partial observer\n * @param error An error handler\n * @param complete A completion handler\n * @return A function that returns an Observable identical to the source, but\n * runs the specified Observer or callback(s) for each item.\n */\nexport function tap<T>(\n observerOrNext?: Partial<TapObserver<T>> | ((value: T) => void) | null,\n error?: ((e: any) => void) | null,\n complete?: (() => void) | null\n): MonoTypeOperatorFunction<T> {\n // We have to check to see not only if next is a function,\n // but if error or complete were passed. This is because someone\n // could technically call tap like `tap(null, fn)` or `tap(null, null, fn)`.\n const tapObserver =\n isFunction(observerOrNext) || error || complete\n ? // tslint:disable-next-line: no-object-literal-type-assertion\n ({ next: observerOrNext as Exclude<typeof observerOrNext, Partial<TapObserver<T>>>, error, complete } as Partial<TapObserver<T>>)\n : observerOrNext;\n\n return tapObserver\n ? operate((source, subscriber) => {\n tapObserver.subscribe?.();\n let isUnsub = true;\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n tapObserver.next?.(value);\n subscriber.next(value);\n },\n () => {\n isUnsub = false;\n tapObserver.complete?.();\n subscriber.complete();\n },\n (err) => {\n isUnsub = false;\n tapObserver.error?.(err);\n subscriber.error(err);\n },\n () => {\n if (isUnsub) {\n tapObserver.unsubscribe?.();\n }\n tapObserver.finalize?.();\n }\n )\n );\n })\n : // Tap was called with no valid tap observer or handler\n // (e.g. `tap(null, null, null)` or `tap(null)` or `tap()`)\n // so we're going to just mirror the source.\n identity;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { CarouselComponent } from './carousel.component';\n\n@NgModule({\n declarations: [CarouselComponent],\n imports: [CommonModule, IconsModule],\n exports: [CarouselComponent],\n})\nexport class CarouselModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule } from '@fcom/ui-components';\n\nimport { DirectiveModule } from '../../directives';\nimport { NavigationTriggerComponent } from './navigation/navigation-trigger/navigation-trigger.component';\nimport { ComponentsModule } from '../components.module';\nimport { PipesModule } from '../../pipes';\nimport { HeaderBoxesComponent } from './header-boxes.component';\n\n@NgModule({\n imports: [CommonModule, ComponentsModule, PipesModule, DirectiveModule, UiTranslateModule, IconsModule],\n declarations: [NavigationTriggerComponent, HeaderBoxesComponent],\n exports: [NavigationTriggerComponent, HeaderBoxesComponent],\n})\nexport class NavigationTriggerModule {}\n","import { getBookingStepLink } from '@fcom/common/utils/booking-common.utils';\nimport { isBlank, MILLIS_IN_HOUR, MILLIS_IN_MINUTE, pad, safeMap } from '@fcom/core/utils';\nimport { CmsOffer, CmsTaxonomy } from '@fcom/core-api';\nimport { AspectRatios } from '@fcom/ui-components';\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\n\nimport { BlockOfferData, Destination } from '../../interfaces';\n\nexport const offsetToTimeZone = (offsetMillis) => {\n const negative = offsetMillis < 0;\n const offset = Math.abs(offsetMillis);\n const hours = Math.floor(offset / MILLIS_IN_HOUR);\n const remainder = offset % MILLIS_IN_HOUR;\n const minutes = Math.floor(remainder / MILLIS_IN_MINUTE);\n if (hours === 0 && minutes === 0) {\n return 'UTC';\n }\n const timeStr = `UTC${negative ? '-' : '+'}${hours}`;\n if (minutes > 0) {\n return `${timeStr}:${pad(minutes)}`;\n }\n return timeStr;\n};\n\n/**\n * CMS destination (nestingDepth = 1) to destination\n */\nexport const toDestination: (obj: any) => Destination = ({\n currency,\n defaultLocation: {\n locationCode,\n geoLocation: { countryCode },\n },\n flightDuration,\n localSettings: { temperature, rainfall },\n numberOfFlights,\n picture,\n timeZoneOffset,\n title,\n htmlTitle,\n}) => ({\n avgRainfall: rainfall,\n avgTemperature: temperature,\n currencyCode: currency,\n flightDuration,\n imageData: picture,\n locationCode,\n countryCode,\n numberOfFlights,\n timeZoneOffset,\n timeZone: offsetToTimeZone(timeZoneOffset),\n title,\n htmlTitle,\n});\n\nexport const toOfferLink = (obj: any, lang: string): string => {\n if (obj.booking) {\n return getBookingStepLink(lang, BOOKING_STEPS.ENTRY, { destination: obj.booking });\n }\n return obj.url;\n};\n\nexport const toPromoBlock = (data: CmsOffer, lang?: string): BlockOfferData => {\n const link = data?.target?.url ? data.target.url : toOfferLink(data, lang);\n const title = data.title || data?.target?.title;\n // TODO: Make CMS return empty teaserTitle as CTA if left empty, not copy of the title\n const callToAction = data.teaserTitle === data.title ? null : data.teaserTitle;\n\n return {\n title: title,\n price: data.price,\n subtitle: data.teaserText,\n callToAction: callToAction,\n link: link,\n flag: data.flag,\n imageData: data.picture,\n destination: data.defaultLocationCode ?? resolveLocationCode(data),\n };\n\n function resolveLocationCode(cmsOffer: CmsOffer): string {\n if (isBlank(cmsOffer.booking)) {\n return safeMap(cmsOffer.target, (target) => target.locationCode);\n }\n return cmsOffer.booking;\n }\n};\n\nexport const toLinkData = (a: any) =>\n !a\n ? null\n : {\n title: a.teaserTitle || a.title,\n external: !!a.external,\n url: a.url,\n openInNewTab: !!a.openInNewTab,\n };\n\nexport const findAspectRatio = (tags: CmsTaxonomy[]): keyof typeof AspectRatios | undefined =>\n tags\n ? (Object.keys(AspectRatios).find(\n (aspectRatio) => tags.indexOf(('cmstyle-image-aspect-ratio-' + aspectRatio) as CmsTaxonomy) >= 0\n ) as keyof typeof AspectRatios)\n : undefined;\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable, throwError } from 'rxjs';\nimport { map, catchError } from 'rxjs/operators';\n\n@Injectable()\nexport class ExternalTemplateService {\n constructor(private http: HttpClient) {}\n\n loadExternalHtml(queryString: string): Observable<any> {\n return this.http.get(queryString, { responseType: 'text' }).pipe(\n map((response) => {\n if (response) {\n return response;\n }\n throw new Error('Error fetching external template');\n }),\n catchError((err: unknown) => {\n return throwError(() => err);\n })\n );\n }\n}\n","export enum LayoutVariant {\n A330 = 'A330_300_CONFIG1',\n A350 = 'A350_CONFIG1',\n}\n\nexport enum SceneVariant {\n economy = 'economy',\n ecopremium = 'ecopremium',\n business = 'business',\n galley = 'galley',\n main = 'main',\n}\n\nexport interface SeatMapVrConfig {\n destinationSelector: string;\n resource_cdn: string;\n ambientSound?: string;\n lang?: string;\n i18n?: Record<string, string>;\n error?: (code: string, desc: string) => void;\n onUserChangeScene?: () => void;\n onUserCloseViewer?: () => void;\n onUserMaximizeViewer?: () => void;\n onUserMove360?: () => void;\n onUserOpenInfo?: () => void;\n onUserMusicOn?: () => void;\n onUserMusicOff?: () => void;\n onUserLightsOn?: () => void;\n onUserLightsOff?: () => void;\n}\n\nexport interface SeatMapVrSceneConfig {\n layout: LayoutVariant;\n scene: SceneVariant;\n fullScreen?: boolean;\n mode?: number;\n}\n\nexport interface ISeatMapVr {\n config: (config: SeatMapVrConfig) => void;\n selectScene: (scene: SeatMapVrSceneConfig) => void;\n isInitialized: () => boolean;\n destroy: () => void;\n init: () => void;\n}\n","import { DOCUMENT, isPlatformBrowser, Location } from '@angular/common';\nimport { Inject, Injectable, OnDestroy, PLATFORM_ID } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { filter, map, take } from 'rxjs/operators';\nimport { Subscription } from 'rxjs';\n\nimport { ElementActions, ElementTypes, GaContext, ToasterService } from '@fcom/common';\nimport { GtmService } from '@fcom/common/gtm';\nimport { SentryLogger } from '@fcom/core';\nimport { NotificationTheme } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { ISeatMapVr, LayoutVariant, SceneVariant } from './interfaces';\n\ndeclare let SeatMapVr: ISeatMapVr;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class Cms3DSeatMapService implements OnDestroy {\n private containerId = 'seat-map-3d-view';\n /**\n * When script or style files are updated, new integrity hash needs to be calculated:\n * ´shasum -b -a 384 SeatMapVR3D.min.js | awk '{ print $1 }' | xxd -r -p | base64´\n * @private\n */\n private script = {\n id: '3d-seat-map-script',\n integrity: 'sha384-315sOhCRQO35BWpIbQthdje4pJnp5033TmUXFKzLch5NLVWWaFg7hIWsI462M/9P',\n url: 'https://finnair.3dseatmapvr.com/SeatMapVR3D/4.1.0/SeatMapVR3D.min.js',\n };\n private style = {\n id: '3d-seat-map-styles',\n integrity: 'sha384-bgQWp22XNBkuUDudFsd+vRbmZUAuWUAXiNbgAZYfTQaVxB6kYKWqP1vDFpgQR/mz',\n url: 'https://finnair.3dseatmapvr.com/SeatMapVR3D/4.1.0/SeatMapVR3D.min.css',\n };\n\n subscriptions = new Subscription();\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platform: object,\n private translate: LanguageService,\n private toaster: ToasterService,\n private router: Router,\n private location: Location,\n private sentryLogger: SentryLogger,\n private gtmService: GtmService\n ) {\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter(() => isPlatformBrowser(this.platform)),\n filter((e) => e instanceof NavigationEnd),\n take(1),\n filter((e: NavigationEnd) => e.url.includes('#3dseatmap')),\n map((e) => e.url)\n )\n .subscribe((url) => {\n const parts = url.split('/');\n const cabinClass = parts.pop();\n const fleet = parts.pop();\n this.open3dSeatMap(fleet, cabinClass);\n this.location.go(url.split('#')[0]); // Remove the hash part from the URL\n })\n );\n }\n\n public async open3dSeatMap(fleet: string, cabinClass: string): Promise<void> {\n await this.setup3dSeatMap();\n this.handleOpen(fleet, cabinClass);\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n private handleOpen(fleet: string, cabinClass: string) {\n if (!fleet || !LayoutVariant[fleet] || !cabinClass || !SceneVariant[cabinClass]) {\n this.sentryLogger.error('Invalid 3D Seat Map link', { fleet, cabinClass });\n this.displayToasterError();\n return;\n }\n SeatMapVr.selectScene({\n layout: LayoutVariant[fleet],\n scene: SceneVariant[cabinClass],\n fullScreen: true,\n mode: 0,\n });\n }\n\n private async setup3dSeatMap() {\n if (typeof SeatMapVr === 'undefined' || !SeatMapVr.isInitialized()) {\n await this.injectFiles();\n this.addContainer();\n await this.initConfig();\n }\n }\n\n private initConfig(): Promise<void> {\n const getGtmAnalyticFunction = (analyticName: string) => () => this.gtmAnalytic(analyticName);\n return new Promise((resolve) => {\n this.translate\n .translate('3dseatmap')\n .pipe(take(1))\n .subscribe((i18n) => {\n SeatMapVr.config({\n resource_cdn: 'https://finnair.3dseatmapvr.com',\n ambientSound: 'https://finnair.3dseatmapvr.com/SeatMapVR3D/bgsound.mp3',\n destinationSelector: `#${this.containerId}`,\n onUserChangeScene: getGtmAnalyticFunction('scene-changed'),\n onUserCloseViewer: getGtmAnalyticFunction('viewer-closed'),\n onUserMove360: getGtmAnalyticFunction('360-moved'),\n onUserOpenInfo: getGtmAnalyticFunction('info-opened'),\n i18n,\n });\n SeatMapVr.init();\n resolve();\n });\n });\n }\n\n private gtmAnalytic(analyticName: string) {\n return this.gtmService.trackElement(\n `3d-seatmap-${analyticName}`,\n GaContext.CONTENT,\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n }\n\n private async injectFiles() {\n return Promise.all([this.injectScript(), this.injectStyleSheet()]).catch(() => {\n this.displayToasterError();\n });\n }\n\n private injectScript(): Promise<void> {\n return new Promise((resolve, reject) => {\n if (this.document.getElementById(this.script.id)) {\n return resolve();\n }\n const script = this.document.createElement('script');\n script.id = this.script.id;\n script.type = 'text/javascript';\n script.src = this.script.url;\n script.integrity = this.script.integrity;\n script.crossOrigin = 'anonymous';\n script.onload = () => {\n resolve();\n };\n script.onerror = () => reject();\n this.document.body.appendChild(script);\n });\n }\n\n private injectStyleSheet(): Promise<void> {\n return new Promise((resolve, reject) => {\n if (this.document.getElementById(this.style.id)) {\n return resolve();\n }\n const link = this.document.createElement('link');\n link.rel = 'stylesheet';\n link.id = this.style.id;\n link.href = this.style.url;\n link.integrity = this.style.integrity;\n link.crossOrigin = 'anonymous';\n link.onload = () => {\n resolve();\n };\n link.onerror = () => reject();\n this.document.body.appendChild(link);\n });\n }\n\n private addContainer() {\n if (this.document.getElementById(this.containerId)) {\n return;\n }\n const container = this.document.createElement('div');\n container.id = this.containerId;\n this.document.body.appendChild(container);\n }\n\n private displayToasterError() {\n this.toaster.addMessageToQueue({\n id: 'INVALID_3D_SEAT_MAP',\n contentKey: 'errors.generic.title', // Something went wrong\n theme: NotificationTheme.ALERT,\n autoClose: true,\n });\n }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'cms-show-more',\n templateUrl: './cms-show-more.component.html',\n})\nexport class CmsShowMoreComponent {}\n","<fin-continue-reading>\n <ng-content></ng-content>\n</fin-continue-reading>\n","export enum StepProgressState {\n ACTIVE,\n COMPLETED,\n ERROR,\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RESPONSE_CODE_HANDLER: InjectionToken<ResponseCodeHandler> = new InjectionToken('responseCodeHandler');\n\nexport abstract class ResponseCodeHandler {\n /**\n * Trigger setting the Universal application's response status\n * @param setterRef a human-readable reference for\n * @param httpStatusCode the status code for universal render\n * @param templateUrl the url we are returning\n * @param headers a key-value dictionary of response headers to set\n */\n abstract setUniversalResponseStatus(\n setterRef: string,\n httpStatusCode: number,\n templateUrl?: string,\n headers?: { [headerName: string]: string }\n ): void;\n}\n","import { CmsContentType, CmsArticle, CmsContent } from '../interfaces/cms-interface';\n\nexport function isCmsArticle(content: CmsContent): content is CmsArticle {\n return content.contentType === CmsContentType.CMArticle;\n}\n","export class IconsConfig {\n baseUrl?: string;\n clientOnly?: boolean;\n}\n\nexport const enum SVGScriptEvalMode {\n ALWAYS = 'always',\n ONCE = 'once',\n NEVER = 'never',\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { throttle, ThrottleConfig } from './throttle';\nimport { MonoTypeOperatorFunction, SchedulerLike } from '../types';\nimport { timer } from '../observable/timer';\n\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for `duration` milliseconds, then repeats this process.\n *\n * <span class=\"informal\">Lets a value pass, then ignores source values for the\n * next `duration` milliseconds.</span>\n *\n * ![](throttleTime.png)\n *\n * `throttleTime` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled. After `duration` milliseconds (or the time unit determined\n * internally by the optional `scheduler`) has passed, the timer is disabled,\n * and this process repeats for the next source value. Optionally takes a\n * {@link SchedulerLike} for managing timers.\n *\n * ## Examples\n *\n * ### Limit click rate\n *\n * Emit clicks at a rate of at most one click per second\n *\n * ```ts\n * import { fromEvent, throttleTime } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(throttleTime(1000));\n *\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link auditTime}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttle}\n *\n * @param duration Time to wait before emitting another value after\n * emitting the last value, measured in milliseconds or the time unit determined\n * internally by the optional `scheduler`.\n * @param scheduler The {@link SchedulerLike} to use for\n * managing the timers that handle the throttling. Defaults to {@link asyncScheduler}.\n * @param config A configuration object to define `leading` and\n * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`.\n * @return A function that returns an Observable that performs the throttle\n * operation to limit the rate of emissions from the source.\n */\nexport function throttleTime<T>(\n duration: number,\n scheduler: SchedulerLike = asyncScheduler,\n config?: ThrottleConfig\n): MonoTypeOperatorFunction<T> {\n const duration$ = timer(duration, scheduler);\n return throttle(() => duration$, config);\n}\n","import { Subscription } from '../Subscription';\n\nimport { MonoTypeOperatorFunction, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\n\n/**\n * An object interface used by {@link throttle} or {@link throttleTime} that ensure\n * configuration options of these operators.\n *\n * @see {@link throttle}\n * @see {@link throttleTime}\n */\nexport interface ThrottleConfig {\n /**\n * If `true`, the resulting Observable will emit the first value from the source\n * Observable at the **start** of the \"throttling\" process (when starting an\n * internal timer that prevents other emissions from the source to pass through).\n * If `false`, it will not emit the first value from the source Observable at the\n * start of the \"throttling\" process.\n *\n * If not provided, defaults to: `true`.\n */\n leading?: boolean;\n /**\n * If `true`, the resulting Observable will emit the last value from the source\n * Observable at the **end** of the \"throttling\" process (when ending an internal\n * timer that prevents other emissions from the source to pass through).\n * If `false`, it will not emit the last value from the source Observable at the\n * end of the \"throttling\" process.\n *\n * If not provided, defaults to: `false`.\n */\n trailing?: boolean;\n}\n\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for a duration determined by another Observable, then repeats this\n * process.\n *\n * <span class=\"informal\">It's like {@link throttleTime}, but the silencing\n * duration is determined by a second Observable.</span>\n *\n * ![](throttle.svg)\n *\n * `throttle` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled by calling the `durationSelector` function with the source value,\n * which returns the \"duration\" Observable. When the duration Observable emits a\n * value, the timer is disabled, and this process repeats for the\n * next source value.\n *\n * ## Example\n *\n * Emit clicks at a rate of at most one click per second\n *\n * ```ts\n * import { fromEvent, throttle, interval } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(throttle(() => interval(1000)));\n *\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttleTime}\n *\n * @param durationSelector A function that receives a value from the source\n * Observable, for computing the silencing duration for each source value,\n * returned as an `ObservableInput`.\n * @param config A configuration object to define `leading` and `trailing`\n * behavior. Defaults to `{ leading: true, trailing: false }`.\n * @return A function that returns an Observable that performs the throttle\n * operation to limit the rate of emissions from the source.\n */\nexport function throttle<T>(durationSelector: (value: T) => ObservableInput<any>, config?: ThrottleConfig): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n const { leading = true, trailing = false } = config ?? {};\n let hasValue = false;\n let sendValue: T | null = null;\n let throttled: Subscription | null = null;\n let isComplete = false;\n\n const endThrottling = () => {\n throttled?.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n\n const cleanupThrottling = () => {\n throttled = null;\n isComplete && subscriber.complete();\n };\n\n const startThrottle = (value: T) =>\n (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));\n\n const send = () => {\n if (hasValue) {\n // Ensure we clear out our value and hasValue flag\n // before we emit, otherwise reentrant code can cause\n // issues here.\n hasValue = false;\n const value = sendValue!;\n sendValue = null;\n // Emit the value.\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n // Regarding the presence of throttled.closed in the following\n // conditions, if a synchronous duration selector is specified - weird,\n // but legal - an already-closed subscription will be assigned to\n // throttled, so the subscription's closed property needs to be checked,\n // too.\n (value) => {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n },\n () => {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }\n )\n );\n });\n}\n","import { Observable, ReplaySubject, share } from 'rxjs';\n\ninterface FinShareConfig {\n refCount: boolean;\n bufferSize: number;\n}\n\nexport const finShare =\n <T>(config: FinShareConfig = { bufferSize: 1, refCount: true }) =>\n (o$: Observable<T>): Observable<T> =>\n o$.pipe(\n share({\n connector: () => new ReplaySubject(config.bufferSize),\n resetOnError: false,\n resetOnComplete: false,\n resetOnRefCountZero: config.refCount,\n })\n );\n","<fin-travel-guide [content$]=\"travelGuide$\" [showHeading]=\"true\"></fin-travel-guide>\n\n<ng-container *ngIf=\"related$ | async as content\">\n <ng-container *ngFor=\"let item of content; let index = index; let last = last\">\n <fin-expand\n *ngIf=\"item.teaserTitle\"\n class=\"block\"\n [class.border-bottom]=\"last\"\n [key]=\"'cms-travel-guide-' + item.contentId\"\n [id]=\"'cms-travel-guide-' + item.contentId + '-' + index\"\n #expand\n >\n <div class=\"trigger flex flex--center border-top pr-small-y\">\n <div class=\"flex-1\">\n <h3 class=\"mr-clear-t nordic-blue-900-text\">{{ item.teaserTitle }}</h3>\n </div>\n <fcom-icon\n class=\"flex-1 flex--nogrow rotate icon-medium\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n <div class=\"content\">\n <fin-travel-guide [content$]=\"item | finToObservable\" [showHeading]=\"false\"></fin-travel-guide>\n </div>\n </fin-expand>\n </ng-container>\n</ng-container>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { TravelGuide } from '../../interfaces';\n\n@Component({\n selector: 'cms-travel-guide',\n templateUrl: './cms-travel-guide.component.html',\n styleUrls: ['cms-travel-guide.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsTravelGuideComponent implements OnInit {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n content$: Observable<TravelGuide>;\n\n travelGuide$: Observable<TravelGuide>;\n related$: Observable<TravelGuide[]>;\n\n ngOnInit(): void {\n this.travelGuide$ = this.content$;\n this.related$ = this.content$.pipe(map((tg) => tg.related));\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { DirectiveModule } from '@fcom/common/directives';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { ButtonComponent } from './button/index';\nimport { CtaButtonComponent } from './cta-button/cta-button.component';\nimport { LoaderModule } from '../loader';\nimport { IconButtonComponent } from './icon-button/index';\n@NgModule({\n declarations: [ButtonComponent, CtaButtonComponent, IconButtonComponent],\n imports: [CommonModule, UiTranslateModule, IconsModule, LoaderModule, DirectiveModule],\n exports: [ButtonComponent, CtaButtonComponent, IconButtonComponent],\n providers: [],\n})\nexport class ButtonModule {}\n","import { Observable } from '../Observable';\nimport { defer } from './defer';\nimport { ObservableInput } from '../types';\n\n/**\n * Checks a boolean at subscription time, and chooses between one of two observable sources\n *\n * `iif` expects a function that returns a boolean (the `condition` function), and two sources,\n * the `trueResult` and the `falseResult`, and returns an Observable.\n *\n * At the moment of subscription, the `condition` function is called. If the result is `true`, the\n * subscription will be to the source passed as the `trueResult`, otherwise, the subscription will be\n * to the source passed as the `falseResult`.\n *\n * If you need to check more than two options to choose between more than one observable, have a look at the {@link defer} creation method.\n *\n * ## Examples\n *\n * Change at runtime which Observable will be subscribed\n *\n * ```ts\n * import { iif, of } from 'rxjs';\n *\n * let subscribeToFirst;\n * const firstOrSecond = iif(\n * () => subscribeToFirst,\n * of('first'),\n * of('second')\n * );\n *\n * subscribeToFirst = true;\n * firstOrSecond.subscribe(value => console.log(value));\n *\n * // Logs:\n * // 'first'\n *\n * subscribeToFirst = false;\n * firstOrSecond.subscribe(value => console.log(value));\n *\n * // Logs:\n * // 'second'\n * ```\n *\n * Control access to an Observable\n *\n * ```ts\n * import { iif, of, EMPTY } from 'rxjs';\n *\n * let accessGranted;\n * const observableIfYouHaveAccess = iif(\n * () => accessGranted,\n * of('It seems you have an access...'),\n * EMPTY\n * );\n *\n * accessGranted = true;\n * observableIfYouHaveAccess.subscribe({\n * next: value => console.log(value),\n * complete: () => console.log('The end')\n * });\n *\n * // Logs:\n * // 'It seems you have an access...'\n * // 'The end'\n *\n * accessGranted = false;\n * observableIfYouHaveAccess.subscribe({\n * next: value => console.log(value),\n * complete: () => console.log('The end')\n * });\n *\n * // Logs:\n * // 'The end'\n * ```\n *\n * @see {@link defer}\n *\n * @param condition Condition which Observable should be chosen.\n * @param trueResult An Observable that will be subscribed if condition is true.\n * @param falseResult An Observable that will be subscribed if condition is false.\n * @return An observable that proxies to `trueResult` or `falseResult`, depending on the result of the `condition` function.\n */\nexport function iif<T, F>(condition: () => boolean, trueResult: ObservableInput<T>, falseResult: ObservableInput<F>): Observable<T | F> {\n return defer(() => (condition() ? trueResult : falseResult));\n}\n","<fin-fare-family-table\n [fareFamilies]=\"fareFamilies\"\n [showKoreaNotification]=\"showKoreaNotification\"\n></fin-fare-family-table>\n\n<article class=\"font-body-1\">\n <section class=\"mr-xsmall-t\">\n <div\n class=\"ticket-type-rules-info nordic-blue-900-text mr-medium-y ms-medium-x font-body-1\"\n [innerHTML]=\"'bookingSearch.boundSelection.rulesMayVary' | finLocalization | finSafe: 'html'\"\n ></div>\n <fcom-notification *ngIf=\"hasBusLeg\" class=\"block mr-xsmall-b\">\n {{ 'bookingSearch.boundSelection.ticketTypeBusNotification' | finLocalization }}\n </fcom-notification>\n <fin-expand\n [id]=\"'generalFareFamilyRulesAndRestrictions'\"\n [key]=\"'generalFareFamilyRulesAndRestrictions'\"\n [finElemTracker]=\"'benefits-more-information'\"\n [finElemContext]=\"TRACKING_CONTEXT\"\n [finElemType]=\"ElementTypes.ACCORDION\"\n #expand\n >\n <div class=\"trigger\">\n <div class=\"nordic-blue-900-text\">\n <h3 class=\"font-heading-3 float-left\">\n {{ 'bookingSearch.boundSelection.informationAboutBenefits' | finLocalization }}\n </h3>\n <fcom-icon\n class=\"inline-block rotate float-right icon-medium\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n </div>\n <div class=\"content pr-medium-y\">\n <cms-unstyled-fragment\n class=\"benefits-information\"\n [contentUrl$]=\"'fragments.benefitsInformation.url' | finLocalization | finToObservable\"\n ></cms-unstyled-fragment>\n </div>\n </fin-expand>\n </section>\n</article>\n","import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { FareFamily, FinnairItineraryItemFlight } from '@fcom/dapi/api/models';\nimport { ElementTypes, GaContext } from '@fcom/common/interfaces';\n\nimport { isByBusOnly } from '../../../utils/common-booking.utils';\n\n@Component({\n selector: 'fin-fare-family-details',\n templateUrl: './fare-family-details.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./fare-family-details.component.scss'],\n})\nexport class FareFamilyDetailsComponent implements OnChanges {\n readonly ElementTypes: typeof ElementTypes = ElementTypes;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TRACKING_CONTEXT = GaContext.FLIGHT_SELECTION;\n\n @Input()\n fareFamilies: FareFamily[];\n\n @Input()\n itineraries?: FinnairItineraryItemFlight[][];\n\n @Input()\n showKoreaNotification: boolean;\n\n hasBusLeg = false;\n\n ngOnChanges(): void {\n this.hasBusLeg = this.itineraries?.some((itineraries) => {\n return itineraries.some((itinerary) => isByBusOnly(itinerary));\n });\n }\n}\n","/* eslint-disable no-underscore-dangle */\nimport { createFeatureSelector, createSelector, select } from '@ngrx/store';\nimport { pipe } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport {\n Amount,\n CartStatus,\n NO_VARIANTS,\n SelectedServiceData,\n SelectionsPerTraveler,\n ServiceAvailability,\n ServiceCatalog,\n ServiceCatalogCategory,\n ServiceCatalogCategoryServicesMap,\n ServiceCatalogSelections,\n ServiceCatalogSelectionsForAllTravelers,\n ServiceCatalogService,\n ServiceCatalogServices,\n ServicesPerTraveler,\n ServicesState,\n ServicesStatus,\n TravelerService,\n} from '@fcom/dapi/interfaces';\nimport {\n entrySet,\n isEmpty,\n isEmptyObjectOrHasEmptyValues,\n isPresent,\n mapValues,\n PreciseNumber,\n valuesOf,\n} from '@fcom/core/utils';\nimport { Category, FinnairServiceCatalogCampaign, SubCategory } from '@fcom/dapi/api/models';\nimport {\n PaxServiceCategories,\n PaxServiceCategory,\n} from '@fcom/booking/modules/pax-details/interfaces/pax-ancillaries.interface';\nimport { cartStatusSelector } from '@fcom/booking/store/selectors';\nimport { finShare } from '@fcom/rx';\nimport { CustomServiceType, ServiceSelections } from '@fcom/dapi/interfaces/services.interface';\n\nimport { CommonBookingFeatureState, QuantityForFragmentAndPassenger } from '../';\nimport { CommonBookingState } from '../store.interface';\nimport { COMMON_BOOKING_FEATURE_KEY } from '../constants';\nimport { isBoundBasedCategory } from '../../modules/ancillaries/utils';\n\nconst _selectCommonBookingState = createFeatureSelector<CommonBookingFeatureState, CommonBookingState>(\n COMMON_BOOKING_FEATURE_KEY\n);\nconst _servicesState = createSelector(_selectCommonBookingState, (state: CommonBookingState) => state?.services);\n\nconst _serviceCatalog = createSelector(_servicesState, (ss: ServicesState) => ss?.services);\n\nconst _serviceAvailability = createSelector(_servicesState, (ss: ServicesState) => ss?.serviceAvailability);\n\nconst _serviceCatalogCampaigns = createSelector(_serviceCatalog, (catalog: ServiceCatalog) => catalog?.campaigns);\n\nconst _campaignsShown = createSelector(_servicesState, (state: ServicesState) => state?.campaignsShown ?? []);\n\nconst _serviceSelections = createSelector(_servicesState, (ss: ServicesState) => ss?.selections);\n\nconst _servicesStatus = createSelector(_servicesState, (ss: ServicesState) => ss?.status);\n\nconst _servicesForCategory = (category: Category) =>\n createSelector(_serviceCatalog, (sc) =>\n sc ? sc.categories?.find((c) => c.category === category)?.services || {} : undefined\n );\n\nconst _serviceCategories = createSelector(_serviceCatalog, (sc) => sc?.categories);\n\nconst _serviceCategoriesMap = createSelector(_serviceCatalog, (sc) =>\n sc?.categories.reduce((categories, category) => {\n categories[category.category] = category.services;\n return categories;\n }, {})\n);\n\nconst _servicesReady = createSelector(\n cartStatusSelector,\n _servicesStatus,\n (cartStatus: CartStatus, servicesStatus: ServicesStatus) => {\n return cartStatus === CartStatus.OK && servicesStatus === ServicesStatus.OK;\n }\n);\n\nconst _servicesForFragmentAndCategory = (fragmentId: string, category: Category) =>\n createSelector(_servicesForCategory(category), (ss: ServiceCatalogServices) =>\n ss ? ss[fragmentId] || {} : undefined\n );\n\nconst _serviceSelectionsForCategory = <T>(category: Category) =>\n createSelector(\n _servicesState,\n (ss: ServicesState): ServiceCatalogSelections<T> => (ss ? ss.selections?.[category] || {} : undefined)\n );\n\nconst _variantsQuantity = (variants: string[]) =>\n createSelector(_serviceSelections, (selections): QuantityForFragmentAndPassenger => {\n return Object.values(selections ?? {}).reduce(\n (allCategoriesQuantity, selection: ServiceCatalogSelections<TravelerService | TravelerService[]>) => {\n return entrySet(selection).reduce((quantitiesForFragment, service) => {\n return entrySet(service.value).reduce((innerQuantitiesForFragment, p) => {\n const services = [].concat(p.value);\n const newQuantity = services\n .filter(Boolean)\n .filter((s) => variants.includes(s.variant) && !s.includedInTicketType && !s.includedInTierBenefit)\n .reduce(\n (quantity, passengerService) => quantity + (passengerService.quantity ?? 1),\n innerQuantitiesForFragment[service.key]?.[p.key] ?? 0\n );\n\n if (!innerQuantitiesForFragment[service.key]) {\n innerQuantitiesForFragment[service.key] = {};\n }\n innerQuantitiesForFragment[service.key][p.key] = newQuantity;\n return innerQuantitiesForFragment;\n }, quantitiesForFragment);\n }, allCategoriesQuantity);\n },\n {}\n );\n });\n\nconst _upsell = createSelector(_servicesState, (ss: ServicesState): SelectedServiceData => ss?.upsell);\n\nconst _serviceSelectionsForFragmentAndCategory = <T>(fragmentId: string, category: Category) =>\n createSelector(_serviceSelectionsForCategory(category), (ss: ServiceCatalogSelections<T>) =>\n ss ? ss[fragmentId] || {} : undefined\n );\n\nconst _serviceSelectionsForFragmentAndTraveler = <T>(fragmentId: string, travelerId: string, category: Category) =>\n createSelector(\n _serviceSelectionsForFragmentAndCategory(fragmentId, category),\n (selection: SelectionsPerTraveler<T>): T => selection?.[travelerId]\n );\n\nconst _allSelectionsForCategory = <T>(category: Category) =>\n createSelector(\n _servicesForCategory(category),\n _serviceSelectionsForCategory<T>(category),\n (services, selections): [ServiceCatalogServices, ServiceCatalogSelections<T>] => {\n return [services, selections];\n }\n );\n\nconst _selectionsForCategories = (categories: Category[]) =>\n createSelector(\n _serviceSelections,\n (selections): ServiceSelections =>\n categories.reduce((allCategories, category: Category) => {\n return {\n ...allCategories,\n [category]: selections?.[category] ?? {},\n };\n }, {})\n );\n\nconst _serviceMapForCategories = (categories: Category[]) =>\n createSelector(_serviceCategoriesMap, _serviceCategories, (categoriesMap, serviceCategories) => {\n const categoryMap = categories.reduce((allCategories, category: Category) => {\n const serviceCategory = serviceCategories?.find((sc) => sc.category === category);\n return isPresent(categoriesMap?.[category])\n ? [\n ...allCategories,\n {\n services: categoriesMap[category],\n translations: serviceCategory?.translations ?? {},\n media: serviceCategory?.media ?? {},\n category,\n isBoundBased: isBoundBasedCategory(category),\n },\n ]\n : allCategories;\n }, []);\n\n return isEmptyObjectOrHasEmptyValues(categoryMap) ? undefined : categoryMap;\n });\n\nexport const serviceCategories = (): StateSelector<CommonBookingFeatureState, ServiceCatalogCategory[]> =>\n safeSelect(_serviceCategories);\n\nexport const serviceCategoriesMap = (): StateSelector<CommonBookingFeatureState, ServiceCatalogCategoryServicesMap> =>\n safeSelect(_serviceCategoriesMap);\n\nexport const serviceCatalog = (): StateSelector<CommonBookingFeatureState, ServiceCatalog> => select(_serviceCatalog);\n\nexport const serviceAvailability = (): StateSelector<CommonBookingFeatureState, ServiceAvailability> =>\n safeSelect(_serviceAvailability);\n\nexport const serviceCatalogCampaigns = (): StateSelector<CommonBookingFeatureState, FinnairServiceCatalogCampaign[]> =>\n safeSelect(_serviceCatalogCampaigns);\n\nexport const serviceCatalogCampaignIdsForFragment = (\n fragmentId: string\n): StateSelector<CommonBookingFeatureState, Record<Category, string[]>> =>\n pipe(\n safeSelect(_serviceCatalogCampaigns),\n map((campaigns) =>\n campaigns.reduce(\n (campaignsAndCategories, campaign) => {\n campaign.categories\n .filter((category) => !!category.fragments[fragmentId])\n .forEach((campaignCategory) => {\n if (campaignsAndCategories[campaignCategory.id]) {\n campaignsAndCategories[campaignCategory.id] = [\n ...campaignsAndCategories[campaignCategory.id],\n campaign.id,\n ];\n } else {\n campaignsAndCategories[campaignCategory.id] = [campaign.id];\n }\n });\n return campaignsAndCategories;\n },\n {} as Record<Category, string[]>\n )\n ),\n startWith({} as Record<Category, string[]>)\n );\nexport const campaignsShown = (): StateSelector<CommonBookingFeatureState, string[]> => safeSelect(_campaignsShown);\n\nexport const serviceSelectionsForFragment = <T>(\n fragmentId: string,\n category: Category\n): StateSelector<CommonBookingFeatureState, SelectionsPerTraveler<T>> =>\n safeSelect(_serviceSelectionsForFragmentAndCategory<T>(fragmentId, category));\n\nexport const variantsQuantity = (\n variants: string[]\n): StateSelector<CommonBookingFeatureState, QuantityForFragmentAndPassenger> => {\n return select(_variantsQuantity(variants));\n};\n\nexport const serviceSelectionsForFragmentAndTraveler = <T>(\n fragmentId: string,\n travelerId: string,\n category: Category\n): StateSelector<CommonBookingFeatureState, T> =>\n safeSelect(_serviceSelectionsForFragmentAndTraveler<T>(fragmentId, travelerId, category));\n\nexport const servicesState = (): StateSelector<CommonBookingFeatureState, ServicesState> => select(_servicesState);\nexport const servicesStatus = (): StateSelector<CommonBookingFeatureState, ServicesStatus> => select(_servicesStatus);\nexport const servicesReady = (): StateSelector<CommonBookingFeatureState, boolean> => select(_servicesReady);\nexport const upsell = (): StateSelector<CommonBookingFeatureState, SelectedServiceData> => select(_upsell);\n\nexport const servicesForCategory = (\n category: Category\n): StateSelector<CommonBookingFeatureState, ServiceCatalogServices> => safeSelect(_servicesForCategory(category));\n\nexport const servicesForFragmentAndCategory = (\n fragmentId: string,\n category: Category\n): StateSelector<CommonBookingFeatureState, ServicesPerTraveler> =>\n safeSelect(_servicesForFragmentAndCategory(fragmentId, category));\n\nexport const serviceMapForCategories = (\n categories: Category[]\n): StateSelector<CommonBookingFeatureState, ServiceCatalogCategory[]> =>\n safeSelect(_serviceMapForCategories(categories));\n\nexport const serviceSelectionsForCategoryAllTravelers = (\n category: Category\n): StateSelector<CommonBookingFeatureState, ServiceCatalogSelectionsForAllTravelers> =>\n pipe(\n select(_allSelectionsForCategory<TravelerService | TravelerService[]>(category)),\n map(([services, selections]) => {\n return entrySet(selections).reduce((all, selection) => {\n all[selection.key] = entrySet(selection.value).reduce<TravelerService[]>(\n (allServices: TravelerService[], traveler) => {\n const servicesForTraveler: ServiceCatalogService[] = services?.[selection.key]?.[traveler.key] || [];\n const travelerServices = Array.isArray(traveler.value) ? traveler.value : [traveler.value];\n const translatedServices = travelerServices\n .filter(Boolean)\n .map(addTranslationsToService(servicesForTraveler));\n translatedServices.forEach((service) => (service.travelerId = traveler.key));\n return allServices.concat(translatedServices);\n },\n []\n );\n return all;\n }, {});\n }),\n finShare()\n );\n\nexport const serviceMapForCategoriesForTravelers = (\n travelerIds: string[],\n categories: Category[]\n): StateSelector<CommonBookingFeatureState, PaxServiceCategories> =>\n pipe(\n safeSelect(_serviceMapForCategories(categories)),\n map((serviceCategories: PaxServiceCategory[]) => {\n return travelerIds.reduce((serviceMapForTravelers, travelerId) => {\n return {\n ...serviceMapForTravelers,\n [travelerId]: serviceCategories.map((category) => ({\n ...category,\n services: mapValues(category.services, (fragment, fragmentId) => {\n const travelerOrGroup = fragmentId === CustomServiceType.JOURNEY ? CustomServiceType.GROUP : travelerId;\n // Filter out unwanted service variants and subCategories\n return fragment?.[travelerOrGroup]\n ?.filter((service) => ![...NO_VARIANTS, '_NOLOUNGE'].includes(service.variant))\n .filter((service) => ![SubCategory.HEAVY_OR_LARGE].includes(service.subCategory));\n }),\n })),\n };\n }, {});\n })\n );\n\nexport const selectionMapForCategoriesForTravelers = (\n travelerIds: string[],\n categories: Category[]\n): StateSelector<CommonBookingFeatureState, ServiceSelections> =>\n pipe(\n safeSelect(_selectionsForCategories(categories)),\n map((selections) => {\n return travelerIds.reduce(\n (selectionsForTravelers, travelerId) => ({\n ...selectionsForTravelers,\n [travelerId]: mapValues(selections, (category) =>\n mapValues(category, (fragment, fragmentId) => {\n const travelerOrGroup = fragmentId === CustomServiceType.JOURNEY ? CustomServiceType.GROUP : travelerId;\n return fragment?.[travelerOrGroup];\n })\n ),\n }),\n {}\n );\n })\n );\n\nexport const totalPriceForSelectionsForCategories = (\n categories: Category[]\n): StateSelector<CommonBookingFeatureState, Amount> =>\n pipe(\n safeSelect(_selectionsForCategories(categories)),\n map((selections: ServiceSelections): (Amount & { quantity: number })[] =>\n valuesOf(selections as { [key: string]: ServiceCatalogSelections<TravelerService | TravelerService[]> })\n .flatMap((category) =>\n valuesOf(category).flatMap((fragment) =>\n valuesOf(fragment).flatMap((travelerSelection) => {\n if (Array.isArray(travelerSelection)) {\n return travelerSelection?.map((selection) => ({\n ...selection.pricePerItem,\n quantity: selection.quantity,\n }));\n }\n return isPresent(travelerSelection)\n ? { ...travelerSelection.pricePerItem, quantity: travelerSelection.quantity }\n : undefined;\n })\n )\n )\n .filter(Boolean)\n ),\n map(\n (allPrices: (Amount & { quantity: number })[]): Amount =>\n !isEmpty(allPrices)\n ? allPrices.reduce(\n (totalPrice, selectionPrice) => {\n const selectionSubTotal = PreciseNumber.fromString(selectionPrice.amount).multiply(\n PreciseNumber.from(selectionPrice.quantity, 0)\n );\n\n return {\n currencyCode: totalPrice.currencyCode || selectionPrice.currencyCode,\n amount: PreciseNumber.fromString(totalPrice.amount).add(selectionSubTotal).toString(),\n };\n },\n {\n currencyCode: null,\n amount: '0',\n }\n )\n : undefined\n )\n );\n\nfunction addTranslationsToService(servicesForTraveler: ServiceCatalogService[]) {\n return (travelerService): TravelerService => {\n const serviceForTraveler = servicesForTraveler.find((s) => s.variant === travelerService.variant);\n if (serviceForTraveler) {\n return {\n ...travelerService,\n ...(travelerService.category === Category.SEAT ? { seatNumber: travelerService.variant } : {}),\n title: serviceForTraveler.translations?.title,\n maxBaggageWeight: serviceForTraveler.parameters?.baggageWeight,\n };\n }\n return travelerService;\n };\n}\n","import { Observable } from '../Observable';\n\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { Subscription } from '../Subscription';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\n\nexport function catchError<T, O extends ObservableInput<any>>(\n selector: (err: any, caught: Observable<T>) => O\n): OperatorFunction<T, T | ObservedValueOf<O>>;\n\n/**\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n *\n * <span class=\"informal\">\n * It only listens to the error channel and ignores notifications.\n * Handles errors from the source observable, and maps them to a new observable.\n * The error may also be rethrown, or a new error can be thrown to emit an error from the result.\n * </span>\n *\n * ![](catch.png)\n *\n * This operator handles errors, but forwards along all other events to the resulting observable.\n * If the source observable terminates with an error, it will map that error to a new observable,\n * subscribe to it, and forward all of its events to the resulting observable.\n *\n * ## Examples\n *\n * Continue with a different Observable when there's an error\n *\n * ```ts\n * import { of, map, catchError } from 'rxjs';\n *\n * of(1, 2, 3, 4, 5)\n * .pipe(\n * map(n => {\n * if (n === 4) {\n * throw 'four!';\n * }\n * return n;\n * }),\n * catchError(err => of('I', 'II', 'III', 'IV', 'V'))\n * )\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, I, II, III, IV, V\n * ```\n *\n * Retry the caught source Observable again in case of error, similar to `retry()` operator\n *\n * ```ts\n * import { of, map, catchError, take } from 'rxjs';\n *\n * of(1, 2, 3, 4, 5)\n * .pipe(\n * map(n => {\n * if (n === 4) {\n * throw 'four!';\n * }\n * return n;\n * }),\n * catchError((err, caught) => caught),\n * take(30)\n * )\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, 1, 2, 3, ...\n * ```\n *\n * Throw a new error when the source Observable throws an error\n *\n * ```ts\n * import { of, map, catchError } from 'rxjs';\n *\n * of(1, 2, 3, 4, 5)\n * .pipe(\n * map(n => {\n * if (n === 4) {\n * throw 'four!';\n * }\n * return n;\n * }),\n * catchError(err => {\n * throw 'error in source. Details: ' + err;\n * })\n * )\n * .subscribe({\n * next: x => console.log(x),\n * error: err => console.log(err)\n * });\n * // 1, 2, 3, error in source. Details: four!\n * ```\n *\n * @see {@link onErrorResumeNext}\n * @see {@link repeat}\n * @see {@link repeatWhen}\n * @see {@link retry }\n * @see {@link retryWhen}\n *\n * @param selector A function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again.\n * Whatever observable is returned by the `selector` will be used to continue the observable chain.\n * @return A function that returns an Observable that originates from either\n * the source or the Observable returned by the `selector` function.\n */\nexport function catchError<T, O extends ObservableInput<any>>(\n selector: (err: any, caught: Observable<T>) => O\n): OperatorFunction<T, T | ObservedValueOf<O>> {\n return operate((source, subscriber) => {\n let innerSub: Subscription | null = null;\n let syncUnsub = false;\n let handledResult: Observable<ObservedValueOf<O>>;\n\n innerSub = source.subscribe(\n createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n } else {\n // We don't have an innerSub yet, that means the error was synchronous\n // because the subscribe call hasn't returned yet.\n syncUnsub = true;\n }\n })\n );\n\n if (syncUnsub) {\n // We have a synchronous error, we need to make sure to\n // finalize right away. This ensures that callbacks in the `finalize` operator are called\n // at the right time, and that finalization occurs at the expected\n // time between the source error and the subscription to the\n // next observable.\n innerSub.unsubscribe();\n innerSub = null;\n handledResult!.subscribe(subscriber);\n }\n });\n}\n","import { NgModule, Optional, Inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\nimport { ProgressIndicatorComponent } from './progress-indicator.component';\n\n@NgModule({\n declarations: [ProgressIndicatorComponent],\n imports: [CommonModule],\n exports: [ProgressIndicatorComponent],\n})\nexport class ProgressIndicatorModule {\n constructor(@Optional() @Inject(ANIMATION_MODULE_TYPE) animations: string) {\n if (!animations) {\n throw new Error('You need to import the BrowserAnimationsModule or NoopAnimationsModule in your application!');\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { baseUrl } from '@finnairoyj/fcom-ui-styles';\n\nimport { PaginationComponent } from './pagination.component';\nimport { FcomFormsModule } from '../forms';\nimport { IconsModule } from '../icons';\n\n@NgModule({\n declarations: [PaginationComponent],\n imports: [CommonModule, FcomFormsModule, IconsModule.forRoot({ baseUrl })],\n exports: [PaginationComponent],\n})\nexport class PaginationModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { baseUrl } from '@finnairoyj/fcom-ui-styles';\n\nimport { TableComponent } from './table.component';\nimport { IconsModule } from '../icons';\nimport { PaginationModule } from '../pagination/pagination.module';\nimport { LoaderModule } from '../loader';\n\n@NgModule({\n declarations: [TableComponent],\n imports: [CommonModule, IconsModule.forRoot({ baseUrl }), PaginationModule, LoaderModule],\n exports: [TableComponent],\n})\nexport class TableModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { ModalModule } from '../../components/modal';\nimport { NotificationsModule } from '../../components/notifications';\nimport { FiltersComponent } from './filters.component';\nimport { ButtonModule } from '../buttons/button.module';\nimport { IconsModule } from '../icons/icons.module';\nimport { ClickOutsideDirectiveModule } from '../../directives/click-outside';\nimport { PopoverModule } from '../popover';\n\n@NgModule({\n declarations: [FiltersComponent],\n imports: [\n CommonModule,\n IconsModule,\n ButtonModule,\n ClickOutsideDirectiveModule,\n PopoverModule,\n ModalModule,\n NotificationsModule,\n ],\n exports: [FiltersComponent],\n providers: [],\n})\nexport class FiltersModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TitledCardComponent } from './titled-card.component';\n\n@NgModule({\n declarations: [TitledCardComponent],\n imports: [CommonModule],\n exports: [TitledCardComponent],\n})\nexport class TitledCardModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { SentryModule } from '@fcom/core/services';\nimport { PipesModule } from '@fcom/common/pipes/pipes.module';\n\nimport { ButtonModule } from './components/buttons/button.module';\nimport { CarouselModule } from './components/carousel/carousel.module';\nimport { FcomFormsModule } from './components/forms/fcom-forms.module';\nimport { FlightsModule } from './components/flights/flights.module';\nimport { HeadersModule } from './components/headers/headers.module';\nimport { IconsModule } from './components/icons/icons.module';\nimport { LoaderModule } from './components/loader/loader.module';\nimport { NotificationsModule } from './components/notifications/notifications.module';\nimport { PopoverModule } from './components/popover/popover.module';\nimport { TabsModule } from './components/tabs/tabs.module';\nimport { ModalModule } from './components/modal/modal.module';\nimport { DrawerModule } from './components/drawer/drawer.module';\nimport { ProgressIndicatorModule } from './components/progress-indicator/progress-indicator.module';\nimport { ExpandModule } from './components/expand/expand.module';\nimport { ImagesModule } from './components/images/images.module';\nimport { DatepickerModule } from './components/datepicker/datepicker.module';\nimport { ProductsModule } from './components/products/products.module';\nimport { TagModule } from './components/tag/tag.module';\nimport { TrapFocusModule } from './directives/trap-focus/trap-focus.module';\nimport { ClickOutsideDirectiveModule } from './directives/click-outside/click-outside-directive.module';\nimport { FocusOutDirectiveModule } from './directives/focus-out/focus-out.directive.module';\nimport { ToggleSwitchModule } from './components/toggle-switch/toggle-switch.module';\nimport { PromoCardModule } from './components/promo-card/promo-card.module';\nimport { TableModule } from './components/table/table.module';\nimport { PaginationModule } from './components/pagination/pagination.module';\nimport { FiltersModule } from './components/filters/filters.module';\nimport { StepperModule } from './components/stepper/stepper.module';\nimport { TitledCardModule } from './components/product-variants/titled-card.module';\nimport { LinkModule } from './components/link/link.module';\nimport { QuickLinksModule } from './components/quick-links/quick-links.module';\n\nconst uiModules = [\n CarouselModule,\n ButtonModule,\n TagModule,\n FcomFormsModule,\n FlightsModule,\n HeadersModule,\n IconsModule,\n LoaderModule,\n NotificationsModule,\n PopoverModule,\n TabsModule,\n ModalModule,\n DrawerModule,\n ProgressIndicatorModule,\n TrapFocusModule,\n ClickOutsideDirectiveModule,\n FocusOutDirectiveModule,\n ExpandModule,\n ImagesModule,\n DatepickerModule,\n ProductsModule,\n SentryModule,\n ToggleSwitchModule,\n PromoCardModule,\n TableModule,\n PaginationModule,\n FiltersModule,\n StepperModule,\n TitledCardModule,\n LinkModule,\n QuickLinksModule,\n];\n\n@NgModule({\n imports: [CommonModule, PipesModule, ...uiModules],\n exports: [...uiModules],\n})\nexport class UiComponentsModule {}\n","import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { MediaQueryService } from '@fcom/common/services/media-query/media-query.service';\nimport { BrowserWindowRef } from '@fcom/core/providers';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { ButtonModule } from '../buttons/button.module';\nimport { CalendarComponent } from './calendar/calendar.component';\nimport { MonthComponent } from './month/month.component';\nimport { ModalModule } from '../modal';\nimport { DatepickerComponent } from './datepicker/datepicker.component';\nimport { TagModule } from '../tag';\nimport { NotificationsModule } from '../notifications';\n\n@NgModule({\n declarations: [CalendarComponent, MonthComponent, DatepickerComponent],\n imports: [\n CommonModule,\n IconsModule,\n UiTranslateModule,\n ButtonModule,\n ModalModule,\n FormsModule,\n TagModule,\n NotificationsModule,\n ],\n exports: [DatepickerComponent, CalendarComponent],\n providers: [MediaQueryService, BrowserWindowRef],\n})\nexport class DatepickerModule {}\n","'use strict';\n\n/** @type {import('./Reflect.getPrototypeOf')} */\nmodule.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;\n","import { createReducer, on } from '@ngrx/store';\n\nimport { TripsState, FetchTripsStatus } from '../../interfaces/store.interface';\nimport { TripsActions } from '../actions';\n\nexport const initialState: TripsState = Object.seal({ trips: [], status: FetchTripsStatus.INITIAL });\n\nconst tripsReducer = createReducer(\n initialState,\n on(TripsActions.setTrips, (state, { trips, status }) => ({\n ...state,\n trips: [...trips],\n status: status,\n }))\n);\n\nexport function reducer(state: TripsState, action: TripsActions.TripsActionsUnion) {\n return tripsReducer(state, action);\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { MilestoneState } from '../../interfaces/store.interface';\nimport { MilestonesActions } from '../actions';\n\nexport const initialState: MilestoneState = Object.seal({ dismissedWithPoints: 0 });\n\nconst milestonesReducer = createReducer(\n initialState,\n on(MilestonesActions.setDismissed, (state, { points }) => ({\n ...state,\n dismissedWithPoints: points,\n }))\n);\n\nexport function reducer(state: MilestoneState, action: MilestonesActions.MilestonesActionsUnion): MilestoneState {\n return milestonesReducer(state, action);\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport * as fromTrips from '../reducers/trips.reducer';\nimport * as milestones from '../reducers/milestones.reducer';\nimport { LoyaltyState } from '../../interfaces/store.interface';\n\nexport const reducers: ActionReducerMap<LoyaltyState> = {\n trips: fromTrips.reducer,\n milestones: milestones.reducer,\n};\n","import { Injectable } from '@angular/core';\n\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { EMPTY } from 'rxjs';\nimport { catchError, exhaustMap, tap } from 'rxjs/operators';\n\nimport { TripsActions } from '../actions';\nimport { PaxTripService } from '../../services/pax-trip.service';\nimport { Trip } from '../../interfaces/pax-trip.interface';\nimport { FetchTripsStatus, State } from '../../interfaces/store.interface';\n\n@Injectable()\nexport class TripsEffects {\n fetchTrips$ = createEffect(\n () =>\n this.actions$.pipe(\n ofType(TripsActions.fetchTrips.type),\n exhaustMap(() => this.paxTripService.getTrips()),\n tap((trips: Trip[]) => {\n this.store.dispatch(TripsActions.setTrips({ trips: trips, status: FetchTripsStatus.OK }));\n }),\n catchError(() => {\n this.store.dispatch(TripsActions.setTrips({ trips: [], status: FetchTripsStatus.ERROR }));\n return EMPTY;\n })\n ),\n { dispatch: false }\n );\n\n constructor(\n private readonly actions$: Actions<TripsActions.TripsActionsUnion>,\n private paxTripService: PaxTripService,\n private store: Store<State>\n ) {}\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { RouterModule } from '@angular/router';\n\nimport { StoreModule } from '@ngrx/store';\nimport { EffectsModule } from '@ngrx/effects';\n\nimport { UiComponentsModule } from '@fcom/ui-components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { LoyaltyTierService, ComponentsModule } from '@fcom/common';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { PipesModule } from '@fcom/common/pipes/pipes.module';\nimport { LocalizationProvider } from '@fcom/core/services/language/localization.provider';\nimport { I18nKey } from '@fcom/core';\nimport { CommonBookingComponentsModule } from '@fcom/common-booking/components';\nimport { CmsModule } from '@fcom/cms';\nimport { OrderModule } from '@fcom/order';\n\nimport { LoyaltyNavigationService, PaxTripService } from './services';\nimport { LoyaltySectionNavigationComponent } from './components/loyalty-section-navigation/loyalty-section-navigation.component';\nimport { LoyaltyUpcomingTripsComponent } from './components/loyalty-upcoming-trips/loyalty-upcoming-trips.component';\nimport { LoyaltyAddTripsComponent } from './components/loyalty-add-trips/loyalty-add-trips.component';\nimport { LoyaltyGlobalNotificationComponent } from './components/loyalty-global-notification/loyalty-global-notification.component';\nimport { LoyaltyViewComponent } from './views/loyalty-view/loyalty-view.component';\nimport { LoyaltyLayoutComponent } from './views/loyalty-layout/loyalty-layout.component';\nimport { LoyaltyMyTripsComponent } from './views/loyalty-my-trips/loyalty-my-trips.component';\nimport { reducers as loyaltyReducers } from './store/reducers';\nimport { TripsEffects } from './store/effects/trips.effects';\nimport { LOYALTY_FEATURE_KEY } from './constants';\nimport { AnnouncementCardComponent } from './components/announcement-card/announcement-card.component';\nimport { PlusCardComponent } from './components/plus-card/plus-card.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n ComponentsModule,\n DirectiveModule,\n PipesModule,\n UiComponentsModule,\n UiTranslateModule,\n StoreModule.forFeature(LOYALTY_FEATURE_KEY, loyaltyReducers),\n EffectsModule.forFeature([TripsEffects]),\n RouterModule,\n CommonBookingComponentsModule,\n CmsModule,\n OrderModule,\n ],\n declarations: [\n LoyaltySectionNavigationComponent,\n LoyaltyUpcomingTripsComponent,\n LoyaltyAddTripsComponent,\n LoyaltyMyTripsComponent,\n LoyaltyViewComponent,\n LoyaltyLayoutComponent,\n LoyaltyGlobalNotificationComponent,\n AnnouncementCardComponent,\n PlusCardComponent,\n ],\n exports: [\n LoyaltySectionNavigationComponent,\n LoyaltyUpcomingTripsComponent,\n LoyaltyMyTripsComponent,\n LoyaltyViewComponent,\n LoyaltyLayoutComponent,\n AnnouncementCardComponent,\n PlusCardComponent,\n ],\n providers: [LoyaltyNavigationService, PaxTripService, LoyaltyTierService],\n})\nexport class LoyaltyCoreModule {\n constructor(private localizationProvider: LocalizationProvider) {\n this.localizationProvider.triggerLazyLocalizations(I18nKey.LOYALTY);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule } from '@fcom/ui-components';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { DirectiveModule } from '@fcom/common/directives';\nimport { PipesModule } from '@fcom/common/pipes/pipes.module';\n\nimport { OndMarketingOffersListComponent } from './components/ond-marketing-offers-list.component';\nimport { OndMarketingOffersComponent } from './components/ond-marketing-offers.component';\nimport { OndMarketingCrossLinkingComponent } from './components/ond-marketing-cross-linking.component';\nimport { OndMarketingRibbonComponent } from './components/ond-marketing-ribbon.component';\n\n@NgModule({\n imports: [CommonModule, DirectiveModule, PipesModule, ComponentsModule, UiTranslateModule, IconsModule],\n declarations: [\n OndMarketingOffersListComponent,\n OndMarketingOffersComponent,\n OndMarketingCrossLinkingComponent,\n OndMarketingRibbonComponent,\n ],\n exports: [\n OndMarketingOffersListComponent,\n OndMarketingOffersComponent,\n OndMarketingCrossLinkingComponent,\n OndMarketingRibbonComponent,\n ],\n})\nexport class OndMarketingLandingCoreModule {}\n","import { Directive, ElementRef, Input, AfterViewInit, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { findFirstFocusableElement } from '@fcom/ui-components/utils/dom.utils';\n\n@Directive({\n selector: '[finFocus]',\n})\nexport class FocusDirective implements AfterViewInit {\n @Input() autofocus = false;\n\n constructor(\n private elementRef: ElementRef,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngAfterViewInit(): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n\n if (this.autofocus) {\n this.elementRef.nativeElement.focus?.() || findFirstFocusableElement(this.elementRef.nativeElement)?.focus();\n }\n }\n}\n","import { isPresent } from './utils';\n\n/**\n * Add leading zero to a number if <10\n * @param value\n * @param minLength Defines minimum length for number, default is 2\n */\nexport const pad = (value: number | string, minLength = 2, placeholder = '0'): string => {\n const count = minLength - value.toString().length;\n return (count > 0 ? new Array(count + 1).join(placeholder) : '') + value;\n};\n\n/**\n * Removes whitespaces and line terminators from the beginning and end of the given string.\n * Also, if there are whitespaces in the middle of the string, reduces whitespace amount to single whitespace.\n *\n * Used mostly in forms to clear whitespaces from name and email fields.\n *\n * @param value\n * @returns The given value without whitespaces\n */\n\nexport const trimAndReplaceWhitespace = (value: string): string => {\n return isPresent(value) && isPresent(value.trim) ? value.trim().replace(/\\s+/g, ' ') : value;\n};\n\nexport const removeWhitespaces = (value: string): string => {\n return isPresent(value) ? value.replace(/\\s+/g, '') : value;\n};\n","<div *ngIf=\"locationCode\" (finScrolledPast)=\"toggleVisible(true)\">\n <button class=\"layout__footer footer-offer\" [class.layout__footer--open]=\"visible\" (click)=\"navigateTo($event)\">\n <div class=\"flex flex--center ps-xxsmall-y ps-small-x\">\n <div class=\"flex--nogrow\">\n <div class=\"pr-xxsmall-r\">\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.AIRCRAFT_HORIZONTAL\"></fcom-icon>\n </div>\n </div>\n <div class=\"flex-1 footer-offer__min-width\">\n <div class=\"flex flex--center\">\n <div class=\"flex-1 align-left footer-offer__min-width footer-offer__location\">\n <div class=\"\">\n <div class=\"truncate overflow-hidden font-body-1\">{{ offer.location }}</div>\n </div>\n </div>\n <div class=\"flex-1 flex align-right align--right flex--nogrow\">\n <div class=\"align-left\" *ngIf=\"offer | finMap: 'locationCode' | finCheapestPricePipe | async as p\">\n <div class=\"font-body-2\">{{ 'pricesStartingFrom' | finLocalization }}</div>\n <div class=\"bold-type font-heading-3\">{{ p[TripType.RETURN] | finPrice: { roundPrice: true } }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </button>\n</div>\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { BOOKING_STEPS } from '@fcom/common/config/booking-config';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { NavigationMenuService } from '@fcom/common/services';\nimport { getBookingStepLink } from '@fcom/common/utils/booking-common.utils';\nimport { TripType } from '@fcom/core/interfaces';\n\nimport { FooterOffer } from '../../interfaces';\n\n@Component({\n selector: 'fin-footer-offer',\n styleUrls: ['./footer-offer.component.scss'],\n templateUrl: './footer-offer.component.html',\n})\nexport class FooterOfferComponent implements OnInit, OnDestroy {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TripType = TripType;\n\n @Input()\n offer: FooterOffer;\n locationCode: string;\n visible = false;\n\n constructor(\n private router: Router,\n private languageService: LanguageService,\n private navMenuService: NavigationMenuService\n ) {}\n\n ngOnInit(): void {\n this.locationCode = this.offer.locationCode;\n }\n\n ngOnDestroy(): void {\n this.navMenuService.setFooterClosed();\n }\n\n toggleVisible(isVisible: boolean): void {\n this.visible = isVisible;\n\n if (this.visible) {\n this.navMenuService.setFooterOpen();\n } else {\n this.navMenuService.setFooterClosed();\n }\n }\n\n navigateTo(event: Event): void {\n event.preventDefault();\n this.router.navigateByUrl(\n getBookingStepLink(this.languageService.langValue, BOOKING_STEPS.ENTRY, { destination: this.locationCode })\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\nimport {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nexport const DIR_DOCUMENT = new InjectionToken<Document>('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n\n/** @docs-private */\nexport function DIR_DOCUMENT_FACTORY(): Document {\n return inject(DOCUMENT);\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\nimport {EventEmitter, Inject, Injectable, Optional, OnDestroy} from '@angular/core';\nimport {DIR_DOCUMENT} from './dir-document-token';\n\nexport type Direction = 'ltr' | 'rtl';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n const value = rawValue?.toLowerCase() || '';\n\n if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n }\n\n return value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\n@Injectable({providedIn: 'root'})\nexport class Directionality implements OnDestroy {\n /** The current 'ltr' or 'rtl' value. */\n readonly value: Direction = 'ltr';\n\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n readonly change = new EventEmitter<Direction>();\n\n constructor(@Optional() @Inject(DIR_DOCUMENT) _document?: any) {\n if (_document) {\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n this.value = _resolveDirectionality(bodyDir || htmlDir || 'ltr');\n }\n }\n\n ngOnDestroy() {\n this.change.complete();\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\nimport {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n@NgModule({\n imports: [Dir],\n exports: [Dir],\n})\nexport class BidiModule {}\n","<form>\n <div class=\"flex\">\n <fcom-text-input\n data-testid=\"additional-email\"\n class=\"block ms-xsmall-t flex-1\"\n [parentForm]=\"parentForm\"\n [displayMargin]=\"false\"\n [translationPrefix]=\"controlName\"\n [controlName]=\"controlName\"\n [placeHolder]=\"parentForm.get(controlName).valid ? placeholder : disabledPlaceholder\"\n [displayMargin]=\"false\"\n ></fcom-text-input>\n <fcom-button\n class=\"add-button flex--self-end ms-small-l ms-xxsmall-b\"\n [text]=\"buttonText | finLocalization\"\n [loading]=\"isLoading\"\n [aria]=\"{ label: buttonText | finLocalization, loadingLabel: 'actions.loading' | finLocalization }\"\n [disabled]=\"!parentForm.get(controlName).valid || !parentForm.get(controlName).value\"\n (clickBtn)=\"addEmail.emit()\"\n [type]=\"ButtonType.SUBMIT\"\n >\n </fcom-button>\n </div>\n</form>\n<div class=\"tag-wrapper flex flex--wrap flex--start ms-small-t\">\n <fcom-tag-button\n *ngFor=\"let email of emailsArray; let i = index\"\n [title]=\"email\"\n [text]=\"email\"\n [disabled]=\"isLoading\"\n [iconName]=\"SvgLibraryIcon.CLOSE_DELETE\"\n (tagClicked)=\"removeEmail.emit(i)\"\n >\n </fcom-tag-button>\n</div>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { ButtonType } from '@fcom/ui-components';\n\n@Component({\n selector: 'fin-additional-email',\n templateUrl: './additional-email.component.html',\n styleUrls: ['./additional-email.component.scss'],\n})\nexport class AdditionalEmailComponent {\n @Input()\n parentForm: UntypedFormGroup;\n @Input()\n controlName: string;\n @Input()\n emailsArray: string[] = [];\n @Input()\n placeholder: string;\n @Input()\n disabledPlaceholder: string;\n @Input()\n buttonText: string;\n @Input()\n isLoading: boolean;\n @Output()\n addEmail: EventEmitter<void> = new EventEmitter();\n @Output()\n removeEmail: EventEmitter<number> = new EventEmitter<number>();\n\n readonly ButtonType = ButtonType;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n}\n","import { Step } from '@fcom/common';\nimport { StringNumberBooleanMap } from '@fcom/core-api';\n\nexport type ManageBookingStepParamsType = StringNumberBooleanMap | null;\nexport type ManageBookingErrorStepWithParams<_T extends ManageBookingStepParamsType = null> = Step;\n\nexport interface CheckInSteps {\n CHECK_IN_STEPS: Step;\n CHECK_IN_BOARDING_PASS: Step;\n}\n\nexport interface ManageBookingSteps extends CheckInSteps {\n CHECK_IN: Step;\n ENTRY: Step;\n VIEW: Step;\n VIEW_PASSENGERS: Step;\n TRAVEL_PREPARATION: Step;\n REVIEW: Step;\n CHECKOUT: Step;\n CONFIRMATION: Step;\n CAR_RENTAL: Step;\n}\n\nexport interface ManageBookingErrorSteps {\n PAYMENT_ERROR: ManageBookingErrorStepWithParams;\n ERROR: ManageBookingErrorStepWithParams;\n ERROR_ROUTE: ManageBookingErrorStepWithParams;\n}\n\nexport const MANAGE_BOOKING_STEPS: ManageBookingSteps = {\n CHECK_IN: {\n path: 'check-in',\n data: {\n server: true,\n },\n },\n CHECK_IN_BOARDING_PASS: {\n path: 'check-in/boarding-pass',\n },\n CHECK_IN_STEPS: {\n path: 'check-in/step',\n },\n ENTRY: {\n path: '',\n data: {\n server: true,\n },\n },\n VIEW: {\n path: 'view',\n },\n VIEW_PASSENGERS: {\n path: 'view/passengers',\n },\n TRAVEL_PREPARATION: {\n path: 'view/travel-preparations',\n },\n REVIEW: {\n path: 'review',\n },\n CHECKOUT: {\n path: 'checkout',\n },\n CONFIRMATION: {\n path: 'confirmation',\n },\n CAR_RENTAL: {\n path: 'view/car-rental',\n },\n};\n\nexport const ERROR_STEPS: ManageBookingErrorSteps = {\n PAYMENT_ERROR: {\n path: 'payment/error',\n },\n ERROR: {\n path: 'error',\n },\n ERROR_ROUTE: {\n path: 'error/:error',\n },\n};\n","import { Step } from '../interfaces';\nimport { BookingErrorSteps, BookingSteps } from '../interfaces/booking/booking-step.interface';\n\nexport const ERROR_STEPS: BookingErrorSteps = {\n ERROR_ROUTE: {\n phase: 0,\n id: 0,\n path: 'error/:error',\n translationKey: null,\n },\n ERROR: {\n phase: 0,\n id: 0,\n path: 'error',\n translationKey: null,\n },\n PAYMENT_ERROR: {\n phase: 0,\n id: 0,\n path: 'payment/error',\n translationKey: null,\n },\n};\n\nlet phaseGenerator = 0;\nlet idGenerator = 0;\nexport const BOOKING_STEPS: BookingSteps = {\n ENTRY: {\n phase: ++phaseGenerator,\n id: ++idGenerator,\n path: '',\n translationKey: 'tripDetails',\n },\n FLIGHT_SELECTION: {\n phase: ++phaseGenerator,\n id: ++idGenerator,\n path: 'flight-selection',\n translationKey: 'flights',\n },\n PAXDETAILS: {\n phase: ++phaseGenerator,\n id: ++idGenerator,\n path: 'passenger-details',\n translationKey: 'passengers',\n },\n ANCILLARIES: {\n phase: ++phaseGenerator,\n id: ++idGenerator,\n path: 'ancillaries',\n translationKey: 'extras',\n },\n PURCHASE_REVIEW: {\n phase: ++phaseGenerator,\n id: ++idGenerator,\n path: 'purchase-review',\n translationKey: 'review',\n },\n CHECKOUT: {\n phase: phaseGenerator,\n id: ++idGenerator,\n path: 'checkout',\n translationKey: 'payment',\n },\n PURCHASE_SUCCESS: {\n phase: ++phaseGenerator,\n id: ++idGenerator,\n path: 'confirmation',\n translationKey: 'success',\n },\n};\n\nexport const BOOKING_STEPS_ARRAY: Step[] = Object.keys(BOOKING_STEPS)\n .filter((key) => !BOOKING_STEPS[key].disabled)\n .map((key) => BOOKING_STEPS[key]);\n\nexport const FLIGHT_SELECTION_CACHE_EXPIRY = 1000 * 60 * 15; // 15 minutes\n\nexport const fareFamiliesWithoutCampaignFiltering = {\n ABCLASIC04: 'ABCCAMP01', // (BIZ, ES TO NA)\n ABCLASIC01: 'ABCCAMP01', // (BIZ, GB TO NA)\n AECLASIC01: 'AECCAMP01', // (ECO, ES/GB TO NA)\n APECLASI01: 'APECCAMP01', // (PE, ES/GB TO NA)\n};\n","<ng-container [ngTemplateOutlet]=\"bookingHeaderSummary\"></ng-container>\n\n<ng-template #bookingHeaderSummary>\n <div\n class=\"flex flex--middle summary-wrapper\"\n [ngClass]=\"{ 'flex--space-between': isMobile$ | async, 'ps-xsmall-y': (enableModifySearch$ | async) === false }\"\n >\n <fin-booking-header-summary\n [bookingSummary]=\"bookingSummary\"\n (modifySearch)=\"modifySearchDetails()\"\n [isClickable]=\"enableModifySearch$ | async\"\n ></fin-booking-header-summary>\n\n <ng-container *ngIf=\"enableModifySearch$ | async\">\n <ng-container *ngTemplateOutlet=\"modifySearchButton\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #modifySearchButton>\n @if (isMobile$ | async) {\n <fcom-icon-button\n [theme]=\"IconButtonTheme.DARK_SECONDARY_OUTLINE\"\n [icon]=\"{\n name: (expand.isOpen$ | async) ? SvgLibraryIcon.CLOSE_DELETE : SvgLibraryIcon.EDIT,\n }\"\n [aria]=\"{\n label: ((expand.isOpen$ | async) ? 'actions.close' : 'bookingWidget.modifySearch') | finLocalization,\n }\"\n (click)=\"toggleDetails()\"\n data-testid=\"global-booking-widget-header-modify\"\n >\n </fcom-icon-button>\n } @else {\n <fcom-button\n [icon]=\"{\n name: (expand.isOpen$ | async) ? SvgLibraryIcon.CLOSE_DELETE : SvgLibraryIcon.EDIT,\n position: IconPosition.LEFT,\n }\"\n [theme]=\"ButtonTheme.DARK_SECONDARY_OUTLINE\"\n [type]=\"ButtonType.MENU\"\n [text]=\"((expand.isOpen$ | async) ? 'actions.close' : 'bookingWidget.modifySearch') | finLocalization\"\n class=\"pr-small-l\"\n (click)=\"toggleDetails()\"\n data-testid=\"global-booking-widget-header-modify\"\n ></fcom-button>\n }\n</ng-template>\n\n<fin-expand\n [key]=\"EXPANDER_KEY\"\n [id]=\"EXPANDER_KEY + '-' + ExpanderStatus.OPEN\"\n [initiallyOpen]=\"false\"\n [targetHeightElement]=\"TARGET_HEIGHT_ELEMENT.PARENT\"\n [useCustomTrigger]=\"true\"\n class=\"dn-mobile\"\n #expand\n>\n <div\n *ngIf=\"enableModifySearch$ | async\"\n class=\"content ps-medium-t ps-xsmall-b nordic-blue-900-text grid-max-width center\"\n >\n <fin-booking-widget-common\n global-booking-widget\n [layout]=\"WidgetLayout.HORIZONTAL\"\n (changeGlobalBookingWidgetExpanderStatus)=\"dispatchExpanderStatus($event)\"\n [usePopoverSelectors]=\"true\"\n [isGlobalBookingWidget]=\"true\"\n ></fin-booking-widget-common>\n </div>\n</fin-expand>\n\n<fcom-modal\n *ngIf=\"(isMobile$ | async) && (enableModifySearch$ | async)\"\n [(open)]=\"modalOpen\"\n [title]=\"'bookingWidget.modifySearch' | finLocalization\"\n [buttons]=\"null\"\n class=\"nordic-blue-900-bg\"\n data-testid=\"global-booking-widget-header-mobile-modal\"\n>\n <div class=\"grow scroll nordic-blue-900-bg\">\n <div class=\"content ps-medium-x ps-small-b ps-xxsmall-t nordic-blue-900-text\">\n <ng-container [ngTemplateOutlet]=\"bookingHeaderSummary\"></ng-container>\n\n <fin-booking-widget-common\n global-booking-widget\n [layout]=\"WidgetLayout.HORIZONTAL\"\n (changeGlobalBookingWidgetExpanderStatus)=\"dispatchExpanderStatus($event)\"\n [usePopoverSelectors]=\"true\"\n [isGlobalBookingWidget]=\"true\"\n ></fin-booking-widget-common>\n </div>\n </div>\n</fcom-modal>\n\n<ng-template #popoverContent>\n <div data-testid=\"promo-popover-content\" class=\"ps-medium rounded-large\">\n <header class=\"flex flex--space-between\">\n <fcom-tag>{{ 'bookingWidget.globalWidgetPromo.tag' | finLocalization }}</fcom-tag>\n </header>\n <p class=\"font-body-1 ps-small-y\">\n {{ 'bookingWidget.globalWidgetPromo.renewed.text' | finLocalization }}\n </p>\n </div>\n</ng-template>\n","import {\n Component,\n Input,\n OnInit,\n ChangeDetectionStrategy,\n HostListener,\n AfterViewInit,\n ViewChild,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport {\n Observable,\n of,\n Subject,\n filter,\n Subscription,\n withLatestFrom,\n BehaviorSubject,\n throttleTime,\n debounceTime,\n} from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { TARGET_HEIGHT_ELEMENT } from '@fcom/common';\nimport { MediaQueryService } from '@fcom/common/services';\nimport { BookingHeaderSummary } from '@fcom/common/interfaces';\nimport {\n ButtonType,\n ButtonSize,\n IconPosition,\n ButtonTheme,\n PopoverService,\n IconButtonSize,\n IconButtonTheme,\n} from '@fcom/ui-components';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { PseudoLocalActions } from '@fcom/core/actions';\nimport { ExpandComponent } from '@fcom/common/components';\nimport { isEmptyObjectOrHasEmptyValues } from '@fcom/core';\n\nimport { BOOKING_WIDGET_CONTEXT, GLOBAL_BOOKING_WIDGET_EXPANDER_KEY } from '../../constants';\nimport { WidgetLayout, ExpanderStatus } from '../../interfaces';\nimport { BookingWidgetGtmService } from '../../services/booking-widget-gtm.service';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\n\n@Component({\n selector: 'fin-global-booking-widget-summary-header',\n templateUrl: './global-booking-widget-summary-header.component.html',\n styleUrls: ['./global-booking-widget-summary-header.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GlobalBookingWidgetSummaryHeaderComponent implements OnInit, AfterViewInit {\n readonly EXPANDER_KEY = 'global-booking-widget-expander';\n readonly TARGET_HEIGHT_ELEMENT = TARGET_HEIGHT_ELEMENT;\n readonly SCROLL_INITIAL_DELAY_TIME = 2000;\n readonly SCROLL_CLOSE_WIDGET_DELAY_TIME = 100;\n readonly ButtonSize = ButtonSize;\n readonly IconPosition = IconPosition;\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonType = ButtonType;\n readonly ExpanderStatus = ExpanderStatus;\n readonly WidgetLayout = WidgetLayout;\n readonly IconButtonSize = IconButtonSize;\n readonly IconButtonTheme = IconButtonTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n isMobile$: Observable<boolean>;\n enableNewSearchAutomatically$: Observable<boolean>;\n lastScrollTop: number = null;\n scrollEvents$ = new Subject<Event>();\n subscription = new Subscription();\n isExpanderOpen$ = new BehaviorSubject<boolean>(false);\n modalOpen = false;\n\n @Input() bookingSummary: BookingHeaderSummary;\n @Input() enableModifySearch$ = of(false);\n\n @ViewChild('expand') expand: ExpandComponent;\n\n @HostListener('window:scroll', ['$event.target'])\n onScroll(event): void {\n if (this.isExpanderOpen$.getValue()) {\n this.scrollEvents$.next(event);\n }\n }\n\n constructor(\n private mediaQueryService: MediaQueryService,\n private store$: Store<BookingAppState>,\n private popoverService: PopoverService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private bookingWidgetService: BookingWidgetService\n ) {}\n\n ngOnInit(): void {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n }\n\n ngAfterViewInit(): void {\n const initTime = Date.now();\n this.subscription.add(\n this.scrollEvents$\n .pipe(\n withLatestFrom(\n this.isMobile$,\n this.bookingWidgetService.globalBookingWidgetSelectionChanges$,\n this.isExpanderOpen$\n ),\n filter(\n ([, isMobile, hasChanges, isWidgetOpen]) =>\n isWidgetOpen && !isMobile && isEmptyObjectOrHasEmptyValues(hasChanges)\n ),\n throttleTime(100),\n // filter out scroll events happening during the page load\n filter(() => initTime + this.SCROLL_INITIAL_DELAY_TIME < Date.now()),\n debounceTime(this.SCROLL_CLOSE_WIDGET_DELAY_TIME)\n )\n .subscribe(([event]) => this.handleScroll(event))\n );\n\n this.subscription.add(\n this.expand.isOpen$.subscribe((isOpen) => {\n if (!isOpen) {\n this.lastScrollTop = null;\n }\n this.isExpanderOpen$.next(isOpen);\n this.popoverService.closeByContext(BOOKING_WIDGET_CONTEXT);\n this.modalOpen = isOpen;\n })\n );\n\n this.subscription.add(\n this.isMobile$.pipe(filter((isMobile) => !isMobile)).subscribe(() => {\n this.dispatchExpanderStatus(ExpanderStatus.OPEN);\n })\n );\n }\n\n dispatchExpanderStatus(expandStatus: ExpanderStatus): void {\n this.store$.dispatch(\n PseudoLocalActions.setValue({\n key: GLOBAL_BOOKING_WIDGET_EXPANDER_KEY,\n data: `${GLOBAL_BOOKING_WIDGET_EXPANDER_KEY}-${expandStatus}`,\n })\n );\n }\n\n modifySearchDetails(): void {\n if (!this.modalOpen) {\n this.bookingWidgetGtmService.trackElementEvent('global-widget-modify-search-details');\n this.dispatchExpanderStatus(ExpanderStatus.OPEN);\n }\n }\n\n toggleDetails(): void {\n this.bookingWidgetGtmService.trackElementEvent(\n `global-widget-${this.isExpanderOpen$.getValue() ? 'cancel-search' : 'modify-search'}`\n );\n this.dispatchExpanderStatus(this.isExpanderOpen$.getValue() ? ExpanderStatus.CLOSE : ExpanderStatus.OPEN);\n }\n\n private handleScroll(event): void {\n const currentScrollTop = event.scrollingElement?.scrollTop ?? 0;\n if (this.lastScrollTop === null) {\n this.lastScrollTop = currentScrollTop;\n return;\n }\n if (currentScrollTop - this.lastScrollTop > 50) {\n this.lastScrollTop = null;\n this.dispatchExpanderStatus(ExpanderStatus.CLOSE);\n } else if (this.lastScrollTop - currentScrollTop > 50) {\n this.lastScrollTop = null;\n this.dispatchExpanderStatus(ExpanderStatus.CLOSE);\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\nexport const MAC_ENTER = 3;\nexport const BACKSPACE = 8;\nexport const TAB = 9;\nexport const NUM_CENTER = 12;\nexport const ENTER = 13;\nexport const SHIFT = 16;\nexport const CONTROL = 17;\nexport const ALT = 18;\nexport const PAUSE = 19;\nexport const CAPS_LOCK = 20;\nexport const ESCAPE = 27;\nexport const SPACE = 32;\nexport const PAGE_UP = 33;\nexport const PAGE_DOWN = 34;\nexport const END = 35;\nexport const HOME = 36;\nexport const LEFT_ARROW = 37;\nexport const UP_ARROW = 38;\nexport const RIGHT_ARROW = 39;\nexport const DOWN_ARROW = 40;\nexport const PLUS_SIGN = 43;\nexport const PRINT_SCREEN = 44;\nexport const INSERT = 45;\nexport const DELETE = 46;\nexport const ZERO = 48;\nexport const ONE = 49;\nexport const TWO = 50;\nexport const THREE = 51;\nexport const FOUR = 52;\nexport const FIVE = 53;\nexport const SIX = 54;\nexport const SEVEN = 55;\nexport const EIGHT = 56;\nexport const NINE = 57;\nexport const FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186\nexport const FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187\nexport const QUESTION_MARK = 63;\nexport const AT_SIGN = 64;\nexport const A = 65;\nexport const B = 66;\nexport const C = 67;\nexport const D = 68;\nexport const E = 69;\nexport const F = 70;\nexport const G = 71;\nexport const H = 72;\nexport const I = 73;\nexport const J = 74;\nexport const K = 75;\nexport const L = 76;\nexport const M = 77;\nexport const N = 78;\nexport const O = 79;\nexport const P = 80;\nexport const Q = 81;\nexport const R = 82;\nexport const S = 83;\nexport const T = 84;\nexport const U = 85;\nexport const V = 86;\nexport const W = 87;\nexport const X = 88;\nexport const Y = 89;\nexport const Z = 90;\nexport const META = 91; // WIN_KEY_LEFT\nexport const MAC_WK_CMD_LEFT = 91;\nexport const MAC_WK_CMD_RIGHT = 93;\nexport const CONTEXT_MENU = 93;\nexport const NUMPAD_ZERO = 96;\nexport const NUMPAD_ONE = 97;\nexport const NUMPAD_TWO = 98;\nexport const NUMPAD_THREE = 99;\nexport const NUMPAD_FOUR = 100;\nexport const NUMPAD_FIVE = 101;\nexport const NUMPAD_SIX = 102;\nexport const NUMPAD_SEVEN = 103;\nexport const NUMPAD_EIGHT = 104;\nexport const NUMPAD_NINE = 105;\nexport const NUMPAD_MULTIPLY = 106;\nexport const NUMPAD_PLUS = 107;\nexport const NUMPAD_MINUS = 109;\nexport const NUMPAD_PERIOD = 110;\nexport const NUMPAD_DIVIDE = 111;\nexport const F1 = 112;\nexport const F2 = 113;\nexport const F3 = 114;\nexport const F4 = 115;\nexport const F5 = 116;\nexport const F6 = 117;\nexport const F7 = 118;\nexport const F8 = 119;\nexport const F9 = 120;\nexport const F10 = 121;\nexport const F11 = 122;\nexport const F12 = 123;\nexport const NUM_LOCK = 144;\nexport const SCROLL_LOCK = 145;\nexport const FIRST_MEDIA = 166;\nexport const FF_MINUS = 173;\nexport const MUTE = 173; // Firefox (Gecko) fires 181 for MUTE\nexport const VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN\nexport const VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP\nexport const FF_MUTE = 181;\nexport const FF_VOLUME_DOWN = 182;\nexport const LAST_MEDIA = 183;\nexport const FF_VOLUME_UP = 183;\nexport const SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON\nexport const EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS\nexport const COMMA = 188;\nexport const DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS\nexport const PERIOD = 190;\nexport const SLASH = 191;\nexport const APOSTROPHE = 192;\nexport const TILDE = 192;\nexport const OPEN_SQUARE_BRACKET = 219;\nexport const BACKSLASH = 220;\nexport const CLOSE_SQUARE_BRACKET = 221;\nexport const SINGLE_QUOTE = 222;\nexport const MAC_META = 224;\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\nexport type ModifierKey = 'altKey' | 'shiftKey' | 'ctrlKey' | 'metaKey';\n\n/**\n * Checks whether a modifier key is pressed.\n * @param event Event to be checked.\n */\nexport function hasModifierKey(event: KeyboardEvent, ...modifiers: ModifierKey[]): boolean {\n if (modifiers.length) {\n return modifiers.some(modifier => event[modifier]);\n }\n\n return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable, Optional, makeStateKey, StateKey } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { BehaviorSubject, combineLatest, forkJoin, merge, Observable, of } from 'rxjs';\nimport { catchError, distinctUntilChanged, filter, map, switchMap, take, tap } from 'rxjs/operators';\n\nimport { MultivariateTestService } from '@fcom/common/multivariate-test/services/multivariate-test.service';\nimport { AppState, ConfigService, SentryLogger, StateTransferService } from '@fcom/core';\nimport { CmsContent, CmsContentType, CmsTemplate, RESPONSE_CODE_HANDLER, ResponseCodeHandler } from '@fcom/core-api';\nimport { Profile, PersonalizationParameterProfileFlagName } from '@fcom/core-api/login';\nimport { profileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors';\nimport { finShare, retryWithBackoff } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { getWhitelistedCmsParamsMapped, pathToTemplateUrl, stringHashCode } from '@fcom/core/utils';\nimport { CmsPersonalizationParameter, CreditCardPersonalizationParameter } from '@fcom/core-api/interfaces';\n\nimport {\n finUniversalResponseStatus,\n hasPersonalizedContent,\n parseCmsTemplate,\n recursiveParse,\n} from '../cms-utils/cms-utils';\n\ninterface CmsPageTemplateWithPath {\n path: string;\n template: CmsTemplate;\n}\n\n// @TODO: We should have proper static error page rendered\nexport const error404template: CmsTemplate = {\n header: [],\n main: [],\n footer: [],\n};\n\n@Injectable()\nexport class CmsTemplateService {\n private segment$: Observable<number>;\n private currentCmsPageTemplate$: BehaviorSubject<CmsPageTemplateWithPath | undefined> = new BehaviorSubject<\n CmsPageTemplateWithPath | undefined\n >(undefined);\n static createStateCacheKey = (templateUrl: string): StateKey<CmsTemplate> =>\n makeStateKey<CmsTemplate>(`cts-${stringHashCode(templateUrl)}`);\n static createP13CacheKey = (contentUrl: string): StateKey<CmsContent> =>\n makeStateKey<CmsContent>(`p13-${stringHashCode(contentUrl)}`);\n\n constructor(\n private http: HttpClient,\n private config: ConfigService,\n private sentryLogger: SentryLogger,\n @Optional()\n @Inject(RESPONSE_CODE_HANDLER)\n private serverResponseCodeHandler: ResponseCodeHandler,\n private stateTransferService: StateTransferService,\n private languageService: LanguageService,\n private multivariateTestService: MultivariateTestService,\n private store$: Store<AppState>\n ) {\n this.segment$ = this.multivariateTestService.segmentsFeed$.pipe(map((value) => value.segment));\n }\n\n /**\n * Load the template for the given path in CMS.\n * <p>\n * Translates path\n * <tt>/en/destination/germany/berlin</tt>\n * to e.g.\n * <tt>http://test.coremedia.dev.app.finnair.com/en/destinations/europe/germany/berlin?view=fin-json</tt>\n *\n * @param path the path to retrieve\n * @returns {Observable<string>} the template as Observable\n */\n load(path: string): Observable<CmsTemplate> {\n const defaultTemplate$ = this.loadOnce(path);\n const personalisedTemplate$ = this.getP13NTemplate(defaultTemplate$);\n\n // NOTE: there is race here so ensure that defaultTemplate$ will always emit ones first and\n // personalisedTemplate$ comes later or not\n return merge(\n defaultTemplate$.pipe(\n map((template) => ({\n ...template,\n main: template.main.filter(\n (item) =>\n !(item.contentType === CmsContentType.CMPersonalized && item.personalizationParameters?.length > 0)\n ),\n }))\n ),\n personalisedTemplate$\n ).pipe(tap((template) => this.currentCmsPageTemplate$.next({ path, template })));\n }\n\n getTemplateForPathIfExists(path: string): Observable<CmsTemplate | undefined> {\n return this.currentCmsPageTemplate$.pipe(\n distinctUntilChanged((a, b) => a?.path === b?.path),\n map((currentPageTemplate) => (currentPageTemplate?.path === path ? currentPageTemplate.template : undefined))\n );\n }\n\n private loadOnce(path: string): Observable<CmsTemplate> {\n const templateUrl = pathToTemplateUrl(this.config.cmsUrl, path);\n const stateKey = CmsTemplateService.createStateCacheKey(templateUrl);\n return this.stateTransferService.wrapToStateCache(stateKey, () => this.getTemplate(templateUrl).pipe(finShare()));\n }\n\n private getTemplate(templateUrl: string): Observable<CmsTemplate> {\n return this.http\n .get<CmsTemplate>(templateUrl, {\n withCredentials: this.config.cfg.enableCorsCredentials,\n observe: 'response',\n })\n .pipe(\n retryWithBackoff(1),\n finUniversalResponseStatus(this.serverResponseCodeHandler, 'CmsTemplateService', templateUrl),\n map((res) => res.body),\n map((data: CmsTemplate) => parseCmsTemplate(data, this.languageService.ddsLocaleValue, this.sentryLogger)),\n // eslint-disable-next-line rxjs/no-implicit-any-catch\n catchError((error: any) => {\n const statusCode = error.status || 500;\n\n if (statusCode !== 404) {\n this.sentryLogger.error('Internal server error', { error });\n }\n if (this.serverResponseCodeHandler) {\n this.serverResponseCodeHandler.setUniversalResponseStatus('CmsTemplateService', statusCode, templateUrl);\n }\n const errorTemplateFromError: CmsTemplate | undefined = (error || {}).error;\n const errorTemplate = errorTemplateFromError?.main ? errorTemplateFromError : error404template;\n return of({ ...errorTemplate, status: statusCode });\n })\n );\n }\n\n private fetchCustomizedContent(contentUrl: string, originalContent: CmsContent): Observable<CmsContent> {\n return this.http\n .get<CmsContent>(contentUrl, {\n withCredentials: this.config.cfg.enableCorsCredentials,\n observe: 'response',\n })\n .pipe(\n retryWithBackoff(1),\n finUniversalResponseStatus(this.serverResponseCodeHandler, 'CmsTemplateService', contentUrl),\n map((res) => recursiveParse(res.body, this.sentryLogger)),\n catchError((error: unknown) => {\n this.sentryLogger.error('Internal server error', { error });\n // Return original content block in case of error so that stream won't be broken\n return of(originalContent);\n })\n );\n }\n\n private getP13NTemplate(template$: Observable<CmsTemplate>): Observable<CmsTemplate> {\n return combineLatest([\n template$,\n this.store$.pipe(profileOrUndefinedIfNotLoggedIn()),\n this.segment$.pipe(take(1)),\n ]).pipe(\n filter(([template]) => hasPersonalizedContent(template.main)),\n switchMap(([template, profileValue, segment]) => {\n const items$: Observable<CmsContent>[] = template.main.map((item) =>\n this.getPersonalizedContentItem(item, profileValue, segment)\n );\n return forkJoin([...items$]).pipe(map((items) => ({ ...template, main: items })));\n }),\n finShare()\n );\n }\n\n private getPersonalizedContentItem(\n contentItem: CmsContent,\n profileValue: Profile,\n segment: number\n ): Observable<CmsContent> {\n if (contentItem.contentType !== CmsContentType.CMPersonalized) {\n const children$ = (contentItem.items ?? []).map((item) =>\n this.getPersonalizedContentItem(item, profileValue, segment)\n );\n return children$.length > 0\n ? forkJoin([...children$]).pipe(map((children: CmsContent[]) => ({ ...contentItem, items: children })))\n : of(contentItem);\n }\n\n // eslint-disable-next-line prefer-spread\n const personalizationSearchParams = contentItem.personalizationParameters;\n const profileTierParam = personalizationSearchParams.includes(CmsPersonalizationParameter.TIER)\n ? `tier=${profileValue?.tier ?? ''}`\n : '';\n const segmentGroupParam = personalizationSearchParams.includes(CmsPersonalizationParameter.GROUP)\n ? `group=${segment}`\n : '';\n const creditCardParamKey = Object.keys(CreditCardPersonalizationParameter).find((key) =>\n personalizationSearchParams.includes(CreditCardPersonalizationParameter[key])\n );\n\n const creditCardPersonalizationParameterValue = CreditCardPersonalizationParameter[creditCardParamKey];\n const creditCardPersonalizationParameterFlagName = PersonalizationParameterProfileFlagName[creditCardParamKey];\n const creditCardParam =\n creditCardParamKey && creditCardPersonalizationParameterFlagName\n ? `${creditCardPersonalizationParameterValue}=${profileValue?.[creditCardPersonalizationParameterFlagName] ? 'true' : 'false'}`\n : '';\n const path = contentItem.url;\n const oldQueryParams = getWhitelistedCmsParamsMapped(path);\n\n const allPersonalizationParams = oldQueryParams\n .concat(profileTierParam, segmentGroupParam, creditCardParam)\n .filter(Boolean)\n .join('&');\n\n const pathWithoutParams = `/${path}`.replace(/\\?.*$/, '').replace(/^\\/\\//g, '/');\n\n const url = pathToTemplateUrl(\n this.config.cmsUrl,\n `${pathWithoutParams}?${allPersonalizationParams}`,\n 'fin-p13n-json'\n );\n\n const stateKey = CmsTemplateService.createP13CacheKey(url);\n return this.stateTransferService\n .wrapToStateCache(stateKey, () => this.fetchCustomizedContent(url, contentItem))\n .pipe(finShare());\n }\n}\n","export enum Breakpoint {\n MOBILE = 'mobile',\n TABLET = 'tablet',\n LAPTOP = 'laptop',\n DESKTOP = 'desktop',\n}\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","import { OnDestroy, Pipe, PipeTransform } from '@angular/core';\n\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * Converts scalar to Observable\n */\n@Pipe({\n name: 'finToObservable',\n pure: false,\n})\nexport class ToObservablePipe<T> implements PipeTransform, OnDestroy {\n private currentValue: T;\n private sub$: ReplaySubject<T> = new ReplaySubject<T>(1);\n private obs$: Observable<T>;\n\n constructor() {\n this.obs$ = this.sub$.pipe(distinctUntilChanged());\n }\n\n ngOnDestroy(): void {\n this.sub$.complete();\n }\n\n transform = (a: T): Observable<T> => {\n if (a !== this.currentValue) {\n this.currentValue = a;\n if (a instanceof Observable) {\n console.error('Received Observable as input in toObservablePipe', a);\n }\n this.sub$.next(a);\n }\n return this.obs$;\n };\n}\n","import { Observable } from '../Observable';\nimport { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { Subscriber } from '../Subscriber';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { Subscription } from '../Subscription';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { AnyCatcher } from '../AnyCatcher';\nimport { executeSchedule } from '../util/executeSchedule';\n\n// combineLatest(any)\n// We put this first because we need to catch cases where the user has supplied\n// _exactly `any`_ as the argument. Since `any` literally matches _anything_,\n// we don't want it to randomly hit one of the other type signatures below,\n// as we have no idea at build-time what type we should be returning when given an any.\n\n/**\n * You have passed `any` here, we can't figure out if it is\n * an array or an object, so you're getting `unknown`. Use better types.\n * @param arg Something typed as `any`\n */\nexport function combineLatest<T extends AnyCatcher>(arg: T): Observable<unknown>;\n\n// combineLatest([a, b, c])\nexport function combineLatest(sources: []): Observable<never>;\nexport function combineLatest<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>]): Observable<A>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function combineLatest<A extends readonly unknown[], R>(\n sources: readonly [...ObservableInputTuple<A>],\n resultSelector: (...values: A) => R,\n scheduler: SchedulerLike\n): Observable<R>;\nexport function combineLatest<A extends readonly unknown[], R>(\n sources: readonly [...ObservableInputTuple<A>],\n resultSelector: (...values: A) => R\n): Observable<R>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function combineLatest<A extends readonly unknown[]>(\n sources: readonly [...ObservableInputTuple<A>],\n scheduler: SchedulerLike\n): Observable<A>;\n\n// combineLatest(a, b, c)\n/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */\nexport function combineLatest<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function combineLatest<A extends readonly unknown[], R>(\n ...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple<A>, (...values: A) => R, SchedulerLike]\n): Observable<R>;\n/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */\nexport function combineLatest<A extends readonly unknown[], R>(\n ...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]\n): Observable<R>;\n/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */\nexport function combineLatest<A extends readonly unknown[]>(\n ...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike]\n): Observable<A>;\n\n// combineLatest({a, b, c})\nexport function combineLatest(sourcesObject: { [K in any]: never }): Observable<never>;\nexport function combineLatest<T extends Record<string, ObservableInput<any>>>(\n sourcesObject: T\n): Observable<{ [K in keyof T]: ObservedValueOf<T[K]> }>;\n\n/**\n * Combines multiple Observables to create an Observable whose values are\n * calculated from the latest values of each of its input Observables.\n *\n * <span class=\"informal\">Whenever any input Observable emits a value, it\n * computes a formula using the latest values from all the inputs, then emits\n * the output of that formula.</span>\n *\n * ![](combineLatest.png)\n *\n * `combineLatest` combines the values from all the Observables passed in the\n * observables array. This is done by subscribing to each Observable in order and,\n * whenever any Observable emits, collecting an array of the most recent\n * values from each Observable. So if you pass `n` Observables to this operator,\n * the returned Observable will always emit an array of `n` values, in an order\n * corresponding to the order of the passed Observables (the value from the first Observable\n * will be at index 0 of the array and so on).\n *\n * Static version of `combineLatest` accepts an array of Observables. Note that an array of\n * Observables is a good choice, if you don't know beforehand how many Observables\n * you will combine. Passing an empty array will result in an Observable that\n * completes immediately.\n *\n * To ensure the output array always has the same length, `combineLatest` will\n * actually wait for all input Observables to emit at least once,\n * before it starts emitting results. This means if some Observable emits\n * values before other Observables started emitting, all these values but the last\n * will be lost. On the other hand, if some Observable does not emit a value but\n * completes, resulting Observable will complete at the same moment without\n * emitting anything, since it will now be impossible to include a value from the\n * completed Observable in the resulting array. Also, if some input Observable does\n * not emit any value and never completes, `combineLatest` will also never emit\n * and never complete, since, again, it will wait for all streams to emit some\n * value.\n *\n * If at least one Observable was passed to `combineLatest` and all passed Observables\n * emitted something, the resulting Observable will complete when all combined\n * streams complete. So even if some Observable completes, the result of\n * `combineLatest` will still emit values when other Observables do. In case\n * of a completed Observable, its value from now on will always be the last\n * emitted value. On the other hand, if any Observable errors, `combineLatest`\n * will error immediately as well, and all other Observables will be unsubscribed.\n *\n * ## Examples\n *\n * Combine two timer Observables\n *\n * ```ts\n * import { timer, combineLatest } from 'rxjs';\n *\n * const firstTimer = timer(0, 1000); // emit 0, 1, 2... after every second, starting from now\n * const secondTimer = timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now\n * const combinedTimers = combineLatest([firstTimer, secondTimer]);\n * combinedTimers.subscribe(value => console.log(value));\n * // Logs\n * // [0, 0] after 0.5s\n * // [1, 0] after 1s\n * // [1, 1] after 1.5s\n * // [2, 1] after 2s\n * ```\n *\n * Combine a dictionary of Observables\n *\n * ```ts\n * import { of, delay, startWith, combineLatest } from 'rxjs';\n *\n * const observables = {\n * a: of(1).pipe(delay(1000), startWith(0)),\n * b: of(5).pipe(delay(5000), startWith(0)),\n * c: of(10).pipe(delay(10000), startWith(0))\n * };\n * const combined = combineLatest(observables);\n * combined.subscribe(value => console.log(value));\n * // Logs\n * // { a: 0, b: 0, c: 0 } immediately\n * // { a: 1, b: 0, c: 0 } after 1s\n * // { a: 1, b: 5, c: 0 } after 5s\n * // { a: 1, b: 5, c: 10 } after 10s\n * ```\n *\n * Combine an array of Observables\n *\n * ```ts\n * import { of, delay, startWith, combineLatest } from 'rxjs';\n *\n * const observables = [1, 5, 10].map(\n * n => of(n).pipe(\n * delay(n * 1000), // emit 0 and then emit n after n seconds\n * startWith(0)\n * )\n * );\n * const combined = combineLatest(observables);\n * combined.subscribe(value => console.log(value));\n * // Logs\n * // [0, 0, 0] immediately\n * // [1, 0, 0] after 1s\n * // [1, 5, 0] after 5s\n * // [1, 5, 10] after 10s\n * ```\n *\n * Use map operator to dynamically calculate the Body-Mass Index\n *\n * ```ts\n * import { of, combineLatest, map } from 'rxjs';\n *\n * const weight = of(70, 72, 76, 79, 75);\n * const height = of(1.76, 1.77, 1.78);\n * const bmi = combineLatest([weight, height]).pipe(\n * map(([w, h]) => w / (h * h)),\n * );\n * bmi.subscribe(x => console.log('BMI is ' + x));\n *\n * // With output to console:\n * // BMI is 24.212293388429753\n * // BMI is 23.93948099205209\n * // BMI is 23.671253629592222\n * ```\n *\n * @see {@link combineLatestAll}\n * @see {@link merge}\n * @see {@link withLatestFrom}\n *\n * @param args Any number of `ObservableInput`s provided either as an array or as an object\n * to combine with each other. If the last parameter is the function, it will be used to project the\n * values from the combined latest values into a new value on the output Observable.\n * @return An Observable of projected values from the most recent values from each `ObservableInput`,\n * or an array of the most recent values from each `ObservableInput`.\n */\nexport function combineLatest<O extends ObservableInput<any>, R>(...args: any[]): Observable<R> | Observable<ObservedValueOf<O>[]> {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n\n const { args: observables, keys } = argsArgArrayOrObject(args);\n\n if (observables.length === 0) {\n // If no observables are passed, or someone has passed an empty array\n // of observables, or even an empty object POJO, we need to just\n // complete (EMPTY), but we have to honor the scheduler provided if any.\n return from([], scheduler as any);\n }\n\n const result = new Observable<ObservedValueOf<O>[]>(\n combineLatestInit(\n observables as ObservableInput<ObservedValueOf<O>>[],\n scheduler,\n keys\n ? // A handler for scrubbing the array of args into a dictionary.\n (values) => createObject(keys, values)\n : // A passthrough to just return the array\n identity\n )\n );\n\n return resultSelector ? (result.pipe(mapOneOrManyArgs(resultSelector)) as Observable<R>) : result;\n}\n\nexport function combineLatestInit(\n observables: ObservableInput<any>[],\n scheduler?: SchedulerLike,\n valueTransform: (values: any[]) => any = identity\n) {\n return (subscriber: Subscriber<any>) => {\n // The outer subscription. We're capturing this in a function\n // because we may have to schedule it.\n maybeSchedule(\n scheduler,\n () => {\n const { length } = observables;\n // A store for the values each observable has emitted so far. We match observable to value on index.\n const values = new Array(length);\n // The number of currently active subscriptions, as they complete, we decrement this number to see if\n // we are all done combining values, so we can complete the result.\n let active = length;\n // The number of inner sources that still haven't emitted the first value\n // We need to track this because all sources need to emit one value in order\n // to start emitting values.\n let remainingFirstValues = length;\n // The loop to kick off subscription. We're keying everything on index `i` to relate the observables passed\n // in to the slot in the output array or the key in the array of keys in the output dictionary.\n for (let i = 0; i < length; i++) {\n maybeSchedule(\n scheduler,\n () => {\n const source = from(observables[i], scheduler as any);\n let hasFirstValue = false;\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n // When we get a value, record it in our set of values.\n values[i] = value;\n if (!hasFirstValue) {\n // If this is our first value, record that.\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n // We're not waiting for any more\n // first values, so we can emit!\n subscriber.next(valueTransform(values.slice()));\n }\n },\n () => {\n if (!--active) {\n // We only complete the result if we have no more active\n // inner observables.\n subscriber.complete();\n }\n }\n )\n );\n },\n subscriber\n );\n }\n },\n subscriber\n );\n };\n}\n\n/**\n * A small utility to handle the couple of locations where we want to schedule if a scheduler was provided,\n * but we don't if there was no scheduler.\n */\nfunction maybeSchedule(scheduler: SchedulerLike | undefined, execute: () => void, subscription: Subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n } else {\n execute();\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport {\n Observable,\n Subscription,\n filter,\n map,\n withLatestFrom,\n distinctUntilChanged,\n combineLatest,\n startWith,\n switchMap,\n forkJoin,\n Subject,\n BehaviorSubject,\n tap,\n} from 'rxjs';\n\nimport { LocationRouteCffData } from '@fcom/core-api';\nimport { GlobalBookingTravelClass, TripType } from '@fcom/core/interfaces';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe, isNotBlank, isPresent, LocationRouteCffService, isEmptyObject } from '@fcom/core';\nimport {\n CommonFeatureState,\n GlobalBookingActions,\n globalBookingTripType,\n globalBookingTravelClass,\n globalBookingAvailableTravelClasses,\n LocationPair,\n TravelClassAvailabilityMap,\n globalBookingPaxAmount,\n} from '@fcom/common/store';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { profile } from '@fcom/core/selectors';\nimport { mapCffsToTravelClasses } from '@fcom/common/utils/booking.utils';\nimport { PaxAmount } from '@fcom/dapi/interfaces';\n\nimport { BookingWidgetActions, BookingWidgetAppState, activeTab } from '../store';\nimport { WidgetTab, AmountUpdateType, PaxUpdateEvent, NotificationWarning } from '../interfaces';\nimport { AVAILABLE_TRIP_TYPES } from '../constants';\nimport { BookingWidgetGtmService } from './booking-widget-gtm.service';\nimport { BookingWidgetFlightService } from './booking-widget-flight.service';\nimport { getGtmPassengers } from '../utils/utils.gtm';\n\n@Injectable({ providedIn: 'root' })\nexport class BookingWidgetTripService implements OnDestroy {\n readonly activeTab$: Observable<WidgetTab>;\n readonly selectedTripType$: Observable<TripType>;\n readonly availableTripTypes$: Observable<TripType[]>;\n readonly selectedTravelClass$: Observable<GlobalBookingTravelClass>;\n readonly availableTravelClasses$: Observable<GlobalBookingTravelClass[]>;\n readonly paxAmount$: Observable<PaxAmount>;\n private subscription = new Subscription();\n private setPaxDetailsGtm$: Subject<boolean> = new Subject<boolean>();\n private _routeCffReady$ = new BehaviorSubject<boolean>(false);\n\n get routeCffReady$(): Observable<boolean> {\n return this._routeCffReady$.asObservable();\n }\n\n constructor(\n private store$: Store<CommonFeatureState & BookingWidgetAppState>,\n private languageService: LanguageService,\n private bookingWidgetGtmService: BookingWidgetGtmService,\n private locationRouteCffService: LocationRouteCffService,\n private bookingWidgetFlightService: BookingWidgetFlightService\n ) {\n this.selectedTripType$ = this.store$.pipe(\n globalBookingTripType(),\n map((tripType: TripType) => tripType ?? TripType.RETURN),\n finShare()\n );\n\n this.activeTab$ = this.store$.pipe(\n activeTab(),\n map((tab: WidgetTab) => tab ?? WidgetTab.FLIGHT),\n distinctUntilChanged(),\n finShare()\n );\n\n this.availableTripTypes$ = this.activeTab$.pipe(\n map((tab: WidgetTab) =>\n tab === WidgetTab.AWARD ? AVAILABLE_TRIP_TYPES.filter((t) => t !== TripType.MULTICITY) : AVAILABLE_TRIP_TYPES\n ),\n finShare()\n );\n\n this.paxAmount$ = this.store$.pipe(globalBookingPaxAmount(), finShare());\n\n this.availableTravelClasses$ = this.store$.pipe(globalBookingAvailableTravelClasses(), finShare());\n\n this.selectedTravelClass$ = this.store$.pipe(globalBookingTravelClass(), distinctUntilChanged(), finShare());\n\n // subscription\n this.setTripTypeBasedOnTab();\n this.getAvailableTravelClasses(this.bookingWidgetFlightService.bookingLocations$);\n this.setPaxDetailsGtm();\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n setTravelClass(travelClass: GlobalBookingTravelClass): void {\n this.bookingWidgetGtmService.trackElementEvent('travel-class', travelClass);\n this.store$.dispatch(GlobalBookingActions.setTravelClass({ travelClass }));\n }\n\n setActiveTab(tab: WidgetTab): void {\n this.store$.dispatch(BookingWidgetActions.setActiveTab({ activeTab: tab }));\n }\n\n setTripType(tripType: TripType): void {\n if (!tripType) {\n return;\n }\n\n this.bookingWidgetGtmService.trackElementEvent('travel-type', tripType.toUpperCase());\n this.store$.dispatch(GlobalBookingActions.setTripType({ tripType }));\n\n if (tripType === TripType.MULTICITY) {\n // we need to reset discount code when going to multicity tab because its not in use\n this.store$.dispatch(GlobalBookingActions.setDiscountCode(null));\n }\n }\n\n setReturnTripType(): void {\n this.setTripType(TripType.RETURN);\n this.bookingWidgetGtmService.trackElementEvent('add-return-button');\n }\n\n setPaxAmount({ paxType, amount, updateType }: PaxUpdateEvent): void {\n if (updateType === AmountUpdateType.DECREMENT) {\n this.store$.dispatch(GlobalBookingActions.decreasePaxAmountField({ field: paxType, decrement: amount }));\n } else {\n this.store$.dispatch(GlobalBookingActions.increasePaxAmountField({ field: paxType, increment: amount }));\n }\n this.setPaxDetailsGtm$.next(true);\n }\n\n private getAvailableTravelClasses(bookingLocations$: Observable<LocationPair[]>): void {\n this.subscription.add(\n combineLatest([\n bookingLocations$.pipe(\n map((locations) =>\n locations.filter(\n ({ origin, destination }) => isNotBlank(origin?.locationCode) && isNotBlank(destination?.locationCode)\n )\n ),\n distinctUntilChanged(\n (prev, next) =>\n prev.length === next.length &&\n next.every(\n (l, i) =>\n l.origin?.locationCode === prev[i]?.origin?.locationCode &&\n l.destination?.locationCode === prev[i]?.destination?.locationCode\n )\n )\n ),\n this.activeTab$,\n this.store$.pipe(profile(), startWith(undefined), finShare()),\n ])\n .pipe(\n filter(\n ([locations, activeTab, profile]) =>\n locations.length > 0 &&\n (activeTab === WidgetTab.FLIGHT || (activeTab === WidgetTab.AWARD && isPresent(profile))) &&\n locations.every((location) => location.origin && location.destination)\n ),\n tap(() => this._routeCffReady$.next(false)),\n switchMap(([validLocations, tab, userProfile]) =>\n forkJoin(\n validLocations.map(({ origin, destination }) =>\n this.locationRouteCffService.routeCffsFor(\n origin.locationCode,\n destination.locationCode,\n tab === WidgetTab.AWARD ? 'true' : 'false',\n this.languageService.localeValue,\n userProfile?.isCorporate ? 'true' : 'false'\n )\n )\n ).pipe(map((routeCffDataForFlights) => ({ routeCffDataForFlights, tab })))\n ),\n map(({ routeCffDataForFlights, tab }) => {\n if (routeCffDataForFlights.some((cffData) => isEmptyObject(cffData))) {\n this.store$.dispatch(\n BookingWidgetActions.setNotificationWarning({\n key:\n tab === WidgetTab.AWARD\n ? NotificationWarning.NO_AWARD_FLIGHTS_FOR_ROUTE\n : NotificationWarning.NO_FLIGHTS_FOR_ROUTE,\n isActive: true,\n })\n );\n return undefined;\n }\n this._routeCffReady$.next(true);\n return this.mapCffsToAvailableTravelClasses(routeCffDataForFlights);\n }),\n filter(Boolean),\n finShare()\n )\n .subscribe((availableTravelClass) => {\n this.store$.dispatch(GlobalBookingActions.setAvailableClasses({ availability: availableTravelClass }));\n })\n );\n }\n\n private mapCffsToAvailableTravelClasses(locationRouteCffData: LocationRouteCffData[]): TravelClassAvailabilityMap {\n return locationRouteCffData\n .map((cffsForFlight) =>\n mapCffsToTravelClasses(cffsForFlight).filter((travelClass) => travelClass !== GlobalBookingTravelClass.FIRST)\n )\n .flat()\n .reduce((uniqueClasses, classes) => {\n uniqueClasses[classes] = true;\n return uniqueClasses;\n }, {}) as TravelClassAvailabilityMap;\n }\n\n private setTripTypeBasedOnTab(): void {\n // We don't offer multi-city for award flow so we default to return if multi-city is selected\n this.subscription.add(\n this.activeTab$\n .pipe(\n withLatestFrom(this.selectedTripType$),\n filter(([tab, tripType]) => tab === WidgetTab.AWARD && tripType === TripType.MULTICITY)\n )\n .subscribe(() => {\n this.setTripType(TripType.RETURN);\n })\n );\n }\n\n private setPaxDetailsGtm(): void {\n this.subscription.add(\n this.setPaxDetailsGtm$\n .pipe(\n filter((value) => Boolean(value)),\n withLatestFrom(this.paxAmount$),\n map(([_, paxAmount]) => paxAmount)\n )\n .subscribe((paxDetails: PaxAmount) => {\n const { adults, children, infants } = getGtmPassengers(paxDetails);\n this.bookingWidgetGtmService.trackElementEvent(\n 'pax-amount',\n `MAINPAX: ${adults}, CHD: ${children}, INF: ${infants}, MAINPAXTYPE: ADT`\n );\n this.setPaxDetailsGtm$.next(false);\n })\n );\n }\n}\n","import { PaxAmount } from '@fcom/dapi';\n\nimport { GtmPassengers } from '../interfaces';\n\nexport const getGtmPassengers = (paxAmount: PaxAmount): GtmPassengers => {\n const { adults, c15s, children, infants } = paxAmount;\n return {\n adults,\n children: children + c15s,\n infants,\n };\n};\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { NEVER, Observable, Subscription } from 'rxjs';\nimport { share, takeUntil } from 'rxjs/operators';\n\nimport { SentryLogger } from '@fcom/core';\nimport { mapErrorForSentry, unsubscribe } from '@fcom/core/utils';\nimport { snapshot } from '@fcom/rx';\nimport { CommonBookingAncillaryService } from '@fcom/common-booking/modules/ancillaries/services';\nimport { SeatMapActions } from '@fcom/common-booking/store';\nimport { SeatmapSvgAndControlData } from '@fcom/dapi/api/models';\nimport { BookingAppState } from '@fcom/common/interfaces/booking/booking-state.interface';\n\nimport { cartFlight } from '../../../store/selectors';\n\n@Injectable()\nexport class AncillaryService implements OnDestroy {\n private seatMapSubscription: Subscription;\n\n constructor(\n private commonAncillaryService: CommonBookingAncillaryService,\n private store$: Store<BookingAppState>,\n private sentryLogger: SentryLogger\n ) {}\n\n ngOnDestroy(): void {\n unsubscribe(this.seatMapSubscription);\n }\n\n /**\n * Triggers seat map fetching for the given parameters.\n * @param flightId\n * @param cartId\n * @param cartHash\n * @param currencyCode\n * @param cancelStream$ when this observable emits for the first time, the stream will be cancelled.\n */\n triggerFetchSeatMap(\n flightId: string,\n cartId: string,\n cartHash: string,\n currencyCode?: string,\n cancelStream$: Observable<void> = NEVER\n ): Observable<SeatmapSvgAndControlData> {\n unsubscribe(this.seatMapSubscription);\n const departureDateTime = snapshot(this.store$.pipe(cartFlight(flightId)))?.departure.dateTime;\n this.store$.dispatch(SeatMapActions.startLoading({ flightId }));\n const stream$ = this.commonAncillaryService\n .getCartSeatMapForFlight(flightId, departureDateTime, cartId, cartHash, currencyCode)\n .pipe(takeUntil(cancelStream$), share());\n this.seatMapSubscription = stream$.subscribe({\n next: (seatMap) => {\n this.store$.dispatch(SeatMapActions.setSeatMap({ seatMapForFlight: { seatMap, flightId } }));\n unsubscribe(this.seatMapSubscription);\n },\n // eslint-disable-next-line rxjs/no-implicit-any-catch\n error: (error: Error) => {\n this.sentryLogger.error('Error fetching seat map', {\n error: mapErrorForSentry(error),\n });\n this.store$.dispatch(SeatMapActions.error({ flightId }));\n unsubscribe(this.seatMapSubscription);\n },\n complete: () => {\n unsubscribe(this.seatMapSubscription);\n },\n });\n return stream$;\n }\n}\n","import { createSelector, createFeatureSelector, select } from '@ngrx/store';\n\nimport { safeSelect, StateSelector } from '@fcom/core/selectors/selector-utils';\nimport { LocationsState } from '@fcom/locations/interfaces/locations-state.interface';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { mapValues } from '@fcom/core/utils';\nimport { GlobalBookingTravelClass, GlobalBookingTravelClassValue, LocalDate } from '@fcom/core';\nimport { TripType } from '@fcom/core/interfaces';\nimport { LocationsMap, LocationRouteType } from '@fcom/core-api/interfaces';\nimport { PaxAmount } from '@fcom/dapi/interfaces';\n\nimport {\n CommonState,\n CommonFeatureState,\n GlobalBookingState,\n TravelClassState,\n TravelClasses,\n GlobalBookingFlight,\n LocationPair,\n} from '../store.interface';\nimport { COMMON_FEATURE_KEY } from '../constants';\nimport { GlobalBookingTripDates } from '../../interfaces';\n\nconst mapToCachedLocations = (flights: GlobalBookingFlight[], locationsMap: LocationsMap): GlobalBookingFlight[] =>\n flights?.map(({ origin, destination, departureDate }) => ({\n origin: locationsMap?.[origin?.locationCode] ?? origin,\n destination: locationsMap?.[destination?.locationCode] ?? destination,\n departureDate: convertToLocalDateIfNeeded(departureDate),\n }));\n\nconst _cachedLocationsMap = createSelector(\n (appState: BookingAppState) => appState?.locations,\n (locationsState: LocationsState) => locationsState?.locations\n);\n\nconst _selectCommonState = createFeatureSelector<CommonFeatureState, CommonState>(COMMON_FEATURE_KEY);\n\nconst _selectGlobalBookingState = createSelector(\n _selectCommonState,\n _cachedLocationsMap,\n (state: CommonState, cachedLocations: LocationsMap) => ({\n ...state.globalBooking,\n flights: mapToCachedLocations(state.globalBooking.flights, cachedLocations),\n })\n);\nconst _getGlobalBookingTripType = createSelector(\n _selectGlobalBookingState,\n (globalBookingState: GlobalBookingState) => globalBookingState.tripType\n);\nconst _getGlobalBookingFlights = createSelector(_selectGlobalBookingState, (globalBookingState) =>\n globalBookingState.flights.map((flight) => ({\n ...flight,\n departureDate: convertToLocalDateIfNeeded(flight.departureDate),\n }))\n);\n\nconst _globalBookingTravelClassState = createSelector(\n _selectGlobalBookingState,\n (state: GlobalBookingState) => state.travelClasses\n);\n\nconst convertToLocalDateIfNeeded = (date: LocalDate | string): LocalDate =>\n date ? (date instanceof LocalDate ? date : new LocalDate(date)) : undefined;\n\nconst _getGlobalBookingTravelDates = createSelector(_getGlobalBookingFlights, (flights: GlobalBookingFlight[]) => ({\n departureDate: convertToLocalDateIfNeeded(flights[0]?.departureDate),\n ...(flights[1]?.departureDate && {\n returnDate: convertToLocalDateIfNeeded(flights[1]?.departureDate),\n }),\n}));\n\nconst _globalBookingAvailableTravelClasses = createSelector(\n _globalBookingTravelClassState,\n (travelClasses: TravelClassState): GlobalBookingTravelClass[] =>\n Object.keys(travelClasses.availability).reduce((availableClasses, travelClass: GlobalBookingTravelClass) => {\n if (travelClasses.availability[travelClass]) {\n availableClasses.push(travelClass);\n }\n return availableClasses;\n }, [])\n);\n\nconst _getGlobalBookingTravelClass = createSelector(\n _selectGlobalBookingState,\n _globalBookingAvailableTravelClasses,\n (globalBookingState: GlobalBookingState, availableClasses: GlobalBookingTravelClass[]) =>\n availableClasses.includes(globalBookingState.travelClasses.selected)\n ? globalBookingState.travelClasses.selected\n : availableClasses[0]\n);\n\nconst _globalBookingTravelClasses = createSelector(\n _globalBookingTravelClassState,\n (tcs: TravelClassState): TravelClasses =>\n tcs\n ? mapValues(tcs.availability, (available: boolean, key: GlobalBookingTravelClassValue) => ({\n available,\n selected: tcs.selected === key,\n }))\n : undefined\n);\nconst _getGlobalBookingOrigin = createSelector(\n _selectGlobalBookingState,\n (globalBookingState: GlobalBookingState) => globalBookingState.origin\n);\n\nconst _getGlobalBookingRouteType = createSelector(\n _selectGlobalBookingState,\n (globalBookingState: GlobalBookingState) => globalBookingState.routeType\n);\n\nconst _getGlobalBookingDiscountCode = createSelector(\n _selectGlobalBookingState,\n (globalBookingState: GlobalBookingState) => globalBookingState.discountCode\n);\n\nconst _globalBookingLocations = createSelector(_getGlobalBookingFlights, (flights: GlobalBookingFlight[]) =>\n flights.map(({ origin, destination }) => ({ origin, destination }))\n);\n\nexport const _globalBookingPaxAmount = createSelector(\n _selectGlobalBookingState,\n (globalBookingState) => globalBookingState?.paxAmount\n);\nexport const globalBookingTripType = (): StateSelector<CommonFeatureState, TripType> =>\n select(_getGlobalBookingTripType);\nexport const globalBookingTravelClass = (): StateSelector<CommonFeatureState, GlobalBookingTravelClass> =>\n select(_getGlobalBookingTravelClass);\nexport const globalBookingTravelClasses = (): StateSelector<CommonFeatureState, TravelClasses> =>\n select(_globalBookingTravelClasses);\nexport const globalBookingAvailableTravelClasses = (): StateSelector<CommonFeatureState, GlobalBookingTravelClass[]> =>\n select(_globalBookingAvailableTravelClasses);\nexport const globalBookingSelections = (): StateSelector<CommonFeatureState, GlobalBookingState> =>\n select(_selectGlobalBookingState);\nexport const globalBookingOrigin = (): StateSelector<CommonFeatureState, string> => select(_getGlobalBookingOrigin);\nexport const globalBookingRouteType = (): StateSelector<CommonFeatureState, LocationRouteType> =>\n select(_getGlobalBookingRouteType);\nexport const globalBookingDiscountCode = (): StateSelector<CommonFeatureState, string> =>\n select(_getGlobalBookingDiscountCode);\nexport const globalBookingLocations = (): StateSelector<CommonFeatureState, LocationPair[]> =>\n select(_globalBookingLocations);\nexport const globalBookingPaxAmount = (): StateSelector<CommonFeatureState, PaxAmount> =>\n safeSelect(_globalBookingPaxAmount);\nexport const globalBookingFlights = (): StateSelector<CommonFeatureState, GlobalBookingFlight[]> =>\n safeSelect(_getGlobalBookingFlights);\nexport const globalBookingTravelDates = (): StateSelector<CommonFeatureState, GlobalBookingTripDates> =>\n select(_getGlobalBookingTravelDates);\n","export enum IconPosition {\n LEFT = 'left',\n NONE = 'none',\n RIGHT = 'right',\n}\n","import { Injectable } from '@angular/core';\n\nimport { IconLibrary } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { icons } from '@finnairoyj/fcom-ui-styles';\n\nimport { type IconName, type IconSet } from '../icons.interfaces';\nimport { IconsService } from './icons.service';\n\n/**\n * Helper service for adding Icons from the ui-styles icons manifest to the icons service without inserting an fcom-icon into the dom\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class IconsPreloadService {\n private icons = icons;\n\n constructor(private readonly iconsService: IconsService) {}\n\n /**\n * function for adding icons by name from the ui-styles icons manifest into the icon service\n *\n * @param iconsData\n */\n preloadIcons(iconsData: IconSet | IconSet[]): void {\n if (!iconsData) {\n return;\n }\n if (Array.isArray(iconsData)) {\n iconsData.forEach((iconData) => this.addIcon(iconData.name, iconData.category || IconLibrary.SVG_LIBRARY));\n } else {\n this.addIcon(iconsData.name, iconsData.category || IconLibrary.SVG_LIBRARY);\n }\n }\n\n private addIcon(name: IconName, category: IconLibrary): void {\n if (this.icons[category]?.[name]) {\n const iconRef = `${String(category)}/${String(name)}`;\n this.iconsService.addIcon(iconRef, this.icons[category][name]);\n }\n }\n}\n","import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n */\nexport class Subscription implements SubscriptionLike {\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude<TeardownLogic, void>[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude<TeardownLogic, void>): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n","<div class=\"flex\" data-hj-suppress>\n <div class=\"flex--nogrow ps-xsmall-r\">\n <fcom-icon\n [name]=\"\n accompanyingAdult\n ? SvgLibraryIcon.INFANT\n : accompanyingInfant\n ? SvgLibraryIcon.ADULT_INFANT\n : SvgLibraryIcon.SINGLE_PAX\n \"\n ></fcom-icon>\n </div>\n <div class=\"flex-1 font-body-1\">\n <div class=\"flex flex--center mobile-flex\">\n <div class=\"flex-1 flex--self-start\">\n <div class=\"flex flex--align-baseline mobile-flex\">\n <span class=\"font-heading-5\">{{ extendedPassenger.firstName }} {{ extendedPassenger.lastName }}</span>\n <span class=\"font-body-1 medium-type\"\n >{{ 'passenger.' + extendedPassenger.paxTypeKey | finLocalization | titlecase }}\n <span *ngIf=\"accompanyingInfant\"\n >({{\n 'passenger.withInfant'\n | finLocalization\n : { withInfantFullName: accompanyingInfant.firstName + ' ' + accompanyingInfant.lastName }\n | finToLowerCase: ''\n }})</span\n ><span *ngIf=\"accompanyingAdult\"\n >({{\n 'passengerReview.withAdult'\n | finLocalization\n : { withAdultFullName: accompanyingAdult.firstName + ' ' + accompanyingAdult.lastName }\n | finToLowerCase: ''\n }})</span\n ></span\n >\n </div>\n <div>\n <div *ngIf=\"extendedPassenger.dateOfBirth\" class=\"ps-xsmall-t\">\n {{ 'passengerReview.dateOfBirth' | finLocalization }}\n {{ extendedPassenger.dateOfBirth | finDateFormat: 'DATE' }}\n </div>\n <div *ngIf=\"extendedPassenger.email\" class=\"ps-xsmall-t\">\n <fcom-icon class=\"icon-small\" [name]=\"SvgLibraryIcon.EMAIL\"></fcom-icon>\n {{ extendedPassenger.email | lowercase }}\n </div>\n <div *ngIf=\"extendedPassenger.phoneNumbers?.length > 0\" class=\"ps-xsmall-t\">\n <ng-container *ngFor=\"let phone of extendedPassenger.phoneNumbers; let first = first\"\n ><span *ngIf=\"!first\"> / </span\n ><span\n ><fcom-icon class=\"icon-small\" [name]=\"SvgLibraryIcon.PHONE\"></fcom-icon> (+{{ phone?.countryPrefix }})\n {{ phone?.number }}</span\n ></ng-container\n >\n </div>\n\n <fin-passenger-ff-cards [cards]=\"extendedPassenger.cards\"></fin-passenger-ff-cards>\n </div>\n <ng-content></ng-content>\n </div>\n <div class=\"flex--nogrow flex--self-end mobile-padding\" *ngIf=\"showEdit\">\n <fcom-button\n (clickBtn)=\"edit.emit()\"\n [text]=\"'actions.edit' | finLocalization\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [icon]=\"{ name: SvgLibraryIcon.EDIT, position: IconPosition.RIGHT }\"\n ></fcom-button>\n </div>\n </div>\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { asPaxTypeKey } from '@fcom/dapi/utils';\nimport { FinnairPassengerCode, FinnairPassengerItem } from '@fcom/dapi/api/models';\nimport { ButtonTheme, IconPosition, TagRoundingStyle } from '@fcom/ui-components';\n\nimport { FrequentFlyerCardItemWithTranslations } from '../../interfaces/passenger.interface';\nimport { getFrequentFlyerLabelForNonAyCard, getOneWorldTierName, getTierName } from '../../utils/passenger.utils';\n\n@Component({\n selector: 'fin-passenger-info',\n templateUrl: 'passenger-info.component.html',\n styleUrls: ['./passenger-info.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PassengerInfoComponent implements OnInit, OnChanges {\n readonly ButtonTheme = ButtonTheme;\n readonly FinnairPassengerCode = FinnairPassengerCode;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagRoundingStyle = TagRoundingStyle;\n\n @Input()\n passenger: FinnairPassengerItem;\n\n @Input()\n accompanyingAdult: FinnairPassengerItem;\n\n @Input()\n accompanyingInfant: FinnairPassengerItem;\n\n @Input()\n showEdit = false;\n\n @Output()\n edit: EventEmitter<void> = new EventEmitter();\n\n extendedPassenger: FinnairPassengerItem & {\n paxTypeKey: string;\n cards: FrequentFlyerCardItemWithTranslations[];\n };\n\n ngOnInit(): void {\n this.updatePassenger();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['passenger']) {\n this.updatePassenger();\n }\n }\n\n private updatePassenger(): void {\n this.extendedPassenger = {\n ...this.passenger,\n paxTypeKey: asPaxTypeKey(this.passenger.passengerTypeCode).toLowerCase(),\n cards: (this.passenger.frequentFlyerCards ?? []).map((card) => ({\n ...card,\n translationKey: getFrequentFlyerLabelForNonAyCard(card),\n tierLevelName: getTierName(card),\n oneWorldTierName: getOneWorldTierName(card),\n })),\n };\n }\n}\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { EMPTY, Observable, Subject } from 'rxjs';\nimport { filter, share, take } from 'rxjs/operators';\n\ntype ObserverOptions = {\n root: Element | null;\n rootMargin?: string;\n threshold?: number | number[];\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ScrolledPastService {\n private observer: IntersectionObserver;\n private intersectionSubject = new Subject<IntersectionObserverEntry>();\n private intersectionSubject$ = this.intersectionSubject.asObservable().pipe(share());\n\n constructor(@Inject(PLATFORM_ID) private platform: object) {}\n\n listenToElement(element: Element, offset?: number): Observable<IntersectionObserverEntry> {\n if (isPlatformServer(this.platform)) {\n return EMPTY;\n }\n\n if (!this.observer) {\n const options: ObserverOptions = {\n root: null,\n };\n if (offset) {\n options.rootMargin = `${offset}px`;\n }\n\n this.observer = new IntersectionObserver(this.loadingCallback.bind(this), options);\n\n // FixMe: polyfill hack to poll for intersection. Without this the observer listens to window scroll and resize events\n (this.observer as any).POLL_INTERVAL = 200;\n }\n\n this.observer.observe(element);\n\n return new Observable<IntersectionObserverEntry>((obs) => {\n this.intersectionSubject$\n .pipe(\n filter((entry) => entry.target === element),\n take(1)\n )\n .subscribe((entry) => {\n obs.next(entry);\n obs.complete();\n this.observer.unobserve(element);\n });\n });\n }\n\n private loadingCallback(entries: IntersectionObserverEntry[]) {\n entries.filter((entry) => entry.isIntersecting).forEach((entry) => this.intersectionSubject.next(entry));\n }\n}\n","import {\n AfterViewInit,\n Directive,\n ElementRef,\n EventEmitter,\n OnDestroy,\n Output,\n Inject,\n PLATFORM_ID,\n NgZone,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\nimport { Subject } from 'rxjs';\nimport { delay, takeUntil } from 'rxjs/operators';\n\nimport { ScrolledPastService } from './scrolled-past.service';\n\n/**\n * Emits event in (scrolledPast) when the element is in viewport\n * or scrolled past\n */\n@Directive({\n selector: '[finScrolledPast]',\n})\nexport class ScrolledPastDirective implements AfterViewInit, OnDestroy {\n @Output()\n finScrolledPast: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n private ngDestroyed$ = new Subject<void>();\n\n constructor(\n private el: ElementRef<HTMLElement>,\n private scrolledPastService: ScrolledPastService,\n private ngZone: NgZone,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngAfterViewInit(): void {\n if (isPlatformServer(this.platform)) {\n return;\n }\n this.listenToIntersectionEvents();\n }\n\n ngOnDestroy = (): void => {\n this.ngDestroyed$.next();\n this.ngDestroyed$.complete();\n };\n\n private listenToIntersectionEvents() {\n const events$ = this.scrolledPastService.listenToElement(this.el.nativeElement);\n // Delay because we need to run in the following change detection cycle\n this.ngZone.runOutsideAngular(() => {\n events$.pipe(delay(1), takeUntil(this.ngDestroyed$)).subscribe(() => {\n this.finScrolledPast.emit(true);\n this.finScrolledPast.complete();\n });\n });\n }\n}\n","<div\n class=\"fare-family-option rounded-large white-bg flex flex--column grow border relative\"\n [style.outline-color]=\"extendedFareFamily.selected ? extendedFareFamily.benefits.brandColor : ''\"\n [ngClass]=\"{\n selected: extendedFareFamily.selected,\n }\"\n>\n @if (extendedFareFamily.badgeType) {\n <div class=\"absolute badge z1 ms-xsmall-t ms-xsmall-r\">\n @if (extendedFareFamily.badgeType !== FareFamilyBadgeType.CMS) {\n <fcom-tag [theme]=\"tagTheme$ | async\">\n @if (extendedFareFamily.badgeType === FareFamilyBadgeType.POPULAR) {\n {{ 'ticketSelection.fareFamily.ribbonText' | finLocalization }}\n } @else if (extendedFareFamily.badgeType === FareFamilyBadgeType.NEW) {\n {{ 'booking.newFareFamilyLabel' | finLocalization }}\n }\n </fcom-tag>\n } @else {\n @for (tag of extendedFareFamily.benefits.tags; track tag.text) {\n <fcom-tag [theme]=\"tagTheme$ | async\" [roundingStyle]=\"castTagRoundingStyle(tag.roundingStyle)\">\n @if (tag.icon && (tag.iconPosition === 'left' || tag.iconPosition === undefined)) {\n <fcom-icon\n [name]=\"castIconName(tag.icon.name)\"\n [category]=\"castIconCategory(tag.icon.category)\"\n class=\"icon-small ms-xxsmall-r\"\n ></fcom-icon>\n }\n <span>{{ tag.text }}</span>\n @if (tag.icon && tag.iconPosition === 'right') {\n <fcom-icon\n [name]=\"castIconName(tag.icon.name)\"\n [category]=\"castIconCategory(tag.icon.category)\"\n class=\"icon-small ms-xxsmall-r\"\n ></fcom-icon>\n }\n </fcom-tag>\n }\n }\n </div>\n }\n <button\n class=\"fare-header border-bottom overflow-hidden rounded-top-large flex--column flex--align-stretch relative\"\n [style.--hover-color]=\"extendedFareFamily.benefits.brandColor\"\n [ngClass]=\"{ 'nordic-blue-25-bg': !extendedFareFamily.selected }\"\n [style.background-color]=\"extendedFareFamily.selected ? extendedFareFamily.benefits.brandColor : ''\"\n (click)=\"handleSelectFareFamilyClick($event, extendedFareFamily)\"\n data-testid=\"fare-family-option-select-button\"\n >\n <div class=\"flex flex--column ps-small\">\n <fcom-icon\n class=\"icon-medium circle\"\n [ngClass]=\"{\n 'border white-border nordic-blue-900-bg white-text selected': extendedFareFamily.selected,\n 'nordic-blue-900-border white-bg': !extendedFareFamily.selected,\n }\"\n [name]=\"extendedFareFamily.selected ? SvgLibraryIcon.CHECKMARK : SvgLibraryIcon.RADIOBUTTON_UNSELECTED\"\n >\n </fcom-icon>\n <div class=\"flex flex--column ms-xsmall-t\">\n <span\n class=\"font-body-1 medium-type align-left brand-name\"\n [ngClass]=\"extendedFareFamily.selected ? 'white-text' : 'nordic-blue-900-text'\"\n >\n {{ extendedFareFamily.benefits.brandName }}</span\n >\n <div\n class=\"fare-family-option-price align-left\"\n [ngClass]=\"{\n 'font-heading-3': !extendedFareFamily.points,\n 'font-heading-4': extendedFareFamily.points,\n }\"\n >\n <span\n class=\"bold-type\"\n [ngClass]=\"\n extendedFareFamily.selected\n ? 'white-text'\n : hasSpecialOffer || (extendedFareFamily.originalPrice && extendedFareFamily.discountReasonCode)\n ? 'heather-700-text'\n : 'blue-900-text'\n \"\n >\n <span *ngIf=\"extendedFareFamily.points\"\n >{{\n 'award.points' | finLocalization: { pointsAmount: +extendedFareFamily.points || 0 | finPoints }\n }}\n +</span\n >\n {{ extendedFareFamily.price | finToObservable | finOffersPrice: currencyCode$ | async }}\n </span>\n <span\n *ngIf=\"extendedFareFamily.originalPrice && extendedFareFamily.discountReasonCode\"\n [ngClass]=\"!extendedFareFamily.selected ? 'nordic-blue-900-text' : 'white-text'\"\n class=\"font-body-2 ps-xsmall-l strike-through\"\n data-testid=\"fare-family-original-price\"\n >\n {{ extendedFareFamily.originalPrice | finToObservable | finOffersPrice: currencyCode$ | async }}\n </span>\n </div>\n </div>\n </div>\n <div\n [style]=\"{ 'background-color': extendedFareFamily.benefits.brandColor }\"\n class=\"top-border absolute fill\"\n ></div>\n </button>\n\n <div class=\"flex flex--column flex-1 ps-small-t ps-small-b\">\n <div\n *ngIf=\"extendedFareFamily.benefits.brandNameDescription && enableBenefitChanges === false\"\n class=\"punchline flex--basis80 ps-small-x\"\n [ngClass]=\"(isMobile$ | async) === true ? 'font-body-1' : 'font-body-2'\"\n >\n {{ extendedFareFamily.benefits.brandNameDescription }}\n </div>\n <ng-container *ngIf=\"isNotAward\">\n <fcom-tag class=\"ms-small-l\">\n <fcom-icon class=\"ms-xxsmall-r icon-small\" [name]=\"SvgLibraryIcon.AVIOS_CURRENCY\"></fcom-icon>\n <span *ngIf=\"extendedFareFamily.totalAviosAccrual\">\n {{ 'avios.collectPointsTag' | finLocalization: { points: extendedFareFamily.totalAviosAccrual | finPoints } }}\n </span>\n <span *ngIf=\"!extendedFareFamily.totalAviosAccrual\">\n {{ 'avios.collectUndefinedPoints' | finLocalization }}\n </span>\n </fcom-tag>\n </ng-container>\n <fin-expand\n [id]=\"'benefit-accordion'\"\n class=\"flex flex--column flex-1\"\n [ngClass]=\"{ 'ms-small-t': isNotAward }\"\n [key]=\"accordionId\"\n [expandContentClass]=\"'flex flex-1'\"\n [expandContainerClass]=\"'flex flex-1'\"\n #expand\n *ngIf=\"(isMobile$ | async) === true && enableBenefitChanges === false\"\n (expandOpen)=\"toggleExpand($event)\"\n >\n <div class=\"trigger flex nordic-blue-900-text font-body-1 medium-type underline\">\n <div class=\"ps-small-x\">\n <ng-container *ngIf=\"expandOpen\">\n {{ 'ticketSelection.hideDetails' | finLocalization }}\n </ng-container>\n <ng-container *ngIf=\"!expandOpen\">\n {{ 'ticketSelection.showDetails' | finLocalization }}\n </ng-container>\n </div>\n <div class=\"ps-xxsmall-l flex-1 flex--nogrow flex--self-start ps-small-x\">\n <fcom-icon\n class=\"rotate icon-medium\"\n [class.rotate-active]=\"expandOpen\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n </div>\n <div class=\"content border-top-dashed ms-small-t flex flex--column\">\n <ng-container\n [ngTemplateOutlet]=\"benefits\"\n [ngTemplateOutletContext]=\"{ highlightedBenefits: highlightedBenefits }\"\n />\n </div>\n </fin-expand>\n\n <ng-container\n *ngIf=\"(isMobile$ | async) === false || enableBenefitChanges === true\"\n [ngTemplateOutlet]=\"benefits\"\n [ngTemplateOutletContext]=\"{ highlightedBenefits: highlightedBenefits }\"\n >\n </ng-container>\n\n <ng-template #benefits let-highlightedBenefits=\"highlightedBenefits\">\n <div class=\"benefits-list flex-1 benefits\">\n <fin-benefit\n class=\"block ps-small-x\"\n *ngFor=\"let benefit of highlightedBenefits; let first = first\"\n [benefit]=\"benefit\"\n [enableBenefitChanges$]=\"enableBenefitChanges | finToObservable\"\n [ngClass]=\"{\n 'ps-xsmall-t ps-xxsmall-b': enableBenefitChanges && first,\n 'ps-xxsmall-y': !enableBenefitChanges || !first,\n }\"\n ></fin-benefit>\n </div>\n </ng-template>\n </div>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { BehaviorSubject, combineLatest, EMPTY, fromEvent, Observable, tap } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { FinnairBoundFareFamily, TranslatedBenefitRow } from '@fcom/dapi/api/models';\nimport { stopPropagation } from '@fcom/core/utils';\nimport { NotificationLayout, NotificationTheme, TagTheme } from '@fcom/ui-components';\nimport { MediaQueryService } from '@fcom/common/services';\nimport { LocationRouteType } from '@fcom/core-api';\nimport { ConfigService } from '@fcom/core/services';\nimport { TripType } from '@fcom/core/interfaces';\n\nimport { ExtendedFareFamily, FareFamilyBadgeType } from '../../../interfaces';\nimport { shouldDisplayBenefit } from '../../../utils/benefit.utils';\nimport { TaggableComponent } from '../../../../ui-components/components/tag/taggable.component';\n\n@Component({\n selector: 'fin-fare-family-option',\n styleUrls: ['./fare-family-option.component.scss'],\n templateUrl: './fare-family-option.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AirBoundsFareFamilyOptionComponent extends TaggableComponent implements OnInit {\n destroyRef = inject(DestroyRef);\n\n expandOpen = false;\n\n @Input() context: string;\n\n @Input() accordionId: string;\n\n @Input() currencyCode$: Observable<string>;\n\n @Input()\n set fareFamily(fareFamily: ExtendedFareFamily) {\n this.selected$.next(fareFamily.selected);\n this.filterBenefits(fareFamily);\n }\n\n @Input() routeType: LocationRouteType;\n\n @Input() isShortHaul: boolean;\n\n @Input() hasSpecialOffer = false;\n\n @Input() originCountryCode: string;\n\n @Input() destinationCountryCode: string;\n\n @Input() departureDate: string;\n\n @Input() tripType$: Observable<TripType> = EMPTY;\n\n @Output() selectFareFamily: EventEmitter<FinnairBoundFareFamily> = new EventEmitter();\n @Output() showDimensionsAndDetails: EventEmitter<FinnairBoundFareFamily> = new EventEmitter();\n\n extendedFareFamily: ExtendedFareFamily;\n selected$ = new BehaviorSubject(false);\n tagTheme$: Observable<TagTheme>;\n highlightedBenefits: TranslatedBenefitRow[] = [];\n isMobile$: Observable<boolean>;\n isHover$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n isNotAward: boolean;\n enableBenefitChanges: boolean;\n\n readonly FareFamilyBadgeType = FareFamilyBadgeType;\n readonly NotificationLayout = NotificationLayout;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagTheme = TagTheme;\n\n constructor(\n private mediaQueryService: MediaQueryService,\n private configService: ConfigService,\n private el: ElementRef\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n const isAward = !!this.extendedFareFamily.points;\n this.isNotAward = !isAward;\n this.enableBenefitChanges = this.configService.cfg.enableTicketTypeCardChanges;\n\n fromEvent(this.el.nativeElement, 'mouseenter')\n .pipe(\n tap(() => this.isHover$.next(true)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n\n fromEvent(this.el.nativeElement, 'mouseleave')\n .pipe(\n tap(() => this.isHover$.next(false)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe();\n\n this.tagTheme$ = combineLatest([this.isHover$, this.selected$]).pipe(\n map(([isHover, selected]) => {\n if (selected) {\n return TagTheme.DEFAULT;\n }\n\n if (isHover && this.extendedFareFamily.badgeType === FareFamilyBadgeType.CMS) {\n return TagTheme.DEFAULT;\n }\n\n switch (this.extendedFareFamily.badgeType) {\n case FareFamilyBadgeType.CMS:\n return this.extendedFareFamily.benefits.tags[0].theme as TagTheme;\n case FareFamilyBadgeType.NEW:\n return TagTheme.ACTIVE;\n case FareFamilyBadgeType.POPULAR:\n default:\n return TagTheme.POPULAR;\n }\n })\n );\n }\n\n handleSelectFareFamilyClick(e: Event, { ...baseBoundFareFamily }: ExtendedFareFamily): void {\n stopPropagation(e);\n this.selectFareFamily.emit(baseBoundFareFamily as FinnairBoundFareFamily);\n }\n\n private filterBenefits(fareFamily: ExtendedFareFamily) {\n this.extendedFareFamily = fareFamily;\n this.highlightedBenefits = fareFamily.benefits.translatedBenefitRows.filter((benefit) =>\n shouldDisplayBenefit(benefit)\n );\n }\n\n toggleExpand(isOpen: boolean): void {\n this.expandOpen = isOpen;\n }\n\n handleShowDetails(fareFamily: ExtendedFareFamily): void {\n this.showDimensionsAndDetails.emit(fareFamily as FinnairBoundFareFamily);\n }\n}\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","import {\n AfterViewInit,\n Component,\n Input,\n Renderer2,\n HostBinding,\n OnInit,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\n\nimport { PageMetaService, NavigationMenuService } from '@fcom/common/services';\nimport { CmsPage } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-page',\n template: '<ng-content></ng-content>',\n})\nexport class CmsPageComponent implements AfterViewInit, OnInit, OnChanges {\n @Input()\n content: CmsPage;\n\n @HostBinding('class.is-hidden') defaultClass = true;\n\n constructor(\n private pageMetaService: PageMetaService,\n private renderer: Renderer2,\n private navigationMenuService: NavigationMenuService\n ) {}\n\n ngOnInit(): void {\n if (typeof this.content.isHeaderVisible !== 'undefined') {\n this.navigationMenuService.setHeaderVisibility(this.content.isHeaderVisible);\n }\n if (typeof this.content.isFooterVisible !== 'undefined') {\n this.navigationMenuService.setFooterVisibility(this.content.isFooterVisible);\n }\n this.pageMetaService.setDefaultOriginLocationCode(this.content.defaultOriginLocationCode ?? 'HEL');\n }\n\n ngAfterViewInit(): void {\n this.pageMetaService.setTitle(this.content.seoTitle || this.content.title);\n this.pageMetaService.moveMetaAndLinksToHead(this.content.metaData, this.renderer);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['content']) {\n this.pageMetaService.setTitle(this.content.seoTitle || this.content.title);\n // Make the pageMetaService to sync the latest metaData\n this.pageMetaService.moveMetaAndLinksToHead(this.content.metaData, this.renderer);\n }\n }\n}\n","import { createActionGroup, emptyProps, props, union } from '@ngrx/store';\n\nimport { PassengerNameRecord } from '../store.interface';\n\nexport const RedirectActions = createActionGroup({\n source: 'RedirectActions',\n events: {\n 'Set PNR': props<{ pnr: PassengerNameRecord }>(),\n 'Clear PNR': emptyProps(),\n },\n});\n\nconst redirectUnion = union(\n Object.keys(RedirectActions).reduce((actions, key) => (actions[key] = RedirectActions[key]), {})\n);\n\nexport type RedirectActionsUnion = typeof redirectUnion;\n","import {\n FinnairBoundItem,\n FinnairItineraryItem,\n FinnairItineraryItemFlight,\n FinnairItineraryItemLayover,\n FinnairItineraryItemType,\n FinnairItineraryNote,\n} from '@fcom/dapi/api/models';\nimport { isComplexBooking } from '@fcom/manage-booking-common/utils';\n\nimport { BoundReaccommodationStatus, BoundReaccommodationType } from '../interfaces';\n\n/**\n * Get notification message if user has selected flight that has different airport or date than original flight\n * @param cancelled bound that has been cancelled\n * @param selected new bound the user has selected\n */\nexport const getNotificationMessageForNewFlight = (cancelled: FinnairBoundItem, selected: FinnairBoundItem): string => {\n const differentAirport = differentAirportSelected(cancelled, selected);\n const differentDate = differentDateSelected(cancelled, selected);\n\n if (differentAirport && differentDate) {\n return 'reaccommodation.notifications.differentAirportAndDate';\n } else if (differentDate) {\n return 'reaccommodation.notifications.differentDate';\n } else if (differentAirport) {\n return 'reaccommodation.notifications.differentAirport';\n }\n\n return null;\n};\n\n/**\n * Determine if user has selected flight that has different location than in original flight\n * @param cancelled bound that has been cancelled\n * @param selected new bound the user has selected\n */\nexport const differentAirportSelected = (cancelled: FinnairBoundItem, selected: FinnairBoundItem): boolean => {\n const bound = cancelled?.disruptedBound?.disruptedBound || cancelled;\n return (\n bound?.departure?.locationCode !== selected.departure.locationCode ||\n bound?.arrival?.locationCode !== selected.arrival.locationCode\n );\n};\n\n/**\n * Determine if user has selected flight that has different date than in original flight\n * @param cancelled bound that has been cancelled\n * @param selected new bound the user has selected\n */\nexport const differentDateSelected = (cancelled: FinnairBoundItem, selected: FinnairBoundItem): boolean => {\n const bound = cancelled?.disruptedBound?.disruptedBound || cancelled;\n return (\n isDifferentDay(bound.departure.dateTime, selected.departure.dateTime) ||\n isDifferentDay(bound.arrival.dateTime, selected.arrival.dateTime)\n );\n};\n\n/**\n * Determine if the bound has a layover\n * @param bound a bound of an itinerary\n */\nexport const boundHasOvernightLayover = (bound: FinnairBoundItem): boolean => {\n return bound.itinerary.some((item: FinnairItineraryItem) => {\n return (\n item.type === FinnairItineraryItemType.LAYOVER &&\n (item as FinnairItineraryItemLayover).note === FinnairItineraryNote.HAS_NEXT_DAY_TRANSFER\n );\n });\n};\n\n/**\n * Determine if datetimes have different days\n * @param start datetime (e.g. 2019-09-13T14:26:19.828Z)\n * @param end datetime (e.g. 2019-09-13T14:26:19.828Z)\n */\nexport const isDifferentDay = (start: string, end: string): boolean => {\n return start?.split('T')[0] !== end?.split('T')[0];\n};\n\n/**\n * Get the bound type for a bound (outbound, inbound, complex)\n * @param bounds all bounds in the booking\n * @param index index for the bound to be determined\n */\nexport const getBoundType = (bounds: FinnairBoundItem[], index: number): BoundReaccommodationType => {\n if (isComplexBooking(bounds)) {\n return BoundReaccommodationType.COMPLEX;\n } else {\n return index === 0 ? BoundReaccommodationType.OUTBOUND : BoundReaccommodationType.INBOUND;\n }\n};\n\n/**\n * Get heading for a single bound based on type and status\n * @param type wheter bound is inbound or outbound\n * @param status wheter bound is rebooked, new or cancelled\n */\nexport const getBoundHeadingLabel = (type: BoundReaccommodationType, status: BoundReaccommodationStatus): string => {\n return `reaccommodation.boundHeadings.${type}.${status || BoundReaccommodationStatus.DEFAULT}`;\n};\n\nexport const getFareFamilyLabel = (bound: FinnairBoundItem): string =>\n bound.fareFamily?.name || (bound?.itinerary[0] as FinnairItineraryItemFlight)?.cabinClass;\n\nexport default {\n getFareFamilyLabel,\n getBoundHeadingLabel,\n getBoundType,\n isDifferentDay,\n boundHasOvernightLayover,\n differentDateSelected,\n differentAirportSelected,\n getNotificationMessageForNewFlight,\n};\n","import { AppState } from '@fcom/core';\n\nimport { Trip } from './pax-trip.interface';\nimport { LOYALTY_FEATURE_KEY } from '../constants';\n\nexport interface TripsState {\n trips: Trip[];\n status: FetchTripsStatus;\n}\n\nexport interface MilestoneState {\n dismissedWithPoints: number;\n}\n\nexport interface LoyaltyState {\n trips: TripsState;\n milestones: MilestoneState;\n}\n\nexport interface State extends AppState {\n readonly [LOYALTY_FEATURE_KEY]: LoyaltyState;\n}\n\nexport enum FetchTripsStatus {\n INITIAL,\n OK,\n ERROR,\n}\n","import { Component, Input, OnChanges, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';\n\nimport { CmsImageData, StaticPicture } from '@fcom/core-api';\n\nimport { AspectRatioString } from '../../interfaces';\nimport {\n isCmsImageData,\n isStaticPicture,\n mapToResponsiveImage,\n toCmsAspectRatio,\n toSrcSetString,\n} from './images.utils';\n\n@Component({\n selector: 'fin-block-image',\n styleUrls: ['./block-image.component.scss'],\n templateUrl: './block-image.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BlockImageComponent implements OnChanges {\n /**\n * The preferred aspect ratio of the image. Only relevant when using `CmsImageData` as input.\n */\n @Input() aspectRatio: AspectRatioString = '4x3';\n\n /**\n * Urls to use for the image\n */\n @Input() imageData: CmsImageData | StaticPicture;\n\n /**\n * Whether to show the image with a gray overlay or not.\n * Defaults to false\n */\n @Input()\n overlay = false;\n\n /**\n * When the overlay is active, should the image be blurred also\n * Defaults to false\n */\n @Input()\n overlayBlur = false;\n\n /**\n * Fixes the height of the block image\n * Defaults to false\n */\n @Input()\n fixed = false;\n\n srcSet: string;\n fallbackSrc: string;\n thumbnailSrc: string;\n\n constructor(private cd: ChangeDetectorRef) {}\n\n ngOnChanges(): void {\n this.mapImageToResponsiveImageData();\n this.cd.markForCheck();\n }\n\n private mapImageToResponsiveImageData(): void {\n const cmsAspectRatio = toCmsAspectRatio(this.aspectRatio) || toCmsAspectRatio('4x3');\n\n if (isStaticPicture(this.imageData) || (isCmsImageData(this.imageData) && cmsAspectRatio)) {\n const responsiveImageData = mapToResponsiveImage(this.imageData, cmsAspectRatio);\n this.srcSet = responsiveImageData.srcSet.length > 0 ? toSrcSetString(responsiveImageData.srcSet) : '';\n this.fallbackSrc = responsiveImageData.fallbackSrc;\n this.thumbnailSrc = responsiveImageData.thumbnailSrc;\n } else {\n this.srcSet = '';\n this.fallbackSrc = '';\n this.thumbnailSrc = '';\n }\n }\n}\n","<div class=\"blockimage\">\n <div class=\"blockimage__content\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"blockimage__image\"\n [defaultImage]=\"thumbnailSrc\"\n [lazyLoad]=\"srcSet || fallbackSrc\"\n [errorImage]=\"fallbackSrc\"\n [useSrcset]=\"!!srcSet\"\n [decode]=\"true\"\n [class.blockimage__image--has-overlay]=\"overlay\"\n [class.blockimage__image--blur-overlay]=\"overlayBlur\"\n [class.blockimage__image--fixed]=\"fixed\"\n ></div>\n</div>\n","import { NgModule } from '@angular/core';\n\nimport { TrapFocusDirective } from './trap-focus.directive';\n\n@NgModule({\n declarations: [TrapFocusDirective],\n exports: [TrapFocusDirective],\n})\nexport class TrapFocusModule {}\n","<div (click)=\"openModalIfLink($event)\" [innerHTML]=\"content | finSafe: 'html'\"></div>\n\n<fcom-modal class=\"rich-text-modal\" [buttons]=\"ModalButtons.DONE\" [(open)]=\"modalOpen\">\n <cms-unstyled-fragment\n *ngIf=\"cmsUrl\"\n class=\"block pr-large\"\n [contentUrl$]=\"cmsUrl | finToObservable\"\n ></cms-unstyled-fragment>\n</fcom-modal>\n","import { Component, Input } from '@angular/core';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ModalButtons } from '@fcom/ui-components';\nimport { ConfigService } from '@fcom/core/services';\n\n@Component({\n selector: 'fin-content-with-modal',\n styleUrls: ['content-with-modal.component.scss'],\n templateUrl: 'content-with-modal.component.html',\n})\nexport class ContentWithModalComponent {\n @Input() content: string;\n\n public readonly ModalButtons = ModalButtons;\n\n modalOpen = false;\n cmsUrl: string;\n\n constructor(\n private languageService: LanguageService,\n private configService: ConfigService\n ) {}\n\n openModalIfLink(event): void {\n const target = event.target;\n\n if (\n target &&\n typeof target.tagName === 'string' &&\n target.tagName.toLowerCase() === 'a' &&\n target.getAttribute('data-contentid')\n ) {\n const contentId: string = target.getAttribute('data-contentid');\n this.cmsUrl = `${this.configService.cmsUrl}/service/json/v1/ids/${this.languageService.langValue}/${contentId}`;\n this.modalOpen = true;\n event.preventDefault();\n event.stopPropagation();\n }\n }\n}\n","<div\n *ngIf=\"fareFamily\"\n class=\"upsell-option relative flex flex--column grow rounded-large overflow-hidden\"\n [ngClass]=\"{ wide: (isMobile$ | async) === true }\"\n>\n <div>\n <div class=\"fill ps-xxsmall-x ps-xsmall-y highlight top-bar\">\n <div class=\"font-body-1 bold-type\">{{ 'upsellCard.title' | finLocalization }}</div>\n </div>\n </div>\n <div class=\"pr-xsmall-b ps-xxsmall-l ps-small-r\">\n <div class=\"rounded-large overflow-hidden\" *ngIf=\"imageData$ | async as imageData\">\n <div class=\"relative\">\n <fcom-image [imageData]=\"imageData\" [ratio]=\"enableBenefitChanges === true ? '4x3' : '1x1'\"></fcom-image>\n <fcom-tag class=\"absolute avios-points ms-xsmall-l ms-xsmall-b\" *ngIf=\"isNotAward\">\n <fcom-icon class=\"ms-xxsmall-r icon-small\" [name]=\"SvgLibraryIcon.AVIOS_CURRENCY\"></fcom-icon>\n <span *ngIf=\"fareFamily.totalAviosAccrual\">\n {{ 'avios.collectPointsTag' | finLocalization: { points: fareFamily.totalAviosAccrual | finPoints } }}\n </span>\n <span *ngIf=\"!fareFamily.totalAviosAccrual\">\n {{ 'avios.collectUndefinedPoints' | finLocalization }}\n </span>\n </fcom-tag>\n </div>\n </div>\n <div>\n <div class=\"flex ms-xsmall-t\">\n <fcom-icon class=\"ms-xxsmall-t icon-large\" [name]=\"SvgLibraryIcon.UPGRADE_OUTLINE\"></fcom-icon>\n <div class=\"ms-xsmall-l\">\n <div class=\"font-body-1 medium-type\">\n {{\n ('travelClass.' + fareFamily.cabinClass.toLowerCase() | finLocalization) ||\n ('travelClass.mixed' | finLocalization)\n }}\n </div>\n\n <div class=\"flex flex--middle flex--wrap\">\n <span class=\"font-body-2 flex flex--middle ps-xxsmall-r\">\n {{ 'pricesStartingFrom' | finLocalization }}\n </span>\n\n <span *ngIf=\"fareFamily.originalPrice\" class=\"font-body-2 ps-xsmall-r strike-through\">\n {{ { amount: fareFamily.originalPrice, currencyCode: currencyCode$ | async } | finPrice }}\n </span>\n\n <span class=\"font-heading-5 price\">\n {{ { amount: fareFamily.price, currencyCode: currencyCode$ | async } | finPrice }}\n </span>\n </div>\n </div>\n </div>\n <span class=\"font-body-1 ms-xsmall-t\">{{ descriptionKey$ | async | finLocalization }}</span>\n </div>\n <fcom-button\n [attr.data-testid]=\"'cabin-upsell-option-next-class-button'\"\n class=\"ms-xsmall-t\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n [icon]=\"{ name: SvgLibraryIcon.ARROW_RIGHT, position: IconPosition.RIGHT }\"\n [text]=\"'upsellCard.button' | finLocalization\"\n (clickBtn)=\"selectNextCabinClass.emit(fareFamily)\"\n >\n </fcom-button>\n <div class=\"align-center ms-small-t\" *ngIf=\"(hideCabinClassModalLink$ | async) !== true\">\n <a\n class=\"nordic-blue-900-text font-body-1 bold-type\"\n href\n (click)=\"emitOpenCabinClassModal($event, fareFamily.cabinClass)\"\n >{{ 'upsellCard.modalLink.allClasses' | finLocalization }}</a\n >\n </div>\n </div>\n</div>\n<div\n *ngIf=\"showCompareBlock$ | async\"\n class=\"upsell-option relative flex flex--column grow rounded-large overflow-hidden ps-xxsmall-l ps-small-r\"\n>\n <div class=\"rounded-large overflow-hidden\" *ngIf=\"imageData$ | async as imageData\">\n <div class=\"relative\">\n <fcom-image [imageData]=\"imageData\" [ratio]=\"'1x1'\"></fcom-image>\n </div>\n </div>\n <span class=\"font-body-1 ms-xsmall-t\" data-testid=\"gen-desc\">{{ descriptionKey$ | async | finLocalization }}</span>\n <div class=\"ms-xsmall-t\">\n <a class=\"nordic-blue-900-text font-body-1 bold-type\" href (click)=\"emitOpenCabinClassModal($event, 'Business')\">{{\n 'upsellCard.modalLink.allClasses' | finLocalization\n }}</a>\n </div>\n</div>\n","import { HttpClient } from '@angular/common/http';\nimport { Component, EventEmitter, Input, OnInit, Output, ChangeDetectionStrategy } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { combineLatest, EMPTY, iif, Observable, of } from 'rxjs';\nimport { filter, map, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { capitalize } from '@fcom/core/utils';\nimport { CabinClassSelectionFareFamily } from '@fcom/booking/modules/ticket-selection/interfaces';\nimport { ButtonMode, ButtonSize, ButtonTheme, TagTheme, IconPosition, ResponsiveImage } from '@fcom/ui-components';\nimport { FinnairCabinClass } from '@fcom/dapi/api/models';\nimport { MediaQueryService } from '@fcom/common/services';\nimport { GtmService } from '@fcom/common/gtm';\nimport { ElementActions, ElementTypes } from '@fcom/common/interfaces';\nimport { ConfigService } from '@fcom/core/services';\nimport { TripType } from '@fcom/core/interfaces';\n\n@Component({\n selector: 'fin-upsell-option',\n templateUrl: './upsell-option.component.html',\n styleUrls: ['./upsell-option.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class UpsellOptionComponent implements OnInit {\n readonly ButtonMode = ButtonMode;\n readonly ButtonSize = ButtonSize;\n readonly ButtonTheme = ButtonTheme;\n readonly FinnairCabinClass = FinnairCabinClass;\n readonly IconPosition = IconPosition;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TagTheme = TagTheme;\n\n @Input()\n fareFamily: CabinClassSelectionFareFamily | undefined;\n @Input()\n currencyCode$: Observable<string>;\n @Input()\n isShortHaul$: Observable<boolean>;\n @Input()\n isLongHaulLegAndAy$: Observable<boolean> = EMPTY;\n @Input()\n tripType$: Observable<TripType> = EMPTY;\n\n @Output()\n selectNextCabinClass: EventEmitter<CabinClassSelectionFareFamily> = new EventEmitter();\n\n @Output()\n openCabinClassModal: EventEmitter<string> = new EventEmitter();\n\n imageData$: Observable<ResponsiveImage>;\n isMobile$: Observable<boolean>;\n descriptionKey$: Observable<string>;\n hideCabinClassModalLink$: Observable<boolean>;\n isNotAward: boolean;\n showCompareBlock$: Observable<boolean>;\n enableBenefitChanges: boolean;\n\n constructor(\n private languageService: LanguageService,\n private httpClient: HttpClient,\n private mediaQueryService: MediaQueryService,\n private gtmService: GtmService,\n private configService: ConfigService\n ) {}\n\n ngOnInit(): void {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n\n this.enableBenefitChanges = this.configService.cfg.enableTicketTypeCardChanges;\n\n this.showCompareBlock$ = iif(\n () => !this.fareFamily,\n this.isLongHaulLegAndAy$.pipe(map((isLongHaulLegAndAy) => isLongHaulLegAndAy)),\n of(false)\n );\n\n const imageKey$ = combineLatest([this.isShortHaul$, this.isLongHaulLegAndAy$]).pipe(\n map(([isShortHaul, isLongHaulLegAndAy]) => {\n if (!this.fareFamily) {\n return !isShortHaul ? 'fragments.upsellGenericLongHaul' : undefined;\n }\n const cabinClass = capitalize(this.fareFamily.cabinClass);\n if (isShortHaul || isLongHaulLegAndAy || this.fareFamily.cabinClass === FinnairCabinClass.ECOPREMIUM) {\n const haul = isShortHaul ? 'ShortHaul' : 'LongHaul';\n\n return `fragments.upsell${cabinClass}${haul}`;\n }\n return `fragments.upsell${cabinClass}`;\n })\n );\n\n this.descriptionKey$ = combineLatest([this.isShortHaul$, this.isLongHaulLegAndAy$]).pipe(\n map(([isShortHaul, isLongHaulLegAndAy]) => {\n if (!this.fareFamily) {\n return isLongHaulLegAndAy ? 'upsellCard.description.genericLongHaul' : undefined;\n }\n if (this.fareFamily.cabinClass === FinnairCabinClass.FIRST) {\n return 'upsellCard.description.firstClassLongHaul';\n }\n if (isShortHaul || isLongHaulLegAndAy || this.fareFamily.cabinClass === FinnairCabinClass.ECOPREMIUM) {\n const haul = isShortHaul ? 'ShortHaul' : 'LongHaul';\n\n return `upsellCard.description.${this.fareFamily.cabinClass.toLowerCase()}${haul}`;\n }\n return `upsell.cabinClassDescription.${this.fareFamily.cabinClass.toLowerCase()}`;\n })\n );\n\n this.imageData$ = imageKey$.pipe(\n switchMap((imageKey) =>\n this.languageService.translate(imageKey).pipe(\n map((translation) => translation?.picture?.jsonUrl),\n filter(Boolean),\n switchMap((jsonUrl: string) => this.httpClient.get<ResponsiveImage>(jsonUrl))\n )\n )\n );\n\n this.hideCabinClassModalLink$ = combineLatest([this.isShortHaul$, this.isLongHaulLegAndAy$]).pipe(\n map(([isShortHaul, isLongHaulLegAndAy]) => isShortHaul || !isLongHaulLegAndAy)\n );\n\n const isAward = !!this.fareFamily?.points;\n this.isNotAward = !isAward;\n }\n\n emitOpenCabinClassModal(event: Event, cabinClass: string): void {\n this.openCabinClassModal.emit(cabinClass);\n this.gtmService.trackElement(\n 'upsell-card-modal-link',\n 'booking-flow_flight-selection',\n ElementTypes.BUTTON,\n undefined,\n ElementActions.CLICK\n );\n event.preventDefault();\n }\n}\n","import { CmsCampaign } from '../services/cms/cms-data.service';\n\n/**\n * get campaign object if found otherwise set default values\n * @param campaigns list of CmsCampaign objects\n * @param locationCode\n * @returns CmsCampaign object for given locationCode\n */\nexport const getDestinationInCampaign = (campaigns: CmsCampaign[], locationCode: string): CmsCampaign => {\n const defaultCampaign: CmsCampaign = {\n destinations: [],\n campaignEndText: '',\n enableBlackTeaser: false,\n };\n\n // returns the first campaign element where the locationCode is present, otherwise return default campaign element\n return (\n campaigns.find(\n (campaign: CmsCampaign) =>\n campaign?.destinations?.some((dest: string) => dest === locationCode) ||\n Object.values(campaign?.destinationsByOrigin || {})\n .flat()\n .some((dest: string) => dest === locationCode)\n ) || defaultCampaign\n );\n};\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { combineLatest, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsImageData } from '@fcom/core-api';\nimport { AspectRatios } from '@fcom/ui-components';\nimport { MediaQueryService } from '@fcom/common';\nimport { BookingLocationCodes } from '@fcom/common/interfaces/booking';\nimport { ContentType } from '@fcom/common/interfaces';\nimport { TripType } from '@fcom/core/interfaces';\nimport { LocationPair } from '@fcom/common/store';\nimport { SentryLogger } from '@fcom/core';\n\ntype AllowedAspectRatios = keyof typeof AspectRatios;\n\n/**\n * Full Width Booking Widget\n *\n * @example\n * <cms-full-width-booking-widget\n * [backgroundImage]=\"CmsImageData\"\n * [originCode]=\"'BER'\"\n * [destinationCode]=\"'HEL'\"\n * [enableAward]=\"true\"\n * [enableAurinkomatkat]=\"true\"\n * [enablePromoCode]=\"true\"\n * ></cms-full-width-booking-widget>\n */\n@Component({\n selector: 'cms-full-width-booking-widget',\n templateUrl: './cms-full-width-booking-widget.component.html',\n styleUrls: ['./cms-full-width-booking-widget.component.scss'],\n})\nexport class CmsFullWidthBookingWidgetComponent implements OnInit {\n aspectRatio$: Observable<AllowedAspectRatios>;\n\n @Input()\n backgroundImage: CmsImageData;\n\n @Input()\n locations: BookingLocationCodes[] = [];\n\n @Input()\n enableAward = false;\n\n @Input()\n enableAurinkomatkat = false;\n\n @Input()\n enablePromoCode = false;\n\n @Input()\n enableAutoFocus = true;\n\n @Input()\n enableOpenJaw = false;\n\n @Input()\n initialTripType: TripType;\n\n @Input()\n contentType: ContentType;\n\n constructor(\n private mediaQueryService: MediaQueryService,\n private sentryLogger: SentryLogger\n ) {}\n\n defaultLocationPairs: LocationPair[];\n\n ngOnInit(): void {\n this.aspectRatio$ = combineLatest([\n this.mediaQueryService.isBreakpoint$('mobile'),\n this.mediaQueryService.isBreakpoint$('tablet'),\n ]).pipe(\n map(([isMobile, isTablet]): AllowedAspectRatios => {\n if (isMobile) {\n return '1x1';\n }\n\n if (isTablet) {\n return '4x3';\n }\n\n return '16x9';\n })\n );\n\n this.defaultLocationPairs = this.locations.map(\n (ond: BookingLocationCodes) =>\n ({\n origin: ond?.originLocationCode ? { locationCode: ond.originLocationCode } : undefined,\n destination: ond?.destinationLocationCode ? { locationCode: ond.destinationLocationCode } : undefined,\n }) as LocationPair\n );\n\n if (this.initialTripType && !Object.values(TripType).includes(this.initialTripType)) {\n this.sentryLogger.error(\n `Unexpected initialTripType: ${this.initialTripType} when rendering the booking widget in a content page`\n );\n }\n }\n}\n","<section class=\"cms-full-width-booking-widget relative\">\n <fin-content-image\n class=\"background-image\"\n [imageData$]=\"backgroundImage | finToObservable\"\n [aspectRatio$]=\"aspectRatio$\"\n [isLazyLoad]=\"false\"\n [fetchPriority]=\"'high'\"\n ></fin-content-image>\n <div class=\"grid-max-width grid-col-12 bg-container\">\n <div class=\"col-1-12 mr-xlarge-y\">\n <fin-booking-widget\n [enableAward]=\"enableAward\"\n [enableAurinkomatkat]=\"enableAurinkomatkat\"\n [enablePromoCode]=\"enablePromoCode\"\n [defaultLocations$]=\"defaultLocationPairs | finToObservable\"\n [initialTripType]=\"initialTripType\"\n [headingLevel]=\"2\"\n ></fin-booking-widget>\n </div>\n </div>\n</section>\n","<a\n *ngIf=\"target$ | async as link\"\n [finLink]=\"link.url\"\n [external]=\"link.external\"\n class=\"btn relative nordic-blue-900-bg white-text no-underline inline-block\"\n [class.black-friday]=\"isBlackFriday$ | async\"\n [openInNewTab]=\"link.external\"\n>\n <span class=\"font-body-1 white-text bold-type\">{{ teaserTitle$ | async }}</span>\n <span *ngIf=\"link.external\" class=\"is-vishidden\">({{ 'ariaLabels.newTab' | finLocalization }})</span>\n</a>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { NEVER, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsTarget, CmsTaxonomy, CmsTaxonomyGeneral } from '@fcom/core-api';\n\n@Component({\n selector: 'fin-link-block',\n styleUrls: ['./link-block.component.scss'],\n templateUrl: './link-block.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LinkBlockComponent implements OnInit {\n @Input()\n teaserTitle$: Observable<string>;\n @Input()\n target$: Observable<CmsTarget>;\n @Input()\n cmsTags$: Observable<Array<CmsTaxonomy | string>> = NEVER;\n\n isBlackFriday$: Observable<boolean>;\n\n ngOnInit(): void {\n this.isBlackFriday$ = this.cmsTags$.pipe(map((a) => a.includes(CmsTaxonomyGeneral.BLACK_FRIDAY)));\n }\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types';\nimport { isValidDate } from '../util/isDate';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createErrorClass } from '../util/createErrorClass';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\n\nexport interface TimeoutConfig<T, O extends ObservableInput<unknown> = ObservableInput<T>, M = unknown> {\n /**\n * The time allowed between values from the source before timeout is triggered.\n */\n each?: number;\n\n /**\n * The relative time as a `number` in milliseconds, or a specific time as a `Date` object,\n * by which the first value must arrive from the source before timeout is triggered.\n */\n first?: number | Date;\n\n /**\n * The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler}\n */\n scheduler?: SchedulerLike;\n\n /**\n * A factory used to create observable to switch to when timeout occurs. Provides\n * a {@link TimeoutInfo} about the source observable's emissions and what delay or\n * exact time triggered the timeout.\n */\n with?: (info: TimeoutInfo<T, M>) => O;\n\n /**\n * Optional additional metadata you can provide to code that handles\n * the timeout, will be provided through the {@link TimeoutError}.\n * This can be used to help identify the source of a timeout or pass along\n * other information related to the timeout.\n */\n meta?: M;\n}\n\nexport interface TimeoutInfo<T, M = unknown> {\n /** Optional metadata that was provided to the timeout configuration. */\n readonly meta: M;\n /** The number of messages seen before the timeout */\n readonly seen: number;\n /** The last message seen */\n readonly lastValue: T | null;\n}\n\n/**\n * An error emitted when a timeout occurs.\n */\nexport interface TimeoutError<T = unknown, M = unknown> extends Error {\n /**\n * The information provided to the error by the timeout\n * operation that created the error. Will be `null` if\n * used directly in non-RxJS code with an empty constructor.\n * (Note that using this constructor directly is not recommended,\n * you should create your own errors)\n */\n info: TimeoutInfo<T, M> | null;\n}\n\nexport interface TimeoutErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new <T = unknown, M = unknown>(info?: TimeoutInfo<T, M>): TimeoutError<T, M>;\n}\n\n/**\n * An error thrown by the {@link timeout} operator.\n *\n * Provided so users can use as a type and do quality comparisons.\n * We recommend you do not subclass this or create instances of this class directly.\n * If you have need of a error representing a timeout, you should\n * create your own error class and use that.\n *\n * @see {@link timeout}\n */\nexport const TimeoutError: TimeoutErrorCtor = createErrorClass(\n (_super) =>\n function TimeoutErrorImpl(this: any, info: TimeoutInfo<any> | null = null) {\n _super(this);\n this.message = 'Timeout has occurred';\n this.name = 'TimeoutError';\n this.info = info;\n }\n);\n\n/**\n * If `with` is provided, this will return an observable that will switch to a different observable if the source\n * does not push values within the specified time parameters.\n *\n * <span class=\"informal\">The most flexible option for creating a timeout behavior.</span>\n *\n * The first thing to know about the configuration is if you do not provide a `with` property to the configuration,\n * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory\n * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by\n * the settings in `first` and `each`.\n *\n * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the\n * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of\n * the first value from the source _only_. The timings of all subsequent values from the source will be checked\n * against the time period provided by `each`, if it was provided.\n *\n * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of\n * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if\n * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first\n * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first.\n *\n * ## Examples\n *\n * Emit a custom error if there is too much time between values\n *\n * ```ts\n * import { interval, timeout, throwError } from 'rxjs';\n *\n * class CustomTimeoutError extends Error {\n * constructor() {\n * super('It was too slow');\n * this.name = 'CustomTimeoutError';\n * }\n * }\n *\n * const slow$ = interval(900);\n *\n * slow$.pipe(\n * timeout({\n * each: 1000,\n * with: () => throwError(() => new CustomTimeoutError())\n * })\n * )\n * .subscribe({\n * error: console.error\n * });\n * ```\n *\n * Switch to a faster observable if your source is slow.\n *\n * ```ts\n * import { interval, timeout } from 'rxjs';\n *\n * const slow$ = interval(900);\n * const fast$ = interval(500);\n *\n * slow$.pipe(\n * timeout({\n * each: 1000,\n * with: () => fast$,\n * })\n * )\n * .subscribe(console.log);\n * ```\n * @param config The configuration for the timeout.\n */\nexport function timeout<T, O extends ObservableInput<unknown>, M = unknown>(\n config: TimeoutConfig<T, O, M> & { with: (info: TimeoutInfo<T, M>) => O }\n): OperatorFunction<T, T | ObservedValueOf<O>>;\n\n/**\n * Returns an observable that will error or switch to a different observable if the source does not push values\n * within the specified time parameters.\n *\n * <span class=\"informal\">The most flexible option for creating a timeout behavior.</span>\n *\n * The first thing to know about the configuration is if you do not provide a `with` property to the configuration,\n * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory\n * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by\n * the settings in `first` and `each`.\n *\n * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the\n * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of\n * the first value from the source _only_. The timings of all subsequent values from the source will be checked\n * against the time period provided by `each`, if it was provided.\n *\n * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of\n * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if\n * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first\n * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first.\n *\n * ### Handling TimeoutErrors\n *\n * If no `with` property was provided, subscriptions to the resulting observable may emit an error of {@link TimeoutError}.\n * The timeout error provides useful information you can examine when you're handling the error. The most common way to handle\n * the error would be with {@link catchError}, although you could use {@link tap} or just the error handler in your `subscribe` call\n * directly, if your error handling is only a side effect (such as notifying the user, or logging).\n *\n * In this case, you would check the error for `instanceof TimeoutError` to validate that the error was indeed from `timeout`, and\n * not from some other source. If it's not from `timeout`, you should probably rethrow it if you're in a `catchError`.\n *\n * ## Examples\n *\n * Emit a {@link TimeoutError} if the first value, and _only_ the first value, does not arrive within 5 seconds\n *\n * ```ts\n * import { interval, timeout } from 'rxjs';\n *\n * // A random interval that lasts between 0 and 10 seconds per tick\n * const source$ = interval(Math.round(Math.random() * 10_000));\n *\n * source$.pipe(\n * timeout({ first: 5_000 })\n * )\n * .subscribe({\n * next: console.log,\n * error: console.error\n * });\n * ```\n *\n * Emit a {@link TimeoutError} if the source waits longer than 5 seconds between any two values or the first value\n * and subscription.\n *\n * ```ts\n * import { timer, timeout, expand } from 'rxjs';\n *\n * const getRandomTime = () => Math.round(Math.random() * 10_000);\n *\n * // An observable that waits a random amount of time between each delivered value\n * const source$ = timer(getRandomTime())\n * .pipe(expand(() => timer(getRandomTime())));\n *\n * source$\n * .pipe(timeout({ each: 5_000 }))\n * .subscribe({\n * next: console.log,\n * error: console.error\n * });\n * ```\n *\n * Emit a {@link TimeoutError} if the source does not emit before 7 seconds, _or_ if the source waits longer than\n * 5 seconds between any two values after the first.\n *\n * ```ts\n * import { timer, timeout, expand } from 'rxjs';\n *\n * const getRandomTime = () => Math.round(Math.random() * 10_000);\n *\n * // An observable that waits a random amount of time between each delivered value\n * const source$ = timer(getRandomTime())\n * .pipe(expand(() => timer(getRandomTime())));\n *\n * source$\n * .pipe(timeout({ first: 7_000, each: 5_000 }))\n * .subscribe({\n * next: console.log,\n * error: console.error\n * });\n * ```\n */\nexport function timeout<T, M = unknown>(config: Omit<TimeoutConfig<T, any, M>, 'with'>): OperatorFunction<T, T>;\n\n/**\n * Returns an observable that will error if the source does not push its first value before the specified time passed as a `Date`.\n * This is functionally the same as `timeout({ first: someDate })`.\n *\n * <span class=\"informal\">Errors if the first value doesn't show up before the given date and time</span>\n *\n * ![](timeout.png)\n *\n * @param first The date to at which the resulting observable will timeout if the source observable\n * does not emit at least one value.\n * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}.\n */\nexport function timeout<T>(first: Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;\n\n/**\n * Returns an observable that will error if the source does not push a value within the specified time in milliseconds.\n * This is functionally the same as `timeout({ each: milliseconds })`.\n *\n * <span class=\"informal\">Errors if it waits too long between any value</span>\n *\n * ![](timeout.png)\n *\n * @param each The time allowed between each pushed value from the source before the resulting observable\n * will timeout.\n * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}.\n */\nexport function timeout<T>(each: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;\n\n/**\n *\n * Errors if Observable does not emit a value in given time span.\n *\n * <span class=\"informal\">Timeouts on Observable that doesn't emit values fast enough.</span>\n *\n * ![](timeout.png)\n *\n * @see {@link timeoutWith}\n *\n * @return A function that returns an Observable that mirrors behaviour of the\n * source Observable, unless timeout happens when it throws an error.\n */\nexport function timeout<T, O extends ObservableInput<any>, M>(\n config: number | Date | TimeoutConfig<T, O, M>,\n schedulerArg?: SchedulerLike\n): OperatorFunction<T, T | ObservedValueOf<O>> {\n // Intentionally terse code.\n // If the first argument is a valid `Date`, then we use it as the `first` config.\n // Otherwise, if the first argument is a `number`, then we use it as the `each` config.\n // Otherwise, it can be assumed the first argument is the configuration object itself, and\n // we destructure that into what we're going to use, setting important defaults as we do.\n // NOTE: The default for `scheduler` will be the `scheduler` argument if it exists, or\n // it will default to the `asyncScheduler`.\n const {\n first,\n each,\n with: _with = timeoutErrorFactory,\n scheduler = schedulerArg ?? asyncScheduler,\n meta = null!,\n } = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config) as TimeoutConfig<T, O, M>;\n\n if (first == null && each == null) {\n // Ensure timeout was provided at runtime.\n throw new TypeError('No timeout provided.');\n }\n\n return operate((source, subscriber) => {\n // This subscription encapsulates our subscription to the\n // source for this operator. We're capturing it separately,\n // because if there is a `with` observable to fail over to,\n // we want to unsubscribe from our original subscription, and\n // hand of the subscription to that one.\n let originalSourceSubscription: Subscription;\n // The subscription for our timeout timer. This changes\n // every time we get a new value.\n let timerSubscription: Subscription;\n // A bit of state we pass to our with and error factories to\n // tell what the last value we saw was.\n let lastValue: T | null = null;\n // A bit of state we pass to the with and error factories to\n // tell how many values we have seen so far.\n let seen = 0;\n const startTimer = (delay: number) => {\n timerSubscription = executeSchedule(\n subscriber,\n scheduler,\n () => {\n try {\n originalSourceSubscription.unsubscribe();\n innerFrom(\n _with!({\n meta,\n lastValue,\n seen,\n })\n ).subscribe(subscriber);\n } catch (err) {\n subscriber.error(err);\n }\n },\n delay\n );\n };\n\n originalSourceSubscription = source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value: T) => {\n // clear the timer so we can emit and start another one.\n timerSubscription?.unsubscribe();\n seen++;\n // Emit\n subscriber.next((lastValue = value));\n // null | undefined are both < 0. Thanks, JavaScript.\n each! > 0 && startTimer(each!);\n },\n undefined,\n undefined,\n () => {\n if (!timerSubscription?.closed) {\n timerSubscription?.unsubscribe();\n }\n // Be sure not to hold the last value in memory after unsubscription\n // it could be quite large.\n lastValue = null;\n }\n )\n );\n\n // Intentionally terse code.\n // If we've `seen` a value, that means the \"first\" clause was met already, if it existed.\n // it also means that a timer was already started for \"each\" (in the next handler above).\n // If `first` was provided, and it's a number, then use it.\n // If `first` was provided and it's not a number, it's a Date, and we get the difference between it and \"now\".\n // If `first` was not provided at all, then our first timer will be the value from `each`.\n !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler!.now()) : each!);\n });\n}\n\n/**\n * The default function to use to emit an error when timeout occurs and a `with` function\n * is not specified.\n * @param info The information about the timeout to pass along to the error\n */\nfunction timeoutErrorFactory(info: TimeoutInfo<any>): Observable<never> {\n throw new TimeoutError(info);\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Emits a notification from the source Observable only after a particular time span\n * has passed without another source emission.\n *\n * <span class=\"informal\">It's like {@link delay}, but passes only the most\n * recent notification from each burst of emissions.</span>\n *\n * ![](debounceTime.png)\n *\n * `debounceTime` delays notifications emitted by the source Observable, but drops\n * previous pending delayed emissions if a new notification arrives on the source\n * Observable. This operator keeps track of the most recent notification from the\n * source Observable, and emits that only when `dueTime` has passed\n * without any other notification appearing on the source Observable. If a new value\n * appears before `dueTime` silence occurs, the previous notification will be dropped\n * and will not be emitted and a new `dueTime` is scheduled.\n * If the completing event happens during `dueTime` the last cached notification\n * is emitted before the completion event is forwarded to the output observable.\n * If the error event happens during `dueTime` or after it only the error event is\n * forwarded to the output observable. The cache notification is not emitted in this case.\n *\n * This is a rate-limiting operator, because it is impossible for more than one\n * notification to be emitted in any time window of duration `dueTime`, but it is also\n * a delay-like operator since output emissions do not occur at the same time as\n * they did on the source Observable. Optionally takes a {@link SchedulerLike} for\n * managing timers.\n *\n * ## Example\n *\n * Emit the most recent click after a burst of clicks\n *\n * ```ts\n * import { fromEvent, debounceTime } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(debounceTime(1000));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link audit}\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link sample}\n * @see {@link sampleTime}\n * @see {@link throttle}\n * @see {@link throttleTime}\n *\n * @param dueTime The timeout duration in milliseconds (or the time unit determined\n * internally by the optional `scheduler`) for the window of time required to wait\n * for emission silence before emitting the most recent source value.\n * @param scheduler The {@link SchedulerLike} to use for managing the timers that\n * handle the timeout for each value.\n * @return A function that returns an Observable that delays the emissions of\n * the source Observable by the specified `dueTime`, and may drop some values\n * if they occur too frequently.\n */\nexport function debounceTime<T>(dueTime: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction<T> {\n return operate((source, subscriber) => {\n let activeTask: Subscription | null = null;\n let lastValue: T | null = null;\n let lastTime: number | null = null;\n\n const emit = () => {\n if (activeTask) {\n // We have a value! Free up memory first, then emit the value.\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue!;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle(this: SchedulerAction<unknown>) {\n // This is called `dueTime` after the first value\n // but we might have received new values during this window!\n\n const targetTime = lastTime! + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n // On that case, re-schedule to the new target\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n\n emit();\n }\n\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value: T) => {\n lastValue = value;\n lastTime = scheduler.now();\n\n // Only set up a task if it's not already up\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n },\n () => {\n // Source completed.\n // Emit any pending debounced values then complete\n emit();\n subscriber.complete();\n },\n // Pass all errors through to consumer.\n undefined,\n () => {\n // Finalization.\n lastValue = activeTask = null;\n }\n )\n );\n });\n}\n","<ng-container [ngSwitch]=\"noText\">\n <fin-text-on-image\n *ngSwitchCase=\"false\"\n [teaserTitle$]=\"content$ | finMap: 'teaserTitle'\"\n [teaserText$]=\"content$ | finMap: 'teaserText'\"\n [imageData$]=\"imageData$\"\n [target$]=\"cmsTarget$\"\n [imageAspectRatio$]=\"imageAspectRatio$\"\n ></fin-text-on-image>\n <fin-text-on-image\n *ngSwitchCase=\"true\"\n [imageData$]=\"imageData$\"\n [target$]=\"cmsTarget$\"\n [imageAspectRatio$]=\"imageAspectRatio$\"\n ></fin-text-on-image>\n</ng-container>\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { CmsPicture, CmsTarget } from '@fcom/core-api';\nimport { AspectRatios } from '@fcom/ui-components';\n\nimport { findAspectRatio, toLinkData } from '../../services';\n\nconst DEFAULT_RATIO = '16x9';\n\n@Component({\n selector: 'cms-text-on-image',\n templateUrl: './cms-text-on-image.component.html',\n})\nexport class CmsTextOnImageComponent implements OnInit {\n @Input()\n content$: Observable<any>;\n @Input()\n noText: boolean;\n\n imageData$: Observable<CmsPicture>;\n imageAspectRatio$: Observable<keyof typeof AspectRatios>;\n cmsTarget$: Observable<CmsTarget>;\n\n ngOnInit(): void {\n this.imageData$ = this.content$.pipe(map((d) => d.picture));\n this.cmsTarget$ = this.content$.pipe(map((d) => toLinkData(d.target)));\n this.imageAspectRatio$ = this.content$.pipe(map((d) => findAspectRatio(d.subjectTaxonomyTags) ?? DEFAULT_RATIO));\n }\n}\n","export interface AriaOptions {\n label?: string;\n loadingLabel?: string;\n describedby?: string;\n details?: string;\n labelledby?: string;\n role?: 'button' | 'link' | 'searchbox' | 'tab';\n disabled?: boolean;\n controls?: string;\n selected?: boolean;\n activedescendant?: string;\n expanded?: boolean;\n hidden?: boolean;\n}\n\nexport interface Attachment {\n error?: AttachmentError;\n file: File;\n fileId?: string;\n status?: AttachmentStatus;\n}\n\nexport enum AttachmentError {\n DUPLICATE = 'duplicate',\n EXTENSION = 'extension',\n MALWARE = 'malware',\n MAX_ATTACHMENTS = 'maxAttachments',\n MAX_SIZE = 'maxSize',\n PATTERN = 'pattern',\n REQUIRED = 'required',\n UPLOADING = 'uploading',\n UNKNOWN = 'unknown',\n}\n\nexport enum AttachmentStatus {\n ERROR = 'ERROR',\n READY = 'READY',\n UPLOADING = 'UPLOADING',\n}\n\nexport interface DatepickerTitleAreaOptions {\n titleAreaStyle?: string;\n title?: string;\n titleStyle?: string;\n}\n\nexport interface FileUploaderI18n {\n attachFile: string;\n attachFiles: string;\n browseFiles: string;\n dragAndDrop: string;\n errors: {\n duplicateSingle: string;\n duplicateMultiple: string;\n invalidFileSizeSingle: string;\n invalidFileSizeMultiple: string;\n invalidFileTypeSingle: string;\n invalidFileTypeMultiple: string;\n maxAttachments: string;\n malwareSingle: string;\n malwareMultiple: string;\n required: string;\n requiredMultiple: string;\n unknown: string;\n };\n filesSupported: string;\n maxAttachments: string;\n maxFileSize: string;\n megaBytes: string;\n or: string;\n}\n","'use strict';\n\nvar callBind = require('call-bind-apply-helpers');\nvar gOPD = require('gopd');\n\nvar hasProtoAccessor;\ntry {\n\t// eslint-disable-next-line no-extra-parens, no-proto\n\thasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;\n} catch (e) {\n\tif (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {\n\t\tthrow e;\n\t}\n}\n\n// eslint-disable-next-line no-extra-parens\nvar desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));\n\nvar $Object = Object;\nvar $getPrototypeOf = $Object.getPrototypeOf;\n\n/** @type {import('./get')} */\nmodule.exports = desc && typeof desc.get === 'function'\n\t? callBind([desc.get])\n\t: typeof $getPrototypeOf === 'function'\n\t\t? /** @type {import('./get')} */ function getDunder(value) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\treturn $getPrototypeOf(value == null ? value : $Object(value));\n\t\t}\n\t\t: false;\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { combineLatest, switchMap, Observable, of, Subscription } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { isPresent, unsubscribe } from '@fcom/core/utils';\nimport { ConfigService } from '@fcom/core/services';\nimport { WindowRef } from '@fcom/core/providers';\nimport { CartActions } from '@fcom/booking/store/actions';\nimport { BookingAppState } from '@fcom/common/interfaces/booking';\nimport { navigateToError } from '@fcom/booking/utils/route-utils';\nimport { finShare } from '@fcom/rx';\nimport { GtmService } from '@fcom/common/gtm';\nimport { FinnairCart, FinnairOrder } from '@fcom/dapi/api/models';\nimport { cartData } from '@fcom/booking/store/selectors';\nimport { GtmEvent, GtmPurchaseFlow } from '@fcom/common/interfaces';\nimport { getGA4Items, resolvePurchaseFlow } from '@fcom/common/utils/gtm.utils';\nimport { Profile } from '@fcom/core-api/login';\nimport { profileOrNot } from '@fcom/core/selectors';\nimport { QualtricsSurveys } from '@fcom/common/qualtrics/qualtrics.utils';\nimport { FeedbackService } from '@fcom/common/services/feedback/feedback.service';\n\nimport { isAwardBooking } from '../../utils/common-booking.utils';\nimport { PaymentService } from '../../services';\nimport { CartOrOrder, PaymentFlow, PaymentServiceName, PaymentStatus } from '../../interfaces';\nimport { orderData, paymentRedirectionUrl, paymentStatus } from '../../store/selectors';\n\nconst getPurchaseFlow = (cartOrOrder: CartOrOrder, paymentFlow: PaymentFlow, profile: Profile): GtmPurchaseFlow => {\n switch (paymentFlow) {\n case PaymentFlow.VOLUNTARY_CHANGE:\n return GtmPurchaseFlow.VOLUNTARY_CHANGE;\n case PaymentFlow.MANAGE_BOOKING:\n return GtmPurchaseFlow.MANAGE_BOOKING;\n default:\n return resolvePurchaseFlow(profile, isAwardBooking(cartOrOrder.prices.unpaid));\n }\n};\n\n@Component({\n selector: 'fin-purchase-checkout',\n templateUrl: './purchase-checkout.component.html',\n})\nexport class PurchaseCheckoutComponent implements OnInit, OnDestroy {\n @Input()\n serviceName: PaymentServiceName;\n\n @Input()\n paymentFlow: PaymentFlow;\n\n @Input()\n isEnableFeedbackMMB = false;\n\n checkoutUrl: string;\n\n readonly paymentStatus$: Observable<PaymentStatus>;\n\n private subscription: Subscription;\n\n constructor(\n private paymentService: PaymentService,\n private store$: Store<BookingAppState>,\n private configService: ConfigService,\n private windowRef: WindowRef,\n private router: Router,\n private languageService: LanguageService,\n private gtmService: GtmService,\n private feedbackService: FeedbackService\n ) {\n this.paymentStatus$ = this.store$.pipe(paymentStatus(), finShare());\n this.checkoutUrl = this.configService.cfg.checkoutUrl;\n }\n\n cleanup(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n ngOnInit(): void {\n this.subscription = new Subscription();\n\n const cart$: Observable<FinnairCart> = this.store$.pipe(cartData());\n const order$: Observable<FinnairOrder | undefined> = this.store$.pipe(orderData(true));\n const cartOrOrder$ = order$.pipe(\n switchMap((order) => (order ? of(order) : cart$)),\n take(1)\n );\n\n this.subscription.add(\n combineLatest([cartOrOrder$, this.store$.pipe(profileOrNot())]).subscribe(([cartOrOrder, profile]) => {\n const purchaseFlow = getPurchaseFlow(cartOrOrder, this.paymentFlow, profile);\n this.gtmService.ecommerceEventGA4(GtmEvent.BEGIN_CHECKOUT, getGA4Items(cartOrOrder, purchaseFlow, true));\n })\n );\n\n this.subscription.add(\n this.store$.pipe(paymentRedirectionUrl(), filter(isPresent)).subscribe((receivedUrl: string) => {\n this.store$.dispatch(CartActions.reset());\n // TODO: fix back button\n // TODO: store somewhere that user has been redirected, so the backbutton would work\n this.windowRef.nativeWindow.location.href = receivedUrl;\n })\n );\n\n this.subscription.add(\n this.paymentStatus$.subscribe((status: PaymentStatus) => {\n if (status === PaymentStatus.INITIAL) {\n this.paymentService.queuePaymentInit(this.serviceName, this.paymentFlow);\n } else if (status === PaymentStatus.TECHNICAL_ERROR) {\n navigateToError(this.router, this.languageService.langValue, 'TECHNICAL_ERROR');\n }\n })\n );\n if (this.isEnableFeedbackMMB) {\n this.feedbackService.setSurvey(QualtricsSurveys.MMB_FEEDBACK);\n this.feedbackService.setFeedbackWidgetVisibility(true);\n }\n }\n\n ngOnDestroy(): void {\n this.cleanup();\n }\n}\n","<div class=\"payment grow--min ie--use-100vh grey-25-bg\">\n <fin-loader aria-live=\"polite\" [waitingFor]=\"'payment.initializing'\"></fin-loader>\n</div>\n<link rel=\"dns-prefetch\" [href]=\"checkoutUrl | finSafe: 'resource'\" />\n","<section *ngIf=\"bound && locations\" data-testid=\"itinerary-timeline\">\n <div class=\"white-bg rounded\">\n <fin-itinerary-timeline-bound-header\n [bound$]=\"bound | finToObservable\"\n [boundType]=\"boundType\"\n [locations$]=\"locations | finToObservable\"\n [departureChanges]=\"departureChanges\"\n [arrivalChanges]=\"arrivalChanges\"\n [title]=\"title\"\n [boundChangeDuration]=\"boundChangeDuration\"\n [showNoChangesNotification]=\"showNoChangesNotification\"\n ></fin-itinerary-timeline-bound-header>\n\n <div class=\"timeline font-body-1 pr-xxsmall-x\" [class.pr-xxsmall-y]=\"boundType && bound\">\n <ng-container *ngFor=\"let item of bound.itinerary; let first = first; let last = last; let i = index\">\n <ng-container *finLet=\"toType(item) as leg\" [ngSwitch]=\"leg.type\">\n <ng-container *ngSwitchCase=\"'FLIGHT'\">\n <fin-itinerary-timeline-flight\n [flight]=\"leg\"\n [locations]=\"locations\"\n [firstLeg]=\"first\"\n [lastLeg]=\"last\"\n [flightChanges]=\"legChanges.get(leg.id)\"\n [isBookingFlow]=\"isBookingFlow\"\n ></fin-itinerary-timeline-flight>\n <!-- TECHNICAL STOPS -->\n <fin-itinerary-timeline-leg-technical-stops\n [leg]=\"leg\"\n [firstLeg]=\"first\"\n [lastLeg]=\"last\"\n [locations]=\"locations\"\n [oldArrivalLocationCode]=\"legChanges.get(leg.id)?.arrivalLocationCode\"\n [oldArrivalDateTime]=\"legChanges.get(leg.id)?.arrivalDateTime\"\n ></fin-itinerary-timeline-leg-technical-stops>\n </ng-container>\n <!-- LAYOVER -->\n <ng-container *ngSwitchCase=\"'LAYOVER'\">\n <fin-itinerary-timeline-layover\n [bound]=\"bound\"\n [layover]=\"leg\"\n [previousLeg]=\"bound.itinerary[i - 1]\"\n [nextLeg]=\"bound.itinerary[i + 1]\"\n [oldDuration]=\"legChanges.get('LAYOVER' + i)?.duration\"\n [notification]=\"legChanges.get('LAYOVER' + i)?.notification\"\n [isBookingFlow]=\"isBookingFlow\"\n ></fin-itinerary-timeline-layover>\n </ng-container>\n </ng-container>\n </ng-container>\n <div *ngIf=\"arrivalChanges?.notification\" class=\"timeline__right medium-type heather-700-text pr-medium-y\">\n <fcom-notification\n *ngIf=\"arrivalChanges.notification\"\n [theme]=\"NotificationTheme.WARNING\"\n [layout]=\"NotificationLayout.BLOCK\"\n [iconName]=\"SvgLibraryIcon.INFO\"\n class=\"block\"\n >\n {{ 'MMB.notifications.disruption.' + arrivalChanges.notification + '.text' | finLocalization }}\n </fcom-notification>\n </div>\n </div>\n </div>\n</section>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { BUS_AIRCRAFT_CODE } from '@fcom/booking/modules/ticket-selection/interfaces';\nimport { BoundType, Duration, LocationInfoMap } from '@fcom/dapi';\nimport {\n FinnairBoundItem,\n FinnairDisruptedBoundItem,\n FinnairItineraryItem,\n FinnairItineraryItemFlight,\n FinnairItineraryItemLayover,\n} from '@fcom/dapi/api/models';\nimport { NotificationLayout, NotificationTheme } from '@fcom/ui-components';\n\nimport { EndPointChanges, FlightChanges } from '../../interfaces/index';\n\n@Component({\n selector: 'fin-itinerary-timeline',\n styleUrls: ['./itinerary.scss', 'arrow-block.scss'],\n templateUrl: './itinerary-timeline.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItineraryTimelineComponent {\n readonly BUS_AIRCRAFT_CODE = BUS_AIRCRAFT_CODE;\n readonly NotificationLayout = NotificationLayout;\n readonly NotificationTheme = NotificationTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n /**\n * The translation prefix for strings that are not common to both departure and return flights.\n * E.g. \"Departure\" vs. \"Return\"\n */\n @Input()\n nonCommonTranslationPrefix: string;\n\n @Input()\n boundType: BoundType = null;\n\n @Input()\n bound: FinnairBoundItem | FinnairDisruptedBoundItem;\n\n @Input()\n locations: LocationInfoMap;\n\n @Input()\n isBookingFlow = false;\n\n @Input()\n title: string;\n\n @Input()\n legChanges: Map<string, FlightChanges> = new Map();\n\n @Input()\n departureChanges: EndPointChanges;\n\n @Input()\n arrivalChanges: EndPointChanges;\n\n @Input()\n boundChangeDuration: Duration;\n\n @Input()\n showNoChangesNotification: boolean;\n\n toType(t: FinnairItineraryItem): FinnairItineraryItemFlight | FinnairItineraryItemLayover {\n return 'technicalStops' in t ? (t as FinnairItineraryItemFlight) : (t as FinnairItineraryItemLayover);\n }\n}\n","export enum TripType {\n RETURN = 'return',\n ONEWAY = 'oneway',\n MULTICITY = 'multicity',\n}\n","import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification<any>, subscriber: Subscriber<any>) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n","import { MonoTypeOperatorFunction } from '../types';\nimport { filter } from './filter';\n\n/**\n * Returns an Observable that skips the first `count` items emitted by the source Observable.\n *\n * ![](skip.png)\n *\n * Skips the values until the sent notifications are equal or less than provided skip count. It raises\n * an error if skip count is equal or more than the actual number of emits and source raises an error.\n *\n * ## Example\n *\n * Skip the values before the emission\n *\n * ```ts\n * import { interval, skip } from 'rxjs';\n *\n * // emit every half second\n * const source = interval(500);\n * // skip the first 10 emitted values\n * const result = source.pipe(skip(10));\n *\n * result.subscribe(value => console.log(value));\n * // output: 10...11...12...13...\n * ```\n *\n * @see {@link last}\n * @see {@link skipWhile}\n * @see {@link skipUntil}\n * @see {@link skipLast}\n *\n * @param count The number of times, items emitted by source Observable should be skipped.\n * @return A function that returns an Observable that skips the first `count`\n * values emitted by the source Observable.\n */\nexport function skip<T>(count: number): MonoTypeOperatorFunction<T> {\n return filter((_, index) => count <= index);\n}\n","<ng-template #btnTemplate let-item>\n <button class=\"no-underline link-hover flex flex--row\" (click)=\"emitClick(item.data)\">\n {{ item.options.btnText }} <fcom-icon class=\"ps-xsmall-l\" [name]=\"item.options.btnIcon\"></fcom-icon>\n </button>\n</ng-template>\n<table class=\"table fill relative\">\n <caption class=\"is-vishidden\">\n {{\n caption\n }}\n </caption>\n <thead *ngIf=\"headers?.length > 0 && !!headerTemplate\" [ngClass]=\"{ 'dn-mobile': mobileTemplate || mobileHeader }\">\n <tr>\n <th\n class=\"align-left ps-medium-y ps-xsmall-x border-bottom border-top nordic-blue-100-border\"\n scope=\"col\"\n [class.border-left]=\"index === 0\"\n [class.border-right]=\"index === headers.length - 1\"\n [class.rounded-top-left-large]=\"index === 0\"\n [class.rounded-top-right-large]=\"index === headers.length - 1\"\n [ngClass]=\"header?.options?.class\"\n *ngFor=\"let header of headers; index as index\"\n #tableHeader\n >\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { $implicit: header }\"></ng-container>\n </th>\n </tr>\n </thead>\n <thead *ngIf=\"mobileHeader\" class=\"dn-tablet-up\">\n <tr>\n <th\n class=\"ps-medium-y ps-xsmall-x border-left border-top border-right nordic-blue-100-border rounded-top-large\"\n scope=\"col\"\n >\n <ng-container *ngTemplateOutlet=\"mobileHeader\"></ng-container>\n </th>\n </tr>\n </thead>\n <tbody [ngClass]=\"{ 'dn-mobile': mobileTemplate }\">\n <tr\n *ngFor=\"let row of tableData; index as rowIndex\"\n [ngClass]=\"{ 'action-row': !!row.rowAction }\"\n (click)=\"row.rowAction && emitClick(row.rowAction.data)\"\n >\n <td\n *ngFor=\"let header of headers; index as columnIndex\"\n class=\"border-bottom nordic-blue-100-border ps-small-y ps-xsmall-x\"\n [class.border-left]=\"columnIndex === 0\"\n [class.border-right]=\"columnIndex === headers.length - 1\"\n [class.border-top]=\"rowIndex === 0 && !headerTemplate\"\n [class.rounded-top-left-large]=\"rowIndex === 0 && columnIndex === 0 && !headerTemplate\"\n [class.rounded-top-right-large]=\"rowIndex === 0 && columnIndex === headers.length - 1 && !headerTemplate\"\n [class.rounded-bottom-left-large]=\"rowIndex === tableData.length - 1 && columnIndex === 0 && !usePagination\"\n [class.rounded-bottom-right-large]=\"\n rowIndex === tableData.length - 1 && columnIndex === headers.length - 1 && !usePagination\n \"\n [ngClass]=\"row[header.key]?.options?.class\"\n >\n <ng-container *ngIf=\"!row[header.key]?.options?.useBtn\">\n <ng-container *ngTemplateOutlet=\"cellTemplate; context: { $implicit: row[header.key].data }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"row[header.key]?.options?.useBtn\">\n <ng-container\n *ngTemplateOutlet=\"\n btnTemplate;\n context: { $implicit: { data: row[header.key].data, options: row[header.key]?.options } }\n \"\n ></ng-container>\n </ng-container>\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"mobileTemplate\" class=\"dn-tablet-up\">\n <tr\n *ngFor=\"let row of tableData; index as rowIndex\"\n [ngClass]=\"{ 'action-row': !!row.rowAction }\"\n (click)=\"row.rowAction && emitClick(row.rowAction.data)\"\n >\n <td\n class=\"border-left border-right border-bottom nordic-blue-100-border ps-small-y ps-xsmall-x\"\n [class.border-top]=\"rowIndex === 0\"\n [class.rounded-large]=\"tableData.length === 1 && !mobileHeader\"\n [class.rounded-top-large]=\"rowIndex === 0 && !mobileHeader && tableData.length > 1\"\n [class.rounded-bottom-large]=\"rowIndex === tableData.length - 1 && !usePagination && tableData.length > 1\"\n >\n <ng-container *ngTemplateOutlet=\"mobileTemplate; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"loading\" class=\"absolute fill grow block top-left\">\n <tr class=\"absolute fill grow\">\n <td class=\"absolute fill grow loader\">\n <div class=\"grey-25-bg border fill grow rounded-large flex flex--center\" data-testid=\"table-loader\">\n <fcom-loader [loaderType]=\"LoaderTheme.INLINE\"></fcom-loader>\n </div>\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"!loading && !tableData?.length && noResultsMsg\" class=\"no-results\">\n <tr>\n <td\n [colSpan]=\"headers?.length || 1\"\n class=\"grey-25-bg align-center border-left border-bottom border-right rounded-bottom-large pr-large-y ps-large-x\"\n >\n <span class=\"font-body-1 medium-type inline-block\" data-testid=\"table-no-results\">{{ noResultsMsg }}</span>\n </td>\n </tr>\n </tbody>\n</table>\n<fcom-pagination\n *ngIf=\"usePagination\"\n [totalItems]=\"totalPaginationItems\"\n [textBeforePages]=\"textBeforePages\"\n (indexesChange)=\"changeIndexes($event)\"\n [itemsPerPageOptions]=\"itemsPerPageOptions\"\n [(itemsPerPage)]=\"itemsPerPage\"\n></fcom-pagination>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n QueryList,\n TemplateRef,\n ViewChildren,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { PageIndexes } from '../pagination/pagination.component';\nimport { LoaderTheme } from '../loader';\n\nexport type ClassOptions =\n | string\n | string[]\n | Set<string>\n | {\n [key: string]: any;\n }\n | null\n | undefined;\n\nexport interface RowDataItem<T> {\n [key: string]: {\n data: T;\n options?: {\n class?: ClassOptions;\n useBtn?: boolean;\n btnIcon?: SvgLibraryIcon;\n btnText?: string;\n };\n };\n}\n\nexport interface HeaderItem {\n key: string;\n value?: string;\n options?: {\n class?: ClassOptions;\n isMarked?: boolean;\n };\n}\n\n/**\n * Table component which works with different templates\n *\n * @example\n * <fin-table\n * [rowData]=\"rowData\"\n * [cellTemplate]=\"itemTemplate\"\n * [headers]=\"header\"\n * [headerTemplate]=\"headerTemplate\"\n * ></fin-table>\n */\n@Component({\n selector: 'fcom-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent<T> implements OnChanges {\n protected readonly LoaderTheme = LoaderTheme;\n\n @Input()\n headers: HeaderItem[];\n\n @Input()\n rowData: RowDataItem<T>[];\n\n @Input()\n cellTemplate: TemplateRef<any>;\n\n @Input()\n mobileHeader: TemplateRef<any>;\n\n @Input()\n mobileTemplate: TemplateRef<any>;\n\n @Input()\n usePagination = false;\n\n @Input()\n textBeforePages?: string;\n\n @Input()\n itemsPerPageOptions?: number[] = [8, 16];\n\n @Input()\n headerTemplate?: TemplateRef<any>;\n\n @Input()\n caption: string;\n\n @Input()\n loading: boolean;\n\n @Input()\n noResultsMsg: string;\n\n @Output()\n clickBtn = new EventEmitter<T>();\n\n tableData: RowDataItem<T>[];\n\n itemsPerPage = this.itemsPerPageOptions[0];\n totalPaginationItems = 0;\n\n @ViewChildren('tableHeader', { read: ElementRef }) tableHeaders: QueryList<ElementRef>;\n\n ngOnChanges(): void {\n this.totalPaginationItems = this.rowData?.length ?? 0;\n if (!this.usePagination) {\n this.tableData = this.rowData;\n } else {\n this.tableData = this.rowData?.slice(0, this.itemsPerPageOptions[0]);\n }\n }\n\n changeIndexes({ startIndex, endIndex }: PageIndexes): void {\n this.tableData = this.rowData?.slice(startIndex, endIndex);\n }\n\n emitClick(data: T): void {\n this.clickBtn.emit(data);\n }\n}\n","import { ChangeDetectorRef, Injectable, Pipe, PipeTransform, OnDestroy } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { DateFormat, Pattern, DateFormatInput } from '@fcom/core/utils';\n\nconst getPattern = (input: string) => DateFormat[input] || new Pattern(input);\n\n/**\n * Asynchronous DateFormat pipe that supports localizations.\n * Uses TranslateService to get localized date formats and names.\n *\n * Syntax:\n * <Date|Day|number> 'pattern' [defaultValue = '']\n *\n * Built-in patterns (prints are examples for Finnish locale on SAT 2016-01-02):\n * FULL => ti 2.1.2016\n * FULL_NO_YEAR => ti 2.1.\n * DATE => 2.1.2016\n * DATE_SHORT => 2.1.\n * MONTH => Tammikuu\n * MONTH_SHORT => Tam\n * WEEKDAY => Lauantai\n * WEEKDAY_SHORT => la\n * VOICE_OVER_DATE => Lauantai, 2 Tammikuu\n *\n * Pattern is considered as a custom one if pattern's value doesn't match any build-in format.\n * Custom pattern is related to Java SimpleDateFormat syntax (examples for SAT 2016-01-02 on Finnish locale):\n * yy = year in 2 digits => 16\n * yyyy = year in 4 digits => 2016\n * M = month in 1-2 digit => 1\n * MM = month in 2 digits => 01\n * MMM = month's short name => Tam\n * MMMM = month's name => Tammikuu\n * d = day of month in 1-2 digits => 2\n * dd = day of month in 2 digits => 02\n * E = weekday's short name => la\n * EE = weekday's name => Lauantai\n */\n@Injectable()\n@Pipe({\n name: 'finDateFormat',\n pure: false,\n})\nexport class DateFormatPipe implements OnDestroy, PipeTransform {\n private async: AsyncPipe;\n private cached$: Observable<any>;\n private cachedInput: DateFormatInput;\n private cachedPattern: string;\n private cachedUseUserDate: boolean;\n\n constructor(\n private ref: ChangeDetectorRef,\n private languageService: LanguageService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(input: DateFormatInput, pattern: string, useUserDate = false): string {\n if (this.valueChanged(input, pattern, useUserDate)) {\n this.update(input, pattern, useUserDate);\n }\n return this.async.transform(this.cached$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n\n private valueChanged(input: DateFormatInput, pattern: string, useUserDate: boolean): boolean {\n return (\n !this.cached$ ||\n input !== this.cachedInput ||\n pattern !== this.cachedPattern ||\n useUserDate !== this.cachedUseUserDate\n );\n }\n\n private update(input: DateFormatInput, pattern: string, useUserDate: boolean): void {\n this.cached$ = this.languageService.translate('date').pipe(\n map((translations: any) => {\n if (!pattern) {\n return 'ERROR';\n }\n if (!input) {\n return '';\n }\n return new DateFormat(translations).format(input, getPattern(pattern), useUserDate);\n })\n );\n this.cachedInput = input;\n this.cachedPattern = pattern;\n this.cachedUseUserDate = useUserDate;\n }\n}\n","import { FinnairOrder, PaymentTransaction } from '@fcom/dapi/api/models';\n\nexport enum DeviceForPayment {\n MOBILE = 'MOBILE',\n TABLET = 'TABLET',\n LAPTOP = 'LAPTOP',\n DESKTOP = 'DESKTOP',\n}\n\nconst devices = [\n { type: DeviceForPayment.MOBILE, maxWidth: 600 },\n { type: DeviceForPayment.TABLET, maxWidth: 1024 },\n { type: DeviceForPayment.LAPTOP, maxWidth: 1600 },\n { type: DeviceForPayment.DESKTOP, maxWidth: Infinity },\n];\n\nexport const mapDeviceForPayment = (size: number): DeviceForPayment =>\n devices.reduce((_type: DeviceForPayment, currentType, i: number) => {\n if (currentType.maxWidth > size && (i === 0 || devices[i - 1].maxWidth <= size)) {\n _type = currentType.type;\n }\n return _type;\n }, devices[0].type);\n\nexport const mapPaymentMethods = (order: FinnairOrder): PaymentTransaction[] => {\n const purchasedTSMS =\n order.checkouts?.sort((a, b) => +a.timestamp - +b.timestamp)[0]?.items.map((item) => item.id) ??\n order.services?.pending?.flatMap((category) =>\n category.bounds.flatMap((bound) =>\n bound.segments.flatMap((segment) =>\n segment.passengers.flatMap((passenger) => passenger.services.map(({ id }) => id))\n )\n )\n ) ??\n [];\n\n return order.payments?.filter((payment) => payment.associatedIds?.some((id) => purchasedTSMS.includes(id)));\n};\n","import { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\n\nimport { CheapestPriceForAllDestinationsService } from './cheapest-price/cheapest-price-for-all-destinations.service';\n\n// Exports these shared services in one shared module. For importing on both levels: cms module and it's child modules.\n@NgModule({\n imports: [CommonModule],\n declarations: [],\n exports: [],\n})\nexport class ContentServicesModule {\n static forRoot(): ModuleWithProviders<ContentServicesModule> {\n return {\n ngModule: ContentServicesModule,\n providers: [CheapestPriceForAllDestinationsService],\n };\n }\n}\n","import { OperatorFunction } from '../types';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/**\n * Groups pairs of consecutive emissions together and emits them as an array of\n * two values.\n *\n * <span class=\"informal\">Puts the current value and previous value together as\n * an array, and emits that.</span>\n *\n * ![](pairwise.png)\n *\n * The Nth emission from the source Observable will cause the output Observable\n * to emit an array [(N-1)th, Nth] of the previous and the current value, as a\n * pair. For this reason, `pairwise` emits on the second and subsequent\n * emissions from the source Observable, but not on the first emission, because\n * there is no previous value in that case.\n *\n * ## Example\n *\n * On every click (starting from the second), emit the relative distance to the previous click\n *\n * ```ts\n * import { fromEvent, pairwise, map } from 'rxjs';\n *\n * const clicks = fromEvent<PointerEvent>(document, 'click');\n * const pairs = clicks.pipe(pairwise());\n * const distance = pairs.pipe(\n * map(([first, second]) => {\n * const x0 = first.clientX;\n * const y0 = first.clientY;\n * const x1 = second.clientX;\n * const y1 = second.clientY;\n * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));\n * })\n * );\n *\n * distance.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n *\n * @return A function that returns an Observable of pairs (as arrays) of\n * consecutive values from the source Observable.\n */\nexport function pairwise<T>(): OperatorFunction<T, [T, T]> {\n return operate((source, subscriber) => {\n let prev: T;\n let hasPrev = false;\n source.subscribe(\n createOperatorSubscriber(subscriber, (value) => {\n const p = prev;\n prev = value;\n hasPrev && subscriber.next([p, value]);\n hasPrev = true;\n })\n );\n });\n}\n","<div class=\"checkbox flex medium-type\">\n <label class=\"fill flex flex-1 flex--nogrow ps-medium-r\" [for]=\"cid\" [ngClass]=\"{ 'link-hover': !disabled }\">\n <input\n class=\"is-vishidden\"\n type=\"checkbox\"\n [checked]=\"checked\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [attr.id]=\"cid\"\n [attr.disabled]=\"disabled ? 'disabled' : undefined\"\n (change)=\"interactionEvent($event)\"\n (click)=\"clickEvent($event)\"\n (blur)=\"blurEvent()\"\n (focus)=\"focusEvent()\"\n />\n <span\n aria-hidden=\"true\"\n class=\"icons ms-xsmall-r nordic-blue-900-text inline-block flex--self-start\"\n [ngClass]=\"theme\"\n >\n <fcom-icon\n *ngIf=\"!checked && showUnselectedIcon\"\n [name]=\"\n theme === CheckBoxTheme.SQUARE\n ? SvgLibraryIcon.CHECKBOX_UNSELECTED\n : SvgLibraryIcon.CHECKMARK_BUTTON_UNSELECTED\n \"\n class=\"icon-medium\"\n ></fcom-icon>\n <fcom-icon\n *ngIf=\"checked\"\n [name]=\"\n theme === CheckBoxTheme.SQUARE ? SvgLibraryIcon.CHECKBOX_SELECTED : SvgLibraryIcon.CHECKMARK_BUTTON_SELECTED\n \"\n class=\"icon-medium\"\n ></fcom-icon>\n </span>\n <span\n data-testid=\"text-content\"\n class=\"text\"\n [class.content-full-width]=\"contentFullWidth\"\n [class.fill]=\"contentFullWidth\"\n >\n <ng-content></ng-content>\n </span>\n </label>\n</div>\n","import {\n Component,\n forwardRef,\n ChangeDetectionStrategy,\n Injector,\n ChangeDetectorRef,\n Directive,\n Attribute,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { AbstractCheckboxComponent } from '../abstracts/abstract-checkbox.component';\nimport { CheckBoxTheme } from '../enums';\n\n/**\n * The checkbox component can be used in either a reactive form, template driven form or standalone.\n *\n * @example\n * <fcom-checkbox\n * [name]=\"name\"\n * [checked]=\"checked\"\n * [disabled]=\"disabled\"\n * (blur)=\"onBlur($event)\"\n * (focus)=\"onFocus($event)\"\n * (change)=\"onChange($event)\">\n * <span class=\"font-body-1 medium-type\">{{ name }}</span>\n * </fcom-checkbox>\n */\n@Component({\n selector: 'fcom-checkbox',\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckboxComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CheckboxComponent extends AbstractCheckboxComponent {\n tabIndex: number;\n\n readonly CheckBoxTheme = CheckBoxTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input() contentFullWidth = false;\n\n @Input() showUnselectedIcon = true;\n\n @HostBinding('attr.tabindex')\n hostTabindex = null;\n\n @HostBinding('class.checkbox-focused')\n get focusedState(): boolean {\n return this.focused;\n }\n\n @HostBinding('class.checkbox-disabled')\n get disabledState(): boolean {\n return this.disabled;\n }\n\n constructor(cdRef: ChangeDetectorRef, injector: Injector, @Attribute('tabindex') tabIndex: string) {\n super(cdRef, injector);\n this.tabIndex = parseInt(tabIndex, 10) || 0;\n }\n}\n\n/**\n * Validator for checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `fcom-checkbox`.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `fcom-checkbox[required][formControlName],\n fcom-checkbox[required][formControl], fcom-checkbox[required][ngModel]`,\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => FcomCheckboxRequiredValidator),\n multi: true,\n },\n ],\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: { '[attr.required]': 'required ? \"\" : null' },\n})\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport class FcomCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n","<ng-container *ngFor=\"let location of locations; let i = index\">\n <div\n class=\"font-body-1\"\n *ngIf=\"(tripType !== TripType.MULTICITY && i === 0) || tripType === TripType.MULTICITY\"\n data-testid=\"trip-location-info\"\n >\n <span> {{ location.originLocationCode | finLocationName }} {{ location.originLocationCode }}</span>\n <fcom-icon\n class=\"icon-medium ps-xxsmall-x\"\n [name]=\"tripType === TripType.RETURN ? SvgLibraryIcon.RETURN_TRIP : SvgLibraryIcon.AIRCRAFT_HORIZONTAL\"\n [informative]=\"true\"\n role=\"img\"\n aria-label=\"Flight icon\"\n ></fcom-icon>\n <span>\n {{ location.destinationLocationCode | finLocationName }}\n {{ location.destinationLocationCode }}\n </span>\n </div>\n</ng-container>\n","import { Component, Input } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { BookingLocationCodes } from '@fcom/common/interfaces/booking';\nimport { TripType } from '@fcom/core/interfaces';\n\n@Component({\n selector: 'fin-trip-location-info',\n templateUrl: './trip-location-info.component.html',\n})\nexport class TripLocationInfoComponent {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TripType = TripType;\n\n @Input() tripType: TripType;\n @Input() locations: BookingLocationCodes[];\n}\n","import { createSelector, MemoizedSelector } from '@ngrx/store';\n\nimport { BookingAppState, BookingFeatureState } from '@fcom/common/interfaces/booking/booking-state.interface';\n\n/**\n * Temporary selector for getting the booking feature root state\n * @type {MemoizedSelector<BookingAppState, any> | MemoizedSelector<any, any>}\n */\nexport const bookingFeatureState: MemoizedSelector<BookingAppState, BookingFeatureState> = createSelector(\n (appState: BookingAppState) => appState as BookingFeatureState,\n (a) => a\n);\n","export enum TicketSelectionPhase {\n SELECT_DEPARTURE = 0,\n SELECT_RETURN = 1,\n}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { ConfigService, SentryLogger } from '@fcom/core/services';\n\nimport { NewsletterSignupPayload, NewsletterSignupResponse } from '../../interfaces/newsletter-signup.interface';\n\n@Injectable()\nexport class NewsletterSignupService {\n constructor(\n private configService: ConfigService,\n private http: HttpClient,\n private sentryLogger: SentryLogger\n ) {}\n\n postSubscribeRequest(payload: NewsletterSignupPayload): Observable<NewsletterSignupResponse> {\n const httpOptions = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n }),\n };\n\n return this.http\n .post<NewsletterSignupResponse>(\n `${this.configService.cfg.customerCommunicationsApiUrl}/newsletter`,\n payload,\n httpOptions\n )\n .pipe(\n catchError((err: unknown) => {\n this.sentryLogger.warn('Failed to post newsletter subscription call', { error: err });\n return throwError(() => err);\n })\n );\n }\n}\n","import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { SchedulerLike } from '../types';\nimport { isFunction } from '../util/isFunction';\n\n/**\n * Creates an observable that will create an error instance and push it to the consumer as an error\n * immediately upon subscription.\n *\n * <span class=\"informal\">Just errors and does nothing else</span>\n *\n * ![](throw.png)\n *\n * This creation function is useful for creating an observable that will create an error and error every\n * time it is subscribed to. Generally, inside of most operators when you might want to return an errored\n * observable, this is unnecessary. In most cases, such as in the inner return of {@link concatMap},\n * {@link mergeMap}, {@link defer}, and many others, you can simply throw the error, and RxJS will pick\n * that up and notify the consumer of the error.\n *\n * ## Example\n *\n * Create a simple observable that will create a new error with a timestamp and log it\n * and the message every time you subscribe to it\n *\n * ```ts\n * import { throwError } from 'rxjs';\n *\n * let errorCount = 0;\n *\n * const errorWithTimestamp$ = throwError(() => {\n * const error: any = new Error(`This is error number ${ ++errorCount }`);\n * error.timestamp = Date.now();\n * return error;\n * });\n *\n * errorWithTimestamp$.subscribe({\n * error: err => console.log(err.timestamp, err.message)\n * });\n *\n * errorWithTimestamp$.subscribe({\n * error: err => console.log(err.timestamp, err.message)\n * });\n *\n * // Logs the timestamp and a new error message for each subscription\n * ```\n *\n * ### Unnecessary usage\n *\n * Using `throwError` inside of an operator or creation function\n * with a callback, is usually not necessary\n *\n * ```ts\n * import { of, concatMap, timer, throwError } from 'rxjs';\n *\n * const delays$ = of(1000, 2000, Infinity, 3000);\n *\n * delays$.pipe(\n * concatMap(ms => {\n * if (ms < 10000) {\n * return timer(ms);\n * } else {\n * // This is probably overkill.\n * return throwError(() => new Error(`Invalid time ${ ms }`));\n * }\n * })\n * )\n * .subscribe({\n * next: console.log,\n * error: console.error\n * });\n * ```\n *\n * You can just throw the error instead\n *\n * ```ts\n * import { of, concatMap, timer } from 'rxjs';\n *\n * const delays$ = of(1000, 2000, Infinity, 3000);\n *\n * delays$.pipe(\n * concatMap(ms => {\n * if (ms < 10000) {\n * return timer(ms);\n * } else {\n * // Cleaner and easier to read for most folks.\n * throw new Error(`Invalid time ${ ms }`);\n * }\n * })\n * )\n * .subscribe({\n * next: console.log,\n * error: console.error\n * });\n * ```\n *\n * @param errorFactory A factory function that will create the error instance that is pushed.\n */\nexport function throwError(errorFactory: () => any): Observable<never>;\n\n/**\n * Returns an observable that will error with the specified error immediately upon subscription.\n *\n * @param error The error instance to emit\n * @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is\n * because it will create the error at the moment it should be created and capture a more appropriate stack trace. If\n * for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`.\n */\nexport function throwError(error: any): Observable<never>;\n\n/**\n * Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription.\n *\n * @param errorOrErrorFactory An error instance or error factory\n * @param scheduler A scheduler to use to schedule the error notification\n * @deprecated The `scheduler` parameter will be removed in v8.\n * Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`.\n * Details: https://rxjs.dev/deprecations/scheduler-argument\n */\nexport function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable<never>;\n\nexport function throwError(errorOrErrorFactory: any, scheduler?: SchedulerLike): Observable<never> {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = (subscriber: Subscriber<never>) => subscriber.error(errorFactory());\n return new Observable(scheduler ? (subscriber) => scheduler.schedule(init as any, 0, subscriber) : init);\n}\n","<div\n #tabsContainer\n class=\"header header-desktop\"\n [ngClass]=\"{\n 'pr-medium-x': layoutType === TabLayoutType.IN_MODAL,\n 'mr-small-b':\n theme === TabTheme.DEFAULT && (layoutType === TabLayoutType.DEFAULT || layoutType === TabLayoutType.IN_MODAL),\n 'border-bottom': bottomBorder && theme === TabTheme.DEFAULT && layoutType !== TabLayoutType.HAS_BACKGROUND,\n 'before-border relative': theme === TabTheme.CLASSIC && layoutType !== TabLayoutType.HAS_BACKGROUND,\n }\"\n>\n <div class=\"flex flex--center mobile-reverse\">\n <fcom-carousel\n #carousel\n class=\"flex-1 overflow-auto\"\n [align]=\"align\"\n [hasGreyBackground]=\"hasGreyBackground\"\n [nextButtonAriaLabel]=\"nextButtonAriaLabel\"\n [prevButtonAriaLabel]=\"prevButtonAriaLabel\"\n [theme]=\"layoutType === TabLayoutType.HAS_BACKGROUND ? CarouselTheme.HAS_BACKGROUND : CarouselTheme.DEFAULT\"\n >\n <ul #tabsNavi class=\"unstyled flex flex--no-wrap\" role=\"tablist\">\n <li\n role=\"none\"\n *ngFor=\"let tab of tabs; let i = index\"\n [class.tab--default]=\"theme === TabTheme.DEFAULT\"\n [class.tab--classic]=\"theme === TabTheme.CLASSIC\"\n [class.tab--stretch]=\"layoutType === TabLayoutType.STRETCH\"\n [class.tab--modal]=\"layoutType === TabLayoutType.IN_MODAL\"\n [class.tab--background]=\"layoutType === TabLayoutType.HAS_BACKGROUND\"\n [class.tab--active]=\"tab.active\"\n >\n <button\n [attr.data-testid]=\"tab.tabTitleDataTestId\"\n class=\"tab-button {{\n layoutType === TabLayoutType.STRETCH\n ? tabStyleOverrideClasses\n ? tabStyleOverrideClasses\n : 'ps-medium-t ps-xxsmall-x'\n : ''\n }}\"\n [ngClass]=\"{\n 'flex flex--middle': theme === TabTheme.DEFAULT && tab.icon && tab.icon.position === TabIconPosition.LEFT,\n nowrap: whiteSpaceNowrap === true,\n }\"\n [disabled]=\"tab.disabled\"\n (click)=\"selectTab(tab)\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"tab.id\"\n role=\"tab\"\n [id]=\"tab.id + '-tab'\"\n >\n <fcom-icon\n *ngIf=\"theme === TabTheme.DEFAULT && tab.icon.name\"\n class=\"icon-medium\"\n [class.ms-xxsmall-r]=\"tab.icon && tab.icon.position === TabIconPosition.LEFT\"\n [name]=\"tab.icon.name\"\n ></fcom-icon>\n <span\n class=\"tab-title\"\n [ngClass]=\"{\n 'flex medium-type': theme !== TabTheme.CLASSIC,\n 'block font-body-1 bold-type': theme === TabTheme.CLASSIC,\n }\"\n *ngIf=\"tab?.title\"\n >\n {{ tab.title }}\n <ng-container\n *ngIf=\"tab.contentPopover\"\n [ngTemplateOutlet]=\"popover\"\n [ngTemplateOutletContext]=\"{ contentPopover: tab.contentPopover }\"\n ></ng-container>\n </span>\n <span\n class=\"tab-subtitle block\"\n [ngClass]=\"{\n 'light-type': theme !== TabTheme.CLASSIC,\n 'font-body-1 ms-xsmall-b': theme === TabTheme.CLASSIC,\n }\"\n *ngIf=\"tab?.subtitle\"\n >\n {{ tab.subtitle }}\n </span>\n </button>\n </li>\n\n <ng-template #popover let-contentPopover=\"contentPopover\">\n <button\n data-testid=\"tabs-popover\"\n type=\"button\"\n fcomPopover\n [content]=\"contentPopover\"\n [ariaCloseText]=\"'actions.close' | finLocalization\"\n [attr.aria-label]=\"'actions.info' | finLocalization\"\n class=\"icon ms-xxsmall-l\"\n >\n <fcom-icon class=\"icon-medium\" [name]=\"SvgLibraryIcon.HELP_BLOCK\"></fcom-icon>\n </button>\n </ng-template>\n </ul>\n </fcom-carousel>\n <div class=\"flex--nogrow mobile-right\">\n <ng-content select=\"tabSidebar\"></ng-content>\n </div>\n </div>\n</div>\n<div\n class=\"tab-content\"\n [class.tab-content--in-modal]=\"layoutType === TabLayoutType.IN_MODAL\"\n [class.tab-content--stretch]=\"layoutType === TabLayoutType.STRETCH\"\n [class.tab-content--default]=\"theme === TabTheme.DEFAULT && layoutType === TabLayoutType.DEFAULT\"\n [class.tab-content--classic]=\"theme === TabTheme.CLASSIC\"\n [class.tab-content--has-background]=\"layoutType === TabLayoutType.HAS_BACKGROUND\"\n>\n <ng-content></ng-content>\n</div>\n","import {\n Component,\n ChangeDetectorRef,\n Input,\n ViewChild,\n ElementRef,\n AfterViewInit,\n EventEmitter,\n Output,\n OnInit,\n} from '@angular/core';\nimport { trigger, state, transition, style, animate } from '@angular/animations';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { v4 as uuid } from 'uuid';\n\nimport { isPresent } from '@fcom/core/utils/utils';\n\nimport { CarouselTheme } from '../../carousel/enums';\nimport { TabComponent } from '../tab/tab.component';\nimport { TabTheme, TabIconPosition, TabLayoutType } from './enums';\nimport { CarouselComponent } from '../../carousel';\n\n/**\n * This component will display a list of tabs. You should pass through a number of `fcom-tab`\n * components in the `ng-content`.\n *\n * @example\n * <fcom-tabs [theme]=\"theme\" [align]=\"'center'\">\n * <fcom-tab [title]=\"tabTitle + ' ' + (i + 1)\" *ngFor=\"let item of Arr(numberOfTabs).fill(1); let i = index\">\n * {{ tabContent }} {{ i + 1 }}\n * </fcom-tab>\n * </fcom-tabs>\n */\n@Component({\n selector: 'fcom-tabs',\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss'],\n animations: [\n trigger('openClose', [\n state('true', style({ height: '*' })),\n state('false', style({ height: '0px' })),\n transition('false <=> true', animate(200)),\n ]),\n ],\n})\nexport class TabsComponent implements OnInit, AfterViewInit {\n readonly CarouselTheme = CarouselTheme;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TabIconPosition = TabIconPosition;\n readonly TabLayoutType = TabLayoutType;\n readonly TabTheme = TabTheme;\n\n private id: string;\n\n @ViewChild('carousel', { static: true })\n carousel: CarouselComponent;\n\n @ViewChild('tabsContainer', { static: true })\n tabsContainer: ElementRef;\n\n @ViewChild('tabsNavi', { static: true })\n tabsNavi: ElementRef;\n\n /**\n * Various options for displaying compacted or full size.\n */\n @Input() theme: TabTheme = TabTheme.DEFAULT;\n\n /**\n * Various options of layout of tabs.\n */\n @Input() layoutType: TabLayoutType = TabLayoutType.DEFAULT;\n\n /**\n * How the tabs should be aligned in the container\n */\n @Input()\n align: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Aria Label for the previous button in the carousel\n */\n @Input()\n prevButtonAriaLabel: string;\n\n /**\n * Aria Label for the next button in the carousel\n */\n @Input()\n nextButtonAriaLabel: string;\n\n @Input()\n hasGreyBackground = false;\n\n @Input()\n tabStyleOverrideClasses = '';\n\n @Input()\n bottomBorder = true;\n\n @Input()\n whiteSpaceNowrap = false;\n\n @Output()\n clickedTab = new EventEmitter<{\n index: number;\n data: unknown;\n }>();\n\n tabs: TabComponent[] = [];\n\n private _defaultActivationUsed = false;\n\n constructor(private readonly changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.id = uuid();\n }\n\n ngAfterViewInit(): void {\n this.scrollToSelectedTab();\n }\n\n selectTab(tab: TabComponent): void {\n if (isPresent(tab)) {\n this.tabs = this.tabs.map((t) => {\n t.active = t.id === tab.id;\n return t;\n });\n\n this.changeDetectorRef.markForCheck();\n this.clickedTab.emit({\n index: this.tabs.findIndex((t) => t.active),\n data: this.tabs.find((t) => t.active).data,\n });\n }\n }\n\n addTab(tab: TabComponent): void {\n tab.id = `tabs-${this.id}-${this.tabs.length}`;\n\n this.tabs.push(tab);\n\n if (this.tabs.length === 1 && !tab.active && !tab.disabled) {\n this.enableDefaultActivation(true);\n } else if (this._defaultActivationUsed && tab.active) {\n this.enableDefaultActivation(false);\n }\n }\n\n removeTab(tab: TabComponent): void {\n this.tabs = this.tabs.filter((t) => t.id !== tab.id);\n }\n\n scrollToSelectedTab(): void {\n const activeTab = this.tabsNavi.nativeElement.querySelector('.tab--active');\n if (\n activeTab &&\n (activeTab.offsetLeft as number) + (activeTab.offsetWidth as number) >\n this.tabsContainer.nativeElement.offsetWidth\n ) {\n this.carousel.scrollTo(activeTab.offsetLeft);\n }\n }\n\n private enableDefaultActivation(enable): void {\n if (this.tabs[0]) {\n this._defaultActivationUsed = enable;\n this.tabs[0].active = enable;\n }\n }\n}\n","<div\n class=\"booking-entry-widget-root flex flex--column relative white-bg pr-medium rounded-large\"\n #widgetRoot\n [@smoothGrow]=\"{ value: showCompact$ | async, params: { startHeight: (rootContainerStartHeight$ | async) } }\"\n (click)=\"startHotjarCapture()\"\n data-testid=\"booking-widget-entry\"\n>\n @if (isFrontPagePersonalisationTestVariant$ | async) {\n <h1\n *ngIf=\"headingLevel === 1\"\n [ngStyle]=\"h1Style$ | async\"\n class=\"nordic-blue-900-text font-heading-2\"\n data-testid=\"booking-widget-title\"\n >\n {{ titleText$ | async }}\n </h1>\n } @else {\n <h1 *ngIf=\"headingLevel === 1\" class=\"nordic-blue-900-text font-heading-2\" data-testid=\"booking-widget-title\">\n {{ 'bookingSearch.title' | finLocalization }}\n </h1>\n }\n <h2 *ngIf=\"headingLevel === 2\" class=\"nordic-blue-900-text font-heading-3\" data-testid=\"booking-widget-title\">\n {{ 'bookingSearch.title' | finLocalization }}\n </h2>\n\n <ng-container *ngIf=\"activeTab$ | async as activeTab\">\n <fcom-tabs\n class=\"ps-medium-t\"\n [theme]=\"TabTheme.DEFAULT\"\n [bottomBorder]=\"false\"\n [whiteSpaceNowrap]=\"true\"\n (clickedTab)=\"setActiveTab($event)\"\n [prevButtonAriaLabel]=\"'carousel.previous' | finLocalization\"\n [nextButtonAriaLabel]=\"'carousel.next' | finLocalization\"\n data-testid=\"booking-widget-tabs\"\n >\n <!-- flight -->\n <fcom-tab\n [title]=\"'bookingWidgetTabs.flight' | finLocalization\"\n [attr.data-testid]=\"'booking-widget-tab-' + WidgetTab.FLIGHT\"\n [data]=\"WidgetTab.FLIGHT\"\n [active]=\"activeTab === WidgetTab.FLIGHT\"\n >\n <fin-booking-widget-common\n *ngIf=\"activeTab === WidgetTab.FLIGHT\"\n [defaultLocations$]=\"defaultLocations$\"\n [layout]=\"layout\"\n data-testid=\"booking-widget-flight\"\n [identifier]=\"calendarIdentifier\"\n [isFrontPage]=\"isFrontPage$ | async\"\n [enablePromoCode]=\"enablePromoCode\"\n [compactMode]=\"compactMode\"\n ></fin-booking-widget-common>\n </fcom-tab>\n\n <!-- award -->\n <fcom-tab\n *ngIf=\"enableAward\"\n [title]=\"'bookingWidgetTabs.award' | finLocalization\"\n [attr.data-testid]=\"'booking-widget-tab-' + WidgetTab.AWARD\"\n [data]=\"WidgetTab.AWARD\"\n [active]=\"activeTab === WidgetTab.AWARD\"\n >\n <ng-container *ngIf=\"activeTab === WidgetTab.AWARD\">\n <ng-container [ngSwitch]=\"loginStatus$ | async\">\n <fin-login-card\n *ngSwitchCase=\"LoginStatus.NOT_LOGGED_IN\"\n [benefitMode]=\"'text'\"\n [benefitText]=\"'award.login.description'\"\n [title]=\"'award.login.title'\"\n ></fin-login-card>\n <fcom-loader\n *ngSwitchCase=\"LoginStatus.PENDING\"\n [loaderType]=\"LoaderTheme.EMBEDDED\"\n [title]=\"'loader.title'\"\n ></fcom-loader>\n <ng-container *ngSwitchCase=\"LoginStatus.LOGGED_IN\">\n <fin-booking-widget-common\n [defaultLocations$]=\"defaultLocations$\"\n [layout]=\"layout\"\n data-testid=\"booking-widget-award\"\n [identifier]=\"calendarIdentifier\"\n [compactMode]=\"compactMode\"\n ></fin-booking-widget-common>\n </ng-container>\n </ng-container>\n </ng-container>\n </fcom-tab>\n\n <!-- flightPlusHotel -->\n <fcom-tab\n *ngIf=\"amTabEnabled$ | async\"\n [title]=\"'bookingWidgetTabs.flightAndHotel' | finLocalization\"\n [attr.data-testid]=\"'booking-widget-tab-' + WidgetTab.AM\"\n [data]=\"WidgetTab.AM\"\n [active]=\"activeTab === WidgetTab.AM\"\n >\n <ng-container *ngIf=\"activeTab === WidgetTab.AM\">\n <fin-am-booking-widget\n (setLocations)=\"onAmLocationChanged()\"\n data-testid=\"booking-widget-am\"\n ></fin-am-booking-widget>\n </ng-container>\n </fcom-tab>\n\n <!-- carTrawler -->\n <fcom-tab\n *ngIf=\"carTrawlerTabEnabled\"\n [title]=\"'bookingWidgetTabs.carTrawler.tabTitle' | finLocalization\"\n [attr.data-testid]=\"'booking-widget-tab-' + WidgetTab.CARTRAWLER\"\n [data]=\"WidgetTab.CARTRAWLER\"\n [active]=\"activeTab === WidgetTab.CARTRAWLER\"\n >\n <fin-cartrawler-booking-widget *ngIf=\"activeTab === WidgetTab.CARTRAWLER\"></fin-cartrawler-booking-widget>\n </fcom-tab>\n </fcom-tabs>\n </ng-container>\n</div>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n PLATFORM_ID,\n AfterViewInit,\n} from '@angular/core';\nimport { Location as Location_2, isPlatformBrowser } from '@angular/common';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { trigger, transition, animate, keyframes, style } from '@angular/animations';\n\nimport { map, Observable, of, Subscription, switchMap } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { v4 as uuid } from 'uuid';\n\nimport { LocationPair } from '@fcom/common/store';\nimport { TripType, HotjarService, HotjarCaptureEvent, MultivariateTestId, TestVariant } from '@fcom/common';\nimport { ButtonTheme, ButtonSize, ButtonMode, TabTheme, LoaderTheme } from '@fcom/ui-components';\nimport { ConfigService, LocalDate } from '@fcom/core';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { LoginStatus } from '@fcom/core-api/login';\nimport { BookingAndAppState } from '@fcom/common/interfaces/booking';\nimport { casProfileOrUndefinedIfNotLoggedIn } from '@fcom/core/selectors/login.selector';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { finShare } from '@fcom/rx';\nimport { MultivariateTestService } from '@fcom/common/multivariate-test/services/multivariate-test.service';\n\nimport { WidgetTab, WidgetLayout } from '../../interfaces';\nimport { ANIMATION_DURATION } from '../../constants';\nimport { BookingWidgetService } from '../../services/booking-widget.service';\nimport { BookingWidgetTripService } from '../../services/booking-widget-trip.service';\n\nfunction isWidgetTab(tab: any): tab is WidgetTab {\n return Boolean(Object.values(WidgetTab).includes(tab));\n}\n\n@Component({\n selector: 'fin-booking-widget',\n templateUrl: './booking-widget.component.html',\n styleUrl: './booking-widget.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('smoothGrow', [\n transition('* => *', [\n animate(\n `${ANIMATION_DURATION}ms cubic-bezier(0.4, 0.0, 0.2, 1)`,\n keyframes([style({ height: '{{ startHeight }}' }), style({ height: '*' })])\n ),\n ]),\n ]),\n ],\n})\nexport class BookingWidgetComponent implements OnInit, OnDestroy, AfterViewInit {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonSize = ButtonSize;\n readonly ButtonMode = ButtonMode;\n readonly TripType = TripType;\n readonly TabTheme = TabTheme;\n readonly WidgetTab = WidgetTab;\n readonly LoginStatus = LoginStatus;\n readonly LoaderTheme = LoaderTheme;\n readonly WidgetLayout = WidgetLayout;\n\n @Input()\n defaultLocations$: Observable<LocationPair[]> = of([]);\n\n @Input()\n headingLevel: 1 | 2 = 1;\n\n @Input()\n enableAurinkomatkat = true;\n\n @Input()\n enableAward = true;\n\n @Input()\n enablePromoCode = true;\n\n @Input()\n initialTripType: TripType;\n\n @Input()\n layout: WidgetLayout = WidgetLayout.DEFAULT;\n\n @Input()\n compactMode = false;\n\n @ViewChild('widgetRoot', { static: true })\n widgetRoot: ElementRef;\n\n tripType$: Observable<TripType>;\n activeTab$: Observable<WidgetTab>;\n loginStatus$: Observable<LoginStatus>;\n rootContainerStartHeight$: Observable<string> = of('auto');\n isInitialRender: boolean;\n amTabEnabled$: Observable<boolean>;\n subscription = new Subscription();\n isAm$: Observable<boolean>;\n calendarIdentifier: string;\n showCompact$ = of(true);\n isFrontPage$ = of(false);\n titleText$: Observable<string>;\n h1Style$: Observable<{ display?: string }>;\n isFrontPagePersonalisationTestVariant$: Observable<boolean>;\n\n carTrawlerTabEnabled: boolean;\n\n constructor(\n private router: Router,\n private route: ActivatedRoute,\n private hotjarService: HotjarService,\n private bookingWidgetService: BookingWidgetService,\n private location: Location_2,\n private configService: ConfigService,\n private bookingWidgetTripService: BookingWidgetTripService,\n private store$: Store<BookingAndAppState>,\n private languageService: LanguageService,\n private multivariateTestService: MultivariateTestService,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n this.carTrawlerTabEnabled = this.configService.cfg.enableBwThirdPartyAncillaries;\n this.bookingWidgetService.setUsePopoverSelectors(false);\n this.calendarIdentifier = uuid();\n const activeTabFromRouteParams = this.route.snapshot?.queryParams['tab'] ?? this.route.snapshot?.data.tab;\n if (activeTabFromRouteParams && Object.values(WidgetTab).includes(activeTabFromRouteParams)) {\n this.bookingWidgetTripService.setActiveTab(activeTabFromRouteParams);\n this.router.navigate([], {\n queryParams: { tab: null },\n queryParamsHandling: 'merge',\n });\n }\n\n const casProfile$ = this.store$.pipe(casProfileOrUndefinedIfNotLoggedIn(), finShare());\n\n this.isFrontPagePersonalisationTestVariant$ = this.multivariateTestService\n .getTestVariant(MultivariateTestId.FRONT_PAGE_PERSONALISATION)\n .pipe(map(({ variant }) => variant === TestVariant.B));\n\n this.titleText$ = casProfile$.pipe(\n switchMap((casProfile) => {\n if (casProfile) {\n const personalisedLabelKey =\n casProfile.previousLoginDate &&\n new LocalDate(casProfile.previousLoginDate.substring(0, 10)).lt(LocalDate.now().minusMonths(6))\n ? 'bookingSearch.personalisedTitle.withoutRecentLogin'\n : 'bookingSearch.personalisedTitle.withRecentLogin';\n\n return this.languageService.translate(personalisedLabelKey, {\n name: casProfile.firstName,\n });\n }\n return this.languageService.translate('bookingSearch.personalisedTitle.loggedOut');\n })\n );\n\n this.h1Style$ = this.isFrontPagePersonalisationTestVariant$.pipe(\n switchMap((isVariantB) =>\n isVariantB\n ? isPlatformBrowser(this.platform)\n ? this.titleText$.pipe(map(() => ({ display: 'inline' })))\n : of({ display: 'none' })\n : of({ display: 'inline' })\n )\n );\n\n this.showCompact$ = this.bookingWidgetService.showCompact$.pipe(\n map((showCompact) => showCompact && this.compactMode)\n );\n this.amTabEnabled$ = this.bookingWidgetService.isAMTabEnabled(this.enableAurinkomatkat);\n\n // // Selections\n this.tripType$ = this.bookingWidgetTripService.selectedTripType$;\n // Utility\n this.activeTab$ = this.bookingWidgetTripService.activeTab$;\n this.loginStatus$ = this.bookingWidgetService.loginStatus$;\n\n // This is to check whether there is any location history saved (if it is the initial render or not)\n // This is coupled with the compact widget behavior since we only want to compact mode to happen on first render of the app.\n const isInitialRender = (this.location.getState() as { navigationId: number })?.navigationId === 1;\n if (isInitialRender) {\n this.bookingWidgetService.resetSelection();\n this.bookingWidgetService.setCompactWidget(true);\n }\n\n //TODO: remove the checker when the multicity e2e test ready\n this.isFrontPage$ = this.defaultLocations$.pipe(\n map((locations) => locations.length == 0) // Converts the value to a boolean\n );\n\n if (this.initialTripType) {\n this.bookingWidgetTripService.setTripType(this.initialTripType);\n }\n }\n\n ngAfterViewInit(): void {\n if (isPlatformBrowser(this.platform)) {\n // To animate the height transition properly we need to have some specific value what the transition start is based on\n this.rootContainerStartHeight$ = this.showCompact$.pipe(\n map(() => {\n const height = (this.widgetRoot.nativeElement as HTMLElement).getBoundingClientRect().height;\n return height ? `${height}px` : 'auto';\n })\n );\n }\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n setActiveTab({ data }: { index: number; data: unknown }): void {\n if (isWidgetTab(data)) {\n this.bookingWidgetTripService.setActiveTab(data);\n }\n }\n\n startHotjarCapture(): void {\n this.subscription.add(this.hotjarService.startCapture(HotjarCaptureEvent.BOOKING_WIDGET).subscribe());\n }\n\n onAmLocationChanged(): void {\n this.bookingWidgetService.expandCompactWidget();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ElementTrackerDirective } from './directives/element-tracker.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [ElementTrackerDirective],\n exports: [ElementTrackerDirective],\n})\nexport class GtmModule {}\n","/* eslint no-irregular-whitespace: \"off\" -- Required for `replaceNonBreakingSpaces` example. */\n\n/**\n * Replaces extra spaces with a single space.\n *\n * @example\n * ```ts\n * const replaced = replaceExtraSpaces('a b c d');\n * console.log(replaced); // 'a b c d'\n * ```\n * @example\n * ```ts\n * const replaced = replaceExtraSpaces('a b c d');\n * console.log(replaced); // 'a b c d'\n * ```\n */\nexport const replaceExtraSpaces = (value: string): string => {\n return value.replace(/[\\u0020\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u200B]+/g, ' ');\n};\n\n/**\n * Replaces all non-breaking spaces with a regular space.\n *\n * @example\n * ```ts\n * const replaced = replaceNonBreakingSpaces('a b  c   d');\n * console.log(replaced); // 'a b c d'\n * ```\n * @example\n * ```ts\n * const replaced = replaceNonBreakingSpaces('a b  c   d');\n * console.log(replaced); // 'a b c d'\n * ```\n */\nexport const replaceNonBreakingSpaces = (value: string): string => {\n return value.replace(/[\\u00A0\\u202F]| /g, ' ');\n};\n\n/**\n * Removes all spaces from a string.\n *\n * @example\n * ```ts\n * const stripped = stripSpaces('1234 5678 1234 5678');\n * console.log(stripped); // '1234567812345678'\n */\nexport const stripSpaces = (value: string): string => {\n return value.replace(/\\s/g, '');\n};\n\n/**\n * Converts kebab-case or separate words to camelCase.\n *\n * @example\n * ```ts\n * const converted = toCamelCase('hello-world');\n * console.log(converted); // 'helloWorld'\n * ```\n */\nexport const toCamelCase = (value: string): string => {\n return value\n .replace(/-/g, ' ')\n .replace(/\\s(.)/g, (v: string): string => v.toUpperCase())\n .replace(/\\s/g, '')\n .replace(/^(.)/, (v: string): string => v.toLowerCase());\n};\n\n/**\n * Converts a string to kebab-case.\n *\n * Only supports the following characters: `a-z, å, ä, ö, 0-9, -`.\n * Underscore characters `_` will be converted to hyphens `-`.\n * Other special characters will be removed.\n *\n * @example\n * ```ts\n * const converted = toKebabCase('Hello World!');\n * console.log(converted); // 'hello-world'\n * ```\n */\nexport const toKebabCase = (value: string): string => {\n return value\n .toLowerCase()\n .replace(/[^a-zåäö0-9-]+/g, '-')\n .replace(/[\\s_]+/g, '-')\n .replace(/-{2,}/g, '-')\n .replace(/^-/, '')\n .replace(/-$/, '');\n};\n\nexport type ReplaceParams = Array<string | number> | { [key: string]: string | number };\n\n/**\n * Removes leading and trailing spaces in a string.\n * Supports multiline strings (i.e. from textareas).\n *\n * @example\n * ```ts\n * const value = ' Hello World! ';\n * console.log(trimContent(value)); // Hello World!\n * ```\n * @example\n * ```ts\n * const value = ` Hello\n * World! `;\n * console.log(trimContent(value));\n * // Output:\n * // 'Hello\n * // World!'\n * ```\n */\nexport const trimContent = (content: string): string => {\n return content\n .split('\\n')\n .map((v: string): string => v.trim())\n .join('\\n')\n .trim();\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.dev/license\n */\n\nimport {Observable} from 'rxjs';\n\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\n/**\n * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\nexport abstract class HttpHandler {\n abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;\n}\n\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\nexport abstract class HttpBackend implements HttpHandler {\n abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;\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.dev/license\n */\n\ninterface Update {\n name: string;\n value?: string | string[];\n op: 'a' | 's' | 'd';\n}\n\n/**\n * Represents the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\nexport class HttpHeaders {\n /**\n * Internal map of lowercase header names to values.\n */\n // TODO(issue/24571): remove '!'.\n private headers!: Map<string, string[]>;\n\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n private normalizedNames: Map<string, string> = new Map();\n\n /**\n * Complete the lazy initialization of this object (needed before reading).\n */\n private lazyInit!: HttpHeaders | Function | null;\n\n /**\n * Queued updates to be materialized the next initialization.\n */\n private lazyUpdate: Update[] | null = null;\n\n /** Constructs a new HTTP header object with the given values.*/\n\n constructor(\n headers?: string | {[name: string]: string | number | (string | number)[]} | Headers,\n ) {\n if (!headers) {\n this.headers = new Map<string, string[]>();\n } else if (typeof headers === 'string') {\n this.lazyInit = () => {\n this.headers = new Map<string, string[]>();\n headers.split('\\n').forEach((line) => {\n const index = line.indexOf(':');\n if (index > 0) {\n const name = line.slice(0, index);\n const key = name.toLowerCase();\n const value = line.slice(index + 1).trim();\n this.maybeSetNormalizedName(name, key);\n if (this.headers.has(key)) {\n this.headers.get(key)!.push(value);\n } else {\n this.headers.set(key, [value]);\n }\n }\n });\n };\n } else if (typeof Headers !== 'undefined' && headers instanceof Headers) {\n this.headers = new Map<string, string[]>();\n headers.forEach((values: string, name: string) => {\n this.setHeaderEntries(name, values);\n });\n } else {\n this.lazyInit = () => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertValidHeaders(headers);\n }\n this.headers = new Map<string, string[]>();\n Object.entries(headers).forEach(([name, values]) => {\n this.setHeaderEntries(name, values);\n });\n };\n }\n }\n\n /**\n * Checks for existence of a given header.\n *\n * @param name The header name to check for existence.\n *\n * @returns True if the header exists, false otherwise.\n */\n has(name: string): boolean {\n this.init();\n\n return this.headers.has(name.toLowerCase());\n }\n\n /**\n * Retrieves the first value of a given header.\n *\n * @param name The header name.\n *\n * @returns The value string if the header exists, null otherwise\n */\n get(name: string): string | null {\n this.init();\n\n const values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n }\n\n /**\n * Retrieves the names of the headers.\n *\n * @returns A list of header names.\n */\n keys(): string[] {\n this.init();\n\n return Array.from(this.normalizedNames.values());\n }\n\n /**\n * Retrieves a list of values for a given header.\n *\n * @param name The header name from which to retrieve values.\n *\n * @returns A string of values if the header exists, null otherwise.\n */\n getAll(name: string): string[] | null {\n this.init();\n\n return this.headers.get(name.toLowerCase()) || null;\n }\n\n /**\n * Appends a new value to the existing set of values for a header\n * and returns them in a clone of the original instance.\n *\n * @param name The header name for which to append the values.\n * @param value The value to append.\n *\n * @returns A clone of the HTTP headers object with the value appended to the given header.\n */\n\n append(name: string, value: string | string[]): HttpHeaders {\n return this.clone({name, value, op: 'a'});\n }\n /**\n * Sets or modifies a value for a given header in a clone of the original instance.\n * If the header already exists, its value is replaced with the given value\n * in the returned object.\n *\n * @param name The header name.\n * @param value The value or values to set or override for the given header.\n *\n * @returns A clone of the HTTP headers object with the newly set header value.\n */\n set(name: string, value: string | string[]): HttpHeaders {\n return this.clone({name, value, op: 's'});\n }\n /**\n * Deletes values for a given header in a clone of the original instance.\n *\n * @param name The header name.\n * @param value The value or values to delete for the given header.\n *\n * @returns A clone of the HTTP headers object with the given value deleted.\n */\n delete(name: string, value?: string | string[]): HttpHeaders {\n return this.clone({name, value, op: 'd'});\n }\n\n private maybeSetNormalizedName(name: string, lcName: string): void {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n }\n\n private init(): void {\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n } else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach((update) => this.applyUpdate(update));\n this.lazyUpdate = null;\n }\n }\n }\n\n private copyFrom(other: HttpHeaders) {\n other.init();\n Array.from(other.headers.keys()).forEach((key) => {\n this.headers.set(key, other.headers.get(key)!);\n this.normalizedNames.set(key, other.normalizedNames.get(key)!);\n });\n }\n\n private clone(update: Update): HttpHeaders {\n const clone = new HttpHeaders();\n clone.lazyInit = !!this.lazyInit && this.lazyInit instanceof HttpHeaders ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n }\n\n private applyUpdate(update: Update): void {\n const key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n let value = update.value!;\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push(...value);\n this.headers.set(key, base);\n break;\n case 'd':\n const toDelete = update.value as string | undefined;\n if (!toDelete) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n } else {\n let existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter((value) => toDelete.indexOf(value) === -1);\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n } else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n }\n\n private setHeaderEntries(name: string, values: any) {\n const headerValues = (Array.isArray(values) ? values : [values]).map((value) =>\n value.toString(),\n );\n const key = name.toLowerCase();\n this.headers.set(key, headerValues);\n this.maybeSetNormalizedName(name, key);\n }\n\n /**\n * @internal\n */\n forEach(fn: (name: string, values: string[]) => void) {\n this.init();\n Array.from(this.normalizedNames.keys()).forEach((key) =>\n fn(this.normalizedNames.get(key)!, this.headers.get(key)!),\n );\n }\n}\n\n/**\n * Verifies that the headers object has the right shape: the values\n * must be either strings, numbers or arrays. Throws an error if an invalid\n * header value is present.\n */\nfunction assertValidHeaders(\n headers: Record<string, unknown> | Headers,\n): asserts headers is Record<string, string | string[] | number | number[]> {\n for (const [key, value] of Object.entries(headers)) {\n if (!(typeof value === 'string' || typeof value === 'number') && !Array.isArray(value)) {\n throw new Error(\n `Unexpected value of the \\`${key}\\` header provided. ` +\n `Expecting either a string, a number or an array, but got: \\`${value}\\`.`,\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.dev/license\n */\n\n/**\n * A codec for encoding and decoding parameters in URLs.\n *\n * Used by `HttpParams`.\n *\n * @publicApi\n **/\nexport interface HttpParameterCodec {\n encodeKey(key: string): string;\n encodeValue(value: string): string;\n\n decodeKey(key: string): string;\n decodeValue(value: string): string;\n}\n\n/**\n * Provides encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\nexport class HttpUrlEncodingCodec implements HttpParameterCodec {\n /**\n * Encodes a key name for a URL parameter or query-string.\n * @param key The key name.\n * @returns The encoded key name.\n */\n encodeKey(key: string): string {\n return standardEncoding(key);\n }\n\n /**\n * Encodes the value of a URL parameter or query-string.\n * @param value The value.\n * @returns The encoded value.\n */\n encodeValue(value: string): string {\n return standardEncoding(value);\n }\n\n /**\n * Decodes an encoded URL parameter or query-string key.\n * @param key The encoded key name.\n * @returns The decoded key name.\n */\n decodeKey(key: string): string {\n return decodeURIComponent(key);\n }\n\n /**\n * Decodes an encoded URL parameter or query-string value.\n * @param value The encoded value.\n * @returns The decoded value.\n */\n decodeValue(value: string) {\n return decodeURIComponent(value);\n }\n}\n\nfunction paramParser(rawParams: string, codec: HttpParameterCodec): Map<string, string[]> {\n const map = new Map<string, string[]>();\n if (rawParams.length > 0) {\n // The `window.location.search` can be used while creating an instance of the `HttpParams` class\n // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`\n // may start with the `?` char, so we strip it if it's present.\n const params: string[] = rawParams.replace(/^\\?/, '').split('&');\n params.forEach((param: string) => {\n const eqIdx = param.indexOf('=');\n const [key, val]: string[] =\n eqIdx == -1\n ? [codec.decodeKey(param), '']\n : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n const list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n\n/**\n * Encode input string with standard encodeURIComponent and then un-encode specific characters.\n */\nconst STANDARD_ENCODING_REGEX = /%(\\d[a-f0-9])/gi;\nconst STANDARD_ENCODING_REPLACEMENTS: {[x: string]: string} = {\n '40': '@',\n '3A': ':',\n '24': '$',\n '2C': ',',\n '3B': ';',\n '3D': '=',\n '3F': '?',\n '2F': '/',\n};\n\nfunction standardEncoding(v: string): string {\n return encodeURIComponent(v).replace(\n STANDARD_ENCODING_REGEX,\n (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? s,\n );\n}\n\nfunction valueToString(value: string | number | boolean): string {\n return `${value}`;\n}\n\ninterface Update {\n param: string;\n value?: string | number | boolean;\n op: 'a' | 'd' | 's';\n}\n\n/**\n * Options used to construct an `HttpParams` instance.\n *\n * @publicApi\n */\nexport interface HttpParamsOptions {\n /**\n * String representation of the HTTP parameters in URL-query-string format.\n * Mutually exclusive with `fromObject`.\n */\n fromString?: string;\n\n /** Object map of the HTTP parameters. Mutually exclusive with `fromString`. */\n fromObject?: {\n [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;\n };\n\n /** Encoding codec used to parse and serialize the parameters. */\n encoder?: HttpParameterCodec;\n}\n\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\nexport class HttpParams {\n private map: Map<string, string[]> | null;\n private encoder: HttpParameterCodec;\n private updates: Update[] | null = null;\n private cloneFrom: HttpParams | null = null;\n\n constructor(options: HttpParamsOptions = {} as HttpParamsOptions) {\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(`Cannot specify both fromString and fromObject.`);\n }\n this.map = paramParser(options.fromString, this.encoder);\n } else if (!!options.fromObject) {\n this.map = new Map<string, string[]>();\n Object.keys(options.fromObject).forEach((key) => {\n const value = (options.fromObject as any)[key];\n // convert the values to strings\n const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];\n this.map!.set(key, values);\n });\n } else {\n this.map = null;\n }\n }\n\n /**\n * Reports whether the body includes one or more values for a given parameter.\n * @param param The parameter name.\n * @returns True if the parameter has one or more values,\n * false if it has no value or is not present.\n */\n has(param: string): boolean {\n this.init();\n return this.map!.has(param);\n }\n\n /**\n * Retrieves the first value for a parameter.\n * @param param The parameter name.\n * @returns The first value of the given parameter,\n * or `null` if the parameter is not present.\n */\n get(param: string): string | null {\n this.init();\n const res = this.map!.get(param);\n return !!res ? res[0] : null;\n }\n\n /**\n * Retrieves all values for a parameter.\n * @param param The parameter name.\n * @returns All values in a string array,\n * or `null` if the parameter not present.\n */\n getAll(param: string): string[] | null {\n this.init();\n return this.map!.get(param) || null;\n }\n\n /**\n * Retrieves all the parameters for this body.\n * @returns The parameter names in a string array.\n */\n keys(): string[] {\n this.init();\n return Array.from(this.map!.keys());\n }\n\n /**\n * Appends a new value to existing values for a parameter.\n * @param param The parameter name.\n * @param value The new value to add.\n * @return A new body with the appended value.\n */\n append(param: string, value: string | number | boolean): HttpParams {\n return this.clone({param, value, op: 'a'});\n }\n\n /**\n * Constructs a new body with appended values for the given parameter name.\n * @param params parameters and values\n * @return A new body with the new value.\n */\n appendAll(params: {\n [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;\n }): HttpParams {\n const updates: Update[] = [];\n Object.keys(params).forEach((param) => {\n const value = params[param];\n if (Array.isArray(value)) {\n value.forEach((_value) => {\n updates.push({param, value: _value, op: 'a'});\n });\n } else {\n updates.push({param, value: value as string | number | boolean, op: 'a'});\n }\n });\n return this.clone(updates);\n }\n\n /**\n * Replaces the value for a parameter.\n * @param param The parameter name.\n * @param value The new value.\n * @return A new body with the new value.\n */\n set(param: string, value: string | number | boolean): HttpParams {\n return this.clone({param, value, op: 's'});\n }\n\n /**\n * Removes a given value or all values from a parameter.\n * @param param The parameter name.\n * @param value The value to remove, if provided.\n * @return A new body with the given value removed, or with all values\n * removed if no value is specified.\n */\n delete(param: string, value?: string | number | boolean): HttpParams {\n return this.clone({param, value, op: 'd'});\n }\n\n /**\n * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n toString(): string {\n this.init();\n return (\n this.keys()\n .map((key) => {\n const eKey = this.encoder.encodeKey(key);\n // `a: ['1']` produces `'a=1'`\n // `b: []` produces `''`\n // `c: ['1', '2']` produces `'c=1&c=2'`\n return this.map!.get(key)!\n .map((value) => eKey + '=' + this.encoder.encodeValue(value))\n .join('&');\n })\n // filter out empty values because `b: []` produces `''`\n // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't\n .filter((param) => param !== '')\n .join('&')\n );\n }\n\n private clone(update: Update | Update[]): HttpParams {\n const clone = new HttpParams({encoder: this.encoder} as HttpParamsOptions);\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat(update);\n return clone;\n }\n\n private init() {\n if (this.map === null) {\n this.map = new Map<string, string[]>();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach((key) => this.map!.set(key, this.cloneFrom!.map!.get(key)!));\n this.updates!.forEach((update) => {\n switch (update.op) {\n case 'a':\n case 's':\n const base = (update.op === 'a' ? this.map!.get(update.param) : undefined) || [];\n base.push(valueToString(update.value!));\n this.map!.set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n let base = this.map!.get(update.param) || [];\n const idx = base.indexOf(valueToString(update.value));\n if (idx !== -1) {\n base.splice(idx, 1);\n }\n if (base.length > 0) {\n this.map!.set(update.param, base);\n } else {\n this.map!.delete(update.param);\n }\n } else {\n this.map!.delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = this.updates = null;\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.dev/license\n */\n\n/**\n * A token used to manipulate and access values stored in `HttpContext`.\n *\n * @publicApi\n */\nexport class HttpContextToken<T> {\n constructor(public readonly defaultValue: () => T) {}\n}\n\n/**\n * Http context stores arbitrary user defined values and ensures type safety without\n * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.\n *\n * This context is mutable and is shared between cloned requests unless explicitly specified.\n *\n * @usageNotes\n *\n * ### Usage Example\n *\n * ```typescript\n * // inside cache.interceptors.ts\n * export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);\n *\n * export class CacheInterceptor implements HttpInterceptor {\n *\n * intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {\n * if (req.context.get(IS_CACHE_ENABLED) === true) {\n * return ...;\n * }\n * return delegate.handle(req);\n * }\n * }\n *\n * // inside a service\n *\n * this.httpClient.get('/api/weather', {\n * context: new HttpContext().set(IS_CACHE_ENABLED, true)\n * }).subscribe(...);\n * ```\n *\n * @publicApi\n */\nexport class HttpContext {\n private readonly map = new Map<HttpContextToken<unknown>, unknown>();\n\n /**\n * Store a value in the context. If a value is already present it will be overwritten.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n * @param value The value to store.\n *\n * @returns A reference to itself for easy chaining.\n */\n set<T>(token: HttpContextToken<T>, value: T): HttpContext {\n this.map.set(token, value);\n return this;\n }\n\n /**\n * Retrieve the value associated with the given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns The stored value or default if one is defined.\n */\n get<T>(token: HttpContextToken<T>): T {\n if (!this.map.has(token)) {\n this.map.set(token, token.defaultValue());\n }\n return this.map.get(token) as T;\n }\n\n /**\n * Delete the value associated with the given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns A reference to itself for easy chaining.\n */\n delete(token: HttpContextToken<unknown>): HttpContext {\n this.map.delete(token);\n return this;\n }\n\n /**\n * Checks for existence of a given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns True if the token exists, false otherwise.\n */\n has(token: HttpContextToken<unknown>): boolean {\n return this.map.has(token);\n }\n\n /**\n * @returns a list of tokens currently stored in the context.\n */\n keys(): IterableIterator<HttpContextToken<unknown>> {\n return this.map.keys();\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.dev/license\n */\n\nimport {HttpContext} from './context';\nimport {HttpHeaders} from './headers';\nimport {HttpParams} from './params';\n\n/**\n * Construction interface for `HttpRequest`s.\n *\n * All values are optional and will override default values if provided.\n */\ninterface HttpRequestInit {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n}\n\n/**\n * Determine whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method: string): boolean {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value: any): value is ArrayBuffer {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value: any): value is Blob {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value: any): value is FormData {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n\n/**\n * Safely assert whether the given value is a URLSearchParams instance.\n *\n * In some execution environments URLSearchParams is not defined.\n */\nfunction isUrlSearchParams(value: any): value is URLSearchParams {\n return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams;\n}\n\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\nexport class HttpRequest<T> {\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n readonly body: T | null = null;\n\n /**\n * Outgoing headers for this request.\n */\n // TODO(issue/24571): remove '!'.\n readonly headers!: HttpHeaders;\n\n /**\n * Shared and mutable context that can be used by interceptors\n */\n readonly context!: HttpContext;\n\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n *\n * Note: The `FetchBackend` doesn't support progress report on uploads.\n */\n readonly reportProgress: boolean = false;\n\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n readonly withCredentials: boolean = false;\n\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n readonly responseType: 'arraybuffer' | 'blob' | 'json' | 'text' = 'json';\n\n /**\n * The outgoing HTTP request method.\n */\n readonly method: string;\n\n /**\n * Outgoing URL parameters.\n *\n * To pass a string representation of HTTP parameters in the URL-query-string format,\n * the `HttpParamsOptions`' `fromString` may be used. For example:\n *\n * ```\n * new HttpParams({fromString: 'angular=awesome'})\n * ```\n */\n // TODO(issue/24571): remove '!'.\n readonly params!: HttpParams;\n\n /**\n * The outgoing URL with all URL parameters set.\n */\n readonly urlWithParams: string;\n\n /**\n * The HttpTransferCache option for the request\n */\n readonly transferCache?: {includeHeaders?: string[]} | boolean;\n\n constructor(\n method: 'GET' | 'HEAD',\n url: string,\n init?: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n /**\n * This property accepts either a boolean to enable/disable transferring cache for eligible\n * requests performed using `HttpClient`, or an object, which allows to configure cache\n * parameters, such as which headers should be included (no headers are included by default).\n *\n * Setting this property will override the options passed to `provideClientHydration()` for this\n * particular request\n */\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n );\n constructor(\n method: 'DELETE' | 'JSONP' | 'OPTIONS',\n url: string,\n init?: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n },\n );\n constructor(\n method: 'POST',\n url: string,\n body: T | null,\n init?: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n /**\n * This property accepts either a boolean to enable/disable transferring cache for eligible\n * requests performed using `HttpClient`, or an object, which allows to configure cache\n * parameters, such as which headers should be included (no headers are included by default).\n *\n * Setting this property will override the options passed to `provideClientHydration()` for this\n * particular request\n */\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n );\n constructor(\n method: 'PUT' | 'PATCH',\n url: string,\n body: T | null,\n init?: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n },\n );\n constructor(\n method: string,\n url: string,\n body: T | null,\n init?: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n /**\n * This property accepts either a boolean to enable/disable transferring cache for eligible\n * requests performed using `HttpClient`, or an object, which allows to configure cache\n * parameters, such as which headers should be included (no headers are included by default).\n *\n * Setting this property will override the options passed to `provideClientHydration()` for this\n * particular request\n */\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n );\n constructor(\n method: string,\n readonly url: string,\n third?:\n | T\n | {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n }\n | null,\n fourth?: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ) {\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n let options: HttpRequestInit | undefined;\n\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = third !== undefined ? (third as T) : null;\n options = fourth;\n } else {\n // No body required, options are the third argument. The body stays null.\n options = third as HttpRequestInit;\n }\n\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n\n if (!!options.context) {\n this.context = options.context;\n }\n\n if (!!options.params) {\n this.params = options.params;\n }\n\n // We do want to assign transferCache even if it's falsy (false is valid value)\n this.transferCache = options.transferCache;\n }\n\n // If no headers have been passed in, construct a new HttpHeaders instance.\n this.headers ??= new HttpHeaders();\n\n // If no context have been passed in, construct a new HttpContext instance.\n this.context ??= new HttpContext();\n\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n } else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n const params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n } else {\n // Does the URL already have query parameters? Look for '?'.\n const qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n const sep: string = qIdx === -1 ? '?' : qIdx < url.length - 1 ? '&' : '';\n this.urlWithParams = url + sep + params;\n }\n }\n }\n\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n serializeBody(): ArrayBuffer | Blob | FormData | URLSearchParams | string | null {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (\n typeof this.body === 'string' ||\n isArrayBuffer(this.body) ||\n isBlob(this.body) ||\n isFormData(this.body) ||\n isUrlSearchParams(this.body)\n ) {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (\n typeof this.body === 'object' ||\n typeof this.body === 'boolean' ||\n Array.isArray(this.body)\n ) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return (this.body as any).toString();\n }\n\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n detectContentTypeHeader(): string | null {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, boolean and numbers will be encoded as JSON.\n if (\n typeof this.body === 'object' ||\n typeof this.body === 'number' ||\n typeof this.body === 'boolean'\n ) {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n }\n\n clone(): HttpRequest<T>;\n clone(update: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n body?: T | null;\n method?: string;\n url?: string;\n setHeaders?: {[name: string]: string | string[]};\n setParams?: {[param: string]: string};\n }): HttpRequest<T>;\n clone<V>(update: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n body?: V | null;\n method?: string;\n url?: string;\n setHeaders?: {[name: string]: string | string[]};\n setParams?: {[param: string]: string};\n }): HttpRequest<V>;\n clone(\n update: {\n headers?: HttpHeaders;\n context?: HttpContext;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n body?: any | null;\n method?: string;\n url?: string;\n setHeaders?: {[name: string]: string | string[]};\n setParams?: {[param: string]: string};\n } = {},\n ): HttpRequest<any> {\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n const method = update.method || this.method;\n const url = update.url || this.url;\n const responseType = update.responseType || this.responseType;\n\n // Carefully handle the transferCache to differentiate between\n // `false` and `undefined` in the update args.\n const transferCache = update.transferCache ?? this.transferCache;\n\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n const body = update.body !== undefined ? update.body : this.body;\n\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n const withCredentials = update.withCredentials ?? this.withCredentials;\n const reportProgress = update.reportProgress ?? this.reportProgress;\n\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n let headers = update.headers || this.headers;\n let params = update.params || this.params;\n\n // Pass on context if needed\n const context = update.context ?? this.context;\n\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers = Object.keys(update.setHeaders).reduce(\n (headers, name) => headers.set(name, update.setHeaders![name]),\n headers,\n );\n }\n\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams).reduce(\n (params, param) => params.set(param, update.setParams![param]),\n params,\n );\n }\n\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params,\n headers,\n context,\n reportProgress,\n responseType,\n withCredentials,\n transferCache,\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.dev/license\n */\n\nimport {HttpHeaders} from './headers';\n\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n * @publicApi\n */\nexport enum HttpEventType {\n /**\n * The request was sent out over the wire.\n */\n Sent,\n\n /**\n * An upload progress event was received.\n *\n * Note: The `FetchBackend` doesn't support progress report on uploads.\n */\n UploadProgress,\n\n /**\n * The response status code and headers were received.\n */\n ResponseHeader,\n\n /**\n * A download progress event was received.\n */\n DownloadProgress,\n\n /**\n * The full response including the body was received.\n */\n Response,\n\n /**\n * A custom event from an interceptor or a backend.\n */\n User,\n}\n\n/**\n * Base interface for progress events.\n *\n * @publicApi\n */\nexport interface HttpProgressEvent {\n /**\n * Progress event type is either upload or download.\n */\n type: HttpEventType.DownloadProgress | HttpEventType.UploadProgress;\n\n /**\n * Number of bytes uploaded or downloaded.\n */\n loaded: number;\n\n /**\n * Total number of bytes to upload or download. Depending on the request or\n * response, this may not be computable and thus may not be present.\n */\n total?: number;\n}\n\n/**\n * A download progress event.\n *\n * @publicApi\n */\nexport interface HttpDownloadProgressEvent extends HttpProgressEvent {\n type: HttpEventType.DownloadProgress;\n\n /**\n * The partial response body as downloaded so far.\n *\n * Only present if the responseType was `text`.\n */\n partialText?: string;\n}\n\n/**\n * An upload progress event.\n *\n * Note: The `FetchBackend` doesn't support progress report on uploads.\n *\n * @publicApi\n */\nexport interface HttpUploadProgressEvent extends HttpProgressEvent {\n type: HttpEventType.UploadProgress;\n}\n\n/**\n * An event indicating that the request was sent to the server. Useful\n * when a request may be retried multiple times, to distinguish between\n * retries on the final event stream.\n *\n * @publicApi\n */\nexport interface HttpSentEvent {\n type: HttpEventType.Sent;\n}\n\n/**\n * A user-defined event.\n *\n * Grouping all custom events under this type ensures they will be handled\n * and forwarded by all implementations of interceptors.\n *\n * @publicApi\n */\nexport interface HttpUserEvent<T> {\n type: HttpEventType.User;\n}\n\n/**\n * An error that represents a failed attempt to JSON.parse text coming back\n * from the server.\n *\n * It bundles the Error object with the actual response body that failed to parse.\n *\n *\n */\nexport interface HttpJsonParseError {\n error: Error;\n text: string;\n}\n\n/**\n * Union type for all possible events on the response stream.\n *\n * Typed according to the expected type of the response.\n *\n * @publicApi\n */\nexport type HttpEvent<T> =\n | HttpSentEvent\n | HttpHeaderResponse\n | HttpResponse<T>\n | HttpProgressEvent\n | HttpUserEvent<T>;\n\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\nexport abstract class HttpResponseBase {\n /**\n * All response headers.\n */\n readonly headers: HttpHeaders;\n\n /**\n * Response status code.\n */\n readonly status: number;\n\n /**\n * Textual description of response status code, defaults to OK.\n *\n * Do not depend on this.\n */\n readonly statusText: string;\n\n /**\n * URL of the resource retrieved, or null if not available.\n */\n readonly url: string | null;\n\n /**\n * Whether the status code falls in the 2xx range.\n */\n readonly ok: boolean;\n\n /**\n * Type of the response, narrowed to either the full response or the header.\n */\n // TODO(issue/24571): remove '!'.\n readonly type!: HttpEventType.Response | HttpEventType.ResponseHeader;\n\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n */\n constructor(\n init: {\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n },\n defaultStatus: number = 200,\n defaultStatusText: string = 'OK',\n ) {\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n}\n\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\nexport class HttpHeaderResponse extends HttpResponseBase {\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n */\n constructor(\n init: {\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n } = {},\n ) {\n super(init);\n }\n\n override readonly type: HttpEventType.ResponseHeader = HttpEventType.ResponseHeader;\n\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n clone(\n update: {headers?: HttpHeaders; status?: number; statusText?: string; url?: string} = {},\n ): HttpHeaderResponse {\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\nexport class HttpResponse<T> extends HttpResponseBase {\n /**\n * The response body, or `null` if one was not returned.\n */\n readonly body: T | null;\n\n /**\n * Construct a new `HttpResponse`.\n */\n constructor(\n init: {\n body?: T | null;\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n } = {},\n ) {\n super(init);\n this.body = init.body !== undefined ? init.body : null;\n }\n\n override readonly type: HttpEventType.Response = HttpEventType.Response;\n\n clone(): HttpResponse<T>;\n clone(update: {\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n }): HttpResponse<T>;\n clone<V>(update: {\n body?: V | null;\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n }): HttpResponse<V>;\n clone(\n update: {\n body?: any | null;\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n } = {},\n ): HttpResponse<any> {\n return new HttpResponse<any>({\n body: update.body !== undefined ? update.body : this.body,\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n }\n}\n\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\nexport class HttpErrorResponse extends HttpResponseBase implements Error {\n readonly name = 'HttpErrorResponse';\n readonly message: string;\n readonly error: any | null;\n\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n override readonly ok = false;\n\n constructor(init: {\n error?: any;\n headers?: HttpHeaders;\n status?: number;\n statusText?: string;\n url?: string;\n }) {\n // Initialize with a default status of 0 / Unknown Error.\n super(init, 0, 'Unknown Error');\n\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (this.status >= 200 && this.status < 300) {\n this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`;\n } else {\n this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${\n init.statusText\n }`;\n }\n this.error = init.error || null;\n }\n}\n\n/**\n * We use these constant to prevent pulling the whole HttpStatusCode enum\n * Those are the only ones referenced directly by the framework\n */\nexport const HTTP_STATUS_CODE_OK = 200;\nexport const HTTP_STATUS_CODE_NO_CONTENT = 204;\n\n/**\n * Http status codes.\n * As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n * @publicApi\n */\nexport enum HttpStatusCode {\n Continue = 100,\n SwitchingProtocols = 101,\n Processing = 102,\n EarlyHints = 103,\n\n Ok = HTTP_STATUS_CODE_OK,\n Created = 201,\n Accepted = 202,\n NonAuthoritativeInformation = 203,\n NoContent = HTTP_STATUS_CODE_NO_CONTENT,\n ResetContent = 205,\n PartialContent = 206,\n MultiStatus = 207,\n AlreadyReported = 208,\n ImUsed = 226,\n\n MultipleChoices = 300,\n MovedPermanently = 301,\n Found = 302,\n SeeOther = 303,\n NotModified = 304,\n UseProxy = 305,\n Unused = 306,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n\n BadRequest = 400,\n Unauthorized = 401,\n PaymentRequired = 402,\n Forbidden = 403,\n NotFound = 404,\n MethodNotAllowed = 405,\n NotAcceptable = 406,\n ProxyAuthenticationRequired = 407,\n RequestTimeout = 408,\n Conflict = 409,\n Gone = 410,\n LengthRequired = 411,\n PreconditionFailed = 412,\n PayloadTooLarge = 413,\n UriTooLong = 414,\n UnsupportedMediaType = 415,\n RangeNotSatisfiable = 416,\n ExpectationFailed = 417,\n ImATeapot = 418,\n MisdirectedRequest = 421,\n UnprocessableEntity = 422,\n Locked = 423,\n FailedDependency = 424,\n TooEarly = 425,\n UpgradeRequired = 426,\n PreconditionRequired = 428,\n TooManyRequests = 429,\n RequestHeaderFieldsTooLarge = 431,\n UnavailableForLegalReasons = 451,\n\n InternalServerError = 500,\n NotImplemented = 501,\n BadGateway = 502,\n ServiceUnavailable = 503,\n GatewayTimeout = 504,\n HttpVersionNotSupported = 505,\n VariantAlsoNegotiates = 506,\n InsufficientStorage = 507,\n LoopDetected = 508,\n NotExtended = 510,\n NetworkAuthenticationRequired = 511,\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.dev/license\n */\n\nimport {Injectable} from '@angular/core';\nimport {Observable, of} from 'rxjs';\nimport {concatMap, filter, map} from 'rxjs/operators';\n\nimport {HttpHandler} from './backend';\nimport {HttpContext} from './context';\nimport {HttpHeaders} from './headers';\nimport {HttpParams, HttpParamsOptions} from './params';\nimport {HttpRequest} from './request';\nimport {HttpEvent, HttpResponse} from './response';\n\n/**\n * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\nfunction addBody<T>(\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n body: T | null,\n): any {\n return {\n body,\n headers: options.headers,\n context: options.context,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n transferCache: options.transferCache,\n };\n}\n\n/**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n * TODO(adev): review\n * @usageNotes\n *\n * ### HTTP Request Example\n *\n * ```\n * // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n * const params = new HttpParams({fromString: 'name=term'});\n * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n *\n * Alternatively, the parameter string can be used without invoking HttpParams\n * by directly joining to the URL.\n * ```\n * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});\n * ```\n *\n *\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n * return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42\n * return this.httpClient.patch(url, {name: heroName}, httpOptions)\n * .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n * @see [HTTP Request](api/common/http/HttpRequest)\n *\n * @publicApi\n */\n@Injectable()\nexport class HttpClient {\n constructor(private handler: HttpHandler) {}\n\n /**\n * Sends an `HttpRequest` and returns a stream of `HttpEvent`s.\n *\n * @return An `Observable` of the response, with the response body as a stream of `HttpEvent`s.\n */\n request<R>(req: HttpRequest<any>): Observable<HttpEvent<R>>;\n\n /**\n * Constructs a request that interprets the body as an `ArrayBuffer` and returns the response in\n * an `ArrayBuffer`.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a request that interprets the body as a blob and returns\n * the response as a blob.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type `Blob`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a request that interprets the body as a text string and\n * returns a string value.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type string.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs a request that interprets the body as an `ArrayBuffer` and returns the\n * the full event stream.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as an array of `HttpEvent`s for\n * the request.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n observe: 'events';\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a request that interprets the body as a `Blob` and returns\n * the full event stream.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body of type `Blob`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a request which interprets the body as a text string and returns the full event\n * stream.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body of type string.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a request which interprets the body as a JavaScript object and returns the full\n * event stream.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body of type `Object`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n reportProgress?: boolean;\n observe: 'events';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<any>>;\n\n /**\n * Constructs a request which interprets the body as a JavaScript object and returns the full\n * event stream.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body of type `R`.\n */\n request<R>(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n reportProgress?: boolean;\n observe: 'events';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<R>>;\n\n /**\n * Constructs a request which interprets the body as an `ArrayBuffer`\n * and returns the full `HttpResponse`.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body as an `ArrayBuffer`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a request which interprets the body as a `Blob` and returns the full `HttpResponse`.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body of type `Blob`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a request which interprets the body as a text stream and returns the full\n * `HttpResponse`.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the HTTP response, with the response body of type string.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a request which interprets the body as a JavaScript object and returns the full\n * `HttpResponse`.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the full `HttpResponse`,\n * with the response body of type `Object`.\n */\n request(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n reportProgress?: boolean;\n observe: 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a request which interprets the body as a JavaScript object and returns\n * the full `HttpResponse` with the response body in the requested type.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the full `HttpResponse`, with the response body of type `R`.\n */\n request<R>(\n method: string,\n url: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n reportProgress?: boolean;\n observe: 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<R>>;\n\n /**\n * Constructs a request which interprets the body as a JavaScript object and returns the full\n * `HttpResponse` as a JavaScript object.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body of type `Object`.\n */\n request(\n method: string,\n url: string,\n options?: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n responseType?: 'json';\n reportProgress?: boolean;\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a request which interprets the body as a JavaScript object\n * with the response body of the requested type.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body of type `R`.\n */\n request<R>(\n method: string,\n url: string,\n options?: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n responseType?: 'json';\n reportProgress?: boolean;\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<R>;\n\n /**\n * Constructs a request where response type and requested observable are not known statically.\n *\n * @param method The HTTP method.\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the requested response, with body of type `any`.\n */\n request(\n method: string,\n url: string,\n options?: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n observe?: 'body' | 'events' | 'response';\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<any>;\n\n /**\n * Constructs an observable for a generic HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * You can pass an `HttpRequest` directly as the only parameter. In this case,\n * the call returns an observable of the raw `HttpEvent` stream.\n *\n * Alternatively you can pass an HTTP method as the first parameter,\n * a URL string as the second, and an options hash containing the request body as the third.\n * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n * type of returned observable.\n * * The `responseType` value determines how a successful response body is parsed.\n * * If `responseType` is the default `json`, you can pass a type interface for the resulting\n * object as a type parameter to the call.\n *\n * The `observe` value determines the return type, according to what you are interested in\n * observing.\n * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n * progress events by default.\n * * An `observe` value of response returns an observable of `HttpResponse<T>`,\n * where the `T` parameter depends on the `responseType` and any optionally provided type\n * parameter.\n * * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n *\n */\n request(\n first: string | HttpRequest<any>,\n url?: string,\n options: {\n body?: any;\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n } = {},\n ): Observable<any> {\n let req: HttpRequest<any>;\n // First, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = first;\n } else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming `GET` unless a method is\n // provided.\n\n // Figure out the headers.\n let headers: HttpHeaders | undefined = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n } else {\n headers = new HttpHeaders(options.headers);\n }\n\n // Sort out parameters.\n let params: HttpParams | undefined = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n } else {\n params = new HttpParams({fromObject: options.params} as HttpParamsOptions);\n }\n }\n\n // Construct the request.\n req = new HttpRequest(first, url!, options.body !== undefined ? options.body : null, {\n headers,\n context: options.context,\n params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n transferCache: options.transferCache,\n });\n }\n\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n const events$: Observable<HttpEvent<any>> = of(req).pipe(\n concatMap((req: HttpRequest<any>) => this.handler.handle(req)),\n );\n\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n const res$: Observable<HttpResponse<any>> = <Observable<HttpResponse<any>>>(\n events$.pipe(filter((event: HttpEvent<any>) => event instanceof HttpResponse))\n );\n\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return res$.pipe(\n map((res: HttpResponse<any>) => {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n }),\n );\n case 'blob':\n return res$.pipe(\n map((res: HttpResponse<any>) => {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n }),\n );\n case 'text':\n return res$.pipe(\n map((res: HttpResponse<any>) => {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n }),\n );\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return res$.pipe(map((res: HttpResponse<any>) => res.body));\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(`Unreachable: unhandled observe type ${options.observe}}`);\n }\n }\n\n /**\n * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`\n * and returns the response as an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response body as an `ArrayBuffer`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as a `Blob` and returns\n * the response as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response body as a `Blob`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as a text string and returns\n * a string.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type string.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<string>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer`\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with response body as an `ArrayBuffer`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as a `Blob`\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request, with the response body as a\n * `Blob`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as a text string\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with the response\n * body of type string.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as JSON\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with response body of\n * type `Object`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs a `DELETE`request that interprets the body as JSON\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request, with a response\n * body in the requested type.\n */\n delete<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | (string | number | boolean)[]};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as an `ArrayBuffer` and returns\n * the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the full `HttpResponse`, with the response body as an `ArrayBuffer`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as a `Blob` and returns the full\n * `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body of type `Blob`.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as a text stream and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the full `HttpResponse`, with the response body of type string.\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a `DELETE` request the interprets the body as a JavaScript object and returns\n * the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body of type `Object`.\n *\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as JSON\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with the response body of the requested type.\n */\n delete<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n * Constructs a `DELETE` request that interprets the body as JSON and\n * returns the response body as an object parsed from JSON.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type `Object`.\n */\n delete(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a DELETE request that interprets the body as JSON and returns\n * the response in a given type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with response body in the requested type.\n */\n delete<T>(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n body?: any | null;\n },\n ): Observable<T>;\n\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `DELETE` request to execute on the server. See the individual overloads for\n * details on the return type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n */\n delete(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n } = {},\n ): Observable<any> {\n return this.request<any>('DELETE', url, options as any);\n }\n\n /**\n * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns the\n * response in an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a `GET` request that interprets the body as a `Blob`\n * and returns the response as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a `GET` request that interprets the body as a text string\n * and returns the response as a string value.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type string.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and returns\n * the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with the response\n * body as an `ArrayBuffer`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a `GET` request that interprets the body as a `Blob` and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a `GET` request that interprets the body as a text string and returns\n * the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type string.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a `GET` request that interprets the body as JSON\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type `Object`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs a `GET` request that interprets the body as JSON and returns the full\n * event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with a response body in the requested type.\n */\n get<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs a `GET` request that interprets the body as an `ArrayBuffer` and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as an `ArrayBuffer`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a `GET` request that interprets the body as a `Blob` and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as a `Blob`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a `GET` request that interprets the body as a text stream and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body of type string.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a `GET` request that interprets the body as JSON and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the full `HttpResponse`,\n * with the response body of type `Object`.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a `GET` request that interprets the body as JSON and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the full `HttpResponse` for the request,\n * with a response body in the requested type.\n */\n get<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n * Constructs a `GET` request that interprets the body as JSON and\n * returns the response body as an object parsed from JSON.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n *\n * @return An `Observable` of the response body as a JavaScript object.\n */\n get(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a `GET` request that interprets the body as JSON and returns\n * the response body in a given type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse`, with a response body in the requested type.\n */\n get<T>(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<T>;\n\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `GET` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n get(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n } = {},\n ): Observable<any> {\n return this.request<any>('GET', url, options as any);\n }\n\n /**\n * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer` and\n * returns the response as an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as a `Blob` and returns\n * the response as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as a text string and returns the response\n * as a string value.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body of type string.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as an `ArrayBuffer`.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as a `Blob` and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as a `Blob`.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as a text string\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with the response body of type\n * string.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as JSON\n * and returns the full HTTP event stream.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with a response body of\n * type `Object`.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as JSON and\n * returns the full event stream.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request,\n * with a response body in the requested type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n */\n head<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as an `ArrayBuffer`\n * and returns the full HTTP response.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as an `ArrayBuffer`.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as a `Blob` and returns\n * the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as a blob.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as text stream\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body of type string.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as JSON and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body of type `Object`.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as JSON\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body of the requested type.\n */\n head<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n\n * Constructs a `HEAD` request that interprets the body as JSON and\n * returns the response body as an object parsed from JSON.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the response, with the response body as an object parsed from JSON.\n */\n head(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a `HEAD` request that interprets the body as JSON and returns\n * the response in a given type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body of the given type.\n */\n head<T>(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<T>;\n\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `HEAD` request to execute on the server. The `HEAD` method returns\n * meta information about the resource without transferring the\n * resource itself. See the individual overloads for\n * details on the return type.\n */\n head(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n } = {},\n ): Observable<any> {\n return this.request<any>('HEAD', url, options as any);\n }\n\n /**\n * Constructs a `JSONP` request for the given URL and name of the callback parameter.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n * @return An `Observable` of the response object, with response body as an object.\n */\n jsonp(url: string, callbackParam: string): Observable<Object>;\n\n /**\n * Constructs a `JSONP` request for the given URL and name of the callback parameter.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n * You must install a suitable interceptor, such as one provided by `HttpClientJsonpModule`.\n * If no such interceptor is reached,\n * then the `JSONP` request can be rejected by the configured backend.\n *\n * @return An `Observable` of the response object, with response body in the requested type.\n */\n jsonp<T>(url: string, callbackParam: string): Observable<T>;\n\n /**\n * Constructs an `Observable` that, when subscribed, causes a request with the special method\n * `JSONP` to be dispatched via the interceptor pipeline.\n * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n * API endpoints that don't support newer,\n * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n * application making the request.\n * The endpoint API must support JSONP callback for JSONP requests to work.\n * The resource API returns the JSON response wrapped in a callback function.\n * You can pass the callback function name as one of the query parameters.\n * Note that JSONP requests can only be used with `GET` requests.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n */\n jsonp<T>(url: string, callbackParam: string): Observable<T> {\n return this.request<any>('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n }\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as an\n * `ArrayBuffer` and returns the response as an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as a `Blob` and returns\n * the response as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as a text string and\n * returns a string value.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body of type string.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as an `ArrayBuffer`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as a `Blob` and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as a `Blob`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as a text string\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request,\n * with the response body of type string.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as JSON\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request with the response\n * body of type `Object`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as JSON and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request,\n * with a response body in the requested type.\n */\n options<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as an `ArrayBuffer`\n * and returns the full HTTP response.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as an `ArrayBuffer`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as a `Blob`\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as a `Blob`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as text stream\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body of type string.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as JSON\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body of type `Object`.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as JSON and\n * returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body in the requested type.\n */\n options<T>(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n\n * Constructs an `OPTIONS` request that interprets the body as JSON and returns the\n * response body as an object parsed from JSON.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as an object parsed from JSON.\n */\n options(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs an `OPTIONS` request that interprets the body as JSON and returns the\n * response in a given type.\n *\n * @param url The endpoint URL.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse`, with a response body of the given type.\n */\n options<T>(\n url: string,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<T>;\n\n /**\n * Constructs an `Observable` that, when subscribed, causes the configured\n * `OPTIONS` request to execute on the server. This method allows the client\n * to determine the supported HTTP methods and other capabilities of an endpoint,\n * without implying a resource action. See the individual overloads for\n * details on the return type.\n */\n options(\n url: string,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n } = {},\n ): Observable<any> {\n return this.request<any>('OPTIONS', url, options as any);\n }\n\n /**\n * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and returns\n * the response as an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the response\n * as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as a text string and\n * returns the response as a string value.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with a response body of type string.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer` and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request,\n * with the response body as an `ArrayBuffer`.\n */\n\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as a `Blob`\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request, with the\n * response body as `Blob`.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as a text string and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request, with a\n * response body of type string.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as JSON\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request,\n * with a response body of type `Object`.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as JSON\n * and returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of all the `HttpEvent`s for the request,\n * with a response body in the requested type.\n */\n patch<T>(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as an `ArrayBuffer`\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as an `ArrayBuffer`.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as a `Blob` and returns the full\n * `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as a `Blob`.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as a text stream and returns the\n * full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body of type string.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as JSON\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body in the requested type.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as JSON\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body in the given type.\n */\n patch<T>(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n\n * Constructs a `PATCH` request that interprets the body as JSON and\n * returns the response body as an object parsed from JSON.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as an object parsed from JSON.\n */\n patch(\n url: string,\n body: any | null,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a `PATCH` request that interprets the body as JSON\n * and returns the response in a given type.\n *\n * @param url The endpoint URL.\n * @param body The resources to edit.\n * @param options HTTP options.\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body in the given type.\n */\n patch<T>(\n url: string,\n body: any | null,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<T>;\n\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PATCH` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n patch(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n } = {},\n ): Observable<any> {\n return this.request<any>('PATCH', url, addBody(options, body));\n }\n\n /**\n * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and returns\n * an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options.\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a `POST` request that interprets the body as a `Blob` and returns the\n * response as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a `POST` request that interprets the body as a text string and\n * returns the response as a string value.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the response, with a response body of type string.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs a `POST` request that interprets the body as an `ArrayBuffer` and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as an `ArrayBuffer`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a `POST` request that interprets the body as a `Blob`\n * and returns the response in an observable of the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with the response body as `Blob`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a `POST` request that interprets the body as a text string and returns the full\n * event stream.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with a response body of type string.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a POST request that interprets the body as JSON and returns the full\n * event stream.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with a response body of type `Object`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs a POST request that interprets the body as JSON and returns the full\n * event stream.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with a response body in the requested type.\n */\n post<T>(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs a POST request that interprets the body as an `ArrayBuffer`\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with the response body as an\n * `ArrayBuffer`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a `POST` request that interprets the body as a `Blob` and returns the full\n * `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as a `Blob`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a `POST` request that interprets the body as a text stream and returns\n * the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body of type string.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a `POST` request that interprets the body as JSON\n * and returns the full `HttpResponse`.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with a response body of type\n * `Object`.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a `POST` request that interprets the body as JSON and returns the\n * full `HttpResponse`.\n *\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with a response body in the\n * requested type.\n */\n post<T>(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n * Constructs a `POST` request that interprets the body as JSON\n * and returns the response body as an object parsed from JSON.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the response, with the response body as an object parsed from JSON.\n */\n post(\n url: string,\n body: any | null,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a `POST` request that interprets the body as JSON\n * and returns an observable of the response.\n *\n * @param url The endpoint URL.\n * @param body The content to replace with.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with a response body in the\n * requested type.\n */\n post<T>(\n url: string,\n body: any | null,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n },\n ): Observable<T>;\n\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `POST` request to execute on the server. The server responds with the location of\n * the replaced resource. See the individual overloads for\n * details on the return type.\n */\n post(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n transferCache?: {includeHeaders?: string[]} | boolean;\n } = {},\n ): Observable<any> {\n return this.request<any>('POST', url, addBody(options, body));\n }\n\n /**\n * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and returns the\n * response as an `ArrayBuffer`.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the response, with the response body as an `ArrayBuffer`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<ArrayBuffer>;\n\n /**\n * Constructs a `PUT` request that interprets the body as a `Blob` and returns\n * the response as a `Blob`.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the response, with the response body as a `Blob`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<Blob>;\n\n /**\n * Constructs a `PUT` request that interprets the body as a text string and\n * returns the response as a string value.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the response, with a response body of type string.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<string>;\n\n /**\n * Constructs a `PUT` request that interprets the body as an `ArrayBuffer` and\n * returns the full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as an `ArrayBuffer`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<ArrayBuffer>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as a `Blob` and returns the full event\n * stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with the response body as a `Blob`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<Blob>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as a text string and returns the full event\n * stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with a response body\n * of type string.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<string>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as JSON and returns the full\n * event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request, with a response body of\n * type `Object`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<Object>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as JSON and returns the\n * full event stream.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of all `HttpEvent`s for the request,\n * with a response body in the requested type.\n */\n put<T>(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'events';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpEvent<T>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as an\n * `ArrayBuffer` and returns an observable of the full HTTP response.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with the response body as an\n * `ArrayBuffer`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'arraybuffer';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<ArrayBuffer>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as a `Blob` and returns the\n * full HTTP response.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with the response body as a `Blob`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'blob';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Blob>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as a text stream and returns the\n * full HTTP response.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with a response body of type\n * string.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType: 'text';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<string>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as JSON and returns the full\n * HTTP response.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request, with a response body\n * of type 'Object`.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<Object>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as an instance of the requested type and\n * returns the full HTTP response.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the `HttpResponse` for the request,\n * with a response body in the requested type.\n */\n put<T>(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n observe: 'response';\n context?: HttpContext;\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<HttpResponse<T>>;\n\n /**\n * Constructs a `PUT` request that interprets the body as JSON\n * and returns an observable of JavaScript object.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the response as a JavaScript object.\n */\n put(\n url: string,\n body: any | null,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<Object>;\n\n /**\n * Constructs a `PUT` request that interprets the body as an instance of the requested type\n * and returns an observable of the requested type.\n *\n * @param url The endpoint URL.\n * @param body The resources to add/update.\n * @param options HTTP options\n *\n * @return An `Observable` of the requested type.\n */\n put<T>(\n url: string,\n body: any | null,\n options?: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'json';\n withCredentials?: boolean;\n },\n ): Observable<T>;\n\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n * with a new set of values.\n * See the individual overloads for details on the return type.\n */\n put(\n url: string,\n body: any | null,\n options: {\n headers?: HttpHeaders | {[header: string]: string | string[]};\n context?: HttpContext;\n observe?: 'body' | 'events' | 'response';\n params?:\n | HttpParams\n | {[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>};\n reportProgress?: boolean;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n } = {},\n ): Observable<any> {\n return this.request<any>('PUT', url, addBody(options, body));\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.dev/license\n */\n\nimport {inject, Injectable, NgZone} from '@angular/core';\nimport {Observable, Observer} from 'rxjs';\n\nimport {HttpBackend} from './backend';\nimport {HttpHeaders} from './headers';\nimport {HttpRequest} from './request';\nimport {\n HTTP_STATUS_CODE_OK,\n HttpDownloadProgressEvent,\n HttpErrorResponse,\n HttpEvent,\n HttpEventType,\n HttpHeaderResponse,\n HttpResponse,\n} from './response';\n\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n\nconst REQUEST_URL_HEADER = `X-Request-URL`;\n\n/**\n * Determine an appropriate URL for the response, by checking either\n * response url or the X-Request-URL header.\n */\nfunction getResponseUrl(response: Response): string | null {\n if (response.url) {\n return response.url;\n }\n // stored as lowercase in the map\n const xRequestUrl = REQUEST_URL_HEADER.toLocaleLowerCase();\n return response.headers.get(xRequestUrl);\n}\n\n/**\n * Uses `fetch` to send requests to a backend server.\n *\n * This `FetchBackend` requires the support of the\n * [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) which is available on all\n * supported browsers and on Node.js v18 or later.\n *\n * @see {@link HttpHandler}\n *\n * @publicApi\n */\n@Injectable()\nexport class FetchBackend implements HttpBackend {\n // We use an arrow function to always reference the current global implementation of `fetch`.\n // This is helpful for cases when the global `fetch` implementation is modified by external code,\n // see https://github.com/angular/angular/issues/57527.\n private readonly fetchImpl =\n inject(FetchFactory, {optional: true})?.fetch ?? ((...args) => globalThis.fetch(...args));\n private readonly ngZone = inject(NgZone);\n\n handle(request: HttpRequest<any>): Observable<HttpEvent<any>> {\n return new Observable((observer) => {\n const aborter = new AbortController();\n this.doRequest(request, aborter.signal, observer).then(noop, (error) =>\n observer.error(new HttpErrorResponse({error})),\n );\n return () => aborter.abort();\n });\n }\n\n private async doRequest(\n request: HttpRequest<any>,\n signal: AbortSignal,\n observer: Observer<HttpEvent<any>>,\n ): Promise<void> {\n const init = this.createRequestInit(request);\n let response;\n\n try {\n // Run fetch outside of Angular zone.\n // This is due to Node.js fetch implementation (Undici) which uses a number of setTimeouts to check if\n // the response should eventually timeout which causes extra CD cycles every 500ms\n const fetchPromise = this.ngZone.runOutsideAngular(() =>\n this.fetchImpl(request.urlWithParams, {signal, ...init}),\n );\n\n // Make sure Zone.js doesn't trigger false-positive unhandled promise\n // error in case the Promise is rejected synchronously. See function\n // description for additional information.\n silenceSuperfluousUnhandledPromiseRejection(fetchPromise);\n\n // Send the `Sent` event before awaiting the response.\n observer.next({type: HttpEventType.Sent});\n\n response = await fetchPromise;\n } catch (error: any) {\n observer.error(\n new HttpErrorResponse({\n error,\n status: error.status ?? 0,\n statusText: error.statusText,\n url: request.urlWithParams,\n headers: error.headers,\n }),\n );\n return;\n }\n\n const headers = new HttpHeaders(response.headers);\n const statusText = response.statusText;\n const url = getResponseUrl(response) ?? request.urlWithParams;\n\n let status = response.status;\n let body: string | ArrayBuffer | Blob | object | null = null;\n\n if (request.reportProgress) {\n observer.next(new HttpHeaderResponse({headers, status, statusText, url}));\n }\n\n if (response.body) {\n // Read Progress\n const contentLength = response.headers.get('content-length');\n const chunks: Uint8Array[] = [];\n const reader = response.body.getReader();\n let receivedLength = 0;\n\n let decoder: TextDecoder;\n let partialText: string | undefined;\n\n // We have to check whether the Zone is defined in the global scope because this may be called\n // when the zone is nooped.\n const reqZone = typeof Zone !== 'undefined' && Zone.current;\n\n // Perform response processing outside of Angular zone to\n // ensure no excessive change detection runs are executed\n // Here calling the async ReadableStreamDefaultReader.read() is responsible for triggering CD\n await this.ngZone.runOutsideAngular(async () => {\n while (true) {\n const {done, value} = await reader.read();\n\n if (done) {\n break;\n }\n\n chunks.push(value);\n receivedLength += value.length;\n\n if (request.reportProgress) {\n partialText =\n request.responseType === 'text'\n ? (partialText ?? '') +\n (decoder ??= new TextDecoder()).decode(value, {stream: true})\n : undefined;\n\n const reportProgress = () =>\n observer.next({\n type: HttpEventType.DownloadProgress,\n total: contentLength ? +contentLength : undefined,\n loaded: receivedLength,\n partialText,\n } as HttpDownloadProgressEvent);\n reqZone ? reqZone.run(reportProgress) : reportProgress();\n }\n }\n });\n\n // Combine all chunks.\n const chunksAll = this.concatChunks(chunks, receivedLength);\n try {\n const contentType = response.headers.get('Content-Type') ?? '';\n body = this.parseBody(request, chunksAll, contentType);\n } catch (error) {\n // Body loading or parsing failed\n observer.error(\n new HttpErrorResponse({\n error,\n headers: new HttpHeaders(response.headers),\n status: response.status,\n statusText: response.statusText,\n url: getResponseUrl(response) ?? request.urlWithParams,\n }),\n );\n return;\n }\n }\n\n // Same behavior as the XhrBackend\n if (status === 0) {\n status = body ? HTTP_STATUS_CODE_OK : 0;\n }\n\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n const ok = status >= 200 && status < 300;\n\n if (ok) {\n observer.next(\n new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url,\n }),\n );\n\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n } else {\n observer.error(\n new HttpErrorResponse({\n error: body,\n headers,\n status,\n statusText,\n url,\n }),\n );\n }\n }\n\n private parseBody(\n request: HttpRequest<any>,\n binContent: Uint8Array,\n contentType: string,\n ): string | ArrayBuffer | Blob | object | null {\n switch (request.responseType) {\n case 'json':\n // stripping the XSSI when present\n const text = new TextDecoder().decode(binContent).replace(XSSI_PREFIX, '');\n return text === '' ? null : (JSON.parse(text) as object);\n case 'text':\n return new TextDecoder().decode(binContent);\n case 'blob':\n return new Blob([binContent], {type: contentType});\n case 'arraybuffer':\n return binContent.buffer;\n }\n }\n\n private createRequestInit(req: HttpRequest<any>): RequestInit {\n // We could share some of this logic with the XhrBackend\n\n const headers: Record<string, string> = {};\n const credentials: RequestCredentials | undefined = req.withCredentials ? 'include' : undefined;\n\n // Setting all the requested headers.\n req.headers.forEach((name, values) => (headers[name] = values.join(',')));\n\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n headers['Accept'] = 'application/json, text/plain, */*';\n }\n\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n headers['Content-Type'] = detectedType;\n }\n }\n\n return {\n body: req.serializeBody(),\n method: req.method,\n headers,\n credentials,\n };\n }\n\n private concatChunks(chunks: Uint8Array[], totalLength: number): Uint8Array {\n const chunksAll = new Uint8Array(totalLength);\n let position = 0;\n for (const chunk of chunks) {\n chunksAll.set(chunk, position);\n position += chunk.length;\n }\n\n return chunksAll;\n }\n}\n\n/**\n * Abstract class to provide a mocked implementation of `fetch()`\n */\nexport abstract class FetchFactory {\n abstract fetch: typeof fetch;\n}\n\nfunction noop(): void {}\n\n/**\n * Zone.js treats a rejected promise that has not yet been awaited\n * as an unhandled error. This function adds a noop `.then` to make\n * sure that Zone.js doesn't throw an error if the Promise is rejected\n * synchronously.\n */\nfunction silenceSuperfluousUnhandledPromiseRejection(promise: Promise<unknown>) {\n promise.then(noop, noop);\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.dev/license\n */\n\nimport {isPlatformServer} from '@angular/common';\nimport {\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n PLATFORM_ID,\n runInInjectionContext,\n ɵConsole as Console,\n ɵformatRuntimeError as formatRuntimeError,\n ɵPendingTasks as PendingTasks,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {finalize} from 'rxjs/operators';\n\nimport {HttpBackend, HttpHandler} from './backend';\nimport {RuntimeErrorCode} from './errors';\nimport {FetchBackend} from './fetch';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\n/**\n * Intercepts and handles an `HttpRequest` or `HttpResponse`.\n *\n * Most interceptors transform the outgoing request before passing it to the\n * next interceptor in the chain, by calling `next.handle(transformedReq)`.\n * An interceptor may transform the\n * response event stream as well, by applying additional RxJS operators on the stream\n * returned by `next.handle()`.\n *\n * More rarely, an interceptor may handle the request entirely,\n * and compose a new event stream instead of invoking `next.handle()`. This is an\n * acceptable behavior, but keep in mind that further interceptors will be skipped entirely.\n *\n * It is also rare but valid for an interceptor to return multiple responses on the\n * event stream for a single request.\n *\n * @publicApi\n *\n * @see [HTTP Guide](guide/http/interceptors)\n * @see {@link HttpInterceptorFn}\n *\n * @usageNotes\n *\n * To use the same instance of `HttpInterceptors` for the entire app, import the `HttpClientModule`\n * only in your `AppModule`, and add the interceptors to the root application injector.\n * If you import `HttpClientModule` multiple times across different modules (for example, in lazy\n * loading modules), each import creates a new copy of the `HttpClientModule`, which overwrites the\n * interceptors provided in the root module.\n */\nexport interface HttpInterceptor {\n /**\n * Identifies and handles a given HTTP request.\n * @param req The outgoing request object to handle.\n * @param next The next interceptor in the chain, or the backend\n * if no interceptors remain in the chain.\n * @returns An observable of the event stream.\n */\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;\n}\n\n/**\n * Represents the next interceptor in an interceptor chain, or the real backend if there are no\n * further interceptors.\n *\n * Most interceptors will delegate to this function, and either modify the outgoing request or the\n * response when it arrives. Within the scope of the current request, however, this function may be\n * called any number of times, for any number of downstream requests. Such downstream requests need\n * not be to the same URL or even the same origin as the current request. It is also valid to not\n * call the downstream handler at all, and process the current request entirely within the\n * interceptor.\n *\n * This function should only be called within the scope of the request that's currently being\n * intercepted. Once that request is complete, this downstream handler function should not be\n * called.\n *\n * @publicApi\n *\n * @see [HTTP Guide](guide/http/interceptors)\n */\nexport type HttpHandlerFn = (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>;\n\n/**\n * An interceptor for HTTP requests made via `HttpClient`.\n *\n * `HttpInterceptorFn`s are middleware functions which `HttpClient` calls when a request is made.\n * These functions have the opportunity to modify the outgoing request or any response that comes\n * back, as well as block, redirect, or otherwise change the request or response semantics.\n *\n * An `HttpHandlerFn` representing the next interceptor (or the backend which will make a real HTTP\n * request) is provided. Most interceptors will delegate to this function, but that is not required\n * (see `HttpHandlerFn` for more details).\n *\n * `HttpInterceptorFn`s are executed in an [injection context](guide/di/dependency-injection-context).\n * They have access to `inject()` via the `EnvironmentInjector` from which they were configured.\n *\n * @see [HTTP Guide](guide/http/interceptors)\n * @see {@link withInterceptors}\n *\n * @usageNotes\n * Here is a noop interceptor that passes the request through without modifying it:\n * ```typescript\n * export const noopInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next:\n * HttpHandlerFn) => {\n * return next(modifiedReq);\n * };\n * ```\n *\n * If you want to alter a request, clone it first and modify the clone before passing it to the\n * `next()` handler function.\n *\n * Here is a basic interceptor that adds a bearer token to the headers\n * ```typescript\n * export const authenticationInterceptor: HttpInterceptorFn = (req: HttpRequest<unknown>, next:\n * HttpHandlerFn) => {\n * const userToken = 'MY_TOKEN'; const modifiedReq = req.clone({\n * headers: req.headers.set('Authorization', `Bearer ${userToken}`),\n * });\n *\n * return next(modifiedReq);\n * };\n * ```\n */\nexport type HttpInterceptorFn = (\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n) => Observable<HttpEvent<unknown>>;\n\n/**\n * Function which invokes an HTTP interceptor chain.\n *\n * Each interceptor in the interceptor chain is turned into a `ChainedInterceptorFn` which closes\n * over the rest of the chain (represented by another `ChainedInterceptorFn`). The last such\n * function in the chain will instead delegate to the `finalHandlerFn`, which is passed down when\n * the chain is invoked.\n *\n * This pattern allows for a chain of many interceptors to be composed and wrapped in a single\n * `HttpInterceptorFn`, which is a useful abstraction for including different kinds of interceptors\n * (e.g. legacy class-based interceptors) in the same chain.\n */\ntype ChainedInterceptorFn<RequestT> = (\n req: HttpRequest<RequestT>,\n finalHandlerFn: HttpHandlerFn,\n) => Observable<HttpEvent<RequestT>>;\n\nfunction interceptorChainEndFn(\n req: HttpRequest<any>,\n finalHandlerFn: HttpHandlerFn,\n): Observable<HttpEvent<any>> {\n return finalHandlerFn(req);\n}\n\n/**\n * Constructs a `ChainedInterceptorFn` which adapts a legacy `HttpInterceptor` to the\n * `ChainedInterceptorFn` interface.\n */\nfunction adaptLegacyInterceptorToChain(\n chainTailFn: ChainedInterceptorFn<any>,\n interceptor: HttpInterceptor,\n): ChainedInterceptorFn<any> {\n return (initialRequest, finalHandlerFn) =>\n interceptor.intercept(initialRequest, {\n handle: (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn),\n });\n}\n\n/**\n * Constructs a `ChainedInterceptorFn` which wraps and invokes a functional interceptor in the given\n * injector.\n */\nfunction chainedInterceptorFn(\n chainTailFn: ChainedInterceptorFn<unknown>,\n interceptorFn: HttpInterceptorFn,\n injector: EnvironmentInjector,\n): ChainedInterceptorFn<unknown> {\n return (initialRequest, finalHandlerFn) =>\n runInInjectionContext(injector, () =>\n interceptorFn(initialRequest, (downstreamRequest) =>\n chainTailFn(downstreamRequest, finalHandlerFn),\n ),\n );\n}\n\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nexport const HTTP_INTERCEPTORS = new InjectionToken<readonly HttpInterceptor[]>(\n ngDevMode ? 'HTTP_INTERCEPTORS' : '',\n);\n\n/**\n * A multi-provided token of `HttpInterceptorFn`s.\n */\nexport const HTTP_INTERCEPTOR_FNS = new InjectionToken<readonly HttpInterceptorFn[]>(\n ngDevMode ? 'HTTP_INTERCEPTOR_FNS' : '',\n);\n\n/**\n * A multi-provided token of `HttpInterceptorFn`s that are only set in root.\n */\nexport const HTTP_ROOT_INTERCEPTOR_FNS = new InjectionToken<readonly HttpInterceptorFn[]>(\n ngDevMode ? 'HTTP_ROOT_INTERCEPTOR_FNS' : '',\n);\n\n// TODO(atscott): We need a larger discussion about stability and what should contribute to stability.\n// Should the whole interceptor chain contribute to stability or just the backend request #55075?\n// Should HttpClient contribute to stability automatically at all?\nexport const REQUESTS_CONTRIBUTE_TO_STABILITY = new InjectionToken<boolean>(\n ngDevMode ? 'REQUESTS_CONTRIBUTE_TO_STABILITY' : '',\n {providedIn: 'root', factory: () => true},\n);\n\n/**\n * Creates an `HttpInterceptorFn` which lazily initializes an interceptor chain from the legacy\n * class-based interceptors and runs the request through it.\n */\nexport function legacyInterceptorFnFactory(): HttpInterceptorFn {\n let chain: ChainedInterceptorFn<any> | null = null;\n\n return (req, handler) => {\n if (chain === null) {\n const interceptors = inject(HTTP_INTERCEPTORS, {optional: true}) ?? [];\n // Note: interceptors are wrapped right-to-left so that final execution order is\n // left-to-right. That is, if `interceptors` is the array `[a, b, c]`, we want to\n // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n // out.\n chain = interceptors.reduceRight(\n adaptLegacyInterceptorToChain,\n interceptorChainEndFn as ChainedInterceptorFn<any>,\n );\n }\n\n const pendingTasks = inject(PendingTasks);\n const contributeToStability = inject(REQUESTS_CONTRIBUTE_TO_STABILITY);\n if (contributeToStability) {\n const taskId = pendingTasks.add();\n return chain(req, handler).pipe(finalize(() => pendingTasks.remove(taskId)));\n } else {\n return chain(req, handler);\n }\n };\n}\n\nlet fetchBackendWarningDisplayed = false;\n\n/** Internal function to reset the flag in tests */\nexport function resetFetchBackendWarningFlag() {\n fetchBackendWarningDisplayed = false;\n}\n\n@Injectable()\nexport class HttpInterceptorHandler extends HttpHandler {\n private chain: ChainedInterceptorFn<unknown> | null = null;\n private readonly pendingTasks = inject(PendingTasks);\n private readonly contributeToStability = inject(REQUESTS_CONTRIBUTE_TO_STABILITY);\n\n constructor(\n private backend: HttpBackend,\n private injector: EnvironmentInjector,\n ) {\n super();\n\n // We strongly recommend using fetch backend for HTTP calls when SSR is used\n // for an application. The logic below checks if that's the case and produces\n // a warning otherwise.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !fetchBackendWarningDisplayed) {\n const isServer = isPlatformServer(injector.get(PLATFORM_ID));\n if (isServer && !(this.backend instanceof FetchBackend)) {\n fetchBackendWarningDisplayed = true;\n injector\n .get(Console)\n .warn(\n formatRuntimeError(\n RuntimeErrorCode.NOT_USING_FETCH_BACKEND_IN_SSR,\n 'Angular detected that `HttpClient` is not configured ' +\n \"to use `fetch` APIs. It's strongly recommended to \" +\n 'enable `fetch` for applications that use Server-Side Rendering ' +\n 'for better performance and compatibility. ' +\n 'To enable `fetch`, add the `withFetch()` to the `provideHttpClient()` ' +\n 'call at the root of the application.',\n ),\n );\n }\n }\n }\n\n override handle(initialRequest: HttpRequest<any>): Observable<HttpEvent<any>> {\n if (this.chain === null) {\n const dedupedInterceptorFns = Array.from(\n new Set([\n ...this.injector.get(HTTP_INTERCEPTOR_FNS),\n ...this.injector.get(HTTP_ROOT_INTERCEPTOR_FNS, []),\n ]),\n );\n\n // Note: interceptors are wrapped right-to-left so that final execution order is\n // left-to-right. That is, if `dedupedInterceptorFns` is the array `[a, b, c]`, we want to\n // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n // out.\n this.chain = dedupedInterceptorFns.reduceRight(\n (nextSequencedFn, interceptorFn) =>\n chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector),\n interceptorChainEndFn as ChainedInterceptorFn<unknown>,\n );\n }\n\n if (this.contributeToStability) {\n const taskId = this.pendingTasks.add();\n return this.chain(initialRequest, (downstreamRequest) =>\n this.backend.handle(downstreamRequest),\n ).pipe(finalize(() => this.pendingTasks.remove(taskId)));\n } else {\n return this.chain(initialRequest, (downstreamRequest) =>\n this.backend.handle(downstreamRequest),\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.dev/license\n */\n\nimport {XhrFactory} from '@angular/common';\nimport {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {from, Observable, Observer, of} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nimport {HttpBackend} from './backend';\nimport {RuntimeErrorCode} from './errors';\nimport {HttpHeaders} from './headers';\nimport {HttpRequest} from './request';\nimport {\n HTTP_STATUS_CODE_NO_CONTENT,\n HTTP_STATUS_CODE_OK,\n HttpDownloadProgressEvent,\n HttpErrorResponse,\n HttpEvent,\n HttpEventType,\n HttpHeaderResponse,\n HttpJsonParseError,\n HttpResponse,\n HttpUploadProgressEvent,\n} from './response';\n\nconst XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr: any): string | null {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n\n/**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see {@link HttpHandler}\n * @see {@link JsonpClientBackend}\n *\n * @publicApi\n */\n@Injectable()\nexport class HttpXhrBackend implements HttpBackend {\n constructor(private xhrFactory: XhrFactory) {}\n\n /**\n * Processes a request and returns a stream of response events.\n * @param req The request object.\n * @returns An observable of the response events.\n */\n handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the HttpClientJsonpModule\n if (req.method === 'JSONP') {\n throw new RuntimeError(\n RuntimeErrorCode.MISSING_JSONP_MODULE,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Cannot make a JSONP request without JSONP support. To fix the problem, either add the \\`withJsonpSupport()\\` call (if \\`provideHttpClient()\\` is used) or import the \\`HttpClientJsonpModule\\` in the root NgModule.`,\n );\n }\n\n // Check whether this factory has a special function to load an XHR implementation\n // for various non-browser environments. We currently limit it to only `ServerXhr`\n // class, which needs to load an XHR implementation.\n const xhrFactory: XhrFactory & {ɵloadImpl?: () => Promise<void>} = this.xhrFactory;\n const source: Observable<void | null> = xhrFactory.ɵloadImpl\n ? from(xhrFactory.ɵloadImpl())\n : of(null);\n\n return source.pipe(\n switchMap(() => {\n // Everything happens on Observable subscription.\n return new Observable((observer: Observer<HttpEvent<any>>) => {\n // Start by setting up the XHR object with request method, URL, and withCredentials\n // flag.\n const xhr = xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (req.withCredentials) {\n xhr.withCredentials = true;\n }\n\n // Add all the requested headers.\n req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));\n\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n const detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n\n // Set the responseType if one was requested.\n if (req.responseType) {\n const responseType = req.responseType.toLowerCase();\n\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = (responseType !== 'json' ? responseType : 'text') as any;\n }\n\n // Serialize the request body if one is present. If not, this will be set to null.\n const reqBody = req.serializeBody();\n\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n let headerResponse: HttpHeaderResponse | null = null;\n\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n const partialFromXhr = (): HttpHeaderResponse => {\n if (headerResponse !== null) {\n return headerResponse;\n }\n\n const statusText = xhr.statusText || 'OK';\n\n // Parse headers from XMLHttpRequest - this step is lazy.\n const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n const url = getResponseUrl(xhr) || req.url;\n\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({headers, status: xhr.status, statusText, url});\n return headerResponse;\n };\n\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n\n // First up is the load event, which represents a response being fully available.\n const onLoad = () => {\n // Read response state from the memoized partial data.\n let {headers, status, statusText, url} = partialFromXhr();\n\n // The body will be read out if present.\n let body: any | null = null;\n\n if (status !== HTTP_STATUS_CODE_NO_CONTENT) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = typeof xhr.response === 'undefined' ? xhr.responseText : xhr.response;\n }\n\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? HTTP_STATUS_CODE_OK : 0;\n }\n\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n let ok = status >= 200 && status < 300;\n\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n const originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the\n // user.\n body = body !== '' ? JSON.parse(body) : null;\n } catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have\n // been a JSON response. Restore the original body (including any XSSI prefix)\n // to deliver a better error response.\n body = originalBody;\n\n // If this was an error request to begin with, leave it as a string, it\n // probably just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = {error, text: body} as HttpJsonParseError;\n }\n }\n }\n\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(\n new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }),\n );\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n } else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(\n new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers,\n status,\n statusText,\n url: url || undefined,\n }),\n );\n }\n };\n\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n const onError = (error: ProgressEvent) => {\n const {url} = partialFromXhr();\n const res = new HttpErrorResponse({\n error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n url: url || undefined,\n });\n observer.error(res);\n };\n\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progress event.\n let sentHeaders = false;\n\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n const onDownProgress = (event: ProgressEvent) => {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n\n // Start building the download progress event to deliver on the response\n // event stream.\n let progressEvent: HttpDownloadProgressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n const onUpProgress = (event: ProgressEvent) => {\n // Upload progress events are simpler. Begin building the progress\n // event.\n let progress: HttpUploadProgressEvent = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n\n // Send the event.\n observer.next(progress);\n };\n\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n xhr.addEventListener('timeout', onError);\n xhr.addEventListener('abort', onError);\n\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody!);\n observer.next({type: HttpEventType.Sent});\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return () => {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('abort', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onError);\n\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n\n // Finally, abort the in-flight request.\n if (xhr.readyState !== xhr.DONE) {\n xhr.abort();\n }\n };\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.dev/license\n */\n\nimport {DOCUMENT, ɵparseCookieValue as parseCookieValue} from '@angular/common';\nimport {\n EnvironmentInjector,\n Inject,\n inject,\n Injectable,\n InjectionToken,\n PLATFORM_ID,\n runInInjectionContext,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {HttpHandler} from './backend';\nimport {HttpHandlerFn, HttpInterceptor} from './interceptor';\nimport {HttpRequest} from './request';\nimport {HttpEvent} from './response';\n\nexport const XSRF_ENABLED = new InjectionToken<boolean>(ngDevMode ? 'XSRF_ENABLED' : '');\n\nexport const XSRF_DEFAULT_COOKIE_NAME = 'XSRF-TOKEN';\nexport const XSRF_COOKIE_NAME = new InjectionToken<string>(ngDevMode ? 'XSRF_COOKIE_NAME' : '', {\n providedIn: 'root',\n factory: () => XSRF_DEFAULT_COOKIE_NAME,\n});\n\nexport const XSRF_DEFAULT_HEADER_NAME = 'X-XSRF-TOKEN';\nexport const XSRF_HEADER_NAME = new InjectionToken<string>(ngDevMode ? 'XSRF_HEADER_NAME' : '', {\n providedIn: 'root',\n factory: () => XSRF_DEFAULT_HEADER_NAME,\n});\n\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nexport abstract class HttpXsrfTokenExtractor {\n /**\n * Get the XSRF token to use with an outgoing request.\n *\n * Will be called for every request, so the token may change between requests.\n */\n abstract getToken(): string | null;\n}\n\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\n@Injectable()\nexport class HttpXsrfCookieExtractor implements HttpXsrfTokenExtractor {\n private lastCookieString: string = '';\n private lastToken: string | null = null;\n\n /**\n * @internal for testing\n */\n parseCount: number = 0;\n\n constructor(\n @Inject(DOCUMENT) private doc: any,\n @Inject(PLATFORM_ID) private platform: string,\n @Inject(XSRF_COOKIE_NAME) private cookieName: string,\n ) {}\n\n getToken(): string | null {\n if (this.platform === 'server') {\n return null;\n }\n const cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = parseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n }\n}\n\nexport function xsrfInterceptorFn(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (\n !inject(XSRF_ENABLED) ||\n req.method === 'GET' ||\n req.method === 'HEAD' ||\n lcUrl.startsWith('http://') ||\n lcUrl.startsWith('https://')\n ) {\n return next(req);\n }\n\n const token = inject(HttpXsrfTokenExtractor).getToken();\n const headerName = inject(XSRF_HEADER_NAME);\n\n // Be careful not to overwrite an existing header of the same name.\n if (token != null && !req.headers.has(headerName)) {\n req = req.clone({headers: req.headers.set(headerName, token)});\n }\n return next(req);\n}\n\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\n@Injectable()\nexport class HttpXsrfInterceptor implements HttpInterceptor {\n constructor(private injector: EnvironmentInjector) {}\n\n intercept(initialRequest: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n return runInInjectionContext(this.injector, () =>\n xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)),\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.dev/license\n */\n\nimport {\n EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Provider,\n} from '@angular/core';\n\nimport {HttpBackend, HttpHandler} from './backend';\nimport {HttpClient} from './client';\nimport {FetchBackend} from './fetch';\nimport {\n HTTP_INTERCEPTOR_FNS,\n HttpInterceptorFn,\n HttpInterceptorHandler,\n legacyInterceptorFnFactory,\n} from './interceptor';\nimport {\n jsonpCallbackContext,\n JsonpCallbackContext,\n JsonpClientBackend,\n jsonpInterceptorFn,\n} from './jsonp';\nimport {HttpXhrBackend} from './xhr';\nimport {\n HttpXsrfCookieExtractor,\n HttpXsrfTokenExtractor,\n XSRF_COOKIE_NAME,\n XSRF_ENABLED,\n XSRF_HEADER_NAME,\n xsrfInterceptorFn,\n} from './xsrf';\n\n/**\n * Identifies a particular kind of `HttpFeature`.\n *\n * @publicApi\n */\nexport enum HttpFeatureKind {\n Interceptors,\n LegacyInterceptors,\n CustomXsrfConfiguration,\n NoXsrfProtection,\n JsonpSupport,\n RequestsMadeViaParent,\n Fetch,\n}\n\n/**\n * A feature for use when configuring `provideHttpClient`.\n *\n * @publicApi\n */\nexport interface HttpFeature<KindT extends HttpFeatureKind> {\n ɵkind: KindT;\n ɵproviders: Provider[];\n}\n\nfunction makeHttpFeature<KindT extends HttpFeatureKind>(\n kind: KindT,\n providers: Provider[],\n): HttpFeature<KindT> {\n return {\n ɵkind: kind,\n ɵproviders: providers,\n };\n}\n\n/**\n * Configures Angular's `HttpClient` service to be available for injection.\n *\n * By default, `HttpClient` will be configured for injection with its default options for XSRF\n * protection of outgoing requests. Additional configuration options can be provided by passing\n * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the\n * `withInterceptors(...)` feature.\n *\n * <div class=\"alert is-helpful\">\n *\n * It's strongly recommended to enable\n * [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for applications that use\n * Server-Side Rendering for better performance and compatibility. To enable `fetch`, add\n * `withFetch()` feature to the `provideHttpClient()` call at the root of the application:\n *\n * ```\n * provideHttpClient(withFetch());\n * ```\n *\n * </div>\n *\n * @see {@link withInterceptors}\n * @see {@link withInterceptorsFromDi}\n * @see {@link withXsrfConfiguration}\n * @see {@link withNoXsrfProtection}\n * @see {@link withJsonpSupport}\n * @see {@link withRequestsMadeViaParent}\n * @see {@link withFetch}\n */\nexport function provideHttpClient(\n ...features: HttpFeature<HttpFeatureKind>[]\n): EnvironmentProviders {\n if (ngDevMode) {\n const featureKinds = new Set(features.map((f) => f.ɵkind));\n if (\n featureKinds.has(HttpFeatureKind.NoXsrfProtection) &&\n featureKinds.has(HttpFeatureKind.CustomXsrfConfiguration)\n ) {\n throw new Error(\n ngDevMode\n ? `Configuration error: found both withXsrfConfiguration() and withNoXsrfProtection() in the same call to provideHttpClient(), which is a contradiction.`\n : '',\n );\n }\n }\n\n const providers: Provider[] = [\n HttpClient,\n HttpXhrBackend,\n HttpInterceptorHandler,\n {provide: HttpHandler, useExisting: HttpInterceptorHandler},\n {\n provide: HttpBackend,\n useFactory: () => {\n return inject(FetchBackend, {optional: true}) ?? inject(HttpXhrBackend);\n },\n },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: xsrfInterceptorFn,\n multi: true,\n },\n {provide: XSRF_ENABLED, useValue: true},\n {provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor},\n ];\n\n for (const feature of features) {\n providers.push(...feature.ɵproviders);\n }\n\n return makeEnvironmentProviders(providers);\n}\n\n/**\n * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`\n * instance.\n *\n * @see {@link HttpInterceptorFn}\n * @see {@link provideHttpClient}\n * @publicApi\n */\nexport function withInterceptors(\n interceptorFns: HttpInterceptorFn[],\n): HttpFeature<HttpFeatureKind.Interceptors> {\n return makeHttpFeature(\n HttpFeatureKind.Interceptors,\n interceptorFns.map((interceptorFn) => {\n return {\n provide: HTTP_INTERCEPTOR_FNS,\n useValue: interceptorFn,\n multi: true,\n };\n }),\n );\n}\n\nconst LEGACY_INTERCEPTOR_FN = new InjectionToken<HttpInterceptorFn>(\n ngDevMode ? 'LEGACY_INTERCEPTOR_FN' : '',\n);\n\n/**\n * Includes class-based interceptors configured using a multi-provider in the current injector into\n * the configured `HttpClient` instance.\n *\n * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided\n * interceptors may be phased out in a later release.\n *\n * @see {@link HttpInterceptor}\n * @see {@link HTTP_INTERCEPTORS}\n * @see {@link provideHttpClient}\n */\nexport function withInterceptorsFromDi(): HttpFeature<HttpFeatureKind.LegacyInterceptors> {\n // Note: the legacy interceptor function is provided here via an intermediate token\n // (`LEGACY_INTERCEPTOR_FN`), using a pattern which guarantees that if these providers are\n // included multiple times, all of the multi-provider entries will have the same instance of the\n // interceptor function. That way, the `HttpINterceptorHandler` will dedup them and legacy\n // interceptors will not run multiple times.\n return makeHttpFeature(HttpFeatureKind.LegacyInterceptors, [\n {\n provide: LEGACY_INTERCEPTOR_FN,\n useFactory: legacyInterceptorFnFactory,\n },\n {\n provide: HTTP_INTERCEPTOR_FNS,\n useExisting: LEGACY_INTERCEPTOR_FN,\n multi: true,\n },\n ]);\n}\n\n/**\n * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withNoXsrfProtection` feature.\n *\n * @see {@link provideHttpClient}\n */\nexport function withXsrfConfiguration({\n cookieName,\n headerName,\n}: {\n cookieName?: string;\n headerName?: string;\n}): HttpFeature<HttpFeatureKind.CustomXsrfConfiguration> {\n const providers: Provider[] = [];\n if (cookieName !== undefined) {\n providers.push({provide: XSRF_COOKIE_NAME, useValue: cookieName});\n }\n if (headerName !== undefined) {\n providers.push({provide: XSRF_HEADER_NAME, useValue: headerName});\n }\n\n return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);\n}\n\n/**\n * Disables XSRF protection in the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withXsrfConfiguration` feature.\n *\n * @see {@link provideHttpClient}\n */\nexport function withNoXsrfProtection(): HttpFeature<HttpFeatureKind.NoXsrfProtection> {\n return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [\n {\n provide: XSRF_ENABLED,\n useValue: false,\n },\n ]);\n}\n\n/**\n * Add JSONP support to the configuration of the current `HttpClient` instance.\n *\n * @see {@link provideHttpClient}\n */\nexport function withJsonpSupport(): HttpFeature<HttpFeatureKind.JsonpSupport> {\n return makeHttpFeature(HttpFeatureKind.JsonpSupport, [\n JsonpClientBackend,\n {provide: JsonpCallbackContext, useFactory: jsonpCallbackContext},\n {provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true},\n ]);\n}\n\n/**\n * Configures the current `HttpClient` instance to make requests via the parent injector's\n * `HttpClient` instead of directly.\n *\n * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent\n * instance. For example, even if `HttpClient` is configured in the parent injector with\n * one or more interceptors, they will not intercept requests made via this instance.\n *\n * With this option enabled, once the request has passed through the current injector's\n * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of\n * dispatched directly, and interceptors in the parent configuration will be applied to the request.\n *\n * If there are several `HttpClient` instances in the injector hierarchy, it's possible for\n * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to\n * \"bubble up\" until either reaching the root level or an `HttpClient` which was not configured with\n * this option.\n *\n * @see {@link provideHttpClient}\n * @developerPreview\n */\nexport function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.RequestsMadeViaParent> {\n return makeHttpFeature(HttpFeatureKind.RequestsMadeViaParent, [\n {\n provide: HttpBackend,\n useFactory: () => {\n const handlerFromParent = inject(HttpHandler, {skipSelf: true, optional: true});\n if (ngDevMode && handlerFromParent === null) {\n throw new Error(\n 'withRequestsMadeViaParent() can only be used when the parent injector also configures HttpClient',\n );\n }\n return handlerFromParent;\n },\n },\n ]);\n}\n\n/**\n * Configures the current `HttpClient` instance to make requests using the fetch API.\n *\n * Note: The Fetch API doesn't support progress report on uploads.\n *\n * @publicApi\n */\nexport function withFetch(): HttpFeature<HttpFeatureKind.Fetch> {\n return makeHttpFeature(HttpFeatureKind.Fetch, [\n FetchBackend,\n {provide: HttpBackend, useExisting: FetchBackend},\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.dev/license\n */\n\nimport {\n APP_BOOTSTRAP_LISTENER,\n ApplicationRef,\n inject,\n InjectionToken,\n makeStateKey,\n PLATFORM_ID,\n Provider,\n StateKey,\n TransferState,\n ɵformatRuntimeError as formatRuntimeError,\n ɵperformanceMarkFeature as performanceMarkFeature,\n ɵtruncateMiddle as truncateMiddle,\n ɵwhenStable as whenStable,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {isPlatformServer} from '@angular/common';\nimport {Observable, of} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\nimport {HttpHeaders} from './headers';\nimport {HTTP_ROOT_INTERCEPTOR_FNS, HttpHandlerFn} from './interceptor';\nimport {HttpRequest} from './request';\nimport {HttpEvent, HttpResponse} from './response';\nimport {HttpParams} from './params';\n\n/**\n * Options to configure how TransferCache should be used to cache requests made via HttpClient.\n *\n * @param includeHeaders Specifies which headers should be included into cached responses. No\n * headers are included by default.\n * @param filter A function that receives a request as an argument and returns a boolean to indicate\n * whether a request should be included into the cache.\n * @param includePostRequests Enables caching for POST requests. By default, only GET and HEAD\n * requests are cached. This option can be enabled if POST requests are used to retrieve data\n * (for example using GraphQL).\n * @param includeRequestsWithAuthHeaders Enables caching of requests containing either `Authorization`\n * or `Proxy-Authorization` headers. By default, these requests are excluded from caching.\n *\n * @publicApi\n */\nexport type HttpTransferCacheOptions = {\n includeHeaders?: string[];\n filter?: (req: HttpRequest<unknown>) => boolean;\n includePostRequests?: boolean;\n includeRequestsWithAuthHeaders?: boolean;\n};\n\n/**\n * If your application uses different HTTP origins to make API calls (via `HttpClient`) on the server and\n * on the client, the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token allows you to establish a mapping\n * between those origins, so that `HttpTransferCache` feature can recognize those requests as the same\n * ones and reuse the data cached on the server during hydration on the client.\n *\n * **Important note**: the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token should *only* be provided in\n * the *server* code of your application (typically in the `app.server.config.ts` script). Angular throws an\n * error if it detects that the token is defined while running on the client.\n *\n * @usageNotes\n *\n * When the same API endpoint is accessed via `http://internal-domain.com:8080` on the server and\n * via `https://external-domain.com` on the client, you can use the following configuration:\n * ```typescript\n * // in app.server.config.ts\n * {\n * provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,\n * useValue: {\n * 'http://internal-domain.com:8080': 'https://external-domain.com'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport const HTTP_TRANSFER_CACHE_ORIGIN_MAP = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'HTTP_TRANSFER_CACHE_ORIGIN_MAP' : '',\n);\n\n/**\n * Keys within cached response data structure.\n */\n\nexport const BODY = 'b';\nexport const HEADERS = 'h';\nexport const STATUS = 's';\nexport const STATUS_TEXT = 'st';\nexport const REQ_URL = 'u';\nexport const RESPONSE_TYPE = 'rt';\n\ninterface TransferHttpResponse {\n /** body */\n [BODY]: any;\n /** headers */\n [HEADERS]: Record<string, string[]>;\n /** status */\n [STATUS]?: number;\n /** statusText */\n [STATUS_TEXT]?: string;\n /** url */\n [REQ_URL]?: string;\n /** responseType */\n [RESPONSE_TYPE]?: HttpRequest<unknown>['responseType'];\n}\n\ninterface CacheOptions extends HttpTransferCacheOptions {\n isCacheActive: boolean;\n}\n\nconst CACHE_OPTIONS = new InjectionToken<CacheOptions>(\n ngDevMode ? 'HTTP_TRANSFER_STATE_CACHE_OPTIONS' : '',\n);\n\n/**\n * A list of allowed HTTP methods to cache.\n */\nconst ALLOWED_METHODS = ['GET', 'HEAD'];\n\nexport function transferCacheInterceptorFn(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const {isCacheActive, ...globalOptions} = inject(CACHE_OPTIONS);\n const {transferCache: requestOptions, method: requestMethod} = req;\n\n // In the following situations we do not want to cache the request\n if (\n !isCacheActive ||\n requestOptions === false ||\n // POST requests are allowed either globally or at request level\n (requestMethod === 'POST' && !globalOptions.includePostRequests && !requestOptions) ||\n (requestMethod !== 'POST' && !ALLOWED_METHODS.includes(requestMethod)) ||\n // Do not cache request that require authorization when includeRequestsWithAuthHeaders is falsey\n (!globalOptions.includeRequestsWithAuthHeaders && hasAuthHeaders(req)) ||\n globalOptions.filter?.(req) === false\n ) {\n return next(req);\n }\n\n const transferState = inject(TransferState);\n\n const originMap: Record<string, string> | null = inject(HTTP_TRANSFER_CACHE_ORIGIN_MAP, {\n optional: true,\n });\n const isServer = isPlatformServer(inject(PLATFORM_ID));\n if (originMap && !isServer) {\n throw new RuntimeError(\n RuntimeErrorCode.HTTP_ORIGIN_MAP_USED_IN_CLIENT,\n ngDevMode &&\n 'Angular detected that the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token is configured and ' +\n 'present in the client side code. Please ensure that this token is only provided in the ' +\n 'server code of the application.',\n );\n }\n\n const requestUrl = isServer && originMap ? mapRequestOriginUrl(req.url, originMap) : req.url;\n\n const storeKey = makeCacheKey(req, requestUrl);\n const response = transferState.get(storeKey, null);\n\n let headersToInclude = globalOptions.includeHeaders;\n if (typeof requestOptions === 'object' && requestOptions.includeHeaders) {\n // Request-specific config takes precedence over the global config.\n headersToInclude = requestOptions.includeHeaders;\n }\n\n if (response) {\n const {\n [BODY]: undecodedBody,\n [RESPONSE_TYPE]: responseType,\n [HEADERS]: httpHeaders,\n [STATUS]: status,\n [STATUS_TEXT]: statusText,\n [REQ_URL]: url,\n } = response;\n // Request found in cache. Respond using it.\n let body: ArrayBuffer | Blob | string | undefined = undecodedBody;\n\n switch (responseType) {\n case 'arraybuffer':\n body = new TextEncoder().encode(undecodedBody).buffer;\n break;\n case 'blob':\n body = new Blob([undecodedBody]);\n break;\n }\n\n // We want to warn users accessing a header provided from the cache\n // That HttpTransferCache alters the headers\n // The warning will be logged a single time by HttpHeaders instance\n let headers = new HttpHeaders(httpHeaders);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Append extra logic in dev mode to produce a warning when a header\n // that was not transferred to the client is accessed in the code via `get`\n // and `has` calls.\n headers = appendMissingHeadersDetection(req.url, headers, headersToInclude ?? []);\n }\n\n return of(\n new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url,\n }),\n );\n }\n\n // Request not found in cache. Make the request and cache it if on the server.\n return next(req).pipe(\n tap((event: HttpEvent<unknown>) => {\n if (event instanceof HttpResponse && isServer) {\n transferState.set<TransferHttpResponse>(storeKey, {\n [BODY]: event.body,\n [HEADERS]: getFilteredHeaders(event.headers, headersToInclude),\n [STATUS]: event.status,\n [STATUS_TEXT]: event.statusText,\n [REQ_URL]: requestUrl,\n [RESPONSE_TYPE]: req.responseType,\n });\n }\n }),\n );\n}\n\n/** @returns true when the requests contains autorization related headers. */\nfunction hasAuthHeaders(req: HttpRequest<unknown>): boolean {\n return req.headers.has('authorization') || req.headers.has('proxy-authorization');\n}\n\nfunction getFilteredHeaders(\n headers: HttpHeaders,\n includeHeaders: string[] | undefined,\n): Record<string, string[]> {\n if (!includeHeaders) {\n return {};\n }\n\n const headersMap: Record<string, string[]> = {};\n for (const key of includeHeaders) {\n const values = headers.getAll(key);\n if (values !== null) {\n headersMap[key] = values;\n }\n }\n\n return headersMap;\n}\n\nfunction sortAndConcatParams(params: HttpParams | URLSearchParams): string {\n return [...params.keys()]\n .sort()\n .map((k) => `${k}=${params.getAll(k)}`)\n .join('&');\n}\n\nfunction makeCacheKey(\n request: HttpRequest<any>,\n mappedRequestUrl: string,\n): StateKey<TransferHttpResponse> {\n // make the params encoded same as a url so it's easy to identify\n const {params, method, responseType} = request;\n const encodedParams = sortAndConcatParams(params);\n\n let serializedBody = request.serializeBody();\n if (serializedBody instanceof URLSearchParams) {\n serializedBody = sortAndConcatParams(serializedBody);\n } else if (typeof serializedBody !== 'string') {\n serializedBody = '';\n }\n\n const key = [method, responseType, mappedRequestUrl, serializedBody, encodedParams].join('|');\n const hash = generateHash(key);\n\n return makeStateKey(hash);\n}\n\n/**\n * A method that returns a hash representation of a string using a variant of DJB2 hash\n * algorithm.\n *\n * This is the same hashing logic that is used to generate component ids.\n */\nfunction generateHash(value: string): string {\n let hash = 0;\n\n for (const char of value) {\n hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n }\n\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n\n return hash.toString();\n}\n\n/**\n * Returns the DI providers needed to enable HTTP transfer cache.\n *\n * By default, when using server rendering, requests are performed twice: once on the server and\n * other one on the browser.\n *\n * When these providers are added, requests performed on the server are cached and reused during the\n * bootstrapping of the application in the browser thus avoiding duplicate requests and reducing\n * load time.\n *\n */\nexport function withHttpTransferCache(cacheOptions: HttpTransferCacheOptions): Provider[] {\n return [\n {\n provide: CACHE_OPTIONS,\n useFactory: (): CacheOptions => {\n performanceMarkFeature('NgHttpTransferCache');\n return {isCacheActive: true, ...cacheOptions};\n },\n },\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: transferCacheInterceptorFn,\n multi: true,\n deps: [TransferState, CACHE_OPTIONS],\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: () => {\n const appRef = inject(ApplicationRef);\n const cacheState = inject(CACHE_OPTIONS);\n\n return () => {\n whenStable(appRef).then(() => {\n cacheState.isCacheActive = false;\n });\n };\n },\n },\n ];\n}\n\n/**\n * This function will add a proxy to an HttpHeader to intercept calls to get/has\n * and log a warning if the header entry requested has been removed\n */\nfunction appendMissingHeadersDetection(\n url: string,\n headers: HttpHeaders,\n headersToInclude: string[],\n): HttpHeaders {\n const warningProduced = new Set();\n return new Proxy<HttpHeaders>(headers, {\n get(target: HttpHeaders, prop: keyof HttpHeaders): unknown {\n const value = Reflect.get(target, prop);\n const methods: Set<keyof HttpHeaders> = new Set(['get', 'has', 'getAll']);\n\n if (typeof value !== 'function' || !methods.has(prop)) {\n return value;\n }\n\n return (headerName: string) => {\n // We log when the key has been removed and a warning hasn't been produced for the header\n const key = (prop + ':' + headerName).toLowerCase(); // e.g. `get:cache-control`\n if (!headersToInclude.includes(headerName) && !warningProduced.has(key)) {\n warningProduced.add(key);\n const truncatedUrl = truncateMiddle(url);\n\n // TODO: create Error guide for this warning\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.HEADERS_ALTERED_BY_TRANSFER_CACHE,\n `Angular detected that the \\`${headerName}\\` header is accessed, but the value of the header ` +\n `was not transferred from the server to the client by the HttpTransferCache. ` +\n `To include the value of the \\`${headerName}\\` header for the \\`${truncatedUrl}\\` request, ` +\n `use the \\`includeHeaders\\` list. The \\`includeHeaders\\` can be defined either ` +\n `on a request level by adding the \\`transferCache\\` parameter, or on an application ` +\n `level by adding the \\`httpCacheTransfer.includeHeaders\\` argument to the ` +\n `\\`provideClientHydration()\\` call. `,\n ),\n );\n }\n\n // invoking the original method\n return (value as Function).apply(target, [headerName]);\n };\n },\n });\n}\n\nfunction mapRequestOriginUrl(url: string, originMap: Record<string, string>): string {\n const origin = new URL(url, 'resolve://').origin;\n const mappedOrigin = originMap[origin];\n if (!mappedOrigin) {\n return url;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n verifyMappedOrigin(mappedOrigin);\n }\n\n return url.replace(origin, mappedOrigin);\n}\n\nfunction verifyMappedOrigin(url: string): void {\n if (new URL(url, 'resolve://').pathname !== '/') {\n throw new RuntimeError(\n RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH,\n 'Angular detected a URL with a path segment in the value provided for the ' +\n `\\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\\` token: ${url}. The map should only contain origins ` +\n 'without any other segments.',\n );\n }\n}\n","import { HttpParams } from '@angular/common/http';\n\nimport { StringNumberBooleanMap } from '@fcom/core-api/interfaces';\nimport { RootPaths } from '@fcom/core/constants';\nimport { entrySet, isPresent } from '@fcom/core/utils';\nimport { Step } from '@fcom/common/interfaces';\n\nimport { BookingStepWithParams } from '../interfaces/booking/booking-step.interface';\nimport { BOOKING_STEPS, BOOKING_STEPS_ARRAY } from '../config/booking-config';\n\nexport const getBookingStepLink = (\n lang: string,\n step: Step | BookingStepWithParams,\n params?: StringNumberBooleanMap\n): string => {\n const path = `/${[lang, RootPaths.BOOKING_ROOT, step.path].filter(Boolean).join('/')}`;\n const queryParams = toQueryParamString(params);\n return path + queryParams;\n};\n\nexport const getBookingStepFromUrl = (path: string): Step => {\n const match = new RegExp(`/${RootPaths.BOOKING_ROOT}/([a-zA-Z-]*)`).exec(path);\n const matchedStep = match && match.length === 2 && match[1].toLowerCase();\n return BOOKING_STEPS_ARRAY.find((step) => step.path === matchedStep) || BOOKING_STEPS.ENTRY;\n};\n\nexport const toQueryParamString = (map: StringNumberBooleanMap = {}): string => {\n if (!map || Object.keys(map).length === 0) {\n return '';\n }\n const paramString = entrySet(map)\n .filter(({ value }) => isPresent(value))\n .reduce((acc, cur) => acc.set(cur.key, String(cur.value)), new HttpParams())\n .toString();\n return `?${paramString}`;\n};\n\nexport const COUNTRY_SHOP_COUNTRIES = [\n 'at',\n 'be',\n 'de',\n 'dk',\n 'ee',\n 'es',\n 'fi',\n 'fr',\n 'gb',\n 'ie',\n 'in',\n 'it',\n 'lt',\n 'lv',\n 'nl',\n 'no',\n 'se',\n];\n","import { Injectable, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, combineLatest, of, Subscription } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { AppState, StorageService } from '@fcom/core';\nimport { LoginStatus, Profile, ProfileType } from '@fcom/core-api/login';\nimport { loginStatus, profile, profileType } from '@fcom/core/selectors';\nimport { SentryLogger } from '@fcom/core/services/sentry/sentry.logger';\nimport { finShare } from '@fcom/rx';\nimport { unsubscribe } from '@fcom/core/utils';\n\nimport { PersonalizationSession } from '../interfaces/tracking.interface';\n\nconst SESSION_KEY = 'personalization-session';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PersonalizationTrackingService implements OnDestroy {\n readonly loginStatus$: Observable<LoginStatus>;\n readonly profile$: Observable<Profile>;\n readonly profileType$: Observable<ProfileType>;\n\n private subscriptions = new Subscription();\n\n constructor(\n private store$: Store<AppState>,\n private storageService: StorageService,\n private sentryLogger: SentryLogger\n ) {\n this.loginStatus$ = this.store$.pipe(\n loginStatus(),\n filter((status) => status === LoginStatus.NOT_LOGGED_IN || status === LoginStatus.LOGGED_IN),\n finShare()\n );\n this.profile$ = this.store$.pipe(profile(), finShare());\n this.profileType$ = this.store$.pipe(profileType(), finShare());\n }\n\n init(): void {\n this.subscriptions.add(\n combineLatest([this.profile$, this.profileType$]).subscribe(([memberProfile, memberProfileType]) => {\n this.storeSession(memberProfile, memberProfileType);\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n isNotLoggedInFPlusMember(): Observable<boolean> {\n return this.loginStatus$.pipe(\n map((status: LoginStatus) => {\n const storedSession = this.getStoredSession();\n if (status === LoginStatus.NOT_LOGGED_IN && storedSession && storedSession.profileType === ProfileType.FPLUS) {\n return true;\n }\n return false;\n })\n );\n }\n\n clearSession(): void {\n this.storageService.LOCAL.remove(SESSION_KEY);\n }\n\n private storeSession(memberProfile: Profile, memberProfileType: ProfileType): void {\n const session: PersonalizationSession = {\n startTime: Date.now(),\n profileType: memberProfileType,\n tier: memberProfile.tier,\n memberNumber: memberProfile.memberNumber,\n };\n\n this.storageService.LOCAL.set(SESSION_KEY, JSON.stringify(session));\n }\n\n private getStoredSession(): PersonalizationSession {\n const session = this.storageService.LOCAL.get(SESSION_KEY);\n let parsed: PersonalizationSession;\n if (session) {\n try {\n parsed = JSON.parse(session);\n } catch {\n this.sentryLogger.warn('Failed to parse personalization session from storage');\n }\n }\n return parsed;\n }\n}\n\n@Injectable()\nexport class NoopPersonalizationTrackingService {\n init(): void {}\n isNotLoggedInFPlusMember(): Observable<boolean> {\n return of(false);\n }\n clearTracking(): void {}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { isUndefined, isNull } from '@fcom/core/utils';\n\nexport const NBSP = '\\u00A0';\n\n@Pipe({\n name: 'finEmpty',\n})\nexport class EmptyPipe implements PipeTransform {\n transform(input: string, replaceWith: any = NBSP): string {\n if (isUndefined(input) || isNull(input) || input === '') {\n return replaceWith;\n }\n return input;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { JsConfig } from '../../interfaces';\nimport { jsConfig } from './jsConfig';\n\n/**\n * Reads config from global variable\n */\n@Injectable()\nexport class ConfigService {\n jsConfig: JsConfig = jsConfig;\n\n get cmsUrl(): string {\n return this.jsConfig.cmsUrl;\n }\n\n get sendLoginTokenForUrls(): string[] {\n return [\n this.jsConfig.offersUrl,\n this.jsConfig.cartUrl,\n this.jsConfig.orderUrl,\n this.jsConfig.loyaltyServices.legacy.apiProfileUrl,\n `${this.jsConfig.loyaltyServices.legacy.apiUrl}/profile`,\n `${this.jsConfig.oneUpgradeRootUrl}/members`,\n `${this.jsConfig.oneUpgradeRootUrl}/v2/members`,\n ];\n }\n\n get useDapiUATForUrls(): string[] {\n return [\n this.jsConfig.offersUrl,\n this.jsConfig.instantSearchUrl,\n this.jsConfig.cartUrl,\n this.jsConfig.orderUrl,\n this.jsConfig.servicesUrl,\n ];\n }\n\n get sendApiGwKeyForUrls(): string[] {\n return [\n this.jsConfig.loyaltyServices.memberService.gauthUrl,\n this.jsConfig.loyaltyServices.legacy.apiProfileUrl,\n this.jsConfig.loyaltyServices.legacy.apiUrl,\n this.jsConfig.loyaltyServices.legacy.loyaltyMemberUrl,\n ];\n }\n\n get cfg(): JsConfig {\n return this.jsConfig;\n }\n\n get ondMarketingOffersUrl(): string {\n return this.jsConfig.ondMarketingOffersUrl;\n }\n\n // Do not add new getters for direct attributes of jsConfig, just use get cfg() instead\n // It is ok to add getters for child attributes of jsConfig attributes.\n}\n","<button\n *ngIf=\"!href\"\n (click)=\"onClick($event)\"\n [type]=\"type\"\n class=\"relative\"\n [class]=\"theme\"\n [disabled]=\"disabled\"\n [attr.title]=\"title\"\n [attr.aria-label]=\"aria.label\"\n [attr.aria-describedby]=\"aria && aria.describedby\"\n [attr.aria-controls]=\"aria && aria.controls\"\n [attr.role]=\"'button'\"\n [attr.aria-disabled]=\"aria && aria.disabled\"\n [attr.aria-hidden]=\"aria && aria.hidden\"\n>\n <ng-container\n *ngTemplateOutlet=\"\n iconTemplate;\n context: {\n icon: icon,\n size: size,\n title: title,\n }\n \"\n >\n </ng-container>\n</button>\n\n<a\n *ngIf=\"href\"\n class=\"relative flex--inline\"\n [finLink]=\"href\"\n [external]=\"externalLink\"\n [openInNewTab]=\"openInNewTab\"\n [class]=\"theme\"\n [attr.title]=\"title\"\n [attr.aria-label]=\"aria.label\"\n [attr.aria-describedby]=\"aria && aria.describedby\"\n [attr.aria-controls]=\"aria && aria.controls\"\n [attr.role]=\"'link'\"\n [attr.aria-disabled]=\"aria && aria.disabled\"\n [attr.aria-hidden]=\"aria && aria.hidden\"\n (beforeNavigation)=\"onClick($event)\"\n>\n <ng-container\n *ngTemplateOutlet=\"\n iconTemplate;\n context: {\n icon: icon,\n size: size,\n title: title,\n }\n \"\n >\n </ng-container>\n</a>\n\n<ng-template #iconTemplate let-icon=\"icon\" let-size=\"size\" let-text=\"title\">\n <span class=\"flex\" [class]=\"size\">\n <fcom-icon\n [category]=\"icon.category\"\n [name]=\"icon.name\"\n [ngClass]=\"{\n 'icon-small': size === IconButtonSize.SMALL,\n 'icon-medium': size === IconButtonSize.MEDIUM || size === IconButtonSize.LARGE,\n }\"\n >\n </fcom-icon>\n </span>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { type IconSet } from '../../icons';\nimport { type AriaOptions } from '../../interfaces';\nimport { IconButtonSize, IconButtonTheme } from './enums';\nimport { ButtonType } from '../button';\n\n@Component({\n selector: 'fcom-icon-button',\n templateUrl: './icon-button.component.html',\n styleUrls: ['./icon-button.component.scss', '../buttons-shared-styles.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconButtonComponent {\n /**\n * The size of the button, currently 3 static sizes\n */\n @Input() size: IconButtonSize = IconButtonSize.MEDIUM;\n\n /**\n * There are 8 themes available right now that renders different backgrounds, font colors and borders\n */\n @Input() theme: IconButtonTheme = IconButtonTheme.LIGHT_PRIMARY_NORDIC_BLUE;\n\n /**\n * An icon to include, with its category and name\n */\n @Input({ required: true }) icon: IconSet;\n /**\n * The aria tags that must be added to a button or link\n */\n @Input({ required: true }) aria: AriaOptions = {};\n\n /**\n * Whether the button should be disabled or not\n */\n @Input() disabled = false;\n\n /**\n * The pre-translated hover text to display\n */\n @Input() title?: string;\n\n /**\n * If button should render as an a tag, then pass in the url\n */\n @Input() href?: string;\n\n /**\n * If link, should it open in a new tab\n */\n @Input() openInNewTab?: boolean;\n\n /**\n * If link, is it external\n */\n @Input() externalLink?: boolean;\n\n /**\n * The type of button, for example \"button\" or \"submit\"\n */\n @Input() type: ButtonType = ButtonType.BUTTON;\n\n @Output() clickBtn = new EventEmitter<Event>();\n\n public readonly IconButtonSize = IconButtonSize;\n public readonly IconButtonTheme = IconButtonTheme;\n\n onClick(event: Event): void {\n if (this.disabled || this.aria.disabled) {\n event.preventDefault();\n return;\n }\n\n this.clickBtn.emit(event);\n }\n}\n","<section\n [attr.data-testid]=\"sectionTestId$ | async\"\n [ngClass]=\"{\n 'mr-large-b': (text$ | async) && (layoutVariant$ | async) !== 'section-two-thirds-right',\n 'mr-xlarge-b': (text$ | async) && (layoutVariant$ | async) !== 'section-full-width',\n }\"\n>\n <div\n class=\"image-container\"\n [ngClass]=\"{\n 'pr-large-b':\n (layoutVariant$ | async) === 'section-two-thirds-right' &&\n !(this.subjectTaxonomyTags$ | async).includes('cmstyle-image-container-no-padding'),\n 'pr-small-b': (layoutVariant$ | async) !== 'section-two-thirds-right',\n }\"\n *ngIf=\"image$ | async as img\"\n >\n <cms-text-on-image [content$]=\"content$\" [noText]=\"true\"></cms-text-on-image>\n </div>\n <ng-container *ngIf=\"title$ | async as t\">\n <ng-container [ngSwitch]=\"headerLevel\">\n <h1 *ngSwitchCase=\"1\" class=\"teaser-title\" [class.pr-clear-b]=\"icon$ | async\">{{ t }}</h1>\n <h3 *ngSwitchCase=\"3\" class=\"teaser-title\" [class.pr-clear-b]=\"icon$ | async\">{{ t }}</h3>\n <h4 *ngSwitchCase=\"4\" class=\"teaser-title\" [class.pr-clear-b]=\"icon$ | async\">{{ t }}</h4>\n <h2 *ngSwitchDefault class=\"teaser-title\" [class.pr-clear-b]=\"icon$ | async\">{{ t }}</h2>\n </ng-container>\n </ng-container>\n <div *ngIf=\"icon$ | async as i\" class=\"teaser-icon-container\">\n <img [src]=\"i\" [alt]=\"title$ | async | finEmpty\" class=\"grow\" />\n </div>\n <div\n class=\"teaser-text\"\n [ngClass]=\"{\n 'mr-xxlarge-b': (layoutVariant$ | async) === 'section-two-thirds-right',\n 'mr-large-b': (layoutVariant$ | async) !== 'section-two-thirds-right',\n }\"\n [innerHTML]=\"text$ | async | finSafe: 'html'\"\n ></div>\n <div\n class=\"teaser-text ingredients\"\n *ngIf=\"ingredients$ | async\"\n [innerHTML]=\"ingredients$ | async | finSafe: 'html'\"\n ></div>\n</section>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { isNotBlank } from '@fcom/core/utils';\nimport { CmsTeaser, CmsImageData, CmsMenuFoodItem } from '@fcom/core-api';\nimport { finShare, safeMap } from '@fcom/rx';\nimport { toKebabCase } from '@fcom/ui-components';\n\nconst DEFAULT_HEADER_LEVEL = 2;\n\n@Component({\n selector: 'cms-teaser',\n templateUrl: './cms-teaser.component.html',\n styleUrls: ['./cms-teaser.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsTeaserComponent implements OnInit {\n @Input()\n content$: Observable<CmsTeaser | CmsMenuFoodItem>;\n @Input()\n showIcon = false;\n @Input()\n headerLevel: number = DEFAULT_HEADER_LEVEL;\n\n title$: Observable<string>;\n text$: Observable<string>;\n icon$: Observable<string>;\n ingredients$: Observable<string>;\n image$: Observable<CmsImageData>;\n layoutVariant$: Observable<string>;\n sectionTestId$: Observable<string> | null = null;\n subjectTaxonomyTags$: Observable<string[]>;\n\n ngOnInit(): void {\n const shared$ = this.content$.pipe(finShare());\n this.sectionTestId$ = shared$.pipe(\n safeMap((t: CmsTeaser): string | null => {\n const sectionId = toKebabCase(t.teaserTitle);\n return sectionId ? `section-${sectionId}` : null;\n }),\n filter(isNotBlank)\n );\n this.title$ = shared$.pipe(\n safeMap((t: CmsTeaser) => t.teaserTitle),\n filter(isNotBlank)\n );\n this.text$ = shared$.pipe(safeMap((t: CmsTeaser) => t.teaserText));\n this.icon$ = shared$.pipe(\n safeMap((t: CmsTeaser) => t.iconUrl),\n filter(isNotBlank),\n filter(() => this.showIcon)\n );\n this.image$ = shared$.pipe(safeMap((t: CmsTeaser) => t.picture));\n this.subjectTaxonomyTags$ = shared$.pipe(safeMap((t: CmsTeaser) => t.subjectTaxonomyTags));\n this.layoutVariant$ = shared$.pipe(\n safeMap((t: CmsTeaser) => (t.viewTypeName || 'section-two-thirds-right').split('--')[0])\n ); // @todo: Split can be removed once the layoutvariant split into tags happens in core media. Also still need to fallback this in case of 'null'\n\n /**\n * @todo: Meal info shown as teaser is first additional content type here.\n * If more types are starting to clutter this component with specific fields,\n * refactor them all into own components.\n */\n this.ingredients$ = shared$.pipe(safeMap((t: CmsMenuFoodItem) => t.ingredients));\n }\n}\n","import { createErrorClass } from './createErrorClass';\n\nexport interface ObjectUnsubscribedError extends Error {}\n\nexport interface ObjectUnsubscribedErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): ObjectUnsubscribedError;\n}\n\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nexport const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass(\n (_super) =>\n function ObjectUnsubscribedErrorImpl(this: any) {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n }\n);\n","import { Operator } from './Operator';\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { Observer, SubscriptionLike, TeardownLogic } from './types';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A Subject is a special type of Observable that allows values to be\n * multicasted to many Observers. Subjects are like EventEmitters.\n *\n * Every Subject is an Observable and an Observer. You can subscribe to a\n * Subject, and you can call next to feed values as well as error and complete.\n */\nexport class Subject<T> extends Observable<T> implements SubscriptionLike {\n closed = false;\n\n private currentObservers: Observer<T>[] | null = null;\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n observers: Observer<T>[] = [];\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n isStopped = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n hasError = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n thrownError: any = null;\n\n /**\n * Creates a \"subject\" by basically gluing an observer to an observable.\n *\n * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion.\n */\n static create: (...args: any[]) => any = <T>(destination: Observer<T>, source: Observable<T>): AnonymousSubject<T> => {\n return new AnonymousSubject<T>(destination, source);\n };\n\n constructor() {\n // NOTE: This must be here to obscure Observable's constructor.\n super();\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n lift<R>(operator: Operator<T, R>): Observable<R> {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator as any;\n return subject as any;\n }\n\n /** @internal */\n protected _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n\n next(value: T) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n\n error(err: any) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.error(err);\n }\n }\n });\n }\n\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift()!.complete();\n }\n }\n });\n }\n\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null!;\n }\n\n get observed() {\n return this.observers?.length > 0;\n }\n\n /** @internal */\n protected _trySubscribe(subscriber: Subscriber<T>): TeardownLogic {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber<T>): Subscription {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n\n /** @internal */\n protected _innerSubscribe(subscriber: Subscriber<any>) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n\n /** @internal */\n protected _checkFinalizedStatuses(subscriber: Subscriber<any>) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n\n /**\n * Creates a new Observable with this Subject as the source. You can do this\n * to create custom Observer-side logic of the Subject and conceal it from\n * code that uses the Observable.\n * @return Observable that this Subject casts to.\n */\n asObservable(): Observable<T> {\n const observable: any = new Observable<T>();\n observable.source = this;\n return observable;\n }\n}\n\nexport class AnonymousSubject<T> extends Subject<T> {\n constructor(\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n public destination?: Observer<T>,\n source?: Observable<T>\n ) {\n super();\n this.source = source;\n }\n\n next(value: T) {\n this.destination?.next?.(value);\n }\n\n error(err: any) {\n this.destination?.error?.(err);\n }\n\n complete() {\n this.destination?.complete?.();\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber<T>): Subscription {\n return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION;\n }\n}\n","import { isFunction } from \"./isFunction\";\n\n/**\n * Tests to see if the object is \"thennable\".\n * @param value the object to test\n */\nexport function isPromise(value: any): value is PromiseLike<any> {\n return isFunction(value?.then);\n}\n","<ng-template #content>\n {{ [translationPrefix, 'label'].join('.') | finLocalization }}\n <span *ngIf=\"required\"> *</span>\n</ng-template>\n\n<ng-template #contentWithLink>\n <div [innerHtml]=\"innerHtml | finSafe: 'html'\" class=\"font-body-1\"></div>\n</ng-template>\n\n<label [formGroup]=\"group\" [class]=\"containerClass\" [attr.data-testid]=\"labelDataTestId\">\n <input\n #inputElement\n type=\"checkbox\"\n [attr.name]=\"name\"\n [formControlName]=\"modelName\"\n (focus)=\"focus.emit([translationPrefix, 'info'].join('.'))\"\n (blur)=\"blur.emit([translationPrefix, 'info'].join('.'))\"\n (change)=\"checkboxChange.emit(inputElement.checked)\"\n class=\"is-vishidden\"\n />\n <span\n [ngSwitch]=\"group.get(modelName).value === true\"\n class=\"checkbox-icon nordic-blue-900-text\"\n aria-hidden=\"true\"\n [class.block]=\"block\"\n >\n <fcom-icon\n *ngSwitchCase=\"true\"\n class=\"icon-medium\"\n [dataTestId]=\"'icon-' + SvgLibraryIcon.CHECKBOX_SELECTED\"\n [name]=\"SvgLibraryIcon.CHECKBOX_SELECTED\"\n ></fcom-icon>\n <fcom-icon\n *ngSwitchDefault\n class=\"icon-medium\"\n [dataTestId]=\"'icon-' + SvgLibraryIcon.CHECKBOX_UNSELECTED\"\n [name]=\"SvgLibraryIcon.CHECKBOX_UNSELECTED\"\n ></fcom-icon>\n </span>\n <span [ngSwitch]=\"useLabelContent\">\n <ng-content *ngSwitchCase=\"true\"></ng-content>\n <span *ngSwitchDefault [class]=\"labelClass\">\n <div *ngIf=\"!innerHtml; then content; else contentWithLink\"></div>\n </span>\n </span>\n</label>\n\n<div [class]=\"errorClasses\" [class.error-label]=\"true\" *ngIf=\"errorKey\">\n <span class=\"error-900-text font-body-2\">\n {{ errorKey | finLocalization }}\n </span>\n</div>\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n PLATFORM_ID,\n} from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Subscription } from 'rxjs';\n\nimport { unsubscribe } from '@fcom/core/utils';\nimport { HtmlString } from '@fcom/core-api/interfaces';\n\n@Component({\n selector: 'fin-input-checkbox',\n templateUrl: './input-checkbox.component.html',\n styleUrls: ['./input-checkbox.component.scss'],\n})\nexport class InputCheckboxComponent implements OnInit, OnDestroy {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n @Input()\n group: UntypedFormGroup;\n @Input()\n modelName: string;\n @Input()\n name: string;\n @Input()\n translationPrefix: string;\n @Input()\n block = false;\n @Input()\n useLabelContent = false;\n @Input()\n labelClass = 'font-body-1';\n @Input()\n hideError = false;\n @Input()\n errorClasses = '';\n @Input()\n containerClass = '';\n @Input()\n innerHtml: HtmlString;\n @Input()\n required: boolean;\n @Input()\n labelDataTestId: string;\n\n @Output()\n focus: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n blur: EventEmitter<string> = new EventEmitter<string>();\n @Output()\n checkboxChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ViewChild('inputElement', { static: true })\n inputElement: ElementRef;\n\n errorKey: string;\n subscription: Subscription;\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platform: object\n ) {}\n\n ngOnInit(): void {\n const control = this.group.get(this.modelName);\n\n this.subscription = control.valueChanges.subscribe((s) => {\n if (isPlatformBrowser(this.platform) && this.inputElement.nativeElement !== this.document.activeElement) {\n this.inputElement.nativeElement.value = s;\n }\n });\n this.subscription.add(\n control.statusChanges.subscribe(() => {\n this.errorKey =\n !this.hideError && control.invalid\n ? [this.translationPrefix, Object.keys(control.errors)[0]].join('.')\n : undefined;\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n}\n","export const COMMON_BOOKING_FEATURE_KEY = 'commonBooking';\n","import { type FormGroup } from '@angular/forms';\n\nimport { SelectOption } from '@fcom/common/interfaces';\nimport { type Location } from '@fcom/core-api';\nimport { ProfileTier, type LoginAddress, type Profile } from '@fcom/core-api/login';\nimport { type TypedFormGroup } from '@fcom/service-forms';\nimport { replaceExtraSpaces, replaceNonBreakingSpaces, trimContent } from '@fcom/ui-components';\n\nexport const formatRoute = (origin: Location | undefined, destination: Location | undefined): string => {\n if (origin?.locationCode && destination?.locationCode) {\n return `${origin.locationCode} - ${destination.locationCode}`;\n }\n return '';\n};\n\n/**\n * Replaces non-breaking spaces of a string with regular spaces\n * and removes extra spaces from the beginning and end of the string.\n */\nexport const formatUserInput = (input: string | undefined): string =>\n input ? trimContent(replaceExtraSpaces(replaceNonBreakingSpaces(input))) : '';\n\nexport const parsePhoneNumber = (profile: Profile | undefined): string => {\n if (!profile?.parsedMobilePhone?.countryCode || !profile?.parsedMobilePhone?.nationalNumber) {\n return '';\n }\n return `+${profile.parsedMobilePhone.countryCode}${profile.parsedMobilePhone.nationalNumber}`;\n};\n\nexport const parseCountryCode = (regionCodes: string[] | undefined, countryCode: number | undefined): string => {\n if (!regionCodes?.length || !countryCode) {\n return '';\n }\n\n const [regionCode] = regionCodes;\n return `${regionCode}|${countryCode}`;\n};\n\nexport const buildAddress = (address: LoginAddress | undefined): string => {\n if (!address) {\n return '';\n }\n let result = '';\n if (address.streetAddress && address.streetAddress !== '-') {\n result += address.streetAddress + '\\n';\n }\n if (address.postalCode) {\n result += address.postalCode + ' ';\n }\n if (address.city && address.city !== '-') {\n result += address.city;\n }\n\n return result;\n};\n\nexport const CUSTOMER_SUPPORT_LANGUAGES = ['ZH', 'EN', 'ET', 'FI', 'FR', 'DE', 'IT', 'JA', 'KO', 'RU', 'ES', 'SV'];\n\nexport const BOOKING_CLASSES = [\n 'A',\n 'B',\n 'C',\n 'D',\n 'E',\n 'F',\n 'G',\n 'H',\n 'I',\n 'J',\n 'K',\n 'L',\n 'M',\n 'N',\n 'O',\n 'P',\n 'Q',\n 'R',\n 'S',\n 'T',\n 'U',\n 'V',\n 'W',\n 'X',\n 'Y',\n 'Z',\n];\n\nexport const bookingClassSelectOptions: SelectOption[] = BOOKING_CLASSES.map((bookingClass) => ({\n name: bookingClass,\n value: bookingClass,\n}));\n\nexport const mapProfileTier = (tier: ProfileTier): string => {\n switch (tier) {\n case ProfileTier.BASIC:\n return 'basic';\n case ProfileTier.SILVER:\n return 'silver';\n case ProfileTier.GOLD:\n return 'gold';\n case ProfileTier.PLATINUM:\n return 'platinum';\n case ProfileTier.LUMO:\n return 'platinumLumo';\n default:\n return '';\n }\n};\n\nexport const asTypedFormGroup = (formGroup: FormGroup): TypedFormGroup => {\n return formGroup as TypedFormGroup;\n};\n","export enum LoaderType {\n FULL_SCREEN,\n EMBEDDED,\n INLINE,\n INLINE_TEXT,\n}\n","export interface Consent {\n // TODO: since we are using dynamic values for this now, we should aim to remove the enum from the models and if needed to use it only for testing purposes\n consentTextId: ConsentTextId;\n effectiveFrom: number;\n text: string;\n textHash: string;\n consentStatus: ConsentStatus;\n reConsentRequired?: boolean;\n}\n\nexport interface ConsentGroup {\n fplusMember: string;\n consentGroup: string;\n introductionText: string | null;\n afterwordText: string | null;\n profileAfterwordText: string | null;\n consents: Consent[];\n}\n\nexport interface ConsentTextsGroup {\n consentGroup: string;\n locale: string;\n introductionText: string | null;\n afterwordText: string | null;\n profileAfterwordText: string | null;\n consentTexts: ConsentText[];\n}\n\nexport interface ConsentText {\n consentTextId: string;\n effectiveFrom: number;\n text: string;\n textHash: string;\n}\n\nexport interface ConsentData {\n [key: string]: boolean;\n}\n\nexport enum ConsentStatus {\n ACCEPTED = 'accepted',\n DECLINED = 'declined',\n WITHDRAWN = 'withdrawn',\n}\n\nexport enum ConsentTextId {\n SMS_MESSAGING = 'fplus-marketing-sms-messaging',\n THIRD_PARTY_OFFERS = 'fplus-marketing-third-party-offers',\n MEMBER_OFFERS = 'fplus-marketing-member-offers',\n FLIGHT_OFFERS = 'fplus-marketing-flight-offers',\n COOKIE_PERSONALIZATION = 'f-cookies-personalization',\n COOKIE_ANALYTICS = 'f-cookies-analytics',\n COOKIE_ADVERTISING = 'f-cookies-advertising',\n NOT_REAL_CONSENT_VALUE = 'not-real-consentValue',\n}\n","import { BoundType } from '@fcom/dapi/interfaces';\n\nexport enum DataCloudFlightSelection {\n AIRCRAFT = 'aircraft',\n BOUND_TYPE = 'boundType',\n CURRENCY_CODE = 'currencyCode',\n FARE_FAMILY_NAME = 'fareFamilyName',\n FLIGHT_NUMBER = 'flightNumber',\n PAX_AMOUNT = 'paxAmount',\n POINTS = 'points',\n PRICE = 'price',\n PURCHASE_FLOW = 'purchaseFlow',\n ROUTE = 'route',\n TRAVEL_CLASS = 'travelClass',\n}\n\nexport interface DataCloudFlightSelectionData {\n [DataCloudFlightSelection.AIRCRAFT]: string;\n [DataCloudFlightSelection.BOUND_TYPE]: BoundType;\n [DataCloudFlightSelection.CURRENCY_CODE]: string;\n [DataCloudFlightSelection.FARE_FAMILY_NAME]: string;\n [DataCloudFlightSelection.FLIGHT_NUMBER]: string;\n [DataCloudFlightSelection.PAX_AMOUNT]: string;\n [DataCloudFlightSelection.POINTS]: string;\n [DataCloudFlightSelection.PRICE]: string;\n [DataCloudFlightSelection.PURCHASE_FLOW]: string;\n [DataCloudFlightSelection.ROUTE]: string;\n [DataCloudFlightSelection.TRAVEL_CLASS]: string;\n}\n\nexport interface DataCloudIdentityData {\n firstName: string;\n lastName: string;\n emailAddress: string;\n countryCode: string;\n phoneNumber: string;\n memberProgram: string;\n memberNumber: string;\n}\n","export enum DeepLinkSource {\n OLD_COM = 'old-com',\n EMAIL = 'email',\n FCOM = 'fcom',\n}\n","export interface ImageData {\n /**\n * Data url (base64) for the low-resolution version of the picture\n */\n thumbnailDataUrl?: string;\n\n /**\n * Url to the full size image. If not present, only the blurred thumbnail\n * will be shown\n */\n fullSizeUrl?: string;\n}\n\nexport interface SrcAndWidth {\n src: string;\n width: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport interface ResponsiveImageData {\n fallbackSrc: string;\n thumbnailSrc: string;\n srcSet: SrcAndWidth[];\n}\n\nexport type AspectRatioString = '1x1' | '4x3' | '3x4' | '16x9' | '21x9';\nexport type CmsAspectRatio =\n | 'portrait_ratio1x1'\n | 'landscape_ratio4x3'\n | 'portrait_ratio3x4'\n | 'landscape_ratio16x9'\n | 'landscape_ratio21x9';\n\nexport const ASPECT_RATIO_PROPERTY_MAP: { readonly [aspectRatioString in AspectRatioString]: CmsAspectRatio } = {\n '1x1': 'portrait_ratio1x1',\n '4x3': 'landscape_ratio4x3',\n '3x4': 'portrait_ratio3x4',\n '16x9': 'landscape_ratio16x9',\n '21x9': 'landscape_ratio21x9',\n};\n\n/**\n * This is the width that is used for devices not supporting srcSet attribute. Found on every crop ratio.\n */\nexport const FALLBACK_WIDTH = 768;\n\nexport const IMAGE_WIDTHS = [144, 300, 320, 600, 608, 768, 1024, 1200, 1920];\n","export const onOpenGtmEvent = 'basic-info';\n\nexport interface CheckinInputData {\n familyName: string;\n bookingRef?: string;\n eTicketNumber?: string;\n}\n\nexport type JoinFinnairPlusRequestData = {\n firstName: string;\n lastName: string;\n email: string;\n dateOfBirth: string;\n gender: string;\n phoneNumber?: string;\n password?: string;\n /** Format: language | language-COUNTRYCODE */\n locale: string;\n countryCode: string;\n agreements?: boolean;\n enrollmentChannel: string;\n marketingPermissions?: Record<string, boolean>;\n consent?: boolean;\n guardianName?: string;\n guardianEmail?: string;\n guardianPhoneNumber?: string;\n guardianMemberNumber?: string;\n};\n\nexport type JoinFinnairPlusResponseData = {\n memberNumber: string;\n status: {\n message: StatusCode;\n };\n};\n\nexport type VerifyFinnairPlusResponseData = {\n status: {\n message: StatusCode;\n };\n};\n\nexport enum StatusCode {\n OK = 'OK',\n ERROR = 'ERROR',\n}\n\nexport type JoinFinnairPlusErrorResponseData = {\n reason?: string;\n status: {\n message?: StatusCode;\n fieldErrors?: { errorMessage: string }[];\n };\n};\n\nexport enum VerifyStatusCode {\n OK = 'OK',\n EXPIRED = 'EXPIRED',\n ERROR = 'ERROR',\n}\n\nexport type VerifyAccountTokenResponseData = {\n status: {\n message: VerifyStatusCode;\n };\n reason: string;\n};\n","import { InjectionToken } from '@angular/core';\n\nexport enum TestVariant {\n NOT_IN_TEST = 'NOT_IN_TEST',\n A = 'A',\n B = 'B',\n C = 'C',\n D = 'D',\n E = 'E',\n F = 'F',\n G = 'G',\n H = 'H',\n I = 'I',\n J = 'J',\n}\n\nexport const akamaiSegmentToNumericMap = {\n '30e0247b34712ccb': 0,\n '814a48718cc39747': 1,\n '9536f017b1cc3522': 2,\n '45b7ce8935901775': 3,\n '7b0b9ab7e196acc': 4,\n // NEW SEGMENTS\n bd453ce7a096d47e: 0,\n '5033c31fed962bd6': 1,\n d5bc0a75792578c4: 2,\n '876d67a118c8cad4': 3,\n '87187d3b21f3c199': 4,\n};\n\nexport enum MultivariateTestId {\n ENHANCED_CALENDAR_STYLING = 'booking-widget/2025/calendar-stylings-and-scroll/trello-12721',\n NEW_FLIGHT_SELECTION_STYLE = 'flight-selection/2025/new-styles-and-autoscroll/trello-12704',\n FRONT_PAGE_PERSONALISATION = 'front-page/2025/front-page-personalisation/trello-12838',\n NEW_PRODUCT_CARDS = 'travel-extras/2025/new-travel-extra-cards/trello-12848',\n // This is a workaround to hide things from playwright regression tests in master\n REGRESSION_TEST_WORKAROUND = 'this-is-a-workaround-to-avoid-running-playwright-regression-tests-against-pending-changes-in-master',\n FLIGHT_SELECTION_FILTERS = 'flight-selection/2025/new-filters-and-sorting/trello-12955',\n}\n\nexport interface TestVariantWithId {\n variant: TestVariant;\n id: MultivariateTestId;\n}\n\nexport type Segment = 0 | 1 | 2 | 3 | 4;\n\nexport interface UserVariantSegment {\n segment: Segment;\n source: VariantSource;\n}\n\nexport type SegmentResolver = (segment: Segment) => TestVariant;\n\nexport enum VariantSource {\n AKAMAI = 'akamai',\n RANDOMIZED = 'randomized',\n MEMBER = 'member',\n MANUAL = 'manual',\n}\n\ntype MultivariateTestSegmentConfig = Partial<{ [K in TestVariant]: Segment[] }>;\n\nexport interface MultivariateTestConfiguration {\n id: MultivariateTestId;\n /**\n * Do we need to inject segment to html body before the Angular app is bootstrapped on client side\n * When this is flagged we need to have both variant somehow displayed at the same time with css\n */\n requiresInjectScript: boolean;\n segments: MultivariateTestSegmentConfig;\n enabledInAllEnvs: boolean;\n includeCountries?: string[];\n}\n\nexport const MANUAL_AB_SEGMENT_COOKIE = 'manual_ab_segment';\nexport const AKAMAI_AB_SEGMENT_COOKIE = 'akamai_ab_segment';\n\nexport interface MultivariateTestCookies {\n [MANUAL_AB_SEGMENT_COOKIE]: string;\n [AKAMAI_AB_SEGMENT_COOKIE]: string;\n}\n\nexport const MULTIVARIATE_TEST_COOKIES: InjectionToken<MultivariateTestCookies> = new InjectionToken(\n 'MultivariateTestCookies'\n);\n","export interface Airline {\n code: string;\n name: string;\n}\n\nexport enum Direction {\n LEFT = 'left',\n RIGHT = 'right',\n}\n","import { CustomIcon } from '@finnairoyj/fcom-ui-styles/enums';\n\nimport { CmsTaxonomyPicture } from '@fcom/core-api/interfaces';\nimport { ProfileTier } from '@fcom/core-api/login';\n\nexport const TIER_LIMITS = {\n [ProfileTier.SILVER]: 30000,\n [ProfileTier.GOLD]: 80000,\n [ProfileTier.PLATINUM]: 150000,\n [ProfileTier.LUMO]: 450000,\n};\n\nexport const AVIOS_TIER_LIMITS = {\n [ProfileTier.SILVER]: 15_000,\n [ProfileTier.GOLD]: 45_000,\n [ProfileTier.PLATINUM]: 80_000,\n [ProfileTier.LUMO]: 300_000,\n};\n\nexport const TIER_FLIGHT_LIMITS = {\n [ProfileTier.SILVER]: 20,\n [ProfileTier.GOLD]: 46,\n [ProfileTier.PLATINUM]: 76,\n [ProfileTier.LUMO]: 150,\n};\n\nexport const LIFETIME_TIER_TEXT = 'Lifetime';\n\nexport const LIFETIME_TIER_LIMITS = {\n [ProfileTier.GOLD]: 3000000,\n [ProfileTier.PLATINUM]: 5000000,\n};\n\nexport const AVIOS_LIFETIME_TIER_LIMITS = {\n [ProfileTier.GOLD]: 2_000_000,\n [ProfileTier.PLATINUM]: 3_300_000,\n};\n\nexport enum TierState {\n MAINTAIN = 'maintain',\n GAIN = 'gain',\n HIGHEST = 'highest',\n // hold tier state is no longer offered to members and can be ignored.\n // The statusHold property in the member profile still exists,\n // along with the back-end implementation for it in case of a future use case.\n // HOLD = 'hold',\n}\n\nexport enum TierName {\n BASIC = 'Basic',\n SILVER = 'Silver',\n GOLD = 'Gold',\n PLATINUM = 'Platinum',\n LUMO = 'Platinum Lumo',\n JUNIOR = 'Junior',\n}\n\nexport type TierDataMap = Record<\n ProfileTier[number],\n {\n cardIcon?: CustomIcon;\n membership: string;\n oneworldLogo: CmsTaxonomyPicture;\n tierKey: string;\n tierName: TierName;\n }\n>;\n\nexport const TIER_DATA_MAP: TierDataMap = {\n [ProfileTier.BASIC]: {\n membership: 'plus.dashboard.membership.basic',\n cardIcon: CustomIcon.PLUS_CARD_BASIC,\n oneworldLogo: CmsTaxonomyPicture.FINNAIR_ONEWORLD_LOGO,\n tierName: TierName.BASIC,\n tierKey: 'basic',\n },\n [ProfileTier.SILVER]: {\n membership: 'plus.dashboard.membership.silver',\n cardIcon: CustomIcon.PLUS_CARD_SILVER,\n oneworldLogo: CmsTaxonomyPicture.FINNAIR_ONEWORLD_GEM_RUBY_LOGO,\n tierName: TierName.SILVER,\n tierKey: 'silver',\n },\n [ProfileTier.GOLD]: {\n membership: 'plus.dashboard.membership.gold',\n cardIcon: CustomIcon.PLUS_CARD_GOLD,\n oneworldLogo: CmsTaxonomyPicture.FINNAIR_ONEWORLD_GEM_SAPPHIRE_LOGO,\n tierName: TierName.GOLD,\n tierKey: 'gold',\n },\n [ProfileTier.PLATINUM]: {\n membership: 'plus.dashboard.membership.platinum',\n cardIcon: CustomIcon.PLUS_CARD_PLATINUM,\n oneworldLogo: CmsTaxonomyPicture.FINNAIR_ONEWORLD_GEM_EMERALD_LOGO,\n tierName: TierName.PLATINUM,\n tierKey: 'platinum',\n },\n [ProfileTier.LUMO]: {\n membership: 'plus.dashboard.membership.lumo',\n cardIcon: CustomIcon.PLUS_CARD_LUMO,\n oneworldLogo: CmsTaxonomyPicture.FINNAIR_ONEWORLD_GEM_EMERALD_LOGO,\n tierName: TierName.LUMO,\n tierKey: 'lumo',\n },\n [ProfileTier.JUNIOR]: {\n membership: 'plus.dashboard.membership.junior',\n cardIcon: CustomIcon.PLUS_CARD_JUNIOR,\n oneworldLogo: CmsTaxonomyPicture.FINNAIR_ONEWORLD_LOGO,\n tierName: TierName.JUNIOR,\n tierKey: 'junior',\n },\n};\n","import { createErrorClass } from './createErrorClass';\n\nexport interface EmptyError extends Error {}\n\nexport interface EmptyErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (): EmptyError;\n}\n\n/**\n * An error thrown when an Observable or a sequence was queried but has no\n * elements.\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link single}\n * @see {@link firstValueFrom}\n * @see {@link lastValueFrom}\n */\nexport const EmptyError: EmptyErrorCtor = createErrorClass(\n (_super) =>\n function EmptyErrorImpl(this: any) {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n }\n);\n","import { Component, Input, OnInit } from '@angular/core';\n\nimport { NEVER, Observable, of } from 'rxjs';\nimport { map, tap, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsCollection, CmsOffer } from '@fcom/core-api';\nimport {\n PageMetaService,\n PriceCalendarCTAParams,\n PriceCalendarParams,\n PriceCalendarService,\n PromotionItem,\n PromotionType,\n} from '@fcom/common';\nimport { GlobalBookingTravelClass, TripType } from '@fcom/core/interfaces';\nimport { GtmService } from '@fcom/common/gtm';\nimport { getOfferWithAmDestination } from '@fcom/common/utils';\nimport { AmDestinationService } from '@fcom/destination-search/services/am-destination.service';\nimport { LocationRouteCffService, stopPropagation } from '@fcom/core';\n\nimport { BlockOffer, BlockOfferData } from '../../interfaces';\nimport { toPromoBlock } from '../../services';\n\n@Component({\n selector: 'cms-offers-grid',\n template: `\n <fin-offer-grid\n *ngIf=\"originLocationCode$ | async as originLocationCode\"\n [title]=\"content.teaserTitle\"\n [offers$]=\"offers$\"\n [cmsTags]=\"content.subjectTaxonomyTags || []\"\n (flightHotelClicked)=\"openAmContinueModal($event)\"\n (calendarClicked)=\"calendarClicked(originLocationCode, $event)\"\n [tripType]=\"tripType\"\n ></fin-offer-grid>\n <fin-am-destination-continue-modal\n [open]=\"isAmContinueModalOpen\"\n (closeModal)=\"closeAmContinueModal()\"\n [bookUrl]=\"flightHotelUrl\"\n ></fin-am-destination-continue-modal>\n <fcom-modal\n [open]=\"(calendarOpen$ | async) !== null\"\n [fitToContent]=\"true\"\n [buttons]=\"null\"\n [roundedContent]=\"true\"\n [fullHeight]=\"true\"\n [extraWide]=\"true\"\n (close)=\"closePriceCalendar()\"\n data-testid=\"price-calendar-modal\"\n >\n <fin-price-calendar\n [openWithParams$]=\"calendarOpen$\"\n [showAddReturn]=\"true\"\n [showSubtitle]=\"true\"\n [ctaLabel]=\"'bookingSearch.search' | finLocalization\"\n (modalClose)=\"closePriceCalendar()\"\n (ctaClicked)=\"priceCalendarCTAClicked($event)\"\n ></fin-price-calendar>\n </fcom-modal>\n `,\n})\nexport class CmsOffersGridComponent implements OnInit {\n @Input()\n content: CmsCollection;\n\n offers$: Observable<BlockOfferData[]>;\n tripType: TripType;\n flightHotelUrl: string;\n isAmContinueModalOpen = false;\n calendarOpen$: Observable<PriceCalendarParams | null> = NEVER;\n originLocationCode$: Observable<string>;\n\n constructor(\n private languageService: LanguageService,\n private gtmService: GtmService,\n private amDestinationService: AmDestinationService,\n private locationRouteCffService: LocationRouteCffService,\n private priceCalendarService: PriceCalendarService,\n private pageMetaService: PageMetaService\n ) {\n this.calendarOpen$ = this.priceCalendarService.calendarOpen$;\n this.originLocationCode$ = this.pageMetaService.defaultOriginLocationCode$;\n }\n\n ngOnInit(): void {\n this.offers$ = this.languageService.lang.pipe(\n map((lang) => this.content.items.map((offer) => toPromoBlock(offer as CmsOffer, lang))),\n switchMap((offers) =>\n this.languageService.localeValue.includes('FI')\n ? getOfferWithAmDestination(\n offers,\n this.amDestinationService.amDestinationList(),\n this.locationRouteCffService\n )\n : of(offers)\n ),\n tap((offers) => {\n const promotionItems: PromotionItem[] = offers.map((offer, index) => ({\n position: `${index}`,\n id: 'top-destinations',\n product: offer.destination,\n type: 'static',\n }));\n\n this.gtmService.internalPromotion(promotionItems, PromotionType.VIEW);\n })\n );\n\n this.tripType = TripType[this.content.localSettings?.tripType?.toUpperCase()] ?? TripType.RETURN;\n }\n\n openAmContinueModal(flightHotelUrl): void {\n this.isAmContinueModalOpen = true;\n this.flightHotelUrl = flightHotelUrl;\n }\n\n closeAmContinueModal(): void {\n this.isAmContinueModalOpen = false;\n }\n\n calendarClicked(\n selectedOriginLocationCode: string,\n [event, destinationItem, travelClass, tripType]: [Event, BlockOffer, GlobalBookingTravelClass, TripType]\n ): void {\n stopPropagation(event);\n this.priceCalendarService.openPriceCalendar(\n selectedOriginLocationCode,\n destinationItem.destination,\n tripType,\n travelClass,\n destinationItem.title\n );\n }\n\n priceCalendarCTAClicked(params: PriceCalendarCTAParams): void {\n this.priceCalendarService.priceCalendarCTAClicked(params);\n }\n\n closePriceCalendar(): void {\n this.priceCalendarService.closePriceCalendar();\n }\n}\n","import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { isNull, isUndefined } from '@fcom/core/utils';\n\nimport { equals } from '../utils/equals';\nimport { LanguageService } from '../services/language.service';\n\n/**\n * Asynchronous plural localization pipe\n * - Uses LanguageService to localize the input\n *\n * @example\n *\n * When having\n *\n * localizations = {\n * foo: {\n * singular: \"{0} piece\"\n * plural: \"{0} pieces\"\n * },\n * bar: {\n * singular: \"{count} piece\"\n * plural: \"{count} pieces\"\n * },\n * }\n *\n * The pipe would translate the following\n *\n * 'foo' | finPluralLocalization: 1 -> '1 piece',\n * 'foo' | finPluralLocalization: 2 -> '2 pieces'\n * 'bar' | finPluralLocalization: 1: 'count' -> '1 piece'\n * 'bar' | finPluralLocalization: 2: 'count' -> '2 pieces'\n */\n@Pipe({\n name: 'finPluralLocalization',\n pure: false,\n})\nexport class PluralLocalizationPipe implements PipeTransform, OnDestroy {\n private async: AsyncPipe;\n private cached$: Observable<string>;\n private cachedKey: string;\n private cachedCount: number;\n private cachedFieldName: string;\n\n constructor(\n private ref: ChangeDetectorRef,\n private languageService: LanguageService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(key: string, count: number, fieldName?: string): string {\n if (isUndefined(key) || isNull(key) || typeof count !== 'number') {\n return undefined;\n }\n\n if (this.valueChanged(key, count, fieldName)) {\n this.update(key, count, fieldName);\n }\n\n return this.async.transform(this.cached$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n\n private valueChanged(key: string, count: number, fieldName: string): boolean {\n return (\n !this.cached$ || key !== this.cachedKey || fieldName !== this.cachedFieldName || !equals(count, this.cachedCount)\n );\n }\n\n private update(key: string, count: number, fieldName: string): void {\n const keyToUse = count === 1 ? `${key}.singular` : `${key}.plural`;\n this.cached$ = this.languageService\n .translate(keyToUse, fieldName ? { [fieldName]: count } : [count])\n .pipe(map((str) => (str ? str : '')));\n this.cachedKey = key;\n this.cachedFieldName = fieldName;\n this.cachedCount = count;\n }\n}\n","import { titleToLoginGender } from '@fcom/common-booking/utils/common-booking.utils';\nimport {\n CorporateUserRole,\n Profile,\n ProfileTier,\n RawCorporateProfile,\n RawUnknownProfile,\n SiebelBoolean,\n} from '@fcom/core-api/login';\nimport { serializeParams } from '@fcom/core/utils';\n\nexport interface RedirectUrlParameters {\n lang: string;\n nonce: string;\n display?: string;\n redirectPath?: string;\n}\n\nexport interface RedirectToLoginParams {\n redirectPath?: string;\n shouldLogoutFirst?: boolean;\n}\n\nexport const parseProfile = (rawProfile: RawUnknownProfile): Profile => {\n const profile =\n rawProfile.tier === ProfileTier.CORPORATE\n ? mapCorporateToStandardProfile(rawProfile as RawCorporateProfile)\n : rawProfile;\n\n // For newly joined Junior members nextTier can be Basic in Siebel even the real next tier would be Silver\n if (profile.nextTier && profile.nextTier.nextTier === ProfileTier.BASIC) {\n profile.nextTier = {\n ...profile.nextTier,\n nextTier: ProfileTier.SILVER,\n };\n }\n\n const parsedProfile: Profile = {\n ...profile,\n isJuniorMember: profile.junior === SiebelBoolean.TRUE,\n isCorporate: profile.tier === ProfileTier.CORPORATE,\n corporate: {\n ...profile.corporate,\n userRole: rawProfile?.corporateUserProfile?.role || CorporateUserRole.TRAVELLER,\n },\n parsedMobilePhone: {\n ...(profile.parsedMobilePhone || {}),\n },\n };\n\n delete parsedProfile.junior;\n\n if (!parsedProfile.isCorporate) {\n delete parsedProfile.corporate;\n }\n\n return parsedProfile;\n};\n\n/**\n * Maps a corporate profile to a normal user profile, with an additional `corporate` object.\n *\n * There are many keys that have unknown mappings/no available data at the moment.\n *\n * expirationDate: profile.corporateUserProfile.expires, // maybe?\n * hasCreditCard: false,\n * joinDate: profile.corporateUserProfile.issued, // maybe?\n * lang: 'en',\n * marketingPermissions: {\n * suppressAllEmails: false,\n * suppresseMailWeeklyOffers: false,\n * suppressPartnerPromotions: false,\n * suppressSMSPromos: false,\n * },\n * memberStatus?: LoginMemberStatus;\n * nextTier?: LoginNextTier;\n * preferredMealType?: string;\n * preferredSeatType?: string;\n * householdSize?: number;\n * childrenBirthYears?: string[];\n * topicsOfInterest?: string[];\n * travelProfile?: {\n * receiveFlightInfoEmail?: boolean;\n * receiveFlightInfoSMS?: boolean;\n * };\n * lifetimeTierPoints: 0,\n * cardType: null,\n * cardExpirationDate: null,\n * sebCard: false,\n * statusHold: false, ,\n */\nconst mapCorporateToStandardProfile = (profile: RawCorporateProfile): RawUnknownProfile => {\n return {\n addresses: [],\n awardPoints: null,\n corporate: {\n ...profile.corporate,\n userId: profile.corporateUserProfile.userId,\n },\n dateOfBirth: profile.corporateUserProfile.dateOfBirth,\n email: profile.corporateUserProfile.email,\n firstname: profile.corporateUserProfile.firstname,\n gender: titleToLoginGender(profile.corporateUserProfile.title),\n junior: SiebelBoolean.FALSE,\n lastname: profile.corporateUserProfile.lastname,\n memberNumber: profile.corporateUserProfile.finnairPlus,\n mobilePhone: profile.corporateUserProfile.mobile,\n partStatus: {\n ...profile.partStatus,\n },\n status: profile.status,\n tier: profile.tier,\n passport: {\n passportCountry: null,\n passportExpirationDate: profile.corporateUserProfile.expires,\n passportIssueDate: profile.corporateUserProfile.issued,\n passportNumber: profile.corporateUserProfile.passportNumber,\n },\n parsedMobilePhone: profile.corporateUserProfile.parsedMobilePhone,\n };\n};\n\nconst dec2hex = (dec: number): string => `0${dec.toString(16)}`.substr(-2);\n\n/**\n * Returns a cryptographically secure nonce (for browsers supporting crypto, i.e., >=IE10)\n * @return {string} the secure random string\n */\nexport const secureRandomString = (cr: Crypto | undefined): string => {\n const length = 64;\n if (!cr) {\n // NOTE: this is not cryptographically secure for IE10\n let str = '';\n while (str.length < length) {\n str += Math.random().toString(36).substr(2);\n }\n return str.substr(0, length);\n }\n const arr = new Uint32Array(length / 2);\n cr.getRandomValues(arr);\n return Array.from(arr, dec2hex).join('');\n};\n\n/**\n * Create redirectUrl.\n * Automatically adds the redirectPath parameter to default to current path if not given as parameter.\n *\n * @param {Location} location window.location\n * @param {string} uxAuthUrl https://api-dev.finnair.com/d/fcom/ux-auth-dev\n * @param {string} path the path to redirect to, e.g. `/fi-fi`\n * @param {{}} params additional query parameters for the redirect\n */\nexport const createRedirectUrl = (\n location: Location = {} as Location,\n uxAuthUrl: string,\n path: string,\n params: Partial<RedirectUrlParameters> = {}\n): string => {\n const p = {\n redirectPath: location.href,\n ...params,\n ...(params.redirectPath && { redirectPath: (location.origin ?? '') + params.redirectPath }),\n };\n return [uxAuthUrl, path, '?', serializeParams(p)].join('');\n};\n\nexport const isCorporateAdminOrTravelBooker = (profile?: Profile): boolean =>\n profile?.corporate?.userRole === CorporateUserRole.ADMIN ||\n profile?.corporate?.userRole === CorporateUserRole.TRAVEL_BOOKER;\n\nexport const isCorporateAdmin = (profile?: Profile): boolean =>\n profile?.corporate?.userRole === CorporateUserRole.ADMIN;\n","<div class=\"align-center\" *ngIf=\"countryCode$ | async as countryCode\">\n <a\n class=\"df-tablet-up flex--center no-underline nordic-blue-900-text\"\n [finLink]=\"'/'\"\n [finElemTracker]=\"'flight-selection-country-selector'\"\n [finElemContext]=\"TRACKING_CONTEXT\"\n [finElemType]=\"ElementTypes.BUTTON\"\n [attr.aria-label]=\"\n ('menu.language' | finLocalization) +\n ' ' +\n ('countries.' + countryCode | lowercase | finLocalization) +\n ' - ' +\n (lang$ | async | uppercase)\n \"\n >\n <div>\n <fcom-icon class=\"icon-medium ms-xxsmall-r\" [name]=\"SvgLibraryIcon.LANGUAGE\"></fcom-icon>\n </div>\n <div>\n <span class=\"font-body-1 dn-laptop-down\"\n >{{ 'countries.' + countryCode | lowercase | finLocalization }} - {{ lang$ | async | uppercase }}</span\n >\n <span class=\"font-body-1 dn-laptop-up\">{{ countryCode }}/{{ lang$ | async | uppercase }}</span>\n </div>\n </a>\n</div>\n","import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ElementTypes, GaContext } from '@fcom/common/interfaces';\n\n@Component({\n selector: 'fin-country-selection',\n templateUrl: './country-selection.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CountrySelectionComponent implements OnInit {\n constructor(private languageService: LanguageService) {}\n\n readonly ElementTypes = ElementTypes;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TRACKING_CONTEXT = GaContext.BOOKING_FLOW;\n\n countryCode$: Observable<string>;\n lang$: Observable<string>;\n\n ngOnInit(): void {\n this.countryCode$ = this.languageService.countryCode;\n this.lang$ = this.languageService.langKey;\n }\n}\n","import { NgModule, Optional, Inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\n\nimport { PopoverModule } from '../popover';\nimport { IconsModule } from '../icons/icons.module';\nimport { CarouselModule } from '../carousel/carousel.module';\nimport { TabsComponent } from './tabs/index';\nimport { TabComponent } from './tab/tab.component';\n\n@NgModule({\n declarations: [TabsComponent, TabComponent],\n imports: [CommonModule, IconsModule, CarouselModule, PopoverModule, UiTranslateModule],\n exports: [TabsComponent, TabComponent],\n providers: [],\n})\nexport class TabsModule {\n constructor(@Optional() @Inject(ANIMATION_MODULE_TYPE) animations: string) {\n if (!animations) {\n throw new Error('You need to import the BrowserAnimationsModule or NoopAnimationsModule in your application!');\n }\n }\n}\n","import { MonoTypeOperatorFunction } from '../types';\nimport { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\nexport function distinctUntilChanged<T>(comparator?: (previous: T, current: T) => boolean): MonoTypeOperatorFunction<T>;\nexport function distinctUntilChanged<T, K>(\n comparator: (previous: K, current: K) => boolean,\n keySelector: (value: T) => K\n): MonoTypeOperatorFunction<T>;\n\n/**\n * Returns a result {@link Observable} that emits all values pushed by the source observable if they\n * are distinct in comparison to the last value the result observable emitted.\n *\n * When provided without parameters or with the first parameter (`{@link distinctUntilChanged#comparator comparator}`),\n * it behaves like this:\n *\n * 1. It will always emit the first value from the source.\n * 2. For all subsequent values pushed by the source, they will be compared to the previously emitted values\n * using the provided `comparator` or an `===` equality check.\n * 3. If the value pushed by the source is determined to be unequal by this check, that value is emitted and\n * becomes the new \"previously emitted value\" internally.\n *\n * When the second parameter (`{@link distinctUntilChanged#keySelector keySelector}`) is provided, the behavior\n * changes:\n *\n * 1. It will always emit the first value from the source.\n * 2. The `keySelector` will be run against all values, including the first value.\n * 3. For all values after the first, the selected key will be compared against the key selected from\n * the previously emitted value using the `comparator`.\n * 4. If the keys are determined to be unequal by this check, the value (not the key), is emitted\n * and the selected key from that value is saved for future comparisons against other keys.\n *\n * ## Examples\n *\n * A very basic example with no `{@link distinctUntilChanged#comparator comparator}`. Note that `1` is emitted more than once,\n * because it's distinct in comparison to the _previously emitted_ value,\n * not in comparison to _all other emitted values_.\n *\n * ```ts\n * import { of, distinctUntilChanged } from 'rxjs';\n *\n * of(1, 1, 1, 2, 2, 2, 1, 1, 3, 3)\n * .pipe(distinctUntilChanged())\n * .subscribe(console.log);\n * // Logs: 1, 2, 1, 3\n * ```\n *\n * With a `{@link distinctUntilChanged#comparator comparator}`, you can do custom comparisons. Let's say\n * you only want to emit a value when all of its components have\n * changed:\n *\n * ```ts\n * import { of, distinctUntilChanged } from 'rxjs';\n *\n * const totallyDifferentBuilds$ = of(\n * { engineVersion: '1.1.0', transmissionVersion: '1.2.0' },\n * { engineVersion: '1.1.0', transmissionVersion: '1.4.0' },\n * { engineVersion: '1.3.0', transmissionVersion: '1.4.0' },\n * { engineVersion: '1.3.0', transmissionVersion: '1.5.0' },\n * { engineVersion: '2.0.0', transmissionVersion: '1.5.0' }\n * ).pipe(\n * distinctUntilChanged((prev, curr) => {\n * return (\n * prev.engineVersion === curr.engineVersion ||\n * prev.transmissionVersion === curr.transmissionVersion\n * );\n * })\n * );\n *\n * totallyDifferentBuilds$.subscribe(console.log);\n *\n * // Logs:\n * // { engineVersion: '1.1.0', transmissionVersion: '1.2.0' }\n * // { engineVersion: '1.3.0', transmissionVersion: '1.4.0' }\n * // { engineVersion: '2.0.0', transmissionVersion: '1.5.0' }\n * ```\n *\n * You can also provide a custom `{@link distinctUntilChanged#comparator comparator}` to check that emitted\n * changes are only in one direction. Let's say you only want to get\n * the next record temperature:\n *\n * ```ts\n * import { of, distinctUntilChanged } from 'rxjs';\n *\n * const temps$ = of(30, 31, 20, 34, 33, 29, 35, 20);\n *\n * const recordHighs$ = temps$.pipe(\n * distinctUntilChanged((prevHigh, temp) => {\n * // If the current temp is less than\n * // or the same as the previous record,\n * // the record hasn't changed.\n * return temp <= prevHigh;\n * })\n * );\n *\n * recordHighs$.subscribe(console.log);\n * // Logs: 30, 31, 34, 35\n * ```\n *\n * Selecting update events only when the `updatedBy` field shows\n * the account changed hands.\n *\n * ```ts\n * import { of, distinctUntilChanged } from 'rxjs';\n *\n * // A stream of updates to a given account\n * const accountUpdates$ = of(\n * { updatedBy: 'blesh', data: [] },\n * { updatedBy: 'blesh', data: [] },\n * { updatedBy: 'ncjamieson', data: [] },\n * { updatedBy: 'ncjamieson', data: [] },\n * { updatedBy: 'blesh', data: [] }\n * );\n *\n * // We only want the events where it changed hands\n * const changedHands$ = accountUpdates$.pipe(\n * distinctUntilChanged(undefined, update => update.updatedBy)\n * );\n *\n * changedHands$.subscribe(console.log);\n * // Logs:\n * // { updatedBy: 'blesh', data: Array[0] }\n * // { updatedBy: 'ncjamieson', data: Array[0] }\n * // { updatedBy: 'blesh', data: Array[0] }\n * ```\n *\n * @see {@link distinct}\n * @see {@link distinctUntilKeyChanged}\n *\n * @param comparator A function used to compare the previous and current keys for\n * equality. Defaults to a `===` check.\n * @param keySelector Used to select a key value to be passed to the `comparator`.\n *\n * @return A function that returns an Observable that emits items from the\n * source Observable with distinct values.\n */\nexport function distinctUntilChanged<T, K>(\n comparator?: (previous: K, current: K) => boolean,\n keySelector: (value: T) => K = identity as (value: T) => K\n): MonoTypeOperatorFunction<T> {\n // We've been allowing `null` do be passed as the `compare`, so we can't do\n // a default value for the parameter, because that will only work\n // for `undefined`.\n comparator = comparator ?? defaultCompare;\n\n return operate((source, subscriber) => {\n // The previous key, used to compare against keys selected\n // from new arrivals to determine \"distinctiveness\".\n let previousKey: K;\n // Whether or not this is the first value we've gotten.\n let first = true;\n\n source.subscribe(\n createOperatorSubscriber(subscriber, (value) => {\n // We always call the key selector.\n const currentKey = keySelector(value);\n\n // If it's the first value, we always emit it.\n // Otherwise, we compare this key to the previous key, and\n // if the comparer returns false, we emit.\n if (first || !comparator!(previousKey, currentKey)) {\n // Update our state *before* we emit the value\n // as emission can be the source of re-entrant code\n // in functional libraries like this. We only really\n // need to do this if it's the first value, or if the\n // key we're tracking in previous needs to change.\n first = false;\n previousKey = currentKey;\n\n // Emit the value!\n subscriber.next(value);\n }\n })\n );\n });\n}\n\nfunction defaultCompare(a: any, b: any) {\n return a === b;\n}\n","import { Subscription } from '../Subscription';\nimport { SchedulerAction, SchedulerLike } from '../types';\n\nexport function executeSchedule(\n parentSubscription: Subscription,\n scheduler: SchedulerLike,\n work: () => void,\n delay: number,\n repeat: true\n): void;\nexport function executeSchedule(\n parentSubscription: Subscription,\n scheduler: SchedulerLike,\n work: () => void,\n delay?: number,\n repeat?: false\n): Subscription;\n\nexport function executeSchedule(\n parentSubscription: Subscription,\n scheduler: SchedulerLike,\n work: () => void,\n delay = 0,\n repeat = false\n): Subscription | void {\n const scheduleSubscription = scheduler.schedule(function (this: SchedulerAction<any>) {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n } else {\n this.unsubscribe();\n }\n }, delay);\n\n parentSubscription.add(scheduleSubscription);\n\n if (!repeat) {\n // Because user-land scheduler implementations are unlikely to properly reuse\n // Actions for repeat scheduling, we can't trust that the returned subscription\n // will control repeat subscription scenarios. So we're trying to avoid using them\n // incorrectly within this library.\n return scheduleSubscription;\n }\n}\n","import { OperatorFunction } from '../types';\nimport { map } from './map';\n\n/** @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. */\nexport function mapTo<R>(value: R): OperatorFunction<unknown, R>;\n/**\n * @deprecated Do not specify explicit type parameters. Signatures with type parameters\n * that cannot be inferred will be removed in v8. `mapTo` itself will be removed in v9,\n * use {@link map} instead: `map(() => value)`.\n * */\nexport function mapTo<T, R>(value: R): OperatorFunction<T, R>;\n\n/**\n * Emits the given constant value on the output Observable every time the source\n * Observable emits a value.\n *\n * <span class=\"informal\">Like {@link map}, but it maps every source value to\n * the same output value every time.</span>\n *\n * ![](mapTo.png)\n *\n * Takes a constant `value` as argument, and emits that whenever the source\n * Observable emits a value. In other words, ignores the actual source value,\n * and simply uses the emission moment to know when to emit the given `value`.\n *\n * ## Example\n *\n * Map every click to the string `'Hi'`\n *\n * ```ts\n * import { fromEvent, mapTo } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const greetings = clicks.pipe(mapTo('Hi'));\n *\n * greetings.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link map}\n *\n * @param value The value to map each source value to.\n * @return A function that returns an Observable that emits the given `value`\n * every time the source Observable emits.\n * @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`.\n */\nexport function mapTo<R>(value: R): OperatorFunction<unknown, R> {\n return map(() => value);\n}\n","import { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { share, switchMap, take } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport { AppState } from '@fcom/core';\nimport { ConfigService } from '@fcom/core/services/config/config.service';\nimport {\n ServiceAvailability,\n ServiceAvailabilityPerFragment,\n ServiceCatalog,\n ServiceCatalogCategory,\n ServiceCatalogServices,\n ServiceCatalogTranslations,\n} from '@fcom/dapi';\nimport { retryWithBackoff } from '@fcom/rx';\nimport { combine, isPresent, mapValues } from '@fcom/core/utils';\nimport {\n CallerType,\n Category,\n FinnairServiceCatalogV3,\n Medium,\n RestError,\n SeatmapSvgAndControlData,\n} from '@fcom/dapi/api/models';\nimport { SeatmapService } from '@fcom/dapi/api/services/seatmap.service';\nimport { CmsContent, CmsContentType, CmsImageData, HtmlString, PageViewType } from '@fcom/core-api/interfaces';\nimport { language } from '@fcom/core/selectors/language.selector';\n\nimport { ServicesActions } from '../../../store/actions';\nimport { calculatePaxCountFromServiceCatalog, removeServicesWithMaxedOutQuotas } from '../utils';\nimport { CartOrOrder } from '../../../interfaces';\n\nconst asAvailability = <T extends ServiceCatalogServices>(services: T): ServiceAvailabilityPerFragment => {\n if (!isPresent(services)) {\n return {};\n }\n return Object.keys(services).reduce((availability: ServiceAvailabilityPerFragment, fragmentId: string) => {\n availability[fragmentId] = combine(services[fragmentId]).length > 0;\n return availability;\n }, {});\n};\n\nexport const asServiceAvailability = (catalog: ServiceCatalog): ServiceAvailability => {\n const baseAvailability: ServiceAvailability = {\n [Category.CABIN_BAGGAGE]: {},\n [Category.BAGGAGE]: {},\n [Category.MEAL]: {},\n [Category.WIFI]: {},\n [Category.LOUNGE]: {},\n [Category.COVER]: {},\n [Category.SPORT]: {},\n [Category.PET]: {},\n [Category.SAF]: {},\n };\n\n return mapValues(baseAvailability, (old, key: string) => {\n const category = catalog?.categories.find((c) => c.category.toString() === key) || ({} as ServiceCatalogCategory);\n\n return asAvailability(category?.services || {}) || old;\n });\n};\n\nconst asErrorMessage = (error: RestError): string => {\n return `${error?.errorMessage}`.concat(\n error?.amadeusResponse ? `${error.amadeusResponse.messageTitle} (${error.amadeusResponse.messageCode})` : ''\n );\n};\n\nconst asServiceCatalogTranslations = (translations: { [key: string]: unknown }): ServiceCatalogTranslations => {\n return {\n ...translations,\n title: (translations?.title as string) || '',\n };\n};\n\nconst asCmsImageData = (medium: Medium): CmsImageData & CmsContent => {\n return medium\n ? {\n ...medium,\n customPlacement: null,\n subjectTaxonomyTags: [],\n contentId: medium.contentId ?? null,\n contentType: CmsContentType[medium.contentType as keyof typeof CmsContentType],\n teaserText: medium.teaserText as HtmlString,\n viewTypeName: PageViewType[medium.viewTypeName as keyof typeof PageViewType],\n alt: medium.alt ?? null,\n responsiveImageLinksData: {\n landscape_ratio16x9: {\n ...medium.responsiveImageLinksData?.landscape_ratio16x9,\n },\n landscape_ratio4x3: {\n ...medium.responsiveImageLinksData?.landscape_ratio4x3,\n },\n landscape_ratio21x9: {\n ...medium.responsiveImageLinksData?.landscape_ratio21x9,\n },\n portrait_ratio1x1: {\n ...medium.responsiveImageLinksData?.portrait_ratio1x1,\n },\n },\n }\n : undefined;\n};\n\nexport const asServiceCatalog = (catalog: FinnairServiceCatalogV3): ServiceCatalog => {\n return {\n messages: catalog.messages?.map((error) => asErrorMessage(error)) ?? [],\n campaigns: catalog.campaigns ?? [],\n paxLevelQuota: catalog.paxLevelQuota,\n categories: catalog.categories.map((category) => ({\n ...category,\n translations: asServiceCatalogTranslations(category.translations),\n media: asCmsImageData(category.media),\n services: mapValues(category.services, (servicePerTraveler) =>\n mapValues(servicePerTraveler, (servicesForTraveler) =>\n servicesForTraveler.map((service) => ({\n ...service,\n translations: asServiceCatalogTranslations(service.translations),\n media: asCmsImageData(service.media),\n category: category.category,\n }))\n )\n ),\n })),\n };\n};\n\n@Injectable()\nexport class CommonBookingAncillaryService {\n static NUMBER_OF_RETRIES = 1;\n\n constructor(\n private seatmapService: SeatmapService,\n private configService: ConfigService,\n private store$: Store<AppState>\n ) {}\n\n setServiceCatalog(cartOrOrder: CartOrOrder): void {\n const responseCatalog: FinnairServiceCatalogV3 = cartOrOrder.serviceCatalog || {\n messages: [],\n categories: [],\n campaigns: [],\n paxLevelQuota: { combinedQuota: 0, variants: [] },\n };\n const serviceCatalog = asServiceCatalog(responseCatalog);\n const catalog = removeServicesWithMaxedOutQuotas(\n serviceCatalog,\n calculatePaxCountFromServiceCatalog(serviceCatalog)\n );\n this.store$.dispatch(ServicesActions.setServiceCatalog({ catalog }));\n this.store$.dispatch(\n ServicesActions.setServiceAvailability({ serviceAvailability: asServiceAvailability(catalog) })\n );\n }\n\n getCartSeatMapForFlight(\n flightId: string,\n departureDateTime: string,\n cartId: string,\n cartHash: string,\n currencyCode?: string\n ): Observable<SeatmapSvgAndControlData> {\n return this.store$.pipe(\n language(),\n take(1),\n switchMap((locale) => {\n return this.seatmapService\n .getSeatmapFromCart(this.configService.cfg.servicesUrl, {\n flightId,\n departureDateTime,\n cartId,\n hash: cartHash,\n version: 2,\n locale,\n Caller: CallerType.FINNAIRCOM,\n ...(currencyCode ? { currencyCode } : {}),\n })\n .pipe(retryWithBackoff(CommonBookingAncillaryService.NUMBER_OF_RETRIES), share());\n })\n );\n }\n\n getOrderSeatMapForFlight(\n flightId: string,\n departureDateTime: string,\n orderId: string,\n orderHash: string,\n currencyCode?: string\n ): Observable<SeatmapSvgAndControlData> {\n return this.store$.pipe(\n language(),\n take(1),\n switchMap((locale) => {\n return this.seatmapService\n .getSeatmapFromOrder(this.configService.cfg.servicesUrl, {\n flightId,\n departureDateTime,\n orderId,\n hash: orderHash,\n version: 2,\n locale,\n Caller: CallerType.FINNAIRCOM,\n ...(currencyCode ? { currencyCode } : {}),\n })\n .pipe(retryWithBackoff(CommonBookingAncillaryService.NUMBER_OF_RETRIES), share());\n })\n );\n }\n}\n","import { type IconSet } from '../../ui-components';\n\nexport interface BenefitItemTargetedDescription {\n targetType: string;\n /**\n * detail description for example used in order level\n */\n description: string;\n}\n\nexport interface BenefitItemV2 {\n benefitItemKey: BenefitItemKeyEnum;\n /**\n * Title of the tier benefit, secnerio such as loyalty page\n */\n title: string;\n description: Description;\n icon?: IconSet;\n amount: number;\n /**\n * the start date of this benefit.\n */\n effectiveFrom?: string;\n /**\n * the end date of this benefit.\n */\n effectiveTo?: string;\n displayTags: string;\n}\n\nexport enum BenefitItemKeyEnum {\n AdvanceSeatReservation = 'advanceSeatReservation',\n Wifi = 'wifi',\n Lounge = 'lounge',\n ContactInfo = 'contactInfo',\n ConditionalConfirmedSeat = 'conditionalConfirmedSeat',\n Drink = 'drink',\n ExtraBags = 'extraBags',\n Newspaper = 'newspaper',\n OneWorldBenefits = 'oneWorldBenefits',\n PointsAndOffers = 'pointsAndOffers',\n PrioritySecurity = 'prioritySecurity',\n Snack = 'snack',\n SpecialBags = 'specialBags',\n OneWorldBags = 'oneWorldBags',\n TaxFreeShoppingOutsideEU = 'taxFreeShoppingOutsideEU',\n TierStatusHold = 'tierStatusHold',\n MemberOffers = 'memberOffers',\n CarryonBagTier = 'carryonBagTier',\n MilestoneReward = 'milestoneReward',\n SportEquipment = 'sportEquipment',\n FastTrack = 'fastTrack',\n SnackDrink = 'snackDrink',\n GiveAwayCard = 'giveAwayCard',\n EasyBookings = 'easyBookings',\n TierAward = 'tierAward',\n}\n\nexport interface Description {\n /**\n * General description for tier benefit, scenerio such as loyalty content, mobile profile content\n */\n generalDescription: string;\n /**\n * targeted description for tier benefit, scenerio such as order level content\n */\n targetedDescription: Array<BenefitItemTargetedDescription>;\n}\n\nexport interface TierLevelBenefits {\n [tierLevel: string]: BenefitItemV2[];\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { symbolToLangPath } from '@fcom/core/utils/cms-path-helpers';\n\n@Pipe({\n name: 'resolveLinks',\n})\nexport class ResolveLinksPipe implements PipeTransform {\n constructor(private languageService: LanguageService) {}\n\n transform(value: string): string {\n return this.legacySiteLinkLocale(value);\n }\n\n private legacySiteLinkLocale(value = ''): string {\n if (!value) {\n return value;\n }\n return symbolToLangPath(value, this.languageService.ddsLocaleValue);\n }\n}\n","export enum Stage {\n deeplink = 'DEEPLINK',\n selection = 'SELECTION',\n review = 'REVIEW',\n processing = 'PROCESSING',\n confirmation = 'CONFIRMATION',\n error = 'ERROR',\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { TagRoundingStyle, TagTheme } from './interfaces';\n\n@Component({\n selector: 'fcom-tag',\n styleUrls: ['tag.component.scss'],\n templateUrl: 'tag.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TagComponent {\n readonly TagTheme = TagTheme;\n readonly TagRoundingStyle = TagRoundingStyle;\n\n @Input()\n theme: TagTheme = TagTheme.DEFAULT;\n\n @Input()\n roundingStyle = TagRoundingStyle.DEFAULT;\n}\n","<div\n class=\"tag medium-type font-body-2 flex--inline flex--middle align-center ps-xsmall-x rounded-medium\"\n [ngClass]=\"{\n 'white-text': theme === TagTheme.ACTIVE || theme === TagTheme.POPULAR,\n 'nordic-blue-900-text nordic-blue-25-bg': theme === TagTheme.DEFAULT,\n 'nordic-blue-900-bg': theme === TagTheme.ACTIVE,\n 'white-bg nordic-blue-900-text': theme === TagTheme.WHITE,\n 'birch-50-bg birch-600-text': theme === TagTheme.SUSTAINABILITY,\n 'heather-700-bg': theme === TagTheme.POPULAR,\n 'nordic-blue-900-text success-50-bg': theme === TagTheme.SUCCESS,\n 'nordic-blue-900-text alert-50-bg': theme === TagTheme.WARNING,\n 'nordic-blue-900-text error-50-bg': theme === TagTheme.ALERT,\n 'border-rounded-chip': roundingStyle === TagRoundingStyle.CHIP,\n }\"\n>\n <ng-content></ng-content>\n</div>\n","import { InteropObservable } from '../types';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\n\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isInteropObservable(input: any): input is InteropObservable<any> {\n return isFunction(input[Symbol_observable]);\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({ name: 'finSafe' })\nexport class SafePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {\n this.sanitizer = sanitizer;\n }\n\n transform(input: string, type: string): any {\n let value: any;\n\n if (!input) {\n input = '';\n }\n\n switch (type) {\n case 'html':\n value = this.sanitizer.bypassSecurityTrustHtml(input);\n break;\n case 'style':\n value = this.sanitizer.bypassSecurityTrustStyle(input);\n break;\n case 'script':\n value = this.sanitizer.bypassSecurityTrustScript(input);\n break;\n case 'url':\n value = this.sanitizer.bypassSecurityTrustUrl(input);\n break;\n case 'resource':\n value = this.sanitizer.bypassSecurityTrustResourceUrl(input);\n break;\n default:\n value = input;\n break;\n }\n\n if (value === '') {\n throw new Error(`Illegal type '${type}' given.`);\n }\n\n return value;\n }\n}\n","import { Subscriber } from '../Subscriber';\nimport { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\n\n/* tslint:disable:max-line-length */\nexport function switchMap<T, O extends ObservableInput<any>>(\n project: (value: T, index: number) => O\n): OperatorFunction<T, ObservedValueOf<O>>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function switchMap<T, O extends ObservableInput<any>>(\n project: (value: T, index: number) => O,\n resultSelector: undefined\n): OperatorFunction<T, ObservedValueOf<O>>;\n/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */\nexport function switchMap<T, R, O extends ObservableInput<any>>(\n project: (value: T, index: number) => O,\n resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R\n): OperatorFunction<T, R>;\n/* tslint:enable:max-line-length */\n\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable, emitting values only from the most recently projected Observable.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link switchAll}.</span>\n *\n * ![](switchMap.png)\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. Each time it observes one of these\n * inner Observables, the output Observable begins emitting the items emitted by\n * that inner Observable. When a new inner Observable is emitted, `switchMap`\n * stops emitting items from the earlier-emitted inner Observable and begins\n * emitting items from the new one. It continues to behave like this for\n * subsequent inner Observables.\n *\n * ## Example\n *\n * Generate new Observable according to source Observable values\n *\n * ```ts\n * import { of, switchMap } from 'rxjs';\n *\n * const switched = of(1, 2, 3).pipe(switchMap(x => of(x, x ** 2, x ** 3)));\n * switched.subscribe(x => console.log(x));\n * // outputs\n * // 1\n * // 1\n * // 1\n * // 2\n * // 4\n * // 8\n * // 3\n * // 9\n * // 27\n * ```\n *\n * Restart an interval Observable on every click event\n *\n * ```ts\n * import { fromEvent, switchMap, interval } from 'rxjs';\n *\n * const clicks = fromEvent(document, 'click');\n * const result = clicks.pipe(switchMap(() => interval(1000)));\n * result.subscribe(x => console.log(x));\n * ```\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switchAll}\n * @see {@link switchMapTo}\n *\n * @param project A function that, when applied to an item emitted by the source\n * Observable, returns an Observable.\n * @return A function that returns an Observable that emits the result of\n * applying the projection function (and the optional deprecated\n * `resultSelector`) to each item emitted by the source Observable and taking\n * only the values from the most recently projected inner Observable.\n */\nexport function switchMap<T, R, O extends ObservableInput<any>>(\n project: (value: T, index: number) => O,\n resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R\n): OperatorFunction<T, ObservedValueOf<O> | R> {\n return operate((source, subscriber) => {\n let innerSubscriber: Subscriber<ObservedValueOf<O>> | null = null;\n let index = 0;\n // Whether or not the source subscription has completed\n let isComplete = false;\n\n // We only complete the result if the source is complete AND we don't have an active inner subscription.\n // This is called both when the source completes and when the inners complete.\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n\n source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n // Cancel the previous inner subscription if there was one\n innerSubscriber?.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n // Start the next inner subscription\n innerFrom(project(value, outerIndex)).subscribe(\n (innerSubscriber = createOperatorSubscriber(\n subscriber,\n // When we get a new inner value, next it through. Note that this is\n // handling the deprecate result selector here. This is because with this architecture\n // it ends up being smaller than using the map operator.\n (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue),\n () => {\n // The inner has completed. Null out the inner subscriber to\n // free up memory and to signal that we have no inner subscription\n // currently.\n innerSubscriber = null!;\n checkComplete();\n }\n ))\n );\n },\n () => {\n isComplete = true;\n checkComplete();\n }\n )\n );\n });\n}\n","import { LocalDate } from '@fcom/core/utils';\n\nimport { CalendarNavigationType, DateRange } from '../components/datepicker';\n\ninterface MonthInfo {\n id: string;\n year: number;\n value: number;\n i18n: number;\n weekDays: any;\n label: string;\n}\n\nexport enum SpacerType {\n START,\n END,\n}\n\nexport interface Week {\n days: (Day & UiDay)[];\n}\n\nexport interface Month extends MonthInfo {\n days: Day[];\n monthArrayIndex?: number;\n weeks: Week[];\n}\n\nexport interface Day {\n id: string;\n value: number;\n weekday: number;\n i18n: number;\n today: boolean;\n past: boolean;\n future: boolean;\n date: LocalDate;\n selected?: boolean;\n spacer?: number;\n spacerType?: SpacerType;\n disabled?: boolean;\n tabindex: -1 | 0;\n ariaLabel: string;\n focused: boolean;\n}\n\nexport interface UiDay {\n reference?: Day;\n instance?: Day;\n label?: string;\n}\n\nexport interface DateSelection {\n startDate: LocalDate;\n endDate?: LocalDate;\n}\n\nexport type CalendarViewModel = {\n displayMonths: 1 | 2;\n isDateRange: boolean;\n scrollOnInit: boolean;\n showTags: boolean;\n minDate: LocalDate | null;\n maxDate: LocalDate | null;\n firstDate: LocalDate | null;\n lastDate: LocalDate | null;\n focusDate: LocalDate | null;\n selectedDates: DateSelection;\n isMobile: boolean;\n months: Month[];\n monthTags?: string[];\n navigationType: CalendarNavigationType;\n prevDisabled: boolean;\n nextDisabled: boolean;\n loadAmount: number;\n disabledDateRanges?: DateRange[];\n enableMonthScrollingAfterSelection: boolean;\n};\n","/* eslint-disable rxjs/no-subject-value */\nimport { Injectable } from '@angular/core';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { LocalDate } from '@fcom/core/utils/tz-date';\nimport { DateFormat, isDeepEqual, isPresent, Pattern, quantityOfMonths, toMonthId, WeekdayMap } from '@fcom/core/index';\n\nimport { areSelectedDatesChanged, getMonthByDate } from '../../../utils/date.utils';\nimport { CalendarViewModel, DateSelection, Day, Month, SpacerType } from '../../../utils/date.interface';\nimport { Calendar, CalendarNavigationType, DateRange } from '../interfaces';\n\ntype CalendarDataUpdate = Partial<{\n minDate: LocalDate | null;\n maxDate: LocalDate | null;\n displayMonths: 1 | 2;\n navigationType: CalendarNavigationType;\n selectedDates: DateSelection;\n isDateRange: boolean;\n showTags: boolean;\n scrollOnInit: boolean;\n disabledDateRanges: DateRange[];\n dateLabels: any;\n selectedLabel: string;\n enableMonthScrollingAfterSelection: boolean;\n}>;\n@Injectable()\nexport class CalendarService {\n private _VALIDATORS: {\n [K in keyof Partial<CalendarDataUpdate>]: (v: Partial<CalendarDataUpdate>[K]) => Partial<CalendarViewModel> | void;\n } = {\n minDate: (date: LocalDate | null): Partial<CalendarDataUpdate> | void => {\n if (!this._state.minDate?.equals(date)) {\n return { minDate: date };\n }\n },\n maxDate: (date: LocalDate | null): Partial<CalendarDataUpdate> | void => {\n if (!this._state.maxDate?.equals(date)) {\n return { maxDate: date };\n }\n },\n displayMonths: (displayMonths: 1 | 2): Partial<CalendarDataUpdate> | void => {\n if (\n typeof displayMonths === 'number' &&\n (displayMonths === 1 || displayMonths === 2) &&\n this._state.displayMonths !== displayMonths\n ) {\n return { displayMonths };\n }\n },\n navigationType: (navigationType: CalendarNavigationType): Partial<CalendarDataUpdate> | void => {\n if (this._state.navigationType !== navigationType) {\n return { navigationType };\n }\n },\n selectedDates: (selectedDates: DateSelection): Partial<CalendarDataUpdate> | void => {\n if (areSelectedDatesChanged(this._state.selectedDates, selectedDates)) {\n return { selectedDates };\n }\n },\n isDateRange: (isDateRange: boolean): Partial<CalendarDataUpdate> | void => {\n if (this._state.isDateRange !== isDateRange) {\n return { isDateRange };\n }\n },\n showTags: (showTags: boolean): Partial<CalendarDataUpdate> | void => {\n if (this._state.showTags !== showTags) {\n return { showTags };\n }\n },\n scrollOnInit: (scrollOnInit: boolean): Partial<CalendarDataUpdate> | void => {\n if (this._state.scrollOnInit !== scrollOnInit) {\n return { scrollOnInit };\n }\n },\n disabledDateRanges: (disabledDateRanges: DateRange[] | null): Partial<CalendarDataUpdate> | void => {\n const sortedDateRanges = disabledDateRanges\n ?.filter((disabledDateRange) => disabledDateRange.length)\n ?.map(([date1, date2]) => {\n const startDate = date1.lte(date2) ? date1 : date2;\n const endDate = date1.gt(date2) ? date1 : date2;\n\n return [startDate, endDate];\n })\n .sort(([start1], [start2]) => start1.toDate().getTime() - start2.toDate().getTime());\n\n this._disabledDateRanges = isPresent(disabledDateRanges) ? sortedDateRanges : disabledDateRanges;\n\n return { disabledDateRanges: this._disabledDateRanges };\n },\n dateLabels: (dateLabels: any): void => {\n this._dateLabels = dateLabels;\n },\n selectedLabel: (selectedLabel: string): void => {\n this._selectedLabel = selectedLabel;\n },\n enableMonthScrollingAfterSelection: (enableMonthScrollingAfterSelection: boolean): void => {\n this._state.enableMonthScrollingAfterSelection = enableMonthScrollingAfterSelection;\n },\n };\n\n private today: LocalDate = LocalDate.now();\n private weekdayMap: WeekdayMap = new WeekdayMap('mon');\n private _state: CalendarViewModel = {\n displayMonths: 2,\n isDateRange: false,\n scrollOnInit: true,\n showTags: false,\n minDate: null,\n maxDate: null,\n firstDate: null,\n lastDate: null,\n focusDate: null,\n selectedDates: { startDate: undefined, endDate: undefined },\n isMobile: false,\n months: [],\n monthTags: [],\n navigationType: CalendarNavigationType.MIXED,\n prevDisabled: false,\n nextDisabled: false,\n loadAmount: 0,\n enableMonthScrollingAfterSelection: true,\n };\n\n private _selectedLabel;\n private _disabledDateRanges;\n private _dateLabels;\n private _dataModel$ = new Subject<CalendarViewModel>();\n\n get dataModel$(): Observable<CalendarViewModel> {\n return this._dataModel$;\n }\n\n set(options: Partial<CalendarViewModel>): void {\n const updates = Object.keys(options)\n .map((key) => this._VALIDATORS[key]?.(options[key]))\n .reduce((data, part) => ({ ...data, ...part }), {});\n\n if (isPresent(updates) && Object.keys(updates).length > 0) {\n this.nextState(updates);\n }\n }\n\n /**\n * Screen size has changed\n * @param isMobile\n */\n changeCalendarView(_isMobile: boolean, focusDate: LocalDate): void {\n const { isMobile, navigationType, months } = this._state;\n\n if (isMobile !== _isMobile) {\n this.nextState({ isMobile: _isMobile });\n\n const isVerticalScroll = _isMobile && navigationType === CalendarNavigationType.MIXED;\n\n if (isVerticalScroll) {\n // calculate the month that is visible\n // load from 0 to the monthId + 1 that is visible\n const currentMonthId = getMonthByDate(months, focusDate)?.monthArrayIndex;\n\n if (months.length - 1 <= currentMonthId) {\n this.loadMonths(currentMonthId + 1);\n }\n } else {\n this.navigateToMonth(focusDate);\n }\n }\n }\n\n /**\n * Navigate to month method\n * @param date\n */\n navigateToMonth(date: LocalDate): void {\n const firstDate = this.toValidDate(date);\n\n if (!this._state.firstDate?.equals(date)) {\n // month has changed\n this.nextState({ firstDate });\n }\n }\n\n /**\n * Processes a keyboard event\n * @param event\n */\n processKey(event: KeyboardEvent): void {\n const { focusDate, lastDate, firstDate } = this._state;\n\n switch (event.key) {\n case 'PageUp':\n this.focusDate(focusDate.minusMonths(1));\n break;\n case 'PageDown':\n this.focusDate(focusDate.plusMonths(1));\n break;\n case 'End':\n this.focusDate(lastDate);\n break;\n case 'Home':\n this.focusDate(firstDate);\n break;\n case 'ArrowLeft':\n this.focusDate(focusDate.minusDays(1));\n break;\n case 'ArrowUp':\n this.focusDate(focusDate.minusDays(7));\n break;\n case 'ArrowRight':\n this.focusDate(focusDate.plusDays(1));\n break;\n case 'ArrowDown':\n this.focusDate(focusDate.plusDays(7));\n break;\n case 'Enter':\n case 'Space':\n this.selectDate(focusDate);\n break;\n default:\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n }\n\n focusDate(date?: LocalDate | null): void {\n // we update the focusDate only if the previous and next date are different and is actual date\n if (isPresent(date) && !this._state.focusDate?.equals(date)) {\n this.nextState({ focusDate: date });\n }\n }\n\n /**\n * Select dates\n * @param date to be selected\n */\n selectDate(date?: LocalDate): void {\n const { startDate, endDate } = this._state.selectedDates;\n\n const result: DateSelection = { startDate: undefined, endDate: undefined };\n\n if (!isPresent(startDate) || isPresent(endDate) || date.lt(startDate) || !this._state.isDateRange) {\n result.startDate = date;\n } else {\n result.startDate = startDate;\n result.endDate = date;\n }\n\n this.nextState({\n selectedDates: result,\n ...(!this._state.enableMonthScrollingAfterSelection && { focusDate: date }),\n });\n if (this._state.enableMonthScrollingAfterSelection) {\n this.focusDate(date);\n }\n }\n\n /**\n * Loads more months starting from minDate\n * @param amount moths to be loaded\n */\n loadMonths(amount: number, focusDate?: LocalDate | undefined): void {\n const { minDate, maxDate } = this._state;\n const maxMonths = quantityOfMonths(minDate, maxDate);\n\n if (amount <= maxMonths) {\n this.nextState({ loadAmount: amount, ...(isPresent(focusDate) && { focusDate }) });\n }\n }\n\n /**\n * Gets month data by monthId\n * @param monthId\n * @returns Month | undefined\n */\n getMonth(monthId: string): Month | undefined {\n return this._state.months.find((month) => month.id === monthId);\n }\n\n // creates month tags\n private createMonthTags(minDate: LocalDate, maxDate: LocalDate): string[] {\n return Array.from({ length: quantityOfMonths(minDate, maxDate) }, (_, i) => {\n const month = minDate.plusMonths(i);\n return new DateFormat(this._dateLabels).format(\n LocalDate.forDate(month.localYear, month.localMonth, 1),\n DateFormat['SHORT_MONTH_AND_YEAR']\n );\n });\n }\n\n // creates months\n private createMonths(\n firstAvailableDate: LocalDate,\n lastAvailableDate: LocalDate,\n displayMonths: number,\n loadAmount = 0\n ): Calendar {\n const { months } = this._state;\n const monthsAmount = loadAmount > 0 ? loadAmount : displayMonths;\n\n // move old months to a temporary array\n const monthsToReuse: Month[] = months.splice(0, months.length);\n\n // generate new first dates\n const firstDates = Array.from({ length: monthsAmount }, (_, i) => {\n const firstMonthDate: LocalDate = firstAvailableDate.plusMonths(i);\n\n months[i] = null;\n\n const reusedIndex = monthsToReuse.findIndex(\n (month) => month.value === firstMonthDate.localMonth && month.year === firstMonthDate.localYear\n );\n // move reused month back to months\n if (reusedIndex !== -1) {\n months[i] = monthsToReuse.splice(reusedIndex, 1)[0];\n }\n\n return firstMonthDate;\n });\n\n // rebuild not found months\n firstDates.forEach((firstMonthDate, i) => {\n if (months[i] === null) {\n const firstDate = firstMonthDate.firstDayOfMonth.lt(this.today)\n ? firstAvailableDate\n : firstMonthDate.firstDayOfMonth;\n\n months[i] = this.createMonth(firstDate, firstMonthDate.firstDayOfMonth, lastAvailableDate);\n }\n });\n\n return { today: this.today as unknown as Day, months };\n }\n\n // creates a single month with weeks and days\n private createMonth(firstDate: LocalDate, firstOfMonth: LocalDate, endDate: LocalDate): Month {\n const totalWeeks = 6;\n const daysPerWeek = 7;\n const weeks = [];\n const monthBase = {\n id: toMonthId(firstOfMonth),\n year: firstOfMonth.localYear,\n value: firstOfMonth.localMonth,\n weeks,\n weekDays: this._dateLabels,\n label: new DateFormat(this._dateLabels).format(\n LocalDate.forDate(firstOfMonth.localYear, firstOfMonth.localMonth, 1),\n DateFormat['LONG_MONTH_AND_YEAR']\n ),\n monthArrayIndex: quantityOfMonths(this.today, firstOfMonth) - 1,\n } as Month;\n const lastOfMonth =\n monthBase.id === toMonthId(endDate) ? endDate.localDay : firstOfMonth.plusMonths(1).minusDays(1).localDay;\n\n let day = new LocalDate(firstDate.id);\n\n // month has weeks\n for (let week = 0; week < totalWeeks; week++) {\n const currentWeek = { days: [] };\n\n // week has days\n for (let weekday = 0; weekday < daysPerWeek; weekday++) {\n if (day.localMonth !== firstOfMonth.localMonth) {\n break;\n }\n\n // Add spacer to the start if needed\n if (week === 0 && weekday === 0 && this.weekdayMap.get(day.weekday) > 0) {\n currentWeek.days.push({\n spacer: this.weekdayMap.get(day.weekday),\n spacerType: SpacerType.START,\n });\n\n weekday = weekday + this.weekdayMap.get(day.weekday);\n }\n\n if (day.lte(endDate)) {\n // Add actual day\n const label = new DateFormat(this._dateLabels).format(day, new Pattern('dateFormatFullDetailed', true));\n\n currentWeek.days.push({\n id: day.id,\n // month: monthBase,\n value: day.localDay,\n date: day,\n weekday: this.weekdayMap.get(day.weekday),\n today: day.equals(this.today),\n focused: false,\n selected: false,\n disabled: this._disabledDateRanges ? this.isDateDisabled(day) : false,\n tabindex: -1,\n ariaLabel: label,\n });\n }\n\n // Add spacer to the end if needed\n if (lastOfMonth === day.localDay && weekday !== 6) {\n currentWeek.days.push({\n spacer: 7 - day.weekday,\n spacerType: SpacerType.END,\n });\n }\n\n day = day.plusDays(1);\n }\n\n if (currentWeek.days.length === 0) {\n currentWeek.days.push({ spacer: 7, spacerType: SpacerType.END });\n }\n weeks.push(currentWeek);\n }\n\n return monthBase;\n }\n\n private nextState(options: Partial<CalendarViewModel>) {\n const newState = this.updateState(options);\n if (!isDeepEqual(newState, this._state)) {\n this.updateMonthsState(newState);\n this._state = newState;\n this._dataModel$.next(this._state);\n }\n }\n\n private updateMonthsState(state: CalendarViewModel) {\n const { selectedDates, focusDate } = state;\n\n state.months.forEach((month) => {\n month.weeks.forEach((week) => {\n week.days.forEach((day) => {\n // skip the spacers\n if (day?.spacer) {\n return;\n }\n\n if (isPresent(focusDate)) {\n day.focused = focusDate.equals(day.date);\n }\n\n // calculating tabindex\n day.tabindex = isPresent(focusDate) && day.date.equals(focusDate) ? 0 : -1;\n\n // override context disabled\n day.disabled = this._disabledDateRanges ? this.isDateDisabled(day.date) : false;\n\n // update day selection\n day.selected = selectedDates.startDate?.equals(day.date) || selectedDates.endDate?.equals(day.date);\n\n const label = new DateFormat(this._dateLabels).format(day.date, new Pattern('dateFormatFullDetailed', true));\n\n // update day aria label\n day.ariaLabel = `${label} ${day.selected ? this._selectedLabel : ''}`;\n });\n });\n });\n }\n\n private updateState(options: Partial<CalendarViewModel>) {\n const state = Object.assign({}, this._state, options);\n const isVerticalScroll = state.isMobile && state.navigationType === CalendarNavigationType.MIXED;\n\n let startDate = this.firstSelectableDay(state.firstDate, state.minDate, state.maxDate);\n\n if ('isMobile' in options && state.isMobile && state.navigationType !== CalendarNavigationType.MIXED) {\n // early break if it is mobile and navigation type is different than MIXED\n // only the combination of navigation type MIXED and isMobile should trigger full update of the state\n return state;\n }\n\n if ('showTags' in options) {\n if (state.showTags) {\n state.monthTags = this.createMonthTags(state.minDate, state.maxDate);\n } else {\n state.monthTags = [];\n }\n }\n\n // focus date changed\n if ('focusDate' in options) {\n const focusDate = this.getDateInRange(state.focusDate, state.minDate, state.maxDate);\n startDate = this.getDateInRange(this.toValidDate(focusDate, state).firstDayOfMonth, state.minDate, state.maxDate);\n\n // nothing to rebuild if only focus changed and it is still visible\n if (\n state.months.length > 0 &&\n state.focusDate &&\n !state.focusDate.lt(state.firstDate) &&\n !state.focusDate.gt(state.lastDate)\n ) {\n return state;\n }\n }\n\n // selectedDates changes\n if ('selectedDates' in options && this.validateSelectedDates(options.selectedDates, state)) {\n if (isPresent(state.selectedDates.startDate) && state.scrollOnInit && !isVerticalScroll) {\n const isFirstMonth = state.selectedDates.startDate.firstDayOfMonth.equals(state.minDate?.firstDayOfMonth);\n const date = this.toValidDate(state.selectedDates.startDate, state);\n startDate =\n isFirstMonth && !isPresent(state.firstDate)\n ? state.minDate\n : state.enableMonthScrollingAfterSelection\n ? date\n : isPresent(state.firstDate)\n ? state.firstDate\n : date;\n }\n }\n\n // first date changed\n if ('firstDate' in options) {\n state.firstDate = this.getDateInRange(state.firstDate, state.minDate, state.maxDate);\n startDate = state.firstDate;\n }\n\n // rebuilding months\n if (isPresent(startDate)) {\n if (isVerticalScroll && state.loadAmount > 0 && !startDate.equals(state.minDate)) {\n // adjust focusDate and startDate when it is vertical scroll\n startDate = state.minDate;\n }\n\n if (isVerticalScroll && 'selectedDates' in options) {\n // we need to patch the already loaded months\n state.loadAmount = state.months.length;\n }\n\n const months = this.createMonths(startDate, state.maxDate, state.displayMonths, state.loadAmount).months;\n\n // updating months and boundary dates\n state.months = months;\n const firstValidVisibleDate = months[0].weeks[0].days.find((day) => isPresent(day?.id))?.date;\n state.firstDate = firstValidVisibleDate?.firstDayOfMonth?.gt(state.minDate)\n ? firstValidVisibleDate.firstDayOfMonth\n : state.minDate;\n\n const lastValidVisibleDate = months[months.length - 1].weeks[0].days.find((day) => isPresent(day?.id))?.date;\n state.lastDate = lastValidVisibleDate?.lastDayOfMonth?.lt(state.maxDate)\n ? lastValidVisibleDate.lastDayOfMonth\n : state.maxDate;\n\n // reset loadMore after the update\n state.loadAmount = 0;\n\n // adjusting focus after months were built\n if (!state.focusDate || !isVerticalScroll) {\n state.focusDate = state?.selectedDates?.startDate ?? startDate;\n }\n\n // updating arrows visibility\n if (\n !isPresent(this._state.firstDate) ||\n !state.firstDate.equals(this._state.firstDate) ||\n 'minDate' in options ||\n 'maxDate' in options ||\n !isVerticalScroll\n ) {\n state.prevDisabled =\n isPresent(state.minDate) &&\n state.minDate.isBetween(state.firstDate.firstDayOfMonth, state.firstDate.lastDayOfMonth);\n state.nextDisabled =\n isPresent(state.maxDate) &&\n state.maxDate.isBetween(state.lastDate.firstDayOfMonth, state.lastDate.lastDayOfMonth);\n }\n }\n return state;\n }\n\n private getDateInRange(\n date?: LocalDate | null,\n minDate?: LocalDate | null,\n maxDate?: LocalDate | null\n ): LocalDate | null {\n if (isPresent(date) && isPresent(minDate) && date.lt(minDate)) {\n return minDate;\n }\n if (isPresent(date) && isPresent(maxDate) && date.gt(maxDate)) {\n return maxDate;\n }\n\n return date || null;\n }\n\n private validateSelectedDates(selectedDates: DateSelection, state: CalendarViewModel) {\n const { minDate, maxDate } = state;\n const { startDate, endDate } = selectedDates;\n\n if (isPresent(startDate) && !startDate.isBetween(minDate, maxDate)) {\n return false;\n }\n\n if (isPresent(endDate) && (!isPresent(startDate) || !endDate.isBetween(startDate, maxDate))) {\n return false;\n }\n\n return true;\n }\n\n private toValidDate(date: LocalDate, state = this._state): LocalDate {\n // we make sure it is a valid date\n const isValidDate = isPresent(date) && date.isBetween(state.minDate, state.maxDate);\n // based of the chosen view we need to make sure we set valid first date\n const isLastMonth = date.firstDayOfMonth.equals(state.maxDate?.firstDayOfMonth) && state.displayMonths === 2;\n\n if (isValidDate && !isLastMonth) {\n return date;\n } else if (isValidDate && isLastMonth) {\n return date.minusMonths(1);\n } else {\n return this.today;\n }\n }\n\n /**\n * Gets first valid non disable date\n * @param firstDate visible from state\n * @param minDate of calendar from state\n * @param maxDate of calendar from state\n * @returns valid non disable date\n */\n private firstSelectableDay(firstDate: LocalDate, minDate: LocalDate, maxDate: LocalDate): LocalDate {\n let validDate = isPresent(firstDate) && firstDate?.isBetween(minDate, maxDate) ? firstDate : minDate;\n\n if (this._disabledDateRanges) {\n for (const [startDate, endDate] of this._disabledDateRanges) {\n // if the current validDate is before the start of the current range,\n // it's a valid selectable date since it's not within any disabled range\n if (validDate.lt(startDate)) {\n return validDate;\n }\n\n // if the current validDate is within a disabled range, move it to the day after the end of this range\n if (validDate.isBetween(startDate, endDate)) {\n validDate = endDate.plusDays(1);\n }\n }\n }\n return validDate;\n }\n\n /**\n * Checks if given date is disabled\n * @param date to be checks\n * @returns boolean\n */\n private isDateDisabled(date: LocalDate) {\n return this._disabledDateRanges\n .filter((disabledDateRange) => disabledDateRange.length)\n .some((disabledDateRange) => date.isBetween(disabledDateRange[0], disabledDateRange[1]));\n }\n}\n","<cms-disruptions\n *ngIf=\"enableGlobalBanner\"\n [disruptions]=\"collection$ | async\"\n [isGlobalBanner]=\"true\"\n></cms-disruptions>\n","import { Component } from '@angular/core';\n\nimport { select, Store } from '@ngrx/store';\nimport { combineLatest, EMPTY, map, NEVER, Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, switchMap, take } from 'rxjs/operators';\n\nimport { AppState, ConfigService } from '@fcom/core';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsDataService } from '@fcom/core/services';\nimport { CmsCollection } from '@fcom/core-api';\nimport { getViewedNotifications } from '@fcom/common/store';\n\n@Component({\n selector: 'fin-cms-global-disruption-banner',\n templateUrl: './cms-global-disruption-banner.component.html',\n})\nexport class CmsGlobalDisruptionBannerComponent {\n collection$: Observable<CmsCollection> = EMPTY;\n notificationNumbers$: Observable<number> = EMPTY;\n enableGlobalBanner: boolean = false;\n\n constructor(\n private languageService: LanguageService,\n private cmsDataService: CmsDataService,\n private configService: ConfigService,\n private store$: Store<AppState>\n ) {\n this.enableGlobalBanner = this.configService.cfg.enableGlobalBanner;\n\n if (this.enableGlobalBanner) {\n this.collection$ = this.languageService.translate('fragments.globalDisturbanceBanner.url').pipe(\n filter(Boolean),\n distinctUntilChanged(),\n switchMap((url) => (url ? this.cmsDataService.getFragmentJson(url) : NEVER)),\n take(1)\n ) as Observable<CmsCollection>;\n\n this.notificationNumbers$ = combineLatest([\n this.store$.pipe(select(getViewedNotifications)),\n this.collection$,\n ]).pipe(\n map(\n ([viewedNotificationsIds, collection]) =>\n collection.items.filter(({ contentId }) => !viewedNotificationsIds.includes(contentId)).length\n )\n );\n }\n }\n}\n","import { CartStatus } from '@fcom/dapi/interfaces';\nimport { isNotEmpty, isPresent } from '@fcom/core/utils';\nimport { FinnairCart } from '@fcom/dapi/api/models';\n\nconst CART_ERROR_STATES: CartStatus[] = [CartStatus.INITIAL, CartStatus.CREATION_ERROR, CartStatus.LOAD_ERROR];\n\nexport const isCartInErrorStateOrDoWeHaveTravelers = (\n cartData: FinnairCart = {} as FinnairCart,\n cartStatus: CartStatus,\n initialRoute: boolean\n): boolean => {\n return (\n CART_ERROR_STATES.indexOf(cartStatus) === -1 &&\n (!initialRoute ||\n (initialRoute && isNotEmpty(cartData.passengers) && cartData.passengers.every((t) => !!t.firstName)))\n );\n};\n\nexport const isAncillariesSkipped = (cartData: FinnairCart = {} as FinnairCart): boolean => {\n return !isPresent(cartData) || !isPresent(cartData.controlData)\n ? false\n : !cartData.controlData.sellAncillariesOutbound && !cartData.controlData.sellAncillariesInbound;\n};\n\nexport enum CountryCode {\n KOREA = 'KR',\n CHINA = 'CN',\n}\n","import { CartPassengersRequest, LocationInfoMap, PaxDetailsFormData } from '@fcom/dapi/interfaces';\nimport { isTruthy } from '@fcom/core/utils';\nimport {\n Category,\n FinnairAirBoundsResponse,\n FinnairBoundGroup,\n FinnairBoundItem,\n FinnairItineraryItemFlight,\n FinnairPhoneType,\n FinnairTravelEndpoint,\n SubCategory,\n} from '@fcom/dapi/api/models';\nimport { FinnairBoundItemWithLocation, FinnairTravelLocation } from '@fcom/common-booking';\nimport { formatDateOfBirth } from '@fcom/common-booking/utils/date-utils';\nimport { isFlight } from '@fcom/common-booking/utils/common-booking.utils';\nimport { PaxDetailsState } from '@fcom/common/interfaces/booking';\nimport { FinnairAirBounds, FinnairBoundGroupWithLocation } from '@fcom/common/interfaces/booking/offers.interface';\n\nexport const mapTravelersAndCorporateCode = (paxDetailsState: PaxDetailsState): CartPassengersRequest => {\n const getAccompanyingTravelerId = (tid: string) => {\n if (!tid) {\n return null;\n }\n const traveler = paxDetailsState.passengers.find((t) => t.id === tid);\n return traveler ? traveler.travelerId : null;\n };\n\n return {\n passengers: paxDetailsState.passengers.map((passenger) => ({\n id: passenger.travelerId,\n passengerTypeCode: passenger.type,\n firstName: passenger.firstName,\n lastName: passenger.lastName,\n title: passenger.gender,\n dateOfBirth: formatDateOfBirth(passenger.birthDate),\n email: passenger.email as any,\n phoneNumbers: isTruthy(passenger.phone?.phoneNumber)\n ? [\n {\n countryPrefix: passenger.phone.phonePrefix.split('|')[1],\n countryCode: passenger.phone.phonePrefix.split('|')[0],\n number: passenger.phone.phoneNumber,\n type: FinnairPhoneType.MOBILE,\n },\n ]\n : [],\n frequentFlyerCards: isTruthy(passenger.frequentFlyerCard?.cardNumber && passenger.frequentFlyerCard?.companyCode)\n ? [\n {\n companyCode: passenger.frequentFlyerCard.companyCode,\n cardNumber: passenger.frequentFlyerCard.cardNumber,\n },\n ]\n : [],\n accompanyingTravelerId: getAccompanyingTravelerId(passenger.travelling),\n })),\n joinFinnairPlus: paxDetailsState.passengers.reduce(\n (joinFinnairPlus: boolean, formData: PaxDetailsFormData) => joinFinnairPlus || !!formData.joinFinnairPlus,\n false\n ),\n corporateCode: paxDetailsState.corporateCode,\n additionalEmails: paxDetailsState.additionalEmails,\n corporateUserInformation: {\n clientId: paxDetailsState.corporateCode,\n },\n };\n};\n\nexport const getUpdateId = (category: Category | SubCategory, fragmentId: string): string => {\n return `${fragmentId}-${category}`;\n};\n\nconst asLegEndpointWithCityNameAndAirport = (\n legEndpoint: FinnairTravelEndpoint,\n locations: LocationInfoMap\n): FinnairTravelLocation => {\n return {\n ...legEndpoint,\n cityName: locations[legEndpoint.locationCode].cityName,\n name: locations[legEndpoint.locationCode].name,\n countryCode: locations[legEndpoint.locationCode].countryCode,\n };\n};\n\nconst asBoundInfoWithCityNameAndAirport = (\n boundInfo: FinnairBoundItem,\n locations: LocationInfoMap\n): FinnairBoundItemWithLocation => ({\n ...boundInfo,\n departure: asLegEndpointWithCityNameAndAirport(boundInfo.departure, locations),\n arrival: asLegEndpointWithCityNameAndAirport(boundInfo.arrival, locations),\n});\n\nexport const mapCityNameAndAirportToBounds = (bounds: FinnairAirBoundsResponse): FinnairAirBounds => {\n const { boundGroups, locations } = bounds;\n const enhancedBoundGroups: FinnairBoundGroupWithLocation[] = boundGroups.map((bound) => ({\n ...bound,\n details: asBoundInfoWithCityNameAndAirport(bound.details, locations),\n }));\n\n return { ...bounds, boundGroups: enhancedBoundGroups };\n};\n\nconst getBoundGroupFromBoundsByFlightNumber = (\n bounds: FinnairAirBoundsResponse,\n flightNumberQueryParam: string\n): FinnairBoundGroup | undefined => {\n const flightNumbers = flightNumberQueryParam?.split(',');\n if (!flightNumbers) {\n return undefined;\n }\n\n return bounds.boundGroups.find((boundGroup) => {\n const foundFlightNumbers = boundGroup.details.itinerary\n .filter(isFlight)\n .map((flight: FinnairItineraryItemFlight) => flight.flightNumber);\n\n return (\n flightNumbers.length === foundFlightNumbers.length &&\n foundFlightNumbers.every((item) => flightNumbers.includes(item))\n );\n });\n};\n\nconst getFareFamilyFromBoundGroup = (boundGroup: FinnairBoundGroup, fareFamily: string | undefined): string => {\n const { fareFamilies, cheapestPrice } = boundGroup;\n return (\n fareFamilies.find((item) => item.fareFamilyCode === fareFamily)?.id ??\n fareFamilies.find((item) => item.price === cheapestPrice).id\n );\n};\n\nexport const mapAirBoundIdToBound = (\n bounds: FinnairAirBoundsResponse,\n flightNumber: string,\n fareFamily?: string | undefined\n): string | undefined => {\n const boundGroup = getBoundGroupFromBoundsByFlightNumber(bounds, flightNumber);\n return boundGroup ? getFareFamilyFromBoundGroup(boundGroup, fareFamily) : undefined;\n};\n\nexport const NON_SCHENGEN_LOUNGES = ['LOUC', 'LOUN'];\nexport const SCHENGEN_LOUNGES = ['LOUS'];\n","import { OfferListFetchParams } from '@fcom/common/interfaces';\nimport { OffersPerBound } from '@fcom/common/interfaces/booking/multi-city-state.interface';\nimport { mergeDeep } from '@fcom/core/utils';\nimport { FinnairSearchParameters, Offer } from '@fcom/dapi/api/models';\n\nexport interface PricesPerFareFamily {\n [fareFamilyCode: string]: string;\n}\n\nexport interface PriceCombinations {\n outboundPrices: PricesPerFareFamily;\n inboundPrices: PricesPerFareFamily;\n}\n\nexport type TicketTypeSelection = {\n outbound: string;\n inbound: string;\n};\n\nconst cheapestPrices = (\n offers: Offer[],\n fareFamilyCodeFn: { (o: Offer): string },\n priceFn: { (o: Offer): string }\n): PricesPerFareFamily => {\n return offers\n .filter((o) => !!fareFamilyCodeFn(o))\n .reduce((all, o) => {\n const fareFamilyCode: string = fareFamilyCodeFn(o);\n const offerPrice: string = priceFn(o);\n\n if (!all[fareFamilyCode]) {\n all[fareFamilyCode] = offerPrice;\n return all;\n }\n\n const currentAmount = all[fareFamilyCode];\n all[fareFamilyCode] = +currentAmount < +offerPrice ? currentAmount : offerPrice;\n\n return all;\n }, {});\n};\n\nconst pricesForCombination = (\n offers: Offer[],\n offerFilterFn: { (o: Offer): boolean },\n fareFamilyCodeFn: { (o: Offer): string },\n priceFn: { (o: Offer): string }\n): PricesPerFareFamily => {\n return offers.filter(offerFilterFn).reduce((all, offer) => {\n all[fareFamilyCodeFn(offer)] = priceFn(offer);\n return all;\n }, {});\n};\n\nexport const calculatePriceCombinations = ([offers, { outbound, inbound }]: [\n Offer[],\n TicketTypeSelection,\n]): PriceCombinations => {\n const cheapestOutboundPrices: PricesPerFareFamily = cheapestPrices(\n offers,\n (o) => o.outboundFareFamily,\n (o) => o.outboundPrice\n );\n const outboundPrices: PricesPerFareFamily = pricesForCombination(\n offers,\n (o) => o.inboundFareFamily === inbound && !!o.outboundPrice && !!o.outboundFareFamily,\n (o) => o.outboundFareFamily,\n (o) => o.outboundPrice\n );\n const cheapestInboundPrices: PricesPerFareFamily = cheapestPrices(\n offers,\n (o) => o.inboundFareFamily,\n (o) => o.inboundPrice\n );\n const inboundPrices: PricesPerFareFamily = pricesForCombination(\n offers,\n (o) => o.outboundFareFamily === outbound && !!o.inboundPrice && !!o.inboundFareFamily,\n (o) => o.inboundFareFamily,\n (o) => o.inboundPrice\n );\n\n return {\n outboundPrices: mergeDeep(cheapestOutboundPrices, outboundPrices),\n inboundPrices: mergeDeep(cheapestInboundPrices, inboundPrices),\n };\n};\n\nexport const convertOfferListFetchParamsToFinnairSearchParameters = (\n params: OfferListFetchParams\n): FinnairSearchParameters => {\n return {\n ...params.paxAmount,\n cabin: params.cabin,\n directFlights: params.directFlights,\n isAward: params.isAward,\n itinerary: params.flights.map((flight) => {\n return {\n departureLocationCode: flight.origin,\n destinationLocationCode: flight.destination,\n departureDate: flight.departureDate.id,\n };\n }),\n locale: params.locale,\n promoCode: params.promoCode,\n };\n};\n\nexport const sortByPriceAndDeparture = (a: OffersPerBound, b: OffersPerBound): number => {\n const priceComparison = +a.fareFamily.totalPrice - +b.fareFamily.totalPrice;\n if (priceComparison !== 0) {\n return priceComparison;\n }\n return new Date(a.boundInfo.departure.dateTime).getTime() - new Date(b.boundInfo.departure.dateTime).getTime();\n};\n","import { isPresent } from '@fcom/core/utils';\n\nexport const onlyChangedValues =\n (previousSelections: string[]) =>\n ([val, i]: [string, number]): boolean =>\n previousSelections[i] !== val;\n\n/**\n * Will go through an array of strings, and look for indexes that have a certain value.\n * Will ignore one index in the process, and return the indexes that have the certain value.\n * @param input Array of strings to be looped through\n * @param indexToIgnore\n * @param newValue\n * @returns An array of indexes\n */\n\nexport const indexesOfWantedValue = (input: string[], indexToIgnore: number, newValue: string): number[] =>\n input.map((val, i) => (i !== indexToIgnore && val === newValue ? i : undefined)).filter(isPresent);\n","import { NgModuleRef } from '@angular/core';\n\nimport { TimeAndGeoipProvider, GeolocationService } from '@fcom/core/services';\nimport { captureException, initSentry } from '@fcom/core/services/sentry/sentry.module';\nimport { parseGeolocationFromUrlHash } from '@fcom/dapi/utils';\n\nimport { ClientModule } from './app/client.module';\nimport { environment } from '../../environments/environment';\n\ninitSentry();\n\nexport { captureException };\n\nexport const preInit = (module: NgModuleRef<ClientModule>) => {\n const geoIpProvider: TimeAndGeoipProvider = module.injector.get(TimeAndGeoipProvider);\n const geolocationService: GeolocationService = module.injector.get(GeolocationService);\n\n geoIpProvider.triggerTimeAndGeoipFetch();\n geolocationService.init(parseGeolocationFromUrlHash());\n};\n\nexport const init = (): Function => {\n if (!environment.storageRoot) {\n const match = /storageRoot=(\\w+)/.exec(window.location.search);\n window['storageRoot'] = match?.[1] || '';\n }\n\n return () => {};\n};\n","import { Action } from '@ngrx/store';\n\nexport const PERFORM_ACTION = 'PERFORM_ACTION';\nexport const REFRESH = 'REFRESH';\nexport const RESET = 'RESET';\nexport const ROLLBACK = 'ROLLBACK';\nexport const COMMIT = 'COMMIT';\nexport const SWEEP = 'SWEEP';\nexport const TOGGLE_ACTION = 'TOGGLE_ACTION';\nexport const SET_ACTIONS_ACTIVE = 'SET_ACTIONS_ACTIVE';\nexport const JUMP_TO_STATE = 'JUMP_TO_STATE';\nexport const JUMP_TO_ACTION = 'JUMP_TO_ACTION';\nexport const IMPORT_STATE = 'IMPORT_STATE';\nexport const LOCK_CHANGES = 'LOCK_CHANGES';\nexport const PAUSE_RECORDING = 'PAUSE_RECORDING';\n\nexport class PerformAction implements Action {\n readonly type = PERFORM_ACTION;\n\n constructor(public action: Action, public timestamp: number) {\n if (typeof action.type === 'undefined') {\n throw new Error(\n 'Actions may not have an undefined \"type\" property. ' +\n 'Have you misspelled a constant?'\n );\n }\n }\n}\n\nexport class Refresh implements Action {\n readonly type = REFRESH;\n}\n\nexport class Reset implements Action {\n readonly type = RESET;\n\n constructor(public timestamp: number) {}\n}\n\nexport class Rollback implements Action {\n readonly type = ROLLBACK;\n\n constructor(public timestamp: number) {}\n}\n\nexport class Commit implements Action {\n readonly type = COMMIT;\n\n constructor(public timestamp: number) {}\n}\n\nexport class Sweep implements Action {\n readonly type = SWEEP;\n}\n\nexport class ToggleAction implements Action {\n readonly type = TOGGLE_ACTION;\n\n constructor(public id: number) {}\n}\n\nexport class SetActionsActive implements Action {\n readonly type = SET_ACTIONS_ACTIVE;\n\n constructor(public start: number, public end: number, public active = true) {}\n}\n\nexport class JumpToState implements Action {\n readonly type = JUMP_TO_STATE;\n\n constructor(public index: number) {}\n}\n\nexport class JumpToAction implements Action {\n readonly type = JUMP_TO_ACTION;\n\n constructor(public actionId: number) {}\n}\n\nexport class ImportState implements Action {\n readonly type = IMPORT_STATE;\n\n constructor(public nextLiftedState: any) {}\n}\n\nexport class LockChanges implements Action {\n readonly type = LOCK_CHANGES;\n\n constructor(public status: boolean) {}\n}\n\nexport class PauseRecording implements Action {\n readonly type = PAUSE_RECORDING;\n\n constructor(public status: boolean) {}\n}\n\nexport type All =\n | PerformAction\n | Refresh\n | Reset\n | Rollback\n | Commit\n | Sweep\n | ToggleAction\n | SetActionsActive\n | JumpToState\n | JumpToAction\n | ImportState\n | LockChanges\n | PauseRecording;\n","import { ActionReducer, Action } from '@ngrx/store';\nimport { InjectionToken } from '@angular/core';\n\nexport type ActionSanitizer = (action: Action, id: number) => Action;\nexport type StateSanitizer = (state: any, index: number) => any;\nexport type SerializationOptions = {\n options?: boolean | any;\n replacer?: (key: any, value: any) => {};\n reviver?: (key: any, value: any) => {};\n immutable?: any;\n refs?: Array<any>;\n};\nexport type Predicate = (state: any, action: Action) => boolean;\n\n/**\n * Chrome extension documentation\n * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md#features\n * Firefox extension documentation\n * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#features\n */\nexport interface DevToolsFeatureOptions {\n /**\n * Start/pause recording of dispatched actions\n */\n pause?: boolean;\n /**\n * Lock/unlock dispatching actions and side effects\n */\n lock?: boolean;\n /**\n * Persist states on page reloading\n */\n persist?: boolean;\n /**\n * Export history of actions in a file\n */\n export?: boolean;\n /**\n * Import history of actions from a file\n */\n import?: 'custom' | boolean;\n /**\n * Jump back and forth (time travelling)\n */\n jump?: boolean;\n /**\n * Skip (cancel) actions\n */\n skip?: boolean;\n /**\n * Drag and drop actions in the history list\n */\n reorder?: boolean;\n /**\n * Dispatch custom actions or action creators\n */\n dispatch?: boolean;\n /**\n * Generate tests for the selected actions\n */\n test?: boolean;\n}\n\n/**\n * Chrome extension documentation\n * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md\n * Firefox extension documentation\n * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md\n */\nexport class StoreDevtoolsConfig {\n /**\n * Maximum allowed actions to be stored in the history tree (default: `false`)\n */\n maxAge: number | false = false;\n monitor?: ActionReducer<any, any>;\n /**\n * Function which takes `action` object and id number as arguments, and should return `action` object back.\n */\n actionSanitizer?: ActionSanitizer;\n /**\n * Function which takes `state` object and index as arguments, and should return `state` object back.\n */\n stateSanitizer?: StateSanitizer;\n /**\n * The instance name to be shown on the monitor page (default: `document.title`)\n */\n name?: string;\n serialize?: boolean | SerializationOptions;\n logOnly?: boolean;\n features?: DevToolsFeatureOptions;\n /**\n * Action types to be hidden in the monitors. If `actionsSafelist` specified, `actionsBlocklist` is ignored.\n */\n actionsBlocklist?: string[];\n /**\n * Action types to be shown in the monitors\n */\n actionsSafelist?: string[];\n /**\n * Called for every action before sending, takes state and action object, and returns true in case it allows sending the current data to the monitor.\n */\n predicate?: Predicate;\n /**\n * Auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.\n */\n autoPause?: boolean;\n\n /**\n * If set to true, will include stack trace for every dispatched action\n */\n trace?: boolean | (() => string);\n\n /**\n * Maximum stack trace frames to be stored (in case trace option was provided as true).\n */\n traceLimit?: number;\n\n /**\n * The property determines whether the extension connection is established within the\n * Angular zone or not. It is set to `false` by default.\n */\n connectInZone?: boolean;\n}\n\nexport const STORE_DEVTOOLS_CONFIG = new InjectionToken<StoreDevtoolsConfig>(\n '@ngrx/store-devtools Options'\n);\n\n/**\n * Used to provide a `StoreDevtoolsConfig` for the store-devtools.\n */\nexport const INITIAL_OPTIONS = new InjectionToken<StoreDevtoolsConfig>(\n '@ngrx/store-devtools Initial Config'\n);\n\nexport type StoreDevtoolsOptions =\n | Partial<StoreDevtoolsConfig>\n | (() => Partial<StoreDevtoolsConfig>);\n\nexport function noMonitor(): null {\n return null;\n}\n\nexport const DEFAULT_NAME = 'NgRx Store DevTools';\n\nexport function createConfig(\n optionsInput: StoreDevtoolsOptions\n): StoreDevtoolsConfig {\n const DEFAULT_OPTIONS: StoreDevtoolsConfig = {\n maxAge: false,\n monitor: noMonitor,\n actionSanitizer: undefined,\n stateSanitizer: undefined,\n name: DEFAULT_NAME,\n serialize: false,\n logOnly: false,\n autoPause: false,\n trace: false,\n traceLimit: 75,\n // Add all features explicitly. This prevent buggy behavior for\n // options like \"lock\" which might otherwise not show up.\n features: {\n pause: true, // Start/pause recording of dispatched actions\n lock: true, // Lock/unlock dispatching actions and side effects\n persist: true, // Persist states on page reloading\n export: true, // Export history of actions in a file\n import: 'custom', // Import history of actions from a file\n jump: true, // Jump back and forth (time travelling)\n skip: true, // Skip (cancel) actions\n reorder: true, // Drag and drop actions in the history list\n dispatch: true, // Dispatch custom actions or action creators\n test: true, // Generate tests for the selected actions\n },\n connectInZone: false,\n };\n\n const options =\n typeof optionsInput === 'function' ? optionsInput() : optionsInput;\n const logOnly = options.logOnly\n ? { pause: true, export: true, test: true }\n : false;\n const features: NonNullable<Partial<StoreDevtoolsConfig['features']>> =\n options.features ||\n logOnly ||\n (DEFAULT_OPTIONS.features as NonNullable<\n Partial<StoreDevtoolsConfig['features']>\n >);\n if (features.import === true) {\n features.import = 'custom';\n }\n const config = Object.assign({}, DEFAULT_OPTIONS, { features }, options);\n\n if (config.maxAge && config.maxAge < 2) {\n throw new Error(\n `Devtools 'maxAge' cannot be less than 2, got ${config.maxAge}`\n );\n }\n\n return config;\n}\n","import { Action } from '@ngrx/store';\n\nimport * as Actions from './actions';\nimport {\n ActionSanitizer,\n StateSanitizer,\n Predicate,\n StoreDevtoolsConfig,\n} from './config';\nimport {\n ComputedState,\n LiftedAction,\n LiftedActions,\n LiftedState,\n} from './reducer';\n\nexport function difference(first: any[], second: any[]) {\n return first.filter((item) => second.indexOf(item) < 0);\n}\n\n/**\n * Provides an app's view into the state of the lifted store.\n */\nexport function unliftState(liftedState: LiftedState) {\n const { computedStates, currentStateIndex } = liftedState;\n\n // At start up NgRx dispatches init actions,\n // When these init actions are being filtered out by the predicate or safe/block list options\n // we don't have a complete computed states yet.\n // At this point it could happen that we're out of bounds, when this happens we fall back to the last known state\n if (currentStateIndex >= computedStates.length) {\n const { state } = computedStates[computedStates.length - 1];\n return state;\n }\n\n const { state } = computedStates[currentStateIndex];\n return state;\n}\n\nexport function unliftAction(liftedState: LiftedState): LiftedAction {\n return liftedState.actionsById[liftedState.nextActionId - 1];\n}\n\n/**\n * Lifts an app's action into an action on the lifted store.\n */\nexport function liftAction(action: Action) {\n return new Actions.PerformAction(action, +Date.now());\n}\n\n/**\n * Sanitizes given actions with given function.\n */\nexport function sanitizeActions(\n actionSanitizer: ActionSanitizer,\n actions: LiftedActions\n): LiftedActions {\n return Object.keys(actions).reduce((sanitizedActions, actionIdx) => {\n const idx = Number(actionIdx);\n sanitizedActions[idx] = sanitizeAction(actionSanitizer, actions[idx], idx);\n return sanitizedActions;\n }, <LiftedActions>{});\n}\n\n/**\n * Sanitizes given action with given function.\n */\nexport function sanitizeAction(\n actionSanitizer: ActionSanitizer,\n action: LiftedAction,\n actionIdx: number\n): LiftedAction {\n return {\n ...action,\n action: actionSanitizer(action.action, actionIdx),\n };\n}\n\n/**\n * Sanitizes given states with given function.\n */\nexport function sanitizeStates(\n stateSanitizer: StateSanitizer,\n states: ComputedState[]\n): ComputedState[] {\n return states.map((computedState, idx) => ({\n state: sanitizeState(stateSanitizer, computedState.state, idx),\n error: computedState.error,\n }));\n}\n\n/**\n * Sanitizes given state with given function.\n */\nexport function sanitizeState(\n stateSanitizer: StateSanitizer,\n state: any,\n stateIdx: number\n) {\n return stateSanitizer(state, stateIdx);\n}\n\n/**\n * Read the config and tell if actions should be filtered\n */\nexport function shouldFilterActions(config: StoreDevtoolsConfig) {\n return config.predicate || config.actionsSafelist || config.actionsBlocklist;\n}\n\n/**\n * Return a full filtered lifted state\n */\nexport function filterLiftedState(\n liftedState: LiftedState,\n predicate?: Predicate,\n safelist?: string[],\n blocklist?: string[]\n): LiftedState {\n const filteredStagedActionIds: number[] = [];\n const filteredActionsById: LiftedActions = {};\n const filteredComputedStates: ComputedState[] = [];\n liftedState.stagedActionIds.forEach((id, idx) => {\n const liftedAction = liftedState.actionsById[id];\n if (!liftedAction) return;\n if (\n idx &&\n isActionFiltered(\n liftedState.computedStates[idx],\n liftedAction,\n predicate,\n safelist,\n blocklist\n )\n ) {\n return;\n }\n filteredActionsById[id] = liftedAction;\n filteredStagedActionIds.push(id);\n filteredComputedStates.push(liftedState.computedStates[idx]);\n });\n return {\n ...liftedState,\n stagedActionIds: filteredStagedActionIds,\n actionsById: filteredActionsById,\n computedStates: filteredComputedStates,\n };\n}\n\n/**\n * Return true is the action should be ignored\n */\nexport function isActionFiltered(\n state: any,\n action: LiftedAction,\n predicate?: Predicate,\n safelist?: string[],\n blockedlist?: string[]\n) {\n const predicateMatch = predicate && !predicate(state, action.action);\n const safelistMatch =\n safelist &&\n !action.action.type.match(safelist.map((s) => escapeRegExp(s)).join('|'));\n const blocklistMatch =\n blockedlist &&\n action.action.type.match(blockedlist.map((s) => escapeRegExp(s)).join('|'));\n return predicateMatch || safelistMatch || blocklistMatch;\n}\n\n/**\n * Return string with escaped RegExp special characters\n * https://stackoverflow.com/a/6969486/1337347\n */\nfunction escapeRegExp(s: string): string {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import { NgZone, inject } from '@angular/core';\n\nexport type ZoneConfig =\n | { connectInZone: true; ngZone: NgZone }\n | { connectInZone: false; ngZone: null };\n\nexport function injectZoneConfig(connectInZone: boolean) {\n const ngZone = connectInZone ? inject(NgZone) : null;\n return { ngZone, connectInZone } as ZoneConfig;\n}\n","import { ActionsSubject } from '@ngrx/store';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class DevtoolsDispatcher extends ActionsSubject {}\n","import { Inject, Injectable, InjectionToken } from '@angular/core';\nimport { Action, UPDATE } from '@ngrx/store';\nimport { EMPTY, Observable, of } from 'rxjs';\nimport {\n catchError,\n concatMap,\n debounceTime,\n filter,\n map,\n share,\n switchMap,\n take,\n takeUntil,\n timeout,\n} from 'rxjs/operators';\n\nimport { IMPORT_STATE, PERFORM_ACTION } from './actions';\nimport {\n SerializationOptions,\n STORE_DEVTOOLS_CONFIG,\n StoreDevtoolsConfig,\n} from './config';\nimport { DevtoolsDispatcher } from './devtools-dispatcher';\nimport { LiftedAction, LiftedState } from './reducer';\nimport {\n isActionFiltered,\n sanitizeAction,\n sanitizeActions,\n sanitizeState,\n sanitizeStates,\n shouldFilterActions,\n unliftState,\n} from './utils';\nimport { injectZoneConfig } from './zone-config';\n\nexport const ExtensionActionTypes = {\n START: 'START',\n DISPATCH: 'DISPATCH',\n STOP: 'STOP',\n ACTION: 'ACTION',\n};\n\nexport const REDUX_DEVTOOLS_EXTENSION =\n new InjectionToken<ReduxDevtoolsExtension>(\n '@ngrx/store-devtools Redux Devtools Extension'\n );\n\nexport interface ReduxDevtoolsExtensionConnection {\n subscribe(listener: (change: any) => void): void;\n unsubscribe(): void;\n send(action: any, state: any): void;\n init(state?: any): void;\n error(anyErr: any): void;\n}\nexport interface ReduxDevtoolsExtensionConfig {\n features?: object | boolean;\n name: string | undefined;\n maxAge?: number;\n autoPause?: boolean;\n serialize?: boolean | SerializationOptions;\n trace?: boolean | (() => string);\n traceLimit?: number;\n}\n\nexport interface ReduxDevtoolsExtension {\n connect(\n options: ReduxDevtoolsExtensionConfig\n ): ReduxDevtoolsExtensionConnection;\n send(action: any, state: any, options: ReduxDevtoolsExtensionConfig): void;\n}\n\n@Injectable()\nexport class DevtoolsExtension {\n private devtoolsExtension: ReduxDevtoolsExtension;\n private extensionConnection!: ReduxDevtoolsExtensionConnection;\n\n liftedActions$!: Observable<any>;\n actions$!: Observable<any>;\n start$!: Observable<any>;\n\n private zoneConfig = injectZoneConfig(this.config.connectInZone!);\n\n constructor(\n @Inject(REDUX_DEVTOOLS_EXTENSION) devtoolsExtension: ReduxDevtoolsExtension,\n @Inject(STORE_DEVTOOLS_CONFIG) private config: StoreDevtoolsConfig,\n private dispatcher: DevtoolsDispatcher\n ) {\n this.devtoolsExtension = devtoolsExtension;\n this.createActionStreams();\n }\n\n notify(action: LiftedAction, state: LiftedState) {\n if (!this.devtoolsExtension) {\n return;\n }\n // Check to see if the action requires a full update of the liftedState.\n // If it is a simple action generated by the user's app and the recording\n // is not locked/paused, only send the action and the current state (fast).\n //\n // A full liftedState update (slow: serializes the entire liftedState) is\n // only required when:\n // a) redux-devtools-extension fires the @@Init action (ignored by\n // @ngrx/store-devtools)\n // b) an action is generated by an @ngrx module (e.g. @ngrx/effects/init\n // or @ngrx/store/update-reducers)\n // c) the state has been recomputed due to time-traveling\n // d) any action that is not a PerformAction to err on the side of\n // caution.\n if (action.type === PERFORM_ACTION) {\n if (state.isLocked || state.isPaused) {\n return;\n }\n\n const currentState = unliftState(state);\n if (\n shouldFilterActions(this.config) &&\n isActionFiltered(\n currentState,\n action,\n this.config.predicate,\n this.config.actionsSafelist,\n this.config.actionsBlocklist\n )\n ) {\n return;\n }\n const sanitizedState = this.config.stateSanitizer\n ? sanitizeState(\n this.config.stateSanitizer,\n currentState,\n state.currentStateIndex\n )\n : currentState;\n const sanitizedAction = this.config.actionSanitizer\n ? sanitizeAction(\n this.config.actionSanitizer,\n action,\n state.nextActionId\n )\n : action;\n\n this.sendToReduxDevtools(() =>\n this.extensionConnection.send(sanitizedAction, sanitizedState)\n );\n } else {\n // Requires full state update\n const sanitizedLiftedState = {\n ...state,\n stagedActionIds: state.stagedActionIds,\n actionsById: this.config.actionSanitizer\n ? sanitizeActions(this.config.actionSanitizer, state.actionsById)\n : state.actionsById,\n computedStates: this.config.stateSanitizer\n ? sanitizeStates(this.config.stateSanitizer, state.computedStates)\n : state.computedStates,\n };\n\n this.sendToReduxDevtools(() =>\n this.devtoolsExtension.send(\n null,\n sanitizedLiftedState,\n this.getExtensionConfig(this.config)\n )\n );\n }\n }\n\n private createChangesObservable(): Observable<any> {\n if (!this.devtoolsExtension) {\n return EMPTY;\n }\n\n return new Observable((subscriber) => {\n const connection = this.zoneConfig.connectInZone\n ? // To reduce change detection cycles, we need to run the `connect` method\n // outside of the Angular zone. The `connect` method adds a `message`\n // event listener to communicate with an extension using `window.postMessage`\n // and handle message events.\n this.zoneConfig.ngZone.runOutsideAngular(() =>\n this.devtoolsExtension.connect(this.getExtensionConfig(this.config))\n )\n : this.devtoolsExtension.connect(this.getExtensionConfig(this.config));\n\n this.extensionConnection = connection;\n connection.init();\n\n connection.subscribe((change: any) => subscriber.next(change));\n return connection.unsubscribe;\n });\n }\n\n private createActionStreams() {\n // Listens to all changes\n const changes$ = this.createChangesObservable().pipe(share());\n\n // Listen for the start action\n const start$ = changes$.pipe(\n filter((change: any) => change.type === ExtensionActionTypes.START)\n );\n\n // Listen for the stop action\n const stop$ = changes$.pipe(\n filter((change: any) => change.type === ExtensionActionTypes.STOP)\n );\n\n // Listen for lifted actions\n const liftedActions$ = changes$.pipe(\n filter((change) => change.type === ExtensionActionTypes.DISPATCH),\n map((change) => this.unwrapAction(change.payload)),\n concatMap((action: any) => {\n if (action.type === IMPORT_STATE) {\n // State imports may happen in two situations:\n // 1. Explicitly by user\n // 2. User activated the \"persist state accross reloads\" option\n // and now the state is imported during reload.\n // Because of option 2, we need to give possible\n // lazy loaded reducers time to instantiate.\n // As soon as there is no UPDATE action within 1 second,\n // it is assumed that all reducers are loaded.\n return this.dispatcher.pipe(\n filter((action) => action.type === UPDATE),\n timeout(1000),\n debounceTime(1000),\n map(() => action),\n catchError(() => of(action)),\n take(1)\n );\n } else {\n return of(action);\n }\n })\n );\n\n // Listen for unlifted actions\n const actions$ = changes$.pipe(\n filter((change) => change.type === ExtensionActionTypes.ACTION),\n map((change) => this.unwrapAction(change.payload))\n );\n\n const actionsUntilStop$ = actions$.pipe(takeUntil(stop$));\n const liftedUntilStop$ = liftedActions$.pipe(takeUntil(stop$));\n this.start$ = start$.pipe(takeUntil(stop$));\n\n // Only take the action sources between the start/stop events\n this.actions$ = this.start$.pipe(switchMap(() => actionsUntilStop$));\n this.liftedActions$ = this.start$.pipe(switchMap(() => liftedUntilStop$));\n }\n\n private unwrapAction(action: Action) {\n // indirect eval according to https://esbuild.github.io/content-types/#direct-eval\n return typeof action === 'string' ? (0, eval)(`(${action})`) : action;\n }\n\n private getExtensionConfig(config: StoreDevtoolsConfig) {\n const extensionOptions: ReduxDevtoolsExtensionConfig = {\n name: config.name,\n features: config.features,\n serialize: config.serialize,\n autoPause: config.autoPause ?? false,\n trace: config.trace ?? false,\n traceLimit: config.traceLimit ?? 75,\n // The action/state sanitizers are not added to the config\n // because sanitation is done in this class already.\n // It is done before sending it to the devtools extension for consistency:\n // - If we call extensionConnection.send(...),\n // the extension would call the sanitizers.\n // - If we call devtoolsExtension.send(...) (aka full state update),\n // the extension would NOT call the sanitizers, so we have to do it ourselves.\n };\n if (config.maxAge !== false /* support === 0 */) {\n extensionOptions.maxAge = config.maxAge;\n }\n return extensionOptions;\n }\n\n private sendToReduxDevtools(send: Function) {\n try {\n send();\n } catch (err: any) {\n console.warn(\n '@ngrx/store-devtools: something went wrong inside the redux devtools',\n err\n );\n }\n }\n}\n","import { ErrorHandler } from '@angular/core';\nimport { Action, ActionReducer, UPDATE, INIT } from '@ngrx/store';\n\nimport { difference, liftAction, isActionFiltered } from './utils';\nimport * as DevtoolsActions from './actions';\nimport { StoreDevtoolsConfig } from './config';\nimport { PerformAction } from './actions';\n\nexport type InitAction = {\n readonly type: typeof INIT;\n};\n\nexport type UpdateReducerAction = {\n readonly type: typeof UPDATE;\n};\n\nexport type CoreActions = InitAction | UpdateReducerAction;\nexport type Actions = DevtoolsActions.All | CoreActions;\n\nexport const INIT_ACTION = { type: INIT };\n\nexport const RECOMPUTE = '@ngrx/store-devtools/recompute' as const;\nexport const RECOMPUTE_ACTION = { type: RECOMPUTE };\n\nexport interface ComputedState {\n state: any;\n error: any;\n}\n\nexport interface LiftedAction {\n type: string;\n action: Action;\n}\n\nexport interface LiftedActions {\n [id: number]: LiftedAction;\n}\n\nexport interface LiftedState {\n monitorState: any;\n nextActionId: number;\n actionsById: LiftedActions;\n stagedActionIds: number[];\n skippedActionIds: number[];\n committedState: any;\n currentStateIndex: number;\n computedStates: ComputedState[];\n isLocked: boolean;\n isPaused: boolean;\n}\n\n/**\n * Computes the next entry in the log by applying an action.\n */\nfunction computeNextEntry(\n reducer: ActionReducer<any, any>,\n action: Action,\n state: any,\n error: any,\n errorHandler: ErrorHandler\n) {\n if (error) {\n return {\n state,\n error: 'Interrupted by an error up the chain',\n };\n }\n\n let nextState = state;\n let nextError;\n try {\n nextState = reducer(state, action);\n } catch (err: any) {\n nextError = err.toString();\n errorHandler.handleError(err);\n }\n\n return {\n state: nextState,\n error: nextError,\n };\n}\n\n/**\n * Runs the reducer on invalidated actions to get a fresh computation log.\n */\nfunction recomputeStates(\n computedStates: ComputedState[],\n minInvalidatedStateIndex: number,\n reducer: ActionReducer<any, any>,\n committedState: any,\n actionsById: LiftedActions,\n stagedActionIds: number[],\n skippedActionIds: number[],\n errorHandler: ErrorHandler,\n isPaused: boolean\n) {\n // Optimization: exit early and return the same reference\n // if we know nothing could have changed.\n if (\n minInvalidatedStateIndex >= computedStates.length &&\n computedStates.length === stagedActionIds.length\n ) {\n return computedStates;\n }\n\n const nextComputedStates = computedStates.slice(0, minInvalidatedStateIndex);\n // If the recording is paused, recompute all states up until the pause state,\n // else recompute all states.\n const lastIncludedActionId = stagedActionIds.length - (isPaused ? 1 : 0);\n for (let i = minInvalidatedStateIndex; i < lastIncludedActionId; i++) {\n const actionId = stagedActionIds[i];\n const action = actionsById[actionId].action;\n\n const previousEntry = nextComputedStates[i - 1];\n const previousState = previousEntry ? previousEntry.state : committedState;\n const previousError = previousEntry ? previousEntry.error : undefined;\n\n const shouldSkip = skippedActionIds.indexOf(actionId) > -1;\n const entry: ComputedState = shouldSkip\n ? previousEntry\n : computeNextEntry(\n reducer,\n action,\n previousState,\n previousError,\n errorHandler\n );\n\n nextComputedStates.push(entry);\n }\n // If the recording is paused, the last state will not be recomputed,\n // because it's essentially not part of the state history.\n if (isPaused) {\n nextComputedStates.push(computedStates[computedStates.length - 1]);\n }\n\n return nextComputedStates;\n}\n\nexport function liftInitialState(\n initialCommittedState?: any,\n monitorReducer?: any\n): LiftedState {\n return {\n monitorState: monitorReducer(undefined, {}),\n nextActionId: 1,\n actionsById: { 0: liftAction(INIT_ACTION) },\n stagedActionIds: [0],\n skippedActionIds: [],\n committedState: initialCommittedState,\n currentStateIndex: 0,\n computedStates: [],\n isLocked: false,\n isPaused: false,\n };\n}\n\n/**\n * Creates a history state reducer from an app's reducer.\n */\nexport function liftReducerWith(\n initialCommittedState: any,\n initialLiftedState: LiftedState,\n errorHandler: ErrorHandler,\n monitorReducer?: any,\n options: Partial<StoreDevtoolsConfig> = {}\n) {\n /**\n * Manages how the history actions modify the history state.\n */\n return (\n reducer: ActionReducer<any, any>\n ): ActionReducer<LiftedState, Actions> =>\n (liftedState, liftedAction) => {\n let {\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n } = liftedState || initialLiftedState;\n\n if (!liftedState) {\n // Prevent mutating initialLiftedState\n actionsById = Object.create(actionsById);\n }\n\n function commitExcessActions(n: number) {\n // Auto-commits n-number of excess actions.\n let excess = n;\n let idsToDelete = stagedActionIds.slice(1, excess + 1);\n\n for (let i = 0; i < idsToDelete.length; i++) {\n if (computedStates[i + 1].error) {\n // Stop if error is found. Commit actions up to error.\n excess = i;\n idsToDelete = stagedActionIds.slice(1, excess + 1);\n break;\n } else {\n delete actionsById[idsToDelete[i]];\n }\n }\n\n skippedActionIds = skippedActionIds.filter(\n (id) => idsToDelete.indexOf(id) === -1\n );\n stagedActionIds = [0, ...stagedActionIds.slice(excess + 1)];\n committedState = computedStates[excess].state;\n computedStates = computedStates.slice(excess);\n currentStateIndex =\n currentStateIndex > excess ? currentStateIndex - excess : 0;\n }\n\n function commitChanges() {\n // Consider the last committed state the new starting point.\n // Squash any staged actions into a single committed state.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = computedStates[currentStateIndex].state;\n currentStateIndex = 0;\n computedStates = [];\n }\n\n // By default, aggressively recompute every state whatever happens.\n // This has O(n) performance, so we'll override this to a sensible\n // value whenever we feel like we don't have to recompute the states.\n let minInvalidatedStateIndex = 0;\n\n switch (liftedAction.type) {\n case DevtoolsActions.LOCK_CHANGES: {\n isLocked = liftedAction.status;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case DevtoolsActions.PAUSE_RECORDING: {\n isPaused = liftedAction.status;\n if (isPaused) {\n // Add a pause action to signal the devtools-user the recording is paused.\n // The corresponding state will be overwritten on each update to always contain\n // the latest state (see Actions.PERFORM_ACTION).\n stagedActionIds = [...stagedActionIds, nextActionId];\n actionsById[nextActionId] = new PerformAction(\n {\n type: '@ngrx/devtools/pause',\n },\n +Date.now()\n );\n nextActionId++;\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = computedStates.concat(\n computedStates[computedStates.length - 1]\n );\n\n if (currentStateIndex === stagedActionIds.length - 2) {\n currentStateIndex++;\n }\n minInvalidatedStateIndex = Infinity;\n } else {\n commitChanges();\n }\n break;\n }\n case DevtoolsActions.RESET: {\n // Get back to the state the store was created with.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = initialCommittedState;\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case DevtoolsActions.COMMIT: {\n commitChanges();\n break;\n }\n case DevtoolsActions.ROLLBACK: {\n // Forget about any staged actions.\n // Start again from the last committed state.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case DevtoolsActions.TOGGLE_ACTION: {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const { id: actionId } = liftedAction;\n const index = skippedActionIds.indexOf(actionId);\n if (index === -1) {\n skippedActionIds = [actionId, ...skippedActionIds];\n } else {\n skippedActionIds = skippedActionIds.filter((id) => id !== actionId);\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(actionId);\n break;\n }\n case DevtoolsActions.SET_ACTIONS_ACTIVE: {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const { start, end, active } = liftedAction;\n const actionIds = [];\n for (let i = start; i < end; i++) actionIds.push(i);\n if (active) {\n skippedActionIds = difference(skippedActionIds, actionIds);\n } else {\n skippedActionIds = [...skippedActionIds, ...actionIds];\n }\n\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(start);\n break;\n }\n case DevtoolsActions.JUMP_TO_STATE: {\n // Without recomputing anything, move the pointer that tell us\n // which state is considered the current one. Useful for sliders.\n currentStateIndex = liftedAction.index;\n // Optimization: we know the history has not changed.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case DevtoolsActions.JUMP_TO_ACTION: {\n // Jumps to a corresponding state to a specific action.\n // Useful when filtering actions.\n const index = stagedActionIds.indexOf(liftedAction.actionId);\n if (index !== -1) currentStateIndex = index;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case DevtoolsActions.SWEEP: {\n // Forget any actions that are currently being skipped.\n stagedActionIds = difference(stagedActionIds, skippedActionIds);\n skippedActionIds = [];\n currentStateIndex = Math.min(\n currentStateIndex,\n stagedActionIds.length - 1\n );\n break;\n }\n case DevtoolsActions.PERFORM_ACTION: {\n // Ignore action and return state as is if recording is locked\n if (isLocked) {\n return liftedState || initialLiftedState;\n }\n\n if (\n isPaused ||\n (liftedState &&\n isActionFiltered(\n liftedState.computedStates[currentStateIndex],\n liftedAction,\n options.predicate,\n options.actionsSafelist,\n options.actionsBlocklist\n ))\n ) {\n // If recording is paused or if the action should be ignored, overwrite the last state\n // (corresponds to the pause action) and keep everything else as is.\n // This way, the app gets the new current state while the devtools\n // do not record another action.\n const lastState = computedStates[computedStates.length - 1];\n computedStates = [\n ...computedStates.slice(0, -1),\n computeNextEntry(\n reducer,\n liftedAction.action,\n lastState.state,\n lastState.error,\n errorHandler\n ),\n ];\n minInvalidatedStateIndex = Infinity;\n break;\n }\n\n // Auto-commit as new actions come in.\n if (options.maxAge && stagedActionIds.length === options.maxAge) {\n commitExcessActions(1);\n }\n\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n const actionId = nextActionId++;\n // Mutation! This is the hottest path, and we optimize on purpose.\n // It is safe because we set a new key in a cache dictionary.\n actionsById[actionId] = liftedAction;\n\n stagedActionIds = [...stagedActionIds, actionId];\n // Optimization: we know that only the new action needs computing.\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n break;\n }\n case DevtoolsActions.IMPORT_STATE: {\n // Completely replace everything.\n ({\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n } = liftedAction.nextLiftedState);\n break;\n }\n case INIT: {\n // Always recompute states on hot reload and init.\n minInvalidatedStateIndex = 0;\n\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(\n computedStates,\n minInvalidatedStateIndex,\n reducer,\n committedState,\n actionsById,\n stagedActionIds,\n skippedActionIds,\n errorHandler,\n isPaused\n );\n\n commitExcessActions(stagedActionIds.length - options.maxAge);\n\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n\n break;\n }\n case UPDATE: {\n const stateHasErrors =\n computedStates.filter((state) => state.error).length > 0;\n\n if (stateHasErrors) {\n // Recompute all states\n minInvalidatedStateIndex = 0;\n\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(\n computedStates,\n minInvalidatedStateIndex,\n reducer,\n committedState,\n actionsById,\n stagedActionIds,\n skippedActionIds,\n errorHandler,\n isPaused\n );\n\n commitExcessActions(stagedActionIds.length - options.maxAge);\n\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n } else {\n // If not paused/locked, add a new action to signal devtools-user\n // that there was a reducer update.\n if (!isPaused && !isLocked) {\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n\n // Add a new action to only recompute state\n const actionId = nextActionId++;\n actionsById[actionId] = new PerformAction(\n liftedAction,\n +Date.now()\n );\n stagedActionIds = [...stagedActionIds, actionId];\n\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n\n computedStates = recomputeStates(\n computedStates,\n minInvalidatedStateIndex,\n reducer,\n committedState,\n actionsById,\n stagedActionIds,\n skippedActionIds,\n errorHandler,\n isPaused\n );\n }\n\n // Recompute state history with latest reducer and update action\n computedStates = computedStates.map((cmp) => ({\n ...cmp,\n state: reducer(cmp.state, RECOMPUTE_ACTION),\n }));\n\n currentStateIndex = stagedActionIds.length - 1;\n\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n commitExcessActions(stagedActionIds.length - options.maxAge);\n }\n\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n\n break;\n }\n default: {\n // If the action is not recognized, it's a monitor action.\n // Optimization: a monitor action can't change history.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n }\n\n computedStates = recomputeStates(\n computedStates,\n minInvalidatedStateIndex,\n reducer,\n committedState,\n actionsById,\n stagedActionIds,\n skippedActionIds,\n errorHandler,\n isPaused\n );\n monitorState = monitorReducer(monitorState, liftedAction);\n\n return {\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n };\n };\n}\n","import {\n Injectable,\n Inject,\n ErrorHandler,\n OnDestroy,\n NgZone,\n inject,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n Action,\n ActionReducer,\n ActionsSubject,\n INITIAL_STATE,\n ReducerObservable,\n ScannedActionsSubject,\n StateObservable,\n} from '@ngrx/store';\nimport {\n merge,\n MonoTypeOperatorFunction,\n Observable,\n Observer,\n queueScheduler,\n ReplaySubject,\n Subscription,\n} from 'rxjs';\nimport { map, observeOn, scan, skip, withLatestFrom } from 'rxjs/operators';\n\nimport * as Actions from './actions';\nimport { STORE_DEVTOOLS_CONFIG, StoreDevtoolsConfig } from './config';\nimport { DevtoolsExtension } from './extension';\nimport { LiftedState, liftInitialState, liftReducerWith } from './reducer';\nimport {\n liftAction,\n unliftState,\n shouldFilterActions,\n filterLiftedState,\n} from './utils';\nimport { DevtoolsDispatcher } from './devtools-dispatcher';\nimport { PERFORM_ACTION } from './actions';\nimport { ZoneConfig, injectZoneConfig } from './zone-config';\n\n@Injectable()\nexport class StoreDevtools implements Observer<any>, OnDestroy {\n private liftedStateSubscription: Subscription;\n private extensionStartSubscription: Subscription;\n public dispatcher: ActionsSubject;\n public liftedState: Observable<LiftedState>;\n public state: StateObservable;\n\n constructor(\n dispatcher: DevtoolsDispatcher,\n actions$: ActionsSubject,\n reducers$: ReducerObservable,\n extension: DevtoolsExtension,\n scannedActions: ScannedActionsSubject,\n errorHandler: ErrorHandler,\n @Inject(INITIAL_STATE) initialState: any,\n @Inject(STORE_DEVTOOLS_CONFIG) config: StoreDevtoolsConfig\n ) {\n const liftedInitialState = liftInitialState(initialState, config.monitor);\n const liftReducer = liftReducerWith(\n initialState,\n liftedInitialState,\n errorHandler,\n config.monitor,\n config\n );\n\n const liftedAction$ = merge(\n merge(actions$.asObservable().pipe(skip(1)), extension.actions$).pipe(\n map(liftAction)\n ),\n dispatcher,\n extension.liftedActions$\n ).pipe(observeOn(queueScheduler));\n\n const liftedReducer$ = reducers$.pipe(map(liftReducer));\n\n const zoneConfig = injectZoneConfig(config.connectInZone!);\n\n const liftedStateSubject = new ReplaySubject<LiftedState>(1);\n\n this.liftedStateSubscription = liftedAction$\n .pipe(\n withLatestFrom(liftedReducer$),\n // The extension would post messages back outside of the Angular zone\n // because we call `connect()` wrapped with `runOutsideAngular`. We run change\n // detection only once at the end after all the required asynchronous tasks have\n // been processed (for instance, `setInterval` scheduled by the `timeout` operator).\n // We have to re-enter the Angular zone before the `scan` since it runs the reducer\n // which must be run within the Angular zone.\n emitInZone(zoneConfig),\n scan<\n [any, ActionReducer<LiftedState, Actions.All>],\n {\n state: LiftedState;\n action: any;\n }\n >(\n ({ state: liftedState }, [action, reducer]) => {\n let reducedLiftedState = reducer(liftedState, action);\n // On full state update\n // If we have actions filters, we must filter completely our lifted state to be sync with the extension\n if (action.type !== PERFORM_ACTION && shouldFilterActions(config)) {\n reducedLiftedState = filterLiftedState(\n reducedLiftedState,\n config.predicate,\n config.actionsSafelist,\n config.actionsBlocklist\n );\n }\n // Extension should be sent the sanitized lifted state\n extension.notify(action, reducedLiftedState);\n return { state: reducedLiftedState, action };\n },\n { state: liftedInitialState, action: null as any }\n )\n )\n .subscribe(({ state, action }) => {\n liftedStateSubject.next(state);\n\n if (action.type === Actions.PERFORM_ACTION) {\n const unliftedAction = (action as Actions.PerformAction).action;\n\n scannedActions.next(unliftedAction);\n }\n });\n\n this.extensionStartSubscription = extension.start$\n .pipe(emitInZone(zoneConfig))\n .subscribe(() => {\n this.refresh();\n });\n\n const liftedState$ =\n liftedStateSubject.asObservable() as Observable<LiftedState>;\n const state$ = liftedState$.pipe(map(unliftState)) as StateObservable;\n Object.defineProperty(state$, 'state', {\n value: toSignal(state$, { manualCleanup: true, requireSync: true }),\n });\n\n this.dispatcher = dispatcher;\n this.liftedState = liftedState$;\n this.state = state$;\n }\n\n ngOnDestroy(): void {\n // Even though the store devtools plugin is recommended to be\n // used only in development mode, it can still cause a memory leak\n // in microfrontend applications that are being created and destroyed\n // multiple times during development. This results in excessive memory\n // consumption, as it prevents entire apps from being garbage collected.\n this.liftedStateSubscription.unsubscribe();\n this.extensionStartSubscription.unsubscribe();\n }\n\n dispatch(action: Action) {\n this.dispatcher.next(action);\n }\n\n next(action: any) {\n this.dispatcher.next(action);\n }\n\n error(error: any) {}\n\n complete() {}\n\n performAction(action: any) {\n this.dispatch(new Actions.PerformAction(action, +Date.now()));\n }\n\n refresh() {\n this.dispatch(new Actions.Refresh());\n }\n\n reset() {\n this.dispatch(new Actions.Reset(+Date.now()));\n }\n\n rollback() {\n this.dispatch(new Actions.Rollback(+Date.now()));\n }\n\n commit() {\n this.dispatch(new Actions.Commit(+Date.now()));\n }\n\n sweep() {\n this.dispatch(new Actions.Sweep());\n }\n\n toggleAction(id: number) {\n this.dispatch(new Actions.ToggleAction(id));\n }\n\n jumpToAction(actionId: number) {\n this.dispatch(new Actions.JumpToAction(actionId));\n }\n\n jumpToState(index: number) {\n this.dispatch(new Actions.JumpToState(index));\n }\n\n importState(nextLiftedState: any) {\n this.dispatch(new Actions.ImportState(nextLiftedState));\n }\n\n lockChanges(status: boolean) {\n this.dispatch(new Actions.LockChanges(status));\n }\n\n pauseRecording(status: boolean) {\n this.dispatch(new Actions.PauseRecording(status));\n }\n}\n\n/**\n * If the devtools extension is connected out of the Angular zone,\n * this operator will emit all events within the zone.\n */\nfunction emitInZone<T>({\n ngZone,\n connectInZone,\n}: ZoneConfig): MonoTypeOperatorFunction<T> {\n return (source) =>\n connectInZone\n ? new Observable<T>((subscriber) =>\n source.subscribe({\n next: (value) => ngZone.run(() => subscriber.next(value)),\n error: (error) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n })\n )\n : source;\n}\n","import {\n EnvironmentProviders,\n InjectionToken,\n makeEnvironmentProviders,\n Provider,\n} from '@angular/core';\nimport {\n DevtoolsExtension,\n REDUX_DEVTOOLS_EXTENSION,\n ReduxDevtoolsExtension,\n} from './extension';\nimport { DevtoolsDispatcher } from './devtools-dispatcher';\nimport {\n createConfig,\n INITIAL_OPTIONS,\n noMonitor,\n STORE_DEVTOOLS_CONFIG,\n StoreDevtoolsConfig,\n StoreDevtoolsOptions,\n} from './config';\nimport { ReducerManagerDispatcher, StateObservable } from '@ngrx/store';\nimport { createStateObservable } from './instrument';\nimport { StoreDevtools } from './devtools';\n\nexport const IS_EXTENSION_OR_MONITOR_PRESENT = new InjectionToken<boolean>(\n '@ngrx/store-devtools Is Devtools Extension or Monitor Present'\n);\n\nexport function createIsExtensionOrMonitorPresent(\n extension: ReduxDevtoolsExtension | null,\n config: StoreDevtoolsConfig\n) {\n return Boolean(extension) || config.monitor !== noMonitor;\n}\n\nexport function createReduxDevtoolsExtension() {\n const extensionKey = '__REDUX_DEVTOOLS_EXTENSION__';\n\n if (\n typeof window === 'object' &&\n typeof (window as any)[extensionKey] !== 'undefined'\n ) {\n return (window as any)[extensionKey];\n } else {\n return null;\n }\n}\n\n/**\n * Provides developer tools and instrumentation for `Store`.\n *\n * @usageNotes\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStoreDevtools({\n * maxAge: 25,\n * logOnly: !isDevMode(),\n * }),\n * ],\n * });\n * ```\n */\nexport function provideStoreDevtools(\n options: StoreDevtoolsOptions = {}\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n DevtoolsExtension,\n DevtoolsDispatcher,\n StoreDevtools,\n {\n provide: INITIAL_OPTIONS,\n useValue: options,\n },\n {\n provide: IS_EXTENSION_OR_MONITOR_PRESENT,\n deps: [REDUX_DEVTOOLS_EXTENSION, STORE_DEVTOOLS_CONFIG],\n useFactory: createIsExtensionOrMonitorPresent,\n },\n {\n provide: REDUX_DEVTOOLS_EXTENSION,\n useFactory: createReduxDevtoolsExtension,\n },\n {\n provide: STORE_DEVTOOLS_CONFIG,\n deps: [INITIAL_OPTIONS],\n useFactory: createConfig,\n },\n {\n provide: StateObservable,\n deps: [StoreDevtools],\n useFactory: createStateObservable,\n },\n {\n provide: ReducerManagerDispatcher,\n useExisting: DevtoolsDispatcher,\n },\n ]);\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { StateObservable } from '@ngrx/store';\nimport { StoreDevtoolsOptions } from './config';\nimport { StoreDevtools } from './devtools';\nimport { provideStoreDevtools } from './provide-store-devtools';\n\nexport function createStateObservable(\n devtools: StoreDevtools\n): StateObservable {\n return devtools.state;\n}\n\n@NgModule({})\nexport class StoreDevtoolsModule {\n static instrument(\n options: StoreDevtoolsOptions = {}\n ): ModuleWithProviders<StoreDevtoolsModule> {\n return {\n ngModule: StoreDevtoolsModule,\n providers: [provideStoreDevtools(options)],\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport {\n ButtonModule,\n FcomFormsModule,\n IconsModule,\n LoaderModule,\n ModalModule,\n UiComponentsModule,\n} from '@fcom/ui-components';\n\nimport { CmsModule } from '../../cms/components';\nimport { ComponentsModule } from '../components';\nimport { PipesModule } from '../pipes';\nimport { MarketingPreferencesComponent } from './components';\nimport { ConsentService } from './services/consent.service';\nimport { DirectiveModule } from '../directives';\n\n@NgModule({\n imports: [\n CommonModule,\n PipesModule,\n ComponentsModule,\n CmsModule,\n FormsModule,\n FcomFormsModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n UiTranslateModule,\n UiComponentsModule,\n IconsModule,\n ModalModule,\n ButtonModule,\n DirectiveModule,\n LoaderModule,\n ],\n declarations: [MarketingPreferencesComponent],\n exports: [MarketingPreferencesComponent],\n})\nexport class MarketingPreferencesModule {\n static forRoot(): ModuleWithProviders<MarketingPreferencesModule> {\n return {\n ngModule: MarketingPreferencesModule,\n providers: [ConsentService],\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule, NotificationsModule } from '@fcom/ui-components';\n\nimport { PipesModule } from '../../pipes';\nimport { ToasterService } from '../../services';\nimport { ComponentsModule } from '../components.module';\nimport { ToasterComponent } from './toaster.component';\n\n@NgModule({\n imports: [CommonModule, PipesModule, ComponentsModule, UiTranslateModule, IconsModule, NotificationsModule],\n declarations: [ToasterComponent],\n exports: [ToasterComponent],\n providers: [ToasterService],\n})\nexport class ToasterModule {}\n","import { Inject, Injectable, OnDestroy, Optional, RendererFactory2 } from '@angular/core';\nimport { APP_BASE_HREF, DOCUMENT, PlatformLocation } from '@angular/common';\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\n\nimport { Observable, of, throwError } from 'rxjs';\nimport { finalize, first, map, take } from 'rxjs/operators';\n\nimport { IconsConfig } from '../icons.config';\nimport { IconsService } from './icons.service';\n\ntype SymbolDefs = [SVGSymbolElement, SVGDefsElement];\n\nexport const IN_PROGRESS = 'Already in Progress';\n@Injectable({\n providedIn: 'root',\n})\nexport class ClientIconsService extends IconsService implements OnDestroy {\n private readonly _cache: Map<string, SymbolDefs> = new Map<string, SymbolDefs>();\n private readonly _inProgressReqs: Set<string> = new Set<string>();\n\n private _baseUrl = '';\n\n constructor(\n @Inject(DOCUMENT) readonly document: Document,\n rendererFactory: RendererFactory2,\n @Optional() @Inject(APP_BASE_HREF) private readonly _appBase: string,\n @Optional() private readonly _location: PlatformLocation,\n @Optional() private readonly _config: IconsConfig,\n private readonly _http: HttpClient\n ) {\n super(document, rendererFactory);\n this.setBaseUrl();\n }\n\n private setBaseUrl(): void {\n if (!!this._config && !!this._config.baseUrl) {\n this._baseUrl = this._config.baseUrl;\n } else if (this._appBase) {\n this._baseUrl = this._appBase;\n } else if (this._location) {\n this._baseUrl = this._location.getBaseHrefFromDOM();\n }\n }\n\n private getAbsoluteUrl(url: string): string {\n // Prepend user-configured base if present and URL doesn't seem to have its own\n if (this._baseUrl && !/^https?:\\/\\//i.test(url)) {\n url = `${this._baseUrl.replace(/\\/$/, '')}/${url.replace(/^\\//, '')}`;\n }\n\n const base = this._renderer.createElement('BASE');\n base.href = url;\n\n return base.href;\n }\n\n addIcon(name: string, url: string): Promise<void> {\n return new Promise((resolve, reject) => {\n if (this.alreadyRendered(name)) {\n resolve();\n return;\n }\n\n // if not already cached, or already requested then fetch symbol\n if (!this._cache.has(name) && !this._inProgressReqs.has(name) && !!url) {\n this.subscriptions.add(\n this._getSymbol(url)\n .pipe(\n first(),\n map<SymbolDefs, SymbolDefs>(([_symbol, _def]) => {\n if (_symbol) {\n _symbol.id = name;\n }\n return [_symbol, _def];\n })\n )\n .subscribe({\n next: ([_symbol, _def]) => this.addToGlobal(name, _symbol, _def),\n error: (err: unknown) => {\n if ((err as HttpErrorResponse)?.message === IN_PROGRESS) {\n resolve();\n }\n\n /**\n * If we tried to do a request whilst offline, don't alert to Sentry. As the SVG is\n * not marked as \"loaded\", it can be re-requested later when the connection is\n * re-established.\n */\n if (!window.navigator.onLine) {\n resolve();\n }\n\n /**\n * Skip error reporting on aborted requests\n */\n if ((err as HttpErrorResponse)?.status === 0) {\n resolve();\n }\n\n reject(err);\n },\n complete: () => resolve(),\n })\n );\n } else {\n resolve();\n }\n });\n }\n\n private _getSymbol(url: string): Observable<SymbolDefs> {\n const absUrl = this.getAbsoluteUrl(url);\n\n // Return cached copy if it exists\n if (this._cache.has(absUrl)) {\n return of(this._cache.get(absUrl));\n }\n\n // Return existing fetch observable\n if (this._inProgressReqs.has(absUrl)) {\n return throwError(() => new Error(IN_PROGRESS));\n }\n\n // Otherwise, make the HTTP call to fetch\n const req$ = this._http.get(absUrl, { responseType: 'text' }).pipe(\n take(1),\n finalize(() => {\n this._inProgressReqs.delete(absUrl);\n }),\n map((svgText: string) => {\n const symbolAndDefs = this._svgSymbolElementFromString(svgText);\n this._cache.set(absUrl, symbolAndDefs);\n return symbolAndDefs;\n })\n );\n\n this._inProgressReqs.add(absUrl);\n\n return req$;\n }\n}\n","<!-- fake heading for screen readers page change simulation -->\n<span id=\"page-fake-title\" *ngIf=\"title$ | async as title\" class=\"is-vishidden\" tabindex=\"-1\">{{ title }}</span>\n<div [class.menu-open]=\"isNavigationMenuOpen$ | async\" [class]=\"contentWrapperNavigatedClass$ | async\" #contentWrapper>\n <router-outlet></router-outlet>\n</div>\n<fin-client-only [componentType]=\"LOGIN_IFRAME_COMPONENT_TYPE\" class=\"is-vishidden\"></fin-client-only>\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Inject,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { filter, map, take, throttleTime } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { GtmService } from '@fcom/common/gtm';\nimport { NavigatedPathToContentWrapperService, NavigationMenuService, PageMetaService } from '@fcom/common/services';\nimport { TimeAndGeoipProvider } from '@fcom/core/services';\nimport { unsubscribe, urlQueryString, urlToPathname } from '@fcom/core/utils';\nimport { PersonalizationTrackingService } from '@fcom/loyalty-personalization/services';\nimport { DataCloudService } from '@fcom/common/datacloud';\nimport { LoginIframeComponent } from '@fcom/common/login';\nimport { MultivariateTestService } from '@fcom/common/multivariate-test/services/multivariate-test.service';\nimport { Cms3DSeatMapService } from '@fcom/cms/services';\nimport { isNavigationEvent } from '@fcom/common/utils';\n\n@Component({\n selector: 'fin-app',\n templateUrl: './app.component.html',\n})\nexport class AppComponent implements AfterViewInit, OnDestroy, OnInit {\n isNavigationMenuOpen$: Observable<boolean>;\n title$: Observable<string>;\n removeGlobalListener: () => void;\n contentWrapperNavigatedClass$: Observable<string>;\n public readonly LOGIN_IFRAME_COMPONENT_TYPE = LoginIframeComponent;\n\n private subscriptions: Subscription = new Subscription();\n\n @ViewChild('contentWrapper', { static: true })\n contentWrapper: ElementRef;\n\n constructor(\n private navigationMenuService: NavigationMenuService,\n private timeAndGeoipProvider: TimeAndGeoipProvider,\n private pageMetaService: PageMetaService,\n private router: Router,\n private renderer: Renderer2,\n private languageService: LanguageService,\n private dataLayerService: GtmService,\n private dataCloudService: DataCloudService,\n private multiVariateTestService: MultivariateTestService,\n private cms3DSeatMapService: Cms3DSeatMapService,\n private navigatedPathToContentWrapperService: NavigatedPathToContentWrapperService,\n private personalizationTrackingService: PersonalizationTrackingService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n this.isNavigationMenuOpen$ = this.navigationMenuService.isNavigationMenuOpen$;\n this.title$ = this.pageMetaService.title$;\n\n this.subscriptions.add(\n this.languageService.lang.subscribe((l) => {\n this.pageMetaService.setDocumentLanguage(l, this.renderer);\n })\n );\n\n this.contentWrapperNavigatedClass$ = this.navigatedPathToContentWrapperService.contentWrapperNavigatedClass$;\n }\n\n ngOnInit(): void {\n this.pushNavigationEventsToDataLayer();\n this.navigatedPathToContentWrapperService.setRouter(this.router);\n this.multiVariateTestService.init();\n this.personalizationTrackingService.init();\n }\n\n ngAfterViewInit(): void {\n this.timeAndGeoipProvider.triggerTimeAndGeoipFetch();\n\n this.globalClicksHandler();\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n\n if (this.removeGlobalListener) {\n this.removeGlobalListener();\n }\n }\n\n /**\n * The throttle is implented to prevent duplication of page view tracking events when app is handling entrypoint urls that contain query params.\n * In these cases 2 navigationEnd events are fired in short time, one for initial landing and one after the params have been stripped out.\n * Throttle was chosen instead of debounce time to capture query params of the initial event.\n * 200ms was chosen as it is short enough not to harm natural navigation behaviour, but long enough to cover this case.\n */\n private pushNavigationEventsToDataLayer() {\n if (isPlatformBrowser(this.platform)) {\n this.subscriptions.add(\n this.router.events.pipe(filter(isNavigationEvent), take(1)).subscribe((event: NavigationEnd) => {\n this.dataLayerService.originalPageView(event.urlAfterRedirects);\n })\n );\n\n this.subscriptions.add(\n this.router.events.pipe(filter(isNavigationEvent), throttleTime(200)).subscribe((event: NavigationEnd) => {\n this.dataLayerService.pageView(event.urlAfterRedirects);\n })\n );\n\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter(isNavigationEvent),\n map((event) => new URLSearchParams(urlQueryString(event.urlAfterRedirects)).get('sfmc_sub')),\n filter(Boolean),\n take(1)\n )\n .subscribe((subscriberId: string) => {\n this.dataCloudService.subscriberId(subscriberId);\n })\n );\n }\n }\n\n private globalClicksHandler() {\n this.removeGlobalListener = this.renderer.listen('document', 'click', (event) => {\n const target = event.target;\n\n const link = (target as Element).closest('a');\n const url: string = link?.href;\n\n if (link && url?.includes?.('#3dseatmap')) {\n event.preventDefault();\n event.stopPropagation();\n this.seatMapLinkListener(url);\n return;\n }\n\n if (\n target &&\n typeof target.tagName === 'string' &&\n target.tagName.toLowerCase() === 'a' &&\n target.target !== '_blank' &&\n target.getAttribute('data-contentid')\n ) {\n // Application internal URL, use the router to navigate\n this.router.navigateByUrl(urlToPathname(target.href));\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n });\n }\n\n private seatMapLinkListener(url: string): void {\n const parts = url.split('/');\n const cabinClass = parts.pop();\n const fleet = parts.pop();\n this.cms3DSeatMapService.open3dSeatMap(fleet, cabinClass);\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.dev/license\n */\n\nimport {ɵRuntimeErrorCode as RuntimeErrorCode} from '@angular/animations';\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nconst LINE_START = '\\n - ';\n\nexport function invalidTimingValue(exp: string | number): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TIMING_VALUE,\n ngDevMode && `The provided timing value \"${exp}\" is invalid.`,\n );\n}\n\nexport function negativeStepValue(): Error {\n return new RuntimeError(\n RuntimeErrorCode.NEGATIVE_STEP_VALUE,\n ngDevMode && 'Duration values below 0 are not allowed for this animation step.',\n );\n}\n\nexport function negativeDelayValue(): Error {\n return new RuntimeError(\n RuntimeErrorCode.NEGATIVE_DELAY_VALUE,\n ngDevMode && 'Delay values below 0 are not allowed for this animation step.',\n );\n}\n\nexport function invalidStyleParams(varName: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STYLE_PARAMS,\n ngDevMode &&\n `Unable to resolve the local animation param ${varName} in the given list of values`,\n );\n}\n\nexport function invalidParamValue(varName: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PARAM_VALUE,\n ngDevMode && `Please provide a value for the animation param ${varName}`,\n );\n}\n\nexport function invalidNodeType(nodeType: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_NODE_TYPE,\n ngDevMode && `Unable to resolve animation metadata node #${nodeType}`,\n );\n}\n\nexport function invalidCssUnitValue(userProvidedProperty: string, value: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_CSS_UNIT_VALUE,\n ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`,\n );\n}\n\nexport function invalidTrigger(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TRIGGER,\n ngDevMode &&\n \"animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))\",\n );\n}\n\nexport function invalidDefinition(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_DEFINITION,\n ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()',\n );\n}\n\nexport function invalidState(metadataName: string, missingSubs: string[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STATE,\n ngDevMode &&\n `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(\n ', ',\n )}`,\n );\n}\n\nexport function invalidStyleValue(value: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STYLE_VALUE,\n ngDevMode && `The provided style string value ${value} is not allowed.`,\n );\n}\n\nexport function invalidProperty(prop: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PROPERTY,\n ngDevMode &&\n `The provided animation property \"${prop}\" is not a supported CSS property for animations`,\n );\n}\n\nexport function invalidParallelAnimation(\n prop: string,\n firstStart: number,\n firstEnd: number,\n secondStart: number,\n secondEnd: number,\n): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_PARALLEL_ANIMATION,\n ngDevMode &&\n `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`,\n );\n}\n\nexport function invalidKeyframes(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_KEYFRAMES,\n ngDevMode && `keyframes() must be placed inside of a call to animate()`,\n );\n}\n\nexport function invalidOffset(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_OFFSET,\n ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`,\n );\n}\n\nexport function keyframeOffsetsOutOfOrder(): Error {\n return new RuntimeError(\n RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER,\n ngDevMode && `Please ensure that all keyframe offsets are in order`,\n );\n}\n\nexport function keyframesMissingOffsets(): Error {\n return new RuntimeError(\n RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS,\n ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`,\n );\n}\n\nexport function invalidStagger(): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_STAGGER,\n ngDevMode && `stagger() can only be used inside of query()`,\n );\n}\n\nexport function invalidQuery(selector: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_QUERY,\n ngDevMode &&\n `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`,\n );\n}\n\nexport function invalidExpression(expr: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_EXPRESSION,\n ngDevMode && `The provided transition expression \"${expr}\" is not supported`,\n );\n}\n\nexport function invalidTransitionAlias(alias: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.INVALID_TRANSITION_ALIAS,\n ngDevMode && `The transition alias value \"${alias}\" is not supported`,\n );\n}\n\nexport function validationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.VALIDATION_FAILED,\n ngDevMode && `animation validation failed:\\n${errors.map((err) => err.message).join('\\n')}`,\n );\n}\n\nexport function buildingFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.BUILDING_FAILED,\n ngDevMode && `animation building failed:\\n${errors.map((err) => err.message).join('\\n')}`,\n );\n}\n\nexport function triggerBuildFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_BUILD_FAILED,\n ngDevMode &&\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors\n .map((err) => err.message)\n .join('\\n - ')}`,\n );\n}\n\nexport function animationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.ANIMATION_FAILED,\n ngDevMode &&\n `Unable to animate due to the following errors:${LINE_START}${errors\n .map((err) => err.message)\n .join(LINE_START)}`,\n );\n}\n\nexport function registerFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.REGISTRATION_FAILED,\n ngDevMode &&\n `Unable to build the animation due to the following errors: ${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function missingOrDestroyedAnimation(): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION,\n ngDevMode && \"The requested animation doesn't exist or has already been destroyed\",\n );\n}\n\nexport function createAnimationFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.CREATE_ANIMATION_FAILED,\n ngDevMode &&\n `Unable to create the animation due to the following errors:${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function missingPlayer(id: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_PLAYER,\n ngDevMode && `Unable to find the timeline player referenced by ${id}`,\n );\n}\n\nexport function missingTrigger(phase: string, name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_TRIGGER,\n ngDevMode &&\n `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`,\n );\n}\n\nexport function missingEvent(name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.MISSING_EVENT,\n ngDevMode &&\n `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`,\n );\n}\n\nexport function unsupportedTriggerEvent(phase: string, name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT,\n ngDevMode &&\n `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`,\n );\n}\n\nexport function unregisteredTrigger(name: string): Error {\n return new RuntimeError(\n RuntimeErrorCode.UNREGISTERED_TRIGGER,\n ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`,\n );\n}\n\nexport function triggerTransitionsFailed(errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED,\n ngDevMode &&\n `Unable to process animations due to the following failed trigger transitions\\n ${errors\n .map((err) => err.message)\n .join('\\n')}`,\n );\n}\n\nexport function triggerParsingFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRIGGER_PARSING_FAILED,\n ngDevMode &&\n `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors\n .map((err) => err.message)\n .join(LINE_START)}`,\n );\n}\n\nexport function transitionFailed(name: string, errors: Error[]): Error {\n return new RuntimeError(\n RuntimeErrorCode.TRANSITION_FAILED,\n ngDevMode && `@${name} has failed due to:\\n ${errors.map((err) => err.message).join('\\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.dev/license\n */\nimport {\n AnimationEvent,\n AnimationPlayer,\n AUTO_STYLE,\n NoopAnimationPlayer,\n ɵAnimationGroupPlayer,\n ɵPRE_STYLE as PRE_STYLE,\n ɵStyleDataMap,\n} from '@angular/animations';\n\nimport {AnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer';\nimport {animationFailed} from '../error_helpers';\n\nimport {ANIMATABLE_PROP_SET} from './web_animations/animatable_props_set';\n\nexport function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\n\nexport function normalizeKeyframes(\n normalizer: AnimationStyleNormalizer,\n keyframes: Array<ɵStyleDataMap>,\n preStyles: ɵStyleDataMap = new Map(),\n postStyles: ɵStyleDataMap = new Map(),\n): Array<ɵStyleDataMap> {\n const errors: Error[] = [];\n const normalizedKeyframes: Array<ɵStyleDataMap> = [];\n let previousOffset = -1;\n let previousKeyframe: ɵStyleDataMap | null = null;\n keyframes.forEach((kf) => {\n const offset = kf.get('offset') as number;\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe: ɵStyleDataMap = (isSameOffset && previousKeyframe) || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case PRE_STYLE:\n normalizedValue = preStyles.get(prop)!;\n break;\n\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop)!;\n break;\n\n default:\n normalizedValue = normalizer.normalizeStyleValue(\n prop,\n normalizedProp,\n normalizedValue,\n errors,\n );\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n\n return normalizedKeyframes;\n}\n\nexport function listenOnPlayer(\n player: AnimationPlayer,\n eventName: string,\n event: AnimationEvent | undefined,\n callback: (event: any) => any,\n) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\n\nexport function copyAnimationEvent(\n e: AnimationEvent,\n phaseName: string,\n player: AnimationPlayer,\n): AnimationEvent {\n const totalTime = player.totalTime;\n const disabled = (player as any).disabled ? true : false;\n const event = makeAnimationEvent(\n e.element,\n e.triggerName,\n e.fromState,\n e.toState,\n phaseName || e.phaseName,\n totalTime == undefined ? e.totalTime : totalTime,\n disabled,\n );\n const data = (e as any)['_data'];\n if (data != null) {\n (event as any)['_data'] = data;\n }\n return event;\n}\n\nexport function makeAnimationEvent(\n element: any,\n triggerName: string,\n fromState: string,\n toState: string,\n phaseName: string = '',\n totalTime: number = 0,\n disabled?: boolean,\n): AnimationEvent {\n return {element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled};\n}\n\nexport function getOrSetDefaultValue<T, V>(map: Map<T, V>, key: T, defaultValue: V) {\n let value = map.get(key);\n if (!value) {\n map.set(key, (value = defaultValue));\n }\n return value;\n}\n\nexport function parseTimelineCommand(command: string): [string, string] {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\n\nconst documentElement: HTMLElement | null = /* @__PURE__ */ (() =>\n typeof document === 'undefined' ? null : document.documentElement)();\n\nexport function getParentElement(element: any): unknown | null {\n const parent = element.parentNode || element.host || null; // consider host to support shadow DOM\n if (parent === documentElement) {\n return null;\n }\n return parent;\n}\n\nfunction containsVendorPrefix(prop: string): boolean {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\n\nlet _CACHED_BODY: {style: any} | null = null;\nlet _IS_WEBKIT = false;\nexport function validateStyleProperty(prop: string): boolean {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY!.style ? 'WebkitAppearance' in _CACHED_BODY!.style : false;\n }\n\n let result = true;\n if (_CACHED_BODY!.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY!.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY!.style;\n }\n }\n\n return result;\n}\n\nexport function validateWebAnimatableStyleProperty(prop: string): boolean {\n return ANIMATABLE_PROP_SET.has(prop);\n}\n\nexport function getBodyNode(): any | null {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\n\nexport function containsElement(elm1: any, elm2: any): boolean {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n}\n\nexport function invokeQuery(element: any, selector: string, multi: boolean): any[] {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n}\n\nexport function hypenatePropsKeys(original: ɵStyleDataMap): ɵStyleDataMap {\n const newMap: ɵStyleDataMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\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.dev/license\n */\nimport {AnimationPlayer, NoopAnimationPlayer} from '@angular/animations';\nimport {Injectable} from '@angular/core';\n\nimport {containsElement, getParentElement, invokeQuery, validateStyleProperty} from './shared';\n\n/**\n * @publicApi\n *\n * `AnimationDriver` implentation for Noop animations\n */\n@Injectable()\nexport class NoopAnimationDriver implements AnimationDriver {\n /**\n * @returns Whether `prop` is a valid CSS property\n */\n validateStyleProperty(prop: string): boolean {\n return validateStyleProperty(prop);\n }\n\n /**\n *\n * @returns Whether elm1 contains elm2.\n */\n containsElement(elm1: any, elm2: any): boolean {\n return containsElement(elm1, elm2);\n }\n\n /**\n * @returns Rhe parent of the given element or `null` if the element is the `document`\n */\n getParentElement(element: unknown): unknown {\n return getParentElement(element);\n }\n\n /**\n * @returns The result of the query selector on the element. The array will contain up to 1 item\n * if `multi` is `false`.\n */\n query(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n\n /**\n * @returns The `defaultValue` or empty string\n */\n computeStyle(element: any, prop: string, defaultValue?: string): string {\n return defaultValue || '';\n }\n\n /**\n * @returns An `NoopAnimationPlayer`\n */\n animate(\n element: any,\n keyframes: Array<Map<string, string | number>>,\n duration: number,\n delay: number,\n easing: string,\n previousPlayers: any[] = [],\n scrubberAccessRequested?: boolean,\n ): AnimationPlayer {\n return new NoopAnimationPlayer(duration, delay);\n }\n}\n\n/**\n * @publicApi\n */\nexport abstract class AnimationDriver {\n /**\n * @deprecated Use the NoopAnimationDriver class.\n */\n static NOOP: AnimationDriver = /* @__PURE__ */ new NoopAnimationDriver();\n\n abstract validateStyleProperty(prop: string): boolean;\n\n abstract validateAnimatableStyleProperty?: (prop: string) => boolean;\n\n abstract containsElement(elm1: any, elm2: any): boolean;\n\n /**\n * Obtains the parent element, if any. `null` is returned if the element does not have a parent.\n */\n abstract getParentElement(element: unknown): unknown;\n\n abstract query(element: any, selector: string, multi: boolean): any[];\n\n abstract computeStyle(element: any, prop: string, defaultValue?: string): string;\n\n abstract animate(\n element: any,\n keyframes: Array<Map<string, string | number>>,\n duration: number,\n delay: number,\n easing?: string | null,\n previousPlayers?: any[],\n scrubberAccessRequested?: boolean,\n ): any;\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.dev/license\n */\n\nexport abstract class AnimationStyleNormalizer {\n abstract normalizePropertyName(propertyName: string, errors: Error[]): string;\n abstract normalizeStyleValue(\n userProvidedProperty: string,\n normalizedProperty: string,\n value: string | number,\n errors: Error[],\n ): string;\n}\n\nexport class NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName: string, errors: Error[]): string {\n return propertyName;\n }\n\n normalizeStyleValue(\n userProvidedProperty: string,\n normalizedProperty: string,\n value: string | number,\n errors: Error[],\n ): string {\n return <any>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.dev/license\n */\nimport {\n AnimateTimings,\n AnimationMetadata,\n AnimationMetadataType,\n AnimationOptions,\n sequence,\n ɵStyleData,\n ɵStyleDataMap,\n} from '@angular/animations';\n\nimport {Ast as AnimationAst, AstVisitor as AnimationAstVisitor} from './dsl/animation_ast';\nimport {AnimationDslVisitor} from './dsl/animation_dsl_visitor';\nimport {\n invalidNodeType,\n invalidParamValue,\n invalidStyleParams,\n invalidTimingValue,\n negativeDelayValue,\n negativeStepValue,\n} from './error_helpers';\n\nconst ONE_SECOND = 1000;\n\nexport const SUBSTITUTION_EXPR_START = '{{';\nexport const SUBSTITUTION_EXPR_END = '}}';\nexport const ENTER_CLASSNAME = 'ng-enter';\nexport const LEAVE_CLASSNAME = 'ng-leave';\nexport const NG_TRIGGER_CLASSNAME = 'ng-trigger';\nexport const NG_TRIGGER_SELECTOR = '.ng-trigger';\nexport const NG_ANIMATING_CLASSNAME = 'ng-animating';\nexport const NG_ANIMATING_SELECTOR = '.ng-animating';\n\nexport function resolveTimingValue(value: string | number) {\n if (typeof value == 'number') return value;\n\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2) return 0;\n\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\n\nfunction _convertTimeValueToMS(value: number, unit: string): number {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\n\nexport function resolveTiming(\n timings: string | number | AnimateTimings,\n errors: Error[],\n allowNegativeValues?: boolean,\n) {\n return timings.hasOwnProperty('duration')\n ? <AnimateTimings>timings\n : parseTimeExpression(<string | number>timings, errors, allowNegativeValues);\n}\n\nfunction parseTimeExpression(\n exp: string | number,\n errors: Error[],\n allowNegativeValues?: boolean,\n): AnimateTimings {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration: number;\n let delay: number = 0;\n let easing: string = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return {duration: 0, delay: 0, easing: ''};\n }\n\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n } else {\n duration = exp;\n }\n\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n\n return {duration, delay, easing};\n}\n\nexport function normalizeKeyframes(\n keyframes: Array<ɵStyleData> | Array<ɵStyleDataMap>,\n): Array<ɵStyleDataMap> {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes as Array<ɵStyleDataMap>;\n }\n return keyframes.map((kf) => new Map(Object.entries(kf)));\n}\n\nexport function normalizeStyles(styles: ɵStyleDataMap | Array<ɵStyleDataMap>): ɵStyleDataMap {\n return Array.isArray(styles) ? new Map(...styles) : new Map(styles);\n}\n\nexport function setStyles(element: any, styles: ɵStyleDataMap, formerStyles?: ɵStyleDataMap) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n}\n\nexport function eraseStyles(element: any, styles: ɵStyleDataMap) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n}\n\nexport function normalizeAnimationEntry(\n steps: AnimationMetadata | AnimationMetadata[],\n): AnimationMetadata {\n if (Array.isArray(steps)) {\n if (steps.length == 1) return steps[0];\n return sequence(steps);\n }\n return steps as AnimationMetadata;\n}\n\nexport function validateStyleParams(\n value: string | number | null | undefined,\n options: AnimationOptions,\n errors: Error[],\n) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach((varName) => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\n\nconst PARAM_REGEX = new RegExp(\n `${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`,\n 'g',\n);\nexport function extractStyleParams(value: string | number | null | undefined): string[] {\n let params: string[] = [];\n if (typeof value === 'string') {\n let match: any;\n while ((match = PARAM_REGEX.exec(value))) {\n params.push(match[1] as string);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\n\nexport function interpolateParams(\n value: string | number,\n params: {[name: string]: any},\n errors: Error[],\n): string | number {\n const original = `${value}`;\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function camelCaseToDashCase(input: string): string {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport function allowPreviousPlayerStylesMerge(duration: number, delay: number) {\n return duration === 0 || delay === 0;\n}\n\nexport function balancePreviousStylesIntoKeyframes(\n element: any,\n keyframes: Array<ɵStyleDataMap>,\n previousStyles: ɵStyleDataMap,\n) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps: string[] = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach((prop) => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\n\nexport function visitDslNode(\n visitor: AnimationDslVisitor,\n node: AnimationMetadata,\n context: any,\n): any;\nexport function visitDslNode(\n visitor: AnimationAstVisitor,\n node: AnimationAst<AnimationMetadataType>,\n context: any,\n): any;\nexport function visitDslNode(visitor: any, node: any, context: any): any {\n switch (node.type) {\n case AnimationMetadataType.Trigger:\n return visitor.visitTrigger(node, context);\n case AnimationMetadataType.State:\n return visitor.visitState(node, context);\n case AnimationMetadataType.Transition:\n return visitor.visitTransition(node, context);\n case AnimationMetadataType.Sequence:\n return visitor.visitSequence(node, context);\n case AnimationMetadataType.Group:\n return visitor.visitGroup(node, context);\n case AnimationMetadataType.Animate:\n return visitor.visitAnimate(node, context);\n case AnimationMetadataType.Keyframes:\n return visitor.visitKeyframes(node, context);\n case AnimationMetadataType.Style:\n return visitor.visitStyle(node, context);\n case AnimationMetadataType.Reference:\n return visitor.visitReference(node, context);\n case AnimationMetadataType.AnimateChild:\n return visitor.visitAnimateChild(node, context);\n case AnimationMetadataType.AnimateRef:\n return visitor.visitAnimateRef(node, context);\n case AnimationMetadataType.Query:\n return visitor.visitQuery(node, context);\n case AnimationMetadataType.Stagger:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\n\nexport function computeStyle(element: any, prop: string): string {\n return (<any>window.getComputedStyle(element))[prop];\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.dev/license\n */\nimport {invalidCssUnitValue} from '../../error_helpers';\nimport {dashCaseToCamelCase} from '../../util';\n\nimport {AnimationStyleNormalizer} from './animation_style_normalizer';\n\nconst DIMENSIONAL_PROP_SET = new Set([\n 'width',\n 'height',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'left',\n 'top',\n 'bottom',\n 'right',\n 'fontSize',\n 'outlineWidth',\n 'outlineOffset',\n 'paddingTop',\n 'paddingLeft',\n 'paddingBottom',\n 'paddingRight',\n 'marginTop',\n 'marginLeft',\n 'marginBottom',\n 'marginRight',\n 'borderRadius',\n 'borderWidth',\n 'borderTopWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'textIndent',\n 'perspective',\n]);\n\nexport class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n override normalizePropertyName(propertyName: string, errors: Error[]): string {\n return dashCaseToCamelCase(propertyName);\n }\n\n override normalizeStyleValue(\n userProvidedProperty: string,\n normalizedProperty: string,\n value: string | number,\n errors: Error[],\n ): string {\n let unit: string = '';\n const strVal = value.toString().trim();\n\n if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n } else {\n const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(invalidCssUnitValue(userProvidedProperty, value));\n }\n }\n }\n return strVal + unit;\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.dev/license\n */\n\nimport {invalidExpression, invalidTransitionAlias} from '../error_helpers';\n\nexport const ANY_STATE = '*';\nexport declare type TransitionMatcherFn = (\n fromState: any,\n toState: any,\n element: any,\n params: {[key: string]: any},\n) => boolean;\n\nexport function parseTransitionExpr(\n transitionValue: string | TransitionMatcherFn,\n errors: Error[],\n): TransitionMatcherFn[] {\n const expressions: TransitionMatcherFn[] = [];\n if (typeof transitionValue == 'string') {\n transitionValue\n .split(/\\s*,\\s*/)\n .forEach((str) => parseInnerTransitionStr(str, expressions, errors));\n } else {\n expressions.push(<TransitionMatcherFn>transitionValue);\n }\n return expressions;\n}\n\nfunction parseInnerTransitionStr(\n eventStr: string,\n expressions: TransitionMatcherFn[],\n errors: Error[],\n) {\n if (eventStr[0] == ':') {\n const result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n\n const match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(invalidExpression(eventStr));\n return expressions;\n }\n\n const fromState = match[1];\n const separator = match[2];\n const toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n\n const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n return;\n}\n\nfunction parseAnimationAlias(alias: string, errors: Error[]): string | TransitionMatcherFn {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return (fromState: any, toState: any): boolean => parseFloat(toState) > parseFloat(fromState);\n case ':decrement':\n return (fromState: any, toState: any): boolean => parseFloat(toState) < parseFloat(fromState);\n default:\n errors.push(invalidTransitionAlias(alias));\n return '* => *';\n }\n}\n\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = new Set<string>(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = new Set<string>(['false', '0']);\n\nfunction makeLambdaFromStates(lhs: string, rhs: string): TransitionMatcherFn {\n const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n\n return (fromState: any, toState: any): boolean => {\n let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let rhsMatch = rhs == ANY_STATE || rhs == toState;\n\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n\n return lhsMatch && rhsMatch;\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.dev/license\n */\nimport {\n AnimateTimings,\n AnimationAnimateChildMetadata,\n AnimationAnimateMetadata,\n AnimationAnimateRefMetadata,\n AnimationGroupMetadata,\n AnimationKeyframesSequenceMetadata,\n AnimationMetadata,\n AnimationMetadataType,\n AnimationOptions,\n AnimationQueryMetadata,\n AnimationQueryOptions,\n AnimationReferenceMetadata,\n AnimationSequenceMetadata,\n AnimationStaggerMetadata,\n AnimationStateMetadata,\n AnimationStyleMetadata,\n AnimationTransitionMetadata,\n AnimationTriggerMetadata,\n AUTO_STYLE,\n style,\n ɵStyleDataMap,\n} from '@angular/animations';\n\nimport {\n invalidDefinition,\n invalidKeyframes,\n invalidOffset,\n invalidParallelAnimation,\n invalidProperty,\n invalidStagger,\n invalidState,\n invalidStyleValue,\n invalidTrigger,\n keyframeOffsetsOutOfOrder,\n keyframesMissingOffsets,\n} from '../error_helpers';\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetDefaultValue} from '../render/shared';\nimport {\n extractStyleParams,\n NG_ANIMATING_SELECTOR,\n NG_TRIGGER_SELECTOR,\n normalizeAnimationEntry,\n resolveTiming,\n SUBSTITUTION_EXPR_START,\n validateStyleParams,\n visitDslNode,\n} from '../util';\nimport {pushUnrecognizedPropertiesWarning} from '../warning_helpers';\n\nimport {\n AnimateAst,\n AnimateChildAst,\n AnimateRefAst,\n Ast,\n DynamicTimingAst,\n GroupAst,\n KeyframesAst,\n QueryAst,\n ReferenceAst,\n SequenceAst,\n StaggerAst,\n StateAst,\n StyleAst,\n TimingAst,\n TransitionAst,\n TriggerAst,\n} from './animation_ast';\nimport {AnimationDslVisitor} from './animation_dsl_visitor';\nimport {parseTransitionExpr} from './animation_transition_expr';\n\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = new RegExp(`s*${SELF_TOKEN}s*,?`, 'g');\n\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nexport function buildAnimationAst(\n driver: AnimationDriver,\n metadata: AnimationMetadata | AnimationMetadata[],\n errors: Error[],\n warnings: string[],\n): Ast<AnimationMetadataType> {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);\n}\n\nconst ROOT_SELECTOR = '';\n\nexport class AnimationAstBuilderVisitor implements AnimationDslVisitor {\n constructor(private _driver: AnimationDriver) {}\n\n build(\n metadata: AnimationMetadata | AnimationMetadata[],\n errors: Error[],\n warnings: string[],\n ): Ast<AnimationMetadataType> {\n const context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n const ast = <Ast<AnimationMetadataType>>(\n visitDslNode(this, normalizeAnimationEntry(metadata), context)\n );\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (context.unsupportedCSSPropertiesFound.size) {\n pushUnrecognizedPropertiesWarning(warnings, [\n ...context.unsupportedCSSPropertiesFound.keys(),\n ]);\n }\n }\n\n return ast;\n }\n\n private _resetContextStyleTimingState(context: AnimationAstBuilderContext) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = new Map<string, Map<string, StyleTimeTuple>>();\n context.collectedStyles.set(ROOT_SELECTOR, new Map());\n context.currentTime = 0;\n }\n\n visitTrigger(\n metadata: AnimationTriggerMetadata,\n context: AnimationAstBuilderContext,\n ): TriggerAst {\n let queryCount = (context.queryCount = 0);\n let depCount = (context.depCount = 0);\n const states: StateAst[] = [];\n const transitions: TransitionAst[] = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push(invalidTrigger());\n }\n\n metadata.definitions.forEach((def) => {\n this._resetContextStyleTimingState(context);\n if (def.type == AnimationMetadataType.State) {\n const stateDef = def as AnimationStateMetadata;\n const name = stateDef.name;\n name\n .toString()\n .split(/\\s*,\\s*/)\n .forEach((n) => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n } else if (def.type == AnimationMetadataType.Transition) {\n const transition = this.visitTransition(def as AnimationTransitionMetadata, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n } else {\n context.errors.push(invalidDefinition());\n }\n });\n\n return {\n type: AnimationMetadataType.Trigger,\n name: metadata.name,\n states,\n transitions,\n queryCount,\n depCount,\n options: null,\n };\n }\n\n visitState(metadata: AnimationStateMetadata, context: AnimationAstBuilderContext): StateAst {\n const styleAst = this.visitStyle(metadata.styles, context);\n const astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n const missingSubs = new Set<string>();\n const params = astParams || {};\n styleAst.styles.forEach((style) => {\n if (style instanceof Map) {\n style.forEach((value) => {\n extractStyleParams(value).forEach((sub) => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n context.errors.push(invalidState(metadata.name, [...missingSubs.values()]));\n }\n }\n\n return {\n type: AnimationMetadataType.State,\n name: metadata.name,\n style: styleAst,\n options: astParams ? {params: astParams} : null,\n };\n }\n\n visitTransition(\n metadata: AnimationTransitionMetadata,\n context: AnimationAstBuilderContext,\n ): TransitionAst {\n context.queryCount = 0;\n context.depCount = 0;\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const matchers = parseTransitionExpr(metadata.expr, context.errors);\n\n return {\n type: AnimationMetadataType.Transition,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitSequence(\n metadata: AnimationSequenceMetadata,\n context: AnimationAstBuilderContext,\n ): SequenceAst {\n return {\n type: AnimationMetadataType.Sequence,\n steps: metadata.steps.map((s) => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitGroup(metadata: AnimationGroupMetadata, context: AnimationAstBuilderContext): GroupAst {\n const currentTime = context.currentTime;\n let furthestTime = 0;\n const steps = metadata.steps.map((step) => {\n context.currentTime = currentTime;\n const innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n\n context.currentTime = furthestTime;\n return {\n type: AnimationMetadataType.Group,\n steps,\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitAnimate(\n metadata: AnimationAnimateMetadata,\n context: AnimationAstBuilderContext,\n ): AnimateAst {\n const timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n let styleAst: StyleAst | KeyframesAst;\n let styleMetadata: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata = metadata.styles\n ? metadata.styles\n : style({});\n if (styleMetadata.type == AnimationMetadataType.Keyframes) {\n styleAst = this.visitKeyframes(styleMetadata as AnimationKeyframesSequenceMetadata, context);\n } else {\n let styleMetadata = metadata.styles as AnimationStyleMetadata;\n let isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const newStyleData: {[prop: string]: string | number} = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n\n context.currentAnimateTimings = null;\n return {\n type: AnimationMetadataType.Animate,\n timings: timingAst,\n style: styleAst,\n options: null,\n };\n }\n\n visitStyle(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext): StyleAst {\n const ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n\n private _makeStyleAst(\n metadata: AnimationStyleMetadata,\n context: AnimationAstBuilderContext,\n ): StyleAst {\n const styles: Array<ɵStyleDataMap | string> = [];\n const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles];\n\n for (let styleTuple of metadataStyles) {\n if (typeof styleTuple === 'string') {\n if (styleTuple === AUTO_STYLE) {\n styles.push(styleTuple);\n } else {\n context.errors.push(invalidStyleValue(styleTuple));\n }\n } else {\n styles.push(new Map(Object.entries(styleTuple)));\n }\n }\n\n let containsDynamicStyles = false;\n let collectedEasing: string | null = null;\n styles.forEach((styleData) => {\n if (styleData instanceof Map) {\n if (styleData.has('easing')) {\n collectedEasing = styleData.get('easing') as string;\n styleData.delete('easing');\n }\n if (!containsDynamicStyles) {\n for (let value of styleData.values()) {\n if (value!.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n\n return {\n type: AnimationMetadataType.Style,\n styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles,\n options: null,\n };\n }\n\n private _validateStyleAst(ast: StyleAst, context: AnimationAstBuilderContext): void {\n const timings = context.currentAnimateTimings;\n let endTime = context.currentTime;\n let startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n\n ast.styles.forEach((tuple) => {\n if (typeof tuple === 'string') return;\n\n tuple.forEach((value, prop) => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._driver.validateStyleProperty(prop)) {\n tuple.delete(prop);\n context.unsupportedCSSPropertiesFound.add(prop);\n return;\n }\n }\n\n // This is guaranteed to have a defined Map at this querySelector location making it\n // safe to add the assertion here. It is set as a default empty map in prior methods.\n const collectedStyles = context.collectedStyles.get(context.currentQuerySelector!)!;\n const collectedEntry = collectedStyles.get(prop);\n let updateCollectedStyle = true;\n if (collectedEntry) {\n if (\n startTime != endTime &&\n startTime >= collectedEntry.startTime &&\n endTime <= collectedEntry.endTime\n ) {\n context.errors.push(\n invalidParallelAnimation(\n prop,\n collectedEntry.startTime,\n collectedEntry.endTime,\n startTime,\n endTime,\n ),\n );\n updateCollectedStyle = false;\n }\n\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n\n if (updateCollectedStyle) {\n collectedStyles.set(prop, {startTime, endTime});\n }\n\n if (context.options) {\n validateStyleParams(value, context.options, context.errors);\n }\n });\n });\n }\n\n visitKeyframes(\n metadata: AnimationKeyframesSequenceMetadata,\n context: AnimationAstBuilderContext,\n ): KeyframesAst {\n const ast: KeyframesAst = {type: AnimationMetadataType.Keyframes, styles: [], options: null};\n if (!context.currentAnimateTimings) {\n context.errors.push(invalidKeyframes());\n return ast;\n }\n\n const MAX_KEYFRAME_OFFSET = 1;\n\n let totalKeyframesWithOffsets = 0;\n const offsets: number[] = [];\n let offsetsOutOfOrder = false;\n let keyframesOutOfRange = false;\n let previousOffset: number = 0;\n\n const keyframes: StyleAst[] = metadata.steps.map((styles) => {\n const style = this._makeStyleAst(styles, context);\n let offsetVal: number | null =\n style.offset != null ? style.offset : consumeOffset(style.styles);\n let offset: number = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n\n if (keyframesOutOfRange) {\n context.errors.push(invalidOffset());\n }\n\n if (offsetsOutOfOrder) {\n context.errors.push(keyframeOffsetsOutOfOrder());\n }\n\n const length = metadata.steps.length;\n let generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(keyframesMissingOffsets());\n } else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n\n const limit = length - 1;\n const currentTime = context.currentTime;\n const currentAnimateTimings = context.currentAnimateTimings!;\n const animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const offset = generatedOffset > 0 ? (i == limit ? 1 : generatedOffset * i) : offsets[i];\n const durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n\n ast.styles.push(kf);\n });\n\n return ast;\n }\n\n visitReference(\n metadata: AnimationReferenceMetadata,\n context: AnimationAstBuilderContext,\n ): ReferenceAst {\n return {\n type: AnimationMetadataType.Reference,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitAnimateChild(\n metadata: AnimationAnimateChildMetadata,\n context: AnimationAstBuilderContext,\n ): AnimateChildAst {\n context.depCount++;\n return {\n type: AnimationMetadataType.AnimateChild,\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitAnimateRef(\n metadata: AnimationAnimateRefMetadata,\n context: AnimationAstBuilderContext,\n ): AnimateRefAst {\n return {\n type: AnimationMetadataType.AnimateRef,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitQuery(metadata: AnimationQueryMetadata, context: AnimationAstBuilderContext): QueryAst {\n const parentSelector = context.currentQuerySelector!;\n const options = (metadata.options || {}) as AnimationQueryOptions;\n\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector = parentSelector.length\n ? parentSelector + ' ' + selector\n : selector;\n getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map());\n\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n\n return {\n type: AnimationMetadataType.Query,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf,\n animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options),\n };\n }\n\n visitStagger(\n metadata: AnimationStaggerMetadata,\n context: AnimationAstBuilderContext,\n ): StaggerAst {\n if (!context.currentQuery) {\n context.errors.push(invalidStagger());\n }\n const timings =\n metadata.timings === 'full'\n ? {duration: 0, delay: 0, easing: 'full'}\n : resolveTiming(metadata.timings, context.errors, true);\n\n return {\n type: AnimationMetadataType.Stagger,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings,\n options: null,\n };\n }\n}\n\nfunction normalizeSelector(selector: string): [string, boolean] {\n const hasAmpersand = selector.split(/\\s*,\\s*/).find((token) => token == SELF_TOKEN)\n ? true\n : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n\n // Note: the :enter and :leave aren't normalized here since those\n // selectors are filled in at runtime during timeline building\n selector = selector\n .replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n .replace(/@\\w+/g, (match) => NG_TRIGGER_SELECTOR + '-' + match.slice(1))\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n\n return [selector, hasAmpersand];\n}\n\nfunction normalizeParams(obj: {[key: string]: any} | any): {[key: string]: any} | null {\n return obj ? {...obj} : null;\n}\n\nexport type StyleTimeTuple = {\n startTime: number;\n endTime: number;\n};\n\nexport class AnimationAstBuilderContext {\n public queryCount: number = 0;\n public depCount: number = 0;\n public currentTransition: AnimationTransitionMetadata | null = null;\n public currentQuery: AnimationQueryMetadata | null = null;\n public currentQuerySelector: string | null = null;\n public currentAnimateTimings: TimingAst | null = null;\n public currentTime: number = 0;\n public collectedStyles = new Map<string, Map<string, StyleTimeTuple>>();\n public options: AnimationOptions | null = null;\n public unsupportedCSSPropertiesFound: Set<string> = new Set<string>();\n constructor(public errors: Error[]) {}\n}\n\ntype OffsetStyles = string | ɵStyleDataMap;\n\nfunction consumeOffset(styles: OffsetStyles | Array<OffsetStyles>): number | null {\n if (typeof styles == 'string') return null;\n\n let offset: number | null = null;\n\n if (Array.isArray(styles)) {\n styles.forEach((styleTuple) => {\n if (styleTuple instanceof Map && styleTuple.has('offset')) {\n const obj = styleTuple as ɵStyleDataMap;\n offset = parseFloat(obj.get('offset') as string);\n obj.delete('offset');\n }\n });\n } else if (styles instanceof Map && styles.has('offset')) {\n const obj = styles;\n offset = parseFloat(obj.get('offset') as string);\n obj.delete('offset');\n }\n return offset;\n}\n\nfunction constructTimingAst(value: string | number | AnimateTimings, errors: Error[]) {\n if (value.hasOwnProperty('duration')) {\n return value as AnimateTimings;\n }\n\n if (typeof value == 'number') {\n const duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n\n const strValue = value as string;\n const isDynamic = strValue.split(/\\s+/).some((v) => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const ast = makeTimingAst(0, 0, '') as any;\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast as DynamicTimingAst;\n }\n\n const timings = resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\n\nfunction normalizeAnimationOptions(options: AnimationOptions | null): AnimationOptions {\n if (options) {\n options = {...options};\n if (options['params']) {\n options['params'] = normalizeParams(options['params'])!;\n }\n } else {\n options = {};\n }\n return options;\n}\n\nfunction makeTimingAst(duration: number, delay: number, easing: string | null): TimingAst {\n return {duration, delay, easing};\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.dev/license\n */\nimport {ɵStyleDataMap} from '@angular/animations';\n\nimport {\n AnimationEngineInstruction,\n AnimationTransitionInstructionType,\n} from '../render/animation_engine_instruction';\n\nexport interface AnimationTimelineInstruction extends AnimationEngineInstruction {\n element: any;\n keyframes: Array<ɵStyleDataMap>;\n preStyleProps: string[];\n postStyleProps: string[];\n duration: number;\n delay: number;\n totalTime: number;\n easing: string | null;\n stretchStartingKeyframe?: boolean;\n subTimeline: boolean;\n}\n\nexport function createTimelineInstruction(\n element: any,\n keyframes: Array<ɵStyleDataMap>,\n preStyleProps: string[],\n postStyleProps: string[],\n duration: number,\n delay: number,\n easing: string | null = null,\n subTimeline: boolean = false,\n): AnimationTimelineInstruction {\n return {\n type: AnimationTransitionInstructionType.TimelineAnimation,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay,\n easing,\n subTimeline,\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.dev/license\n */\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport class ElementInstructionMap {\n private _map = new Map<any, AnimationTimelineInstruction[]>();\n\n get(element: any): AnimationTimelineInstruction[] {\n return this._map.get(element) || [];\n }\n\n append(element: any, instructions: AnimationTimelineInstruction[]) {\n let existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, (existingInstructions = []));\n }\n existingInstructions.push(...instructions);\n }\n\n has(element: any): boolean {\n return this._map.has(element);\n }\n\n clear() {\n this._map.clear();\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.dev/license\n */\nimport {\n AnimateChildOptions,\n AnimateTimings,\n AnimationMetadataType,\n AnimationOptions,\n AnimationQueryOptions,\n AUTO_STYLE,\n ɵPRE_STYLE as PRE_STYLE,\n ɵStyleDataMap,\n} from '@angular/animations';\n\nimport {invalidQuery} from '../error_helpers';\nimport {AnimationDriver} from '../render/animation_driver';\nimport {interpolateParams, resolveTiming, resolveTimingValue, visitDslNode} from '../util';\n\nimport {\n AnimateAst,\n AnimateChildAst,\n AnimateRefAst,\n Ast,\n AstVisitor,\n DynamicTimingAst,\n GroupAst,\n KeyframesAst,\n QueryAst,\n ReferenceAst,\n SequenceAst,\n StaggerAst,\n StateAst,\n StyleAst,\n TimingAst,\n TransitionAst,\n TriggerAst,\n} from './animation_ast';\nimport {\n AnimationTimelineInstruction,\n createTimelineInstruction,\n} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergeSort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill map.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nexport function buildAnimationTimelines(\n driver: AnimationDriver,\n rootElement: any,\n ast: Ast<AnimationMetadataType>,\n enterClassName: string,\n leaveClassName: string,\n startingStyles: ɵStyleDataMap = new Map(),\n finalStyles: ɵStyleDataMap = new Map(),\n options: AnimationOptions,\n subInstructions?: ElementInstructionMap,\n errors: Error[] = [],\n): AnimationTimelineInstruction[] {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(\n driver,\n rootElement,\n ast,\n enterClassName,\n leaveClassName,\n startingStyles,\n finalStyles,\n options,\n subInstructions,\n errors,\n );\n}\n\nexport class AnimationTimelineBuilderVisitor implements AstVisitor {\n buildKeyframes(\n driver: AnimationDriver,\n rootElement: any,\n ast: Ast<AnimationMetadataType>,\n enterClassName: string,\n leaveClassName: string,\n startingStyles: ɵStyleDataMap,\n finalStyles: ɵStyleDataMap,\n options: AnimationOptions,\n subInstructions?: ElementInstructionMap,\n errors: Error[] = [],\n ): AnimationTimelineInstruction[] {\n subInstructions = subInstructions || new ElementInstructionMap();\n const context = new AnimationTimelineContext(\n driver,\n rootElement,\n subInstructions,\n enterClassName,\n leaveClassName,\n errors,\n [],\n );\n context.options = options;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n context.currentTimeline.delayNextStep(delay);\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n\n visitDslNode(this, ast, context);\n\n // this checks to see if an actual animation happened\n const timelines = context.timelines.filter((timeline) => timeline.containsAnimation());\n\n // note: we just want to apply the final styles for the rootElement, so we do not\n // just apply the styles to the last timeline but the last timeline which\n // element is the root one (basically `*`-styles are replaced with the actual\n // state style values only for the root element)\n if (timelines.length && finalStyles.size) {\n let lastRootTimeline: TimelineBuilder | undefined;\n for (let i = timelines.length - 1; i >= 0; i--) {\n const timeline = timelines[i];\n if (timeline.element === rootElement) {\n lastRootTimeline = timeline;\n break;\n }\n }\n if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {\n lastRootTimeline.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length\n ? timelines.map((timeline) => timeline.buildKeyframes())\n : [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];\n }\n\n visitTrigger(ast: TriggerAst, context: AnimationTimelineContext): any {\n // these values are not visited in this AST\n }\n\n visitState(ast: StateAst, context: AnimationTimelineContext): any {\n // these values are not visited in this AST\n }\n\n visitTransition(ast: TransitionAst, context: AnimationTimelineContext): any {\n // these values are not visited in this AST\n }\n\n visitAnimateChild(ast: AnimateChildAst, context: AnimationTimelineContext): any {\n const elementInstructions = context.subInstructions.get(context.element);\n if (elementInstructions) {\n const innerContext = context.createSubContext(ast.options);\n const startTime = context.currentTimeline.currentTime;\n const endTime = this._visitSubInstructions(\n elementInstructions,\n innerContext,\n innerContext.options as AnimateChildOptions,\n );\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n\n visitAnimateRef(ast: AnimateRefAst, context: AnimationTimelineContext): any {\n const innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this._applyAnimationRefDelays([ast.options, ast.animation.options], context, innerContext);\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n\n private _applyAnimationRefDelays(\n animationsRefsOptions: (AnimationOptions | null)[],\n context: AnimationTimelineContext,\n innerContext: AnimationTimelineContext,\n ) {\n for (const animationRefOptions of animationsRefsOptions) {\n const animationDelay = animationRefOptions?.delay;\n if (animationDelay) {\n const animationDelayValue =\n typeof animationDelay === 'number'\n ? animationDelay\n : resolveTimingValue(\n interpolateParams(\n animationDelay,\n animationRefOptions?.params ?? {},\n context.errors,\n ),\n );\n innerContext.delayNextStep(animationDelayValue);\n }\n }\n }\n\n private _visitSubInstructions(\n instructions: AnimationTimelineInstruction[],\n context: AnimationTimelineContext,\n options: AnimateChildOptions,\n ): number {\n const startTime = context.currentTimeline.currentTime;\n let furthestTime = startTime;\n\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach((instruction) => {\n const instructionTimings = context.appendInstructionToTimeline(\n instruction,\n duration,\n delay,\n );\n furthestTime = Math.max(\n furthestTime,\n instructionTimings.duration + instructionTimings.delay,\n );\n });\n }\n\n return furthestTime;\n }\n\n visitReference(ast: ReferenceAst, context: AnimationTimelineContext) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n\n visitSequence(ast: SequenceAst, context: AnimationTimelineContext) {\n const subContextCount = context.subContextCount;\n let ctx = context;\n const options = ast.options;\n\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n\n if (options.delay != null) {\n if (ctx.previousNode.type == AnimationMetadataType.Style) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n\n const delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n\n if (ast.steps.length) {\n ast.steps.forEach((s) => visitDslNode(this, s, ctx));\n\n // this is here just in case the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n\n context.previousNode = ast;\n }\n\n visitGroup(ast: GroupAst, context: AnimationTimelineContext) {\n const innerTimelines: TimelineBuilder[] = [];\n let furthestTime = context.currentTimeline.currentTime;\n const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n\n ast.steps.forEach((s) => {\n const innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach((timeline) =>\n context.currentTimeline.mergeTimelineCollectedStyles(timeline),\n );\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n\n private _visitTiming(ast: TimingAst, context: AnimationTimelineContext): AnimateTimings {\n if ((ast as DynamicTimingAst).dynamic) {\n const strValue = (ast as DynamicTimingAst).strValue;\n const timingValue = context.params\n ? interpolateParams(strValue, context.params, context.errors)\n : strValue;\n return resolveTiming(timingValue, context.errors);\n } else {\n return {duration: ast.duration, delay: ast.delay, easing: ast.easing};\n }\n }\n\n visitAnimate(ast: AnimateAst, context: AnimationTimelineContext) {\n const timings = (context.currentAnimateTimings = this._visitTiming(ast.timings, context));\n const timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n\n const style = ast.style;\n if (style.type == AnimationMetadataType.Keyframes) {\n this.visitKeyframes(style, context);\n } else {\n context.incrementTime(timings.duration);\n this.visitStyle(style as StyleAst, context);\n timeline.applyStylesToKeyframe();\n }\n\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n\n visitStyle(ast: StyleAst, context: AnimationTimelineContext) {\n const timeline = context.currentTimeline;\n const timings = context.currentAnimateTimings!;\n\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.hasCurrentStyleProperties()) {\n timeline.forwardFrame();\n }\n\n const easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n } else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n\n context.previousNode = ast;\n }\n\n visitKeyframes(ast: KeyframesAst, context: AnimationTimelineContext) {\n const currentAnimateTimings = context.currentAnimateTimings!;\n const startTime = context.currentTimeline!.duration;\n const duration = currentAnimateTimings.duration;\n const innerContext = context.createSubContext();\n const innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n\n ast.styles.forEach((step) => {\n const offset: number = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n\n visitQuery(ast: QueryAst, context: AnimationTimelineContext) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const startTime = context.currentTimeline.currentTime;\n const options = (ast.options || {}) as AnimationQueryOptions;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n\n if (\n delay &&\n (context.previousNode.type === AnimationMetadataType.Style ||\n (startTime == 0 && context.currentTimeline.hasCurrentStyleProperties()))\n ) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n\n let furthestTime = startTime;\n const elms = context.invokeQuery(\n ast.selector,\n ast.originalSelector,\n ast.limit,\n ast.includeSelf,\n options.optional ? true : false,\n context.errors,\n );\n\n context.currentQueryTotal = elms.length;\n let sameElementTimeline: TimelineBuilder | null = null;\n elms.forEach((element, i) => {\n context.currentQueryIndex = i;\n const innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n\n visitDslNode(this, ast.animation, innerContext);\n\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n\n const endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n\n context.previousNode = ast;\n }\n\n visitStagger(ast: StaggerAst, context: AnimationTimelineContext) {\n const parentContext = context.parentContext!;\n const tl = context.currentTimeline;\n const timings = ast.timings;\n const duration = Math.abs(timings.duration);\n const maxTime = duration * (context.currentQueryTotal - 1);\n let delay = duration * context.currentQueryIndex;\n\n let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n\n const timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n\n const startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime =\n tl.currentTime - startingTime + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\n\nexport declare type StyleAtTime = {\n time: number;\n value: string | number;\n};\n\nconst DEFAULT_NOOP_PREVIOUS_NODE = <Ast<AnimationMetadataType>>{};\nexport class AnimationTimelineContext {\n public parentContext: AnimationTimelineContext | null = null;\n public currentTimeline: TimelineBuilder;\n public currentAnimateTimings: AnimateTimings | null = null;\n public previousNode: Ast<AnimationMetadataType> = DEFAULT_NOOP_PREVIOUS_NODE;\n public subContextCount = 0;\n public options: AnimationOptions = {};\n public currentQueryIndex: number = 0;\n public currentQueryTotal: number = 0;\n public currentStaggerTime: number = 0;\n\n constructor(\n private _driver: AnimationDriver,\n public element: any,\n public subInstructions: ElementInstructionMap,\n private _enterClassName: string,\n private _leaveClassName: string,\n public errors: Error[],\n public timelines: TimelineBuilder[],\n initialTimeline?: TimelineBuilder,\n ) {\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n\n get params() {\n return this.options.params;\n }\n\n updateOptions(options: AnimationOptions | null, skipIfExists?: boolean) {\n if (!options) return;\n\n const newOptions = options as any;\n let optionsToUpdate = this.options;\n\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n (optionsToUpdate as any).duration = resolveTimingValue(newOptions.duration);\n }\n\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n\n const newParams = newOptions.params;\n if (newParams) {\n let paramsToUpdate: {[name: string]: any} = optionsToUpdate.params!;\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n\n Object.keys(newParams).forEach((name) => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n\n private _copyOptions() {\n const options: AnimationOptions = {};\n if (this.options) {\n const oldParams = this.options.params;\n if (oldParams) {\n const params: {[name: string]: any} = (options['params'] = {});\n Object.keys(oldParams).forEach((name) => {\n params[name] = oldParams[name];\n });\n }\n }\n return options;\n }\n\n createSubContext(\n options: AnimationOptions | null = null,\n element?: any,\n newTime?: number,\n ): AnimationTimelineContext {\n const target = element || this.element;\n const context = new AnimationTimelineContext(\n this._driver,\n target,\n this.subInstructions,\n this._enterClassName,\n this._leaveClassName,\n this.errors,\n this.timelines,\n this.currentTimeline.fork(target, newTime || 0),\n );\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n\n context.options = this._copyOptions();\n context.updateOptions(options);\n\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n\n transformIntoNewTimeline(newTime?: number) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n\n appendInstructionToTimeline(\n instruction: AnimationTimelineInstruction,\n duration: number | null,\n delay: number | null,\n ): AnimateTimings {\n const updatedTimings: AnimateTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: '',\n };\n const builder = new SubTimelineBuilder(\n this._driver,\n instruction.element,\n instruction.keyframes,\n instruction.preStyleProps,\n instruction.postStyleProps,\n updatedTimings,\n instruction.stretchStartingKeyframe,\n );\n this.timelines.push(builder);\n return updatedTimings;\n }\n\n incrementTime(time: number) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n\n delayNextStep(delay: number) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n\n invokeQuery(\n selector: string,\n originalSelector: string,\n limit: number,\n includeSelf: boolean,\n optional: boolean,\n errors: Error[],\n ): any[] {\n let results: any[] = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) {\n // only if :self is used then the selector can be empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n const multi = limit != 1;\n let elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements =\n limit < 0\n ? elements.slice(elements.length + limit, elements.length)\n : elements.slice(0, limit);\n }\n results.push(...elements);\n }\n\n if (!optional && results.length == 0) {\n errors.push(invalidQuery(originalSelector));\n }\n return results;\n }\n}\n\nexport class TimelineBuilder {\n public duration: number = 0;\n public easing: string | null = null;\n private _previousKeyframe: ɵStyleDataMap = new Map();\n private _currentKeyframe: ɵStyleDataMap = new Map();\n private _keyframes = new Map<number, ɵStyleDataMap>();\n private _styleSummary = new Map<string, StyleAtTime>();\n private _localTimelineStyles: ɵStyleDataMap = new Map();\n private _globalTimelineStyles: ɵStyleDataMap;\n private _pendingStyles: ɵStyleDataMap = new Map();\n private _backFill: ɵStyleDataMap = new Map();\n private _currentEmptyStepKeyframe: ɵStyleDataMap | null = null;\n\n constructor(\n private _driver: AnimationDriver,\n public element: any,\n public startTime: number,\n private _elementTimelineStylesLookup?: Map<any, ɵStyleDataMap>,\n ) {\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map<any, ɵStyleDataMap>();\n }\n\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element)!;\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n\n containsAnimation(): boolean {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.hasCurrentStyleProperties();\n default:\n return true;\n }\n }\n\n hasCurrentStyleProperties(): boolean {\n return this._currentKeyframe.size > 0;\n }\n\n get currentTime() {\n return this.startTime + this.duration;\n }\n\n delayNextStep(delay: number) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size;\n\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n } else {\n this.startTime += delay;\n }\n }\n\n fork(element: any, currentTime?: number): TimelineBuilder {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(\n this._driver,\n element,\n currentTime || this.currentTime,\n this._elementTimelineStylesLookup,\n );\n }\n\n private _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration)!;\n if (!this._currentKeyframe) {\n this._currentKeyframe = new Map();\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n\n forwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n\n forwardTime(time: number) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n\n private _updateStyle(prop: string, value: string | number) {\n this._localTimelineStyles.set(prop, value);\n this._globalTimelineStyles.set(prop, value);\n this._styleSummary.set(prop, {time: this.currentTime, value});\n }\n\n allowOnlyTimelineStyles() {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n }\n\n applyEmptyStep(easing: string | null) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n for (let [prop, value] of this._globalTimelineStyles) {\n this._backFill.set(prop, value || AUTO_STYLE);\n this._currentKeyframe.set(prop, AUTO_STYLE);\n }\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n\n setStyles(\n input: Array<ɵStyleDataMap | string>,\n easing: string | null,\n errors: Error[],\n options?: AnimationOptions,\n ) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n const params = (options && options.params) || {};\n const styles = flattenStyles(input, this._globalTimelineStyles);\n for (let [prop, value] of styles) {\n const val = interpolateParams(value, params, errors);\n this._pendingStyles.set(prop, val);\n if (!this._localTimelineStyles.has(prop)) {\n this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? AUTO_STYLE);\n }\n this._updateStyle(prop, val);\n }\n }\n\n applyStylesToKeyframe() {\n if (this._pendingStyles.size == 0) return;\n\n this._pendingStyles.forEach((val, prop) => {\n this._currentKeyframe.set(prop, val);\n });\n this._pendingStyles.clear();\n\n this._localTimelineStyles.forEach((val, prop) => {\n if (!this._currentKeyframe.has(prop)) {\n this._currentKeyframe.set(prop, val);\n }\n });\n }\n\n snapshotCurrentStyles() {\n for (let [prop, val] of this._localTimelineStyles) {\n this._pendingStyles.set(prop, val);\n this._updateStyle(prop, val);\n }\n }\n\n getFinalKeyframe() {\n return this._keyframes.get(this.duration);\n }\n\n get properties() {\n const properties: string[] = [];\n for (let prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n\n mergeTimelineCollectedStyles(timeline: TimelineBuilder) {\n timeline._styleSummary.forEach((details1, prop) => {\n const details0 = this._styleSummary.get(prop);\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n\n buildKeyframes(): AnimationTimelineInstruction {\n this.applyStylesToKeyframe();\n const preStyleProps = new Set<string>();\n const postStyleProps = new Set<string>();\n const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n\n let finalKeyframes: Array<ɵStyleDataMap> = [];\n this._keyframes.forEach((keyframe, time) => {\n const finalKeyframe = new Map([...this._backFill, ...keyframe]);\n finalKeyframe.forEach((value, prop) => {\n if (value === PRE_STYLE) {\n preStyleProps.add(prop);\n } else if (value === AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe.set('offset', time / this.duration);\n }\n finalKeyframes.push(finalKeyframe);\n });\n\n const preProps: string[] = [...preStyleProps.values()];\n const postProps: string[] = [...postStyleProps.values()];\n\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const kf0 = finalKeyframes[0];\n const kf1 = new Map(kf0);\n kf0.set('offset', 0);\n kf1.set('offset', 1);\n finalKeyframes = [kf0, kf1];\n }\n\n return createTimelineInstruction(\n this.element,\n finalKeyframes,\n preProps,\n postProps,\n this.duration,\n this.startTime,\n this.easing,\n false,\n );\n }\n}\n\nclass SubTimelineBuilder extends TimelineBuilder {\n public timings: AnimateTimings;\n\n constructor(\n driver: AnimationDriver,\n element: any,\n public keyframes: Array<ɵStyleDataMap>,\n public preStyleProps: string[],\n public postStyleProps: string[],\n timings: AnimateTimings,\n private _stretchStartingKeyframe: boolean = false,\n ) {\n super(driver, element, timings.delay);\n this.timings = {duration: timings.duration, delay: timings.delay, easing: timings.easing};\n }\n\n override containsAnimation(): boolean {\n return this.keyframes.length > 1;\n }\n\n override buildKeyframes(): AnimationTimelineInstruction {\n let keyframes = this.keyframes;\n let {delay, duration, easing} = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const newKeyframes: Array<ɵStyleDataMap> = [];\n const totalTime = duration + delay;\n const startingGap = delay / totalTime;\n\n // the original starting keyframe now starts once the delay is done\n const newFirstKeyframe = new Map(keyframes[0]);\n newFirstKeyframe.set('offset', 0);\n newKeyframes.push(newFirstKeyframe);\n\n const oldFirstKeyframe = new Map(keyframes[0]);\n oldFirstKeyframe.set('offset', roundOffset(startingGap));\n newKeyframes.push(oldFirstKeyframe);\n\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still rendered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n\n delay=1000, duration=1000, keyframes = 0 .5 1\n\n turns into\n\n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const limit = keyframes.length - 1;\n for (let i = 1; i <= limit; i++) {\n let kf = new Map(keyframes[i]);\n const oldOffset = kf.get('offset') as number;\n const timeAtKeyframe = delay + oldOffset * duration;\n kf.set('offset', roundOffset(timeAtKeyframe / totalTime));\n newKeyframes.push(kf);\n }\n\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n\n keyframes = newKeyframes;\n }\n\n return createTimelineInstruction(\n this.element,\n keyframes,\n this.preStyleProps,\n this.postStyleProps,\n duration,\n delay,\n easing,\n true,\n );\n }\n}\n\nfunction roundOffset(offset: number, decimalPoints = 3): number {\n const mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\n\nfunction flattenStyles(input: Array<ɵStyleDataMap | string>, allStyles: ɵStyleDataMap) {\n const styles: ɵStyleDataMap = new Map();\n let allProperties: string[] | IterableIterator<string>;\n input.forEach((token) => {\n if (token === '*') {\n allProperties ??= allStyles.keys();\n for (let prop of allProperties) {\n styles.set(prop, AUTO_STYLE);\n }\n } else {\n for (let [prop, val] of token as ɵStyleDataMap) {\n styles.set(prop, val);\n }\n }\n });\n return styles;\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.dev/license\n */\n\nimport {ɵStyleDataMap} from '@angular/animations';\n\nimport {\n AnimationEngineInstruction,\n AnimationTransitionInstructionType,\n} from '../render/animation_engine_instruction';\n\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport interface AnimationTransitionInstruction extends AnimationEngineInstruction {\n element: any;\n triggerName: string;\n isRemovalTransition: boolean;\n fromState: string;\n fromStyles: ɵStyleDataMap;\n toState: string;\n toStyles: ɵStyleDataMap;\n timelines: AnimationTimelineInstruction[];\n queriedElements: any[];\n preStyleProps: Map<any, Set<string>>;\n postStyleProps: Map<any, Set<string>>;\n totalTime: number;\n errors?: Error[];\n}\n\nexport function createTransitionInstruction(\n element: any,\n triggerName: string,\n fromState: string,\n toState: string,\n isRemovalTransition: boolean,\n fromStyles: ɵStyleDataMap,\n toStyles: ɵStyleDataMap,\n timelines: AnimationTimelineInstruction[],\n queriedElements: any[],\n preStyleProps: Map<any, Set<string>>,\n postStyleProps: Map<any, Set<string>>,\n totalTime: number,\n errors?: Error[],\n): AnimationTransitionInstruction {\n return {\n type: AnimationTransitionInstructionType.TransitionAnimation,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n totalTime,\n errors,\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.dev/license\n */\nimport {AnimationOptions, ɵStyleDataMap} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetDefaultValue} from '../render/shared';\nimport {interpolateParams} from '../util';\n\nimport {StyleAst, TransitionAst} from './animation_ast';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\nimport {TransitionMatcherFn} from './animation_transition_expr';\nimport {\n AnimationTransitionInstruction,\n createTransitionInstruction,\n} from './animation_transition_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\nimport {AnimationStyleNormalizer} from './style_normalization/animation_style_normalizer';\n\nconst EMPTY_OBJECT = {};\n\nexport class AnimationTransitionFactory {\n constructor(\n private _triggerName: string,\n public ast: TransitionAst,\n private _stateStyles: Map<string, AnimationStateStyles>,\n ) {}\n\n match(currentState: any, nextState: any, element: any, params: {[key: string]: any}): boolean {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n }\n\n buildStyles(\n stateName: string | boolean | undefined,\n params: {[key: string]: any},\n errors: Error[],\n ): ɵStyleDataMap {\n let styler = this._stateStyles.get('*');\n if (stateName !== undefined) {\n styler = this._stateStyles.get(stateName?.toString()) || styler;\n }\n return styler ? styler.buildStyles(params, errors) : new Map();\n }\n\n build(\n driver: AnimationDriver,\n element: any,\n currentState: any,\n nextState: any,\n enterClassName: string,\n leaveClassName: string,\n currentOptions?: AnimationOptions,\n nextOptions?: AnimationOptions,\n subInstructions?: ElementInstructionMap,\n skipAstBuild?: boolean,\n ): AnimationTransitionInstruction {\n const errors: Error[] = [];\n\n const transitionAnimationParams = (this.ast.options && this.ast.options.params) || EMPTY_OBJECT;\n const currentAnimationParams = (currentOptions && currentOptions.params) || EMPTY_OBJECT;\n const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const nextAnimationParams = (nextOptions && nextOptions.params) || EMPTY_OBJECT;\n const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n\n const queriedElements = new Set<any>();\n const preStyleMap = new Map<any, Set<string>>();\n const postStyleMap = new Map<any, Set<string>>();\n const isRemoval = nextState === 'void';\n\n const animationOptions: AnimationOptions = {\n params: applyParamDefaults(nextAnimationParams, transitionAnimationParams),\n delay: this.ast.options?.delay,\n };\n\n const timelines = skipAstBuild\n ? []\n : buildAnimationTimelines(\n driver,\n element,\n this.ast.animation,\n enterClassName,\n leaveClassName,\n currentStateStyles,\n nextStateStyles,\n animationOptions,\n subInstructions,\n errors,\n );\n\n let totalTime = 0;\n timelines.forEach((tl) => {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n\n if (errors.length) {\n return createTransitionInstruction(\n element,\n this._triggerName,\n currentState,\n nextState,\n isRemoval,\n currentStateStyles,\n nextStateStyles,\n [],\n [],\n preStyleMap,\n postStyleMap,\n totalTime,\n errors,\n );\n }\n\n timelines.forEach((tl) => {\n const elm = tl.element;\n const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set<string>());\n tl.preStyleProps.forEach((prop) => preProps.add(prop));\n\n const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set<string>());\n tl.postStyleProps.forEach((prop) => postProps.add(prop));\n\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n checkNonAnimatableInTimelines(timelines, this._triggerName, driver);\n }\n\n return createTransitionInstruction(\n element,\n this._triggerName,\n currentState,\n nextState,\n isRemoval,\n currentStateStyles,\n nextStateStyles,\n timelines,\n [...queriedElements.values()],\n preStyleMap,\n postStyleMap,\n totalTime,\n );\n }\n}\n\n/**\n * Checks inside a set of timelines if they try to animate a css property which is not considered\n * animatable, in that case it prints a warning on the console.\n * Besides that the function doesn't have any other effect.\n *\n * Note: this check is done here after the timelines are built instead of doing on a lower level so\n * that we can make sure that the warning appears only once per instruction (we can aggregate here\n * all the issues instead of finding them separately).\n *\n * @param timelines The built timelines for the current instruction.\n * @param triggerName The name of the trigger for the current instruction.\n * @param driver Animation driver used to perform the check.\n *\n */\nfunction checkNonAnimatableInTimelines(\n timelines: AnimationTimelineInstruction[],\n triggerName: string,\n driver: AnimationDriver,\n): void {\n if (!driver.validateAnimatableStyleProperty) {\n return;\n }\n\n const allowedNonAnimatableProps = new Set<string>([\n // 'easing' is a utility/synthetic prop we use to represent\n // easing functions, it represents a property of the animation\n // which is not animatable but different values can be used\n // in different steps\n 'easing',\n ]);\n\n const invalidNonAnimatableProps = new Set<string>();\n\n timelines.forEach(({keyframes}) => {\n const nonAnimatablePropsInitialValues = new Map<string, string | number>();\n keyframes.forEach((keyframe) => {\n const entriesToCheck = Array.from(keyframe.entries()).filter(\n ([prop]) => !allowedNonAnimatableProps.has(prop),\n );\n for (const [prop, value] of entriesToCheck) {\n if (!driver.validateAnimatableStyleProperty!(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n } else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(\n `Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` +\n ' not animatable properties: ' +\n Array.from(invalidNonAnimatableProps).join(', ') +\n '\\n' +\n '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)',\n );\n }\n}\n\nfunction oneOrMoreTransitionsMatch(\n matchFns: TransitionMatcherFn[],\n currentState: any,\n nextState: any,\n element: any,\n params: {[key: string]: any},\n): boolean {\n return matchFns.some((fn) => fn(currentState, nextState, element, params));\n}\n\nfunction applyParamDefaults(userParams: Record<string, any>, defaults: Record<string, any>) {\n const result: Record<string, any> = {...defaults};\n Object.entries(userParams).forEach(([key, value]) => {\n if (value != null) {\n result[key] = value;\n }\n });\n return result;\n}\n\nexport class AnimationStateStyles {\n constructor(\n private styles: StyleAst,\n private defaultParams: {[key: string]: any},\n private normalizer: AnimationStyleNormalizer,\n ) {}\n\n buildStyles(params: {[key: string]: any}, errors: Error[]): ɵStyleDataMap {\n const finalStyles: ɵStyleDataMap = new Map();\n const combinedParams = applyParamDefaults(params, this.defaultParams);\n this.styles.styles.forEach((value) => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(prop, val);\n });\n }\n });\n return finalStyles;\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.dev/license\n */\nimport {AnimationMetadataType, ɵStyleDataMap} from '@angular/animations';\n\nimport {SequenceAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationStateStyles, AnimationTransitionFactory} from './animation_transition_factory';\nimport {AnimationStyleNormalizer} from './style_normalization/animation_style_normalizer';\n\nexport function buildTrigger(\n name: string,\n ast: TriggerAst,\n normalizer: AnimationStyleNormalizer,\n): AnimationTrigger {\n return new AnimationTrigger(name, ast, normalizer);\n}\n\nexport class AnimationTrigger {\n public transitionFactories: AnimationTransitionFactory[] = [];\n public fallbackTransition: AnimationTransitionFactory;\n public states = new Map<string, AnimationStateStyles>();\n\n constructor(\n public name: string,\n public ast: TriggerAst,\n private _normalizer: AnimationStyleNormalizer,\n ) {\n ast.states.forEach((ast) => {\n const defaultParams = (ast.options && ast.options.params) || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n\n ast.transitions.forEach((ast) => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n\n matchTransition(\n currentState: any,\n nextState: any,\n element: any,\n params: {[key: string]: any},\n ): AnimationTransitionFactory | null {\n const entry = this.transitionFactories.find((f) =>\n f.match(currentState, nextState, element, params),\n );\n return entry || null;\n }\n\n matchStyles(currentState: any, params: {[key: string]: any}, errors: Error[]): ɵStyleDataMap {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\n\nfunction createFallbackTransition(\n triggerName: string,\n states: Map<string, AnimationStateStyles>,\n normalizer: AnimationStyleNormalizer,\n): AnimationTransitionFactory {\n const matchers = [(fromState: any, toState: any) => true];\n const animation: SequenceAst = {type: AnimationMetadataType.Sequence, steps: [], options: null};\n const transition: TransitionAst = {\n type: AnimationMetadataType.Transition,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0,\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\n\nfunction balanceProperties(\n stateMap: Map<string, AnimationStateStyles>,\n key1: string,\n key2: string,\n) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1)!);\n }\n } else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2)!);\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.dev/license\n */\nimport {\n AnimationMetadata,\n AnimationMetadataType,\n AnimationOptions,\n AnimationPlayer,\n AUTO_STYLE,\n ɵStyleDataMap,\n} from '@angular/animations';\n\nimport {Ast} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {buildAnimationTimelines} from '../dsl/animation_timeline_builder';\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {\n createAnimationFailed,\n missingOrDestroyedAnimation,\n missingPlayer,\n registerFailed,\n} from '../error_helpers';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME} from '../util';\nimport {warnRegister} from '../warning_helpers';\n\nimport {AnimationDriver} from './animation_driver';\nimport {\n getOrSetDefaultValue,\n listenOnPlayer,\n makeAnimationEvent,\n normalizeKeyframes,\n optimizeGroupPlayer,\n} from './shared';\n\nconst EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\n\nexport class TimelineAnimationEngine {\n private _animations = new Map<string, Ast<AnimationMetadataType>>();\n private _playersById = new Map<string, AnimationPlayer>();\n public players: AnimationPlayer[] = [];\n\n constructor(\n public bodyNode: any,\n private _driver: AnimationDriver,\n private _normalizer: AnimationStyleNormalizer,\n ) {}\n\n register(id: string, metadata: AnimationMetadata | AnimationMetadata[]) {\n const errors: Error[] = [];\n const warnings: string[] = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw registerFailed(errors);\n } else {\n if (warnings.length) {\n warnRegister(warnings);\n }\n this._animations.set(id, ast);\n }\n }\n\n private _buildPlayer(\n i: AnimationTimelineInstruction,\n preStyles: ɵStyleDataMap,\n postStyles?: ɵStyleDataMap,\n ): AnimationPlayer {\n const element = i.element;\n const keyframes = normalizeKeyframes(this._normalizer, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n }\n\n create(id: string, element: any, options: AnimationOptions = {}): AnimationPlayer {\n const errors: Error[] = [];\n const ast = this._animations.get(id);\n let instructions: AnimationTimelineInstruction[];\n\n const autoStylesMap = new Map<any, ɵStyleDataMap>();\n\n if (ast) {\n instructions = buildAnimationTimelines(\n this._driver,\n element,\n ast,\n ENTER_CLASSNAME,\n LEAVE_CLASSNAME,\n new Map(),\n new Map(),\n options,\n EMPTY_INSTRUCTION_MAP,\n errors,\n );\n instructions.forEach((inst) => {\n const styles = getOrSetDefaultValue(\n autoStylesMap,\n inst.element,\n new Map<string, string | number | null>(),\n );\n inst.postStyleProps.forEach((prop) => styles.set(prop, null));\n });\n } else {\n errors.push(missingOrDestroyedAnimation());\n instructions = [];\n }\n\n if (errors.length) {\n throw createAnimationFailed(errors);\n }\n\n autoStylesMap.forEach((styles, element) => {\n styles.forEach((_, prop) => {\n styles.set(prop, this._driver.computeStyle(element, prop, AUTO_STYLE));\n });\n });\n\n const players = instructions.map((i) => {\n const styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, new Map(), styles);\n });\n const player = optimizeGroupPlayer(players);\n this._playersById.set(id, player);\n player.onDestroy(() => this.destroy(id));\n\n this.players.push(player);\n return player;\n }\n\n destroy(id: string) {\n const player = this._getPlayer(id);\n player.destroy();\n this._playersById.delete(id);\n const index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n\n private _getPlayer(id: string): AnimationPlayer {\n const player = this._playersById.get(id);\n if (!player) {\n throw missingPlayer(id);\n }\n return player;\n }\n\n listen(\n id: string,\n element: string,\n eventName: string,\n callback: (event: any) => any,\n ): () => void {\n // triggerName, fromState, toState are all ignored for timeline animations\n const baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => {};\n }\n\n command(id: string, element: any, command: string, args: any[]): void {\n if (command == 'register') {\n this.register(id, args[0] as AnimationMetadata | AnimationMetadata[]);\n return;\n }\n\n if (command == 'create') {\n const options = (args[0] || {}) as AnimationOptions;\n this.create(id, element, options);\n return;\n }\n\n const player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0] as string));\n break;\n case 'destroy':\n this.destroy(id);\n break;\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.dev/license\n */\nimport {\n AnimationOptions,\n AnimationPlayer,\n AUTO_STYLE,\n NoopAnimationPlayer,\n ɵAnimationGroupPlayer as AnimationGroupPlayer,\n ɵPRE_STYLE as PRE_STYLE,\n ɵStyleDataMap,\n} from '@angular/animations';\nimport {ɵWritable as Writable} from '@angular/core';\n\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {AnimationTransitionFactory} from '../dsl/animation_transition_factory';\nimport {AnimationTransitionInstruction} from '../dsl/animation_transition_instruction';\nimport {AnimationTrigger} from '../dsl/animation_trigger';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {\n missingEvent,\n missingTrigger,\n transitionFailed,\n triggerTransitionsFailed,\n unregisteredTrigger,\n unsupportedTriggerEvent,\n} from '../error_helpers';\nimport {\n ENTER_CLASSNAME,\n eraseStyles,\n LEAVE_CLASSNAME,\n NG_ANIMATING_CLASSNAME,\n NG_ANIMATING_SELECTOR,\n NG_TRIGGER_CLASSNAME,\n NG_TRIGGER_SELECTOR,\n setStyles,\n} from '../util';\n\nimport {AnimationDriver} from './animation_driver';\nimport {\n getOrSetDefaultValue,\n listenOnPlayer,\n makeAnimationEvent,\n normalizeKeyframes,\n optimizeGroupPlayer,\n} from './shared';\n\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\n\nconst EMPTY_PLAYER_ARRAY: TransitionAnimationPlayer[] = [];\nconst NULL_REMOVAL_STATE: ElementAnimationState = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false,\n};\nconst NULL_REMOVED_QUERIED_STATE: ElementAnimationState = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true,\n};\n\ninterface TriggerListener {\n name: string;\n phase: string;\n callback: (event: any) => any;\n}\n\ninterface QueueInstruction {\n element: any;\n triggerName: string;\n fromState: StateValue;\n toState: StateValue;\n transition: AnimationTransitionFactory;\n player: TransitionAnimationPlayer;\n isFallbackTransition: boolean;\n}\n\nconst REMOVAL_FLAG = '__ng_removed';\n\ninterface ElementAnimationState {\n setForRemoval: boolean;\n setForMove: boolean;\n hasAnimation: boolean;\n namespaceId: string;\n removedBeforeQueried: boolean;\n previousTriggersValues?: Map<string, string>;\n}\n\nclass StateValue {\n public value: string;\n public options: AnimationOptions;\n\n get params(): {[key: string]: any} {\n return this.options.params as {[key: string]: any};\n }\n\n constructor(\n input: any,\n public namespaceId: string = '',\n ) {\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n // we drop the value property from options.\n const {value, ...options} = input;\n this.options = options as AnimationOptions;\n } else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n\n absorbOptions(options: AnimationOptions) {\n const newParams = options.params;\n if (newParams) {\n const oldParams = this.options.params!;\n Object.keys(newParams).forEach((prop) => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\n\nconst VOID_VALUE = 'void';\nconst DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\n\nclass AnimationTransitionNamespace {\n public players: TransitionAnimationPlayer[] = [];\n\n private _triggers = new Map<string, AnimationTrigger>();\n private _queue: QueueInstruction[] = [];\n\n private _elementListeners = new Map<any, TriggerListener[]>();\n\n private _hostClassName: string;\n\n constructor(\n public id: string,\n public hostElement: any,\n private _engine: TransitionAnimationEngine,\n ) {\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n\n listen(element: any, name: string, phase: string, callback: (event: any) => boolean): () => any {\n if (!this._triggers.has(name)) {\n throw missingTrigger(phase, name);\n }\n\n if (phase == null || phase.length == 0) {\n throw missingEvent(name);\n }\n\n if (!isTriggerEventValid(phase)) {\n throw unsupportedTriggerEvent(phase, name);\n }\n\n const listeners = getOrSetDefaultValue(this._elementListeners, element, []);\n const data = {name, phase, callback};\n listeners.push(data);\n\n const triggersWithStates = getOrSetDefaultValue(\n this._engine.statesByElement,\n element,\n new Map<string, StateValue>(),\n );\n if (!triggersWithStates.has(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates.set(name, DEFAULT_STATE_VALUE);\n }\n\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n\n if (!this._triggers.has(name)) {\n triggersWithStates.delete(name);\n }\n });\n };\n }\n\n register(name: string, ast: AnimationTrigger): boolean {\n if (this._triggers.has(name)) {\n // throw\n return false;\n } else {\n this._triggers.set(name, ast);\n return true;\n }\n }\n\n private _getTrigger(name: string) {\n const trigger = this._triggers.get(name);\n if (!trigger) {\n throw unregisteredTrigger(name);\n }\n return trigger;\n }\n\n trigger(\n element: any,\n triggerName: string,\n value: any,\n defaultToFallback: boolean = true,\n ): TransitionAnimationPlayer | undefined {\n const trigger = this._getTrigger(triggerName);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n let triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(\n element,\n (triggersWithStates = new Map<string, StateValue>()),\n );\n }\n\n let fromState = triggersWithStates.get(triggerName);\n const toState = new StateValue(value, this.id);\n const isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n\n triggersWithStates.set(triggerName, toState);\n\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n\n const isRemoval = toState.value === VOID_VALUE;\n\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const errors: Error[] = [];\n const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n } else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n\n const playersOnElement: TransitionAnimationPlayer[] = getOrSetDefaultValue(\n this._engine.playersByElement,\n element,\n [],\n );\n playersOnElement.forEach((player) => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new player)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n\n let transition = trigger.matchTransition(\n fromState.value,\n toState.value,\n element,\n toState.params,\n );\n let isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback) return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition,\n });\n\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n\n player.onDone(() => {\n let index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n\n const players = this._engine.playersByElement.get(element);\n if (players) {\n let index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n\n this.players.push(player);\n playersOnElement.push(player);\n\n return player;\n }\n\n deregister(name: string) {\n this._triggers.delete(name);\n\n this._engine.statesByElement.forEach((stateMap) => stateMap.delete(name));\n\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(\n element,\n listeners.filter((entry) => {\n return entry.name != name;\n }),\n );\n });\n }\n\n clearElementCache(element: any) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach((player) => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n\n private _signalRemovalForInnerTriggers(rootElement: any, context: any) {\n const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach((elm) => {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG]) return;\n\n const namespaces = this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach((ns) => ns.triggerLeaveAnimation(elm, context, false, true));\n } else {\n this.clearElementCache(elm);\n }\n });\n\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(() =>\n elements.forEach((elm) => this.clearElementCache(elm)),\n );\n }\n\n triggerLeaveAnimation(\n element: any,\n context: any,\n destroyAfterComplete?: boolean,\n defaultToFallback?: boolean,\n ): boolean {\n const triggerStates = this._engine.statesByElement.get(element);\n const previousTriggersValues = new Map<string, string>();\n if (triggerStates) {\n const players: TransitionAnimationPlayer[] = [];\n triggerStates.forEach((state, triggerName) => {\n previousTriggersValues.set(triggerName, state.value);\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers.has(triggerName)) {\n const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players.push(player);\n }\n }\n });\n\n if (players.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n }\n return true;\n }\n }\n return false;\n }\n\n prepareLeaveAnimationListeners(element: any) {\n const listeners = this._elementListeners.get(element);\n const elementStates = this._engine.statesByElement.get(element);\n\n // if this statement fails then it means that the element was picked up\n // by an earlier flush (or there are no listeners at all to track the leave).\n if (listeners && elementStates) {\n const visitedTriggers = new Set<string>();\n listeners.forEach((listener) => {\n const triggerName = listener.name;\n if (visitedTriggers.has(triggerName)) return;\n visitedTriggers.add(triggerName);\n\n const trigger = this._triggers.get(triggerName)!;\n const transition = trigger.fallbackTransition;\n const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE;\n const toState = new StateValue(VOID_VALUE);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true,\n });\n });\n }\n }\n\n removeNode(element: any, context: any): void {\n const engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true)) return;\n\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const currentPlayers = engine.players.length\n ? engine.playersByQueriedElement.get(element)\n : [];\n\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n } else {\n let parent = element;\n while ((parent = parent.parentNode)) {\n const triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n } else {\n const removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n }\n\n insertNode(element: any, parent: any): void {\n addClass(element, this._hostClassName);\n }\n\n drainQueuedTransitions(microtaskId: number): QueueInstruction[] {\n const instructions: QueueInstruction[] = [];\n this._queue.forEach((entry) => {\n const player = entry.player;\n if (player.destroyed) return;\n\n const element = entry.element;\n const listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach((listener: TriggerListener) => {\n if (listener.name == entry.triggerName) {\n const baseEvent = makeAnimationEvent(\n element,\n entry.triggerName,\n entry.fromState.value,\n entry.toState.value,\n );\n (baseEvent as any)['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n } else {\n instructions.push(entry);\n }\n });\n\n this._queue = [];\n\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const d0 = a.transition.ast.depCount;\n const d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n\n destroy(context: any) {\n this.players.forEach((p) => p.destroy());\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n }\n}\n\ninterface QueuedTransition {\n element: any;\n instruction: AnimationTransitionInstruction;\n player: TransitionAnimationPlayer;\n}\n\nexport class TransitionAnimationEngine {\n public players: TransitionAnimationPlayer[] = [];\n public newHostElements = new Map<any, AnimationTransitionNamespace>();\n public playersByElement = new Map<any, TransitionAnimationPlayer[]>();\n public playersByQueriedElement = new Map<any, TransitionAnimationPlayer[]>();\n public statesByElement = new Map<any, Map<string, StateValue>>();\n public disabledNodes = new Set<any>();\n\n public totalAnimations = 0;\n public totalQueuedPlayers = 0;\n\n private _namespaceLookup: {[id: string]: AnimationTransitionNamespace} = {};\n private _namespaceList: AnimationTransitionNamespace[] = [];\n private _flushFns: (() => any)[] = [];\n private _whenQuietFns: (() => any)[] = [];\n\n public namespacesByHostElement = new Map<any, AnimationTransitionNamespace>();\n public collectedEnterElements: any[] = [];\n public collectedLeaveElements: any[] = [];\n\n // this method is designed to be overridden by the code that uses this engine\n public onRemovalComplete = (element: any, context: any) => {};\n\n /** @internal */\n _onRemovalComplete(element: any, context: any) {\n this.onRemovalComplete(element, context);\n }\n\n constructor(\n public bodyNode: any,\n public driver: AnimationDriver,\n private _normalizer: AnimationStyleNormalizer,\n ) {}\n\n get queuedPlayers(): TransitionAnimationPlayer[] {\n const players: TransitionAnimationPlayer[] = [];\n this._namespaceList.forEach((ns) => {\n ns.players.forEach((player) => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n\n createNamespace(namespaceId: string, hostElement: any) {\n const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) {\n this._balanceNamespaceList(ns, hostElement);\n } else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n\n // given that this host element is a part of the animation code, it\n // may or may not be inserted by a parent node that is of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return (this._namespaceLookup[namespaceId] = ns);\n }\n\n private _balanceNamespaceList(ns: AnimationTransitionNamespace, hostElement: any) {\n const namespaceList = this._namespaceList;\n const namespacesByHostElement = this.namespacesByHostElement;\n const limit = namespaceList.length - 1;\n if (limit >= 0) {\n let found = false;\n // Find the closest ancestor with an existing namespace so we can then insert `ns` after it,\n // establishing a top-down ordering of namespaces in `this._namespaceList`.\n let ancestor = this.driver.getParentElement(hostElement);\n while (ancestor) {\n const ancestorNs = namespacesByHostElement.get(ancestor);\n if (ancestorNs) {\n // An animation namespace has been registered for this ancestor, so we insert `ns`\n // right after it to establish top-down ordering of animation namespaces.\n const index = namespaceList.indexOf(ancestorNs);\n namespaceList.splice(index + 1, 0, ns);\n found = true;\n break;\n }\n ancestor = this.driver.getParentElement(ancestor);\n }\n if (!found) {\n // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to\n // ensure that any existing descendants are ordered after `ns`, retaining the desired\n // top-down ordering.\n namespaceList.unshift(ns);\n }\n } else {\n namespaceList.push(ns);\n }\n\n namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n\n register(namespaceId: string, hostElement: any) {\n let ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n\n registerTrigger(namespaceId: string, name: string, trigger: AnimationTrigger) {\n let ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n\n destroy(namespaceId: string, context: any) {\n if (!namespaceId) return;\n this.afterFlush(() => {});\n\n this.afterFlushAnimationsDone(() => {\n const ns = this._fetchNamespace(namespaceId);\n this.namespacesByHostElement.delete(ns.hostElement);\n const index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n ns.destroy(context);\n delete this._namespaceLookup[namespaceId];\n });\n }\n\n private _fetchNamespace(id: string) {\n return this._namespaceLookup[id];\n }\n\n fetchNamespacesByElement(element: any): Set<AnimationTransitionNamespace> {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply deduplicate\n // the namespaces in case (for the reason described above) there are multiple triggers\n const namespaces = new Set<AnimationTransitionNamespace>();\n const elementStates = this.statesByElement.get(element);\n if (elementStates) {\n for (let stateValue of elementStates.values()) {\n if (stateValue.namespaceId) {\n const ns = this._fetchNamespace(stateValue.namespaceId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n }\n\n trigger(namespaceId: string, element: any, name: string, value: any): boolean {\n if (isElementNode(element)) {\n const ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n }\n\n insertNode(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n if (!isElementNode(element)) return;\n\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const details = element[REMOVAL_FLAG] as ElementAnimationState;\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n const index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n const ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n\n collectEnterElement(element: any) {\n this.collectedEnterElements.push(element);\n }\n\n markElementAsDisabled(element: any, value: boolean) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n } else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n\n removeNode(namespaceId: string, element: any, context: any): void {\n if (isElementNode(element)) {\n const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n } else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n\n const hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n } else {\n this._onRemovalComplete(element, context);\n }\n }\n\n markElementAsRemoved(\n namespaceId: string,\n element: any,\n hasAnimation?: boolean,\n context?: any,\n previousTriggersValues?: Map<string, string>,\n ) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context,\n hasAnimation,\n removedBeforeQueried: false,\n previousTriggersValues,\n };\n }\n\n listen(\n namespaceId: string,\n element: any,\n name: string,\n phase: string,\n callback: (event: any) => boolean,\n ): () => any {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => {};\n }\n\n private _buildInstruction(\n entry: QueueInstruction,\n subTimelines: ElementInstructionMap,\n enterClassName: string,\n leaveClassName: string,\n skipBuildAst?: boolean,\n ) {\n return entry.transition.build(\n this.driver,\n entry.element,\n entry.fromState.value,\n entry.toState.value,\n enterClassName,\n leaveClassName,\n entry.fromState.options,\n entry.toState.options,\n subTimelines,\n skipBuildAst,\n );\n }\n\n destroyInnerAnimations(containerElement: any) {\n let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach((element) => this.destroyActiveAnimationsForElement(element));\n\n if (this.playersByQueriedElement.size == 0) return;\n\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach((element) => this.finishActiveQueriedAnimationOnElement(element));\n }\n\n destroyActiveAnimationsForElement(element: any) {\n const players = this.playersByElement.get(element);\n if (players) {\n players.forEach((player) => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n } else {\n player.destroy();\n }\n });\n }\n }\n\n finishActiveQueriedAnimationOnElement(element: any) {\n const players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach((player) => player.finish());\n }\n }\n\n whenRenderingDone(): Promise<any> {\n return new Promise<void>((resolve) => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n processLeaveNode(element: any) {\n const details = element[REMOVAL_FLAG] as ElementAnimationState;\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n\n if (element.classList?.contains(DISABLED_CLASSNAME)) {\n this.markElementAsDisabled(element, false);\n }\n\n this.driver.query(element, DISABLED_SELECTOR, true).forEach((node) => {\n this.markElementAsDisabled(node, false);\n });\n }\n\n flush(microtaskId: number = -1) {\n let players: AnimationPlayer[] = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (let i = 0; i < this.collectedEnterElements.length; i++) {\n const elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n\n if (\n this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)\n ) {\n const cleanupFns: Function[] = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n } finally {\n for (let i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n } else {\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach((fn) => fn());\n this._flushFns = [];\n\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => {\n quietFns.forEach((fn) => fn());\n });\n } else {\n quietFns.forEach((fn) => fn());\n }\n }\n }\n\n reportError(errors: Error[]) {\n throw triggerTransitionsFailed(errors);\n }\n\n private _flushAnimations(\n cleanupFns: Function[],\n microtaskId: number,\n ): TransitionAnimationPlayer[] {\n const subTimelines = new ElementInstructionMap();\n const skippedPlayers: TransitionAnimationPlayer[] = [];\n const skippedPlayersMap = new Map<any, AnimationPlayer[]>();\n const queuedInstructions: QueuedTransition[] = [];\n const queriedElements = new Map<any, TransitionAnimationPlayer[]>();\n const allPreStyleElements = new Map<any, Set<string>>();\n const allPostStyleElements = new Map<any, Set<string>>();\n\n const disabledElementsSet = new Set<any>();\n this.disabledNodes.forEach((node) => {\n disabledElementsSet.add(node);\n const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n\n const bodyNode = this.bodyNode;\n const allTriggerElements = Array.from(this.statesByElement.keys());\n const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n const enterNodeMapIds = new Map<any, string>();\n let i = 0;\n enterNodeMap.forEach((nodes, root) => {\n const className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach((node) => addClass(node, className));\n });\n\n const allLeaveNodes: any[] = [];\n const mergedLeaveNodes = new Set<any>();\n const leaveNodesWithoutAnimations = new Set<any>();\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n const details = element[REMOVAL_FLAG] as ElementAnimationState;\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver\n .query(element, STAR_SELECTOR, true)\n .forEach((elm) => mergedLeaveNodes.add(elm));\n } else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n\n const leaveNodeMapIds = new Map<any, string>();\n const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach((nodes, root) => {\n const className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach((node) => addClass(node, className));\n });\n\n cleanupFns.push(() => {\n enterNodeMap.forEach((nodes, root) => {\n const className = enterNodeMapIds.get(root)!;\n nodes.forEach((node) => removeClass(node, className));\n });\n\n leaveNodeMap.forEach((nodes, root) => {\n const className = leaveNodeMapIds.get(root)!;\n nodes.forEach((node) => removeClass(node, className));\n });\n\n allLeaveNodes.forEach((element) => {\n this.processLeaveNode(element);\n });\n });\n\n const allPlayers: TransitionAnimationPlayer[] = [];\n const erroneousTransitions: AnimationTransitionInstruction[] = [];\n for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n const ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach((entry) => {\n const player = entry.player;\n const element = entry.element;\n allPlayers.push(player);\n\n if (this.collectedEnterElements.length) {\n const details = element[REMOVAL_FLAG] as ElementAnimationState;\n // animations for move operations (elements being removed and reinserted,\n // e.g. when the order of an *ngFor list changes) are currently not supported\n if (details && details.setForMove) {\n if (\n details.previousTriggersValues &&\n details.previousTriggersValues.has(entry.triggerName)\n ) {\n const previousValue = details.previousTriggersValues.get(entry.triggerName) as string;\n\n // we need to restore the previous trigger value since the element has\n // only been moved and hasn't actually left the DOM\n const triggersWithStates = this.statesByElement.get(entry.element);\n if (triggersWithStates && triggersWithStates.has(entry.triggerName)) {\n const state = triggersWithStates.get(entry.triggerName)!;\n state.value = previousValue;\n triggersWithStates.set(entry.triggerName, state);\n }\n }\n\n player.destroy();\n return;\n }\n }\n\n const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n const leaveClassName = leaveNodeMapIds.get(element)!;\n const enterClassName = enterNodeMapIds.get(element)!;\n const instruction = this._buildInstruction(\n entry,\n subTimelines,\n enterClassName,\n leaveClassName,\n nodeIsOrphaned,\n )!;\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n\n // even though the element may not be in the DOM, it may still\n // be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important to still style the element.\n if (nodeIsOrphaned) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n\n // if an unmatched transition is queued and ready to go\n // then it SHOULD NOT render an animation and cancel the\n // previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n\n // this means that if a parent animation uses this animation as a sub-trigger\n // then it will instruct the timeline builder not to add a player delay, but\n // instead stretch the first keyframe gap until the animation starts. This is\n // important in order to prevent extra initialization styles from being\n // required by the user for the animation.\n const timelines: AnimationTimelineInstruction[] = [];\n instruction.timelines.forEach((tl) => {\n tl.stretchStartingKeyframe = true;\n if (!this.disabledNodes.has(tl.element)) {\n timelines.push(tl);\n }\n });\n instruction.timelines = timelines;\n\n subTimelines.append(element, instruction.timelines);\n\n const tuple = {instruction, player, element};\n\n queuedInstructions.push(tuple);\n\n instruction.queriedElements.forEach((element) =>\n getOrSetDefaultValue(queriedElements, element, []).push(player),\n );\n\n instruction.preStyleProps.forEach((stringMap, element) => {\n if (stringMap.size) {\n let setVal: Set<string> = allPreStyleElements.get(element)!;\n if (!setVal) {\n allPreStyleElements.set(element, (setVal = new Set<string>()));\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n }\n });\n\n instruction.postStyleProps.forEach((stringMap, element) => {\n let setVal: Set<string> = allPostStyleElements.get(element)!;\n if (!setVal) {\n allPostStyleElements.set(element, (setVal = new Set<string>()));\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n });\n });\n }\n\n if (erroneousTransitions.length) {\n const errors: Error[] = [];\n erroneousTransitions.forEach((instruction) => {\n errors.push(transitionFailed(instruction.triggerName, instruction.errors!));\n });\n\n allPlayers.forEach((player) => player.destroy());\n this.reportError(errors);\n }\n\n const allPreviousPlayersMap = new Map<any, TransitionAnimationPlayer[]>();\n // this map tells us which element in the DOM tree is contained by\n // which animation. Further down this map will get populated once\n // the players are built and in doing so we can use it to efficiently\n // figure out if a sub player is skipped due to a parent player having priority.\n const animationElementMap = new Map<any, any>();\n queuedInstructions.forEach((entry) => {\n const element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n this._beforeAnimationBuild(\n entry.player.namespaceId,\n entry.instruction,\n allPreviousPlayersMap,\n );\n }\n });\n\n skippedPlayers.forEach((player) => {\n const element = player.element;\n const previousPlayers = this._getPreviousPlayers(\n element,\n false,\n player.namespaceId,\n player.triggerName,\n null,\n );\n previousPlayers.forEach((prevPlayer) => {\n getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n\n // this is a special case for nodes that will be removed either by\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or \"auto\" since the element\n // passed to getComputedStyle will not be visible (since * === destination)\n const replaceNodes = allLeaveNodes.filter((node) => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n\n // POST STAGE: fill the * styles\n const postStylesMap = new Map<any, ɵStyleDataMap>();\n const allLeaveQueriedNodes = cloakAndComputeStyles(\n postStylesMap,\n this.driver,\n leaveNodesWithoutAnimations,\n allPostStyleElements,\n AUTO_STYLE,\n );\n\n allLeaveQueriedNodes.forEach((node) => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n\n // PRE STAGE: fill the ! styles\n const preStylesMap = new Map<any, ɵStyleDataMap>();\n enterNodeMap.forEach((nodes, root) => {\n cloakAndComputeStyles(\n preStylesMap,\n this.driver,\n new Set(nodes),\n allPreStyleElements,\n PRE_STYLE,\n );\n });\n\n replaceNodes.forEach((node) => {\n const post = postStylesMap.get(node);\n const pre = preStylesMap.get(node);\n postStylesMap.set(node, new Map([...(post?.entries() ?? []), ...(pre?.entries() ?? [])]));\n });\n\n const rootPlayers: TransitionAnimationPlayer[] = [];\n const subPlayers: TransitionAnimationPlayer[] = [];\n const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach((entry) => {\n const {element, player, instruction} = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n let parentWithAnimation: any = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n let elm = element;\n const parentsToAdd: any[] = [];\n while ((elm = elm.parentNode)) {\n const detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach((parent) => animationElementMap.set(parent, parentWithAnimation));\n }\n\n const innerPlayer = this._buildAnimation(\n player.namespaceId,\n instruction,\n allPreviousPlayersMap,\n skippedPlayersMap,\n preStylesMap,\n postStylesMap,\n );\n\n player.setRealPlayer(innerPlayer);\n\n if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n } else {\n const parentPlayers = this.playersByElement.get(parentWithAnimation);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n } else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n\n // find all of the sub players' corresponding inner animation players\n subPlayers.forEach((player) => {\n // even if no players are found for a sub animation it\n // will still complete itself after the next tick since it's Noop\n const playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach((player) => {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n } else {\n player.destroy();\n }\n });\n\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let i = 0; i < allLeaveNodes.length; i++) {\n const element = allLeaveNodes[i];\n const details = element[REMOVAL_FLAG] as ElementAnimationState;\n removeClass(element, LEAVE_CLASSNAME);\n\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation) continue;\n\n let players: TransitionAnimationPlayer[] = [];\n\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n\n let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let j = 0; j < queriedInnerElements.length; j++) {\n let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n\n const activePlayers = players.filter((p) => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n } else {\n this.processLeaveNode(element);\n }\n }\n\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n\n rootPlayers.forEach((player) => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n\n const index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n\n return rootPlayers;\n }\n\n afterFlush(callback: () => any) {\n this._flushFns.push(callback);\n }\n\n afterFlushAnimationsDone(callback: () => any) {\n this._whenQuietFns.push(callback);\n }\n\n private _getPreviousPlayers(\n element: string,\n isQueriedElement: boolean,\n namespaceId?: string,\n triggerName?: string,\n toStateValue?: any,\n ): TransitionAnimationPlayer[] {\n let players: TransitionAnimationPlayer[] = [];\n if (isQueriedElement) {\n const queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n } else {\n const elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach((player) => {\n if (player.queued) return;\n if (!isRemovalAnimation && player.triggerName != triggerName) return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter((player) => {\n if (namespaceId && namespaceId != player.namespaceId) return false;\n if (triggerName && triggerName != player.triggerName) return false;\n return true;\n });\n }\n return players;\n }\n\n private _beforeAnimationBuild(\n namespaceId: string,\n instruction: AnimationTransitionInstruction,\n allPreviousPlayersMap: Map<any, TransitionAnimationPlayer[]>,\n ) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const targetNameSpaceId: string | undefined = instruction.isRemovalTransition\n ? undefined\n : namespaceId;\n const targetTriggerName: string | undefined = instruction.isRemovalTransition\n ? undefined\n : triggerName;\n\n for (const timelineInstruction of instruction.timelines) {\n const element = timelineInstruction.element;\n const isQueriedElement = element !== rootElement;\n const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []);\n const previousPlayers = this._getPreviousPlayers(\n element,\n isQueriedElement,\n targetNameSpaceId,\n targetTriggerName,\n instruction.toState,\n );\n previousPlayers.forEach((player) => {\n const realPlayer = (player as TransitionAnimationPlayer).getRealPlayer() as any;\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n }\n\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n\n private _buildAnimation(\n namespaceId: string,\n instruction: AnimationTransitionInstruction,\n allPreviousPlayersMap: Map<any, TransitionAnimationPlayer[]>,\n skippedPlayersMap: Map<any, AnimationPlayer[]>,\n preStylesMap: Map<any, ɵStyleDataMap>,\n postStylesMap: Map<any, ɵStyleDataMap>,\n ): AnimationPlayer {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const allQueriedPlayers: TransitionAnimationPlayer[] = [];\n const allConsumedElements = new Set<any>();\n const allSubElements = new Set<any>();\n const allNewPlayers = instruction.timelines.map((timelineInstruction) => {\n const element = timelineInstruction.element;\n allConsumedElements.add(element);\n\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried)\n return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n const isQueriedElement = element !== rootElement;\n const previousPlayers = flattenGroupPlayers(\n (allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY).map((p) => p.getRealPlayer()),\n ).filter((p) => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const pp = p as any;\n return pp.element ? pp.element === element : false;\n });\n\n const preStyles = preStylesMap.get(element);\n const postStyles = postStylesMap.get(element);\n\n const keyframes = normalizeKeyframes(\n this._normalizer,\n timelineInstruction.keyframes,\n preStyles,\n postStyles,\n );\n const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n\n if (isQueriedElement) {\n const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n\n return player;\n });\n\n allQueriedPlayers.forEach((player) => {\n getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n\n allConsumedElements.forEach((element) => addClass(element, NG_ANIMATING_CLASSNAME));\n const player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach((element) => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach((element) => {\n getOrSetDefaultValue(skippedPlayersMap, element, []).push(player);\n });\n\n return player;\n }\n\n private _buildPlayer(\n instruction: AnimationTimelineInstruction,\n keyframes: Array<ɵStyleDataMap>,\n previousPlayers: AnimationPlayer[],\n ): AnimationPlayer {\n if (keyframes.length > 0) {\n return this.driver.animate(\n instruction.element,\n keyframes,\n instruction.duration,\n instruction.delay,\n instruction.easing,\n previousPlayers,\n );\n }\n\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n }\n}\n\nexport class TransitionAnimationPlayer implements AnimationPlayer {\n private _player: AnimationPlayer = new NoopAnimationPlayer();\n private _containsRealPlayer = false;\n\n private _queuedCallbacks = new Map<string, ((event: any) => any)[]>();\n public readonly destroyed = false;\n public parentPlayer: AnimationPlayer | null = null;\n\n public markedForDestroy: boolean = false;\n public disabled = false;\n\n readonly queued: boolean = true;\n public readonly totalTime: number = 0;\n\n constructor(\n public namespaceId: string,\n public triggerName: string,\n public element: any,\n ) {}\n\n setRealPlayer(player: AnimationPlayer) {\n if (this._containsRealPlayer) return;\n\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach((callback) => listenOnPlayer(player, phase, undefined, callback));\n });\n\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n (this as Writable<this>).queued = false;\n }\n\n getRealPlayer() {\n return this._player;\n }\n\n overrideTotalTime(totalTime: number) {\n (this as any).totalTime = totalTime;\n }\n\n syncPlayerEvents(player: AnimationPlayer) {\n const p = this._player as any;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback!('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n\n private _queueEvent(name: string, callback: (event: any) => any): void {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n\n onDone(fn: () => void): void {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n\n onStart(fn: () => void): void {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n\n onDestroy(fn: () => void): void {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n\n init(): void {\n this._player.init();\n }\n\n hasStarted(): boolean {\n return this.queued ? false : this._player.hasStarted();\n }\n\n play(): void {\n !this.queued && this._player.play();\n }\n\n pause(): void {\n !this.queued && this._player.pause();\n }\n\n restart(): void {\n !this.queued && this._player.restart();\n }\n\n finish(): void {\n this._player.finish();\n }\n\n destroy(): void {\n (this as {destroyed: boolean}).destroyed = true;\n this._player.destroy();\n }\n\n reset(): void {\n !this.queued && this._player.reset();\n }\n\n setPosition(p: number): void {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n\n getPosition(): number {\n return this.queued ? 0 : this._player.getPosition();\n }\n\n /** @internal */\n triggerCallback(phaseName: string): void {\n const p = this._player as any;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\n\nfunction deleteOrUnsetInMap<T, V>(map: Map<T, V[]>, key: T, value: V) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\n\nfunction normalizeTriggerValue(value: any): any {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\n\nfunction isElementNode(node: any) {\n return node && node['nodeType'] === 1;\n}\n\nfunction isTriggerEventValid(eventName: string): boolean {\n return eventName == 'start' || eventName == 'done';\n}\n\nfunction cloakElement(element: any, value?: string) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\n\nfunction cloakAndComputeStyles(\n valuesMap: Map<any, ɵStyleDataMap>,\n driver: AnimationDriver,\n elements: Set<any>,\n elementPropsMap: Map<any, Set<string>>,\n defaultStyle: string,\n): any[] {\n const cloakVals: string[] = [];\n elements.forEach((element) => cloakVals.push(cloakElement(element)));\n\n const failedElements: any[] = [];\n\n elementPropsMap.forEach((props: Set<string>, element: any) => {\n const styles: ɵStyleDataMap = new Map();\n props.forEach((prop) => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach((element) => cloakElement(element, cloakVals[i++]));\n\n return failedElements;\n}\n\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots: any[], nodes: any[]): Map<any, any[]> {\n const rootMap = new Map<any, any[]>();\n roots.forEach((root) => rootMap.set(root, []));\n\n if (nodes.length == 0) return rootMap;\n\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map<any, any>();\n\n function getRoot(node: any): any {\n if (!node) return NULL_NODE;\n\n let root = localRootMap.get(node);\n if (root) return root;\n\n const parent = node.parentNode;\n if (rootMap.has(parent)) {\n // ngIf inside @trigger\n root = parent;\n } else if (nodeSet.has(parent)) {\n // ngIf inside ngIf\n root = NULL_NODE;\n } else {\n // recurse upwards\n root = getRoot(parent);\n }\n\n localRootMap.set(node, root);\n return root;\n }\n\n nodes.forEach((node) => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root)!.push(node);\n }\n });\n\n return rootMap;\n}\n\nfunction addClass(element: any, className: string) {\n element.classList?.add(className);\n}\n\nfunction removeClass(element: any, className: string) {\n element.classList?.remove(className);\n}\n\nfunction removeNodesAfterAnimationDone(\n engine: TransitionAnimationEngine,\n element: any,\n players: AnimationPlayer[],\n) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\n\nfunction flattenGroupPlayers(players: AnimationPlayer[]): AnimationPlayer[] {\n const finalPlayers: AnimationPlayer[] = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\n\nfunction _flattenGroupPlayersRecur(players: AnimationPlayer[], finalPlayers: AnimationPlayer[]) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof AnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n } else {\n finalPlayers.push(player);\n }\n }\n}\n\nfunction objEquals(a: {[key: string]: any}, b: {[key: string]: any}): boolean {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length) return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false;\n }\n return true;\n}\n\nfunction replacePostStylesAsPre(\n element: any,\n allPreStyleElements: Map<any, Set<string>>,\n allPostStyleElements: Map<any, Set<string>>,\n): boolean {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry) return false;\n\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach((data) => preEntry!.add(data));\n } else {\n allPreStyleElements.set(element, postEntry);\n }\n\n allPostStyleElements.delete(element);\n return true;\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.dev/license\n */\nimport {AnimationMetadata, AnimationPlayer, AnimationTriggerMetadata} from '@angular/animations';\n\nimport {TriggerAst} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {AnimationTrigger, buildTrigger} from '../dsl/animation_trigger';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {triggerBuildFailed} from '../error_helpers';\nimport {warnTriggerBuild} from '../warning_helpers';\n\nimport {AnimationDriver} from './animation_driver';\nimport {parseTimelineCommand} from './shared';\nimport {TimelineAnimationEngine} from './timeline_animation_engine';\nimport {TransitionAnimationEngine} from './transition_animation_engine';\n\nexport class AnimationEngine {\n private _transitionEngine: TransitionAnimationEngine;\n private _timelineEngine: TimelineAnimationEngine;\n\n private _triggerCache: {[key: string]: AnimationTrigger} = {};\n\n // this method is designed to be overridden by the code that uses this engine\n public onRemovalComplete = (element: any, context: any) => {};\n\n constructor(\n doc: Document,\n private _driver: AnimationDriver,\n private _normalizer: AnimationStyleNormalizer,\n ) {\n this._transitionEngine = new TransitionAnimationEngine(doc.body, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(doc.body, _driver, _normalizer);\n\n this._transitionEngine.onRemovalComplete = (element: any, context: any) =>\n this.onRemovalComplete(element, context);\n }\n\n registerTrigger(\n componentId: string,\n namespaceId: string,\n hostElement: any,\n name: string,\n metadata: AnimationTriggerMetadata,\n ): void {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors: Error[] = [];\n const warnings: string[] = [];\n const ast = buildAnimationAst(\n this._driver,\n metadata as AnimationMetadata,\n errors,\n warnings,\n ) as TriggerAst;\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n\n register(namespaceId: string, hostElement: any) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n\n destroy(namespaceId: string, context: any) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n\n onInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n\n onRemove(namespaceId: string, element: any, context: any): void {\n this._transitionEngine.removeNode(namespaceId, element, context);\n }\n\n disableAnimations(element: any, disable: boolean) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n\n process(namespaceId: string, element: any, property: string, value: any) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value as any[];\n this._timelineEngine.command(id, element, action, args);\n } else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n\n listen(\n namespaceId: string,\n element: any,\n eventName: string,\n eventPhase: string,\n callback: (event: any) => any,\n ): () => any {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n\n flush(microtaskId: number = -1): void {\n this._transitionEngine.flush(microtaskId);\n }\n\n get players(): AnimationPlayer[] {\n return [...this._transitionEngine.players, ...this._timelineEngine.players];\n }\n\n whenRenderingDone(): Promise<any> {\n return this._transitionEngine.whenRenderingDone();\n }\n\n afterFlushAnimationsDone(cb: VoidFunction): void {\n this._transitionEngine.afterFlushAnimationsDone(cb);\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.dev/license\n */\nimport {ɵStyleDataMap} from '@angular/animations';\n\nimport {eraseStyles, setStyles} from '../util';\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nexport function packageNonAnimatableStyles(\n element: any,\n styles: ɵStyleDataMap | Array<ɵStyleDataMap>,\n): SpecialCasedStyles | null {\n let startStyles: ɵStyleDataMap | null = null;\n let endStyles: ɵStyleDataMap | null = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n } else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n\n return startStyles || endStyles ? new SpecialCasedStyles(element, startStyles, endStyles) : null;\n}\n\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nexport class SpecialCasedStyles {\n static initialStylesByElement = /* @__PURE__ */ new WeakMap<any, ɵStyleDataMap>();\n\n private _state = SpecialCasedStylesState.Pending;\n private _initialStyles!: ɵStyleDataMap;\n\n constructor(\n private _element: any,\n private _startStyles: ɵStyleDataMap | null,\n private _endStyles: ɵStyleDataMap | null,\n ) {\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, (initialStyles = new Map()));\n }\n this._initialStyles = initialStyles;\n }\n\n start() {\n if (this._state < SpecialCasedStylesState.Started) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = SpecialCasedStylesState.Started;\n }\n }\n\n finish() {\n this.start();\n if (this._state < SpecialCasedStylesState.Finished) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = SpecialCasedStylesState.Started;\n }\n }\n\n destroy() {\n this.finish();\n if (this._state < SpecialCasedStylesState.Destroyed) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = SpecialCasedStylesState.Destroyed;\n }\n }\n}\n\n/**\n * An enum of states reflective of what the status of `SpecialCasedStyles` is.\n *\n * Depending on how `SpecialCasedStyles` is interacted with, the start and end\n * styles may not be applied in the same way. This enum ensures that if and when\n * the ending styles are applied then the starting styles are applied. It is\n * also used to reflect what the current status of the special cased styles are\n * which helps prevent the starting/ending styles not be applied twice. It is\n * also used to cleanup the styles once `SpecialCasedStyles` is destroyed.\n */\nconst enum SpecialCasedStylesState {\n Pending = 0,\n Started = 1,\n Finished = 2,\n Destroyed = 3,\n}\n\nfunction filterNonAnimatableStyles(styles: ɵStyleDataMap): ɵStyleDataMap | null {\n let result: ɵStyleDataMap | null = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\n\nfunction isNonAnimatableStyle(prop: string) {\n return prop === 'display' || prop === 'position';\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.dev/license\n */\nimport {AnimationPlayer, ɵStyleDataMap} from '@angular/animations';\n\nimport {computeStyle} from '../../util';\nimport {SpecialCasedStyles} from '../special_cased_styles';\n\nexport class WebAnimationsPlayer implements AnimationPlayer {\n private _onDoneFns: Function[] = [];\n private _onStartFns: Function[] = [];\n private _onDestroyFns: Function[] = [];\n private _duration: number;\n private _delay: number;\n private _initialized = false;\n private _finished = false;\n private _started = false;\n private _destroyed = false;\n private _finalKeyframe?: ɵStyleDataMap;\n\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n private _originalOnDoneFns: Function[] = [];\n private _originalOnStartFns: Function[] = [];\n\n // using non-null assertion because it's re(set) by init();\n public readonly domPlayer!: Animation;\n public time = 0;\n\n public parentPlayer: AnimationPlayer | null = null;\n public currentSnapshot: ɵStyleDataMap = new Map();\n\n constructor(\n public element: any,\n public keyframes: Array<ɵStyleDataMap>,\n public options: {[key: string]: string | number},\n private _specialStyles?: SpecialCasedStyles | null,\n ) {\n this._duration = <number>options['duration'];\n this._delay = <number>options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n\n private _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach((fn) => fn());\n this._onDoneFns = [];\n }\n }\n\n init(): void {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n\n private _buildPlayer(): void {\n if (this._initialized) return;\n this._initialized = true;\n\n const keyframes = this.keyframes;\n // @ts-expect-error overwriting a readonly property\n this.domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n const onFinish = () => this._onFinish();\n this.domPlayer.addEventListener('finish', onFinish);\n this.onDestroy(() => {\n // We must remove the `finish` event listener once an animation has completed all its\n // iterations. This action is necessary to prevent a memory leak since the listener captures\n // `this`, creating a closure that prevents `this` from being garbage collected.\n this.domPlayer.removeEventListener('finish', onFinish);\n });\n }\n\n private _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n } else {\n this.domPlayer.pause();\n }\n }\n\n private _convertKeyframesToObject(keyframes: Array<ɵStyleDataMap>): any[] {\n const kfs: any[] = [];\n keyframes.forEach((frame) => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n\n /** @internal */\n _triggerWebAnimation(\n element: HTMLElement,\n keyframes: Array<ɵStyleDataMap>,\n options: any,\n ): Animation {\n return element.animate(this._convertKeyframesToObject(keyframes), options);\n }\n\n onStart(fn: () => void): void {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n\n onDone(fn: () => void): void {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n\n onDestroy(fn: () => void): void {\n this._onDestroyFns.push(fn);\n }\n\n play(): void {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach((fn) => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n\n pause(): void {\n this.init();\n this.domPlayer.pause();\n }\n\n finish(): void {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n\n reset(): void {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n\n private _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n\n restart(): void {\n this.reset();\n this.play();\n }\n\n hasStarted(): boolean {\n return this._started;\n }\n\n destroy(): void {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach((fn) => fn());\n this._onDestroyFns = [];\n }\n }\n\n setPosition(p: number): void {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n\n getPosition(): number {\n // tsc is complaining with TS2362 without the conversion to number\n return +(this.domPlayer.currentTime ?? 0) / this.time;\n }\n\n get totalTime(): number {\n return this._delay + this._duration;\n }\n\n beforeDestroy() {\n const styles: ɵStyleDataMap = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe!;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n\n this.currentSnapshot = styles;\n }\n\n /** @internal */\n triggerCallback(phaseName: string): void {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach((fn) => fn());\n methods.length = 0;\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.dev/license\n */\nimport {AnimationPlayer, ɵStyleDataMap} from '@angular/animations';\n\nimport {\n allowPreviousPlayerStylesMerge,\n balancePreviousStylesIntoKeyframes,\n camelCaseToDashCase,\n computeStyle,\n normalizeKeyframes,\n} from '../../util';\nimport {AnimationDriver} from '../animation_driver';\nimport {\n containsElement,\n getParentElement,\n invokeQuery,\n validateStyleProperty,\n validateWebAnimatableStyleProperty,\n} from '../shared';\nimport {packageNonAnimatableStyles} from '../special_cased_styles';\n\nimport {WebAnimationsPlayer} from './web_animations_player';\n\nexport class WebAnimationsDriver implements AnimationDriver {\n validateStyleProperty(prop: string): boolean {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n\n validateAnimatableStyleProperty(prop: string): boolean {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n\n containsElement(elm1: any, elm2: any): boolean {\n return containsElement(elm1, elm2);\n }\n\n getParentElement(element: unknown): unknown {\n return getParentElement(element);\n }\n\n query(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n\n computeStyle(element: any, prop: string, defaultValue?: string): string {\n return computeStyle(element, prop);\n }\n\n animate(\n element: any,\n keyframes: Array<Map<string, string | number>>,\n duration: number,\n delay: number,\n easing: string,\n previousPlayers: AnimationPlayer[] = [],\n ): AnimationPlayer {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions: {[key: string]: string | number} = {duration, delay, fill};\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n\n const previousStyles: ɵStyleDataMap = new Map();\n const previousWebAnimationPlayers = <WebAnimationsPlayer[]>(\n previousPlayers.filter((player) => player instanceof WebAnimationsPlayer)\n );\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach((player) => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n\n let _keyframes = normalizeKeyframes(keyframes).map((styles) => new Map(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\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.dev/license\n */\n\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\n\nimport {\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n ɵAnimationRendererType as AnimationRendererType,\n} from '@angular/core';\nimport type {AnimationEngine} from './animation_engine_next';\n\ntype AnimationFactoryWithListenerCallback = RendererFactory2 & {\n scheduleListenerCallback: (count: number, fn: (e: any) => any, data: any) => void;\n};\n\nexport class BaseAnimationRenderer implements Renderer2 {\n // We need to explicitly type this property because of an api-extractor bug\n // See https://github.com/microsoft/rushstack/issues/4390\n readonly ɵtype: AnimationRendererType.Regular = AnimationRendererType.Regular;\n\n constructor(\n protected namespaceId: string,\n public delegate: Renderer2,\n public engine: AnimationEngine,\n private _onDestroy?: () => void,\n ) {}\n\n get data() {\n return this.delegate.data;\n }\n\n destroyNode(node: any): void {\n this.delegate.destroyNode?.(node);\n }\n\n destroy(): void {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.engine.afterFlushAnimationsDone(() => {\n // Call the renderer destroy method after the animations has finished as otherwise\n // styles will be removed too early which will cause an unstyled animation.\n queueMicrotask(() => {\n this.delegate.destroy();\n });\n });\n\n this._onDestroy?.();\n }\n\n createElement(name: string, namespace?: string | null | undefined) {\n return this.delegate.createElement(name, namespace);\n }\n\n createComment(value: string) {\n return this.delegate.createComment(value);\n }\n\n createText(value: string) {\n return this.delegate.createText(value);\n }\n\n appendChild(parent: any, newChild: any): void {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove: boolean = true): void {\n this.delegate.insertBefore(parent, newChild, refChild);\n // If `isMove` true than we should animate this insert.\n this.engine.onInsert(this.namespaceId, newChild, parent, isMove);\n }\n\n removeChild(parent: any, oldChild: any, isHostElement?: boolean): void {\n // Prior to the changes in #57203, this method wasn't being called at all by `core` if the child\n // doesn't have a parent. There appears to be some animation-specific downstream logic that\n // depends on the null check happening before the animation engine. This check keeps the old\n // behavior while allowing `core` to not have to check for the parent element anymore.\n if (this.parentNode(oldChild)) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate);\n }\n }\n\n selectRootElement(selectorOrNode: any, preserveContent?: boolean) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n\n parentNode(node: any) {\n return this.delegate.parentNode(node);\n }\n\n nextSibling(node: any) {\n return this.delegate.nextSibling(node);\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string | null | undefined): void {\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n } else {\n this.delegate.setProperty(el, name, value);\n }\n }\n\n setValue(node: any, value: string): void {\n this.delegate.setValue(node, value);\n }\n\n listen(target: any, eventName: string, callback: (event: any) => boolean | void): () => void {\n return this.delegate.listen(target, eventName, callback);\n }\n\n protected disableAnimations(element: any, value: boolean) {\n this.engine.disableAnimations(element, value);\n }\n}\n\nexport class AnimationRenderer extends BaseAnimationRenderer implements Renderer2 {\n constructor(\n public factory: AnimationFactoryWithListenerCallback,\n namespaceId: string,\n delegate: Renderer2,\n engine: AnimationEngine,\n onDestroy?: () => void,\n ) {\n super(namespaceId, delegate, engine, onDestroy);\n this.namespaceId = namespaceId;\n }\n\n override setProperty(el: any, name: string, value: any): void {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value as boolean);\n } else {\n this.engine.process(this.namespaceId, el, name.slice(1), value);\n }\n } else {\n this.delegate.setProperty(el, name, value);\n }\n }\n\n override listen(\n target: 'window' | 'document' | 'body' | any,\n eventName: string,\n callback: (event: any) => any,\n ): () => void {\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n const element = resolveElementFromTarget(target);\n let name = eventName.slice(1);\n let phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name.charAt(0) != ANIMATION_PREFIX) {\n [name, phase] = parseTriggerCallbackName(name);\n }\n return this.engine.listen(this.namespaceId, element, name, phase, (event) => {\n const countId = (event as any)['_data'] || -1;\n this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n }\n}\n\nfunction resolveElementFromTarget(target: 'window' | 'document' | 'body' | any): any {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\n\nfunction parseTriggerCallbackName(triggerName: string) {\n const dotIndex = triggerName.indexOf('.');\n const trigger = triggerName.substring(0, dotIndex);\n const phase = triggerName.slice(dotIndex + 1);\n return [trigger, phase];\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.dev/license\n */\nimport {AnimationTriggerMetadata} from '@angular/animations';\nimport type {NgZone, Renderer2, RendererFactory2, RendererType2} from '@angular/core';\n\nimport {AnimationEngine} from './animation_engine_next';\nimport {AnimationRenderer, BaseAnimationRenderer} from './renderer';\n\n// Define a recursive type to allow for nested arrays of `AnimationTriggerMetadata`. Note that an\n// interface declaration is used as TypeScript prior to 3.7 does not support recursive type\n// references, see https://github.com/microsoft/TypeScript/pull/33050 for details.\ntype NestedAnimationTriggerMetadata = AnimationTriggerMetadata | RecursiveAnimationTriggerMetadata;\ninterface RecursiveAnimationTriggerMetadata extends Array<NestedAnimationTriggerMetadata> {}\n\nexport class AnimationRendererFactory implements RendererFactory2 {\n private _currentId: number = 0;\n private _microtaskId: number = 1;\n private _animationCallbacksBuffer: [(e: any) => any, any][] = [];\n private _rendererCache = new Map<Renderer2, BaseAnimationRenderer>();\n private _cdRecurDepth = 0;\n\n constructor(\n private delegate: RendererFactory2,\n private engine: AnimationEngine,\n private _zone: NgZone,\n ) {\n engine.onRemovalComplete = (element: any, delegate: Renderer2 | null) => {\n delegate?.removeChild(null, element);\n };\n }\n\n createRenderer(hostElement: any, type: RendererType2): BaseAnimationRenderer {\n const EMPTY_NAMESPACE_ID = '';\n\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n const delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type?.data?.['animation']) {\n const cache = this._rendererCache;\n let renderer: BaseAnimationRenderer | undefined = cache.get(delegate);\n if (!renderer) {\n // Ensure that the renderer is removed from the cache on destroy\n // since it may contain references to detached DOM nodes.\n const onRendererDestroy = () => cache.delete(delegate);\n renderer = new BaseAnimationRenderer(\n EMPTY_NAMESPACE_ID,\n delegate,\n this.engine,\n onRendererDestroy,\n );\n // only cache this result when the base renderer is used\n cache.set(delegate, renderer);\n }\n return renderer;\n }\n\n const componentId = type.id;\n const namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n\n this.engine.register(namespaceId, hostElement);\n\n const registerTrigger = (trigger: NestedAnimationTriggerMetadata) => {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n } else {\n this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n const animationTriggers = type.data['animation'] as NestedAnimationTriggerMetadata[];\n animationTriggers.forEach(registerTrigger);\n\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n }\n\n begin() {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n\n private _scheduleCountTask() {\n queueMicrotask(() => {\n this._microtaskId++;\n });\n }\n\n /** @internal */\n scheduleListenerCallback(count: number, fn: (e: any) => any, data: any) {\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(() => fn(data));\n return;\n }\n\n const animationCallbacksBuffer = this._animationCallbacksBuffer;\n if (animationCallbacksBuffer.length == 0) {\n queueMicrotask(() => {\n this._zone.run(() => {\n animationCallbacksBuffer.forEach((tuple) => {\n const [fn, data] = tuple;\n fn(data);\n });\n this._animationCallbacksBuffer = [];\n });\n });\n }\n animationCallbacksBuffer.push([fn, data]);\n }\n\n end() {\n this._cdRecurDepth--;\n\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(() => {\n this._scheduleCountTask();\n this.engine.flush(this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n\n whenRenderingDone(): Promise<any> {\n return this.engine.whenRenderingDone();\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.dev/license\n */\n\nimport {\n AnimationDriver,\n NoopAnimationDriver,\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n ɵAnimationStyleNormalizer as AnimationStyleNormalizer,\n ɵWebAnimationsDriver as WebAnimationsDriver,\n ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,\n} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n inject,\n Inject,\n Injectable,\n NgZone,\n OnDestroy,\n Provider,\n RendererFactory2,\n ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine implements OnDestroy {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(\n @Inject(DOCUMENT) doc: Document,\n driver: AnimationDriver,\n normalizer: AnimationStyleNormalizer,\n ) {\n super(doc, driver, normalizer);\n }\n\n ngOnDestroy(): void {\n this.flush();\n }\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory(\n renderer: DomRendererFactory2,\n engine: AnimationEngine,\n zone: NgZone,\n) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n {provide: AnimationEngine, useClass: InjectableAnimationEngine},\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [DomRendererFactory2, AnimationEngine, NgZone],\n },\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useFactory: () => new WebAnimationsDriver()},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations'},\n ...SHARED_ANIMATION_PROVIDERS,\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useClass: NoopAnimationDriver},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'},\n ...SHARED_ANIMATION_PROVIDERS,\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.dev/license\n */\nimport {\n ModuleWithProviders,\n NgModule,\n Provider,\n ɵperformanceMarkFeature as performanceMarkFeature,\n} from '@angular/core';\nimport {BrowserModule} from '@angular/platform-browser';\n\nimport {BROWSER_ANIMATIONS_PROVIDERS, BROWSER_NOOP_ANIMATIONS_PROVIDERS} from './providers';\n\n/**\n * Object used to configure the behavior of {@link BrowserAnimationsModule}\n * @publicApi\n */\nexport interface BrowserAnimationsModuleConfig {\n /**\n * Whether animations should be disabled. Passing this is identical to providing the\n * `NoopAnimationsModule`, but it can be controlled based on a runtime value.\n */\n disableAnimations?: boolean;\n}\n\n/**\n * Exports `BrowserModule` with additional dependency-injection providers\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n})\nexport class BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see {@link BrowserAnimationsModuleConfig}\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(\n config: BrowserAnimationsModuleConfig,\n ): ModuleWithProviders<BrowserAnimationsModule> {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations\n ? BROWSER_NOOP_ANIMATIONS_PROVIDERS\n : BROWSER_ANIMATIONS_PROVIDERS,\n };\n }\n}\n\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nexport function provideAnimations(): Provider[] {\n performanceMarkFeature('NgEagerAnimations');\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n})\nexport class NoopAnimationsModule {}\n\n/**\n * Returns the set of dependency-injection providers\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n */\nexport function provideNoopAnimations(): Provider[] {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule, ModalModule, ButtonModule, ToggleSwitchModule } from '@fcom/ui-components';\nimport { CmsModule } from '@fcom/cms';\n\nimport { DirectiveModule } from '../../directives';\nimport { FinFormsModule } from '../../forms';\nimport { PipesModule } from '../../pipes';\nimport { ComponentsModule } from '../components.module';\nimport { CookiePolicyComponent } from './cookie-policy.component';\nimport { CookieSettingsComponent } from './cookie-settings.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ComponentsModule,\n DirectiveModule,\n PipesModule,\n CmsModule,\n FinFormsModule,\n FormsModule,\n UiTranslateModule,\n IconsModule,\n ModalModule,\n ButtonModule,\n ToggleSwitchModule,\n ],\n declarations: [CookiePolicyComponent, CookieSettingsComponent],\n exports: [CookiePolicyComponent],\n})\nexport class CookiePolicyModule {}\n","import { stringHashCode } from '@fcom/core/utils';\n\nimport { StorageKey } from '../utils';\nimport { jsConfig } from '../services/config/jsConfig';\n\nexport function sessionStorageVersionFactory() {\n return jsConfig.versionInfo.releaseGitCommitHash;\n}\n\nexport type LocalStorageSchema = {};\n\nexport const storedData: LocalStorageSchema = {};\n\nexport const KEYS_TO_LOCAL_STORAGE: StorageKey[] = Object.keys(storedData).map((name) => ({ name }));\n\n/**\n * This is used for storing the hashes of the different local storage schema versions.\n * If you need to migrate data from a previous version, you can check this dictionary\n * for the correct migration script.\n * @type {{0: string}}\n */\nexport const localStorageVersionHashes = {\n 0: '3938',\n};\n\nexport function generateLocalStorageHash(): string {\n return String(stringHashCode(JSON.stringify(storedData)));\n}\n","import { DataUtils } from '@fcom/core/utils';\n\nimport { LanguageActions } from '../actions';\nimport { LanguageState } from '../interfaces';\n\nexport const initialState: LanguageState = Object.seal({\n value: '',\n locale: '',\n localizations: {},\n});\n\nexport function languageReducer(state = initialState, action: LanguageActions.LanguageActionUnion): LanguageState {\n switch (action.type) {\n case LanguageActions.setLanguage.type:\n return DataUtils.wrap(state).setIn('locale', action.locale).setIn('value', action.language).value();\n case LanguageActions.setLocalizations.type:\n return DataUtils.wrap(state).setIn(['localizations', action.language], action.localization).value();\n default:\n return state;\n }\n}\n","import { LoginState, LoginStatus, ProfileTier, ProfileType } from '@fcom/core-api/login';\nimport { DataUtils } from '@fcom/core/utils';\n\nimport { LoginActions } from '../actions';\n\nexport const initialState: LoginState = Object.seal({ loginStatus: LoginStatus.INITIAL });\n\nconst ACCESS_TOKEN: keyof LoginState = 'accessToken';\nconst LOGIN_STATUS: keyof LoginState = 'loginStatus';\nconst PROFILE_TYPE: keyof LoginState = 'type';\nconst USER_PROFILE: keyof LoginState = 'profile';\nconst CAS_PROFILE: keyof LoginState = 'casProfile';\nconst LOGIN_PHASE: keyof LoginState = 'loginPhase';\n\nexport function loginReducer(state = initialState, action: LoginActions.LoginActionUnion): LoginState {\n switch (action.type) {\n case LoginActions.setAccessToken.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_STATUS, LoginStatus.PENDING)\n .setIn(ACCESS_TOKEN, action.accessToken)\n .value();\n\n case LoginActions.setProfile.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_STATUS, LoginStatus.LOGGED_IN)\n .setIn(USER_PROFILE, action.profile)\n .setIn(\n PROFILE_TYPE,\n action.profile.tier === ProfileTier.CORPORATE\n ? ProfileType.CORPORATE\n : action.profile.tier === ProfileTier.ACCOUNT\n ? ProfileType.FINNAIR_ACCOUNT\n : ProfileType.FPLUS\n )\n .value();\n\n case LoginActions.setCasProfile.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_STATUS, LoginStatus.LOGGED_IN)\n .setIn(CAS_PROFILE, action.casProfile)\n .value();\n\n case LoginActions.setNotLoggedIn.type:\n return DataUtils.wrap(initialState)\n .setIn(LOGIN_STATUS, LoginStatus.NOT_LOGGED_IN)\n .setIn(LOGIN_PHASE, state.loginPhase)\n .value();\n\n case LoginActions.setLoginError.type:\n return DataUtils.wrap(initialState).setIn(LOGIN_STATUS, LoginStatus.ERROR).value();\n\n case LoginActions.setLoginPhaseStep.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_PHASE, {\n ...state.loginPhase,\n step: action.step,\n error: undefined,\n })\n .value();\n\n case LoginActions.setLoginPhaseExecutionToken.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_PHASE, {\n ...state.loginPhase,\n executionToken: action.token,\n })\n .value();\n\n case LoginActions.setLoginPhaseProfile.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_PHASE, {\n ...state.loginPhase,\n profile: action.profile,\n })\n .value();\n\n case LoginActions.setLoginPhaseError.type:\n return DataUtils.wrap(state)\n .setIn(LOGIN_PHASE, {\n ...state.loginPhase,\n error: action.error,\n })\n .value();\n\n case LoginActions.clearLoginPhase.type:\n return DataUtils.wrap(state).deleteIn(LOGIN_PHASE).value() as LoginState;\n\n case LoginActions.clearAccessToken.type:\n return initialState;\n default:\n return state;\n }\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { NavigatorActions } from '../actions';\nimport { NavigatorState } from '../interfaces';\n\nexport const initialState: NavigatorState = {\n browserGeolocationLoading: false,\n};\n\nconst navigatorReducer = createReducer(\n initialState,\n on(NavigatorActions.setAkamaiGeolocation, (state, { location }) => ({\n ...state,\n akamaiGeolocation: { ...location },\n })),\n on(NavigatorActions.setBrowserGeolocation, (state, { location }) => ({\n ...state,\n browserGeolocation: { ...location },\n })),\n on(NavigatorActions.setBrowserGeolocationLoading, (state) => ({\n ...state,\n browserGeolocationLoading: true,\n })),\n on(NavigatorActions.removeBrowserGeolocationLoading, (state) => ({\n ...state,\n browserGeolocationLoading: false,\n })),\n on(NavigatorActions.setServerTime, (state, { serverMillisFromEpoch, timeOffset }) => ({\n ...state,\n timeData: { serverMillisFromEpoch, timeOffset },\n }))\n);\n\nexport function reducer(state: NavigatorState, action: NavigatorActions.NavigatorActionsUnion) {\n return navigatorReducer(state, action);\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { PseudoLocalState } from '../interfaces';\nimport { PseudoLocalActions } from '../actions';\n\nexport const initialState: PseudoLocalState = Object.seal({});\n\nconst pseudoLocalReducer = createReducer(\n initialState,\n /**\n * Sets the given value to key\n */\n on(PseudoLocalActions.setValue, (state, { key, data }) => ({\n ...state,\n [key]: data,\n })),\n\n /**\n * Destroys the data for given key\n */\n on(PseudoLocalActions.destroyValue, (state, { key }) => {\n const { [key]: _deleted, ...newState } = state;\n return newState;\n })\n);\n\nexport function reducer(state: PseudoLocalState, action: PseudoLocalActions.PseudoLocalActionsUnion): PseudoLocalState {\n return pseudoLocalReducer(state, action);\n}\n","import { isPlatformServer } from '@angular/common';\n\nimport { routerReducer } from '@ngrx/router-store';\nimport { Action, ActionReducer, ActionReducerMap, State, UPDATE, MetaReducer } from '@ngrx/store';\n\nimport { MANAGE_BOOKING_FEATURE_KEY } from '@fcom/manage-booking/constants';\nimport { COMMON_FEATURE_KEY } from '@fcom/common/store';\nimport { COMMON_BOOKING_FEATURE_KEY } from '@fcom/common-booking/store';\nimport { DESTINATION_SEARCH_FILTER_STATE_FEATURE_NAME } from '@fcom/destination-search/interfaces';\nimport { VOLUNTARY_CHANGE_FEATURE_KEY } from '@fcom/voluntary-change/constants';\nimport { TIMETABLE_FEATURE_KEY } from '@fcom/timetable/constants';\nimport { REFUNDS_FEATURE_KEY } from '@fcom/refunds-common/constants';\nimport { UPGRADE_FEATURE_KEY } from '@fcom/one-upgrade/constants';\nimport { ALTERNATIVE_OFFERS_STATE_FEATURE_NAME } from '@fcom/reaccommodation/interfaces';\nimport { LOYALTY_FEATURE_KEY } from '@fcom/loyalty-core';\n\nimport { AppState } from '../interfaces';\nimport { SentryLogger, StorageService, StorageType } from '../services';\nimport { initStoreAction, updateStoreAction } from '../store/init-store.action';\nimport { KEYS_TO_LOCAL_STORAGE } from '../store/storage-versions';\nimport { StorageKey, storageSync } from '../utils';\nimport { languageReducer } from './language.reducer';\nimport { loginReducer } from './login.reducer';\nimport * as fromNavigator from './navigator.reducer';\nimport * as fromPseudoLocal from './pseudo-local.reducer';\n\nexport const reducers: ActionReducerMap<AppState> = {\n language: languageReducer,\n login: loginReducer,\n navigator: fromNavigator.reducer,\n pseudoLocal: fromPseudoLocal.reducer,\n router: routerReducer,\n};\n\n/**\n * @param keys\n * @param type either SESSION or LOCAL\n * @param allowStorageRehydration\n * @param storageService\n */\nexport function storageSyncInBrowser(\n type: StorageType,\n keys: StorageKey[],\n allowStorageRehydration: boolean,\n storageService: StorageService,\n platformID: object,\n sentryLogger: SentryLogger\n) {\n return (reducer: ActionReducer<AppState>): ActionReducer<AppState> => {\n if (isPlatformServer(platformID)) {\n return reducer;\n } else {\n const storage = storageService[type];\n return storageSync({\n keys,\n rehydrate: allowStorageRehydration, // Disable state re-hydration in karma specs\n storage,\n sentryLogger,\n })(reducer);\n }\n };\n}\n\nexport function dispatchInitialStateReducer(reducer: ActionReducer<AppState>): ActionReducer<AppState> {\n return (state: AppState, action: Action) => {\n switch (action.type) {\n case State.INIT:\n return reducer(state, initStoreAction({ payload: state }));\n case UPDATE:\n return reducer(state, updateStoreAction({ payload: state, features: action?.['features'] || [] }));\n default:\n return reducer(state, action);\n }\n };\n}\n\nexport function localStorageSyncMetaReducer(\n allowStorageRehydration: boolean,\n storageService: StorageService,\n platformID: object,\n sentryLogger: SentryLogger\n): MetaReducer<AppState> {\n return storageSyncInBrowser(\n 'LOCAL',\n // To enforce type-safety, we only allow storing full object trees to local storage\n KEYS_TO_LOCAL_STORAGE,\n allowStorageRehydration,\n storageService,\n platformID,\n sentryLogger\n );\n}\n\nexport function sessionStorageSyncMetaReducer(\n allowStorageRehydration: boolean,\n storageService: StorageService,\n platformID: object,\n sentryLogger: SentryLogger\n): MetaReducer<AppState> {\n return storageSyncInBrowser(\n 'SESSION',\n [\n { name: 'booking' },\n { name: 'priceCalendar' },\n { name: 'locations' },\n { name: 'navigator', keys: ['browserGeolocation', 'akamaiGeolocation'] },\n { name: 'cart' },\n { name: 'payment' },\n { name: ALTERNATIVE_OFFERS_STATE_FEATURE_NAME },\n { name: UPGRADE_FEATURE_KEY },\n { name: 'offers', keys: ['sortBy'] },\n { name: 'order' },\n { name: 'surcharges' },\n { name: 'paxDetails' },\n { name: LOYALTY_FEATURE_KEY },\n { name: MANAGE_BOOKING_FEATURE_KEY },\n { name: COMMON_FEATURE_KEY },\n { name: DESTINATION_SEARCH_FILTER_STATE_FEATURE_NAME },\n { name: COMMON_BOOKING_FEATURE_KEY },\n { name: VOLUNTARY_CHANGE_FEATURE_KEY },\n { name: TIMETABLE_FEATURE_KEY, keys: ['search'] },\n { name: REFUNDS_FEATURE_KEY },\n ],\n allowStorageRehydration,\n storageService,\n platformID,\n sentryLogger\n );\n}\n","import { InjectionToken, NgModule, PLATFORM_ID, Optional, SkipSelf } from '@angular/core';\n\nimport { StoreModule, META_REDUCERS } from '@ngrx/store';\nimport { EffectsModule } from '@ngrx/effects';\n\nimport { WINDOW_PROVIDERS } from '../providers';\nimport {\n reducers,\n dispatchInitialStateReducer,\n localStorageSyncMetaReducer,\n sessionStorageSyncMetaReducer,\n} from '../reducers/root.reducer';\nimport {\n LOCAL_STORAGE_VERSION,\n SESSION_STORAGE_VERSION,\n SentryLogger,\n SentryModule,\n StorageService,\n} from '../services';\nimport { generateLocalStorageHash, sessionStorageVersionFactory } from './storage-versions';\n\nexport const ALLOW_REHYDRATION = new InjectionToken<boolean>('allowStateRehydration');\n\n@NgModule({\n imports: [\n StoreModule.forRoot(reducers, {\n metaReducers: [dispatchInitialStateReducer],\n runtimeChecks: {\n strictStateImmutability: false, // todo: re-enable runtime checks\n strictActionImmutability: false, // todo: re-enable runtime checks\n strictStateSerializability: false, // todo: re-enable runtime checks\n strictActionSerializability: false, // todo: re-enable runtime checks\n },\n }),\n EffectsModule.forRoot([]),\n SentryModule,\n ],\n providers: [\n {\n provide: META_REDUCERS,\n deps: [ALLOW_REHYDRATION, StorageService, PLATFORM_ID, SentryLogger],\n useFactory: localStorageSyncMetaReducer,\n multi: true,\n },\n {\n provide: META_REDUCERS,\n deps: [ALLOW_REHYDRATION, StorageService, PLATFORM_ID, SentryLogger],\n useFactory: sessionStorageSyncMetaReducer,\n multi: true,\n },\n { provide: ALLOW_REHYDRATION, useValue: true },\n { provide: SESSION_STORAGE_VERSION, useFactory: sessionStorageVersionFactory },\n { provide: LOCAL_STORAGE_VERSION, useFactory: generateLocalStorageHash },\n ...WINDOW_PROVIDERS,\n ],\n})\nexport class StateTreeModule {\n constructor(@Optional() @SkipSelf() parentModule: StateTreeModule) {\n if (parentModule) {\n throw new Error(\n 'StateTreeModule is already loaded. This module should only be imported once withing the application.'\n );\n }\n }\n}\n","/* eslint-disable */\nimport { NgModule, SkipSelf, Optional } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { InstantsearchService } from './services/instantsearch.service';\nimport { TimetableService } from './services/timetable.service';\n\n/**\n * Module that provides all services.\n */\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [\n InstantsearchService,\n TimetableService,\n ],\n})\nexport class InstantsearchApiModule {\n constructor(\n @Optional() @SkipSelf() parentModule: InstantsearchApiModule,\n @Optional() http: HttpClient\n ) {\n if (parentModule) {\n throw new Error('InstantsearchApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/issues/20575');\n }\n }\n}\n","import { Component, Inject, OnDestroy, PLATFORM_ID } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { isPlatformBrowser } from '@angular/common';\n\nimport { Observable, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { NavigationMenuService, ScrollService } from '@fcom/common/services';\nimport { unsubscribe } from '@fcom/core/utils';\nimport { isNavigationEvent } from '@fcom/common/utils';\n\n@Component({\n selector: 'fin-language-setting-layout',\n templateUrl: './language-setting-layout.component.html',\n styleUrls: [],\n})\nexport class LanguageSettingLayoutComponent implements OnDestroy {\n subscriptions: Subscription = new Subscription();\n isFooterOpen$: Observable<boolean>;\n\n constructor(\n private navigationMenuService: NavigationMenuService,\n private router: Router,\n private scrollService: ScrollService,\n @Inject(PLATFORM_ID) private platform: object\n ) {\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter(isNavigationEvent),\n filter(() => isPlatformBrowser(this.platform))\n )\n .subscribe(() => {\n this.scrollService.scrollTop();\n })\n );\n this.isFooterOpen$ = this.navigationMenuService.isFooterOpen$;\n }\n\n ngOnDestroy(): void {\n this.subscriptions = unsubscribe(this.subscriptions);\n }\n}\n","<fin-skip-link [main]=\"main\"></fin-skip-link>\n\n<router-outlet name=\"header\"></router-outlet>\n\n<main #main [class.layout--footer-open]=\"isFooterOpen$ | async\" role=\"main\">\n <router-outlet></router-outlet>\n</main>\n\n<footer>\n <router-outlet name=\"footer\"></router-outlet>\n</footer>\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { recurseLangParam } from '@fcom/common/utils/route-utils';\nimport { ddsLangToNewLang } from '@fcom/core/selectors/dds-languages';\n\n@Injectable()\nexport class LanguageGuard implements CanActivate, CanActivateChild {\n constructor(\n private router: Router,\n private languageService: LanguageService\n ) {}\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.redirectToRootIfLanguageNotApplicable(route, state);\n }\n\n canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.redirectToRootIfLanguageNotApplicable(childRoute, state);\n }\n\n private redirectToRootIfLanguageNotApplicable(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\n const isLangSupported = (locale) => this.languageService.allowableLangs.includes(locale);\n const getLang = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n const langFromParam = recurseLangParam(route);\n if (isLangSupported(langFromParam)) {\n return langFromParam;\n }\n\n const langFromDds = ddsLangToNewLang(state.url);\n if (isLangSupported(langFromDds)) {\n return langFromDds;\n }\n\n return null;\n };\n\n const lang = getLang(route, state);\n if (!lang) {\n this.router.navigateByUrl('/', { replaceUrl: true });\n return false;\n }\n return true;\n }\n}\n","import { Connectable, ObservableInput, SubjectLike } from '../types';\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { defer } from './defer';\n\nexport interface ConnectableConfig<T> {\n /**\n * A factory function used to create the Subject through which the source\n * is multicast. By default this creates a {@link Subject}.\n */\n connector: () => SubjectLike<T>;\n /**\n * If true, the resulting observable will reset internal state upon disconnection\n * and return to a \"cold\" state. This allows the resulting observable to be\n * reconnected.\n * If false, upon disconnection, the connecting subject will remain the\n * connecting subject, meaning the resulting observable will not go \"cold\" again,\n * and subsequent repeats or resubscriptions will resubscribe to that same subject.\n */\n resetOnDisconnect?: boolean;\n}\n\n/**\n * The default configuration for `connectable`.\n */\nconst DEFAULT_CONFIG: ConnectableConfig<unknown> = {\n connector: () => new Subject<unknown>(),\n resetOnDisconnect: true,\n};\n\n/**\n * Creates an observable that multicasts once `connect()` is called on it.\n *\n * @param source The observable source to make connectable.\n * @param config The configuration object for `connectable`.\n * @returns A \"connectable\" observable, that has a `connect()` method, that you must call to\n * connect the source to all consumers through the subject provided as the connector.\n */\nexport function connectable<T>(source: ObservableInput<T>, config: ConnectableConfig<T> = DEFAULT_CONFIG): Connectable<T> {\n // The subscription representing the connection.\n let connection: Subscription | null = null;\n const { connector, resetOnDisconnect = true } = config;\n let subject = connector();\n\n const result: any = new Observable<T>((subscriber) => {\n return subject.subscribe(subscriber);\n });\n\n // Define the `connect` function. This is what users must call\n // in order to \"connect\" the source to the subject that is\n // multicasting it.\n result.connect = () => {\n if (!connection || connection.closed) {\n connection = defer(() => source).subscribe(subject);\n if (resetOnDisconnect) {\n connection.add(() => (subject = connector()));\n }\n }\n return connection;\n };\n\n return result;\n}\n","<form (ngSubmit)=\"sendConsents()\" class=\"cookie-settings text\">\n <div class=\"align-center\">\n <div class=\"cookie-settings-intro mr-small-b\">\n <cms-unstyled-fragment [contentUrl$]=\"cookieSettingsUrl$\"></cms-unstyled-fragment>\n </div>\n </div>\n\n <ng-container *ngFor=\"let consent of consents$ | async; let i = index\">\n <input\n type=\"checkbox\"\n name=\"consent\"\n (click)=\"handleIsCheckChange(consent.consentTextId)\"\n [id]=\"consent.consentTextId\"\n />\n <label name=\"consent-label\" [for]=\"consent.consentTextId\">\n <span class=\"content\">\n <span aria-hidden=\"true\" [innerHTML]=\"consent.text | finSafe: 'html'\"></span>\n <span class=\"is-vishidden\">\n <ng-container *ngFor=\"let consent2 of consents$ | async; let k = index\">\n <span *ngIf=\"i >= k\" [innerHTML]=\"consent2.text | finSafe: 'html'\"></span>\n </ng-container>\n </span>\n </span>\n <fcom-toggle-switch\n class=\"mr-xxsmall-t\"\n [name]=\"consent.consentTextId\"\n [status]=\"getStatus(consent.consentTextId)\"\n ></fcom-toggle-switch>\n </label>\n </ng-container>\n\n <div class=\"pr-xsmall-t font-body-1 align-center button-group flex\">\n <fcom-button\n [text]=\"'cookieConsent.allowSelection' | finLocalization\"\n [type]=\"ButtonType.SUBMIT\"\n [mode]=\"ButtonMode.FILL\"\n class=\"allow-selection mr-xxsmall\"\n >\n </fcom-button>\n <fcom-button\n [text]=\"'cookieConsent.allowAll' | finLocalization\"\n [type]=\"ButtonType.SUBMIT\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n (clickBtn)=\"allowAllCookies()\"\n class=\"allow-all mr-xxsmall\"\n >\n </fcom-button>\n </div>\n</form>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, filter } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ButtonType, ButtonTheme, ButtonMode, ToggleSwitchStatus } from '@fcom/ui-components';\n\nimport { Consent, ConsentStatus, ConsentTextId } from '../../interfaces';\n\nconst cookieConsentsValues = [\n ConsentTextId.COOKIE_ANALYTICS,\n ConsentTextId.COOKIE_PERSONALIZATION,\n ConsentTextId.COOKIE_ADVERTISING,\n];\n\n@Component({\n selector: 'fin-cookie-settings',\n styleUrls: ['./cookie-settings.component.scss'],\n templateUrl: './cookie-settings.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CookieSettingsComponent implements OnInit {\n @Input()\n consents$: Observable<Consent[]>;\n @Output()\n consentDataSelection: EventEmitter<{ [key: string]: boolean }> = new EventEmitter();\n @Output()\n modalClose = new EventEmitter();\n\n public readonly ButtonType = ButtonType;\n readonly ConsentStatus = ConsentStatus;\n readonly ToggleSwitchStatus = ToggleSwitchStatus;\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonMode = ButtonMode;\n\n cookieSettingsUrl$: Observable<string>;\n consentValue: ConsentTextId[];\n\n constructor(private languageService: LanguageService) {}\n\n ngOnInit(): void {\n this.cookieSettingsUrl$ = this.languageService.translate('fragments.cookieSettings.url').pipe(\n distinctUntilChanged(),\n filter((v) => !!v)\n );\n this.consentValue = [ConsentTextId.NOT_REAL_CONSENT_VALUE];\n }\n\n sendConsents(): void {\n this.consentDataSelection.emit(\n cookieConsentsValues.reduce(\n (all, consentId) => ({\n ...all,\n [consentId]: this.consentValue.includes(consentId),\n }),\n {}\n )\n );\n }\n\n allowAllCookies(): void {\n this.consentValue = cookieConsentsValues;\n }\n\n handleIsCheckChange(name: ConsentTextId): void {\n if (this.consentValue.includes(name)) {\n this.consentValue = this.consentValue.filter((val) => val !== name);\n } else {\n this.consentValue = this.consentValue.concat([name]);\n }\n }\n\n getStatus(currentId: ConsentTextId): ToggleSwitchStatus {\n // always checked the first option\n if (ConsentTextId.NOT_REAL_CONSENT_VALUE === currentId) {\n return ToggleSwitchStatus.CHECKED;\n }\n if (this.consentValue.includes(currentId)) {\n return ToggleSwitchStatus.ACTIVE;\n }\n return ToggleSwitchStatus.UNCHECKED;\n }\n}\n","<fcom-modal\n [fitToContent]=\"true\"\n [buttons]=\"null\"\n [forceRemainOpen]=\"modalOpen\"\n [open]=\"!!(cookiePolicy$ | async) && modalOpen\"\n [fullHeightMobile]=\"isShowCookieSettings\"\n [fullHeight]=\"true\"\n ><div class=\"cookie-policy mr-large-x mr-small-y\" data-testid=\"cookie-consent-modal\">\n <ng-container *ngIf=\"!isShowCookieSettings\">\n <div\n class=\"cookie-policy-title flex-1 nordic-blue-900 font-heading-2 bold\"\n [innerHTML]=\"cookiePolicy$ | finMap: 'teaserTitle' | async | finSafe: 'html'\"\n ></div>\n <div\n class=\"cookie-policy-text flex-1 mr-small-y grey-800-text font-body-1 regular-type\"\n [innerHTML]=\"cookiePolicy$ | finMap: 'detailText' | async | finSafe: 'html'\"\n ></div>\n <div class=\"flex--nogrow align-center mr-small-t\">\n <fcom-button\n [text]=\"'cookieConsent.allowAllCookies' | finLocalization\"\n (clickBtn)=\"quickSetCookieClicked$.next(ConsentStatus.ACCEPTED)\"\n [mode]=\"ButtonMode.FILL\"\n [aria]=\"{ label: 'cookieConsent.allowAllCookies' | finLocalization, role: 'button' }\"\n class=\"mr-xsmall-b font-body-1 fill\"\n [id]=\"'allow-all-btn'\"\n data-testid=\"cookie-allow-all-btn\"\n ></fcom-button>\n <fcom-button\n [text]=\"'cookieConsent.manageCookies' | finLocalization\"\n (clickBtn)=\"showCookieSettings()\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n [aria]=\"{ label: 'cookieConsent.manageCookies' | finLocalization, role: 'button' }\"\n class=\"mr-xsmall-b font-body-1 fill\"\n [id]=\"'manage-cookie-btn'\"\n data-testid=\"manage-cookie-btn\"\n ></fcom-button>\n <fcom-button\n [text]=\"'cookieConsent.useNecessary' | finLocalization\"\n (clickBtn)=\"quickSetCookieClicked$.next(ConsentStatus.DECLINED)\"\n [theme]=\"ButtonTheme.LIGHT_SECONDARY_OUTLINE\"\n [mode]=\"ButtonMode.FILL\"\n [aria]=\"{ label: 'cookieConsent.useNecessary' | finLocalization, role: 'button' }\"\n [id]=\"'necessary-cookie-btn'\"\n class=\"font-body-1 fill\"\n data-testid=\"necessary-cookie-btn\"\n ></fcom-button>\n </div>\n </ng-container>\n <fin-cookie-settings\n data-testid=\"cookie-settings\"\n *ngIf=\"isShowCookieSettings\"\n [consents$]=\"consents$\"\n (consentDataSelection)=\"confirmAndClose($event)\"\n (modalClose)=\"closeModal()\"\n ></fin-cookie-settings>\n <div class=\"flex flex--center mr-xsmall-t\">\n <fcom-icon [name]=\"SvgLibraryIcon.INFO\" class=\"icon-medium mr-xsmall-r\"></fcom-icon>\n <div class=\"light-type grey-800-text font-body-1\">\n {{ 'cookieConsent.cookiesTips' | finLocalization }}\n </div>\n </div>\n </div>\n</fcom-modal>\n","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, BehaviorSubject, NEVER, Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { switchMap, map, filter, tap, withLatestFrom } from 'rxjs/operators';\n\nimport { ButtonTheme, ButtonMode } from '@fcom/ui-components';\nimport { LanguageService } from '@fcom/ui-translate';\nimport { CmsTeaser } from '@fcom/core-api';\nimport { AppState } from '@fcom/core/interfaces';\nimport { pseudoLocal } from '@fcom/core/selectors';\nimport { CmsDataService } from '@fcom/core/services';\nimport { finShare } from '@fcom/rx';\nimport { ConfigService, unsubscribe } from '@fcom/core';\n\nimport { Consent, ConsentData, ConsentGroup, ConsentStatus, ConsentTextId } from '../../interfaces';\nimport { GtmService } from '../../gtm/';\nimport { ConsentService } from '../../login';\n\n@Component({\n selector: 'fin-cookie-policy',\n styleUrls: ['./cookie-policy.component.scss'],\n templateUrl: './cookie-policy.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CookiePolicyComponent implements OnInit, OnDestroy {\n readonly ButtonTheme = ButtonTheme;\n readonly ButtonMode = ButtonMode;\n readonly ConsentStatus = ConsentStatus;\n readonly SvgLibraryIcon = SvgLibraryIcon;\n\n cookiePolicy$: Observable<CmsTeaser>;\n consents$: Observable<Consent[]>;\n continueShows$: Observable<boolean>;\n modalOpen = false;\n isShowCookieSettings = false;\n quickSetCookieClicked$: BehaviorSubject<ConsentStatus | null> = new BehaviorSubject<ConsentStatus | null>(null);\n\n private hasCookieConsentSubmitted$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n private subscription = new Subscription();\n\n constructor(\n private consentService: ConsentService,\n private languageService: LanguageService,\n private cmsDataService: CmsDataService,\n private gtmService: GtmService,\n private store$: Store<AppState>,\n private configService: ConfigService\n ) {}\n\n ngOnInit(): void {\n this.continueShows$ = this.store$.pipe(pseudoLocal('continueShows'));\n this.consentService.injectCookieSnippet();\n\n this.consents$ = this.consentService.cookieConsents$.pipe(\n map((cg) => {\n return [\n {\n consentTextId: ConsentTextId.NOT_REAL_CONSENT_VALUE,\n effectiveFrom: -1,\n text: cg.introductionText,\n textHash: '',\n consentStatus: ConsentStatus.WITHDRAWN,\n },\n ].concat(cg.consents);\n }),\n finShare()\n );\n\n this.cookiePolicy$ = this.consentService.cookieConsents$.pipe(\n filter((cg) => this.configService.cfg.enableCookiePolicy && !this.allConsentsAreSet(cg)),\n tap(() => {\n this.modalOpen = true;\n }),\n switchMap(() => this.languageService.translate('fragments.cookiePolicy.url')),\n switchMap((url) => (!url ? NEVER : this.cmsDataService.getFragmentJson(url))),\n finShare()\n ) as Observable<CmsTeaser>;\n\n this.subscription.add(\n this.consentService.cookieConsents$\n .pipe(\n withLatestFrom(this.hasCookieConsentSubmitted$),\n filter(([cg, hasSubmitted]) => this.allConsentsAreSet(cg) && !hasSubmitted),\n map(([cg]) => this.createConsentData(cg)),\n finShare()\n )\n .subscribe((consentData: ConsentData) => {\n this.gtmService.setConsents(consentData);\n })\n );\n\n this.subscription.add(\n this.quickSetCookieClicked$\n .pipe(\n filter(Boolean),\n switchMap((type: ConsentStatus) =>\n this.consentService.cookieConsents$.pipe(\n withLatestFrom(this.hasCookieConsentSubmitted$),\n filter(([, hasSubmitted]) => !hasSubmitted),\n map(([cg]) => ({\n ...cg,\n consents: cg.consents?.map((c) => ({\n ...c,\n consentStatus: type,\n })),\n })),\n map((cg: ConsentGroup) => this.createConsentData(cg)),\n finShare()\n )\n )\n )\n .subscribe((consentData: ConsentData) => {\n this.hasCookieConsentSubmitted$.next(true);\n this.consentService.setCookieConsents(consentData);\n this.closeModal();\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n allConsentsAreSet(consentGroup: ConsentGroup): boolean {\n return consentGroup?.consents?.every((c) => c.consentStatus !== ConsentStatus.WITHDRAWN);\n }\n\n confirmAndClose(consentData?: ConsentData): void {\n this.consentService.setCookieConsents(consentData);\n this.hasCookieConsentSubmitted$.next(true);\n this.closeModal();\n }\n\n showCookieSettings(): void {\n this.isShowCookieSettings = true;\n }\n\n openModal(event: MouseEvent): void {\n event.stopPropagation();\n this.modalOpen = true;\n }\n\n closeModal(): void {\n this.modalOpen = false;\n }\n\n private createConsentData(consentGroup: ConsentGroup): ConsentData {\n return consentGroup?.consents.reduce((all, consent) => {\n all[consent.consentTextId] = consent.consentStatus !== ConsentStatus.DECLINED;\n return all;\n }, {});\n }\n}\n","<div class=\"toaster-container\" [class.beneath-modal]=\"beneathModal\">\n <div class=\"flex flex--start flex--column absolute toaster\">\n <ng-container *ngFor=\"let message of messages | keyvalue; let index = index; trackBy: getToastTrackKey\">\n <fcom-notification\n class=\"ms-xsmall-t align-left\"\n aria-live=\"assertive\"\n [class.animate-slide-from-left]=\"!message.value.isCloseClicked && !message.value.isDisplayed\"\n [class.animate-slide-to-right]=\"message.value.isCloseClicked\"\n [theme]=\"message.value.theme\"\n [iconCategory]=\"iconCategory\"\n [iconName]=\"message.value.iconName\"\n [layout]=\"NotificationLayout.OVERLAY\"\n [isClosable]=\"true\"\n [linkText]=\"message.value.target?.linkText\"\n [linkUrl]=\"message.value.target?.linkUrl\"\n [linkOpenInNewWindow]=\"message.value.target?.linkOpenInNewWindow\"\n (closeClick)=\"close(message.value.id)\"\n (linkClick)=\"\n message.value.target?.callback ? callbackClicked(message.value.id, message.value.target?.callback) : null\n \"\n >\n <div *ngIf=\"message.value.contentHTML\" [innerHTML]=\"message.value.contentHTML\"></div>\n <ng-container *ngIf=\"!message.value.contentHTML\">\n {{ message.value.content || (message.value.contentKey | finLocalization) }}\n </ng-container>\n </fcom-notification>\n </ng-container>\n </div>\n</div>\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy } from '@angular/core';\nimport { Event, NavigationEnd, Router } from '@angular/router';\n\nimport { IconLibrary, SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { Observable, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { IconName, NotificationLayout, NotificationTheme } from '@fcom/ui-components';\n\nimport { ToasterService } from '../../services';\nimport { ToasterMessage } from '../../interfaces/toaster-message.interface';\n\nconst TOASTER_VISIBLE_MS = 5000;\n\n@Component({\n selector: 'fin-toaster',\n styleUrls: ['toaster.component.scss'],\n templateUrl: 'toaster.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToasterComponent implements OnDestroy {\n message$: Observable<ToasterMessage>;\n messageToRemove$: Observable<string>;\n subscriptions: Subscription = new Subscription();\n messages: { [key: string]: ToasterMessage } = {};\n beneathModal = false;\n iconCategory: IconLibrary = IconLibrary.SVG_LIBRARY;\n\n readonly NotificationTheme = NotificationTheme;\n readonly NotificationLayout = NotificationLayout;\n private timeoutHandle: any[] = [];\n\n constructor(\n private toasterService: ToasterService,\n private cdr: ChangeDetectorRef,\n private router: Router\n ) {\n this.message$ = this.toasterService.toasterMessage$;\n this.messageToRemove$ = this.toasterService.messageToRemove$;\n\n // Adding new messages to list.\n\n this.subscribeToRouter();\n this.subscriptions.add(\n this.message$.pipe(filter(Boolean)).subscribe((message: ToasterMessage) => {\n message = {\n theme: message?.theme ?? NotificationTheme.INFO,\n iconName: this.getIconName(message?.theme),\n isCloseClicked: false,\n isDisplayed: false,\n ...message,\n };\n\n const oldMessage = this.messages[message.id];\n if (oldMessage) {\n this.messages[oldMessage.id] = message;\n } else {\n this.insertNewMessage(message);\n }\n\n if (message.beneathModal) {\n this.beneathModal = true;\n }\n\n this.cdr.markForCheck();\n })\n );\n\n this.subscriptions.add(\n this.messageToRemove$.pipe(filter(Boolean)).subscribe((id: string) => {\n this.close(id);\n })\n );\n }\n\n getToastTrackKey(message: number): number {\n return message;\n }\n\n close(key: string): void {\n this.setSlidingEffectOnMessages(key);\n setTimeout(() => {\n this.removeMessage(key);\n this.beneathModal = Object.values(this.messages).some((message) => message.beneathModal);\n this.cdr.markForCheck();\n }, 1000);\n }\n\n callbackClicked(key: string, callback: (...args: any[]) => void): void {\n this.close(key);\n callback();\n }\n\n setSlidingEffectOnMessages = (key: string): void => {\n if (this.messages[key]) {\n this.messages[key].isCloseClicked = true;\n Object.values(this.messages).forEach((message) => (message.isDisplayed = true));\n this.cdr.markForCheck();\n }\n };\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n this.timeoutHandle.forEach((timeout) => {\n clearTimeout(timeout);\n });\n }\n\n private insertNewMessage(message: ToasterMessage): void {\n this.messages[message.id] = message;\n\n if (message.autoClose) {\n this.timeoutHandle.push(setTimeout(() => this.close(message.id), TOASTER_VISIBLE_MS));\n }\n }\n\n /**\n * Remove/keep notification based on the navigated route,\n * allowing us to remove the notification when reroute\n */\n private subscribeToRouter() {\n this.subscriptions = this.router.events\n .pipe(filter((event: Event) => event instanceof NavigationEnd))\n .subscribe(() => {\n Object.keys(this.messages).forEach((messageKey) => {\n if (!this.messages[messageKey].keepMessageAfterNavigation) {\n this.removeMessage(messageKey);\n }\n });\n this.cdr.markForCheck();\n });\n }\n\n removeMessage = (messageKey: string): void => {\n this.messages = Object.keys(this.messages)\n .filter((key) => key !== messageKey)\n .reduce((result, current) => {\n result[current] = this.messages[current];\n return result;\n }, {});\n };\n\n getIconName = (theme: Exclude<NotificationTheme, NotificationTheme.TRANSPARENT> | undefined): IconName => {\n switch (theme) {\n case NotificationTheme.ALERT:\n return SvgLibraryIcon.CLOSE_DELETE_BLOCK;\n case NotificationTheme.WARNING:\n return SvgLibraryIcon.ALERT_TRIANGLE;\n case NotificationTheme.SUCCESS:\n return SvgLibraryIcon.CHECKMARK_BLOCK;\n default:\n return SvgLibraryIcon.INFO_BLOCK;\n }\n };\n}\n","import { Component, OnDestroy } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { connectable, Observable, ReplaySubject, Subscription } from 'rxjs';\nimport { filter, map } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { ChatComponent, ChatGlobalVisibilityComponent } from '@fcom/chat';\nimport { FeedbackWidgetComponent } from '@fcom/common/components';\nimport { CookiePolicyComponent } from '@fcom/common/components/cookie-policy/cookie-policy.component';\nimport { ToasterComponent } from '@fcom/common/components/toaster/toaster.component';\nimport { PseudoLocalActions } from '@fcom/core/actions';\nimport { AppState } from '@fcom/core/interfaces';\nimport { isNotBlank, isPresent, isTruthy, unsubscribe } from '@fcom/core/utils';\nimport { PageMetaService } from '@fcom/common/services';\nimport { RootPaths, ROUTER_LANG_PARAM } from '@fcom/core/constants';\nimport { isNavigationEvent } from '@fcom/common/utils';\n\nconst getRouteFromUrl = (langCode: string, url: string): string => {\n if (!isPresent(langCode) || !isPresent(url)) {\n return '';\n }\n\n const everythingUntilAndIncludingLangCode = new RegExp(`^(.*?)${langCode}`);\n return url.replace(everythingUntilAndIncludingLangCode, '');\n};\n\n@Component({\n selector: 'fin-set-language',\n templateUrl: './language-setting-root.component.html',\n})\nexport class LanguageSettingRootComponent implements OnDestroy {\n subscription = new Subscription();\n\n cookiePolicyType: typeof CookiePolicyComponent = CookiePolicyComponent;\n toasterComponentType: typeof ToasterComponent = ToasterComponent;\n chatComponentType: typeof ChatComponent = ChatComponent;\n chatGlobalVisibilityComponentType: typeof ChatGlobalVisibilityComponent = ChatGlobalVisibilityComponent;\n feedbackWidgetComponentType: typeof FeedbackWidgetComponent = FeedbackWidgetComponent;\n\n private insideBooking$: Observable<boolean>;\n\n constructor(\n private languageService: LanguageService,\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private store$: Store<AppState>,\n private pageMetaService: PageMetaService\n ) {\n const c$ = connectable(\n this.router.events.pipe(\n filter(isNavigationEvent),\n map((event: NavigationEnd) =>\n isTruthy(event.url.match(new RegExp(`^/${this.languageService.langValue}/booking`)))\n )\n ),\n {\n connector: () => new ReplaySubject<boolean>(1),\n resetOnDisconnect: false,\n }\n );\n\n c$.connect();\n this.insideBooking$ = c$;\n this.subscription.add(\n this.activatedRoute.params.pipe(map((p) => p['lang'])).subscribe((lang) => {\n this.languageService.setLang(lang);\n })\n );\n this.subscription.add(\n this.insideBooking$.subscribe((isInsideBooking) => {\n this.store$.dispatch(PseudoLocalActions.setValue({ key: 'isInsideBooking', data: isInsideBooking }));\n })\n );\n\n this.subscription.add(\n this.router.events.pipe(filter(isNavigationEvent)).subscribe(({ url }: NavigationEnd) => {\n this.updatePrevPageUrl(url);\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscription);\n }\n\n private updatePrevPageUrl = (url: string): void => {\n const rootRoutes =\n this.router.config\n ?.find((r) => r.path === `:${ROUTER_LANG_PARAM}`)\n ?.children?.map((r) => r.path)\n .filter((route) => isNotBlank(route) && !route.startsWith(RootPaths.MANAGE_BOOKING_ROOT)) ?? [];\n const langCode = this.activatedRoute.snapshot.paramMap.get(ROUTER_LANG_PARAM);\n const route = getRouteFromUrl(langCode, url);\n const matchesRootRoute = rootRoutes.some((rr) => route === `/${rr}` || route.startsWith(`/${rr}/`));\n this.pageMetaService.prevPageUrl$.next(matchesRootRoute ? route : undefined);\n };\n}\n","<fin-navigation></fin-navigation>\n\n<span class=\"block\">\n <router-outlet></router-outlet>\n</span>\n\n<router-outlet name=\"marketingPreferences\"></router-outlet>\n\n<fin-client-only [componentType]=\"toasterComponentType\"></fin-client-only>\n\n<fin-client-only [componentType]=\"cookiePolicyType\"></fin-client-only>\n\n<fin-client-only [componentType]=\"chatComponentType\"></fin-client-only>\n<fin-client-only [componentType]=\"chatGlobalVisibilityComponentType\"></fin-client-only>\n\n<fin-client-only [componentType]=\"feedbackWidgetComponentType\"></fin-client-only>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { ComponentsModule } from '@fcom/common';\n\nimport { LanguageSettingLayoutComponent } from './language-setting-layout.component';\n\n@NgModule({\n imports: [RouterModule, ComponentsModule, CommonModule],\n declarations: [LanguageSettingLayoutComponent],\n exports: [LanguageSettingLayoutComponent],\n})\nexport class LanguageSettingLayoutModule {}\n","import { NgModule } from '@angular/core';\nimport { Route, RouterModule, Routes, UrlMatchResult, UrlSegment } from '@angular/router';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { IconsModule } from '@fcom/ui-components';\nimport { CmsFooterComponent, CmsModule, DynamicRouteComponent } from '@fcom/cms/components';\nimport {\n ClientOnlyComponent,\n ComponentsModule,\n ErrorComponent,\n FrontPageComponent,\n HeaderComponent,\n NavigationModule,\n SelectLanguageComponent,\n} from '@fcom/common/components';\nimport { RootPaths, ROUTER_LANG_PARAM, AppPreloadingStrategyService } from '@fcom/core';\nimport { LoginModule, MarketingPreferencesComponent } from '@fcom/common/login';\nimport { FeedbackWidgetModule } from '@fcom/common/components/feedback-widget/feedback-widget.module';\nimport { BaseLayoutComponent, BaseLayoutModule } from '@fcom/common/components/base-layout';\nimport { DirectiveModule, FragmentService, PipesModule } from '@fcom/common';\nimport { CampaignBannerComponent } from '@fcom/common/components/header/campaign-banner/campaign-banner.component';\nimport { InstantsearchApiModule } from '@fcom/dapi/api/instantsearch-api.module';\n\nimport { LanguageSettingLayoutComponent } from './language-setting-layout.component';\nimport { LanguageGuard } from './lang.guard';\nimport { LanguageSettingRootComponent } from './language-setting-root.component';\nimport { LanguageSettingLayoutModule } from './language-setting-layout.module';\nimport { AppComponent } from './app.component';\nimport { environment } from '../../../environments/environment';\n\nconst VOLUNTARY_CANCEL_LENGTH = 2;\nconst INVOLUNTARY_CANCEL_LENGTH = 3;\n\nexport const CMS_ROUTES: Route[] = [\n {\n path: '',\n component: BaseLayoutComponent,\n children: [\n { path: '', component: CampaignBannerComponent, outlet: 'campaign-banner' },\n { path: '', component: HeaderComponent, outlet: 'header' },\n { path: '', component: FrontPageComponent },\n { path: '**', component: DynamicRouteComponent },\n { path: '', component: CmsFooterComponent, outlet: 'footer' },\n ],\n },\n];\n\nexport const selectLangComponent = {\n path: '',\n component: SelectLanguageComponent,\n};\n\nexport const routes: Routes = [\n {\n path: '',\n component: LanguageSettingLayoutComponent,\n children: [selectLangComponent],\n },\n {\n path: ':lang/sorry/:error',\n component: LanguageSettingRootComponent,\n children: [\n {\n path: '',\n component: BaseLayoutComponent,\n children: [\n { path: '', component: HeaderComponent, outlet: 'header' },\n { path: '', component: ErrorComponent },\n { path: '', component: CmsFooterComponent, outlet: 'footer' },\n ],\n },\n ],\n },\n {\n path: RootPaths.SELECT_LANGUAGE_ROOT,\n redirectTo: '',\n pathMatch: 'full',\n },\n {\n path: 'devtool',\n canMatch: [() => environment.enableDevToolPath],\n loadChildren: () =>\n import(/* webpackChunkName: \"devtool\" */ '../../devtool/devtool.module').then((m) => m.DevtoolModule),\n },\n {\n path: `:${ROUTER_LANG_PARAM}`,\n component: LanguageSettingRootComponent,\n canActivateChild: [LanguageGuard],\n children: [\n {\n path: RootPaths.BOOKING_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"booking\" */ '../../booking/booking.module').then((m) => m.BookingModule),\n data: { preload: true },\n },\n {\n path: RootPaths.MANAGE_BOOKING_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"manage-booking\" */ '../../manage-booking/manage-booking.module').then(\n (m) => m.ManageBookingModule\n ),\n },\n {\n path: RootPaths.DISRUPTION_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"disruption\" */ '../../disruption/disruption.module').then(\n (m) => m.DisruptionModule\n ),\n },\n {\n matcher: (url: UrlSegment[]): UrlMatchResult => {\n const fullPath = url.join('/');\n\n if (fullPath.includes(RootPaths.CANCEL_ROOT)) {\n return { consumed: url.slice(0, VOLUNTARY_CANCEL_LENGTH) };\n } else if (fullPath.includes(RootPaths.INVOLUNTARY_CANCEL_ROOT)) {\n return { consumed: url.slice(0, INVOLUNTARY_CANCEL_LENGTH) };\n }\n return null;\n },\n loadChildren: () =>\n import(/* webpackChunkName: \"cancel-booking\" */ '../../cancel/cancel.module').then((m) => m.CancelModule),\n },\n {\n path: RootPaths.CHECK_IN_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"manage-booking\" */ '../../manage-booking/manage-booking.module').then(\n (m) => m.ManageBookingModule\n ),\n },\n {\n path: RootPaths.SITE_SEARCH_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"site-search\" */ '../../site-search/site-search.module').then(\n (m) => m.SiteSearchModule\n ),\n },\n {\n path: RootPaths.ONE_UPGRADE_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"one-upgrade\" */ '../../one-upgrade/one-upgrade.module').then(\n (m) => m.OneUpgradeModule\n ),\n },\n {\n path: RootPaths.REACCOMMODATION_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"reaccommodation\" */ '../../reaccommodation/reaccommodation.module').then(\n (m) => m.ReaccommodationModule\n ),\n },\n {\n path: RootPaths.OND_MARKETING_LANDING_ROOT,\n loadChildren: () =>\n import(\n /* webpackChunkName: \"ond-marketing-landing\" */ '../../ond-marketing-landing/ond-marketing-landing.module'\n ).then((m) => m.OndMarketingLandingModule),\n },\n {\n path: RootPaths.PLUS_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"plus\" */ '../../loyalty-plus/plus.module').then((m) => m.PlusModule),\n },\n {\n path: RootPaths.VOLUNTARY_CHANGE_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"voluntary-change\" */ '../../voluntary-change/voluntary-change.module').then(\n (m) => m.VoluntaryChangeModule\n ),\n },\n {\n path: RootPaths.TIMETABLE_ROOT,\n loadChildren: () =>\n import(/* webpackChunkName: \"timetable\" */ '../../timetable/timetable.module').then((m) => m.TimetableModule),\n },\n {\n path: RootPaths.REFUNDS,\n loadChildren: () =>\n import(/* webpackChunkName: \"refunds\" */ '../../refunds/refunds.module').then((m) => m.RefundsModule),\n },\n {\n path: RootPaths.CORPORATE,\n loadChildren: () =>\n import(/* webpackChunkName: \"corporate\" */ '../../corporate/corporate.module').then((m) => m.CorporateModule),\n },\n {\n path: RootPaths.TRAVEL_READY,\n loadChildren: () =>\n import(/* webpackChunkName: \"travel-ready\" */ '../../travel-ready/travel-ready.module').then(\n (m) => m.TravelReadyModule\n ),\n },\n {\n path: RootPaths.FINNAIR_HOLIDAYS,\n component: BaseLayoutComponent,\n data: {\n tab: 'am',\n },\n children: [\n { path: '', component: HeaderComponent, outlet: 'header' },\n { path: '', component: FrontPageComponent },\n { path: '**', component: DynamicRouteComponent },\n { path: '', component: CmsFooterComponent, outlet: 'footer' },\n ],\n },\n {\n path: '',\n component: ClientOnlyComponent,\n outlet: 'marketingPreferences',\n data: {\n componentType: MarketingPreferencesComponent,\n },\n },\n ...CMS_ROUTES,\n ],\n },\n];\n\n@NgModule({\n imports: [\n RouterModule.forRoot(routes, {\n preloadingStrategy: AppPreloadingStrategyService,\n initialNavigation: 'enabledNonBlocking',\n anchorScrolling: 'enabled',\n }),\n\n BaseLayoutModule,\n LanguageSettingLayoutModule,\n CommonModule,\n\n // Application modules\n ComponentsModule,\n CmsModule.forRoot(),\n FeedbackWidgetModule,\n LoginModule,\n NavigationModule,\n PipesModule,\n DirectiveModule,\n UiTranslateModule,\n IconsModule,\n InstantsearchApiModule,\n ],\n declarations: [AppComponent, LanguageSettingRootComponent, SelectLanguageComponent, FrontPageComponent],\n providers: [LanguageGuard, AppPreloadingStrategyService, FragmentService],\n exports: [AppComponent, LanguageSettingRootComponent],\n})\nexport class RouteModule {}\n","import { Injectable } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Location } from '@angular/common';\n\nimport { BehaviorSubject, Observable, of, throwError } from 'rxjs';\nimport {\n catchError,\n distinctUntilChanged,\n filter,\n map,\n pluck,\n startWith,\n switchMap,\n switchMapTo,\n} from 'rxjs/operators';\n\nimport { combineTemplate, finShare } from '@fcom/rx';\nimport { mergeDeep } from '@fcom/core/utils';\n\nimport { SentryLogger } from '../sentry/sentry.logger';\nimport { mapErrorForSentry } from '../../utils';\nimport { CmsDataService, I18nData, I18nKey, i18nKeyToDataMap } from '../cms/cms-data.service';\nimport { LocalizationProvider } from './localization.provider';\n\n@Injectable()\nexport class CmsLocalizationProvider extends LocalizationProvider {\n private lazyLocalizationsObj: { [K in I18nKey]?: boolean } = {};\n private lazyLocalizationsSubject = new BehaviorSubject<{ [K in I18nKey]?: boolean }>(this.lazyLocalizationsObj);\n private lazyLocalizations$ = this.lazyLocalizationsSubject.asObservable();\n\n constructor(\n private cmsDataService: CmsDataService,\n private sentryLogger: SentryLogger,\n private router: Router,\n private location: Location\n ) {\n super();\n }\n\n triggerLazyLocalizations(key: I18nKey): void {\n this.lazyLocalizationsObj = {\n ...this.lazyLocalizationsObj,\n [key]: true,\n };\n this.lazyLocalizationsSubject.next(this.lazyLocalizationsObj);\n }\n\n getLocalizations(lang$: Observable<string>): Observable<any> {\n return combineTemplate({\n base: super.getLocalizations(lang$), // local localization file\n cms: this.immediateLocalizations(lang$, i18nKeyToDataMap.global),\n booking: this.immediateLocalizations(lang$, i18nKeyToDataMap.booking),\n taxCodes: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.taxCodes, ['localSettings', 'taxCodes']),\n countryRegions: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.countryRegions, [\n 'localSettings',\n 'countryRegions',\n ]),\n mmb: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.mmb),\n reaccommodation: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.reaccommodation),\n loyalty: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.loyalty),\n serviceForms: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.serviceForms),\n corporate: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.corporate),\n refunds: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.refunds),\n travelReady: this.lazyLoadLocalizations(lang$, i18nKeyToDataMap.travelReady),\n }).pipe(\n map(\n ({\n booking,\n cms,\n base,\n taxCodes,\n countryRegions,\n mmb,\n reaccommodation,\n loyalty,\n serviceForms,\n corporate,\n refunds,\n travelReady,\n }) =>\n [\n booking,\n cms,\n taxCodes,\n countryRegions,\n mmb,\n reaccommodation,\n loyalty,\n serviceForms,\n corporate,\n refunds,\n travelReady,\n ].reduce((combo, current) => mergeDeep(combo, current), base)\n ),\n finShare()\n );\n }\n\n private immediateLocalizations(lang$: Observable<string>, i18nData: I18nData): Observable<any> {\n return lang$.pipe(\n switchMap((l) => this.cmsDataService.getLocalization(l, i18nData)),\n catchError(this.throwCatchError(`Error fetching ${i18nData.key} localization from CMS`))\n );\n }\n\n private lazyLoadLocalizations(\n lang$: Observable<string>,\n i18nData: I18nData,\n pluckProperty: string[] = ['localSettings']\n ): Observable<any> {\n return this.lazyLocalizations$.pipe(\n pluck(i18nData.key),\n filter(Boolean),\n distinctUntilChanged(),\n switchMapTo(lang$),\n switchMap((language) => this.cmsDataService.getLocalization(language, i18nData, pluckProperty)),\n catchError(this.throwCatchError(`Error fetching ${i18nData.key} localization from CMS`, true)),\n startWith({})\n );\n }\n\n private throwCatchError(errorMsg: string, canHandleError = false): (error: any) => Observable<any> {\n return (error) => {\n this.sentryLogger.error(errorMsg, { error: mapErrorForSentry(error) });\n if (canHandleError) {\n return of({});\n } else {\n const [, lang] = this.location.path(false).split('/');\n this.router.navigate([lang || 'en', 'sorry', 'LOCALIZATION_ERROR']);\n return throwError(() => errorMsg);\n }\n };\n }\n}\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { combineLatest, map, Observable, switchMap, take } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\nimport { ConfigService } from '@fcom/core/services';\nimport { activeTab, BookingWidgetAppState } from '@fcom/booking-widget/store';\nimport { WidgetTab } from '@fcom/booking-widget/interfaces';\nimport { GtmTripType } from '@fcom/common/interfaces';\n\nimport { BookingAppState } from '../interfaces/booking';\nimport { globalBookingLocations } from '../store';\nimport { getTripTypeForFlightSearchParams } from '../utils/gtm.utils';\n\nconst DD_TRACE_HEADER_TAG_KEY = 'x-dd-flow-type';\n\nexport enum FlowType {\n FLIGHT = 'flight',\n AWARD = 'award',\n MULTICITY = 'multicity',\n OPENJAW = 'openjaw',\n UNKNOWN = 'unknown',\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DatadogHeadersInterceptor implements HttpInterceptor {\n constructor(\n private configService: ConfigService,\n private store$: Store<BookingWidgetAppState>,\n private bookingStore$: Store<BookingAppState>\n ) {}\n\n intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n if (!req.url.startsWith(this.configService.cfg.offersUrl) && !req.url.startsWith(this.configService.cfg.cartUrl)) {\n return next.handle(req);\n }\n\n return this.getFlowType().pipe(\n switchMap((flowType) => {\n const request: HttpRequest<unknown> = req.clone({\n headers: req.headers.set(DD_TRACE_HEADER_TAG_KEY, flowType),\n });\n return next.handle(request);\n })\n );\n }\n\n private getFlowType(): Observable<FlowType> {\n return combineLatest([this.store$.pipe(activeTab()), this.bookingStore$.pipe(globalBookingLocations())]).pipe(\n take(1),\n map(([widgetTab, flights]) => {\n if (widgetTab === WidgetTab.AWARD) {\n return FlowType.AWARD;\n }\n\n if (!flights.length) {\n return FlowType.UNKNOWN;\n }\n\n const tripType = getTripTypeForFlightSearchParams(\n flights.map((flight) => {\n return {\n origin: flight?.origin?.locationCode,\n destination: flight?.destination?.locationCode,\n departureDate: null,\n };\n })\n );\n\n if (tripType === GtmTripType.OPENJAW) {\n return FlowType.OPENJAW;\n }\n\n if (tripType === GtmTripType.MULTICITY) {\n return FlowType.MULTICITY;\n }\n\n return FlowType.FLIGHT;\n })\n );\n }\n}\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { isPresent } from '@fcom/core/utils';\n\nimport { ConfigService, StorageService } from '../services';\n\nconst containsUrl = (urlsToCheck: string[], url: string): boolean =>\n urlsToCheck && isPresent(urlsToCheck.find((urlToCheck: string) => url.indexOf(urlToCheck) >= 0));\n\nconst USE_DAPI_BACKEND_KEY = 'X-RequestedBackend';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DapiUatInterceptor implements HttpInterceptor {\n constructor(\n private configService: ConfigService,\n private storageService: StorageService\n ) {}\n\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n const dapiBackendToUse = this.storageService.LOCAL.get(USE_DAPI_BACKEND_KEY);\n if (\n !this.configService.cfg.enableDapiBackendSwitch ||\n !dapiBackendToUse ||\n !containsUrl(this.configService.useDapiUATForUrls, req.url)\n ) {\n return next.handle(req);\n }\n\n const request: HttpRequest<any> = req.clone({\n headers: req.headers.set(USE_DAPI_BACKEND_KEY, dapiBackendToUse),\n });\n return next.handle(request);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpRequest, HttpInterceptor, HttpHandler, HttpErrorResponse } from '@angular/common/http';\n\nimport { Observable, ObservableInput, fromEvent, throwError } from 'rxjs';\nimport { retry, take } from 'rxjs/operators';\n\nimport { WindowRef } from '../providers';\nimport { ConfigService } from '../services';\n\n@Injectable()\nexport class ErrorInterceptor implements HttpInterceptor {\n constructor(\n private windowRef: WindowRef,\n private configService: ConfigService\n ) {}\n\n public intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n if (\n request.url.includes(`${this.configService.cfg.casHost}/cas/login`) ||\n request.url.includes(this.configService.cfg.loyaltyServices.legacy.loyaltyMemberUrl)\n ) {\n return next.handle(request).pipe(\n retry({\n count: 1,\n delay: (error: HttpErrorResponse): ObservableInput<Event> => {\n if (error.status !== 428) {\n return throwError(() => error);\n }\n return fromEvent(this.windowRef.nativeWindow.document, 'akamai-challenge-noreload').pipe(take(1));\n },\n })\n );\n }\n return next.handle(request);\n }\n}\n","import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { v4 as uuid } from 'uuid';\n\nimport { ConfigService, NativeBridgeService, StorageService } from '../services';\n\nconst containsUrl = (urlsToCheck: string[] = [], url: string): boolean =>\n urlsToCheck.some((urlToCheck: string) => url.includes(urlToCheck));\n\nconst CLIENT_ID_KEY = 'X-Client-Id';\nconst SESSION_ID_KEY = 'X-Session-Id';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DapiHeadersInterceptor implements HttpInterceptor {\n private clientId: string;\n\n constructor(\n private configService: ConfigService,\n private storageService: StorageService,\n private nativeBridgeService: NativeBridgeService\n ) {}\n\n intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n if (!containsUrl(this.configService.useDapiUATForUrls, req.url)) {\n return next.handle(req);\n }\n\n if (!this.storageService.SESSION.get(SESSION_ID_KEY)) {\n this.storageService.SESSION.set(SESSION_ID_KEY, uuid());\n }\n\n if (!this.clientId) {\n this.clientId = this.getClientId();\n }\n\n const request: HttpRequest<unknown> = req.clone({\n headers: req.headers\n .set(CLIENT_ID_KEY, this.clientId)\n .set(SESSION_ID_KEY, this.storageService.SESSION.get(SESSION_ID_KEY) ?? ''),\n });\n return next.handle(request);\n }\n\n private getClientId(): string {\n if (this.nativeBridgeService.isInsideNativeAndroidWebView) {\n return 'MOBILEAPP_ANDROID';\n }\n if (this.nativeBridgeService.isInsideNativeiOSWebView) {\n return 'MOBILEAPP_IOS';\n }\n\n return 'FCOM';\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\n\nimport { Store } from '@ngrx/store';\nimport { distinctUntilChanged, filter, map, switchMap, take } from 'rxjs/operators';\nimport { Observable, of, Subscription } from 'rxjs';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { GtmService } from '@fcom/common/gtm';\nimport {\n ConsentData,\n ElementActions,\n ElementTypes,\n GA4Product,\n GA4PurchaseData,\n GA4PurchaseEvent,\n GTtmMulticityTicketTypeOptions,\n GaContext,\n GtmClickOutboundData,\n GtmCustomDimensionEcommerce,\n GtmEcommerceAddToCart,\n GtmEcommerceClick,\n GtmEcommerceClickProduct,\n GtmEcommerceDetail,\n GtmEcommerceDetailProduct,\n GtmEcommerceImpression,\n GtmEcommerceImpressionProduct,\n GtmEcommerceList,\n GtmEcommerceMeasurement,\n GtmEcommerceProduct,\n GtmEcommerceRemoveFromCart,\n GtmEvent,\n GtmEventData,\n GtmFlightSearchData,\n GtmFlightSelectionData,\n GtmInternalPromotionEvent,\n GtmInternalPromotionItem,\n GtmLoginEvent,\n GtmMulticityFareFamilySelectionData,\n GtmMulticityOfferSelectionData,\n GtmPath,\n GtmPurchaseFlow,\n GtmTripType,\n MobileOsType,\n NOT_SET,\n OfferListFetchParams,\n PreFlightSearchParams,\n PromotionItem,\n PromotionType,\n SearchType,\n SeatMapData,\n SiteSearchEvents,\n UNSET,\n FlightSegment,\n} from '@fcom/common/interfaces';\nimport { Links, PageMetaService } from '@fcom/common/services';\nimport { AppState, GlobalBookingTravelClass, NativeBridgeService, WindowRef } from '@fcom/core';\nimport { Profile } from '@fcom/core-api/login';\nimport { loginStatus, profile } from '@fcom/core/selectors';\nimport {\n Amount,\n CartOffer,\n CartServices,\n CustomServiceType,\n FeeAmount,\n PricesPerBound,\n TaxAmount,\n TotalPrices,\n UnitPriceBreakdown,\n} from '@fcom/dapi';\nimport { CombinedDateString, entrySet, hyphenate, isPresent, mapValues, TzDate, unsubscribe } from '@fcom/core/utils';\nimport {\n filteredUtmParamsQueryString,\n pathIsAnyHardcodedPath,\n urlWithoutQueryString,\n} from '@fcom/core/utils/app-url-utils';\nimport {\n Cabin,\n Category,\n ControlData,\n FinnairCart,\n FinnairOrder,\n FinnairPassengerServiceItem,\n FinnairPassengerServiceSelectionItem,\n FinnairPrice,\n FinnairServiceCategoryPriceItem,\n FinnairServiceItem,\n FinnairServiceSegmentItem,\n PaymentTransaction,\n} from '@fcom/dapi/api/models';\nimport { isNotIncludedService, toAmount } from '@fcom/common-booking/utils/common-booking.utils';\nimport { BookingTripLocations } from '@fcom/common-booking';\nimport {\n combineFlightDates,\n combineOriginDestination,\n getAffiliation,\n getGA4Items,\n getGtmFlightProductFromOrder,\n getGtmPaxAmountFromOrder,\n getTripTypeForFlightSearchParams,\n getTripTypeFromBounds,\n mapServicesToGtmProductList,\n mapToGtmOrderData,\n} from '@fcom/common/utils/gtm.utils';\nimport { finShare } from '@fcom/rx';\nimport { isBoundBasedCategory, isJourneyBasedCategory } from '@fcom/common-booking/modules/ancillaries/utils';\nimport { getLastPaidPrices, getLastPaidServices } from '@fcom/common-booking/utils/order.utils';\nimport { isShortHaulFlight } from '@fcom/common/utils';\nimport { LocationsMap } from '@fcom/core-api';\n\ninterface LocaleData {\n language: string;\n pointOfSale: string;\n}\n\nenum URLState {\n CURRENT = 'current',\n PREVIOUS = 'previous',\n}\n\ntype GTMURLContext = Record<URLState, LocaleData & { path: string; normalizedPath: string }>;\n\n// We assign these in a case of international english.\nconst DEFAULT_LANG = 'FI';\nconst DEFAULT_POS = 'INT';\n\nconst getGtmLangAndPointOfSale = (locale: string): LocaleData => {\n if (locale === 'en') {\n return { language: 'EN', pointOfSale: DEFAULT_POS };\n }\n if (!isPresent(locale) || typeof locale !== 'string' || locale.indexOf('-') < 0) {\n // Just to be sure as the using part isn't null safe\n return { language: DEFAULT_LANG, pointOfSale: DEFAULT_POS };\n }\n const splitted = locale.toUpperCase().split('-');\n return { language: splitted[1], pointOfSale: splitted[0] };\n};\n\nexport const getGtmUrlWithoutLocale = (url: string, locale: string): string => {\n const langObj = getGtmLangAndPointOfSale(locale);\n const divider = url.split('/').length < 3 ? '' : '/';\n\n if (langObj.pointOfSale === DEFAULT_POS) {\n return url.replace(\n pathIsAnyHardcodedPath(url)\n ? `${divider}${langObj.language.toLowerCase()}`\n : `/${langObj.pointOfSale.toLowerCase()}-${langObj.language.toLowerCase()}`,\n ''\n );\n } else {\n return url.replace(`${divider}${locale}`, '');\n }\n};\n\n/**\n * Combine language and locale parameters with fi-en english page names\n * to create desired tracking url format.\n * NOTE: how used refLang is being fallbacked causes test cms to often return '' for page path, as the content is not found.\n */\nconst convertGtmUrl = (locales: LocaleData, links: Links): string => {\n const refLang: string =\n links[`${locales.pointOfSale.toLowerCase()}-en`] ||\n links[`${locales.pointOfSale.toLowerCase()}-${locales.language.toLowerCase()}`] ||\n links['en'] ||\n '';\n const path: string = refLang.split('/').slice(4).join('/');\n const originalLangLocale = `/${locales.pointOfSale.toLowerCase()}-${locales.language.toLowerCase()}`;\n return `${originalLangLocale}/${path}`;\n};\n\nexport const mapCabinToTravelClass = (cabin: Cabin): GlobalBookingTravelClass => {\n return GlobalBookingTravelClass[Cabin[cabin] as keyof typeof GlobalBookingTravelClass];\n};\n\nexport const mapToOldGtmOffer = (data: FinnairCart | FinnairOrder): CartOffer => {\n const prices = data.prices.included || data.prices.unpaid;\n\n const mapUnitPrices = (): UnitPriceBreakdown[] => {\n return entrySet(prices.total.totalPerPax).map((paxPrices: { key: string; value: FinnairPrice }) => ({\n total: paxPrices.value.totalAmount,\n tax: paxPrices.value.totalTax,\n baseFare: paxPrices.value.baseFare,\n fees: paxPrices.value.fees as FeeAmount[],\n taxes: paxPrices.value.taxes as TaxAmount[],\n surcharges: paxPrices.value.surcharges,\n travelerIds: [paxPrices.key],\n totalPerPTC: null,\n }));\n };\n\n // use prices.flight as it is basically the offer\n return {\n id: 'not-known',\n itemId: 'not-known',\n fareFamilyCode: data.bounds?.[0]?.fareFamily?.code,\n fareFamilyBrandName: data.bounds?.[0]?.fareFamily?.name,\n newBounds: data.bounds,\n prices: {\n totalPrice: {\n total: toAmount(prices.flight.total.totalAmount),\n tax: toAmount(prices.flight.total.totalTax),\n baseFare: toAmount(prices.flight.total.baseFare),\n fee: toAmount(prices.flight.total.totalFees),\n },\n unitPrices: mapUnitPrices(),\n },\n };\n};\n\nconst getGtmFlightServices = (\n service: FinnairServiceItem | undefined,\n flightId: string\n): FinnairPassengerServiceItem[] => {\n if (!service) {\n return [];\n }\n return [\n ...service.bounds.reduce(\n (allServices, b) => allServices.concat(...(b.segments.find((s) => s.id === flightId)?.passengers || [])),\n []\n ),\n ];\n};\n\nconst loadGtmServicesFromOrder = (services: Array<FinnairServiceItem>, category: Category) => {\n const serviceItemForCategory = services?.find((s) => s.category === category);\n\n const toService = (\n s1: FinnairPassengerServiceItem,\n s2: FinnairPassengerServiceSelectionItem,\n currentSegment: FinnairServiceSegmentItem\n ) => ({\n category: s2.subCategory,\n variant: s2.variant,\n price: s2.unitPrice,\n flightIds: [currentSegment.id],\n quantity: s2.quantity,\n serviceId: s2.id,\n subCategory: s2.displayName,\n travelerId: s1.id,\n seatNumber: s2.seatNumber,\n seatType: s2.seatType,\n displayPrice: s2.unitPrice,\n });\n\n return (\n serviceItemForCategory?.bounds.reduce((s: any, currentBound) => {\n return currentBound.segments.reduce((s2: any, currentSegment) => {\n const servicesForFlight = getGtmFlightServices(serviceItemForCategory, currentSegment.id);\n const newServiceCatalogServices = servicesForFlight.reduce((allServices, service) => {\n return allServices.concat(\n ...service.services.filter(isNotIncludedService).map((serviceItem) => {\n return toService(service, serviceItem, currentSegment);\n })\n );\n }, []);\n\n const getFragmentId = () => {\n if (isJourneyBasedCategory(category)) {\n return CustomServiceType.JOURNEY;\n }\n if (isBoundBasedCategory(category)) {\n return currentBound.id;\n }\n return currentSegment.id;\n };\n\n s2[getFragmentId()] = newServiceCatalogServices;\n return s2;\n }, s);\n }, {}) || {}\n );\n};\n\nexport const mapToOldGtmServices = (services: Array<FinnairServiceItem>): CartServices => {\n return {\n baggage: loadGtmServicesFromOrder(services, Category.BAGGAGE),\n seats: loadGtmServicesFromOrder(services, Category.SEAT),\n lounge: loadGtmServicesFromOrder(services, Category.LOUNGE),\n meals: loadGtmServicesFromOrder(services, Category.MEAL),\n wifi: loadGtmServicesFromOrder(services, Category.WIFI),\n cover: loadGtmServicesFromOrder(services, Category.COVER),\n travelComforts: loadGtmServicesFromOrder(services, Category.TRAVEL_COMFORT),\n pet: loadGtmServicesFromOrder(services, Category.PET),\n sport: loadGtmServicesFromOrder(services, Category.SPORT),\n };\n};\n\nexport const mapToOldGtmPrices = (data: FinnairOrder): TotalPrices => {\n const prices = data.prices.included;\n\n const getGtmBasePrices = (\n service: FinnairServiceItem,\n totalPerCategory: FinnairServiceCategoryPriceItem | undefined\n ) => ({\n total: {\n numberOfItems: service?.quantity ?? 0,\n price: service?.totalPrice ?? null,\n },\n totalPerPax: mapValues(totalPerCategory?.totalPerPax ?? {}, (value) => {\n return {\n numberOfItems: value.quantity,\n price: value.price.totalAmount,\n ptc: '',\n };\n }),\n });\n\n const toGtmFlightServicePrices = (category: Category) => {\n const service = data.services.included.find((c) => c.category === category);\n const totalPerCategory = prices?.services?.totalPerCategory?.find((c) => c.category === category);\n\n return {\n ...getGtmBasePrices(service, totalPerCategory),\n totalPerFlight: service?.bounds.reduce((all, bound) => {\n return {\n ...all,\n ...bound.segments.reduce((all2, segment) => {\n all2[segment.id] = {\n numberOfItems: segment.quantity,\n price: segment.totalPrice,\n };\n return all2;\n }, {} as any),\n };\n }, {}),\n };\n };\n\n const toGtmBoundServicePrices = (category: Category) => {\n const service = data.services.included.find((c) => c.category === category);\n const totalPerCategory = prices?.services.totalPerCategory.find((c) => c.category === category);\n\n return {\n ...getGtmBasePrices(service, totalPerCategory),\n totalPerBound: service?.bounds.reduce((all, bound) => {\n all[bound.id] = {\n numberOfItems: bound.quantity,\n price: bound.totalPrice,\n };\n return all;\n }, {} as PricesPerBound),\n };\n };\n\n return {\n total: toAmount(prices.total.total.totalAmount),\n totalPerPax: mapValues(prices.total.totalPerPax, (value) => toAmount(value.totalAmount)),\n services: {\n seats: toGtmFlightServicePrices(Category.SEAT),\n meals: toGtmFlightServicePrices(Category.MEAL),\n wifi: toGtmFlightServicePrices(Category.WIFI),\n lounge: toGtmFlightServicePrices(Category.LOUNGE),\n baggage: toGtmBoundServicePrices(Category.BAGGAGE),\n pet: toGtmBoundServicePrices(Category.PET),\n sport: toGtmBoundServicePrices(Category.SPORT),\n travelComforts: toGtmFlightServicePrices(Category.TRAVEL_COMFORT),\n cover: toGtmBoundServicePrices(Category.COVER),\n saf: toGtmBoundServicePrices(Category.SAF),\n total: prices.services.total.totalAmount,\n },\n offers: {\n total: toAmount(prices.flight.total.totalAmount),\n totalPerPax: mapValues(prices.flight.totalPerPax, (value, key) => ({\n ptc: data.passengers.find((p) => p.id === key)?.passengerTypeCode?.toString(),\n numberOfItems: 1,\n price: toAmount(value.totalAmount),\n })),\n totalPerPtc: {}, // not possible to get anywhere?\n },\n taxes: {\n total: toAmount(prices.total.total.totalTax),\n offers: {\n total: toAmount(prices.flight.total.totalTax),\n totalPerPax: mapValues(prices.flight.totalPerPax, (value, key) => ({\n ptc: data.passengers.find((p) => p.id === key)?.passengerTypeCode?.toString(),\n numberOfItems: 1,\n price: toAmount(value.totalTax),\n })),\n totalPerPtc: {}, // not possible to get anywhere?\n },\n },\n };\n};\n\n/**\n * Interacts with Google Tag Manager through its dataLayer object.\n * Data pushed to GTM via dataLayer can be used to set up e.g. analytics.\n */\n@Injectable()\nexport class ClientGtmService extends GtmService implements OnDestroy {\n dataLayer: Array<any>;\n urlContext: GTMURLContext;\n\n private subscriptions = new Subscription();\n\n constructor(\n private store$: Store<AppState>,\n private windowRef: WindowRef,\n private languageService: LanguageService,\n private nativeBridgeService: NativeBridgeService,\n private pageMetaService: PageMetaService,\n private router: Router\n ) {\n super();\n this.dataLayer = this.windowRef.nativeWindow['dataLayer'] = this.windowRef.nativeWindow['dataLayer'] || [];\n if (this.nativeBridgeService.isInsideNativeWebView) {\n this.nativeAppSessionEvent(\n this.nativeBridgeService.isInsideNativeAndroidWebView ? MobileOsType.ANDROID : MobileOsType.IOS\n );\n\n this.subscriptions.add(\n this.nativeBridgeService.appHideStatus.pipe(distinctUntilChanged()).subscribe((appHideStatus: boolean) => {\n this.pushEventToDataLayer(GtmEvent.VISIBILITY_CHANGE, { appHidden: appHideStatus });\n })\n );\n }\n\n this.subscriptions.add(\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationStart),\n switchMap((event) => this.getGtmPath((event as NavigationStart).url))\n )\n .subscribe((gtmPath) => {\n const locale = this.languageService.langValue;\n const langObj = getGtmLangAndPointOfSale(locale);\n const basePathWithoutLocale = getGtmUrlWithoutLocale(gtmPath.basePath, locale);\n const normalizedPath = `${basePathWithoutLocale}${gtmPath.queryString}`;\n this.urlContext = {\n [URLState.CURRENT]: {\n ...langObj,\n path: gtmPath.path,\n normalizedPath,\n },\n [URLState.PREVIOUS]: this.urlContext?.current,\n };\n })\n );\n\n this.subscriptions.add(\n this.store$\n .pipe(\n loginStatus(),\n finShare(),\n filter((status) => status === 'LOGGED_IN'),\n switchMap(() => this.store$.pipe(profile(), take(1)))\n )\n .subscribe((memberProfile: Profile) => {\n const eventData: GtmLoginEvent = {\n tier: memberProfile.tier || 'not set',\n isLogged: true,\n };\n if (memberProfile.isCorporate) {\n eventData.corporateProfile = memberProfile.corporate?.userRole || 'not set';\n }\n this.pushEventToDataLayer(GtmEvent.LOGIN, eventData);\n })\n );\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n getGtmPath = (path: string): Observable<GtmPath> => {\n const langObj = getGtmLangAndPointOfSale(this.languageService.langValue);\n const noParamsPath = urlWithoutQueryString(path);\n const filteredQueryString = filteredUtmParamsQueryString(path);\n\n if (pathIsAnyHardcodedPath(noParamsPath)) {\n return of({\n path,\n basePath: noParamsPath,\n queryString: filteredQueryString,\n normalizedPath: `${noParamsPath}${filteredQueryString}`,\n });\n } else {\n return this.pageMetaService.linksForUrl(noParamsPath).pipe(\n take(1),\n map((links: Links) => ({\n path: convertGtmUrl(langObj, links),\n basePath: convertGtmUrl(langObj, links),\n queryString: filteredQueryString,\n }))\n );\n }\n };\n\n // Due to localized url paths outside of hard coded pages, we need to handle different paths differently\n pageView(path: string): void {\n const locale = this.languageService.langValue;\n const langObj = getGtmLangAndPointOfSale(locale);\n this.subscriptions.add(\n this.getGtmPath(path).subscribe((gtmPath: GtmPath) => {\n const basePathWithoutLocale = getGtmUrlWithoutLocale(gtmPath.basePath, locale);\n const normalizedPath = `${basePathWithoutLocale}${gtmPath.queryString}`;\n\n this.pushEventToDataLayer(\n GtmEvent.PAGE_VIEW,\n Object.assign(langObj, {\n path: gtmPath.path,\n normalizedPath,\n })\n );\n })\n );\n }\n\n originalPageView(path: string): void {\n this.subscriptions.add(\n this.getGtmPath(path).subscribe((gtmPath: GtmPath) =>\n this.pushEventToDataLayer(GtmEvent.ORIGINAL_LOCATION, `${gtmPath.basePath}${gtmPath.queryString}`)\n )\n );\n }\n\n internalPromotion(promotionItemArray: PromotionItem[], type: PromotionType): void {\n const promotionItems: GtmInternalPromotionItem[] = promotionItemArray.map((promotion: PromotionItem) => {\n return {\n creative: promotion.product,\n id: `${promotion.type}::${promotion.id}::${promotion.position}::${promotion.product}`,\n position: promotion.position,\n name: promotion.id,\n };\n });\n\n if (type === PromotionType.VIEW) {\n const promotionData: GtmInternalPromotionEvent = {\n ecommerce: {\n promoView: {\n promotions: promotionItems,\n },\n },\n };\n this.pushEventToDataLayer(GtmEvent.INTERNAL_PROMOTION_VIEW, promotionData);\n } else {\n const promotionData: GtmInternalPromotionEvent = {\n ecommerce: {\n promoClick: {\n promotions: promotionItems,\n },\n },\n };\n this.pushEventToDataLayer(GtmEvent.INTERNAL_PROMOTION_CLICK, promotionData);\n }\n }\n\n /**\n * This method is used to report UI related events (clicks, openings, closings) to GTM's data layer.\n *\n * @param elementName Will be hyphenated and truncated to max 100 chars before pushing to dataLayer.\n * @param context Will be hyphenated and truncated to max 40 chars before pushing to dataLayer.\n * @param elementType Won't be truncated.\n * @param state Will be truncated to max 100 chars before pushing to dataLayer.\n * @param action Won't be truncated.\n * @param token An optional param that used only by some squads. Will be truncated to max 100 chars before pushing to dataLayer.\n *\n * Some of the params are truncated because if they exceed the allowed amount, they don't show up in GTM statistics,\n * which skews the data in GTM.\n *\n * Note:\n * GTM has a logic to find last valid value for specific object keys with same name.\n * This brings the need to 'flush' optional values with undefined, so that the gtm does not use\n * previous event's values for more recently pushed events.\n */\n trackElement(\n elementName: string,\n context: string = undefined,\n elementType: ElementTypes,\n state: string | undefined = undefined,\n action: ElementActions | undefined = undefined,\n token?: string,\n searchType?: SearchType\n ): void {\n this.subscriptions.add(\n this.getGtmPath(this.router.url).subscribe((gtmPath: GtmPath) =>\n this.pushEventToDataLayer(GtmEvent.UI_EVENT, {\n context: hyphenate(context)?.slice(0, 40),\n id: hyphenate(elementName)?.slice(0, 100),\n language: this.languageService.langValue,\n pagePath: `${getGtmUrlWithoutLocale(gtmPath.basePath, this.languageService.langValue)}${gtmPath.queryString}`,\n // TODO: to be removed when removing old GA support, check with analysts before making changes\n triggerElement: ElementTypes[elementType],\n state: state?.slice(0, 100),\n // TODO: to be removed when removing old GA support, check with analysts before making changes\n ...(isPresent(action) && { action }),\n ...(token && { token: token.slice(0, 100) }),\n ...(isPresent(searchType) && { searchType }),\n })\n )\n );\n }\n\n flightSelection(event: GtmEvent, data: GtmFlightSelectionData[]): void {\n this.pushEventToDataLayer(event, data);\n }\n\n multicityFareFamilySelection(event: GtmEvent, data: GtmMulticityFareFamilySelectionData): void {\n this.pushEventToDataLayer(event, data);\n }\n\n multicityOfferSelection(event: GtmEvent, data: GtmMulticityOfferSelectionData): void {\n this.pushEventToDataLayer(event, data);\n }\n\n paxDetailsFlightReview(event: GtmEvent, data: GtmFlightSelectionData[]): void {\n this.pushEventToDataLayer(event, data);\n }\n\n flowData(data: ControlData, purchaseFlow: GtmPurchaseFlow): void {\n this.pushEventToDataLayer(GtmEvent.FLOW_DATA, {\n officeId: data.officeId,\n market: data.market,\n destinationCountryCode: data.destinationCountryCode,\n destinationLocationCode: data.destinationLocationCode,\n originCountryCode: data.originCountryCode,\n originLocationCode: data.originLocationCode,\n sellAncillariesPerFlight: data.sellAncillariesPerFlight,\n sellBags: data.sellBagsOutbound || data.sellBagsInbound,\n purchaseFlow,\n });\n }\n\n /**\n * @todo: When ancillaries get their own promotion elements, we need to either generalise this event type & function\n * or create a new function and types\n * @param element\n * @param destCity\n * @param destCountry\n */\n destinationPromotion(element: string, destCity: string, destCountry: string): void {\n this.pushEventToDataLayer(GtmEvent.DESTINATION_PROMOTION, {\n element,\n destCity,\n destCountry,\n });\n }\n\n setConsents(consentData: ConsentData): void {\n this.pushEventToDataLayer(GtmEvent.CONSENTS, consentData);\n }\n\n seatMapEvent(\n elementName: string,\n elementType: ElementTypes,\n state: string | undefined,\n action: string | undefined,\n seatMapData: SeatMapData\n ): void {\n this.subscriptions.add(\n this.getGtmPath(this.router.url)\n .pipe(take(1))\n .subscribe((gtmPath: GtmPath) =>\n this.dataLayer.push({\n event: GtmEvent.UI_EVENT,\n uiEvent: {\n context: GaContext.SEAT_MAP,\n id: hyphenate(elementName)?.slice(0, 100),\n language: this.languageService.langValue,\n pagePath: `${getGtmUrlWithoutLocale(gtmPath.basePath, this.languageService.langValue)}${gtmPath.queryString}`,\n triggerElement: ElementTypes[elementType],\n state: state?.slice(0, 100),\n action: action,\n },\n flowType: GaContext.BOOKING_FLOW,\n ...seatMapData,\n })\n )\n );\n }\n\n completePurchase(\n order: FinnairOrder,\n type: GtmTripType,\n total: Amount,\n storeLocations: BookingTripLocations,\n totalPoints: string | undefined,\n purchaseFlow: GtmPurchaseFlow.BOOKING | GtmPurchaseFlow.AWARD | GtmPurchaseFlow.CORPORATE,\n discountCode: string | undefined\n ): void {\n // @TODO Remove GtmEvent.ORDER data once all dependencies on GTM are removed\n // Only use GtmEvent.ORDER_DATA once the transition is done\n this.pushEventToDataLayer(GtmEvent.ORDER, {\n tripType: type,\n locations: {\n originCountryCode: storeLocations.origin ? storeLocations.origin.countryCode : undefined,\n destinationCountryCode: storeLocations.destination ? storeLocations.destination.countryCode : undefined,\n },\n offer: mapToOldGtmOffer(order),\n services: mapToOldGtmServices(order?.services?.included),\n total: total,\n id: order.id,\n prices: mapToOldGtmPrices(order),\n paymentType: order.payments.map((p) => p.mopType ?? NOT_SET).join('-') || NOT_SET,\n paymentSubType: order.payments.map((p) => p.mopSubType ?? NOT_SET).join('-') || NOT_SET,\n paxAmount: getGtmPaxAmountFromOrder(order),\n points: totalPoints ?? NOT_SET,\n purchaseFlow,\n });\n\n const products = [\n ...getGtmFlightProductFromOrder(order, order.prices?.included?.flight, purchaseFlow),\n ...mapServicesToGtmProductList(order, order.services.included, purchaseFlow),\n ];\n\n const pricesTotal = order.prices.included?.total?.total;\n this.pushEventToDataLayer(\n GtmEvent.ORDER_DATA,\n mapToGtmOrderData(order, products, order.payments, pricesTotal, purchaseFlow)\n );\n this.pushEventToDataLayer(GtmEvent.TRANSACTION);\n this.purchaseTransactionForGA4(order, purchaseFlow, discountCode);\n }\n\n completeManageBookingPurchase(\n order: FinnairOrder,\n paymentMethods: PaymentTransaction[],\n purchaseFlow: GtmPurchaseFlow.MANAGE_BOOKING | GtmPurchaseFlow.VOLUNTARY_CHANGE\n ): void {\n const products =\n purchaseFlow === GtmPurchaseFlow.MANAGE_BOOKING\n ? mapServicesToGtmProductList(order, getLastPaidServices(order), purchaseFlow)\n : getGtmFlightProductFromOrder(order, order.prices?.included?.total, purchaseFlow);\n const pricesTotal =\n purchaseFlow === GtmPurchaseFlow.MANAGE_BOOKING\n ? getLastPaidPrices(order)?.total.total\n : order.prices.included?.total?.total;\n this.pushEventToDataLayer(\n GtmEvent.ORDER_DATA,\n mapToGtmOrderData(order, products, paymentMethods, pricesTotal, purchaseFlow)\n );\n this.pushEventToDataLayer(GtmEvent.TRANSACTION_MANAGE_BOOKING);\n this.purchaseTransactionForGA4(order, purchaseFlow);\n }\n\n ecommerceEvent(\n event: GtmEvent,\n type: GtmEcommerceMeasurement.ADD | GtmEcommerceMeasurement.REMOVE | GtmEcommerceMeasurement.IMPRESSIONS,\n products: GtmEcommerceImpressionProduct[] | GtmEcommerceProduct[],\n purchaseFlow: GtmPurchaseFlow,\n currencyCode?: string\n ): void {\n const ecommerce: GtmEcommerceAddToCart | GtmEcommerceRemoveFromCart | GtmEcommerceImpression = {\n ...(type === GtmEcommerceMeasurement.IMPRESSIONS && { impressions: products }),\n ...(type === GtmEcommerceMeasurement.ADD && { add: { products }, currencyCode }),\n ...(type === GtmEcommerceMeasurement.REMOVE && { remove: { products } }),\n };\n const custom: GtmCustomDimensionEcommerce = { purchaseFlow };\n\n this.dataLayer.push({\n event,\n ecommerce,\n custom,\n });\n }\n\n enhancedEcommerceProductClickOrDetailView(\n event: GtmEvent,\n type: GtmEcommerceMeasurement.CLICK | GtmEcommerceMeasurement.DETAIL,\n product: GtmEcommerceClickProduct | GtmEcommerceDetailProduct,\n list: GtmEcommerceList,\n purchaseFlow: GtmPurchaseFlow,\n currencyCode?: string\n ): void {\n const ecommerce: GtmEcommerceClick | GtmEcommerceDetail = {\n ...(type === GtmEcommerceMeasurement.CLICK && { click: { actionField: { list }, products: [product] } }),\n ...(type === GtmEcommerceMeasurement.DETAIL && { detail: { actionField: { list }, products: [product] } }),\n ...(currencyCode && { currencyCode }),\n };\n this.dataLayer.push({\n event,\n ecommerce,\n custom: { purchaseFlow },\n });\n }\n\n pushEventToDataLayer(event: GtmEvent, eventData?: GtmEventData): void {\n this.dataLayer.push({ event, [event]: eventData });\n }\n\n // TODO: We don't have anymore offer in the cart so this should be updated to something else\n checkoutFlights(cart: FinnairCart, purchaseFlow: GtmPurchaseFlow): void {\n // Check for the existance of inbound data obj to figure out the trip type\n const tripType = getTripTypeFromBounds(cart.bounds);\n const totalAmount = cart.prices.unpaid.total.total.totalAmount;\n const points = cart.prices.unpaid.total.total.totalPoints?.amount;\n\n const total: Amount = toAmount(totalAmount);\n\n this.pushEventToDataLayer(GtmEvent.FLIGHT_CART_CHECKOUT, {\n tripType,\n offer: mapToOldGtmOffer(cart),\n total,\n points: points ?? NOT_SET,\n purchaseFlow,\n });\n }\n\n siteSearch(event: SiteSearchEvents, query: string, results: number, pageNumber: number, clickUrl?: string): void {\n const langObj = getGtmLangAndPointOfSale(this.languageService.langValue);\n\n if (clickUrl) {\n this.pushEventToDataLayer(\n GtmEvent.SITE_SEARCH_CLICKED,\n Object.assign(langObj, {\n event,\n query,\n results,\n pageNumber,\n clickUrl,\n })\n );\n } else {\n this.pushEventToDataLayer(\n GtmEvent.SITE_SEARCH,\n Object.assign(langObj, {\n event,\n query,\n results,\n pageNumber,\n })\n );\n }\n }\n\n preFlightSearch(params: PreFlightSearchParams): void {\n this.pushEventToDataLayer(GtmEvent.PRE_FLIGHT_SEARCH, {\n origin: params.flights[0].origin,\n destination: params.flights[0].destination,\n start: params.flights[0].departureDate?.toString(),\n end: params.flights.length > 1 ? params.flights[1].departureDate.toString() : undefined,\n tripType: getTripTypeForFlightSearchParams(params.flights),\n travelClass: params.travelClass,\n passengers: {\n adults: params.paxAmount.adults,\n children: params.paxAmount.children + params.paxAmount.c15s,\n infants: params.paxAmount.infants,\n },\n searchType: params.isAward ? SearchType.AWARD : SearchType.BOOKING_FLOW,\n totalPax: Object.values(params.paxAmount).reduce((total, val) => total + val, 0),\n dates: combineFlightDates(params.flights),\n all_locations: combineOriginDestination(params.flights),\n amountOfBounds: params.flights.length,\n } as GtmFlightSearchData);\n }\n\n flightSearch(params: OfferListFetchParams, locations: LocationsMap): void {\n const departureDate =\n (params.flights.length > 2 && params.flights.at(-1).departureDate.toString()) ||\n (params.flights.length > 1 && params.flights[1].departureDate.toString()) ||\n undefined;\n\n const flightSearchEvent = this.addUrlContextToLayerEvent<GtmFlightSearchData>(URLState.PREVIOUS, {\n origin: params.flights[0].origin,\n destination: params.flights[params.flights.length > 2 ? params.flights.length - 1 : 0].destination,\n start: params.flights[0].departureDate?.toString(),\n end: departureDate,\n tripType: getTripTypeForFlightSearchParams(params.flights),\n travelClass: mapCabinToTravelClass(params.cabin),\n passengers: {\n adults: params.paxAmount.adults,\n children: params.paxAmount.children + params.paxAmount.c15s,\n infants: params.paxAmount.infants,\n },\n searchType: params.isAward ? SearchType.AWARD : SearchType.BOOKING_FLOW,\n totalPax: Object.values(params.paxAmount).reduce((total, val) => total + val, 0),\n dates: combineFlightDates(params.flights),\n all_locations: combineOriginDestination(params.flights),\n amountOfBounds: params.flights.length,\n haulType: this.getHaulType(params.flights, locations),\n });\n\n this.pushEventToDataLayer(GtmEvent.FLIGHT_SEARCH, flightSearchEvent);\n }\n\n multicityTicketTypeOptions(cabin: Cabin, ticketTypeOptions: GTtmMulticityTicketTypeOptions): void {\n this.subscriptions.add(\n this.getGtmPath(this.router.url).subscribe((gtmPath: GtmPath) =>\n this.pushEventToDataLayer(GtmEvent.UI_EVENT, {\n action: ElementActions.CLICK,\n language: this.languageService.langValue,\n pagePath: `${getGtmUrlWithoutLocale(gtmPath.basePath, this.languageService.langValue)}${gtmPath.queryString}`,\n context: GaContext.FLIGHT_SELECTION,\n id: 'multicity-ticket-type-options',\n state: 'searched-' + mapCabinToTravelClass(cabin),\n economy: ticketTypeOptions?.economy || '',\n ecopremium: ticketTypeOptions?.ecopremium || '',\n business: ticketTypeOptions?.business || '',\n } as GTtmMulticityTicketTypeOptions)\n )\n );\n }\n\n /**\n * Error Event\n * @param type AirOffersStatusToText\n * @param flights FlightSegment[]\n */\n errorEvent(type: string, flights?: FlightSegment[]): void {\n this.subscriptions.add(\n this.getGtmPath(this.router.url).subscribe((gtmPath: GtmPath) =>\n this.pushEventToDataLayer(GtmEvent.ERROR, {\n path: `${getGtmUrlWithoutLocale(gtmPath.basePath, this.languageService.langValue)}`,\n type,\n ...(isPresent(flights) && { all_locations: combineOriginDestination(flights) }),\n ...(isPresent(flights) && { dates: combineFlightDates(flights) }),\n })\n )\n );\n }\n\n private addUrlContextToLayerEvent = <T>(urlState: URLState, event: T): T & Partial<GTMURLContext> => {\n const context = this.urlContext?.[urlState] ?? {};\n return { ...event, ...context };\n };\n\n private nativeAppSessionEvent(system: MobileOsType) {\n this.pushEventToDataLayer(GtmEvent.NATIVEAPP_SESSION, {\n system,\n isInsideNativeApp: this.nativeBridgeService.isInsideNativeWebView,\n });\n }\n\n private purchaseTransactionForGA4(\n order: FinnairOrder,\n purchaseFlow: GtmPurchaseFlow,\n discountCode: string = undefined\n ): void {\n this.resetEcommerceGA4();\n\n const pricesTotal =\n purchaseFlow === GtmPurchaseFlow.MANAGE_BOOKING\n ? getLastPaidPrices(order)?.total?.total\n : order.prices.included?.total?.total;\n\n const price =\n purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE\n ? (pricesTotal?.balance?.amount ?? '0')\n : pricesTotal?.totalAmount.amount;\n\n const ecomNew: GA4PurchaseData = {\n transaction_id: `${order.otherInformation.analyticsToken}_${TzDate.now().toISOString()}`,\n affiliation: getAffiliation(purchaseFlow),\n value: parseFloat(price) || 0,\n tax: parseFloat(purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? '0' : pricesTotal?.totalTax?.amount) || 0,\n shipping:\n parseFloat(purchaseFlow === GtmPurchaseFlow.VOLUNTARY_CHANGE ? '0' : pricesTotal?.totalFees?.amount) || 0,\n currency: pricesTotal?.totalAmount?.currencyCode || UNSET,\n items: getGA4Items(order, purchaseFlow),\n coupon: discountCode,\n };\n\n const dates = order.bounds\n .map((b) => new TzDate(b.departure.dateTime).toLocalDate().toString())\n .join('_') as CombinedDateString;\n\n const allLocations = order.bounds.map((b) => `${b.departure.locationCode}-${b.arrival.locationCode}`).join('_');\n\n const totalPoints = pricesTotal?.totalPoints?.amount;\n const purchaseEvent: GA4PurchaseEvent = {\n event: GtmEvent.PURCHASE,\n dates,\n ...(totalPoints ? { points_used: 'true' } : {}),\n ...(totalPoints ? { points: parseFloat(totalPoints) } : {}),\n ecomNew,\n all_locations: allLocations,\n };\n\n this.dataLayer.push(purchaseEvent);\n }\n\n ecommercePurchaseEventGa4(eventData: GA4PurchaseEvent): void {\n this.resetEcommerceGA4();\n this.dataLayer.push(eventData);\n }\n\n ecommerceEventGA4(\n event:\n | GtmEvent.ADD_TO_CART\n | GtmEvent.REMOVE_FROM_CART\n | GtmEvent.VIEW_CART\n | GtmEvent.BEGIN_CHECKOUT\n | GtmEvent.VIEW_ITEM_LIST\n | GtmEvent.SELECT_ITEM,\n products: GA4Product[]\n ): void {\n this.resetEcommerceGA4();\n this.dataLayer.push({\n event,\n ecomNew: {\n items: products,\n },\n });\n }\n\n resetEcommerceGA4() {\n // clear ecom event, trello 7153\n this.dataLayer.push({\n event: GtmEvent.CLEAR_ECOM,\n ecomNew: null,\n });\n }\n\n clickOutboundEvent(data: GtmClickOutboundData): void {\n this.pushEventToDataLayer(GtmEvent.CLICK_OUTBOUND, data);\n }\n\n private getHaulType(flights: FlightSegment[], locations: LocationsMap): string {\n enum HaulType {\n SHORT = 'short',\n LONG = 'long',\n }\n\n const tripType = getTripTypeForFlightSearchParams(flights);\n\n if (tripType === GtmTripType.MULTICITY || tripType === GtmTripType.OPENJAW) {\n return flights\n .reduce(\n (haulType: string, flight: FlightSegment) =>\n isShortHaulFlight(locations[flight.origin], locations[flight.destination])\n ? `${haulType}_${HaulType.SHORT}`\n : `${haulType}_${HaulType.LONG}`,\n ''\n )\n .substring(1);\n }\n\n return isShortHaulFlight(locations[flights[0].origin], locations[flights[0].destination])\n ? HaulType.SHORT\n : HaulType.LONG;\n }\n}\n","import { Injectable, OnDestroy, Renderer2, RendererFactory2 } from '@angular/core';\n\nimport { buffer, fromEvent, map, mergeAll, Observable, Subject, Subscription, withLatestFrom } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { Store } from '@ngrx/store';\n\nimport {\n ConsentTextId,\n DataCloudFlightSelection,\n DataCloudFlightSelectionData,\n DataCloudIdentityData,\n OfferListFetchParams,\n PreFlightSearchParams,\n} from '@fcom/common';\nimport { DataCloudService } from '@fcom/common/datacloud';\nimport { ConsentService } from '@fcom/common/login';\nimport { combineOriginDestination, getTripTypeForFlightSearchParams } from '@fcom/common/utils/gtm.utils';\nimport { AppState, ConfigService, unsubscribe, WindowRef } from '@fcom/core';\nimport { profile } from '@fcom/core/selectors';\nimport { Profile } from '@fcom/core-api/login';\nimport { BoundType } from '@fcom/dapi';\nimport { finShare } from '@fcom/rx';\n\nimport { mapCabinToTravelClass } from './client-gtm.service';\n\ninterface SalesforceEvent {\n name: SalesforceEventName;\n type: SalesforceEventName;\n additionalData: SalesforceEventData;\n}\n\nenum SalesforceEventName {\n PRE_FLIGHT_SEARCH = 'preFlightSearch',\n FLIGHT_SEARCH = 'flightSearch',\n FLIGHT_SELECTION_SELECT_OUTBOUND = 'flightSelectionSelect_outbound',\n FLIGHT_SELECTION_SELECT_INBOUND = 'flightSelectionSelect_inbound',\n IDENTITY = 'identity',\n PASSENGER_IDENTITY = 'passengerIdentity',\n MMB_IDENTITY = 'mmbIdentity',\n SIGNUP_IDENTITY = 'signupIdentity',\n SUBSCRIBER_ID_IDENTITY = 'subscriberIdIdentity',\n PURCHASE = 'purchase',\n}\n\ntype SalesforceEventData =\n | SalesforceFlightSearchData\n | SalesforcePreFlightSearchData\n | SalesforceOutboundFlightSelectionData\n | SalesforceInboundFlightSelectionData\n | SalesforceIdentityData\n | SalesforcePassengerIdentityData\n | SalesforceMMBIdentityData\n | SalesforceSignupIdentityData\n | SalesforceSubscriberIdData\n | SalesforcePurchaseData;\n\ntype addPrefixToType<T, P extends string> = {\n [K in keyof T as K extends string ? `${P}${K}` : never]: T[K];\n};\n\ninterface SalesforceFlightSearchData {\n origin: string;\n destination: string;\n start: string;\n end: string;\n tripType: string;\n travelClass: string;\n passengers: number;\n adults: number;\n children: number;\n infants: number;\n alllocations: string;\n}\n\ntype SalesforcePreFlightSearchData = addPrefixToType<SalesforceFlightSearchData, 'preFlightSearch'>;\n\ninterface SalesforceFlightSelectionData {\n aircraft: string;\n flightNumber: string;\n fareFamilyName: string;\n price: number;\n points: string;\n currencyCode: string;\n travelClass: string;\n boundType: string;\n route: string;\n paxAmount: number;\n purchaseFlow: string;\n}\n\ntype SalesforceOutboundFlightSelectionData = addPrefixToType<SalesforceFlightSelectionData, 'outbound'>;\n\ntype SalesforceInboundFlightSelectionData = addPrefixToType<SalesforceFlightSelectionData, 'inbound'>;\n\ntype SalesforceBoundFlightSelectionData = SalesforceOutboundFlightSelectionData | SalesforceInboundFlightSelectionData;\n\ninterface SalesforceIdentityData {\n firstName: string;\n lastName: string;\n emailAddress: string;\n countryCode: string;\n phoneNumber: string;\n memberProgram: string;\n memberNumber: string;\n}\n\ntype SalesforcePassengerIdentityData = addPrefixToType<SalesforceIdentityData, 'passenger'>;\n\ntype SalesforceMMBIdentityData = addPrefixToType<SalesforceIdentityData, 'mmb'>;\n\ntype SalesforceSignupIdentityData = addPrefixToType<SalesforceIdentityData, 'signup'>;\n\ninterface SalesforceSubscriberIdData {\n subscriberId: string;\n}\n\ninterface SalesforcePurchaseData {\n purchaseDone: number;\n}\n\ninterface SalesforceInteractions {\n sendCustomEvent(event: SalesforceEvent): void;\n sendIdentityEvent(data: SalesforceEventData): void;\n sendPassengerIdentityEvent(data: SalesforceEventData): void;\n sendMmbIdentityEvent(data: SalesforceEventData): void;\n sendSignupIdentityEvent(data: SalesforceEventData): void;\n sendSubscriberIdIdentityEvent(data: SalesforceEventData): void;\n}\n\n@Injectable()\nexport class ClientDataCloudService extends DataCloudService implements OnDestroy {\n private renderer: Renderer2;\n private scriptReady$: Observable<unknown>;\n private consents$: Observable<boolean>;\n private events$: Subject<[SalesforceEventName, SalesforceEventData]> = new Subject<\n [SalesforceEventName, SalesforceEventData]\n >();\n private salesforceInteractions: SalesforceInteractions;\n\n private subscriptions = new Subscription();\n\n constructor(\n private store$: Store<AppState>,\n private consentService: ConsentService,\n private windowRef: WindowRef,\n rendererFactory: RendererFactory2,\n configService: ConfigService\n ) {\n super();\n\n if (configService.cfg.enableSalesforceDataCloud) {\n this.consents$ = this.consentService\n .getCookieConsentStatusById(ConsentTextId.COOKIE_PERSONALIZATION)\n .pipe(finShare());\n\n // Services cannot have Renderer2 directly injected (only Components can) so we need to create it explicitly\n this.renderer = rendererFactory.createRenderer(null, null);\n\n this.injectScript(configService.cfg.salesforceDataCloudScriptSrcURL);\n\n this.subscriptions.add(\n this.scriptReady$.subscribe(() => {\n this.salesforceInteractions = this.windowRef.nativeWindow['SalesforceInteractions'];\n })\n );\n\n this.subscriptions.add(\n this.store$.pipe(profile(), take(1)).subscribe((memberProfile: Profile) => {\n this.queueEventToDataCloud(SalesforceEventName.IDENTITY, {\n countryCode: memberProfile.parsedMobilePhone?.countryCode?.toString(),\n emailAddress: memberProfile.email,\n firstName: memberProfile.firstname,\n lastName: memberProfile.lastname,\n memberNumber: memberProfile.memberNumber,\n memberProgram: memberProfile.memberNumber ? 'AY' : undefined,\n phoneNumber: memberProfile.parsedMobilePhone?.nationalNumber?.toString(),\n });\n })\n );\n\n // We need to buffer events until the data cloud script has loaded, and until something is said about consents\n // Before the script has loaded and consents are set, events are buffered into an array\n // After the script has loaded and consents have been set, the buffer is flushed\n // Any subsequent events flush immediately from the buffer\n // After that, there is still the check that consent has been given (if not, then nothing is sent to data cloud)\n // It should be noted that to avoid a memory leak, the buffer should be flushed as soon as possible\n this.subscriptions.add(\n this.events$\n .pipe(\n buffer(this.events$.pipe(withLatestFrom(this.scriptReady$, this.consents$))),\n mergeAll(),\n withLatestFrom(this.consents$),\n filter(([, consent]) => consent),\n map(([event]) => event)\n )\n .subscribe(([name, data]) => {\n this.sendEventToDataCloud(name, data);\n })\n );\n }\n }\n\n injectScript(src: string): void {\n const script: HTMLScriptElement = this.renderer.createElement('script');\n script.type = 'text/javascript';\n script.src = src;\n this.renderer.appendChild(document.body, script);\n\n this.scriptReady$ = fromEvent(script, 'load').pipe(finShare());\n }\n\n ngOnDestroy(): void {\n unsubscribe(this.subscriptions);\n }\n\n preFlightSearch(params: PreFlightSearchParams): void {\n this.queueEventToDataCloud(SalesforceEventName.PRE_FLIGHT_SEARCH, {\n preFlightSearchorigin: params.flights[0].origin,\n preFlightSearchdestination: params.flights[0].destination,\n preFlightSearchstart: params.flights[0].departureDate?.toString(),\n preFlightSearchend: (params.flights.length > 1 ? params.flights.at(-1).departureDate : undefined)?.toString(),\n preFlightSearchtripType: getTripTypeForFlightSearchParams(params.flights).toString(),\n preFlightSearchtravelClass: params.travelClass.toString(),\n preFlightSearchadults: params.paxAmount.adults,\n preFlightSearchchildren: params.paxAmount.children + params.paxAmount.c15s,\n preFlightSearchinfants: params.paxAmount.infants,\n preFlightSearchpassengers: Object.values(params.paxAmount).reduce((total, val) => total + val, 0),\n preFlightSearchalllocations: combineOriginDestination(params.flights),\n });\n }\n\n flightSearch(params: OfferListFetchParams): void {\n this.queueEventToDataCloud(SalesforceEventName.FLIGHT_SEARCH, {\n origin: params.flights[0].origin,\n destination: params.flights[0].destination,\n start: params.flights[0].departureDate?.toString(),\n end: (params.flights.length > 1 ? params.flights.at(-1).departureDate : undefined)?.toString(),\n tripType: getTripTypeForFlightSearchParams(params.flights).toString(),\n travelClass: mapCabinToTravelClass(params.cabin).toString(),\n adults: params.paxAmount.adults,\n children: params.paxAmount.children + params.paxAmount.c15s,\n infants: params.paxAmount.infants,\n passengers: Object.values(params.paxAmount).reduce((total, val) => total + val, 0),\n alllocations: combineOriginDestination(params.flights),\n });\n }\n\n flightSelectionSelect(data: DataCloudFlightSelectionData[]): void {\n data\n .filter(\n (item: DataCloudFlightSelectionData) =>\n item.boundType === BoundType.outbound || item.boundType === BoundType.inbound\n )\n .forEach((item: DataCloudFlightSelectionData) => {\n const boundType: BoundType = item.boundType;\n const prefix: string = boundType;\n const additionalData: SalesforceBoundFlightSelectionData = {\n [prefix + DataCloudFlightSelection.AIRCRAFT]: item[DataCloudFlightSelection.AIRCRAFT],\n [prefix + DataCloudFlightSelection.FLIGHT_NUMBER]: item[DataCloudFlightSelection.FLIGHT_NUMBER],\n [prefix + DataCloudFlightSelection.FARE_FAMILY_NAME]: item[DataCloudFlightSelection.FARE_FAMILY_NAME],\n [prefix + DataCloudFlightSelection.PRICE]: item[DataCloudFlightSelection.PRICE]\n ? parseFloat(item[DataCloudFlightSelection.PRICE])\n : undefined,\n [prefix + DataCloudFlightSelection.POINTS]: item[DataCloudFlightSelection.POINTS],\n [prefix + DataCloudFlightSelection.CURRENCY_CODE]: item[DataCloudFlightSelection.CURRENCY_CODE],\n [prefix + DataCloudFlightSelection.TRAVEL_CLASS]: item[DataCloudFlightSelection.TRAVEL_CLASS],\n [prefix + DataCloudFlightSelection.BOUND_TYPE]: item[DataCloudFlightSelection.BOUND_TYPE],\n [prefix + DataCloudFlightSelection.ROUTE]: item[DataCloudFlightSelection.ROUTE],\n [prefix + DataCloudFlightSelection.PAX_AMOUNT]: item[DataCloudFlightSelection.PAX_AMOUNT]\n ? parseFloat(item[DataCloudFlightSelection.PAX_AMOUNT])\n : undefined,\n [prefix + DataCloudFlightSelection.PURCHASE_FLOW]: item[DataCloudFlightSelection.PURCHASE_FLOW],\n } as SalesforceBoundFlightSelectionData;\n const name: SalesforceEventName =\n boundType === BoundType.outbound\n ? SalesforceEventName.FLIGHT_SELECTION_SELECT_OUTBOUND\n : SalesforceEventName.FLIGHT_SELECTION_SELECT_INBOUND;\n this.queueEventToDataCloud(name, additionalData);\n });\n }\n\n paxDetails(data: DataCloudIdentityData): void {\n this.queueEventToDataCloud(SalesforceEventName.PASSENGER_IDENTITY, {\n passengerfirstName: data.firstName,\n passengerlastName: data.lastName,\n passengeremailAddress: data.emailAddress,\n passengercountryCode: data.countryCode?.replace(/^.*\\|/, ''),\n passengerphoneNumber: data.phoneNumber,\n passengermemberProgram: data.memberProgram,\n passengermemberNumber: data.memberNumber,\n });\n }\n\n mmbPaxDetails(data: DataCloudIdentityData): void {\n this.queueEventToDataCloud(SalesforceEventName.MMB_IDENTITY, {\n mmbfirstName: data.firstName,\n mmblastName: data.lastName,\n mmbemailAddress: data.emailAddress,\n mmbcountryCode: data.countryCode,\n mmbphoneNumber: data.phoneNumber,\n mmbmemberProgram: data.memberProgram,\n mmbmemberNumber: data.memberNumber,\n });\n }\n\n signupPaxDetails(data: DataCloudIdentityData): void {\n this.queueEventToDataCloud(SalesforceEventName.SIGNUP_IDENTITY, {\n signupfirstName: data.firstName,\n signuplastName: data.lastName,\n signupemailAddress: data.emailAddress,\n signupcountryCode: data.countryCode,\n signupphoneNumber: data.phoneNumber,\n signupmemberProgram: data.memberProgram,\n signupmemberNumber: data.memberNumber,\n });\n }\n\n subscriberId(subscriberId: string): void {\n this.queueEventToDataCloud(SalesforceEventName.SUBSCRIBER_ID_IDENTITY, { subscriberId });\n }\n\n completePurchase(): void {\n this.queueEventToDataCloud(SalesforceEventName.PURCHASE, {\n purchaseDone: 1,\n });\n }\n\n queueEventToDataCloud(name: SalesforceEventName, data: SalesforceEventData): void {\n this.events$.next([name, data]);\n }\n\n sendEventToDataCloud(name: SalesforceEventName, data: SalesforceEventData): void {\n switch (name) {\n case SalesforceEventName.IDENTITY:\n this.salesforceInteractions.sendIdentityEvent(data);\n break;\n case SalesforceEventName.PASSENGER_IDENTITY:\n this.salesforceInteractions.sendPassengerIdentityEvent(data);\n break;\n case SalesforceEventName.MMB_IDENTITY:\n this.salesforceInteractions.sendMmbIdentityEvent(data);\n break;\n case SalesforceEventName.SIGNUP_IDENTITY:\n this.salesforceInteractions.sendSignupIdentityEvent(data);\n break;\n case SalesforceEventName.SUBSCRIBER_ID_IDENTITY:\n this.salesforceInteractions.sendSubscriberIdIdentityEvent(data);\n break;\n default:\n this.salesforceInteractions.sendCustomEvent({\n type: name,\n name: name,\n additionalData: data,\n });\n break;\n }\n }\n}\n","import { HTTP_INTERCEPTORS } from '@angular/common/http';\n\nimport {\n AwsApiGwInterceptor,\n ClientNativeBridgeService,\n FormPostService,\n StateTransferService,\n WINDOW_PROVIDERS,\n WithCredentialsInterceptor,\n} from '@fcom/core';\nimport {\n ConfigService,\n CookieService,\n GeolocationService,\n LocationRouteCffService,\n NativeBridgeService,\n TimeAndGeoipProvider,\n TimeService,\n} from '@fcom/core/services';\nimport { CmsLocalizationProvider } from '@fcom/core/services/language/cms-localization.provider';\nimport { LocalizationProvider } from '@fcom/core/services/language/localization.provider';\nimport { DataCloudService } from '@fcom/common/datacloud';\nimport { GtmService } from '@fcom/common/gtm';\nimport { LoginTokenInterceptor } from '@fcom/common/login/interceptors';\nimport { DatadogHeadersInterceptor } from '@fcom/common/interceptors/datadog-headers.interceptor';\nimport {\n BreadcrumbService,\n HotjarService,\n NavigatedPathToContentWrapperService,\n NavigationMenuService,\n PageMetaService,\n PriceCalendarService,\n SchemaService,\n ScrollService,\n} from '@fcom/common/services';\nimport { DapiUatInterceptor } from '@fcom/core/interceptors/dapi-uat-interceptor';\nimport { ErrorInterceptor } from '@fcom/core/interceptors/error.interceptor';\nimport { CampaignBannerService } from '@fcom/common/services/campaign-banner/campaign-banner.service';\nimport { FeedbackService } from '@fcom/common/services/feedback/feedback.service';\nimport { DapiHeadersInterceptor } from '@fcom/core/interceptors/dapi-headers-interceptor';\nimport { TierBenefitService } from '@fcom/core/services/tier-benefit/tier-benefit.service';\n\nimport { ClientDataCloudService } from '../services/client-datacloud.service';\nimport { ClientGtmService } from '../services/client-gtm.service';\n\nexport const INTERCEPTOR_PROVIDERS: any[] = [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: AwsApiGwInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: WithCredentialsInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: LoginTokenInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: DapiUatInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: DapiHeadersInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: ErrorInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: DatadogHeadersInterceptor,\n multi: true,\n },\n];\n\nexport const WEB_SERVICE_PROVIDERS: any[] = [\n CookieService,\n GeolocationService,\n ScrollService,\n TimeAndGeoipProvider,\n TimeService,\n { provide: DataCloudService, useClass: ClientDataCloudService },\n { provide: GtmService, useClass: ClientGtmService },\n ...WINDOW_PROVIDERS,\n];\n\nexport const COMMON_SERVICE_PROVIDERS: any[] = [\n ConfigService,\n TierBenefitService,\n FormPostService,\n LocationRouteCffService,\n { provide: NativeBridgeService, useClass: ClientNativeBridgeService },\n NavigationMenuService,\n PageMetaService,\n StateTransferService,\n BreadcrumbService,\n NavigatedPathToContentWrapperService,\n { provide: LocalizationProvider, useClass: CmsLocalizationProvider },\n CampaignBannerService,\n FeedbackService,\n HotjarService,\n SchemaService,\n PriceCalendarService,\n];\n","import { APP_BASE_HREF, CommonModule, Location } from '@angular/common';\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\nimport { APP_ID, NgModule, PLATFORM_ID } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { provideClientHydration } from '@angular/platform-browser';\n\nimport { StoreRouterConnectingModule } from '@ngrx/router-store';\nimport { Store } from '@ngrx/store';\n\nimport { baseUrl } from '@finnairoyj/fcom-ui-styles';\n\nimport { IconsModule } from '@fcom/ui-components';\nimport { LanguageService, UiTranslateModule } from '@fcom/ui-translate';\nimport { ChatModule } from '@fcom/chat';\nimport { ComponentsModule } from '@fcom/common/components';\nimport { CookiePolicyModule } from '@fcom/common/components/cookie-policy/cookie-policy.module';\nimport { PipesModule } from '@fcom/common/pipes/pipes.module';\nimport { AppState, ConfigService, CookieService, SentryLogger } from '@fcom/core';\nimport { FinLanguageService } from '@fcom/core/services/language/language.service';\nimport { LocalizationProvider } from '@fcom/core/services/language/localization.provider';\nimport { StateTreeModule } from '@fcom/core/store';\nimport { PersonalizationModule } from '@fcom/loyalty-personalization/personalization.module';\nimport { CommonStoreModule } from '@fcom/common/store';\nimport { CommonBookingStoreModule } from '@fcom/common-booking/store';\n\nimport { RouteModule } from './app.routes';\nimport { COMMON_SERVICE_PROVIDERS, INTERCEPTOR_PROVIDERS, WEB_SERVICE_PROVIDERS } from './providers';\n\nconst disableAnimations =\n typeof window === 'undefined'\n ? true\n : !('animate' in document.documentElement) ||\n (navigator && /iPhone OS (8|9|10|11|12|13)_/.test(navigator.userAgent));\n\nexport function languageServiceFactory(\n store: Store<AppState>,\n cookieService: CookieService,\n localizationProvider: LocalizationProvider,\n configService: ConfigService,\n sentryLogger: SentryLogger,\n location: Location,\n platform: object\n) {\n return new FinLanguageService(\n store,\n cookieService,\n localizationProvider,\n configService,\n sentryLogger,\n location,\n platform\n );\n}\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n StateTreeModule,\n // Application modules\n PipesModule.forRoot(),\n ComponentsModule,\n CookiePolicyModule,\n // Routes\n RouteModule,\n StoreRouterConnectingModule.forRoot(),\n IconsModule.forRoot({ baseUrl }),\n UiTranslateModule.forRoot({\n languageService: {\n provide: LanguageService,\n useFactory: languageServiceFactory,\n deps: [Store, CookieService, LocalizationProvider, ConfigService, SentryLogger, Location, PLATFORM_ID],\n },\n }),\n BrowserAnimationsModule.withConfig({ disableAnimations }),\n ChatModule,\n PersonalizationModule.forClient(),\n CommonStoreModule,\n CommonBookingStoreModule,\n ],\n providers: [\n provideClientHydration(),\n { provide: APP_ID, useValue: 'fcom-ux' },\n ...COMMON_SERVICE_PROVIDERS,\n ...WEB_SERVICE_PROVIDERS,\n ...INTERCEPTOR_PROVIDERS,\n { provide: APP_BASE_HREF, useValue: '/' },\n provideHttpClient(withInterceptorsFromDi()),\n ],\n})\nexport class AppModule {}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable, NgZone, OnDestroy } from '@angular/core';\n\nimport { Store } from '@ngrx/store';\nimport { Observable, of, Subject, Subscription } from 'rxjs';\nimport { catchError, map, share, switchMap, take, tap, timeout } from 'rxjs/operators';\n\nimport { BookingAndAppState } from '@fcom/common/interfaces/booking';\nimport {\n CasFlowLoginResponseCustomData,\n CasFlowLostPasswordResponse,\n CasFlowResponse,\n CasLoginResponse,\n CasProfileResponse,\n IframeLoginPostMessage,\n LoginPhaseError,\n LoginPhaseProfile,\n LoginPostMessage,\n LoginResponse,\n LoginStep,\n PostLostPasswordBy,\n ProfileRequestCache,\n ProfileRequestType,\n WebViewLoginPostMessage,\n} from '@fcom/core-api/login';\nimport { LoginActions } from '@fcom/core/actions';\nimport { WindowRef } from '@fcom/core/providers';\nimport { ConfigService, NativeBridgeService, SentryLogger, StorageService } from '@fcom/core/services';\nimport { PersonalizationTrackingService } from '@fcom/loyalty-personalization';\nimport { finShare, retryWithBackoff, safeMap, snapshot } from '@fcom/rx';\nimport { buildUrl, mapError, serializeParams, unsubscribe } from '@fcom/core/utils';\nimport {\n createRedirectUrl,\n LoginService,\n parseProfile,\n RedirectToLoginParams,\n RedirectUrlParameters,\n secureRandomString,\n} from '@fcom/common/login';\nimport { ddsLanguage, locale, loginPhase } from '@fcom/core/selectors';\nimport { DdsCasAdditionalParams, DdsCasRedirectParams, DdsPageType } from '@fcom/core/interfaces';\n\nconst isIframeMessage = (o: LoginPostMessage): o is IframeLoginPostMessage => !!o && o.eventType === 'loginSuccess';\nconst isWebViewMessage = (o: LoginPostMessage): o is WebViewLoginPostMessage =>\n !!o && (o.eventType === 'mobileAppLoginSuccess' || o.eventType === 'mobileAppGuestLogin');\n\nconst isSuccessResponse = (o: any): o is LoginResponse => !!o && o.profile && o.profile.partStatus;\n\nconst LOGIN_INIT_PATH = '/init';\nconst LOGOUT_INIT_PATH = '/logout';\n\nconst enum DisplayPath {\n LOGIN = 'login/finnair-plus',\n FORGOT_PASSWORD = 'login/finnair-plus/forgot-password',\n CORPORATE_LOGIN = 'login/corporate',\n JOIN = 'join/finnair-plus',\n SIMPLIFIED_LOGIN = 'login/simplified/finnair',\n}\n\nconst enum SsoState {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n}\n\ntype SsoStateResponse = {\n state: SsoState;\n};\n\nconst CAS_ROUTES = {\n '2fa/gauth': LoginStep.TWO_FACTOR_CODE,\n '2fa/gauth-otp': LoginStep.TWO_FACTOR_PHONE,\n '2fa/sms-auth': LoginStep.TWO_FACTOR_SMS,\n '2fa/email-auth': LoginStep.TWO_FACTOR_EMAIL,\n 'account-locked': LoginStep.LOCKED,\n};\n\n@Injectable()\nexport class ClientLoginService extends LoginService implements OnDestroy {\n /**\n * Triggers the login/init functionality with nonce as the value of the subject.\n * @type {Subject<string>}\n */\n private readonly initLoginTrigger$: Subject<string> = new Subject<string>();\n\n /**\n * The cryptographically secure nonce that is used for heightened trust in\n * app <-> login iframe <-> CAS communication\n */\n private nonce: string;\n\n /**\n * For debugging purposes only\n */\n private loginCount = 0;\n private timeoutHandle: ReturnType<typeof setTimeout>;\n private crypto: Crypto;\n\n private subscription = new Subscription();\n\n constructor(\n private sentryLogger: SentryLogger,\n private store$: Store<BookingAndAppState>,\n private http: HttpClient,\n private configService: ConfigService,\n private windowRef: WindowRef,\n private ngZone: NgZone,\n private storageService: StorageService,\n private nativeBridgeService: NativeBridgeService,\n private personalizationTrackingService: PersonalizationTrackingService\n ) {\n super();\n this.crypto = this.windowRef.nativeWindow['crypto'] || this.windowRef.nativeWindow['msCrypto'];\n }\n\n initSsoLoginSession(): void {\n if (this.nativeBridgeService.isInsideNativeWebView && !this.nativeBridgeService.isLocalView) {\n // Mobile app login flow handled without the CAS SSO session. Allow local mimic to use normal login feature\n return;\n }\n\n this.loginCount++;\n const nonce = secureRandomString(this.crypto);\n this.nonce = nonce;\n this.subscription.add(\n this.isLoggedInSsoSession()\n .pipe(take(1))\n .subscribe((b) => {\n if (!b) {\n this.store$.dispatch(LoginActions.setNotLoggedIn());\n } else {\n this.initLoginTrigger$.next(nonce);\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n handleLoginEvent(loginMessage: LoginPostMessage): void {\n if (isIframeMessage(loginMessage)) {\n this.handleIframeMessage(loginMessage);\n } else if (isWebViewMessage(loginMessage)) {\n this.handleWebViewMessage(loginMessage);\n }\n // loginMessage is some other window.postMessage and not intended for us\n }\n\n get storedNonce(): string {\n return this.nonce;\n }\n\n get loginTrigger$(): Observable<string> {\n return this.initLoginTrigger$.asObservable();\n }\n\n redirectToLogin(params?: RedirectToLoginParams): void {\n this.redirectToUrl(params);\n }\n\n redirectToForgotPassword(params?: RedirectToLoginParams): void {\n this.redirectToUrl(params, DisplayPath.FORGOT_PASSWORD);\n }\n\n redirectToCorporateLogin(params?: RedirectToLoginParams): void {\n this.redirectToUrl(params, DisplayPath.CORPORATE_LOGIN);\n }\n\n redirectToJoin(params?: RedirectToLoginParams): void {\n this.redirectToUrl(params, DisplayPath.JOIN);\n }\n\n redirectToSimplifiedLogin(params?: RedirectToLoginParams): void {\n this.redirectToUrl(params, DisplayPath.SIMPLIFIED_LOGIN);\n }\n\n createChangePasswordUrl(memberNumber: string): string {\n const location = this.windowRef.nativeWindow.location;\n const p = {\n returnUrl: location.href,\n userId: memberNumber,\n lang: snapshot(this.store$.pipe(locale())),\n };\n const serializedParams = serializeParams(p);\n const changePasswordURL = `https://${this.configService.cfg.casHost}/content/${p.lang}/change-password/`;\n return [changePasswordURL, '?', serializedParams].join('');\n }\n\n logout(params?: RedirectToLoginParams): void {\n this.storageService.SESSION.clear();\n this.personalizationTrackingService.clearSession();\n this.redirectToPathWithParams(LOGOUT_INIT_PATH, { ...params });\n }\n\n isLoggedInSsoSession(): Observable<boolean> {\n return this.http\n .get<SsoStateResponse>(`https://${this.configService.cfg.casHost}/cas/ssoStatus`, { withCredentials: true })\n .pipe(\n timeout(2500),\n retryWithBackoff(3),\n map((res: SsoStateResponse) => res.state === SsoState.ACTIVE),\n take(1),\n catchError(() => of(false)),\n share()\n );\n }\n\n getRedirectUrlToMmbWithCasLoginFederation(additionalParams?: DdsCasAdditionalParams): string {\n const betaLocale = snapshot(this.store$.pipe(locale()));\n const ddsLang = snapshot(this.store$.pipe(ddsLanguage()));\n\n const ddsParams: DdsCasRedirectParams = {\n PAGE: DdsPageType.responsiveDeepLink,\n LANGUAGE: ddsLang.language,\n COUNTRY_SITE: ddsLang.countrySite,\n ...additionalParams,\n };\n return `https://${this.configService.cfg.casHost}/cas/oauth2.0/authorize?lang=${betaLocale}&client_id=${\n this.configService.cfg.casClientIdDds\n }&redirect_uri=${encodeURIComponent(buildUrl(this.configService.cfg.ddsServerUrl, ddsParams))}`;\n }\n\n login(user: string, password: string, rememberMe = false): void {\n const body = new URLSearchParams();\n body.set('username', user);\n body.set('password', password);\n body.set('rememberMe', (rememberMe ?? false).toString());\n\n this.subscription.add(\n this.getExecutionToken()\n .pipe(\n take(1),\n switchMap((token) => {\n if (token) {\n body.set('_eventId', 'submit');\n this.store$.dispatch(LoginActions.setLoginPhaseExecutionToken({ token: token }));\n return this.executeLoginCasFlowAction(body);\n } else {\n return of(LoginPhaseError.LOGIN_FAILED);\n }\n }),\n catchError(() => of(LoginPhaseError.LOGIN_FAILED))\n )\n .subscribe((loginPhaseError) => {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: loginPhaseError }));\n })\n );\n }\n /**\n * redirectToUrl is generic method for redirection\n * @param params RedirectToLoginParams\n * @param display is enum used for different pre-selection on cas portal\n */\n private redirectToUrl(params?: RedirectToLoginParams, display?: DisplayPath): void {\n const additionalParams = this.getRedirectUrlParams(params?.redirectPath, display);\n if (params?.shouldLogoutFirst) {\n const uxAuthUrl = `${this.configService.cfg.apiBaseUrl}${this.configService.cfg.uxAuthBasePath}`;\n this.logout({\n redirectPath: createRedirectUrl(\n this.windowRef.nativeWindow.location,\n uxAuthUrl,\n LOGIN_INIT_PATH,\n additionalParams\n ),\n });\n } else {\n this.redirectToPathWithParams(LOGIN_INIT_PATH, additionalParams);\n }\n }\n\n login2fa(code: string, submitPin = false): void {\n const body = new URLSearchParams();\n body.set('token', code);\n body.set('_eventId', submitPin ? 'submitPIN' : 'submit');\n\n this.subscription.add(\n this.executeLoginCasFlowAction(body).subscribe((loginPhaseError) => {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: loginPhaseError }));\n })\n );\n }\n\n resend2faEmail(): Observable<LoginPhaseError | undefined> {\n const body = new URLSearchParams();\n body.set('_eventId', 'retry');\n\n return this.executeLoginCasFlowAction(body).pipe(\n tap((loginPhaseError) => {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: loginPhaseError }));\n })\n );\n }\n\n requestSMS(): void {\n const body = new URLSearchParams();\n body.set('_eventId', 'pinpassword');\n\n this.subscription.add(\n this.executeLoginCasFlowAction(body).subscribe((loginPhaseError) => {\n this.store$.dispatch(LoginActions.setLoginPhaseError({ error: loginPhaseError }));\n })\n );\n }\n\n postLostPassword(\n postLostPasswordBy: PostLostPasswordBy,\n member: string,\n lastName: string\n ): Observable<CasFlowLostPasswordResponse> {\n return this.getExecutionToken().pipe(\n switchMap((initExecutionToken) => {\n const getLostPasswordStateBody = new URLSearchParams();\n getLostPasswordStateBody.set('_eventId', 'lostPassword');\n getLostPasswordStateBody.set('execution', initExecutionToken);\n return this.postLostPasswordHelper(getLostPasswordStateBody);\n }),\n switchMap((lostPasswordStateExecutionToken) => {\n const postLostPasswordBody = new URLSearchParams();\n postLostPasswordBody.set('_eventId', 'submitDetails');\n postLostPasswordBody.set('username', member);\n postLostPasswordBody.set('lastname', lastName);\n postLostPasswordBody.set('communicationMethod', postLostPasswordBy);\n postLostPasswordBody.set('execution', lostPasswordStateExecutionToken.execution);\n\n return this.postLostPasswordHelper(postLostPasswordBody);\n })\n );\n }\n\n private postLostPasswordHelper(body: URLSearchParams): Observable<CasFlowLostPasswordResponse> {\n return this.http.post<CasFlowLostPasswordResponse>(\n `https://${this.configService.cfg.casHost}/cas/login`,\n body.toString(),\n {\n withCredentials: true,\n headers: new HttpHeaders({\n 'Content-Type': 'application/x-www-form-urlencoded',\n }),\n }\n );\n }\n\n /**\n * getRedirectUrlParams\n * @param redirectPath RedirectUrlParameters\n * @param display whether to pre-select cas page\n * @returns RedirectUrlParameters\n */\n private getRedirectUrlParams(redirectPath?: string, display?: DisplayPath): RedirectUrlParameters {\n return {\n lang: snapshot(this.store$.pipe(locale())),\n nonce: secureRandomString(this.crypto),\n ...(display && { display }),\n ...(redirectPath && { redirectPath }),\n };\n }\n\n /**\n * Redirect the browser window to the path retaining the origin.\n * Automatically adds the redirectPath parameter to default to current path if not given as parameter.\n *\n * @param {string} path the path to redirect to, e.g. `/fi-fi`\n * @param {{}} params additional query parameters for the redirect\n */\n private redirectToPathWithParams(path: string, params: Partial<RedirectUrlParameters>) {\n const uxAuthUrl = `${this.configService.cfg.apiBaseUrl}${this.configService.cfg.uxAuthBasePath}`;\n this.windowRef.nativeWindow.location.href = createRedirectUrl(\n this.windowRef.nativeWindow.location,\n uxAuthUrl,\n path,\n params\n );\n }\n\n private handleIframeMessage(loginMessage: IframeLoginPostMessage) {\n if (loginMessage.state !== this.nonce) {\n this.sentryLogger.warn('Login: Received nonce from iframe that did not match the stored nonce', {\n loginCount: this.loginCount,\n nonce: this.nonce,\n receivedNonce: loginMessage.state,\n });\n return;\n }\n const expiresInMs = parseInt(loginMessage.expires_in, 10) * 1000;\n this.dispatchSetToken(loginMessage.access_token, Date.now() + expiresInMs);\n this.triggerTokenRevalidation60SecondsBeforeExpiration(expiresInMs);\n this.fetchProfile();\n this.fetchCasProfile(loginMessage.access_token);\n }\n\n private handleWebViewMessage(loginMessage: WebViewLoginPostMessage) {\n if (loginMessage.eventType === 'mobileAppLoginSuccess') {\n this.dispatchSetToken(loginMessage.access_token, null);\n this.fetchProfile();\n this.fetchCasProfile(loginMessage.access_token);\n } else {\n this.store$.dispatch(LoginActions.setNotLoggedIn());\n }\n }\n\n private dispatchSetToken = (token: string, expiresAt: number) =>\n this.store$.dispatch(\n LoginActions.setAccessToken({\n accessToken: {\n token: token,\n expiresAt,\n },\n })\n );\n\n private triggerTokenRevalidation60SecondsBeforeExpiration(expiresInMs: number) {\n clearTimeout(this.timeoutHandle);\n this.ngZone.runOutsideAngular(() => {\n this.timeoutHandle = setTimeout(() => this.initSsoLoginSession(), expiresInMs - 60 * 1000);\n });\n }\n\n private fetchProfile() {\n this.subscription.add(\n this.http\n .post<CasLoginResponse>(\n this.configService.cfg.loyaltyServices.legacy.apiProfileUrl,\n {\n profileRequest: {\n type: ProfileRequestType.BASIC,\n cache: ProfileRequestCache.USE,\n },\n },\n {\n headers: new HttpHeaders({\n Accept: 'application/json',\n }),\n }\n )\n .pipe(take(1))\n .subscribe({\n next: (response: CasLoginResponse) => {\n if (isSuccessResponse(response)) {\n this.store$.dispatch(LoginActions.setProfile({ profile: parseProfile(response.profile) }));\n } else {\n this.store$.dispatch(LoginActions.setLoginError());\n this.sentryLogger.warn('Getting profile info after login failed', {\n response,\n });\n }\n },\n error: () => {\n this.store$.dispatch(LoginActions.setLoginError());\n },\n })\n );\n }\n\n private fetchCasProfile(accessToken: string): void {\n this.subscription.add(\n this.http\n .post<CasProfileResponse>(`https://${this.configService.cfg.casHost}/cas/oauth2.0/profile`, null, {\n params: {\n access_token: accessToken,\n },\n })\n .pipe(take(1))\n .subscribe((response) => {\n this.store$.dispatch(LoginActions.setCasProfile({ casProfile: response.attributes }));\n })\n );\n }\n\n private getExecutionToken(): Observable<string> {\n const redirectUrl = encodeURIComponent(this.windowRef.nativeWindow.location.href);\n const serviceParams = `client_id=${this.configService.cfg.casClientIdDds}&redirect_uri=${redirectUrl}&response_type=token&client_name=CasOAuthClient`;\n const service = encodeURIComponent(\n `https://${this.configService.cfg.casHost}/cas/oauth2.0/callbackAuthorize?${serviceParams}`\n );\n const url = `https://${this.configService.cfg.casHost}/cas/login?service=${service}`;\n\n return this.http.get<CasFlowResponse>(url, { withCredentials: true }).pipe(\n timeout(2500),\n retryWithBackoff(1),\n safeMap((res) => res.execution),\n take(1),\n catchError(() => of(null)),\n share()\n );\n }\n\n private executeLoginCasFlowAction(body: URLSearchParams): Observable<LoginPhaseError | undefined> {\n const token = snapshot(\n this.store$.pipe(\n loginPhase(),\n map(({ executionToken }) => executionToken)\n )\n );\n body.set('execution', token);\n body.set('redirectJson', 'true');\n\n const actionFailureError: LoginPhaseError =\n body.get('_eventId') === 'retry' ? LoginPhaseError.RESEND_2FA_EMAIL : LoginPhaseError.LOGIN_FAILED;\n\n return this.http\n .post<CasFlowResponse>(`https://${this.configService.cfg.casHost}/cas/login`, body.toString(), {\n withCredentials: true,\n headers: new HttpHeaders({\n 'Content-Type': 'application/x-www-form-urlencoded',\n }),\n })\n .pipe(\n map((response: CasFlowResponse) => {\n if (response.execution) {\n this.store$.dispatch(LoginActions.setLoginPhaseExecutionToken({ token: response.execution }));\n }\n\n if (response.route) {\n if (Object.keys(CAS_ROUTES).includes(response.route)) {\n this.processCasFlowResponseForCustomData(response);\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: CAS_ROUTES[response.route] }));\n return undefined;\n } else {\n this.sentryLogger.error('CAS response has unhandled route', { response: response });\n }\n }\n\n if (response?.message === 'login.ok' || response.redirectUrl) {\n this.initSsoLoginSession();\n return undefined;\n }\n return actionFailureError;\n }),\n take(1),\n catchError((response: unknown) => {\n const errorResponse = mapError<CasFlowResponse>(response);\n if (errorResponse?.error === 'Locked' || errorResponse?.route === 'login/account-locked') {\n this.store$.dispatch(LoginActions.setLoginPhaseStep({ step: LoginStep.LOCKED }));\n return of(undefined);\n }\n return of(actionFailureError);\n }),\n finShare()\n );\n }\n\n private processCasFlowResponseForCustomData(response: CasFlowResponse): void {\n if (response.route === '2fa/email-auth') {\n const customDataString =\n response.message instanceof Array\n ? response.message.find((msg) => msg.text.includes('customData'))?.text\n : undefined;\n try {\n const { email }: LoginPhaseProfile = customDataString\n ? (JSON.parse(customDataString) as CasFlowLoginResponseCustomData)?.customData || {}\n : {};\n\n if (!email) {\n throw new Error('Email not found in customData');\n }\n\n this.store$.dispatch(LoginActions.setLoginPhaseProfile({ profile: { email } }));\n } catch (error) {\n this.sentryLogger.error(\n 'CAS response should have provided customData in one of its messages with an email property value',\n {\n error,\n response: response,\n }\n );\n }\n }\n }\n}\n","import { ErrorHandler, NgModule } from '@angular/core';\n\nimport { StoreDevtoolsModule } from '@ngrx/store-devtools';\n\nimport { MarketingPreferencesModule } from '@fcom/common/login/marketing-preferences.module';\nimport { MultivariateTestModule } from '@fcom/common/multivariate-test/multivariate-test.module';\nimport { ToasterModule } from '@fcom/common/components/toaster/toaster.module';\nimport { LoginModule, LoginService } from '@fcom/common/login';\nimport { LocationsModule } from '@fcom/locations';\nimport { SentryErrorHandler, SentryModule } from '@fcom/core/services';\nimport { jsConfig } from '@fcom/core/services/config/jsConfig';\nimport { IconsService } from '@fcom/ui-components/components/icons';\nimport { ClientIconsService } from '@fcom/ui-components/components/icons/services/client-icons.service';\n\nimport { AppComponent } from './app.component';\nimport { AppModule } from './app.module';\nimport { ClientLoginService } from '../services/client-login.service';\n\n// State tree\n\nconst imports = [];\nif (jsConfig.enableDevTools) {\n console.log('NGRX DEVTOOL ENABLED');\n /**\n * To use the devtools, you need the browser extension.\n * See https://github.com/ngrx/store-devtools\n */\n imports.push(\n StoreDevtoolsModule.instrument({\n maxAge: 25,\n })\n );\n}\n\n@NgModule({\n imports: [\n AppModule,\n LoginModule,\n MarketingPreferencesModule.forRoot(),\n ToasterModule,\n MultivariateTestModule,\n // LocationsModule has to be declared at very top as we need to be able to listen language changes\n LocationsModule,\n ...imports,\n // Sentry needs to be last\n SentryModule,\n ],\n providers: [\n {\n provide: LoginService,\n useClass: ClientLoginService,\n },\n { provide: ErrorHandler, useClass: SentryErrorHandler },\n {\n provide: IconsService,\n useClass: ClientIconsService,\n },\n ],\n bootstrap: [AppComponent],\n})\nexport class ClientModule {}\n","import { enableProdMode, NgModuleRef } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { captureException, init, preInit } from '@fcom/app/client-init';\nimport { ClientModule } from '@fcom/app/app/client.module';\n\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nconst initCb = init();\n\ndocument.addEventListener('DOMContentLoaded', () => {\n platformBrowserDynamic()\n .bootstrapModule(ClientModule, { preserveWhitespaces: false })\n .then((module: NgModuleRef<ClientModule>) => {\n preInit(module);\n initCb();\n })\n .catch((error: Error) => {\n console.error('Application bootstrap failed', error);\n captureException(error);\n });\n});\n","import { MonoTypeOperatorFunction, ObservableInput } from '../types';\nimport { operate } from '../util/lift';\nimport { Subscription } from '../Subscription';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nimport { timer } from '../observable/timer';\nimport { innerFrom } from '../observable/innerFrom';\n\n/**\n * The {@link retry} operator configuration object. `retry` either accepts a `number`\n * or an object described by this interface.\n */\nexport interface RetryConfig {\n /**\n * The maximum number of times to retry. If `count` is omitted, `retry` will try to\n * resubscribe on errors infinite number of times.\n */\n count?: number;\n /**\n * The number of milliseconds to delay before retrying, OR a function to\n * return a notifier for delaying. If a function is given, that function should\n * return a notifier that, when it emits will retry the source. If the notifier\n * completes _without_ emitting, the resulting observable will complete without error,\n * if the notifier errors, the error will be pushed to the result.\n */\n delay?: number | ((error: any, retryCount: number) => ObservableInput<any>);\n /**\n * Whether or not to reset the retry counter when the retried subscription\n * emits its first value.\n */\n resetOnSuccess?: boolean;\n}\n\nexport function retry<T>(count?: number): MonoTypeOperatorFunction<T>;\nexport function retry<T>(config: RetryConfig): MonoTypeOperatorFunction<T>;\n\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`.\n *\n * If the source Observable calls `error`, this method will resubscribe to the source Observable for a maximum of\n * `count` resubscriptions rather than propagating the `error` call.\n *\n * ![](retry.png)\n *\n * The number of retries is determined by the `count` parameter. It can be set either by passing a number to\n * `retry` function or by setting `count` property when `retry` is configured using {@link RetryConfig}. If\n * `count` is omitted, `retry` will try to resubscribe on errors infinite number of times.\n *\n * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those\n * emitted during failed subscriptions. For example, if an Observable fails at first but emits `[1, 2]` then\n * succeeds the second time and emits: `[1, 2, 3, 4, 5, complete]` then the complete stream of emissions and\n * notifications would be: `[1, 2, 1, 2, 3, 4, 5, complete]`.\n *\n * ## Example\n *\n * ```ts\n * import { interval, mergeMap, throwError, of, retry } from 'rxjs';\n *\n * const source = interval(1000);\n * const result = source.pipe(\n * mergeMap(val => val > 5 ? throwError(() => 'Error!') : of(val)),\n * retry(2) // retry 2 times on error\n * );\n *\n * result.subscribe({\n * next: value => console.log(value),\n * error: err => console.log(`${ err }: Retried 2 times then quit!`)\n * });\n *\n * // Output:\n * // 0..1..2..3..4..5..\n * // 0..1..2..3..4..5..\n * // 0..1..2..3..4..5..\n * // 'Error!: Retried 2 times then quit!'\n * ```\n *\n * @see {@link retryWhen}\n *\n * @param configOrCount Either number of retry attempts before failing or a\n * {@link RetryConfig} object.\n * @return A function that returns an Observable that will resubscribe to the\n * source stream when the source stream errors, at most `count` times.\n */\nexport function retry<T>(configOrCount: number | RetryConfig = Infinity): MonoTypeOperatorFunction<T> {\n let config: RetryConfig;\n if (configOrCount && typeof configOrCount === 'object') {\n config = configOrCount;\n } else {\n config = {\n count: configOrCount as number,\n };\n }\n const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config;\n\n return count <= 0\n ? identity\n : operate((source, subscriber) => {\n let soFar = 0;\n let innerSub: Subscription | null;\n const subscribeForRetry = () => {\n let syncUnsub = false;\n innerSub = source.subscribe(\n createOperatorSubscriber(\n subscriber,\n (value) => {\n // If we're resetting on success\n if (resetOnSuccess) {\n soFar = 0;\n }\n subscriber.next(value);\n },\n // Completions are passed through to consumer.\n undefined,\n (err) => {\n if (soFar++ < count) {\n // We are still under our retry count\n const resub = () => {\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n } else {\n syncUnsub = true;\n }\n };\n\n if (delay != null) {\n // The user specified a retry delay.\n // They gave us a number, use a timer, otherwise, it's a function,\n // and we're going to call it to get a notifier.\n const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));\n const notifierSubscriber = createOperatorSubscriber(\n subscriber,\n () => {\n // After we get the first notification, we\n // unsubscribe from the notifier, because we don't want anymore\n // and we resubscribe to the source.\n notifierSubscriber.unsubscribe();\n resub();\n },\n () => {\n // The notifier completed without emitting.\n // The author is telling us they want to complete.\n subscriber.complete();\n }\n );\n notifier.subscribe(notifierSubscriber);\n } else {\n // There was no notifier given. Just resub immediately.\n resub();\n }\n } else {\n // We're past our maximum number of retries.\n // Just send along the error.\n subscriber.error(err);\n }\n }\n )\n );\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n };\n subscribeForRetry();\n });\n}\n","import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\n\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { isNull, isUndefined } from '@fcom/core/utils';\n\nimport { LanguageService } from '../services/language.service';\n\n/**\n * Asynchronous has localization key pipe\n * - Uses LanguageService to check if localization key exist in translations\n *\n * @example\n *\n * When having\n *\n * localizations = {\n * foo: 'My name is {me}',\n * }\n *\n * The pipe would translate the following\n *\n * 'foo' | finHasLocalizationKey -> true,\n * 'bar' | finHasLocalizationKey -> false\n */\n@Pipe({\n name: 'finHasLocalizationKey',\n pure: false,\n})\nexport class HasLocalizationKeyPipe implements PipeTransform, OnDestroy {\n private async: AsyncPipe;\n private cached$: Observable<boolean>;\n private cachedKey: string | string[];\n\n constructor(\n private ref: ChangeDetectorRef,\n private languageService: LanguageService\n ) {\n this.async = new AsyncPipe(this.ref);\n }\n\n transform(key: string | string[]): boolean {\n if (isUndefined(key) || isNull(key)) {\n return false;\n }\n\n if (this.valueChanged(key)) {\n this.update(key);\n }\n\n return this.async.transform(this.cached$);\n }\n\n ngOnDestroy(): void {\n this.async.ngOnDestroy();\n }\n\n private valueChanged(key: string | string[]): boolean {\n return !this.cached$ || key !== this.cachedKey;\n }\n\n private update(key: string | string[]): void {\n this.cached$ = this.languageService\n .translate(key, undefined, { logErrors: false })\n .pipe(map((str) => Boolean(str)));\n this.cachedKey = key;\n }\n}\n","<div *ngIf=\"mappedContent$ | async as content\" class=\"mr-large-b\">\n <h2 class=\"mr-medium-b\" *ngIf=\"content.teaserTitle && content.subjectTaxonomyTags.indexOf(TAXONOMY.NO_TITLE) === -1\">\n {{ content.teaserTitle }}\n </h2>\n\n <fin-expand\n *ngFor=\"let item of content.items; let index = index; let last = last\"\n class=\"block\"\n [initiallyOpen]=\"(item.segment | decodeURI: true) === routeFragment\"\n [class.border-bottom]=\"last\"\n [key]=\"'cms-accordion-' + content.contentId\"\n [id]=\"'cms-accordion-' + content.contentId + '-' + index\"\n #expand\n >\n <div\n class=\"trigger flex flex--center border-top\"\n tabindex=\"-1\"\n [class.pr-xxsmall-y]=\"withPictures\"\n [class.pr-small-y]=\"!withPictures\"\n >\n <div *ngIf=\"item.previewPicture && withPictures\" class=\"mr-xsmall-r\">\n <fin-content-image\n class=\"valign-middle preview-image\"\n [imageData$]=\"item.previewPicture | finToObservable\"\n [aspectRatio$]=\"'16x9' | finToObservable\"\n ></fin-content-image>\n </div>\n <div class=\"flex-1 nordic-blue-900-text\" data-testid=\"accordion-teaser-title\">\n <h2 *ngIf=\"!withPictures\" class=\"mr-clear-t\" data-testid=\"accordion-no-image-teaser-title\">\n {{ item.teaserTitle }}\n </h2>\n <h3 *ngIf=\"withPictures\" class=\"mr-clear-t\" data-testid=\"accordion-image-teaser-title\">\n {{ item.teaserTitle }}\n </h3>\n </div>\n <fcom-icon\n class=\"flex-1 flex--nogrow rotate icon-medium\"\n [class.rotate-active]=\"expand.isOpen$ | async\"\n [name]=\"SvgLibraryIcon.CHEVRON_DOWN\"\n ></fcom-icon>\n </div>\n <div class=\"content\">\n <fin-cms-json-content [template$]=\"{ main: [item] } | finToObservable\"></fin-cms-json-content>\n </div>\n </fin-expand>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { map, Observable } from 'rxjs';\n\nimport { CmsCollection, CmsTaxonomyGeneral } from '@fcom/core-api';\n\n@Component({\n selector: 'cms-accordion',\n templateUrl: './cms-accordion.component.html',\n styleUrls: ['cms-accordion.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CmsAccordionComponent implements OnInit {\n @Input()\n content$: Observable<CmsCollection>;\n\n mappedContent$: Observable<CmsCollection>;\n\n routeFragment: string;\n\n @Input()\n withPictures = false;\n\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly TAXONOMY: typeof CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n ngOnInit(): void {\n this.routeFragment = this.activatedRoute.snapshot.fragment;\n /**\n * Avoid accordion items printing the title twice.\n */\n this.mappedContent$ = this.content$.pipe(\n map((content) => ({\n ...content,\n items: content.items.map((item) => ({\n ...item,\n subjectTaxonomyTags: (item.subjectTaxonomyTags || []).concat([CmsTaxonomyGeneral.NO_TITLE]),\n })),\n }))\n );\n }\n}\n","import { shownConfs } from '@fcom/core/reducers/langs';\nimport { CountryLanguage, CountryState } from '@fcom/core/interfaces';\n\nimport { Links } from '../services';\n\nconst parseLocalizedPathFromUrl = (langCode: string, url: string): string => {\n const everythingBeforeLangCode = new RegExp(`.+?(?=/${langCode})`);\n return url ? url.replace(everythingBeforeLangCode, '') : `/${langCode}`;\n};\n\nexport const getLocalizedLinkForLangCode = (langCode: string, links: Links = {}, prevPageUrl: string): string => {\n const localizedCmsPageUrl = parseLocalizedPathFromUrl(langCode, links[langCode]);\n const localizedPrevPageUrl = prevPageUrl ? `/${langCode}${prevPageUrl}` : undefined;\n return localizedPrevPageUrl ?? localizedCmsPageUrl;\n};\n\nexport const getCountryStates = (): CountryState[] =>\n shownConfs\n .map((country) => ({\n ...country,\n languages: country.languages.map((language): CountryLanguage => {\n const translation = language.translation ? ` (${language.translation})` : '';\n return {\n ...language,\n label: `${country.name}, ${language.name}${translation}`,\n ISOCode: language.code.split('-').pop(),\n };\n }),\n }))\n .reduce((countryList, country) => {\n // Set Finland as first country in the list\n if (country.code === 'FI') {\n countryList.unshift(country);\n } else {\n countryList.push(country);\n }\n return countryList;\n }, []);\n","<div class=\"pr-xsmall-b\" data-testid=\"offer-grid\">\n <ng-container *ngIf=\"title\">\n <ng-container [ngSwitch]=\"headerLevel\">\n <h1 *ngSwitchCase=\"1\" [ngClass]=\"{ 'pr-xsmall-y': !noHeaderPadding }\" data-testid=\"offer-grid-title\">\n {{ title }}\n </h1>\n <h2 *ngSwitchCase=\"2\" [ngClass]=\"{ 'pr-xsmall-y': !noHeaderPadding }\" data-testid=\"offer-grid-title\">\n {{ title }}\n </h2>\n <h3 *ngSwitchCase=\"3\" [ngClass]=\"{ 'pr-xsmall-y': !noHeaderPadding }\" data-testid=\"offer-grid-title\">\n {{ title }}\n </h3>\n <h4 *ngSwitchCase=\"4\" [ngClass]=\"{ 'pr-xsmall-y': !noHeaderPadding }\" data-testid=\"offer-grid-title\">\n {{ title }}\n </h4>\n <h3 *ngSwitchDefault [ngClass]=\"{ 'pr-xsmall-y': !noHeaderPadding }\" data-testid=\"offer-grid-title\">\n {{ title }}\n </h3>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"selectedOriginLocationName$ | async as selectedOriginLocationName\">\n <p\n *ngIf=\"tripType\"\n class=\"flex--self-center font-body-1 regular-type\"\n [style]=\"cmsStylesOverride\"\n [innerHTML]=\"'destinationSearch.flightsFrom' | finLocalization: { origin: selectedOriginLocationName }\"\n data-testid=\"offer-grid-trip-type-origin-label\"\n ></p>\n </ng-container>\n\n <ng-container *ngIf=\"offers$ | async as offers\">\n @if ((isMobile$ | async) && mobileCarousel) {\n <div class=\"ms-small-t\">\n <fcom-carousel\n data-testid=\"offer-grid-carousel\"\n [prevButtonAriaLabel]=\"'carousel.previous' | finLocalization\"\n [nextButtonAriaLabel]=\"'carousel.next' | finLocalization\"\n >\n <div class=\"mobile-offers flex nowrap flex--middle flex--nowrap flex--align-stretch ps-medium-b\">\n <ng-container\n [ngTemplateOutlet]=\"offersTemplate\"\n [ngTemplateOutletContext]=\"{ offers: offers }\"\n ></ng-container>\n </div>\n </fcom-carousel>\n </div>\n } @else {\n <div class=\"offer-grid-offers fill grid-col-12 no-gutters\" data-testid=\"offer-grid-offers-container\">\n <ng-container [ngTemplateOutlet]=\"offersTemplate\" [ngTemplateOutletContext]=\"{ offers: offers }\"></ng-container>\n </div>\n }\n </ng-container>\n\n <ng-template #offersTemplate let-offers=\"offers\">\n <fin-block-offer\n *ngFor=\"let offer of offers; let i = index\"\n [tripType]=\"tripType\"\n [offer]=\"offer\"\n (finScrolledPast)=\"scrolledPastDestination.emit([offer, i])\"\n (destinationClicked)=\"destinationClick($event, i)\"\n (flightHotelClicked)=\"flightHotelClicked.emit($event)\"\n (calendarClicked)=\"calendarClicked.emit($event)\"\n [fetchImagePriority]=\"fetchImagePriority\"\n class=\"offer-grid-offer fill block flex slim\"\n ></fin-block-offer>\n </ng-template>\n</div>\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { combineLatest, Observable } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap } from 'rxjs/operators';\n\nimport { LanguageService } from '@fcom/ui-translate';\nimport { MediaQueryService, PageMetaService } from '@fcom/common';\nimport { TripType } from '@fcom/core/interfaces';\nimport { CmsTaxonomy, CmsTaxonomyGeneral } from '@fcom/core-api';\nimport { GlobalBookingTravelClass, LocationRouteCffService } from '@fcom/core';\nimport { finShare } from '@fcom/rx';\nimport { FetchPriorityEnum } from '@fcom/ui-components';\n\nimport { BlockOffer, BlockOfferData } from '../../interfaces';\nimport { getHeaderLevel } from '../../services/cms-utils/cms-utils';\n\n@Component({\n selector: 'fin-offer-grid',\n styleUrls: ['./offer-grid.component.scss'],\n templateUrl: './offer-grid.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OfferGridComponent implements OnInit {\n @Output()\n destinationClicked: EventEmitter<[BlockOffer, number]> = new EventEmitter();\n @Output()\n scrolledPastDestination: EventEmitter<[BlockOffer, number]> = new EventEmitter();\n @Output()\n calendarClicked: EventEmitter<[Event, BlockOffer, GlobalBookingTravelClass, TripType]> = new EventEmitter();\n @Output()\n flightHotelClicked: EventEmitter<{ amLink: string; destination: string }> = new EventEmitter();\n\n @Input()\n offers$: Observable<BlockOfferData[]>;\n @Input()\n tripType: TripType;\n @Input()\n title: string;\n @Input()\n cmsTags: CmsTaxonomy[];\n @Input()\n mobileCarousel = false;\n @Input()\n noHeaderPadding = false;\n\n @Input()\n fetchImagePriority?: keyof typeof FetchPriorityEnum;\n\n public readonly TAXONOMY: typeof CmsTaxonomyGeneral = CmsTaxonomyGeneral;\n\n selectedOriginLocationName$: Observable<string>;\n headerLevel: number | undefined;\n isMobile$: Observable<boolean>;\n\n readonly cmsStylesOverride = {\n 'margin-top': '0.3rem',\n 'margin-bottom': '0.9rem',\n };\n\n constructor(\n private languageService: LanguageService,\n private locationRouteCffService: LocationRouteCffService,\n private pageMetaService: PageMetaService,\n private mediaQueryService: MediaQueryService\n ) {\n this.isMobile$ = this.mediaQueryService.isBreakpoint$('mobile');\n }\n\n ngOnInit(): void {\n this.headerLevel = getHeaderLevel(this.cmsTags);\n\n /**\n * Fetch translated location name for selected origin\n */\n const origin$ = this.pageMetaService.defaultOriginLocationCode$.pipe(\n switchMap((origin) => this.locationRouteCffService.bestGuessFor(origin, this.languageService.localeValue)),\n distinctUntilChanged(),\n finShare()\n );\n\n this.selectedOriginLocationName$ = combineLatest([this.pageMetaService.defaultOriginLocationCode$, origin$]).pipe(\n map(([originLocationCode, originLocation]) => originLocation.cityName ?? originLocationCode)\n );\n }\n\n destinationClick([destinationItem, _travelClass]: [BlockOffer, GlobalBookingTravelClass], index: number): void {\n this.destinationClicked.emit([destinationItem, index]);\n }\n}\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { DirectiveModule } from '@fcom/common/directives/directive.module';\n\nimport { IconsModule } from '../icons/icons.module';\nimport { ButtonModule } from '../buttons/button.module';\nimport { NotificationComponent } from './notification/notification.component';\nimport { InfoBoxComponent } from './info-box/info-box.component';\nimport { LoaderModule } from '../loader';\nimport { LinkModule } from '../link/link.module';\nimport { MenuListComponent } from './menu-list/menu-list.component';\n\n@NgModule({\n declarations: [NotificationComponent, InfoBoxComponent, MenuListComponent],\n imports: [CommonModule, IconsModule, ButtonModule, LoaderModule, UiTranslateModule, DirectiveModule, LinkModule],\n exports: [NotificationComponent, InfoBoxComponent, MenuListComponent],\n providers: [],\n})\nexport class NotificationsModule {}\n","import { DateFormat, LocalDate } from '@fcom/core/utils';\n\nimport { HistogramBarBase } from '../interfaces';\n\nexport const generateBarsForYear = (date: LocalDate, dateTranslations: Record<string, unknown>): HistogramBarBase[] => {\n return Array.from({ length: 13 }, (_, i) => {\n const current = date.firstDayOfMonth.plusMonths(i);\n const monthName = new DateFormat(dateTranslations).format(current, DateFormat.MONTH_SHORT);\n return {\n index: i,\n text: monthName,\n ...(date.lt(current) && current.localMonth === 1 && { spacer: { value: String(current.localYear) } }),\n };\n });\n};\n","<div\n class=\"relative pr-xxsmall-x nordic-blue-50-bg border-bottom\"\n data-testid=\"histogram\"\n #histogramContainer\n aria-role=\"presentation\"\n>\n <fin-scroll-handle-container\n #scrollContainer\n [elements]=\"bars\"\n class=\"nordic-blue-50-bg flex flex--center\"\n (scrollElements)=\"barsScrolled.emit($event)\"\n [disableKeyboardNavigation]=\"true\"\n >\n <div class=\"flex flex--column-row flex--align-end ps-medium-t bar-container\">\n <ng-container *ngFor=\"let bar of range$ | async; let i = index\">\n <ng-container *ngIf=\"bar?.spacer\">\n <ng-container *ngTemplateOutlet=\"verticalSeparator; context: { label: bar?.spacer?.value }\"></ng-container>\n </ng-container>\n\n <div\n class=\"flex flex--column flex--end shadow-small link-hover border-top border-left border-right rounded-top-medium bar\"\n [attr.data-testid]=\"'histogram-bar-' + i\"\n [class.cheapest]=\"bar?.isCheapest\"\n [class.noFlight]=\"bar.noFlight\"\n [class.selected]=\"(selected$ | async) === i && (isLoading$ | async) === false\"\n [class.loading]=\"isLoading$ | async\"\n [class.grey-25-bg]=\"isLoading$ | async\"\n #bar\n [style.height]=\"bar.height\"\n (click)=\"scrollToBarByIndex(bar)\"\n >\n <p class=\"text-align center font-body-2\" data-testid=\"histogram-label\">{{ bar.text }}</p>\n @if (isLoading$ | async) {\n <span class=\"grey-bar center\"></span>\n }\n <p *ngIf=\"!bar.noFlight\" class=\"text-align center font-body-2 medium-type\" data-testid=\"histogram-price\">\n {{\n { amount: bar.amount, currencyCode: bar.currencyCode }\n | finPrice: { abbreviate: true, useCustomFormat: true }\n }}\n </p>\n <fcom-icon\n *ngIf=\"bar.noFlight\"\n class=\"center icon-small ms-xxsmall-b\"\n [name]=\"SvgLibraryIcon.FLIGHTS_UNAVAILABLE\"\n ></fcom-icon>\n </div>\n </ng-container>\n </div>\n </fin-scroll-handle-container>\n</div>\n\n<ng-template #verticalSeparator let-label=\"label\">\n <div class=\"flex flex--center flex--column flex--self-stretch\" data-testid=\"histogram-spacer\">\n <p class=\"font-body-2\" data-testid=\"histogram-spacer-label\">{{ label }}</p>\n <div class=\"border-left grow\" [ngStyle]=\"CMS_STYLE_OVERRIDE\"></div>\n </div>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewChildren,\n EventEmitter,\n OnDestroy,\n AfterViewInit,\n} from '@angular/core';\n\nimport { SvgLibraryIcon } from '@finnairoyj/fcom-ui-styles/enums';\nimport { EMPTY, Observable, Subject, Subscription, combineLatest, filter, map, of, startWith } from 'rxjs';\nimport { switchMap } from 'rxjs/operators';\n\nimport { isNotEmpty, LocalDate, unsubscribe } from '@fcom/core/utils';\nimport { finShare } from '@fcom/rx';\nimport { LanguageService } from '@fcom/ui-translate';\n\nimport { ScrollHandleContainerComponent } from '../scroll-handle-container/scroll-handle-container.component';\nimport { Direction, HistogramBar } from '../../interfaces';\nimport { MediaQueryService } from '../../services';\nimport { generateBarsForYear } from '../../utils/histogram.utils';\n\n@Component({\n selector: 'fin-histogram',\n templateUrl: './histogram.component.html',\n styleUrls: ['./histogram.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HistogramComponent implements OnInit, AfterViewInit, OnDestroy {\n readonly SvgLibraryIcon = SvgLibraryIcon;\n readonly CMS_STYLE_OVERRIDE = {\n 'margin-top': '0px',\n };\n\n @Input()\n barData$: Observable<HistogramBar[]> = EMPTY;\n\n @Input()\n selected$ = of(0);\n\n @Input()\n isActive$ = of(false);\n\n @Input()\n isLoading$ = of(false);\n\n @Output()\n barSelected: EventEmitter<HistogramBar> = new EventEmitter();\n\n @Output()\n barsScrolled: EventEmitter<Direction> = new EventEmitter();\n\n range$: Observable<HistogramBar[]>;\n minAmount$: Observable<number>;\n\n private adjustHistogramBarHeight$: Subject<void> = new Subject();\n private readonly MIN_COLUMN_HEIGHT = 44;\n private readonly HISTOGRAM_TOP_SPACING = 20;\n private maxAmount$: Observable<number>;\n\n @ViewChild('histogramContainer', { static: true }) histogramContainer: ElementRef;\n @ViewChild('scrollContainer', { static: false }) scrollContainer: ScrollHandleContainerComponent;\n @ViewChildren('bar', { read: ElementRef }) bars: QueryList<ElementRef>;\n\n subscription: Subscription = new Subscription();\n\n constructor(\n private mediaQueryService: MediaQueryService,\n private languageService: LanguageService\n ) {}\n\n ngOnInit(): void {\n this.minAmount$ = this.barData$.pipe(\n map(\n (barData: HistogramBar[]) =>\n barData &&\n Math.min(\n ...barData\n .filter((bar: HistogramBar) => +bar.amount && +bar.amount > 0)\n .map((bar: HistogramBar) => +bar.amount)\n )\n ),\n finShare()\n );\n\n this.maxAmount$ = this.barData$.pipe(\n map(\n (barData: HistogramBar[]) =>\n barData &&\n Math.max(\n ...barData\n .filter((bar: HistogramBar) => +bar.amount && +bar.amount > 0)\n .map((bar: HistogramBar) => +bar.amount)\n )\n ),\n finShare()\n );\n\n const loadingBars$ = this.languageService.translate('date').pipe(\n map((dateTranslations) =>\n generateBarsForYear(LocalDate.now(), dateTranslations).map((bar) => ({\n ...bar,\n height: '20%',\n isCheapest: false,\n amount: '',\n noFlight: false,\n currencyCode: '',\n }))\n )\n );\n\n this.range$ = this.isLoading$.pipe(\n switchMap((isLoading) =>\n isLoading\n ? loadingBars$\n : combineLatest([\n this.barData$.pipe(filter((barData) => isNotEmpty(barData))),\n this.minAmount$,\n this.maxAmount$,\n this.isActive$,\n this.adjustHistogramBarHeight$.pipe(startWith(undefined)),\n ]).pipe(\n filter(([, , , isActive]) => isActive),\n map(([barData, minAmount, maxAmount]: [HistogramBar[], number, number, boolean, void]) =>\n barData.map((bar: HistogramBar) => ({\n ...bar,\n height: `${this.calculateHeightBar(bar, minAmount, maxAmount)}px`,\n isCheapest: +bar.amount === minAmount && !bar.noFlight,\n }))\n ),\n finShare()\n )\n )\n );\n\n this.subscription.add(\n this.mediaQueryService.getResizeEvent$().subscribe(() => {\n this.adjustHistogramBarHeight$.next();\n })\n );\n }\n\n ngAfterViewInit(): void {\n if (this.scrollContainer) {\n this.scrollContainer.updateScrollHandles();\n }\n\n this.subscription.add(\n this.selected$.subscribe((value: number) => {\n if (this.scrollContainer) {\n this.scrollContainer.scrollToElement(this.bars.get(value));\n }\n })\n );\n }\n\n ngOnDestroy(): void {\n this.subscription = unsubscribe(this.subscription);\n }\n\n /**\n * Displays bar center based on container\n * @param index, bar index to display centered\n */\n scrollToBarByIndex(selectedBar: HistogramBar): void {\n this.scrollContainer.scrollToElement(this.bars.get(selectedBar.index));\n this.barSelected.emit(selectedBar);\n }\n\n private calculateHeightBar(bar: HistogramBar, minAmount: number, maxAmount: number): number {\n const max_column_height = this.histogramContainer?.nativeElement?.offsetHeight - this.HISTOGRAM_TOP_SPACING;\n if (minAmount === maxAmount) {\n return this.MIN_COLUMN_HEIGHT;\n }\n\n if (+bar.amount === maxAmount) {\n return max_column_height;\n }\n\n const percentOfAmount = ((+bar.amount - minAmount) / (maxAmount - minAmount)) * 100;\n const extraHeightInPx = ((max_column_height - this.MIN_COLUMN_HEIGHT) * percentOfAmount) / 100;\n\n return this.MIN_COLUMN_HEIGHT + extraHeightInPx;\n }\n}\n","<ng-container *ngIf=\"isClickable; else nonClickableItem\">\n <a\n class=\"medium-type font-body-1 link-hover underline-hover {{ customClasses }}\"\n tabindex=\"0\"\n [attr.data-testid]=\"'summary-clickable-item-' + type\"\n (click)=\"clickAction.emit()\"\n (keydown.enter)=\"clickAction.emit()\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </a>\n</ng-container>\n<ng-template #nonClickableItem>\n <span class=\"medium-type font-body-1 {{ customClasses }}\" tabindex=\"0\" [attr.data-testid]=\"'summary-item-' + type\">\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </span>\n</ng-template>\n<ng-template #content>\n <ng-content select=\".content\"></ng-content>\n</ng-template>\n","import { Component, Input, ChangeDetectionStrategy, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'fin-booking-header-summary-item',\n templateUrl: './booking-header-summary-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BookingHeaderSummaryItemComponent {\n @Input() type: string;\n @Input() isClickable = false;\n @Input() customClasses: string;\n @Output() clickAction: EventEmitter<void> = new EventEmitter();\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport {\n ButtonModule,\n CarouselModule,\n IconsModule,\n ModalModule,\n PopoverModule,\n UiComponentsModule,\n} from '@fcom/ui-components';\nimport { UiTranslateModule } from '@fcom/ui-translate';\nimport { SiteSearchHeaderWidgetStarterComponent } from '@fcom/site-search-header-widget-starter';\n\nimport { GtmModule } from '../gtm/gtm.module';\nimport { DirectiveModule } from '../directives';\nimport { PipesModule } from '../pipes';\nimport { LocationsPipeModule } from '../../locations';\nimport { WelcomeBackMessageService } from '../services';\nimport { CmsUnstyledFragmentComponent, CmsUnstyledTeaserComponent, ContentWithModalComponent } from './cms';\nimport { DisclaimerComponent } from './disclaimer/disclaimer.component';\nimport { ErrorComponent } from './error/error.component';\nimport { ExpandContentComponent } from './expand/expand-content.component';\nimport { ExpandComponent } from './expand/expand.component';\nimport { FooterComponent } from './footer/footer.component';\nimport { ClientOnlyComponent } from './helpers/client-only.component';\nimport { ImagesModule } from './images';\nimport { LoaderComponent } from './loader/loader.component';\nimport { SkipLinkComponent } from './skip-link/skip-link.component';\nimport { WelcomeBackMessageComponent } from './welcome-back-message/welcome-back-message.component';\nimport { SidebarNavigationItemComponent } from './sidebar-navigation-item/sidebar-navigation-item.component';\nimport { LinkComponent } from './link/link.component';\nimport { TotalExpandComponent } from './total-expand';\nimport { StepProgressCircleComponent } from './step-progress-circle/step-progress-circle.component';\nimport { PromotionBannersComponent } from './promotion-banners/promotion-banners.component';\nimport { SustainabilityReviewCardComponent } from './sustainability-review-card/sustainability-review-card.component';\nimport { NewsletterNotificationComponent } from './newsletter-notification/newsletter-notification.component';\nimport { HistogramComponent } from './histogram/histogram.component';\nimport { ScrollHandleContainerComponent } from './scroll-handle-container/scroll-handle-container.component';\nimport { PriceMatrixComponent } from './price-matrix/price-matrix.component';\nimport { SchemaComponent } from './schema/schema.component';\nimport { BookingHeaderSummaryComponent } from './booking-header-summary/booking-header-summary.component';\nimport { BookingHeaderSummaryItemComponent } from './booking-header-summary-item/booking-header-summary-item.component';\nimport { TripLocationInfoComponent } from './trip-location-info/trip-location-info.component';\nimport { CountryAndLanguageSelectorComponent } from './country-and-language-selector/country-and-language-selector.component';\nimport { LanguageSelectorComponent } from './language-selector/language-selector.component';\nimport { PromotionBannerComponent } from './promotion-banner/promotion-banner.component';\nimport { PriceCalendarComponent } from './price-calendar/price-calendar.component';\n\nconst COMPONENTS = [\n ClientOnlyComponent,\n DisclaimerComponent,\n ExpandComponent,\n ExpandContentComponent,\n LoaderComponent,\n CmsUnstyledFragmentComponent,\n CmsUnstyledTeaserComponent,\n ContentWithModalComponent,\n SiteSearchHeaderWidgetStarterComponent,\n FooterComponent,\n ErrorComponent,\n SkipLinkComponent,\n WelcomeBackMessageComponent,\n SidebarNavigationItemComponent,\n LinkComponent,\n TotalExpandComponent,\n StepProgressCircleComponent,\n PromotionBannersComponent,\n SustainabilityReviewCardComponent,\n NewsletterNotificationComponent,\n ScrollHandleContainerComponent,\n HistogramComponent,\n PriceMatrixComponent,\n SchemaComponent,\n BookingHeaderSummaryComponent,\n BookingHeaderSummaryItemComponent,\n TripLocationInfoComponent,\n CountryAndLanguageSelectorComponent,\n LanguageSelectorComponent,\n PromotionBannerComponent,\n PriceCalendarComponent,\n];\n\n@NgModule({\n imports: [\n CommonModule,\n DirectiveModule,\n FormsModule,\n ImagesModule,\n PipesModule,\n LocationsPipeModule,\n ReactiveFormsModule.withConfig({\n callSetDisabledState: 'whenDisabledForLegacyCode',\n }),\n GtmModule,\n UiTranslateModule,\n CarouselModule,\n IconsModule,\n ModalModule,\n PopoverModule,\n ButtonModule,\n UiComponentsModule,\n ],\n declarations: [...COMPONENTS],\n providers: [WelcomeBackMessageService],\n exports: [ImagesModule, ...COMPONENTS],\n})\nexport class ComponentsModule {}\n","'use strict';\n\nvar bind = require('function-bind');\n\nvar $apply = require('./functionApply');\nvar $call = require('./functionCall');\nvar $reflectApply = require('./reflectApply');\n\n/** @type {import('./actualApply')} */\nmodule.exports = $reflectApply || bind.call($call, $apply);\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","<div [formGroup]=\"parentForm\" class=\"ms-large-b\">\n <ng-container [formArrayName]=\"controlName\" *ngFor=\"let iteratedInput of formArray.controls; let i = index\">\n <fin-form-input-checkbox\n [parentForm]=\"parentForm.get(controlName)\"\n [checkboxValue]=\"checkboxList[i].id\"\n [translationPrefix]=\"checkboxList[i].label\"\n [controlName]=\"i + ''\"\n ></fin-form-input-checkbox>\n </ng-container>\n</div>\n","import { Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\nimport { CheckboxOptionList, TypedFormArray, TypedFormGroup } from '../../interfaces';\n\n@Component({\n selector: 'fin-form-input-checkbox-list',\n templateUrl: 'form-input-checkbox-list.component.html',\n})\nexport class FormInputCheckboxListComponent {\n @Input()\n parentForm: TypedFormGroup<UntypedFormGroup | TypedFormArray<UntypedFormGroup>>;\n\n @Input()\n controlName: string;\n\n @Input()\n checkboxList: CheckboxOptionList;\n\n get formArray(): TypedFormArray<UntypedFormGroup> {\n return this.parentForm.get(this.controlName) as TypedFormArray<UntypedFormGroup>;\n }\n}\n"],"x_google_ignoreList":[6,12,17,18,19,21,28,31,35,44,45,49,50,51,55,56,102,109,110,131,134,144,147,148,149,176,189,190,198,199,203,211,214,360,361,365,367,374,375,380,410,411,412,413,414,415,416,417,418,419,421,443,445,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,493,498,506,507,513,524,525,526,527,528,529,531,534,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,676,677,678,682,685,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,721,731,741,746,756,758,767,771,772,773,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,806,808,821,824,839,845,846,852,865,872,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,903,904,905,906,907,908,909,910,911,912,913,914,918,922,933,936,952,953,954,958,959,961,962,964,966,998,1007,1008,1009,1022,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1249,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1287,1292,1306,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,1355,1364,1368,1381,1382,1397,1401,1402,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1565,1604,1617,1618,1621,1622,1623,1625,1626,1627,1628,1629,1630,1633,1638,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1693,1695,1700,1701,1702,1705,1722,1723,1724,1737,1738,1743,1747,1754,1756,1767,1768,1769,1776,1777,1780,1782,1789,1790,1797,1814,1815,1819,1825,1826,1832,1840,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1868,1869,1870,1884,1891,1892,1893,1900,1902,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1963,1986,1993,2001,2002]}